/* ==========================================================================
   AUTHENTIC KEYAUTH FONTS (INTER, GEIST SANS & GEIST MONO)
   Imported with full weight fidelity (300, 400, 500, 600, 700)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap');

@font-face {
    font-family: 'Geist';
    src: url('../fonts/caa3a2e1cccd8315-s.p.0wgildi0cnwt9.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geist Mono';
    src: url('../fonts/797e433ab948586e-s.p.0r6juujl39pe6.woff2') format('woff2'),
         url('../fonts/6306c77e7c8268e4-s.2dbetqa9o8jxf.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --ka-font-sans: 'Inter', 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --ka-font-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --ka-bg: #121212;
    --ka-sidebar: #161616;
    --ka-card: #181818;
    --ka-card-border: #242424;
    --ka-card-inner: #202020;
    --ka-card-inner-border: #2B2B2B;
    --ka-blue: #1D63FF;
    --ka-blue-hover: #256BF5;
    --ka-purple: #7C3AED;
    --ka-cyan: #06B6D4;
    --ka-green: #10B981;
    --ka-orange: #EA580C;
    --ka-red: #DC2626;
    --ka-amber: #D97706;
    --ka-text: #FFFFFF;
    --ka-muted: #A1A1AA;
    --ka-dark: #71717A;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* KEYAUTH 1:1 ULTRA-DISCRETE BARELY VISIBLE SCROLLBAR (MATCHING PHOTO 4) */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
    background: transparent;
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 9999px;
    transition: background 0.2s ease;
}
html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.32);
}
html::-webkit-scrollbar-button,
body::-webkit-scrollbar-button,
*::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

/* Eliminate any ambient gradient blobs from style.css */
body::before,
body::after {
    display: none !important;
    content: none !important;
}

body {
    background-color: var(--ka-bg);
    color: var(--ka-text);
    font-family: var(--ka-font-sans);
    font-size: 13px;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea {
    font-family: inherit;
}

code, kbd, samp, pre, .mono, .font-mono {
    font-family: var(--ka-font-mono) !important;
}

.layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
    background-color: var(--ka-bg);
}

/* ----------------- SIDEBAR ----------------- */
.sidebar {
    width: 228px;
    background: var(--ka-sidebar);
    border-right: 1px solid #202020;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    z-index: 100;
    overflow: hidden;
}

.sidebar-brand {
    padding: 22px 18px 14px;
    display: flex;
    align-items: center;
}

.brand-title {
    font-size: 21px;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.4px;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: flex;
    align-items: center;
}

.sidebar-logo-img {
    height: 32px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: block;
}

/* KEYAUTH 1:1 SIDEBAR APP SELECTOR DROPDOWN */
.sidebar-app-box {
    padding: 0 12px 14px;
    position: relative;
}

.sidebar-app-btn {
    width: 100%;
    background: #181818;
    border: 1px solid #242424;
    border-radius: 8px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    user-select: none;
    text-align: left;
}

.sidebar-app-btn:hover,
.sidebar-app-btn.active {
    background: #202020;
    border-color: rgba(255, 255, 255, 0.15);
}

