/* =========================================================
   Joker License Dashboard
   Global Styles
========================================================= */


/* =========================================================
   Root
========================================================= */

:root {
    --bg-primary: #08090d;
    --bg-secondary: #0d0f15;
    --bg-tertiary: #11141c;

    --surface: #10131a;
    --surface-light: #151923;
    --surface-hover: #191e29;

    --border: rgba(255, 255, 255, 0.07);
    --border-light: rgba(255, 255, 255, 0.11);

    --text-primary: #f4f5f7;
    --text-secondary: #9da3b0;
    --text-muted: #686f7d;

    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    --accent-dark: #6d28d9;

    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --sidebar-width: 250px;
    --topbar-height: 78px;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --transition: 0.2s ease;
}


/* =========================================================
   Reset
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 85% 5%,
            rgba(139, 92, 246, 0.08),
            transparent 28%
        ),
        var(--bg-primary);

    color: var(--text-primary);

    font-family:
        "Segoe UI",
        Arial,
        sans-serif;

    font-size: 14px;

    line-height: 1.5;

    -webkit-font-smoothing: antialiased;
}


button,
input,
select,
textarea {
    font: inherit;
}


button {
    border: 0;
    cursor: pointer;
}


a {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   App Layout
========================================================= */

.app {
    min-height: 100vh;

    display: flex;
}


/* =========================================================
   Sidebar
========================================================= */

.sidebar {
    position: fixed;

    top: 0;
    left: 0;

    width: var(--sidebar-width);
    height: 100vh;

    display: flex;
    flex-direction: column;

    background:
        linear-gradient(
            180deg,
            #0d0f15 0%,
            #090b10 100%
        );

    border-right: 1px solid var(--border);

    z-index: 100;

    transition:
        transform var(--transition),
        width var(--transition);
}


/* =========================================================
   Sidebar Header
========================================================= */

.sidebar-header {
    height: var(--topbar-height);

    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid var(--border);
}


.brand {
    display: flex;
    align-items: center;
    gap: 11px;
}


.brand-mark {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            var(--accent),
            var(--accent-dark)
        );

    border-radius: 10px;

    color: white;

    font-size: 20px;
    font-weight: 800;

    box-shadow:
        0 8px 25px rgba(139, 92, 246, 0.25);
}


.brand-text {
    display: flex;
    flex-direction: column;

    color: var(--text-primary);

    font-size: 17px;
    font-weight: 700;

    line-height: 1.1;
}


.brand-text small {
    margin-top: 3px;

    color: var(--text-muted);

    font-size: 9px;
    font-weight: 600;

    letter-spacing: 1.8px;
    text-transform: uppercase;
}


.sidebar-close {
    display: none;

    width: 32px;
    height: 32px;

    background: transparent;

    color: var(--text-secondary);

    border-radius: 8px;

    font-size: 24px;
}


.sidebar-close:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}


/* =========================================================
   Sidebar Navigation
========================================================= */

.sidebar-navigation {
    flex: 1;

    padding: 20px 12px;

    overflow-y: auto;
}


.nav-section {
    margin-bottom: 25px;
}


.nav-section-title {
    display: block;

    padding: 0 12px;
    margin-bottom: 8px;

    color: var(--text-muted);

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 1.2px;
}


.nav-link {
    min-height: 44px;

    margin-bottom: 3px;
    padding: 0 12px;

    display: flex;
    align-items: center;

    gap: 12px;

    color: var(--text-secondary);

    border-radius: var(--radius-sm);

    transition:
        background var(--transition),
        color var(--transition),
        transform var(--transition);
}


.nav-link:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}


.nav-link.active {
    background:
        linear-gradient(
            90deg,
            rgba(139, 92, 246, 0.18),
            rgba(139, 92, 246, 0.07)
        );

    color: var(--accent-light);

    box-shadow:
        inset 2px 0 0 var(--accent);
}


.nav-icon {
    width: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--text-muted);

    font-size: 16px;
}


.nav-link.active .nav-icon {
    color: var(--accent-light);
}


.nav-text {
    font-size: 13px;
    font-weight: 500;
}


/* =========================================================
   Sidebar Footer
========================================================= */

.sidebar-footer {
    padding: 15px 14px;

    border-top: 1px solid var(--border);
}


.admin-profile {
    min-height: 52px;

    padding: 7px 8px;

    display: flex;
    align-items: center;

    gap: 10px;

    border-radius: var(--radius-sm);

    background: rgba(255, 255, 255, 0.025);
}


.admin-avatar,
.topbar-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    background:
        linear-gradient(
            135deg,
            #292d39,
            #171a22
        );

    border: 1px solid var(--border-light);

    color: var(--text-primary);

    font-weight: 700;
}


.admin-avatar {
    width: 34px;
    height: 34px;

    border-radius: 9px;
}


.admin-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
}


.admin-info strong {
    overflow: hidden;

    color: var(--text-primary);

    font-size: 12px;
    font-weight: 600;

    white-space: nowrap;
    text-overflow: ellipsis;
}


.admin-info span {
    margin-top: 2px;

    color: var(--text-muted);

    font-size: 10px;
}


/* =========================================================
   Main Content
========================================================= */

.main-content {
    width: calc(100% - var(--sidebar-width));

    min-height: 100vh;

    margin-left: var(--sidebar-width);
}


/* =========================================================
   Topbar
========================================================= */

.topbar {
    position: sticky;

    top: 0;

    height: var(--topbar-height);

    padding: 0 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background:
        rgba(8, 9, 13, 0.88);

    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(18px);

    z-index: 50;
}


.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
}


.topbar-left {
    gap: 16px;
}


.topbar-right {
    gap: 18px;
}


.menu-button {
    display: none;

    width: 40px;
    height: 40px;

    padding: 9px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 9px;
}


.menu-button span {
    display: block;

    width: 20px;
    height: 2px;

    margin: 4px auto;

    background: var(--text-secondary);

    border-radius: 2px;
}


.page-heading {
    display: flex;
    flex-direction: column;
}


.page-eyebrow,
.section-label {
    color: var(--text-muted);

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 1.4px;
}


.page-heading h1 {
    margin-top: 1px;

    font-size: 20px;
    font-weight: 650;
}


.system-status {
    display: flex;
    align-items: center;

    gap: 7px;

    color: var(--text-secondary);

    font-size: 11px;
}


.status-dot {
    width: 7px;
    height: 7px;

    display: inline-block;

    background: var(--success);

    border-radius: 50%;

    box-shadow:
        0 0 0 3px rgba(34, 197, 94, 0.08);
}


.notification-button {
    position: relative;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;

    color: var(--text-secondary);

    border-radius: 9px;
}


.notification-button:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}


.notification-icon {
    font-size: 21px;
}


.notification-badge {
    position: absolute;

    top: 4px;
    right: 3px;

    min-width: 15px;
    height: 15px;

    padding: 0 4px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--accent);

    border: 2px solid var(--bg-primary);
    border-radius: 10px;

    color: white;

    font-size: 8px;
    font-weight: 700;
}


.topbar-avatar {
    width: 35px;
    height: 35px;

    border-radius: 9px;

    font-size: 12px;
}


/* =========================================================
   Content
========================================================= */

.content {
    max-width: 1600px;

    margin: 0 auto;

    padding: 30px;
}


/* =========================================================
   Welcome Section
========================================================= */

.welcome-section {
    margin-bottom: 28px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;
}


.welcome-section h2 {
    margin-top: 5px;

    font-size: 25px;
    font-weight: 650;

    letter-spacing: -0.5px;
}


.welcome-section p {
    margin-top: 5px;

    color: var(--text-secondary);

    font-size: 13px;
}


/* =========================================================
   Buttons
========================================================= */

.primary-button {
    min-height: 42px;

    padding: 0 17px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    background:
        linear-gradient(
            135deg,
            var(--accent),
            var(--accent-dark)
        );

    border-radius: 9px;

    color: white;

    font-size: 12px;
    font-weight: 600;

    box-shadow:
        0 8px 22px rgba(109, 40, 217, 0.18);

    transition:
        transform var(--transition),
        box-shadow var(--transition);
}


.primary-button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 11px 28px rgba(109, 40, 217, 0.28);
}


.text-button {
    background: transparent;

    color: var(--accent-light);

    font-size: 11px;
    font-weight: 600;
}


.text-button:hover {
    color: white;
}


.icon-button {
    width: 32px;
    height: 32px;

    background: transparent;

    color: var(--text-muted);

    border-radius: 8px;

    font-size: 18px;
}


.icon-button:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}


/* =========================================================
   Statistics Grid
========================================================= */

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 15px;

    margin-bottom: 18px;
}


.stat-card {
    padding: 18px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.035),
            rgba(255, 255, 255, 0.015)
        );

    border: 1px solid var(--border);

    border-radius: var(--radius-md);

    transition:
        border-color var(--transition),
        transform var(--transition);
}


.stat-card:hover {
    border-color: var(--border-light);

    transform: translateY(-2px);
}


.stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.stat-icon {
    width: 35px;
    height: 35px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(139, 92, 246, 0.1);

    border-radius: 9px;

    color: var(--accent-light);

    font-size: 17px;
}


.stat-label {
    color: var(--text-muted);

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 0.8px;
}


.stat-value {
    margin-top: 15px;

    font-size: 27px;
    font-weight: 700;

    letter-spacing: -0.7px;
}


.stat-footer {
    margin-top: 3px;

    font-size: 10px;
}


.stat-neutral {
    color: var(--text-muted);
}


.stat-success {
    color: var(--success);
}


.stat-warning {
    color: var(--warning);
}


.stat-danger {
    color: var(--danger);
}


/* =========================================================
   Dashboard Grid
========================================================= */

.dashboard-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.65fr)
        minmax(280px, 0.8fr);

    gap: 18px;

    margin-bottom: 18px;
}


/* =========================================================
   Panels
========================================================= */

.panel {
    overflow: hidden;

    background:
        rgba(16, 19, 26, 0.78);

    border: 1px solid var(--border);

    border-radius: var(--radius-md);
}


.panel-header {
    min-height: 75px;

    padding: 17px 19px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid var(--border);
}


.panel-header h3 {
    margin-top: 3px;

    font-size: 14px;
    font-weight: 600;
}


/* =========================================================
   Tables
========================================================= */

.table-wrapper {
    width: 100%;

    overflow-x: auto;
}


.data-table {
    width: 100%;

    border-collapse: collapse;

    white-space: nowrap;
}


.data-table th {
    padding: 11px 18px;

    background: rgba(255, 255, 255, 0.015);

    color: var(--text-muted);

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 0.7px;
    text-align: left;
}


.data-table td {
    padding: 14px 18px;

    border-top: 1px solid var(--border);

    color: var(--text-secondary);

    font-size: 11px;
}


.data-table tbody tr {
    transition:
        background var(--transition);
}


.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.018);
}


/* =========================================================
   Empty State
========================================================= */

.empty-row td {
    padding: 0;
}


.empty-state {
    min-height: 190px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 4px;
}


.empty-icon {
    width: 42px;
    height: 42px;

    margin-bottom: 7px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(139, 92, 246, 0.08);

    border-radius: 11px;

    color: var(--accent-light);

    font-size: 18px;
}


.empty-state strong,
.activity-empty strong {
    color: var(--text-secondary);

    font-size: 12px;
    font-weight: 600;
}


.empty-state span,
.activity-empty span {
    color: var(--text-muted);

    font-size: 10px;
}


/* =========================================================
   Launcher
========================================================= */

.launcher-list {
    padding: 19px;
}


.launcher-item {
    display: flex;
    align-items: center;

    gap: 12px;
}


.launcher-logo {
    width: 43px;
    height: 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    background:
        linear-gradient(
            135deg,
            var(--accent),
            var(--accent-dark)
        );

    border-radius: 11px;

    color: white;

    font-size: 19px;
    font-weight: 800;

    box-shadow:
        0 7px 18px rgba(109, 40, 217, 0.18);
}


.launcher-info {
    min-width: 0;

    flex: 1;

    display: flex;
    flex-direction: column;
}


.launcher-info strong {
    color: var(--text-primary);

    font-size: 12px;
    font-weight: 600;
}


