/* ===========================================================
   Signage CMS — Stylesheet
   Dark theme dengan glassmorphism, modern layout, dan animasi
   =========================================================== */

/* ── CSS Variables (Design Tokens) ── */
:root {
    /* Background layers (Tailwind Neutral) */
    --bg-body:        #0a0a0a;
    --bg-sidebar:     #171717;
    --bg-card:        #171717;
    --bg-panel:       #171717;
    --bg-topbar:      #171717;
    --bg-input:       #262626;
    --bg-hover:       #262626;

    /* Borders */
    --border-color:   #262626;
    --border-subtle:  rgba(255, 255, 255, 0.06);

    /* Text */
    --text-primary:   #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted:     #64748b;

    /* Accent colors */
    --color-primary:  #3b82f6;
    --color-primary-glow: rgba(59, 130, 246, 0.15);
    --color-success:  #22c55e;
    --color-success-glow: rgba(34, 197, 94, 0.15);
    --color-danger:   #ef4444;
    --color-danger-glow: rgba(239, 68, 68, 0.15);
    --color-info:     #a78bfa;
    --color-info-glow: rgba(167, 139, 250, 0.15);

    /* Sizing */
    --sidebar-width:  260px;
    --topbar-height:  64px;
    --radius:         12px;
    --radius-sm:      8px;

    /* Transitions */
    --transition:     0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: "Lekton", monospace;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ── Typography Classes ── */
.lekton-regular {
  font-family: "Lekton", monospace;
  font-weight: 400;
  font-style: normal;
}

.lekton-bold {
  font-family: "Lekton", monospace;
  font-weight: 700;
  font-style: normal;
}

.lekton-regular-italic {
  font-family: "Lekton", monospace;
  font-weight: 400;
  font-style: italic;
}


/* ===========================================================
   SIDEBAR
   =========================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition);
}

/* ── Sidebar Header ── */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--color-primary);
    filter: drop-shadow(0 0 8px var(--color-primary-glow));
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.logo-accent {
    color: var(--color-primary);
}

.sidebar-close {
    display: none; /* Shown on mobile */
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
}

/* ── Sidebar Navigation ── */
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li + li {
    margin-top: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 700;
    transition: all var(--transition);
    position: relative;
}

.nav-link i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-link.active {
    color: var(--color-primary);
    background: var(--color-primary-glow);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--color-primary);
    border-radius: 0 3px 3px 0;
}

/* ── Sidebar Footer ── */
.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border-color);
}

.admin-link {
    justify-content: flex-start;
}

.external-icon {
    width: 14px !important;
    height: 14px !important;
    margin-left: auto;
    opacity: 0.5;
}


/* ===========================================================
   MAIN CONTENT
   =========================================================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition);
}

/* ── Top Bar ── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 28px;
    height: var(--topbar-height);
    background: var(--bg-topbar);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.menu-toggle {
    display: none; /* Shown on mobile */
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
}

.menu-toggle i {
    width: 22px;
    height: 22px;
}

.page-title {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    background: var(--color-success-glow);
    color: var(--color-success);
    font-size: 0.8rem;
    font-weight: 600;
}

.topbar-badge i {
    width: 14px;
    height: 14px;
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Logout Button */
.btn-logout {
    background: transparent;
    border: 1px solid var(--color-danger);
    color: var(--color-danger);
    padding: 5px 14px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all var(--transition);
}

.btn-logout i {
    width: 14px;
    height: 14px;
}

.btn-logout:hover {
    background: var(--color-danger);
    color: white;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

/* ── Content Area ── */
.content-area {
    flex: 1;
    padding: 28px;
}


/* ===========================================================
   STAT CARDS
   =========================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px; /* Shadcn style */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.6s ease-in-out;
    pointer-events: none;
    z-index: 1;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.stat-card__icon i {
    width: 24px;
    height: 24px;
}

.stat-card--primary .stat-card__icon { background: var(--color-primary-glow); color: var(--color-primary); }
.stat-card--success .stat-card__icon { background: var(--color-success-glow); color: var(--color-success); }
.stat-card--danger  .stat-card__icon { background: var(--color-danger-glow);  color: var(--color-danger); }
.stat-card--info    .stat-card__icon { background: var(--color-info-glow);    color: var(--color-info); }

.stat-card__info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.stat-card__value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.stat-card__label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 2px;
}


/* ===========================================================
   DATA PANELS (Tables)
   =========================================================== */
.tables-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.data-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
}