.sidebar-app-name {
    color: #FFFFFF;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-app-arrow {
    color: #94A3B8;
    stroke: #94A3B8;
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-app-btn.active .sidebar-app-arrow {
    transform: rotate(180deg);
}

.sidebar-app-menu {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #181818;
    border: 1px solid #242424;
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
    animation: fadeInApps 0.15s ease;
}

@keyframes fadeInApps {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.sidebar-app-item {
    background: transparent;
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
    user-select: none;
}

.sidebar-app-item:hover {
    background: #202020;
}

.sidebar-app-item.selected {
    background: #202020;
}

.sidebar-app-item-name {
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    word-break: break-word;
}

.sidebar-app-active-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22C55E;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
    flex-shrink: 0;
}

.sidebar-nav {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* KEYAUTH 1:1 PINNED FIXED BOTTOM SIDEBAR FOOTER (PHOTO 1) */
.sidebar-footer {
    margin-top: auto;
    padding: 6px 10px 8px;
    border-top: 1px solid #202020;
    background: var(--ka-sidebar);
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Hide legacy floating pill if present */
.sidebar-active-pill {
    display: none !important;
}

/* 1:1 KEYAUTH SIDEBAR NAVIGATION ITEM */
.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #A1A1AA;
    font-family: var(--ka-font-sans);
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: -0.015em;
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
    background: transparent;
    border: 1px solid transparent;
    box-shadow: none;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    user-select: none;
    z-index: 1;
}

.nav-item:hover {
    color: #FFFFFF;
    background: #181818;
    border-color: rgba(29, 99, 255, 0.3);
    box-shadow: 0 0 14px rgba(29, 99, 255, 0.2);
}

/* Active Container State (1:1 KeyAuth LOW resting state: subtle dark electric-blue with glowing outline) */
.nav-item.active {
    color: #FFFFFF !important;
    background: rgba(29, 99, 255, 0.14) !important;
    border: 1px solid rgba(29, 99, 255, 0.45) !important;
    box-shadow: 0 0 16px rgba(29, 99, 255, 0.22) !important;
    font-weight: 600;
}

.nav-item.active:hover {
    border-color: rgba(29, 99, 255, 0.75) !important;
    box-shadow: 0 0 22px rgba(29, 99, 255, 0.5) !important;
}

/* THE EXPANDING / RETRACTING BLUE FILL (1:1 EXACT KEYAUTH ANIMATION - FIRST TO END 0% TO 100%) */
.nav-item .nav-item-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 0%;
    background: #1D63FF; /* Authentic KeyAuth Electric Blue */
    border-radius: 7px;
    z-index: 1;
    pointer-events: none;
    box-shadow: 0 0 16px rgba(29, 99, 255, 0.55);
    transition: width 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hover on ANY tab (active or inactive): Expands from FIRST (0%) to END (100%) in FULL solid electric blue! */
.nav-item:hover .nav-item-fill,
.nav-item.active:hover .nav-item-fill {
    width: 100%;
}

/* Keep icons and text above the blue fill */
.nav-item svg,
.nav-item span:not(.nav-item-fill) {
    position: relative;
    z-index: 2;
    transition: stroke 0.2s ease, color 0.2s ease;
}

.nav-item svg:not(.ka-m-badge) {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    stroke: #71717A;
    stroke-width: 1.65px !important;
    opacity: 1;
}

.nav-item:hover svg:not(.ka-m-badge) {
    stroke: #FFFFFF !important;
}

.nav-item.active svg:not(.ka-m-badge) {
    stroke: #FFFFFF !important;
    opacity: 1 !important;
}

/* KEYAUTH 1:1 MANAGER CROWN / M BADGE (GOLD ACCENT) */
.ka-m-badge {
    margin-left: auto;
    width: 15px !important;
    height: 15px !important;
    stroke: #F59E0B !important;
    fill: none !important;
    flex-shrink: 0;
    opacity: 0.95;
    transition: transform 0.2s ease, stroke 0.2s ease, filter 0.2s ease;
}

.nav-item:hover .ka-m-badge,
.nav-item.active .ka-m-badge {
    stroke: #FBBF24 !important;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.65));
    transform: scale(1.08);
}

.nav-item.active span:not(.nav-item-fill) {
    color: #FFFFFF !important;
}

.nav-item.active::before {
    display: none !important;
}

/* KEYAUTH 1:1 SECTION TRANSITION ANIMATION */
@keyframes kaSectionFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.996);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ka-section-fade {
    animation: kaSectionFadeIn 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.nav-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: #94A3B8;
    opacity: 0.85;
    transition: stroke 0.15s ease, opacity 0.15s ease;
}

.nav-item:hover svg {
    stroke: #FFFFFF;
    opacity: 1;
}

.nav-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: currentColor;
    opacity: 0.8;
}

.pro-crown {
    margin-left: auto;
    display: flex;
    align-items: center;
}
.pro-crown svg {
    width: 13px;
    height: 13px;
    stroke: #EAB308;
    fill: rgba(234, 179, 8, 0.15);
}

/* ----------------- MAIN WRAPPER ----------------- */
.main-wrapper {
    margin-left: 228px;
    width: calc(100% - 228px);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--ka-bg);
    min-height: 100vh;
}

/* TOPBAR */
.topbar {
    height: 54px;
    border-bottom: 1px solid #1C1C1C;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    background: var(--ka-bg);
    z-index: 90;
    width: 100%;
}

/* KEYAUTH 1:1 MOBILE TOPBAR HAMBURGER BUTTON (SCREENSHOT 3) */
.topbar-mobile-hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #FFFFFF;
    padding: 7px 8px;
    cursor: pointer;
    border-radius: 6px;
    margin-right: 10px;
    transition: background 0.15s ease, color 0.15s ease;
}
.topbar-mobile-hamburger:hover {
    background: #202020;
    color: #38BDF8;
}

/* KEYAUTH 1:1 SIDEBAR BACKDROP OVERLAY */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.sidebar-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.topbar-search {
    display: flex;
    align-items: center;
    background: #181818;
    border: 1px solid #242424;
    border-radius: 8px;
    padding: 7px 12px;
    width: 240px;
    gap: 9px;
}

.topbar-search svg {
    stroke: #64748B;
    flex-shrink: 0;
}

.topbar-search input {
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 13px;
    outline: none;
    width: 100%;
}
.topbar-search input::placeholder {
    color: #64748B;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* EXACT KEYAUTH PROFILE CARD & DROPDOWN MENU */
.topbar-profile-container {
    position: relative;
}

.topbar-user-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #181818;
    border: 1px solid #242424;
    border-radius: 10px;
    padding: 6px 14px 6px 8px;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

.topbar-user-pill:hover,
.topbar-user-pill.active {
    background: #202020;
    border-color: rgba(255, 255, 255, 0.15);
}

.user-avatar-blue {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #1D63FF;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    flex-shrink: 0;
}

.user-pill-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.user-pill-name {
    font-size: 13px;
    font-weight: 600;
    color: #FFFFFF;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.user-pill-sub {
    font-size: 11px;
    color: #94A3B8;
    line-height: 1.2;
    margin-top: 2px;
    font-weight: 400;
}

.user-pill-arrow {
    display: flex;
    align-items: center;
    margin-left: 4px;
    color: #94A3B8;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.topbar-user-pill.active .user-pill-arrow {
    transform: rotate(180deg);
    color: #FFFFFF;
}

/* PROFILE DROPDOWN MENU */
.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 230px;
    background: #181818;
    border: 1px solid #242424;
    border-radius: 10px;
    padding: 10px 0;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75);
    z-index: 1000;
    display: none;
    animation: profileMenuPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-dropdown-menu.active {
    display: block;
}

