/* LibSoly SaaS Master Design System - Premium Light/Clear Theme */

:root {
    /* Color Palette - Elegant Bright Elements */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --accent-primary: #4f46e5;
    --accent-secondary: #6366f1;
    --accent-glow: rgba(79, 70, 229, 0.08);
    
    --card-bg: rgba(255, 255, 255, 0.75);
    --card-hover: rgba(255, 255, 255, 0.95);
    --border-color: rgba(15, 23, 42, 0.08);
    --border-focus: rgba(79, 70, 229, 0.4);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.08);
    --warning: #d97706;
    --warning-glow: rgba(217, 119, 6, 0.08);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.08);
    
    --sidebar-width: 260px;
    --navbar-height: 70px;
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    --transition-speed: 0.3s;
}

/* Base resets & scrollbars */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.03) 0px, transparent 40%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.02) 0px, transparent 40%);
    background-attachment: fixed;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Layout Grid */
.app-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    padding-top: calc(var(--navbar-height) + 2rem);
    min-width: 0;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transition: transform var(--transition-speed) ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    padding-left: 0.5rem;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex-grow: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.sidebar-link:hover, .sidebar-link.active {
    color: var(--accent-primary);
    background: var(--accent-glow);
}

.sidebar-link.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.sidebar-link.active:hover {
    color: white;
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
}

.sidebar-profile {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: auto;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profile-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.profile-details h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-details p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

/* Navbar */
.navbar {
    height: var(--navbar-height);
    background: rgba(248, 250, 252, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.navbar-tenant-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tenant-logo {
    height: 36px;
    max-width: 150px;
    object-fit: contain;
}

.tenant-name {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Dashboard Metrics & Layouts */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all var(--transition-speed) ease;
}

.metric-card:hover {
    border-color: var(--border-focus);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 800;
    margin-top: 0.25rem;
    color: var(--text-primary);
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
}

/* Glass Panels & Grid Layouts */
.grid-2x1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 900px) {
    .grid-2x1 {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
}

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

.panel-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all var(--transition-speed) ease;
}

.form-control:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: #ffffff;
    box-shadow: 0 0 8px var(--accent-glow);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}
.btn-primary:hover {
    box-shadow: 0 6px 15px var(--accent-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.06);
}

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.15);
}

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

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Tables & Lists */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

th {
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.02);
}

tr:hover td {
    background: rgba(0, 0, 0, 0.01);
}

.badge {
    display: inline-flex;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: #059669; }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.badge-info { background: var(--accent-glow); color: var(--accent-primary); }

/* Dev Demo Selector (Floating Panel) */
.dev-selector-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    width: 250px;
    transition: transform 0.3s ease, height 0.3s ease;
}

.dev-selector-header {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
    color: white;
}

.dev-selector-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dev-select-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: bold;
    margin-bottom: 0.25rem;
    display: block;
}

/* Modals & Dialog Box Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.1);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    color: var(--text-primary);
}

/* AI Chat Drawer styling */
.ai-chat-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.3s ease;
}

.ai-chat-btn:hover {
    transform: scale(1.05) rotate(5deg);
}

.ai-drawer {
    position: fixed;
    top: 0;
    left: -350px;
    width: 350px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease;
    box-shadow: 20px 0 40px rgba(0,0,0,0.06);
}

.ai-drawer.active {
    left: 0;
}

.ai-drawer-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(90deg, #10b981, #059669);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    color: white;
}

.ai-chat-messages {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ai-msg {
    max-width: 85%;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-md);
    font-size: 0.85rem;
    line-height: 1.4;
}

.ai-msg.bot {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    border: 1px solid var(--border-color);
}

.ai-msg.user {
    background: var(--success);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.ai-chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
    background: white;
}

/* Toast Notification styling */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 0.85rem 1.25rem;
    color: var(--text-primary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.06);
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-info { border-left: 4px solid var(--accent-primary); }

/* Circulation Barcode scan layout */
.scanner-viewport {
    width: 100%;
    height: 160px;
    background: #f1f5f9;
    border: 2px dashed var(--border-focus);
    border-radius: var(--border-radius-md);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.scanner-laser {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--danger);
    box-shadow: 0 0 12px var(--danger);
    animation: laserScan 2.5s infinite linear;
}

@keyframes laserScan {
    0% { top: 10%; }
    50% { top: 90%; }
    100% { top: 10%; }
}

/* OPAC Book Catalog Display Grid */
.book-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.book-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.book-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-focus);
    box-shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.06);
}

.book-card-cover {
    height: 170px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.book-card-cover img {
    height: 140px;
    width: 95px;
    object-fit: cover;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 4px;
}

.book-card-cover .book-card-nocover {
    height: 140px;
    width: 95px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.65rem;
    font-weight: bold;
    color: var(--text-secondary);
}

.book-card-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.book-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6rem;
}

.book-card-author {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-color);
}