.panel-title i {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
}

.panel-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-input);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

/* ── Table Styling ── */
.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.data-table thead th {
    text-align: left;
    padding: 12px 22px;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--border-color);
    border-radius: 0 !important;
}

.data-table tbody td {
    padding: 14px 22px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition);
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ── Sorting Styles ── */
.sortable-table th:not(.no-sort) {
    position: relative;
    user-select: none;
    padding-right: 24px !important;
    cursor: pointer;
}
.sortable-table th:not(.no-sort):hover {
    color: var(--text-primary);
    background: rgba(128, 128, 128, 0.1);
}
.sortable-table th:not(.no-sort)::before,
.sortable-table th:not(.no-sort)::after {
    content: '';
    position: absolute;
    right: 8px;
    border: 4px solid transparent;
    opacity: 0.3;
}
/* Up arrow */
.sortable-table th:not(.no-sort)::before {
    top: 50%;
    transform: translateY(-120%);
    border-bottom-color: var(--text-secondary);
}
/* Down arrow */
.sortable-table th:not(.no-sort)::after {
    top: 50%;
    transform: translateY(20%);
    border-top-color: var(--text-secondary);
}

.sortable-table th.sort-asc::before {
    border-bottom-color: var(--color-primary);
    opacity: 1;
}
.sortable-table th.sort-asc::after {
    opacity: 0.1;
}

.sortable-table th.sort-desc::before {
    opacity: 0.1;
}
.sortable-table th.sort-desc::after {
    border-top-color: var(--color-primary);
    opacity: 1;
}

/* ── Table Elements ── */
.data-table td button,
.data-table td .panel-badge {
    transition: all 0.2s ease;
}

/* Hover for Delete/Red buttons */
.data-table td button[style*="#ef4444"]:hover,
.data-table td .panel-badge[style*="#ef4444"]:hover {
    background: #ef4444 !important;
    color: white !important;
}

/* Hover for Remote/Blue buttons */
.data-table td .btn-remote:hover {
    background: var(--color-primary) !important;
    color: white !important;
    border-color: var(--color-primary) !important;
}

/* Hover for other action buttons (default subtle highlight) */
.data-table td button:not([style*="#ef4444"]):not(.btn-remote):hover,
.data-table td .panel-badge:not([style*="#ef4444"]):not(.btn-remote):hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.1)) !important;
}

.player-id {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.82rem;
    background: var(--bg-input);
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    color: var(--color-primary);
}

/* Status badges */
.btn {
    cursor: pointer;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.status-badge--online {
    background: var(--color-success-glow);
    color: var(--color-success);
}

.status-badge--offline {
    background: var(--color-danger-glow);
    color: var(--color-danger);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.status-badge--online .status-dot {
    background: var(--color-success);
    box-shadow: 0 0 6px var(--color-success);
    animation: pulse-dot 2s ease-in-out infinite;
}

.status-badge--offline .status-dot {
    background: var(--color-danger);
    opacity: 0.7;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 4px var(--color-success); }
    50%      { box-shadow: 0 0 12px var(--color-success); }
}

/* File link */
.file-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-primary);
    transition: color var(--transition);
}

.file-link:hover {
    color: #60a5fa;
    text-decoration: underline;
}

.file-link i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Player count badge */
.player-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--color-info-glow);
    color: var(--color-info);
    font-size: 0.78rem;
    font-weight: 600;
}

.player-count-badge i {
    width: 14px;
    height: 14px;
}

/* Muted text */
.text-muted {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px !important;
    color: var(--text-muted);
}

.empty-state i {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
    opacity: 0.4;
}

.empty-state p {
    margin-top: 6px;
    font-size: 0.9rem;
}

:root {
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.25s ease;
}

/* Light Theme Overrides */
:root.light-theme {
    --bg-body: #f8fafc;
    --bg-sidebar: #ffffff;
    --bg-panel: #ffffff;
    --bg-card: #ffffff;
    --bg-topbar: #ffffff;
    --bg-input: #f1f5f9;
    --bg-hover: #f1f5f9;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-subtle: rgba(0, 0, 0, 0.06);
}