@keyframes profileMenuPop {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.profile-menu-header {
    padding: 6px 18px 12px 18px;
    font-size: 13.5px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: -0.01em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 6px;
}

.profile-menu-list {
    display: flex;
    flex-direction: column;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 9px 18px;
    background: transparent;
    border: none;
    color: #CBD5E1;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.profile-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
}

.p-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: #94A3B8;
    transition: color 0.15s ease;
    flex-shrink: 0;
}

.profile-menu-item:hover .p-item-icon {
    color: #FFFFFF;
}

.profile-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 6px 0;
}

.profile-menu-item.logout-item:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #F87171;
}

.profile-menu-item.logout-item:hover .p-item-icon {
    color: #F87171;
}

.app-selected-toast {
    display: none;
    align-items: center;
    gap: 12px;
    background: #141416;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid #10B981;
    color: #F4F4F5;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
}

/* CONTENT BODY */
.content-body {
    padding: 14px 20px 10px;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-height: 0;
}

.content-body > section {
    margin-bottom: 16px;
}

/* KEYAUTH UPPER HEADER CARD BOX (1:1 KEYAUTH) */
.ka-header-box {
    background: #181818;
    border: 1px solid #242424;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-sizing: border-box;
    width: 100%;
}

.ka-header-box .ka-breadcrumb,
.ka-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #94A3B8;
    margin-bottom: 8px;
}

.ka-breadcrumb span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ka-breadcrumb .breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #94A3B8;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s ease;
}

.ka-breadcrumb .breadcrumb-link:hover {
    color: #FFFFFF;
}

.ka-breadcrumb .ka-breadcrumb-sep {
    color: #64748B;
    display: inline-flex;
    align-items: center;
    opacity: 0.8;
}

.ka-breadcrumb b {
    color: #FFFFFF;
    font-weight: 600;
}

.ka-sub-warn {
    color: #EF4444;
}
.ka-sub-warn a {
    color: var(--ka-blue);
    text-decoration: none;
}

.ka-header-title {
    font-size: 20px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 4px 0;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.ka-header-desc {
    font-size: 12.5px;
    color: #94A3B8;
    margin: 0;
    line-height: 1.4;
}

.ka-header-desc a {
    color: #1D63FF;
    text-decoration: none;
    font-weight: 500;
}

.ka-header-desc a:hover {
    text-decoration: underline;
}

/* LEGACY PAGE HEADER (kept for fallback) */
.page-header {
    margin-bottom: 14px;
}
.page-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 4px;
    letter-spacing: -0.015em;
}
.page-header p {
    font-size: 12.5px;
    color: #94A3B8;
}
.page-header a {
    color: #1D63FF;
    text-decoration: none;
}

/* 4 STATS ROW (1:1 KEYAUTH) */
.ka-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

.ka-stat-card {
    background: #181818;
    border: 1px solid #242424;
    border-radius: 8px;
    padding: 14px 18px;
    text-align: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.ka-stat-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.ka-stat-num {
    font-family: var(--ka-font-mono);
    font-size: 24px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.1;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.ka-stat-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--ka-muted);
}

/* 2-COLUMN MAIN GRID */
.ka-main-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 16px;
    align-items: start;
}

@media (max-width: 1100px) {
    .ka-main-grid {
        grid-template-columns: 1fr;
    }
    .ka-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* KA BOX CONTAINER (1:1 KEYAUTH SYSTEM) */
.ka-box {
    background: #181818;
    border: 1px solid #242424;
    border-radius: 8px;
    padding: 22px 24px;
    box-sizing: border-box;
    position: relative;
}

.ka-box.ka-box-has-header,
.ka-box:has(.ka-box-header) {
    padding: 0 !important;
}

.ka-box-header {
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--ka-card-border);
}
.ka-box-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 3px;
}
.ka-box-header p {
    font-size: 12px;
    color: var(--ka-muted);
}

.ka-box-body {
    padding: 18px 20px;
}

/* DISPLAY CODE SNIPPET ROW */
.snippet-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.snippet-toggle-label {
    font-size: 12.5px;
    color: var(--ka-muted);
}

/* iOS SWITCH */
.ka-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}
.ka-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.ka-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #242424;
    transition: .2s;
    border-radius: 20px;
}
.ka-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .2s;
    border-radius: 50%;
}
input:checked + .ka-slider {
    background-color: var(--ka-blue);
}
input:checked + .ka-slider:before {
    transform: translateX(16px);
}

/* CREDENTIALS FIELDS */
.cred-field {
    margin-bottom: 16px;
}

.cred-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--ka-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.cred-input-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--ka-card-inner);
    border: 1px solid #242424;
    border-radius: 6px;
    padding: 8px 12px;
}

.cred-val {
    font-family: var(--ka-font-mono);
    font-size: 13px;
    color: #FFFFFF;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cred-val.masked {
    filter: blur(5px);
    user-select: none;
    cursor: pointer;
    transition: filter 0.2s ease;
}
.cred-val.masked:hover {
    filter: blur(0px);
}