.launcher-info span {
    margin-top: 2px;

    color: var(--text-muted);

    font-size: 10px;
}


.launcher-status {
    display: flex;
    align-items: center;

    gap: 6px;

    color: var(--success);

    font-size: 10px;
}


.launcher-stats {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 10px;

    margin-top: 22px;
}


.launcher-stats > div {
    padding: 12px;

    background: rgba(255, 255, 255, 0.025);

    border: 1px solid var(--border);

    border-radius: 9px;
}


.launcher-stats span {
    display: block;

    color: var(--text-muted);

    font-size: 9px;
}


.launcher-stats strong {
    display: block;

    margin-top: 3px;

    color: var(--text-primary);

    font-size: 17px;
}


/* =========================================================
   Activity
========================================================= */

.activity-panel {
    margin-bottom: 25px;
}


.activity-list {
    min-height: 150px;
}


.activity-empty {
    min-height: 150px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 4px;
}


/* =========================================================
   Overlay
========================================================= */

.sidebar-overlay {
    display: none;

    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.65);

    backdrop-filter: blur(3px);

    z-index: 90;
}


/* =========================================================
   Scrollbar
========================================================= */

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}


::-webkit-scrollbar-track {
    background: transparent;
}


::-webkit-scrollbar-thumb {
    background: #252936;

    border-radius: 10px;
}


::-webkit-scrollbar-thumb:hover {
    background: #303545;
}


/* =========================================================
   Selection
========================================================= */

::selection {
    background: rgba(139, 92, 246, 0.3);

    color: white;
}


/* =========================================================
   Responsive - Tablet
========================================================= */

@media (max-width: 1100px) {

    :root {
        --sidebar-width: 225px;
    }


    .content {
        padding: 24px;
    }


    .stats-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .dashboard-grid {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   Responsive - Mobile
========================================================= */

@media (max-width: 760px) {

    .sidebar {
        transform: translateX(-100%);

        box-shadow:
            20px 0 50px rgba(0, 0, 0, 0.35);
    }


    .sidebar.open {
        transform: translateX(0);
    }


    .sidebar-close {
        display: block;
    }


    .sidebar-overlay.active {
        display: block;
    }


    .main-content {
        width: 100%;

        margin-left: 0;
    }


    .topbar {
        padding: 0 16px;
    }


    .menu-button {
        display: block;
    }


    .system-status {
        display: none;
    }


    .topbar-right {
        gap: 8px;
    }


    .content {
        padding: 20px 15px;
    }


    .welcome-section {
        align-items: flex-start;

        flex-direction: column;
    }


    .welcome-section h2 {
        font-size: 21px;
    }


    .welcome-section p {
        max-width: 450px;
    }


    .primary-button {
        width: 100%;
    }


    .stats-grid {
        grid-template-columns: 1fr;

        gap: 10px;
    }


    .stat-card {
        padding: 16px;
    }


    .dashboard-grid {
        grid-template-columns: 1fr;

        gap: 12px;
    }


    .panel-header {
        min-height: 68px;

        padding: 15px;
    }


    .data-table th,
    .data-table td {
        padding-left: 13px;
        padding-right: 13px;
    }

}


/* =========================================================
   Small Mobile
========================================================= */

@media (max-width: 430px) {

    .page-heading h1 {
        font-size: 17px;
    }


    .page-eyebrow {
        font-size: 8px;
    }


    .topbar-avatar {
        width: 32px;
        height: 32px;
    }


    .notification-button {
        width: 34px;
        height: 34px;
    }


    .welcome-section h2 {
        font-size: 19px;
    }


    .launcher-item {
        align-items: flex-start;
    }


    .launcher-status {
        margin-left: auto;
    }

}


/* =========================================================
   Create License
========================================================= */

.create-license-page {
    width: 100%;
}


.create-license-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(280px, 0.75fr);

    gap: 18px;

    margin-bottom: 18px;
}


/* =========================================================
   License Form
========================================================= */

.license-form {
    padding: 22px;
}


.form-group {
    margin-bottom: 21px;
}


.form-group:last-of-type {
    margin-bottom: 0;
}


.form-group > label,
.form-label-row label {
    display: block;

    margin-bottom: 7px;

    color: var(--text-primary);

    font-size: 11px;
    font-weight: 600;
}


.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.form-help {
    display: block;

    margin-top: 6px;

    color: var(--text-muted);

    font-size: 10px;
    line-height: 1.5;
}


.license-form select,
.license-form input[type="number"],
.license-form textarea {
    width: 100%;

    padding: 0 12px;

    background: #0b0d12;

    border: 1px solid var(--border-light);
    border-radius: 8px;

    outline: none;

    color: var(--text-primary);

    font-size: 12px;

    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}


.license-form select,
.license-form input[type="number"] {
    height: 43px;
}


.license-form textarea {
    min-height: 100px;

    padding: 12px;

    resize: vertical;
}


.license-form select:focus,
.license-form input[type="number"]:focus,
.license-form textarea:focus {
    border-color: var(--accent);

    box-shadow:
        0 0 0 3px rgba(139, 92, 246, 0.09);
}


.license-form select option {
    background: #0b0d12;
    color: var(--text-primary);
}


/* =========================================================
   Toggle
========================================================= */

.toggle {
    position: relative;

    width: 43px;
    height: 23px;

    display: block;

    cursor: pointer;
}


.toggle input {
    position: absolute;

    width: 0;
    height: 0;

    opacity: 0;
}


.toggle-slider {
    position: absolute;

    inset: 0;

    background: #252936;

    border-radius: 20px;

    transition:
        background var(--transition);
}


.toggle-slider::before {
    content: "";

    position: absolute;

    width: 17px;
    height: 17px;

    left: 3px;
    top: 3px;

    background: #aeb3bd;

    border-radius: 50%;

    transition:
        transform var(--transition),
        background var(--transition);
}


.toggle input:checked + .toggle-slider {
    background: var(--accent);
}


.toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);

    background: white;
}


.toggle-status {
    color: var(--success);

    font-size: 10px;
    font-weight: 600;
}


/* =========================================================
   Form Actions
========================================================= */

.form-actions {
    margin-top: 27px;
    padding-top: 20px;

    display: flex;
    justify-content: flex-end;

    gap: 10px;

    border-top: 1px solid var(--border);
}


.secondary-button {
    min-height: 42px;

    padding: 0 17px;

    background: var(--surface-light);

    border: 1px solid var(--border-light);
    border-radius: 9px;

    color: var(--text-secondary);

    font-size: 12px;
    font-weight: 600;

    transition:
        background var(--transition),
        color var(--transition);
}


.secondary-button:hover {
    background: var(--surface-hover);

    color: var(--text-primary);
}


/* =========================================================
   License Preview
========================================================= */

.license-preview {
    padding: 25px 21px;
}


.preview-icon {
    width: 58px;
    height: 58px;

    margin: 4px auto 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            var(--accent),
            var(--accent-dark)
        );

    border-radius: 15px;

    color: white;

    font-size: 25px;
    font-weight: 800;

    box-shadow:
        0 12px 30px rgba(109, 40, 217, 0.22);
}


.license-preview > h3 {
    color: var(--text-primary);

    font-size: 16px;
    font-weight: 650;

    text-align: center;
}


.preview-product {
    display: block;

    margin-top: 2px;

    color: var(--text-muted);

    font-family: monospace;

    font-size: 10px;

    text-align: center;
}


.preview-divider {
    height: 1px;

    margin: 21px 0;

    background: var(--border);
}


.preview-row {
    min-height: 34px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;
}


.preview-row span {
    color: var(--text-muted);

    font-size: 10px;
}


.preview-row strong {
    color: var(--text-primary);

    font-size: 11px;
    font-weight: 600;

    text-align: right;
}


.preview-info {
    padding: 11px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    background: rgba(34, 197, 94, 0.05);

    border: 1px solid rgba(34, 197, 94, 0.1);

    border-radius: 8px;

    color: var(--success);

    font-size: 10px;
}



/* =========================================================
   Generated Licenses
========================================================= */

.generated-panel {
    margin-bottom: 25px;
}

.generated-licenses {
    padding: 10px 18px 18px;
}


/* =========================================================
   Generated License Card
========================================================= */

.generated-license-item {
    position: relative;

    padding: 16px;

    display: flex;
    align-items: flex-start;
    gap: 13px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.025),
            rgba(255, 255, 255, 0.01)
        );

    border: 1px solid var(--border);

    border-radius: 11px;

    transition:
        border-color var(--transition),
        background var(--transition),
        transform var(--transition);

    margin-bottom: 10px;
}


.generated-license-item:last-child {
    margin-bottom: 0;
}


.generated-license-item:hover {
    background:
        linear-gradient(
            145deg,
            rgba(139, 92, 246, 0.035),
            rgba(255, 255, 255, 0.015)
        );

    border-color:
        rgba(139, 92, 246, 0.18);

    transform: translateY(-1px);
}


/* =========================================================
   License Number
========================================================= */

.generated-license-number {
    width: 29px;
    height: 29px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    background:
        rgba(139, 92, 246, 0.09);

    border:
        1px solid rgba(139, 92, 246, 0.12);

    border-radius: 8px;

    color: var(--accent-light);

    font-size: 9px;
    font-weight: 700;
}


/* =========================================================
   Main License Content
========================================================= */

.generated-license-main {
    min-width: 0;
    flex: 1;
}


/* =========================================================
   License Code Row
========================================================= */

.generated-license-code-row {
    min-height: 34px;

    display: flex;
    align-items: center;

    gap: 10px;

    margin-bottom: 13px;
}


.generated-license-code {
    min-width: 0;
    flex: 1;

    overflow: hidden;

    color: var(--text-primary);

    font-family:
        "Cascadia Code",
        Consolas,
        monospace;

    font-size: 12px;
    font-weight: 600;

    letter-spacing: 0.2px;

    white-space: nowrap;
    text-overflow: ellipsis;
}


/* =========================================================
   Copy Button
========================================================= */

.copy-license-button {
    min-width: 55px;
    height: 30px;

    padding: 0 9px;

    flex-shrink: 0;

    background: var(--surface-light);

    border: 1px solid var(--border-light);

    border-radius: 7px;

    color: var(--text-secondary);

    font-size: 9px;
    font-weight: 600;

    transition:
        background var(--transition),
        color var(--transition),
        border-color var(--transition);
}


.copy-license-button:hover {
    background: var(--surface-hover);

    border-color:
        rgba(139, 92, 246, 0.25);

    color: var(--text-primary);
}


/* =========================================================
   License Details
========================================================= */

.generated-license-details {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(120px, 1fr));

    gap: 8px;

    margin-bottom: 10px;
}


.generated-license-detail {
    min-width: 0;

    padding: 9px 10px;

    display: flex;
    flex-direction: column;

    gap: 3px;

    background:
        rgba(255, 255, 255, 0.018);

    border:
        1px solid var(--border);

    border-radius: 7px;
}


.generated-license-detail-label {
    color: var(--text-muted);

    font-size: 8px;
    font-weight: 700;

    letter-spacing: 0.7px;

    text-transform: uppercase;
}


.generated-license-detail-value {
    overflow: hidden;

    color: var(--text-secondary);

    font-size: 10px;
    font-weight: 600;

    white-space: nowrap;
    text-overflow: ellipsis;
}


/* =========================================================
   Status
========================================================= */

.generated-license-detail:last-child
.generated-license-detail-value {
    color: var(--success);
}


/* =========================================================
   License Note
========================================================= */

.generated-license-note {
    padding: 10px 11px;

    background:
        rgba(139, 92, 246, 0.035);

    border:
        1px solid rgba(139, 92, 246, 0.09);

    border-radius: 7px;
}


.generated-license-note-value {
    margin-top: 4px;

    color: var(--text-secondary);

    font-size: 10px;

    line-height: 1.55;

    overflow-wrap: anywhere;
}


/* =========================================================
   Create License Responsive
========================================================= */

@media (max-width: 900px) {

    .create-license-layout {
        grid-template-columns: 1fr;
    }


    .generated-license-details {
        grid-template-columns:
            repeat(2, minmax(120px, 1fr));
    }

}


