/* style.css - LB Digital of Bharat Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #09090e;
    --bg-panel: rgba(20, 20, 35, 0.7);
    --bg-card: rgba(30, 30, 52, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(123, 44, 191, 0.3);
    
    --primary: #8a2be2;
    --primary-glow: rgba(138, 43, 226, 0.4);
    --secondary: #00f5d4;
    --secondary-glow: rgba(0, 245, 212, 0.3);
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-white: #ffffff;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --font-outfit: 'Outfit', sans-serif;
    --font-inter: 'Inter', sans-serif;
    
    --transition-speed: 0.3s;
    --border-radius: 16px;

    /* Dropdown Theme Variables */
    --select-bg: #131324;
    --select-color: #ffffff;
    --select-option-bg: #1e1e2e;
    --select-option-color: #ffffff;
    --select-selected-color: var(--secondary);
}

/* Light Theme Variables Toggle */
[data-theme="light"] {
    --bg-dark: #f8fafc;
    --bg-panel: rgba(255, 255, 255, 0.85);
    --bg-card: rgba(255, 255, 255, 0.95);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-glow: rgba(138, 43, 226, 0.15);
    
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-white: #0f172a;
    
    --bg-dark-rgb: 248, 250, 252;

    /* Dropdown Theme Variables */
    --select-bg: #ffffff;
    --select-color: #1e293b;
    --select-option-bg: #ffffff;
    --select-option-color: #1e293b;
    --select-selected-color: var(--primary);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-inter);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-outfit);
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

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

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform var(--transition-speed);
    overflow-y: auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.logo-icon {
    font-size: 28px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text {
    font-family: var(--font-outfit);
    font-weight: 800;
    font-size: 20px;
    background: linear-gradient(135deg, var(--text-white), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.menu-item a i {
    font-size: 18px;
}

.menu-item.active a, .menu-item a:hover {
    color: var(--text-white);
    background: rgba(138, 43, 226, 0.15);
    box-shadow: inset 0 0 0 1px var(--primary-glow);
}

.menu-item.active a {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.3), rgba(0, 245, 212, 0.05));
    border-left: 3px solid var(--secondary);
}

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: 16px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 12px;
    margin-bottom: 12px;
}

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

.profile-info {
    overflow: hidden;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-white);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.profile-role {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Main Content Styling */
.main-content {
    flex-grow: 1;
    margin-left: 260px;
    padding: 30px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Top Navbar Styling */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background-color: var(--bg-panel);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.page-title {
    font-size: 22px;
    font-family: var(--font-outfit);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 20px;
    transition: color 0.2s;
}

.theme-toggle:hover {
    color: var(--secondary);
}

/* Cards & Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.metric-card {
    background-color: var(--bg-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.metric-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-glow);
    box-shadow: 0 8px 30px rgba(138, 43, 226, 0.15);
}

.metric-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    font-family: var(--font-outfit);
    color: var(--text-white);
}

.metric-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(138, 43, 226, 0.1);
    color: var(--primary);
}

.metric-card:nth-child(2n) .metric-icon {
    background: rgba(0, 245, 212, 0.1);
    color: var(--secondary);
}

.metric-card:nth-child(3n) .metric-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.metric-card:nth-child(4n) .metric-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

/* Content Layout (Panel and Forms) */
.content-grid-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .content-grid-2 {
        grid-template-columns: 1fr;
    }
    .sidebar {
        transform: translateX(-100%);
    }
    .main-content {
        margin-left: 0;
    }
}

.panel-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.panel-title {
    font-size: 18px;
    font-family: var(--font-outfit);
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-title i {
    color: var(--secondary);
}

/* Forms & Inputs */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-white);
    font-size: 14px;
    font-family: var(--font-inter);
    outline: none;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Custom styled select and options to guarantee selected choice stands out clearly */
select.form-control, select {
    background-color: var(--select-bg) !important;
    color: var(--select-selected-color) !important;
    border: 1px solid var(--border-color) !important;
    font-weight: 600;
}
select.form-control option, select option {
    background-color: var(--select-option-bg) !important;
    color: var(--select-option-color) !important;
    font-weight: 500;
}
select.form-control option[value=""], select option[value=""] {
    color: var(--text-muted) !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

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

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #00bbf9);
    color: #0b0c10;
}
.btn-secondary:hover {
    box-shadow: 0 4px 15px var(--secondary-glow);
    transform: translateY(-1px);
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

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

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

.custom-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.custom-table th, .custom-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.custom-table th {
    font-family: var(--font-outfit);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
}

.custom-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.custom-table td {
    font-size: 14px;
    color: var(--text-main);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

/* Alerts */
.alert {
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid transparent;
    margin-bottom: 10px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-left-color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-left-color: var(--danger);
}

.close-btn {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    position: relative;
}

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

.modal-title {
    font-size: 18px;
}

/* Login Page Glassmorphism */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(circle at 10% 20%, rgba(90, 24, 154, 0.2) 0%, rgba(9, 9, 14, 0.95) 80%);
}

.login-card {
    background: rgba(20, 20, 35, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    transition: border-color 0.3s;
}

.login-card:hover {
    border-color: var(--primary-glow);
}

.login-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

/* Billing Screen Special Layout */
.billing-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 992px) {
    .billing-layout {
        grid-template-columns: 1fr;
    }
}

.billing-main {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.billing-side {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: fit-content;
}

.search-results-box {
    position: relative;
}

.results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

.results-dropdown div {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    font-size: 13px;
    display: flex;
    justify-content: space-between;
}

.results-dropdown div:hover {
    background: var(--primary-glow);
}

/* Print Specific styles */
@media print {
    body * {
        visibility: hidden;
    }
    .print-area, .print-area * {
        visibility: visible;
    }
    .print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        color: black !important;
        background: white !important;
    }
    /* Hide scrollbars, borders in print */
    .print-area * {
        border-color: #ccc !important;
        box-shadow: none !important;
    }
}

/* Fade-in Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Camera scan box styling */
#reader {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color) !important;
    background: #000;
}
#reader__scan_region {
    background: #000;
}
#reader__dashboard_section_csr button {
    background: var(--primary) !important;
    color: white !important;
    border: none !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    margin: 4px !important;
}

/* Top Stats list style */
.stats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.stats-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    font-size: 13px;
}
.stats-item span:first-child {
    color: var(--text-muted);
}
.stats-item span:last-child {
    font-weight: 600;
    color: var(--text-white);
}

.qr-chip {
    font-family: monospace;
    font-size: 10px;
    background: rgba(138, 43, 226, 0.1) !important;
    border: 1px solid rgba(138, 43, 226, 0.25) !important;
    border-radius: 5px;
    padding: 3px 8px;
    cursor: pointer;
    color: var(--primary) !important;
    transition: all 0.15s;
    display: inline-block;
}
.qr-chip:hover {
    background: var(--primary) !important;
    color: white !important;
}

/* Quick Action Shortcuts Styles */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.shortcut-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.shortcut-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-glow);
    background: rgba(138, 43, 226, 0.05);
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.15);
}

.shortcut-card i {
    font-size: 26px;
    transition: transform 0.3s ease;
}

.shortcut-card:hover i {
    transform: scale(1.15);
}

.shortcut-card span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-white);
    font-family: var(--font-outfit);
    text-align: center;
}