.copy-btn-icon {
    background: transparent;
    border: none;
    color: var(--ka-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 2px;
    transition: color 0.15s ease;
}
.copy-btn-icon:hover {
    color: #FFFFFF;
}
.copy-btn-icon svg {
    stroke: currentColor;
}

.btn-refresh-secret {
    background: var(--ka-amber);
    color: #FFFFFF;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    transition: background 0.15s ease;
}
.btn-refresh-secret:hover {
    background: #B45309;
}
.btn-refresh-secret svg {
    stroke: currentColor;
}

.ka-notice {
    background: #1D63FF;
    border: none;
    border-radius: 8px;
    padding: 16px 18px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 12.5px;
    line-height: 1.45;
    color: #FFFFFF;
    margin-top: 14px;
}
.ka-notice svg {
    flex-shrink: 0;
    stroke: #FFFFFF;
    margin-top: 2px;
}

/* CODE SNIPPET VIEW (1:1 KEYAUTH) */
#view-code-snippet {
    display: none;
}

.snippet-lang-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.snippet-lang-label {
    font-size: 13px;
    color: var(--ka-muted);
}

.snippet-lang-select {
    background: #181818;
    border: 1px solid var(--ka-card-border);
    color: #FFFFFF;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    min-width: 140px;
}

.ka-snippet-pre {
    background: #121212;
    border: 1px solid #242424;
    border-radius: 6px;
    padding: 18px 16px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #FFFFFF;
    overflow-x: auto;
    margin-bottom: 16px;
}

.snippet-actions-row {
    display: flex;
    gap: 10px;
}

.btn-snippet-copy {
    background: var(--ka-blue);
    color: #FFFFFF;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s ease;
}
.btn-snippet-copy:hover {
    background: var(--ka-blue-hover);
}

.btn-snippet-example {
    background: #10B981;
    color: #FFFFFF;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.15s ease;
}
.btn-snippet-example:hover {
    opacity: 0.9;
}

/* ----------------- MY APPLICATIONS RIGHT COLUMN ----------------- */
.apps-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.apps-filter-select {
    width: 100%;
    background: #181818;
    border: 1px solid var(--ka-card-border);
    color: #FFFFFF;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.apps-filter-select:hover,
.apps-filter-select:focus {
    border-color: #1D63FF;
    box-shadow: 0 0 0 1px #1D63FF;
}

.apps-filter-select option {
    background: #181818;
    color: #FFFFFF;
    padding: 10px 14px;
    font-size: 13px;
}

.apps-filter-select option:checked {
    background: #1D63FF;
    color: #FFFFFF;
}

.apps-search-wrap {
    display: flex;
    align-items: center;
    background: #181818;
    border: 1px solid var(--ka-card-border);
    border-radius: 6px;
    padding: 6px 10px;
    gap: 6px;
}
.apps-search-wrap svg {
    stroke: var(--ka-muted);
}
.apps-search-input {
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 12px;
    outline: none;
    width: 140px;
}
.apps-search-input::placeholder {
    color: var(--ka-muted);
}

.btn-create-app-subtle {
    background: var(--ka-blue);
    color: #FFFFFF;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}
.btn-create-app-subtle:hover {
    background: var(--ka-blue-hover);
}

.btn-create-app-full {
    width: 100%;
    background: #1D63FF;
    color: #FFFFFF;
    border: none;
    padding: 9px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s ease;
}
.btn-create-app-full:hover {
    background: #1850CC;
}

.btn-card-more {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--ka-muted);
    border-radius: 4px;
    padding: 3px 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.btn-card-more:hover {
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.card-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    border-radius: 8px;
    background: #181818 !important;
    border: 1px solid #242424 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.85);
    z-index: 1000;
    min-width: 125px;
    padding: 6px 0;
    overflow: hidden;
}

.menu-action-item {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #FFFFFF !important;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
    white-space: nowrap;
}
.menu-action-item:hover {
    background: #202020;
    color: #FFFFFF !important;
}

/* APPLICATION CARD ITEM */
.ka-app-card {
    background: #202020;
    border: 1px solid #242424;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
    transition: border-color 0.15s ease;
}
.ka-app-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
}

.app-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.app-card-name {
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
}

.badge-active {
    background: #0D281E;
    color: #10B981;
    border: 1px solid #134E34;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.5px;
}

.app-card-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    background: #121212;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 10px 8px;
    margin-bottom: 14px;
}

.meta-item-label {
    font-size: 11px;
    color: var(--ka-dark);
    margin-bottom: 2px;
}

.meta-item-val {
    font-size: 13px;
    font-weight: 700;
    color: #FFFFFF;
}

/* ACTION BUTTONS (SOLID, FLAT, 1:1 KEYAUTH WITH CLEAN VECTOR ICONS) */
.app-card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-ka-action {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.15s ease;
}
.btn-ka-action:hover {
    opacity: 0.9;
}
.btn-ka-action svg {
    stroke: currentColor;
    flex-shrink: 0;
}

.btn-ka-selected {
    background: #059669;
    color: #FFFFFF;
}

.btn-ka-select {
    background: #1E2330;
    color: #94A3B8;
    border: 1px solid #2B3245;
}
.btn-ka-select:hover {
    background: #282E3E;
    color: #FFFFFF;
}

.btn-ka-rename {
    background: #7C3AED;
    color: #FFFFFF;
}

.btn-ka-desc {
    background: #0284C7;
    color: #FFFFFF;
}