@media (max-width: 600px) {

    .license-form {
        padding: 17px;
    }


    .license-preview {
        padding: 20px 17px;
    }


    .form-actions {
        flex-direction: column-reverse;
    }


    .form-actions button {
        width: 100%;
    }


    /* =============================================
       Generated License Mobile
    ============================================== */

    .generated-licenses {
        padding: 8px 12px 14px;
    }


    .generated-license-item {
        padding: 13px;

        gap: 9px;

        align-items: flex-start;
    }


    .generated-license-number {
        width: 26px;
        height: 26px;
    }


    .generated-license-code-row {
        gap: 7px;

        margin-bottom: 10px;
    }


    .generated-license-code {
        font-size: 10px;
    }


    .generated-license-details {
        grid-template-columns: 1fr 1fr;

        gap: 6px;
    }


    .generated-license-detail {
        padding: 8px;

        gap: 2px;
    }


    .generated-license-detail-label {
        font-size: 7px;
    }


    .generated-license-detail-value {
        font-size: 9px;
    }


    .generated-license-note {
        padding: 9px;
    }


    .generated-license-note-value {
        font-size: 9px;
    }

}


@media (max-width: 430px) {

    .generated-license-item {
        padding: 11px;

        gap: 7px;
    }


    .generated-license-code-row {
        align-items: stretch;
        flex-direction: column;
    }


    .generated-license-code {
        display: block;

        width: 100%;

        padding: 8px 9px;

        background:
            rgba(0, 0, 0, 0.18);

        border:
            1px solid var(--border);

        border-radius: 7px;

        font-size: 9px;
    }


    .copy-license-button {
        width: 100%;
    }


    .generated-license-details {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   License Management
========================================================= */

.licenses-page {
    width: 100%;
}

/* =========================================================
   License Toolbar
========================================================= */

.licenses-toolbar {
    margin-bottom: 18px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;

    background: rgba(16, 19, 26, 0.78);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.license-search {
    position: relative;
    min-width: 240px;
    flex: 1;
}

.license-search input {
    width: 100%;
    height: 40px;
    padding: 0 13px 0 38px;

    background: #0b0d12;
    border: 1px solid var(--border-light);
    border-radius: 8px;

    outline: none;
    color: var(--text-primary);
    font-size: 11px;

    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

.license-search input::placeholder {
    color: var(--text-muted);
}

.license-search input:focus {
    border-color: var(--accent);
    box-shadow:
        0 0 0 3px rgba(139, 92, 246, 0.09);
}

.license-search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);

    color: var(--text-muted);
    font-size: 14px;

    pointer-events: none;
}

.license-filter {
    height: 40px;
    min-width: 135px;
    padding: 0 11px;

    background: #0b0d12;
    border: 1px solid var(--border-light);
    border-radius: 8px;

    outline: none;
    color: var(--text-secondary);
    font-size: 11px;

    cursor: pointer;

    transition:
        border-color var(--transition),
        color var(--transition);
}

.license-filter:focus {
    border-color: var(--accent);
    color: var(--text-primary);
}

.license-filter option {
    background: #0b0d12;
    color: var(--text-primary);
}

.licenses-refresh-button {
    height: 40px;
    padding: 0 13px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    background: var(--surface-light);
    border: 1px solid var(--border-light);
    border-radius: 8px;

    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;

    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition),
        transform var(--transition);
}

.licenses-refresh-button:hover {
    background: var(--surface-hover);
    border-color: rgba(139, 92, 246, 0.25);
    color: var(--text-primary);
}

.licenses-refresh-button:active {
    transform: scale(0.97);
}

/* =========================================================
   License Table
========================================================= */

.licenses-table-panel {
    margin-bottom: 25px;
}

.licenses-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.licenses-table {
    min-width: 1000px;
}

.licenses-table th {
    height: 43px;
}

.licenses-table td {
    vertical-align: middle;
}

.license-id {
    color: var(--text-muted);
    font-family:
        "Cascadia Code",
        Consolas,
        monospace;
    font-size: 10px;
}

.license-code-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.license-code {
    max-width: 210px;
    overflow: hidden;

    color: var(--text-primary);
    font-family:
        "Cascadia Code",
        Consolas,
        monospace;
    font-size: 10px;
    font-weight: 600;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.license-copy-button {
    min-width: 30px;
    width: 30px;
    height: 30px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 7px;

    color: var(--text-muted);
    font-size: 12px;

    transition:
        background var(--transition),
        color var(--transition),
        border-color var(--transition);
}

.license-copy-button:hover {
    background: var(--surface-hover);
    border-color: rgba(139, 92, 246, 0.25);
    color: var(--accent-light);
}

/* =========================================================
   License Status
========================================================= */

.license-status {
    min-width: 70px;
    padding: 5px 8px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    border-radius: 6px;

    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.license-status::before {
    content: "";

    width: 5px;
    height: 5px;

    flex-shrink: 0;

    border-radius: 50%;
}

.license-status-unused {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.12);
    color: #60a5fa;
}

.license-status-unused::before {
    background: var(--info);
}

.license-status-active {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.12);
    color: #4ade80;
}

.license-status-active::before {
    background: var(--success);
    box-shadow:
        0 0 0 3px rgba(34, 197, 94, 0.08);
}

.license-status-expired {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.12);
    color: #fbbf24;
}

.license-status-expired::before {
    background: var(--warning);
}

.license-status-revoked {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.12);
    color: #f87171;
}

.license-status-revoked::before {
    background: var(--danger);
}

/* =========================================================
   Device Binding
========================================================= */

.license-device {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    color: var(--text-secondary);
    font-size: 10px;
}

.license-device-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.license-device-bound .license-device-dot {
    background: var(--success);
}

.license-device-unbound .license-device-dot {
    background: var(--text-muted);
}

/* =========================================================
   License Actions
========================================================= */

.license-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.license-action-button {
    height: 30px;
    padding: 0 9px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 7px;

    color: var(--text-secondary);
    font-size: 9px;
    font-weight: 600;

    white-space: nowrap;

    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition),
        transform var(--transition);
}

.license-action-button:hover {
    background: var(--surface-hover);
    border-color: var(--border-light);
    color: var(--text-primary);
}

.license-action-button:active {
    transform: scale(0.97);
}

.license-action-view:hover {
    border-color: rgba(139, 92, 246, 0.3);
    color: var(--accent-light);
}

.license-action-revoke:hover {
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

.license-action-delete:hover {
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

/* =========================================================
   License Details Panel
========================================================= */

.license-details-panel {
    margin-top: 18px;
    padding: 20px;

    background:
        linear-gradient(
            145deg,
            rgba(139, 92, 246, 0.035),
            rgba(255, 255, 255, 0.012)
        );

    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.license-details-header {
    margin-bottom: 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.license-details-title {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.license-details-title strong {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 650;
}

.license-details-title span {
    color: var(--text-muted);
    font-size: 10px;
}

.license-details-close {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border-radius: 8px;

    color: var(--text-muted);
    font-size: 18px;

    transition:
        background var(--transition),
        color var(--transition);
}

.license-details-close:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

/* =========================================================
   License Key Display
========================================================= */

.license-key-box {
    margin-bottom: 18px;
    padding: 14px;

    background: #090b10;
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 9px;
}

.license-key-label {
    display: block;
    margin-bottom: 7px;

    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.license-key-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.license-key-value {
    min-width: 0;
    flex: 1;

    color: var(--accent-light);
    font-family:
        "Cascadia Code",
        Consolas,
        monospace;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;

    overflow-wrap: anywhere;
}

.license-key-copy {
    height: 34px;
    padding: 0 11px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    flex-shrink: 0;

    background: var(--accent);
    border-radius: 7px;

    color: white;
    font-size: 9px;
    font-weight: 600;

    transition:
        background var(--transition),
        transform var(--transition);
}

.license-key-copy:hover {
    background: var(--accent-dark);
}

.license-key-copy:active {
    transform: scale(0.97);
}

/* =========================================================
   License Details Grid
========================================================= */

.license-details-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.license-detail-card {
    min-width: 0;
    padding: 11px;

    background: rgba(255, 255, 255, 0.018);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.license-detail-card-label {
    display: block;
    margin-bottom: 4px;

    color: var(--text-muted);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.license-detail-card-value {
    display: block;

    overflow: hidden;

    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 600;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.license-detail-card-value.monospace {
    font-family:
        "Cascadia Code",
        Consolas,
        monospace;
    font-size: 9px;
}

/* =========================================================
   Device Information
========================================================= */

.license-device-panel {
    margin-top: 14px;
    padding: 13px;

    background: rgba(255, 255, 255, 0.018);
    border: 1px solid var(--border);
    border-radius: 9px;
}

.license-device-header {
    margin-bottom: 10px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.license-device-header strong {
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 600;
}

.license-device-header span {
    color: var(--text-muted);
    font-size: 9px;
}

.license-device-id {
    padding: 10px;

    background: #090b10;
    border: 1px solid var(--border);
    border-radius: 7px;

    color: var(--text-secondary);
    font-family:
        "Cascadia Code",
        Consolas,
        monospace;
    font-size: 9px;

    overflow-wrap: anywhere;
}

.license-no-device {
    color: var(--text-muted);
    font-size: 10px;
}

/* =========================================================
   License Note
========================================================= */

.license-management-note {
    margin-top: 14px;
    padding: 11px 12px;

    background: rgba(139, 92, 246, 0.035);
    border: 1px solid rgba(139, 92, 246, 0.09);
    border-radius: 8px;
}

.license-management-note-label {
    display: block;
    margin-bottom: 4px;

    color: var(--accent-light);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.license-management-note-value {
    color: var(--text-secondary);
    font-size: 10px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

/* =========================================================
   License Loading
========================================================= */

.license-loading {
    min-height: 190px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    color: var(--text-muted);
    font-size: 10px;
}

.license-loading-spinner {
    width: 16px;
    height: 16px;

    border: 2px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--accent);

    border-radius: 50%;

    animation: licenseSpinner 0.75s linear infinite;
}

@keyframes licenseSpinner {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================================
   License Error
========================================================= */

.license-error {
    margin: 15px 18px;
    padding: 12px;

    display: flex;
    align-items: center;
    gap: 9px;

    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.12);
    border-radius: 8px;

    color: #f87171;
    font-size: 10px;
}

/* =========================================================
   License Empty State
========================================================= */

.licenses-empty {
    min-height: 220px;
    padding: 30px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;

    text-align: center;
}

.licenses-empty .empty-icon {
    margin-bottom: 8px;
}

.licenses-empty strong {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
}

.licenses-empty span {
    max-width: 350px;
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.5;
}

/* =========================================================
   License Count
========================================================= */

.licenses-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 23px;
    height: 21px;
    padding: 0 7px;

    background: rgba(139, 92, 246, 0.09);
    border: 1px solid rgba(139, 92, 246, 0.12);
    border-radius: 6px;

    color: var(--accent-light);
    font-size: 9px;
    font-weight: 700;
}

/* =========================================================
   License Management Responsive
========================================================= */

@media (max-width: 1000px) {

    .license-details-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 760px) {

    .licenses-toolbar {
        padding: 12px;
    }

    .license-search {
        width: 100%;
        min-width: 100%;
        flex: none;
    }

    .license-filter {
        flex: 1;
        min-width: 0;
    }

    .licenses-refresh-button {
        flex: 0 0 auto;
    }

    .license-details-panel {
        padding: 15px;
    }

    .license-details-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .license-details-header {
        align-items: flex-start;
    }

}

@media (max-width: 600px) {

    .licenses-toolbar {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .license-search {
        grid-column: 1 / -1;
    }

    .license-filter {
        width: 100%;
    }

    .licenses-refresh-button {
        width: 100%;
    }

    .license-key-row {
        align-items: stretch;
        flex-direction: column;
    }

    .license-key-value {
        padding: 9px;

        background: rgba(0, 0, 0, 0.18);
        border: 1px solid var(--border);
        border-radius: 7px;

        font-size: 10px;
    }

    .license-key-copy {
        width: 100%;
    }

    .license-details-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 430px) {

    .licenses-toolbar {
        grid-template-columns: 1fr;
    }

    .license-search {
        grid-column: auto;
    }

    .license-filter {
        width: 100%;
    }

    .licenses-refresh-button {
        width: 100%;
    }

    .license-details-panel {
        padding: 12px;
    }

    .license-details-title strong {
        font-size: 13px;
    }

    .license-key-box {
        padding: 11px;
    }

}



/* =========================================================
   LICENSES PAGE
========================================================= */

.licenses-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}


/* =========================================================
   LICENSES TOOLBAR
========================================================= */

.licenses-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
}

.licenses-search {
    flex: 1;
    min-width: 260px;
}

.license-search-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;

    border: 1px solid var(--border-color);
    border-radius: 10px;

    background: var(--input-background, var(--card-background));
    color: var(--text-primary);

    font-family: inherit;
    font-size: 14px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.license-search-input::placeholder {
    color: var(--text-secondary);
}

.license-search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.12);
}


.licenses-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.license-filter-select {
    height: 44px;
    min-width: 135px;

    padding: 0 34px 0 12px;

    border: 1px solid var(--border-color);
    border-radius: 10px;

    background: var(--input-background, var(--card-background));
    color: var(--text-primary);

    font-family: inherit;
    font-size: 13px;

    outline: none;
    cursor: pointer;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.license-filter-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.12);
}


/* =========================================================
   LICENSE COUNT
========================================================= */

.license-count {
    display: inline-flex;
    align-items: center;

    min-height: 30px;
    padding: 0 11px;

    border: 1px solid var(--border-color);
    border-radius: 999px;

    background: var(--card-background);
    color: var(--text-secondary);

    font-size: 12px;
    font-weight: 600;
}


/* =========================================================
   LICENSE TABLE
========================================================= */

.licenses-table-wrapper {
    overflow-x: auto;
    overflow-y: hidden;

    border-radius: 12px;
}

.licenses-table {
    width: 100%;
    min-width: 980px;

    border-collapse: collapse;
}

.licenses-table th {
    height: 48px;

    padding: 0 16px;

    border-bottom: 1px solid var(--border-color);

    color: var(--text-secondary);

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: left;
    text-transform: uppercase;

    white-space: nowrap;
}

.licenses-table td {
    padding: 15px 16px;

    border-bottom: 1px solid var(--border-color);

    color: var(--text-primary);

    font-size: 13px;

    vertical-align: middle;
}

.licenses-table tbody tr {
    transition:
        background 0.18s ease;
}

.licenses-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
}

.licenses-table tbody tr:last-child td {
    border-bottom: 0;
}


/* =========================================================
   LICENSE TABLE MAIN
========================================================= */

.license-table-main {
    display: flex;
    flex-direction: column;
    gap: 4px;

    min-width: 150px;
}

.license-table-main strong {
    color: var(--text-primary);

    font-size: 14px;
    font-weight: 700;
}

.license-table-main span {
    color: var(--text-secondary);

    font-size: 11px;
}


.licenses-table td:nth-child(2) {
    min-width: 130px;
}

.licenses-table td:nth-child(2) {
    color: var(--text-primary);
}

.licenses-table td:nth-child(2) strong {
    display: block;

    font-size: 13px;
    font-weight: 600;
}

.licenses-table td:nth-child(2) span {
    display: block;

    margin-top: 3px;

    color: var(--text-secondary);

    font-size: 11px;
}


/* =========================================================
   STATUS BADGES
========================================================= */

.license-status-badge,
.license-device-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 26px;

    padding: 0 9px;

    border: 1px solid transparent;
    border-radius: 999px;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;

    white-space: nowrap;
}


/* UNUSED */

.license-status-badge.status-unused {
    background: rgba(148, 163, 184, 0.10);
    border-color: rgba(148, 163, 184, 0.20);
    color: #aab4c3;
}


/* ACTIVE */

.license-status-badge.status-active {
    background: rgba(34, 197, 94, 0.10);
    border-color: rgba(34, 197, 94, 0.22);
    color: #4ade80;
}


/* EXPIRED */

.license-status-badge.status-expired {
    background: rgba(245, 158, 11, 0.10);
    border-color: rgba(245, 158, 11, 0.22);
    color: #fbbf24;
}


/* REVOKED */

.license-status-badge.status-revoked {
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.22);
    color: #f87171;
}


.license-status-badge.status-unknown {
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
}


/* =========================================================
   DEVICE BADGE
========================================================= */

.license-device-badge {
    background: rgba(124, 92, 255, 0.08);
    border-color: rgba(124, 92, 255, 0.18);
    color: var(--text-secondary);
}

.license-device-badge::before {
    content: "";

    width: 6px;
    height: 6px;

    margin-right: 7px;

    border-radius: 50%;

    background: currentColor;
}


/* =========================================================
   LICENSE ACTIONS
========================================================= */

.license-table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: 6px;

    flex-wrap: wrap;

    min-width: 250px;
}

.license-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 31px;

    padding: 0 9px;

    border: 1px solid var(--border-color);
    border-radius: 7px;

    background: transparent;
    color: var(--text-secondary);

    font-family: inherit;
    font-size: 11px;
    font-weight: 600;

    cursor: pointer;

    transition:
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

.license-action-button:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.045);

    transform: translateY(-1px);
}