:root.light-theme .data-table thead th {
    background: #e2e8f0;
    color: #1e293b;
    font-weight: 700;
}

/* ===========================================================
   ANIMATIONS
   =========================================================== */

/* Fade-in on load */
.stat-card,
.data-panel {
    animation: fadeSlideUp 0.5s ease-out both;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.10s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.20s; }

.data-panel:nth-child(1) { animation-delay: 0.25s; }
.data-panel:nth-child(2) { animation-delay: 0.30s; }

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ===========================================================
   RESPONSIVE
   =========================================================== */

/* Tablet */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
    }

    .sidebar-close {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .content-area {
        padding: 20px 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card__value {
        font-size: 1.4rem;
    }

    .topbar {
        padding: 0 16px;
    }

    .panel-header {
        padding: 14px 16px;
    }

    .data-table thead th,
    .data-table tbody td {
        padding: 10px 14px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Backdrop overlay for mobile sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ===========================================================
   MODALS & FORMS
   =========================================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.modal-container {
    background: var(--bg-card);
    width: 100%;
    max-width: 650px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
    position: relative;
}

.modal-backdrop.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-panel);
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
}

.btn-close:hover {
    background: var(--color-danger);
    color: white;
}

.modal-body {
    padding: 24px;
}

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

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.form-input, .form-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
}

.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' 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;
    padding-right: 36px;
    cursor: pointer;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.95rem;
    cursor: pointer;
}

.radio-help {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--bg-panel);
}

.btn {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-hover);
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
}

/* =========================================
   Tom Select Dark Theme Overrides
   ========================================= */
.ts-wrapper.form-select {
    padding: 0 !important;
    border: none !important;
    background: none !important;
    height: auto !important;
    min-height: 0 !important;
}
.ts-control {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    padding: 8px 36px 8px 12px !important;
    min-height: 42px;
    display: flex !important;
    align-items: center !important;
    position: relative;
}
.ts-wrapper.single .ts-control::after {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' 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: center;
    pointer-events: none;
}
.ts-control > input {
    color: var(--text-primary) !important;
    margin: 0 !important;
    padding: 0 !important;
    align-self: center !important;
}
.ts-dropdown {
    background: var(--bg-body) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
    z-index: 9999 !important;
}
.ts-dropdown .dropdown-input {
    border: 1px solid var(--border-color) !important;
    border-width: 0 0 1px 0 !important;
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
    padding: 8px 12px !important;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;
    width: 100% !important;
    font-family: inherit;
}
.ts-dropdown .dropdown-input:focus {
    outline: none;
    border-color: var(--color-primary) !important;
}
.ts-dropdown .option {
    padding: 8px 12px !important;
    cursor: pointer;
}
.ts-dropdown .option:hover, 
.ts-dropdown .option.active {
    background: var(--bg-hover) !important;
    color: var(--color-primary) !important;
}
.ts-dropdown .optgroup-header {
    background: var(--bg-card) !important;
    color: var(--text-muted) !important;
    font-weight: 700 !important;
    padding: 6px 12px !important;
    text-transform: uppercase;
    font-size: 0.75rem;
}

/* ====== TOAST NOTIFICATION ====== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    pointer-events: none;
}
.toast {
    position: relative;
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 16px 20px;
    padding-right: 40px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    overflow: hidden;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}
.toast.show {
    transform: translateX(0);
    opacity: 1;
}
.toast.hiding {
    transform: translateX(120%);
    opacity: 0;
}
.toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.toast-title {
    font-weight: 600;
    font-size: 0.95rem;
}
.toast-message {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.toast-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}
.toast-close:hover {
    background: var(--color-background);
    color: var(--color-text);
}
.toast-close svg {
    width: 16px;
    height: 16px;
}
.toast.info { border-left: 4px solid var(--color-primary); }
.toast.success { border-left: 4px solid var(--color-success); }
.toast.error { border-left: 4px solid var(--color-danger); }
.toast.warning { border-left: 4px solid var(--color-warning); }
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: var(--color-primary);
    width: 100%;
    animation: toast-timer 5s linear forwards;
}
.toast.success .toast-progress { background: var(--color-success); }
.toast.error .toast-progress { background: var(--color-danger); }
.toast.warning .toast-progress { background: var(--color-warning); }
@keyframes toast-timer {
    from { width: 100%; }
    to { width: 0%; }
}