.btn-ka-pause {
    background: #EA580C;
    color: #FFFFFF;
}

.btn-ka-delete {
    background: #DC2626;
    color: #FFFFFF;
}

/* RIGHT VERTICAL SUPPORT TAB */
.vertical-support-bar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: #222736;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 14px 6px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    border-radius: 6px 0 0 6px;
    cursor: pointer;
    z-index: 99;
}

/* MODALS - ALWAYS HIDDEN UNLESS ACTIVE */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 7, 12, 0.75);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    display: none !important;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-overlay.active {
    display: flex !important;
}

.modal-card {
    background: rgba(19, 23, 34, 0.92);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    padding: 24px 26px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    box-sizing: border-box;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: none;
    padding: 0;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
    letter-spacing: -0.2px;
}

.modal-close {
    background: transparent;
    border: none;
    color: #94A3B8;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s ease;
}

.modal-close:hover {
    color: #FFFFFF;
}

.modal-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
}

.modal-field-label {
    font-size: 11px;
    font-weight: 700;
    color: #CBD5E1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.modal-info-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #38BDF8;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.modal-info-icon:hover {
    color: #60A5FA;
}

/* KeyAuth Instant Glassy Dark Pill Tooltip */
.modal-info-icon[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: rgba(17, 20, 29, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #F8FAFC;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.4;
    padding: 7px 14px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s;
    z-index: 10005;
}

.modal-info-icon[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #CBD5E1;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    height: 42px;
    background: #121212;
    border: 1px solid #242424;
    border-radius: 6px;
    padding: 0 14px;
    color: #FFFFFF;
    font-size: 13.5px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
    border-color: #1D63FF;
    box-shadow: 0 0 0 2px rgba(29, 99, 255, 0.18);
}

.btn-modal-cancel {
    background: #FFFFFF !important;
    color: #0F172A !important;
    font-weight: 600 !important;
    padding: 9px 20px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    border: none !important;
    cursor: pointer !important;
    transition: opacity 0.15s ease !important;
}

.btn-modal-cancel:hover {
    opacity: 0.9 !important;
}

.btn-modal-submit {
    background: #1D63FF !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    padding: 9px 22px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    border: none !important;
    cursor: pointer !important;
    transition: background 0.15s ease !important;
}

.btn-modal-submit:hover {
    background: #1652E0 !important;
}

.btn-primary {
    background: var(--ka-blue);
    color: #FFFFFF;
    border: none;
    padding: 9px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-primary:hover {
    background: var(--ka-blue-hover);
}

.btn-outline {
    background: transparent;
    color: #FFFFFF;
    border: 1px solid var(--ka-card-border);
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #242424;
    transition: .2s;
    border-radius: 20px;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .2s;
    border-radius: 50%;
}
input:checked + .toggle-slider { background-color: var(--ka-blue); }
input:checked + .toggle-slider:before { transform: translateX(16px); }

/* KEYAUTH STYLE TOOLBAR ACTION BUTTONS & TOOLTIPS */
.ka-tooltip-wrap {
    position: relative;
    display: inline-flex;
}
.ka-tooltip-wrap .ka-tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: #111317;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #FFFFFF;
    font-size: 11.5px;
    font-weight: 500;
    padding: 4px 9px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 100;
    transition: opacity 0.15s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}
.ka-tooltip-wrap:hover .ka-tooltip-text {
    visibility: visible;
    opacity: 1;
}

.ka-btn-action {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s ease, filter 0.15s ease, opacity 0.15s ease;
    border: none;
    position: relative;
    padding: 0;
    color: #FFFFFF !important;
}
.ka-btn-action:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
}
.ka-btn-action svg {
    width: 15px;
    height: 15px;
    stroke: #FFFFFF !important;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    display: block;
}
.ka-btn-filter {
    background: #0E2238 !important;
    color: #38BDF8 !important;
}
.ka-btn-filter svg {
    stroke: #38BDF8 !important;
}
.ka-btn-view {
    background: #181818 !important;
    border: 1.5px solid #FFFFFF !important;
    border-radius: 6px !important;
    color: #FFFFFF !important;
}
.ka-btn-create {
    background: #0D3B2B !important;
    color: #FFFFFF !important;
}
.ka-btn-ttl {
    background: #132845 !important;
    color: #FFFFFF !important;
}
.ka-btn-export {
    background: #2E163B !important;
    color: #FFFFFF !important;
}
.ka-btn-import {
    background: #382012 !important;
    color: #FFFFFF !important;
}
.ka-btn-delete {
    background: #3E1518 !important;
    color: #FFFFFF !important;
}
.ka-btn-history,
.ka-btn-subtract {
    background: #382012 !important;
    color: #FFFFFF !important;
}
.ka-btn-refresh,
.ka-btn-reset-hwid {
    background: #0E382A !important;
    color: #FFFFFF !important;
}

/* FILTER BAR ROW (1:1 KEYAUTH) */
.ka-filter-bar {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 16px;
    padding-top: 4px;
    flex-wrap: wrap;
}
.ka-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.ka-filter-label {
    font-size: 11.5px;
    color: #94A3B8;
    font-weight: 500;
}
.ka-filter-select {
    background: #181818;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 13px;
    color: #FFFFFF;
    outline: none;
    min-width: 120px;
    cursor: pointer;
}
.ka-filter-select:focus {
    border-color: #38BDF8;
}