.license-action-view:hover {
    border-color: rgba(124, 92, 255, 0.45);
    color: #a78bfa;
}

.license-action-copy:hover {
    border-color: rgba(59, 130, 246, 0.45);
    color: #60a5fa;
}

.license-action-warning:hover {
    border-color: rgba(245, 158, 11, 0.45);
    color: #fbbf24;
}

.license-action-danger:hover {
    border-color: rgba(239, 68, 68, 0.45);
    color: #f87171;
}

.license-action-delete {
    color: #f87171;
}

.license-action-delete:hover {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.08);
    color: #ff8a8a;
}


/* =========================================================
   LOADING / EMPTY CELL
========================================================= */

.licenses-loading-cell {
    height: 180px;

    text-align: center !important;
}

.licenses-loading-cell .activity-empty {
    min-height: 150px;
}


/* =========================================================
   LICENSE MODAL
========================================================= */

.license-modal {
    position: fixed;
    inset: 0;

    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;
}

.license-modal[hidden] {
    display: none;
}


.license-modal-overlay {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.72);

    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}


.license-modal-dialog {
    position: relative;

    z-index: 1;

    width: min(720px, 100%);
    max-height: min(850px, calc(100vh - 48px));

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border: 1px solid var(--border-color);
    border-radius: 18px;

    background: var(--card-background);

    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.45);
}


.license-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 20px 22px;

    border-bottom: 1px solid var(--border-color);
}

.license-modal-header h3 {
    margin: 5px 0 0;

    color: var(--text-primary);

    font-size: 19px;
    font-weight: 700;
}


.license-modal-close {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border-color);
    border-radius: 9px;

    background: transparent;
    color: var(--text-secondary);

    font-size: 23px;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease;
}

.license-modal-close:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}


/* =========================================================
   MODAL BODY
========================================================= */

.license-modal-body {
    padding: 22px;

    overflow-y: auto;
}


/* =========================================================
   ACTIVATION CODE
========================================================= */

.license-detail-code-section {
    display: flex;
    flex-direction: column;
    gap: 9px;

    margin-bottom: 22px;
}

.license-detail-code-row {
    display: flex;
    align-items: center;
    gap: 10px;

    width: 100%;
}

.license-detail-code {
    flex: 1;

    min-width: 0;

    display: block;

    padding: 13px 14px;

    border: 1px solid rgba(124, 92, 255, 0.25);
    border-radius: 10px;

    background: rgba(124, 92, 255, 0.06);
    color: #c4b5fd;

    font-family:
        "Cascadia Code",
        "Consolas",
        monospace;

    font-size: 14px;
    font-weight: 700;

    letter-spacing: 0.04em;

    overflow-x: auto;
    white-space: nowrap;
}


/* =========================================================
   DETAILS GRID
========================================================= */

.license-detail-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 10px;

    margin-bottom: 18px;
}


.license-detail-item {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 6px;

    padding: 13px 14px;

    border: 1px solid var(--border-color);
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.018);
}


.license-detail-item > span {
    color: var(--text-secondary);

    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}


.license-detail-item > strong {
    color: var(--text-primary);

    font-size: 13px;
    font-weight: 600;

    overflow: hidden;
    text-overflow: ellipsis;
}


/* =========================================================
   DEVICE SECTION
========================================================= */

.license-device-section {
    display: flex;
    flex-direction: column;
    gap: 8px;

    margin-top: 10px;
    margin-bottom: 18px;

    padding: 15px;

    border: 1px solid rgba(124, 92, 255, 0.18);
    border-radius: 11px;

    background: rgba(124, 92, 255, 0.045);
}

.license-device-hash {
    padding: 9px 10px;

    border-radius: 7px;

    background: rgba(0, 0, 0, 0.16);

    color: var(--text-primary);

    font-family:
        "Cascadia Code",
        "Consolas",
        monospace;

    font-size: 11px;

    overflow-x: auto;
}

.license-device-section > span:last-child {
    color: var(--text-secondary);

    font-size: 11px;
}


/* =========================================================
   NOTE
========================================================= */

.license-note-section {
    display: flex;
    flex-direction: column;
    gap: 8px;

    padding: 15px;

    border: 1px solid var(--border-color);
    border-radius: 11px;

    background: rgba(255, 255, 255, 0.018);
}

.license-note-section p {
    margin: 0;

    color: var(--text-primary);

    font-size: 13px;
    line-height: 1.65;

    white-space: pre-wrap;
    word-break: break-word;
}


/* =========================================================
   MODAL FOOTER
========================================================= */

.license-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 8px;

    padding: 16px 22px;

    border-top: 1px solid var(--border-color);
}

.license-modal-footer button {
    min-height: 38px;
}


/* =========================================================
   DANGER / WARNING BUTTONS
========================================================= */

.danger-button,
.warning-button {
    min-height: 38px;

    padding: 0 14px;

    border-radius: 9px;

    font-family: inherit;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}


.danger-button {
    border: 1px solid rgba(239, 68, 68, 0.3);

    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
}

.danger-button:hover {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.13);
    color: #ff8a8a;

    transform: translateY(-1px);
}


.warning-button {
    border: 1px solid rgba(245, 158, 11, 0.3);

    background: rgba(245, 158, 11, 0.08);
    color: #fbbf24;
}

.warning-button:hover {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.13);
    color: #fcd34d;

    transform: translateY(-1px);
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1050px) {

    .licenses-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .licenses-search {
        width: 100%;
    }

    .licenses-filters {
        width: 100%;
    }

    .license-filter-select {
        flex: 1;
    }

}


@media (max-width: 760px) {

    .licenses-page {
        gap: 16px;
    }

    .licenses-toolbar {
        padding: 14px;
    }

    .licenses-filters {
        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 8px;
    }

    .license-filter-select,
    .licenses-filters .secondary-button {
        width: 100%;
        min-width: 0;
    }

    .licenses-filters .secondary-button {
        grid-column: 1 / -1;
    }


    .license-modal {
        padding: 12px;
    }

    .license-modal-dialog {
        max-height: calc(100vh - 24px);

        border-radius: 14px;
    }

    .license-modal-header {
        padding: 16px;
    }

    .license-modal-body {
        padding: 16px;
    }

    .license-modal-footer {
        padding: 13px 16px;

        flex-wrap: wrap;
    }

    .license-modal-footer button {
        flex: 1;
        min-width: 120px;
    }


    .license-detail-grid {
        grid-template-columns: 1fr;
    }


    .license-detail-code-row {
        align-items: stretch;
        flex-direction: column;
    }

    .license-detail-code-row .secondary-button {
        width: 100%;
    }

}


@media (max-width: 480px) {

    .licenses-filters {
        grid-template-columns: 1fr;
    }

    .licenses-filters .secondary-button {
        grid-column: auto;
    }

    .license-modal-footer {
        flex-direction: column;
    }

    .license-modal-footer button {
        width: 100%;
    }

}


/* =========================================================
   DASHBOARD NOTIFICATIONS
   ========================================================= */

.notification-container {
    position: fixed;
    top: 24px;
    right: 24px;

    width: min(390px, calc(100vw - 32px));

    display: flex;
    flex-direction: column;
    gap: 12px;

    z-index: 99999;

    pointer-events: none;
}