/* Digital eBook Reading View Container */
.pdf-reader-container {
    width: 100%;
    height: calc(100vh - 220px);
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pdf-reader-toolbar {
    padding: 0.75rem 1rem;
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pdf-reader-viewport {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.pdf-page-mock {
    width: 100%;
    max-width: 650px;
    background: white;
    color: #334155;
    padding: 3rem 4rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border-radius: 4px;
    font-size: 1rem;
    line-height: 1.7;
    text-align: justify;
    border: 1px solid var(--border-color);
}

.pdf-page-mock h2 {
    margin-bottom: 1.5rem;
    color: #0f172a;
    font-size: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.pdf-page-mock p {
    margin-bottom: 1.25rem;
}

/* Razorpay simulated invoice styles */
.invoice-box {
    background: white;
    color: #334155;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.03);
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

.invoice-box table {
    width: 100%;
    text-align: left;
    border-spacing: 0;
}

.invoice-box th, .invoice-box td {
    color: #334155 !important;
    border-bottom: 1px solid #f1f5f9;
}

.invoice-box th {
    background: #f8fafc;
    font-weight: 700;
}

/* Print Stylesheet overrides */
@media print {
    /* Set page backgrounds and base style for all prints */
    body, html, .app-container, .main-content {
        background: none !important;
        background-color: #ffffff !important;
        color: #000000 !important;
    }
    
    /* Hide navigational elements on all printed pages */
    .sidebar, .navbar, .dev-selector-widget, .ai-chat-btn, .toast-container, .no-print, .no-print * {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
    }

    /* Target Mode: Print only the targeted card/label when has-print-target is on body */
    body.has-print-target * {
        visibility: hidden !important;
    }
    
    body.has-print-target .print-target, body.has-print-target .print-target * {
        visibility: visible !important;
    }
    
    body.has-print-target .print-target {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 100% !important;
        max-width: 480px !important;
        margin: 0 !important;
        box-shadow: none !important;
        border: 1px solid #000 !important;
        background: #ffffff !important;
        color: #000000 !important;
        border-radius: 12px !important;
        box-sizing: border-box !important;
    }
    
    body.has-print-target div[id^="barcode-label-"] {
        max-width: 260px !important;
        padding: 1rem !important;
        border: 1px dashed #000 !important;
    }
    
    body.has-print-target #printable-invoice.print-target {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        transform: none !important;
        max-width: 100% !important;
        border: none !important;
        padding: 0 !important;
    }
}

/* ==========================================
   WORLD-CLASS DYNAMIC BRANDING & THEMES OVERRIDES
   ========================================== */

/* Emerald Forest Theme */
body.theme-emerald {
    --accent-primary: #059669;
    --accent-secondary: #10b981;
    --accent-glow: rgba(5, 150, 105, 0.08);
    --border-focus: rgba(5, 150, 105, 0.4);
    background-image: 
        radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.04) 0px, transparent 40%),
        radial-gradient(at 100% 100%, rgba(245, 158, 11, 0.02) 0px, transparent 40%);
}

/* Rose Sunset Theme */
body.theme-rose {
    --accent-primary: #db2777;
    --accent-secondary: #f43f5e;
    --accent-glow: rgba(219, 39, 119, 0.08);
    --border-focus: rgba(219, 39, 119, 0.4);
    background-image: 
        radial-gradient(at 0% 0%, rgba(244, 63, 94, 0.04) 0px, transparent 40%),
        radial-gradient(at 100% 100%, rgba(251, 146, 60, 0.02) 0px, transparent 40%);
}

/* Midnight Dark Theme - World-Class Glassmorphic Dark Mode */
body.theme-dark {
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --card-bg: rgba(17, 24, 39, 0.7);
    --card-hover: rgba(17, 24, 39, 0.9);
    --border-color: rgba(255, 255, 255, 0.07);
    --border-focus: rgba(99, 102, 241, 0.5);
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0px, transparent 45%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.03) 0px, transparent 45%);
}

body.theme-dark .sidebar {
    background: rgba(17, 24, 39, 0.85);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-dark .navbar {
    background: rgba(17, 24, 39, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-dark .panel {
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

body.theme-dark table th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-dark table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.theme-dark table tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
    background: rgba(17, 24, 39, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

body.theme-dark input:focus,
body.theme-dark select:focus,
body.theme-dark textarea:focus {
    background: rgba(17, 24, 39, 0.8);
    border-color: var(--border-focus);
}

body.theme-dark .lock-card {
    background: rgba(17, 24, 39, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

body.theme-dark .ai-drawer {
    background: rgba(17, 24, 39, 0.95);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-dark .ai-chat-input-area {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(11, 15, 25, 0.9);
}

body.theme-dark .ai-msg.bot {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

body.theme-dark .dev-selector-widget {
    background: rgba(17, 24, 39, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-dark .dev-selector-body {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}