/* EXPORT DROPDOWN MENU */
.ka-export-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #181818;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    min-width: 130px;
    overflow: hidden;
    padding: 4px 0;
    display: none;
}
.ka-export-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #FFFFFF;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
}
.ka-export-item:hover {
    background: #202020;
}

/* LICENSES 4-COLUMN CARD GRID (1:1 KEYAUTH) */
.ka-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.ka-lic-card {
    background: #202020;
    border: 1px solid #242424;
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.15s ease, transform 0.15s ease;
    position: relative;
}
.ka-lic-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
}
.ka-lic-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.ka-lic-card-left {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.ka-lic-card-key {
    font-family: var(--ka-font-mono) !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #FFFFFF;
    word-break: break-all;
    overflow-wrap: anywhere;
    line-height: 1.35;
    cursor: pointer;
    flex: 1;
}
.ka-lic-card-key:hover {
    color: #38BDF8;
}
.ka-lic-card-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-top: 1px;
}
.ka-badge-status {
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 500;
    background: #141414;
    color: #8F9BB3;
    border: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}
.ka-badge-used {
    background: #064E3B;
    color: #6EE7B7;
    border-color: #059669;
}
.ka-badge-banned {
    background: #450A0A;
    color: #FCA5A5;
    border-color: #DC2626;
}
.ka-badge-paused {
    background: #451A03;
    color: #FCD34D;
    border-color: #D97706;
}
.ka-lic-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
    font-size: 12px;
}
.ka-lic-col {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}
.ka-lic-meta-row {
    font-size: 12px;
    color: #848B9D;
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ka-lic-meta-row span {
    font-family: var(--ka-font-mono);
    color: #E2E8F0;
    font-weight: 500;
    font-size: 11.5px;
    margin-left: 4px;
}
.card-more-menu-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.ka-dots-btn {
    background: transparent;
    border: none;
    color: #64748B;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ka-dots-btn:hover {
    color: #FFFFFF;
}

/* 1:1 KEYAUTH DARK CHECKBOX */
input[type="checkbox"].lic-row-check,
input[type="checkbox"].user-row-check,
#user-select-all,
#lic-select-all {
    appearance: none;
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border: 1px solid #282828;
    background: #141414;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    vertical-align: middle;
    transition: all 0.15s ease;
    margin: 0;
    flex-shrink: 0;
}
input[type="checkbox"].lic-row-check:hover,
input[type="checkbox"].user-row-check:hover,
#user-select-all:hover,
#lic-select-all:hover {
    border-color: #3B82F6;
}
input[type="checkbox"].lic-row-check:checked,
input[type="checkbox"].user-row-check:checked,
#user-select-all:checked,
#lic-select-all:checked {
    background-color: #1D63FF;
    border-color: #1D63FF;
}
input[type="checkbox"].lic-row-check:checked::after,
#lic-select-all:checked::after {
    content: "";
    display: block;
    width: 4px;
    height: 8px;
    border: solid #FFFFFF;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.data-table td:nth-child(2) span {
    font-family: var(--ka-font-mono) !important;
    font-size: 12.5px;
    letter-spacing: -0.01em;
}

#edit-lic-key, #gen-mask {
    font-family: var(--ka-font-mono) !important;
}
.ka-form-group {
    margin-bottom: 15px;
}
.ka-form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #CBD5E1;
}
.ka-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ka-input-field {
    flex: 1;
    background: #121212;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 9px 12px;
    color: #FFFFFF;
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.15s ease;
    width: 100%;
}
.ka-input-field:focus {
    border-color: #FFFFFF !important;
}
.ka-info-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #38BDF8;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.15s ease;
}
.ka-info-circle:hover {
    opacity: 0.8;
}

/* ==========================================================================
   TABLE DROPDOWN MENU OVERFLOW & SCROLLBAR FIX (1:1 KEYAUTH)
   Prevents dropdown menus in List/Table view from being clipped or causing scrollbars
   ========================================================================== */
.ka-box {
    overflow: visible !important;
}

#users-table-wrapper,
#licenses-table-wrapper,
.ka-table-wrap {
    min-height: 220px;
    overflow: visible !important;
    position: relative;
}

#users-table-wrapper .table-responsive,
#licenses-table-wrapper .table-responsive {
    overflow: visible !important;
}

.table-responsive {
    overflow: visible;
}

@media (max-width: 900px) {
    .table-responsive {
        overflow-x: auto !important;
    }
}

.ka-box:not([style*="padding: 0"]):not(.ka-box-has-header) .table-responsive {
    margin-left: -24px;
    margin-right: -24px;
}
.ka-box:not([style*="padding: 0"]):not(.ka-box-has-header) .table-responsive .data-table th:first-child,
.ka-box:not([style*="padding: 0"]):not(.ka-box-has-header) .table-responsive .data-table td:first-child {
    padding-left: 24px;
}
.ka-box:not([style*="padding: 0"]):not(.ka-box-has-header) .table-responsive .data-table th:last-child,
.ka-box:not([style*="padding: 0"]):not(.ka-box-has-header) .table-responsive .data-table td:last-child {
    padding-right: 24px;
}

.data-table td {
    position: relative;
}

.data-table td .card-more-menu-wrap {
    position: relative;
    display: inline-block;
}