.dashboard-notification {
    position: relative;

    display: flex;
    align-items: center;
    gap: 13px;

    min-height: 72px;
    padding: 13px 14px;

    background: #111827;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;

    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.35),
        0 4px 12px rgba(0, 0, 0, 0.18);

    transform: translateX(30px);
    opacity: 0;

    transition:
        transform 0.25s ease,
        opacity 0.25s ease;

    pointer-events: auto;

    overflow: hidden;
}

.dashboard-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.dashboard-notification::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;
    bottom: 0;

    width: 3px;
}


/* Icon */

.notification-icon {
    flex: 0 0 34px;

    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    font-size: 15px;
    font-weight: 800;
}

.notification-success::before {
    background: #22c55e;
}

.notification-success
.notification-icon {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.12);
}

.notification-error::before {
    background: #ef4444;
}

.notification-error
.notification-icon {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

.notification-warning::before {
    background: #f59e0b;
}

.notification-warning
.notification-icon {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
}

.notification-info::before {
    background: #6366f1;
}

.notification-info
.notification-icon {
    color: #818cf8;
    background: rgba(99, 102, 241, 0.12);
}


/* Content */

.notification-content {
    min-width: 0;

    flex: 1;

    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-content strong {
    color: #f9fafb;

    font-size: 13px;
    font-weight: 700;
}

.notification-content span {
    color: #9ca3af;

    font-size: 12px;
    line-height: 1.5;

    overflow-wrap: anywhere;
}


/* Close */

.notification-close {
    flex: 0 0 auto;

    width: 28px;
    height: 28px;

    border: 0;
    border-radius: 8px;

    background: transparent;

    color: #6b7280;

    font-size: 20px;
    line-height: 1;

    cursor: pointer;

    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.notification-close:hover {
    color: #f9fafb;
    background: rgba(255, 255, 255, 0.07);
}


/* Mobile */

@media (max-width: 600px) {
    .notification-container {
        top: 14px;
        right: 14px;
        left: 14px;

        width: auto;
    }

    .dashboard-notification {
        min-height: 68px;
    }
}

/* =========================================================
   DASHBOARD CONFIRM MODAL
   ========================================================= */

.dashboard-confirm-modal {
    position: fixed;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    z-index: 100000;

    opacity: 0;

    transition:
        opacity 0.2s ease;
}

.dashboard-confirm-modal[hidden] {
    display: none !important;
}

.dashboard-confirm-modal.show {
    opacity: 1;
}


/* Overlay */

.dashboard-confirm-overlay {
    position: absolute;
    inset: 0;

    background:
        rgba(3, 7, 18, 0.78);

    backdrop-filter:
        blur(6px);

    -webkit-backdrop-filter:
        blur(6px);
}


/* Dialog */

.dashboard-confirm-dialog {
    position: relative;

    width: min(
        480px,
        calc(100vw - 32px)
    );

    background:
        #111827;

    border:
        1px solid rgba(255, 255, 255, 0.08);

    border-radius:
        18px;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.5);

    overflow: hidden;

    transform:
        translateY(12px)
        scale(0.98);

    transition:
        transform 0.2s ease;
}

.dashboard-confirm-modal.show
.dashboard-confirm-dialog {
    transform:
        translateY(0)
        scale(1);
}


/* Header */

.dashboard-confirm-header {
    display: flex;
    align-items: center;

    gap: 13px;

    padding:
        22px 22px 18px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-confirm-header > div:nth-child(2) {
    flex: 1;
}

.dashboard-confirm-header h3 {
    margin:
        4px 0 0;

    color:
        #f9fafb;

    font-size:
        18px;

    font-weight:
        700;
}


/* Icon */

.dashboard-confirm-icon {
    width:
        42px;

    height:
        42px;

    flex:
        0 0 42px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        12px;

    background:
        rgba(239, 68, 68, 0.12);

    color:
        #ef4444;

    font-size:
        18px;

    font-weight:
        800;
}


/* Close */

.dashboard-confirm-close {
    width:
        34px;

    height:
        34px;

    flex:
        0 0 34px;

    border:
        0;

    border-radius:
        9px;

    background:
        transparent;

    color:
        #6b7280;

    font-size:
        22px;

    cursor:
        pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.dashboard-confirm-close:hover {
    background:
        rgba(255, 255, 255, 0.06);

    color:
        #f9fafb;
}


/* Body */

.dashboard-confirm-body {
    padding:
        22px;

    color:
        #9ca3af;

    font-size:
        14px;

    line-height:
        1.7;
}


/* Footer */

.dashboard-confirm-footer {
    display:
        flex;

    align-items:
        center;

    justify-content:
        flex-end;

    gap:
        10px;

    padding:
        16px 22px 22px;

    border-top:
        1px solid rgba(255, 255, 255, 0.06);
}


/* Mobile */

@media (max-width: 600px) {

    .dashboard-confirm-modal {
        padding:
            14px;
    }

    .dashboard-confirm-dialog {
        width:
            100%;

        border-radius:
            16px;
    }

    .dashboard-confirm-footer {
        flex-direction:
            column-reverse;

        align-items:
            stretch;
    }

    .dashboard-confirm-footer button {
        width:
            100%;
    }

}

/* =========================================
   License Filters
========================================= */

.licenses-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.license-filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    min-width: 150px;
    height: 44px;

    padding: 0 42px 0 14px;

    color: #f3f4f6;
    background-color: #111827;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;

    font-family: inherit;
    font-size: 13px;
    font-weight: 500;

    cursor: pointer;

    outline: none;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

/* Hover */
.license-filter-select:hover {
    background-color: #151e2e;
    border-color: rgba(99, 102, 241, 0.35);
}

/* Focus */
.license-filter-select:focus {
    background-color: #111827;
    border-color: #6366f1;

    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* Selected value */
.license-filter-select option {
    background-color: #111827;
    color: #f3f4f6;
}

/* Disabled / placeholder */
.license-filter-select option[value=""] {
    color: #9ca3af;
}

/* Arrow */
.license-filter-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
}

/* =========================================
   Mobile
========================================= */

@media (max-width: 760px) {

    .licenses-filters {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .license-filter-select {
        width: 100%;
        min-width: 0;
    }
}
/* =========================================================
   DEVICES PAGE
========================================================= */

/* ---------------------------------------------------------
   Devices Welcome
--------------------------------------------------------- */

.devices-welcome-section {
    width: 100%;
}

.devices-welcome-section .welcome-content {
    width: 100%;
}

.devices-welcome-section .welcome-label {
    display: inline-flex;
    align-items: center;

    margin-bottom: 10px;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;

    color: var(--accent-light);
}

.devices-welcome-section h1 {
    margin: 0;

    font-size: 30px;
    line-height: 1.15;
    font-weight: 700;

    color: var(--text-primary);
}

.devices-welcome-section p {
    margin: 10px 0 0;

    max-width: 650px;

    font-size: 14px;
    line-height: 1.6;

    color: var(--text-secondary);
}


/* ---------------------------------------------------------
   Devices Statistics
--------------------------------------------------------- */

.devices-stats-grid {
    width: 100%;

    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 16px;
}

.devices-stats-grid .stat-card {
    position: relative;

    min-height: 120px;

    padding: 22px 24px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    background:
        linear-gradient(
            145deg,
            var(--surface-light),
            var(--surface)
        );

    border: 1px solid var(--border);

    border-radius: var(--radius-md);

    overflow: hidden;

    transition:
        border-color var(--transition),
        background var(--transition),
        transform var(--transition);
}

.devices-stats-grid .stat-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 2px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--accent),
            transparent
        );

    opacity: 0.75;
}

.devices-stats-grid .stat-card:hover {
    background: var(--surface-hover);

    border-color:
        rgba(139, 92, 246, 0.25);

    transform: translateY(-2px);
}

.devices-stats-grid .stat-label {
    display: block;

    margin-bottom: 8px;

    font-size: 12px;
    font-weight: 600;

    color: var(--text-secondary);
}

.devices-stats-grid .stat-value {
    display: block;

    font-size: 30px;
    line-height: 1;

    font-weight: 700;

    color: var(--text-primary);
}


/* ---------------------------------------------------------
   Devices Main Panel
--------------------------------------------------------- */

.devices-panel {
    width: 100%;

    overflow: hidden;
}

.devices-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding-bottom: 20px;

    margin-bottom: 20px;

    border-bottom:
        1px solid var(--border);
}

.devices-panel-header > div {
    min-width: 0;
}

.devices-panel-header h2 {
    margin: 0;

    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;

    color: var(--text-primary);
}

.devices-panel-header p {
    margin: 6px 0 0;

    font-size: 13px;
    line-height: 1.5;

    color: var(--text-secondary);
}


/* ---------------------------------------------------------
   Refresh Button
--------------------------------------------------------- */

.devices-refresh-button {
    flex-shrink: 0;

    min-width: 92px;
    height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 16px;

    border: 1px solid
        rgba(139, 92, 246, 0.35);

    border-radius: var(--radius-sm);

    background:
        rgba(139, 92, 246, 0.10);

    color: var(--accent-light);

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition),
        transform var(--transition);
}

.devices-refresh-button:hover {
    background:
        rgba(139, 92, 246, 0.18);

    border-color:
        rgba(139, 92, 246, 0.55);

    color: var(--text-primary);

    transform: translateY(-1px);
}

.devices-refresh-button:active {
    transform: translateY(0);
}


/* ---------------------------------------------------------
   Devices Filters
--------------------------------------------------------- */

.devices-filters {
    width: 100%;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        180px;

    gap: 12px;

    margin-bottom: 18px;
}

.devices-search-wrapper,
.devices-status-wrapper {
    width: 100%;
}

.devices-search-input,
.devices-status-filter {
    width: 100%;
    height: 42px;

    box-sizing: border-box;

    border:
        1px solid var(--border);

    border-radius: var(--radius-sm);

    background:
        var(--bg-tertiary);

    color: var(--text-primary);

    font-family: inherit;
    font-size: 13px;

    outline: none;

    transition:
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}

.devices-search-input {
    padding: 0 14px;
}

.devices-status-filter {
    padding: 0 12px;

    cursor: pointer;
}

.devices-search-input::placeholder {
    color: var(--text-muted);
}

.devices-search-input:hover,
.devices-status-filter:hover {
    border-color: var(--border-light);
}

.devices-search-input:focus,
.devices-status-filter:focus {
    border-color:
        rgba(139, 92, 246, 0.55);

    background: var(--surface);

    box-shadow:
        0 0 0 3px
        rgba(139, 92, 246, 0.10);
}

.devices-status-filter option {
    background: var(--bg-secondary);

    color: var(--text-primary);
}


/* ---------------------------------------------------------
   Devices Table
--------------------------------------------------------- */

.devices-table-wrapper {
    width: 100%;

    overflow-x: auto;

    border:
        1px solid var(--border);

    border-radius: var(--radius-md);

    background: var(--bg-secondary);
}

.devices-table {
    width: 100%;

    min-width: 850px;

    border-collapse: collapse;
}

.devices-table th {
    height: 48px;

    padding: 0 16px;

    text-align: left;

    background:
        rgba(255, 255, 255, 0.025);

    border-bottom:
        1px solid var(--border);

    color: var(--text-muted);

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.06em;
    text-transform: uppercase;

    white-space: nowrap;
}

.devices-table td {
    padding: 15px 16px;

    border-bottom:
        1px solid var(--border);

    color: var(--text-secondary);

    font-size: 13px;

    vertical-align: middle;
}

.devices-table tbody tr:last-child td {
    border-bottom: 0;
}

.devices-table tbody tr {
    transition:
        background var(--transition);
}

.devices-table tbody tr:hover {
    background:
        rgba(255, 255, 255, 0.025);
}


/* ---------------------------------------------------------
   Device Cell
--------------------------------------------------------- */

.device-table-main {
    display: flex;
    flex-direction: column;

    gap: 4px;

    min-width: 120px;
}

.device-table-main strong {
    color: var(--text-primary);

    font-size: 13px;
    font-weight: 600;
}

.device-table-main span {
    color: var(--text-muted);

    font-size: 11px;
}