.data-table td .card-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    z-index: 99999 !important;
    background: #181818 !important;
    border: 1px solid #242424 !important;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.95);
    min-width: 135px;
}

/* KEYAUTH 1:1 SEARCH INPUT & BOX CONTROLS */
.ka-search-input {
    background: #121212 !important;
    border: 1px solid #242424 !important;
    padding: 0 14px !important;
    height: 36px !important;
    font-size: 13px !important;
    color: #FFFFFF !important;
    border-radius: 6px !important;
    outline: none !important;
    transition: border-color 0.15s ease;
    box-sizing: border-box !important;
    font-family: inherit;
}
.ka-search-input::placeholder {
    color: #64748B !important;
}
.ka-search-input:focus {
    border-color: #1D63FF !important;
}

/* KEYAUTH 1:1 PAGINATION */
.ka-pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 0;
    border-top: none;
}
.ka-btn-page {
    background: transparent !important;
    border: none !important;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 13px;
    font-weight: 500;
    color: #94A3B8 !important;
    cursor: pointer;
    transition: color 0.15s ease;
    user-select: none;
}
.ka-btn-page:hover {
    background: transparent !important;
    color: #FFFFFF !important;
}
.ka-btn-page:disabled,
.ka-btn-page[disabled] {
    color: #475569 !important;
    cursor: not-allowed;
}
.ka-page-info {
    font-size: 13px;
    color: #94A3B8;
    font-weight: 500;
    user-select: none;
}

/* EXACT KEYAUTH 1:1 ENCLOSED FOOTER CARD */
.ka-footer {
    background: #181818;
    border: 1px solid #242424;
    border-radius: 8px;
    padding: 12px 20px;
    margin-top: auto !important;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #71717A;
    box-sizing: border-box;
    width: 100%;
}

.ka-footer-left {
    color: #71717A;
    font-size: 12px;
    font-weight: 400;
}

.ka-footer-right {
    display: flex;
    align-items: center;
    gap: 22px;
}

.ka-footer-right a {
    color: #858B97;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
    white-space: nowrap;
}

.ka-footer-right a:hover {
    color: #FFFFFF;
}

@media (max-width: 768px) {
    .ka-footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    .ka-footer-right {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
}

/* ==========================================================================
   AUTHENTIC KEYAUTH DATA TABLE & TOASTS
   ========================================================================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.data-table th {
    background: #181818;
    color: #94A3B8;
    font-weight: 600;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 18px;
    border-bottom: 1px solid #242424;
}

.data-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #242424;
    color: #FFFFFF;
}

.data-table tr:hover td {
    background: #202020;
}

/* ==========================================================================
   KEYAUTH 1:1 AUTHENTIC TOAST NOTIFICATIONS (Pixel-Perfect Matching Image 1)
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100000;
    pointer-events: none;
    max-width: 480px;
}

.toast {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: rgba(18, 18, 22, 0.88) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #FFFFFF !important;
    padding: 13px 20px 13px 22px !important;
    border-radius: 11px !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 2px 10px rgba(0, 0, 0, 0.5) !important;
    pointer-events: auto;
    overflow: hidden;
    gap: 18px;
    min-height: 48px;
    box-sizing: border-box;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

/* Left Accent Indicator Stripe (FLUSH against left border 1:1 KeyAuth Image 1) */
.toast .toast-indicator {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 5px;
    border-top-left-radius: 11px;
    border-bottom-left-radius: 11px;
    pointer-events: none;
}

.toast-success .toast-indicator {
    background: #10B981 !important;
    box-shadow: 2px 0 14px rgba(16, 185, 129, 0.6) !important;
}

.toast-error .toast-indicator {
    background: #EF4444 !important;
    box-shadow: 2px 0 14px rgba(239, 68, 68, 0.6) !important;
}

.toast-warning .toast-indicator {
    background: #F59E0B !important;
    box-shadow: 2px 0 14px rgba(245, 158, 11, 0.6) !important;
}

.toast-info .toast-indicator {
    background: #3B82F6 !important;
    box-shadow: 2px 0 14px rgba(59, 130, 246, 0.6) !important;
}

/* Message Text: Clean crisp Inter 500 single line */
.toast-message {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: #FFFFFF !important;
    letter-spacing: -0.012em !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* Close button: Bold rounded-cap white ✕ matching Image 1 */
.toast-close {
    background: transparent !important;
    border: none !important;
    color: #FFFFFF !important;
    opacity: 0.8 !important;
    cursor: pointer !important;
    padding: 3px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    margin-left: 6px !important;
    transition: opacity 0.15s ease, transform 0.15s ease !important;
    flex-shrink: 0 !important;
}

.toast-close:hover {
    opacity: 1 !important;
    transform: scale(1.1);
}

/* KeyAuth 1:1 Subtle Dark / Black Progress Timer Line (Matching Image 3) */
.toast .toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
    border-bottom-left-radius: 11px;
    border-bottom-right-radius: 11px;
    pointer-events: none;
}

.toast .toast-progress-bar {
    height: 100%;
    width: 100%;
    background: rgba(0, 0, 0, 0.75); /* Authentic KeyAuth Dark/Black Progress Line */
    transform-origin: left center;
}

/* ==========================================================================
   KEYAUTH SLEEK CONFIRMATION MODAL (Matching Screenshot 5)
   ========================================================================== */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 7, 12, 0.75);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100005;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
}

.confirm-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.confirm-modal-card {
    background: rgba(20, 24, 34, 0.95);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    max-width: 440px;
    width: 100%;
    padding: 22px 24px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: scale(0.96) translateY(8px);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.confirm-modal-overlay.active .confirm-modal-card {
    transform: scale(1) translateY(0);
}

.confirm-modal-title {
    font-size: 16.5px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 12px 0;
    letter-spacing: -0.2px;
}

.confirm-modal-body {
    font-size: 13.5px;
    color: #94A3B8;
    line-height: 1.5;
    margin-bottom: 22px;
}

.confirm-modal-body strong {
    color: #FFFFFF;
    font-weight: 700;
}

.confirm-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-confirm-cancel {
    background: #FFFFFF !important;
    color: #0F172A !important;
    font-weight: 600 !important;
    padding: 8px 18px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    border: none !important;
    cursor: pointer !important;
    transition: opacity 0.15s ease !important;
}

.btn-confirm-cancel:hover {
    opacity: 0.9 !important;
}

.btn-confirm-danger {
    background: #DC2626 !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    padding: 8px 20px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    border: none !important;
    cursor: pointer !important;
    transition: background 0.15s ease !important;
}

.btn-confirm-danger:hover {
    background: #B91C1C !important;
}

.btn-confirm-primary {
    background: #1D63FF !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    padding: 8px 20px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    border: none !important;
    cursor: pointer !important;
    transition: background 0.15s ease !important;
}

.btn-confirm-primary:hover {
    background: #1652E0 !important;
}

/* ==========================================================================
   KEYAUTH 1:1 MOBILE RESPONSIVE ENGINE (DASHBOARD)
   ========================================================================== */

/* TABLET & MOBILE BREAKPOINT (<= 992px) */
@media (max-width: 992px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
    }

    /* TOPBAR ADAPTATIONS (KEYAUTH SCREENSHOT 3) */
    .topbar {
        padding: 0 14px !important;
        height: 56px !important;
    }

    .topbar-mobile-hamburger {
        display: flex !important;
    }

    .topbar-search {
        display: none !important; /* KeyAuth hides search input on mobile */
    }

    .user-pill-sub {
        display: none !important; /* Hide subtitle so user pill fits cleanly */
    }

    .topbar-user-pill {
        padding: 4px 8px 4px 4px !important;
    }

    /* SIDEBAR COLLAPSED OFF-SCREEN AS SLIDE-OUT DRAWER */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 260px !important;
        max-width: 82vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        transform: translateX(-100%) !important;
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
        z-index: 1000 !important;
        box-shadow: none !important;
    }

    .sidebar.mobile-open {
        transform: translateX(0) !important;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.9) !important;
    }

    /* MAIN WRAPPER FULL SCREEN WIDTH */
    .main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        min-width: 0 !important;
    }

    .content-body {
        padding: 16px 14px 48px !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    /* HEADER & BREADCRUMB */
    .ka-header-box {
        margin-bottom: 14px !important;
    }

    .ka-breadcrumb {
        flex-wrap: wrap !important;
        font-size: 12px !important;
        gap: 4px !important;
    }

    .ka-header-title {
        font-size: 20px !important;
        letter-spacing: -0.02em !important;
    }

    .ka-header-desc {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }

    /* 4 STATS ROW: EXACT 2x2 GRID (MATCHING KEYAUTH SCREENSHOT 3) */
    .ka-stats-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 14px !important;
        width: 100% !important;
    }

    .ka-stat-card {
        padding: 14px 12px !important;
        border-radius: 8px !important;
    }

    .ka-stat-num {
        font-size: 24px !important;
    }

    .ka-stat-label {
        font-size: 11.5px !important;
    }

    /* 2-COLUMN MAIN GRID BECOMES 1 FULL-WIDTH COLUMN (KEYAUTH SCREENSHOT 3) */
    .ka-main-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 14px !important;
    }

    .ka-box {
        width: 100% !important;
        box-sizing: border-box !important;
        border-radius: 8px !important;
        padding: 16px 14px !important;
    }

    .ka-box.ka-box-has-header {
        padding: 0 !important;
    }

    .ka-box-header {
        padding: 14px 16px 12px !important;
    }

    .ka-box-body {
        padding: 14px 16px !important;
    }

    /* APPLICATION CREDENTIALS FIELDS */
    .cred-field {
        margin-bottom: 12px !important;
    }

    .cred-input-wrap {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* RESPONSIVE TABLES ACROSS ALL TABS */
    .ka-table-wrap,
    .table-responsive,
    .data-table-container,
    .table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        display: block !important;
    }

    /* ACTION TOOLBARS ON MOBILE */
    .ka-action-bar,
    .table-toolbar,
    .filter-bar {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .ka-action-bar input,
    .table-toolbar input {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* SMALL PHONES (<= 480px) */
@media (max-width: 480px) {
    .user-pill-name {
        max-width: 95px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .ka-stats-row {
        gap: 8px !important;
    }

    .ka-stat-card {
        padding: 12px 8px !important;
    }

    .ka-stat-num {
        font-size: 22px !important;
    }

    .modal-content,
    .ka-modal-box {
        width: 94vw !important;
        max-width: 94vw !important;
        margin: 10px auto !important;
    }
}