.device-license-id {
    display: inline-flex;
    align-items: center;

    padding: 5px 8px;

    border:
        1px solid var(--border);

    border-radius: 6px;

    background:
        rgba(255, 255, 255, 0.025);

    color: var(--text-secondary);

    font-size: 12px;
    font-weight: 600;

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;
}

.device-launcher-info {
    display: flex;
    flex-direction: column;

    gap: 3px;
}

.device-launcher-info strong {
    color: var(--text-primary);

    font-size: 13px;
    font-weight: 600;
}

.device-launcher-info span {
    color: var(--text-muted);

    font-size: 11px;
}


/* ---------------------------------------------------------
   Device Actions
--------------------------------------------------------- */

.device-actions {
    display: flex;
    align-items: center;

    gap: 7px;

    white-space: nowrap;
}

.device-action-button {
    height: 32px;

    padding: 0 10px;

    border:
        1px solid var(--border);

    border-radius: 6px;

    background:
        rgba(255, 255, 255, 0.025);

    color: var(--text-secondary);

    font-family: inherit;
    font-size: 11px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition);
}

.device-action-button:hover {
    background:
        rgba(255, 255, 255, 0.06);

    border-color: var(--border-light);

    color: var(--text-primary);
}

.device-action-view:hover {
    border-color:
        rgba(59, 130, 246, 0.35);

    color: #60a5fa;
}

.device-action-unbind:hover {
    border-color:
        rgba(239, 68, 68, 0.35);

    color: #f87171;
}


/* ---------------------------------------------------------
   Status
--------------------------------------------------------- */

.devices-table .status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 70px;

    padding: 5px 9px;

    border: 1px solid transparent;

    border-radius: 999px;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.devices-table .status-active {
    background:
        rgba(34, 197, 94, 0.10);

    border-color:
        rgba(34, 197, 94, 0.20);

    color: #4ade80;
}

.devices-table .status-expired {
    background:
        rgba(245, 158, 11, 0.10);

    border-color:
        rgba(245, 158, 11, 0.20);

    color: #fbbf24;
}

.devices-table .status-unused {
    background:
        rgba(59, 130, 246, 0.10);

    border-color:
        rgba(59, 130, 246, 0.20);

    color: #60a5fa;
}

.devices-table .status-revoked {
    background:
        rgba(239, 68, 68, 0.10);

    border-color:
        rgba(239, 68, 68, 0.20);

    color: #f87171;
}

.devices-table .status-unknown {
    background:
        rgba(255, 255, 255, 0.05);

    border-color: var(--border);

    color: var(--text-muted);
}


/* ---------------------------------------------------------
   Loading / Empty / Error
--------------------------------------------------------- */

.devices-table .table-loading,
.devices-table .table-empty,
.devices-table .table-error {
    min-height: 180px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 7px;

    text-align: center;
}

.devices-table .table-loading {
    color: var(--text-muted);

    font-size: 13px;
}

.devices-table .table-empty strong {
    color: var(--text-primary);

    font-size: 14px;
}

.devices-table .table-empty span {
    color: var(--text-muted);

    font-size: 12px;
}

.devices-table .table-error {
    color: #f87171;

    font-size: 13px;
}


/* ---------------------------------------------------------
   Devices Footer
--------------------------------------------------------- */

.devices-table-footer {
    margin-top: 12px;

    color: var(--text-muted);

    font-size: 12px;
}


/* ---------------------------------------------------------
   Device Modal
--------------------------------------------------------- */

.dashboard-modal.devices-modal {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;
}

.dashboard-modal.devices-modal[hidden] {
    display: none;
}

.dashboard-modal.devices-modal
.dashboard-modal-overlay {
    position: absolute;

    inset: 0;

    background:
        rgba(0, 0, 0, 0.72);

    backdrop-filter: blur(6px);
}

.dashboard-modal.devices-modal
.dashboard-modal-dialog {
    position: relative;

    z-index: 1;

    width: min(680px, 100%);

    max-height: calc(100vh - 48px);

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background:
        var(--surface);

    border:
        1px solid var(--border-light);

    border-radius: var(--radius-lg);

    box-shadow:
        0 24px 70px
        rgba(0, 0, 0, 0.45);

    animation:
        deviceModalEnter 0.2s ease;
}

@keyframes deviceModalEnter {

    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}

.dashboard-modal.devices-modal
.dashboard-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    padding: 22px 24px;

    border-bottom:
        1px solid var(--border);
}

.dashboard-modal-label {
    display: block;

    margin-bottom: 6px;

    color: var(--accent-light);

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.12em;
    text-transform: uppercase;
}

#deviceModalTitle {
    margin: 0;

    color: var(--text-primary);

    font-size: 20px;
    font-weight: 700;
}

.dashboard-modal-close {
    width: 34px;
    height: 34px;

    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid var(--border);

    border-radius: 8px;

    background:
        rgba(255, 255, 255, 0.025);

    color: var(--text-secondary);

    font-size: 20px;
    line-height: 1;

    cursor: pointer;

    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition);
}

.dashboard-modal-close:hover {
    background:
        rgba(239, 68, 68, 0.10);

    border-color:
        rgba(239, 68, 68, 0.25);

    color: #f87171;
}

.dashboard-modal.devices-modal
.dashboard-modal-body {
    padding: 24px;

    overflow-y: auto;
}

.dashboard-modal.devices-modal
.dashboard-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 10px;

    padding: 16px 24px;

    border-top:
        1px solid var(--border);
}


/* ---------------------------------------------------------
   Device Details
--------------------------------------------------------- */

.device-details-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;
}

.device-detail-item {
    min-width: 0;

    padding: 14px;

    border:
        1px solid var(--border);

    border-radius: var(--radius-sm);

    background:
        rgba(255, 255, 255, 0.02);
}

.device-detail-full {
    grid-column: 1 / -1;
}

.device-detail-item > span {
    display: block;

    margin-bottom: 7px;

    color: var(--text-muted);

    font-size: 11px;
    font-weight: 600;
}

.device-detail-item > strong {
    display: block;

    color: var(--text-primary);

    font-size: 13px;
    font-weight: 600;
}

.device-full-hash {
    overflow-wrap: anywhere;

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 11px !important;

    color: var(--text-secondary) !important;
}

.device-details-section {
    margin-top: 20px;
}

.device-details-section-title {
    display: block;

    margin-bottom: 9px;

    color: var(--text-secondary);

    font-size: 12px;
    font-weight: 700;
}

.device-launcher-card {
    display: flex;
    flex-direction: column;

    gap: 5px;

    padding: 14px;

    border:
        1px solid var(--border);

    border-radius: var(--radius-sm);

    background:
        rgba(255, 255, 255, 0.02);
}

.device-launcher-card strong {
    color: var(--text-primary);

    font-size: 14px;
}

.device-launcher-card span {
    color: var(--text-muted);

    font-size: 12px;
}

.device-note {
    padding: 14px;

    border:
        1px solid var(--border);

    border-radius: var(--radius-sm);

    background:
        rgba(255, 255, 255, 0.02);

    color: var(--text-secondary);

    font-size: 13px;
    line-height: 1.6;

    white-space: pre-wrap;
}

.device-modal-unbind-button {
    border:
        1px solid rgba(239, 68, 68, 0.25);

    background:
        rgba(239, 68, 68, 0.08);

    color: #f87171;
}

.device-modal-unbind-button:hover {
    border-color:
        rgba(239, 68, 68, 0.45);

    background:
        rgba(239, 68, 68, 0.14);

    color: #fca5a5;
}

.modal-loading {
    min-height: 160px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--text-muted);

    font-size: 13px;
}

.modal-error {
    padding: 16px;

    border:
        1px solid rgba(239, 68, 68, 0.20);

    border-radius: var(--radius-sm);

    background:
        rgba(239, 68, 68, 0.06);

    color: #f87171;

    font-size: 13px;
}


/* ---------------------------------------------------------
   Devices Responsive
--------------------------------------------------------- */

@media (max-width: 900px) {

    .devices-stats-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .devices-table {
        min-width: 800px;
    }

}


@media (max-width: 700px) {

    .devices-stats-grid {
        grid-template-columns:
            1fr;
    }

    .devices-panel-header {
        align-items: flex-start;
    }

    .devices-filters {
        grid-template-columns: 1fr;
    }

    .devices-table-wrapper {
        margin-left: -1px;
        margin-right: -1px;

        width: calc(100% + 2px);
    }

    .device-details-grid {
        grid-template-columns: 1fr;
    }

    .device-detail-full {
        grid-column: auto;
    }

}


@media (max-width: 520px) {

    .devices-welcome-section h1 {
        font-size: 25px;
    }

    .devices-panel-header {
        flex-direction: column;
    }

    .devices-refresh-button {
        width: 100%;
    }

    .dashboard-modal.devices-modal {
        padding: 12px;
    }

    .dashboard-modal.devices-modal
    .dashboard-modal-dialog {
        max-height: calc(100vh - 24px);

        border-radius: var(--radius-md);
    }

    .dashboard-modal.devices-modal
    .dashboard-modal-header {
        padding: 18px;
    }

    .dashboard-modal.devices-modal
    .dashboard-modal-body {
        padding: 18px;
    }

    .dashboard-modal.devices-modal
    .dashboard-modal-footer {
        padding: 14px 18px;
    }

}


@media (max-width: 380px) {

    .devices-welcome-section h1 {
        font-size: 23px;
    }

    .devices-stats-grid .stat-card {
        min-height: 105px;

        padding: 18px;
    }

    .devices-stats-grid .stat-value {
        font-size: 26px;
    }

}

/* ========================================
   LAUNCHERS PAGE
   ======================================== */

/* ---------------------------------------------------------
   Launchers Welcome
--------------------------------------------------------- */

.launchers-welcome-section {

    width: 100%;

}

.launchers-welcome-section .welcome-content {

    width: 100%;

}

.launchers-welcome-section .welcome-label {

    display: inline-flex;

    align-items: center;

    margin-bottom: 10px;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 0.14em;

    text-transform: uppercase;

    color: var(--accent-light);

}

.launchers-welcome-section h1 {

    margin: 0;

    font-size: 30px;

    line-height: 1.15;

    font-weight: 700;

    color: var(--text-primary);

}

.launchers-welcome-section p {

    margin: 10px 0 0;

    max-width: 650px;

    font-size: 14px;

    line-height: 1.6;

    color: var(--text-secondary);

}


/* ---------------------------------------------------------
   Launchers Statistics
--------------------------------------------------------- */

.launchers-stats-grid {

    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 16px;

}

.launchers-stats-grid .stat-card {

    position: relative;

    min-height: 120px;

    padding: 22px 24px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    background:
        linear-gradient(
            145deg,
            var(--surface-light),
            var(--surface)
        );

    border: 1px solid var(--border);

    border-radius: var(--radius-md);

    overflow: hidden;

    transition:
        background var(--transition),
        border-color var(--transition),
        transform var(--transition);

}

.launchers-stats-grid .stat-card::before {

    content: "";

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 2px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--accent),
            transparent
        );

    opacity: 0.75;

}

.launchers-stats-grid .stat-card:hover {

    background: var(--surface-hover);

    border-color:
        rgba(139, 92, 246, 0.25);

    transform: translateY(-2px);

}

.launchers-stats-grid .stat-label {

    display: block;

    margin-bottom: 8px;

    font-size: 12px;

    font-weight: 600;

    color: var(--text-secondary);

}

.launchers-stats-grid .stat-value {

    display: block;

    font-size: 30px;

    line-height: 1;

    font-weight: 700;

    color: var(--text-primary);

}


/* ---------------------------------------------------------
   Launchers Main Panel
--------------------------------------------------------- */

.launchers-panel {

    width: 100%;

    overflow: hidden;

}

.launchers-panel-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding-bottom: 20px;

    margin-bottom: 20px;

    border-bottom:
        1px solid var(--border);

}

.launchers-panel-header > div {

    min-width: 0;

}

.launchers-panel-header h2 {

    margin: 0;

    font-size: 18px;

    line-height: 1.3;

    font-weight: 700;

    color: var(--text-primary);

}

.launchers-panel-header p {

    margin: 6px 0 0;

    font-size: 13px;

    line-height: 1.5;

    color: var(--text-secondary);

}


/* ---------------------------------------------------------
   Launchers Panel Actions
--------------------------------------------------------- */

.panel-header-actions {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 8px;

    flex-shrink: 0;

}

.launchers-refresh-button,
.launchers-add-button {

    min-width: 92px;

    height: 40px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 0 16px;

    border-radius: var(--radius-sm);

    font-family: inherit;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition),
        transform var(--transition);

}

.launchers-refresh-button {

    border: 1px solid
        rgba(139, 92, 246, 0.35);

    background:
        rgba(139, 92, 246, 0.10);

    color: var(--accent-light);

}

.launchers-refresh-button:hover {

    background:
        rgba(139, 92, 246, 0.18);

    border-color:
        rgba(139, 92, 246, 0.55);

    color: var(--text-primary);

    transform: translateY(-1px);

}

.launchers-refresh-button:active {

    transform: translateY(0);

}

.launchers-add-button {

    border: 1px solid
        rgba(139, 92, 246, 0.45);

    background: var(--accent);

    color: #ffffff;

}

.launchers-add-button:hover {

    background: var(--accent-light);

    border-color: var(--accent-light);

    color: #ffffff;

    transform: translateY(-1px);

}

.launchers-add-button:active {

    transform: translateY(0);

}


/* ---------------------------------------------------------
   Launchers Filters
--------------------------------------------------------- */

.launchers-filters {

    width: 100%;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        180px;

    gap: 12px;

    margin-bottom: 18px;

}

.launchers-search-wrapper,
.launchers-status-wrapper {

    width: 100%;

}

.launchers-search-input,
.launchers-status-filter {

    width: 100%;

    height: 42px;

    box-sizing: border-box;

    border:
        1px solid var(--border);

    border-radius: var(--radius-sm);

    background:
        var(--bg-tertiary);

    color: var(--text-primary);

    font-family: inherit;

    font-size: 13px;

    outline: none;

    transition:
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);

}

.launchers-search-input {

    padding: 0 14px;

}

.launchers-status-filter {

    padding: 0 12px;

    cursor: pointer;

}

.launchers-search-input::placeholder {

    color: var(--text-muted);

}

.launchers-search-input:hover,
.launchers-status-filter:hover {

    border-color: var(--border-light);

}

.launchers-search-input:focus,
.launchers-status-filter:focus {

    border-color:
        rgba(139, 92, 246, 0.55);

    background: var(--surface);

    box-shadow:
        0 0 0 3px
        rgba(139, 92, 246, 0.10);

}

.launchers-status-filter option {

    background: var(--bg-secondary);

    color: var(--text-primary);

}


/* ---------------------------------------------------------
   Launchers Table
--------------------------------------------------------- */

.launchers-table-wrapper {

    width: 100%;

    overflow-x: auto;

    border:
        1px solid var(--border);

    border-radius: var(--radius-md);

    background: var(--bg-secondary);

}

.launchers-table {

    width: 100%;

    min-width: 780px;

    border-collapse: collapse;

}

.launchers-table th {

    height: 48px;

    padding: 0 16px;

    text-align: left;

    background:
        rgba(255, 255, 255, 0.025);

    border-bottom:
        1px solid var(--border);

    color: var(--text-muted);

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 0.06em;

    text-transform: uppercase;

    white-space: nowrap;

}

.launchers-table td {

    padding: 15px 16px;

    border-bottom:
        1px solid var(--border);

    color: var(--text-secondary);

    font-size: 13px;

    vertical-align: middle;

}

.launchers-table tbody tr:last-child td {

    border-bottom: 0;

}

.launchers-table tbody tr {

    transition:
        background var(--transition);

}

.launchers-table tbody tr:hover {

    background:
        rgba(255, 255, 255, 0.025);

}


/* ---------------------------------------------------------
   Launcher Cell
--------------------------------------------------------- */

.launcher-table-main {

    display: flex;

    flex-direction: column;

    gap: 4px;

    min-width: 150px;

}

.launcher-table-main strong {

    color: var(--text-primary);

    font-size: 13px;

    font-weight: 600;

}

.launcher-table-main span {

    color: var(--text-muted);

    font-size: 11px;

}

.launcher-id-text {

    display: inline-flex;

    align-items: center;

    width: fit-content;

    padding: 5px 8px;

    border:
        1px solid var(--border);

    border-radius: 6px;

    background:
        rgba(255, 255, 255, 0.025);

    color: var(--text-secondary);

    font-size: 11px;

    font-weight: 600;

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

}


/* ---------------------------------------------------------
   Launcher Version
--------------------------------------------------------- */

.launcher-version-text {

    color: var(--text-secondary);

    font-size: 12px;

    font-weight: 600;

}


/* ---------------------------------------------------------
   Launcher Actions
--------------------------------------------------------- */

.launcher-actions {

    display: flex;

    align-items: center;

    gap: 7px;

    white-space: nowrap;

}

.launcher-action-button {

    height: 32px;

    padding: 0 10px;

    border:
        1px solid var(--border);

    border-radius: 6px;

    background:
        rgba(255, 255, 255, 0.025);

    color: var(--text-secondary);

    font-family: inherit;

    font-size: 11px;

    font-weight: 600;

    cursor: pointer;

    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition);

}

.launcher-action-button:hover {

    background:
        rgba(255, 255, 255, 0.06);

    border-color: var(--border-light);

    color: var(--text-primary);

}

.launcher-action-view:hover {

    border-color:
        rgba(59, 130, 246, 0.35);

    color: #60a5fa;

}

.launcher-action-toggle:hover {

    border-color:
        rgba(34, 197, 94, 0.35);

    color: #4ade80;

}

.launcher-action-deactivate:hover {

    border-color:
        rgba(239, 68, 68, 0.35);

    color: #f87171;

}


/* ---------------------------------------------------------
   Launcher Status
--------------------------------------------------------- */

.launchers-table .status-badge {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 70px;

    padding: 5px 9px;

    border: 1px solid transparent;

    border-radius: 999px;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 0.04em;

    text-transform: uppercase;

}

.launchers-table .status-active {

    background:
        rgba(34, 197, 94, 0.10);

    border-color:
        rgba(34, 197, 94, 0.20);

    color: #4ade80;

}

.launchers-table .status-inactive {

    background:
        rgba(239, 68, 68, 0.10);

    border-color:
        rgba(239, 68, 68, 0.20);

    color: #f87171;

}

.launchers-table .status-unknown {

    background:
        rgba(255, 255, 255, 0.05);

    border-color: var(--border);

    color: var(--text-muted);

}


/* ---------------------------------------------------------
   Loading / Empty / Error
--------------------------------------------------------- */

.launchers-table .table-loading,
.launchers-table .table-empty,
.launchers-table .table-error {

    min-height: 180px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 7px;

    text-align: center;

}

.launchers-table .table-loading {

    color: var(--text-muted);

    font-size: 13px;

}

.launchers-table .table-empty strong {

    color: var(--text-primary);

    font-size: 14px;

}

.launchers-table .table-empty span {

    color: var(--text-muted);

    font-size: 12px;

}

.launchers-table .table-error {

    color: #f87171;

    font-size: 13px;

}


/* ---------------------------------------------------------
   Launchers Footer
--------------------------------------------------------- */

.launchers-table-footer {

    margin-top: 12px;

    color: var(--text-muted);

    font-size: 12px;

}


/* ---------------------------------------------------------
   Launcher Modal
--------------------------------------------------------- */

.dashboard-modal.launchers-modal {

    position: fixed;

    inset: 0;

    z-index: 1000;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 24px;

}

.dashboard-modal.launchers-modal[hidden] {

    display: none;

}

.dashboard-modal.launchers-modal
.dashboard-modal-overlay {

    position: absolute;

    inset: 0;

    background:
        rgba(0, 0, 0, 0.72);

    backdrop-filter: blur(6px);

}

.dashboard-modal.launchers-modal
.dashboard-modal-dialog {

    position: relative;

    z-index: 1;

    width: min(680px, 100%);

    max-height: calc(100vh - 48px);

    display: flex;

    flex-direction: column;

    overflow: hidden;

    background: var(--surface);

    border:
        1px solid var(--border-light);

    border-radius: var(--radius-lg);

    box-shadow:
        0 24px 70px
        rgba(0, 0, 0, 0.45);

    animation:
        launcherModalEnter 0.2s ease;

}

@keyframes launcherModalEnter {

    from {

        opacity: 0;

        transform:
            translateY(10px)
            scale(0.98);

    }

    to {

        opacity: 1;

        transform:
            translateY(0)
            scale(1);

    }

}

.dashboard-modal.launchers-modal
.dashboard-modal-header {

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 20px;

    padding: 22px 24px;

    border-bottom:
        1px solid var(--border);

}

.dashboard-modal.launchers-modal
.dashboard-modal-header h2 {

    margin: 0;

    color: var(--text-primary);

    font-size: 20px;

    font-weight: 700;

}

.dashboard-modal.launchers-modal
.dashboard-modal-body {

    padding: 24px;

    overflow-y: auto;

}

.dashboard-modal.launchers-modal
.dashboard-modal-footer {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 10px;

    padding: 16px 24px;

    border-top:
        1px solid var(--border);

}


/* ---------------------------------------------------------
   Launcher Form
--------------------------------------------------------- */

#addLauncherForm {

    width: 100%;

}

#addLauncherForm .form-group {

    margin-bottom: 18px;

}

#addLauncherForm .form-group:last-of-type {

    margin-bottom: 0;

}

#addLauncherForm label {

    display: block;

    margin-bottom: 8px;

    color: var(--text-secondary);

    font-size: 12px;

    font-weight: 600;

}

#addLauncherForm input {

    width: 100%;

    min-height: 44px;

    box-sizing: border-box;

    padding: 0 13px;

    border:
        1px solid var(--border);

    border-radius: var(--radius-sm);

    background:
        var(--bg-tertiary);

    color: var(--text-primary);

    font-family: inherit;

    font-size: 13px;

    outline: none;

    transition:
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);

}

#addLauncherForm input::placeholder {

    color: var(--text-muted);

}

#addLauncherForm input:hover {

    border-color: var(--border-light);

}

#addLauncherForm input:focus {

    border-color:
        rgba(139, 92, 246, 0.55);

    background: var(--surface);

    box-shadow:
        0 0 0 3px
        rgba(139, 92, 246, 0.10);

}


/* ---------------------------------------------------------
   Launcher Details
--------------------------------------------------------- */

.launcher-details-grid {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;

}

.launcher-detail-item {

    min-width: 0;

    padding: 14px;

    border:
        1px solid var(--border);

    border-radius: var(--radius-sm);

    background:
        rgba(255, 255, 255, 0.02);

}

.launcher-detail-full {

    grid-column: 1 / -1;

}

.launcher-detail-item > span {

    display: block;

    margin-bottom: 7px;

    color: var(--text-muted);

    font-size: 11px;

    font-weight: 600;

}

.launcher-detail-item > strong {

    display: block;

    color: var(--text-primary);

    font-size: 13px;

    font-weight: 600;

}

.launcher-detail-item code {

    overflow-wrap: anywhere;

    color: var(--text-secondary);

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 11px;

}

.launcher-details-section {

    margin-top: 20px;

}

.launcher-details-section-title {

    display: block;

    margin-bottom: 9px;

    color: var(--text-secondary);

    font-size: 12px;

    font-weight: 700;

}

.launcher-note {

    padding: 14px;

    border:
        1px solid var(--border);

    border-radius: var(--radius-sm);

    background:
        rgba(255, 255, 255, 0.02);

    color: var(--text-secondary);

    font-size: 13px;

    line-height: 1.6;

    white-space: pre-wrap;

}


/* ---------------------------------------------------------
   Launcher Modal Buttons
--------------------------------------------------------- */

.launcher-modal-action-button {

    height: 36px;

    padding: 0 13px;

    border:
        1px solid var(--border);

    border-radius: var(--radius-sm);

    background:
        rgba(255, 255, 255, 0.025);

    color: var(--text-secondary);

    font-family: inherit;

    font-size: 12px;

    font-weight: 600;

    cursor: pointer;

    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition);

}

.launcher-modal-action-button:hover {

    background:
        rgba(255, 255, 255, 0.06);

    border-color: var(--border-light);

    color: var(--text-primary);

}

.launcher-modal-toggle-button {

    border-color:
        rgba(34, 197, 94, 0.25);

    background:
        rgba(34, 197, 94, 0.08);

    color: #4ade80;

}

.launcher-modal-toggle-button:hover {

    border-color:
        rgba(34, 197, 94, 0.45);

    background:
        rgba(34, 197, 94, 0.14);

    color: #86efac;

}

.launcher-modal-deactivate-button {

    border-color:
        rgba(239, 68, 68, 0.25);

    background:
        rgba(239, 68, 68, 0.08);

    color: #f87171;

}

.launcher-modal-deactivate-button:hover {

    border-color:
        rgba(239, 68, 68, 0.45);

    background:
        rgba(239, 68, 68, 0.14);

    color: #fca5a5;

}


/* ---------------------------------------------------------
   Launchers Responsive
--------------------------------------------------------- */

@media (max-width: 900px) {

    .launchers-stats-grid {

        grid-template-columns:
            repeat(3, minmax(0, 1fr));

    }

    .launchers-table {

        min-width: 760px;

    }

}


@media (max-width: 700px) {

    .launchers-stats-grid {

        grid-template-columns: 1fr;

    }

    .launchers-panel-header {

        align-items: flex-start;

    }

    .launchers-filters {

        grid-template-columns: 1fr;

    }

    .launchers-table-wrapper {

        margin-left: -1px;

        margin-right: -1px;

        width: calc(100% + 2px);

    }

    .launcher-details-grid {

        grid-template-columns: 1fr;

    }

    .launcher-detail-full {

        grid-column: auto;

    }

}


@media (max-width: 520px) {

    .launchers-welcome-section h1 {

        font-size: 25px;

    }

    .launchers-panel-header {

        flex-direction: column;

    }

    .panel-header-actions {

        width: 100%;

        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

    }

    .launchers-refresh-button,
    .launchers-add-button {

        width: 100%;

    }

    .dashboard-modal.launchers-modal {

        padding: 12px;

    }

    .dashboard-modal.launchers-modal
    .dashboard-modal-dialog {

        max-height: calc(100vh - 24px);

        border-radius: var(--radius-md);

    }

    .dashboard-modal.launchers-modal
    .dashboard-modal-header {

        padding: 18px;

    }

    .dashboard-modal.launchers-modal
    .dashboard-modal-body {

        padding: 18px;

    }

    .dashboard-modal.launchers-modal
    .dashboard-modal-footer {

        padding: 14px 18px;

    }

}


@media (max-width: 380px) {

    .launchers-welcome-section h1 {

        font-size: 23px;

    }

    .launchers-stats-grid .stat-card {

        min-height: 105px;

        padding: 18px;

    }

    .launchers-stats-grid .stat-value {

        font-size: 26px;

    }

    .panel-header-actions {

        grid-template-columns: 1fr;

    }

}

@media (max-width: 760px) {

    .dashboard-modal-overlay {
        align-items: flex-end;
        padding: 10px;
    }


    .dashboard-modal {
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 16px;
    }


    .launcher-details-grid {
        grid-template-columns: 1fr;
    }


    .dashboard-modal-actions {
        flex-direction: column-reverse;
    }


    .dashboard-modal-actions .btn {
        width: 100%;
    }


    .table-actions {
        flex-direction: column;
        align-items: stretch;
    }


    .table-action-button {
        width: 100%;
    }

}



/* ---------------------------------------------------------
   Launcher Action Buttons
--------------------------------------------------------- */

.launcher-actions {

    display: flex;

    align-items: center;

    gap: 7px;

    white-space: nowrap;

}


.launcher-action-button {

    height: 32px;

    padding: 0 11px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    border: 1px solid var(--border);

    border-radius: 6px;

    background:
        rgba(255, 255, 255, 0.025);

    color: var(--text-secondary);

    font-family: inherit;

    font-size: 11px;

    font-weight: 600;

    line-height: 1;

    cursor: pointer;

    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition),
        transform var(--transition);

}


.launcher-action-button:hover {

    background:
        rgba(255, 255, 255, 0.06);

    border-color: var(--border-light);

    color: var(--text-primary);

    transform: translateY(-1px);

}


.launcher-action-button:active {

    transform: translateY(0);

}


/* View */

.launcher-action-view {

    border-color:
        rgba(59, 130, 246, 0.25);

    background:
        rgba(59, 130, 246, 0.06);

    color: #60a5fa;

}


.launcher-action-view:hover {

    border-color:
        rgba(59, 130, 246, 0.45);

    background:
        rgba(59, 130, 246, 0.12);

    color: #93c5fd;

}


/* Activate */

.launcher-action-toggle {

    border-color:
        rgba(34, 197, 94, 0.25);

    background:
        rgba(34, 197, 94, 0.06);

    color: #4ade80;

}


.launcher-action-toggle:hover {

    border-color:
        rgba(34, 197, 94, 0.45);

    background:
        rgba(34, 197, 94, 0.12);

    color: #86efac;

}


/* Deactivate */

.launcher-action-deactivate {

    border-color:
        rgba(239, 68, 68, 0.25);

    background:
        rgba(239, 68, 68, 0.06);

    color: #f87171;

}


.launcher-action-deactivate:hover {

    border-color:
        rgba(239, 68, 68, 0.45);

    background:
        rgba(239, 68, 68, 0.12);

    color: #fca5a5;

}


/* ---------------------------------------------------------
   Launcher Modal Buttons
--------------------------------------------------------- */

.dashboard-modal.launchers-modal
.dashboard-button {

    height: 40px;

    min-width: 92px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 0 16px;

    border: 1px solid var(--border);

    border-radius: var(--radius-sm);

    background:
        rgba(255, 255, 255, 0.025);

    color: var(--text-secondary);

    font-family: inherit;

    font-size: 13px;

    font-weight: 600;

    line-height: 1;

    cursor: pointer;

    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition),
        transform var(--transition);

}


.dashboard-modal.launchers-modal
.dashboard-button:hover {

    background:
        rgba(255, 255, 255, 0.06);

    border-color: var(--border-light);

    color: var(--text-primary);

    transform: translateY(-1px);

}


.dashboard-modal.launchers-modal
.dashboard-button:active {

    transform: translateY(0);

}


/* Cancel */

#cancelAddLauncherButton {

    border-color: var(--border);

    background:
        rgba(255, 255, 255, 0.025);

    color: var(--text-secondary);

}


#cancelAddLauncherButton:hover {

    background:
        rgba(255, 255, 255, 0.06);

    border-color: var(--border-light);

    color: var(--text-primary);

}


/* Create Launcher */

#createLauncherButton {

    border-color:
        rgba(139, 92, 246, 0.45);

    background: var(--accent);

    color: #ffffff;

}


#createLauncherButton:hover {

    background: var(--accent-light);

    border-color: var(--accent-light);

    color: #ffffff;

}


/* ---------------------------------------------------------
   Launcher Modal Footer Buttons
--------------------------------------------------------- */

#addLauncherModal .dashboard-modal-footer,
#launcherDetailsModal .dashboard-modal-footer {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 10px;

}


/* ---------------------------------------------------------
   Launcher Details Action Buttons
--------------------------------------------------------- */

.launcher-modal-toggle-button,
.launcher-modal-deactivate-button {

    height: 36px;

    min-width: 100px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 0 13px;

    border-radius: var(--radius-sm);

    font-family: inherit;

    font-size: 12px;

    font-weight: 600;

    cursor: pointer;

    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition),
        transform var(--transition);

}


.launcher-modal-toggle-button {

    border:
        1px solid rgba(34, 197, 94, 0.25);

    background:
        rgba(34, 197, 94, 0.08);

    color: #4ade80;

}


.launcher-modal-toggle-button:hover {

    border-color:
        rgba(34, 197, 94, 0.45);

    background:
        rgba(34, 197, 94, 0.14);

    color: #86efac;

    transform: translateY(-1px);

}


.launcher-modal-deactivate-button {

    border:
        1px solid rgba(239, 68, 68, 0.25);

    background:
        rgba(239, 68, 68, 0.08);

    color: #f87171;

}


.launcher-modal-deactivate-button:hover {

    border-color:
        rgba(239, 68, 68, 0.45);

    background:
        rgba(239, 68, 68, 0.14);

    color: #fca5a5;

    transform: translateY(-1px);

}


/* ---------------------------------------------------------
   Launcher Mobile Actions
--------------------------------------------------------- */

@media (max-width: 700px) {

    .launcher-actions {

        gap: 6px;

    }

}


@media (max-width: 520px) {

    #addLauncherModal .dashboard-modal-footer,
    #launcherDetailsModal .dashboard-modal-footer {

        flex-direction: column;

        align-items: stretch;

    }

    #addLauncherModal .dashboard-modal-footer .dashboard-button,
    #launcherDetailsModal .dashboard-modal-footer .dashboard-button,
    #addLauncherModal .dashboard-modal-footer button,
    #launcherDetailsModal .dashboard-modal-footer button {

        width: 100%;

    }

}


/* =========================================================
   LAUNCHER TABLE ACTIONS - FINAL
========================================================= */

.table-actions,
.launcher-actions {

    display: flex;

    align-items: center;

    gap: 7px;

    white-space: nowrap;

}


/* Base Action Button */

.table-action-button,
.launcher-action-button {

    height: 32px;

    min-width: 58px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 0 11px;

    box-sizing: border-box;

    border: 1px solid var(--border);

    border-radius: 6px;

    background:
        rgba(255, 255, 255, 0.025);

    color: var(--text-secondary);

    font-family: inherit;

    font-size: 11px;

    font-weight: 600;

    line-height: 1;

    cursor: pointer;

    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition),
        transform var(--transition);

}


.table-action-button:hover,
.launcher-action-button:hover {

    background:
        rgba(255, 255, 255, 0.06);

    border-color: var(--border-light);

    color: var(--text-primary);

    transform: translateY(-1px);

}


.table-action-button:active,
.launcher-action-button:active {

    transform: translateY(0);

}


/* ---------------------------------------------------------
   VIEW
--------------------------------------------------------- */

.table-action-button.view,
.table-action-button.info,
.table-action-button.primary,
.launcher-action-view {

    border-color:
        rgba(59, 130, 246, 0.30);

    background:
        rgba(59, 130, 246, 0.07);

    color: #60a5fa;

}


.table-action-button.view:hover,
.table-action-button.info:hover,
.table-action-button.primary:hover,
.launcher-action-view:hover {

    border-color:
        rgba(59, 130, 246, 0.55);

    background:
        rgba(59, 130, 246, 0.14);

    color: #93c5fd;

}


/* ---------------------------------------------------------
   DEACTIVATE
--------------------------------------------------------- */

.table-action-button.danger,
.launcher-action-deactivate {

    border-color:
        rgba(239, 68, 68, 0.30);

    background:
        rgba(239, 68, 68, 0.07);

    color: #f87171;

}


.table-action-button.danger:hover,
.launcher-action-deactivate:hover {

    border-color:
        rgba(239, 68, 68, 0.55);

    background:
        rgba(239, 68, 68, 0.14);

    color: #fca5a5;

}


/* ---------------------------------------------------------
   ACTIVATE
--------------------------------------------------------- */

.table-action-button.success,
.launcher-action-toggle {

    border-color:
        rgba(34, 197, 94, 0.30);

    background:
        rgba(34, 197, 94, 0.07);

    color: #4ade80;

}


.table-action-button.success:hover,
.launcher-action-toggle:hover {

    border-color:
        rgba(34, 197, 94, 0.55);

    background:
        rgba(34, 197, 94, 0.14);

    color: #86efac;

}


/* ---------------------------------------------------------
   LAUNCHER TABLE ACTION COLUMN
--------------------------------------------------------- */

.launchers-table td:last-child {

    width: 1%;

    white-space: nowrap;

}


.launchers-table .table-actions {

    min-height: 32px;

}


/* ---------------------------------------------------------
   MOBILE
--------------------------------------------------------- */

@media (max-width: 760px) {

    .table-actions,
    .launcher-actions {

        flex-wrap: wrap;

    }

    .table-action-button,
    .launcher-action-button {

        min-width: 58px;

    }

}