/* ==========================================================================
   Novaa Prime — Modern Animated Glass UI (Light Mode) Design System
   Frosted Glassmorphism with Ethereal Ambient Accents
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Palette: Luminous Light Glass */
    --bg-light: #f8fafc;
    --bg-surface: rgba(255, 255, 255, 0.82);
    --bg-surface-elevated: rgba(255, 255, 255, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.72);
    --bg-glass-hover: rgba(241, 245, 249, 0.85);
    --bg-glass-modal: rgba(255, 255, 255, 0.97);

    /* Glass Borders */
    --border-glass: rgba(226, 232, 240, 0.85);
    --border-glass-glow: rgba(99, 102, 241, 0.35);
    --border-glass-cyan: rgba(6, 182, 212, 0.35);

    /* Primary & Accent Tones (Vibrant Indigo & Sky) */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-glow: rgba(79, 70, 229, 0.25);
    --accent-cyan: #0284c7;
    --accent-purple: #7c3aed;
    --accent-emerald: #059669;
    --accent-amber: #d97706;
    --accent-rose: #e11d48;

    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #7c3aed 100%);
    --gradient-cyan: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    --gradient-emerald: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --gradient-gold: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    --gradient-card-glow: radial-gradient(circle at top right, rgba(99, 102, 241, 0.08), transparent 70%);

    /* Typography Colors (High Contrast, Crisp) */
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dim: #94a3b8;

    /* Shadows & Glows */
    --shadow-glass: 0 10px 30px -5px rgba(15, 23, 42, 0.06), 0 2px 8px -2px rgba(15, 23, 42, 0.04);
    --shadow-glow-primary: 0 8px 25px rgba(79, 70, 229, 0.25);
    --shadow-glow-cyan: 0 8px 25px rgba(2, 132, 199, 0.25);

    /* Radius & Blurs */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --blur-glass: 20px;
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Custom Light Glass Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.6);
    border-radius: 999px;
    border: 2px solid #f1f5f9;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.85);
}
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.6) #f1f5f9;
}

/* Hide number input spinners that deform small table inputs */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}

body {
    background-color: var(--bg-light);
    background-image: 
        radial-gradient(at 0% 0%, rgba(238, 242, 255, 0.8) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(224, 242, 254, 0.7) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(250, 232, 255, 0.5) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(241, 245, 249, 0.8) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}
a:hover {
    color: var(--primary-hover);
}

/* Animated Ambient Pastel Glass Orbs */
.cyber-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
    animation: floatOrb 20s ease-in-out infinite alternate;
}
.cyber-orb-1 {
    top: -120px;
    left: 15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
}
.cyber-orb-2 {
    bottom: -150px;
    right: 12%;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.10) 0%, transparent 70%);
    animation-delay: -10s;
}

@keyframes floatOrb {
    0% { transform: translateY(0) translateX(0) scale(1); }
    50% { transform: translateY(40px) translateX(-30px) scale(1.05); }
    100% { transform: translateY(-30px) translateX(30px) scale(0.96); }
}

/* Layout Structure */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Glass Sidebar */
.app-sidebar {
    width: 270px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(var(--blur-glass));
    -webkit-backdrop-filter: blur(var(--blur-glass));
    border-right: 1px solid var(--border-glass);
    box-shadow: 2px 0 20px rgba(15, 23, 42, 0.03);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition-smooth);
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-glass);
}

.brand-badge {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow-primary);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 20px;
}

.brand-info h1 {
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-tag {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(99, 102, 241, 0.25);
    letter-spacing: 0.05em;
}

.brand-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    padding: 14px 12px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    transition: var(--transition-smooth);
}

.nav-item:hover {
    color: var(--text-main);
    background: rgba(241, 245, 249, 0.85);
    border-color: rgba(226, 232, 240, 0.8);
    transform: translateX(3px);
}

.nav-item.active {
    color: #4338ca;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-color: rgba(99, 102, 241, 0.28);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.1);
    font-weight: 600;
}

.nav-item.active svg {
    color: #4f46e5;
    filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.3));
}

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

.user-profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid var(--border-glass);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow-cyan);
}

.user-meta {
    flex: 1;
    overflow: hidden;
}

.user-meta-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-meta-role {
    font-size: 11px;
    color: #4f46e5;
    font-weight: 500;
}

.logout-btn {
    color: var(--text-dim);
    transition: var(--transition-smooth);
    padding: 6px;
    border-radius: 6px;
}
.logout-btn:hover {
    color: var(--accent-rose);
    background: rgba(244, 63, 94, 0.1);
}

/* Main Content Area */
.app-main {
    flex: 1;
    margin-left: 270px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Glass Topbar */
.app-topbar {
    height: 72px;
    padding: 0 32px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(var(--blur-glass));
    -webkit-backdrop-filter: blur(var(--blur-glass));
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.02);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
}

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

/* Main Page Container */
.page-container {
    padding: 28px 32px 100px;
    flex: 1;
}

/* Glass Panels & Cards */
.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(var(--blur-glass));
    -webkit-backdrop-filter: blur(var(--blur-glass));
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
}

/* Animated Floating Action Button (FAB) */
.fab-create-invoice {
    position: fixed;
    bottom: 30px;
    right: 32px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 999px;
    background: var(--gradient-primary);
    color: #fff !important;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.35), 0 2px 6px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition-smooth);
    animation: fabPulse 3s ease-in-out infinite;
    text-decoration: none;
}

.fab-create-invoice:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 16px 35px rgba(79, 70, 229, 0.5);
}

@keyframes fabPulse {
    0%, 100% {
        box-shadow: 0 10px 25px rgba(79, 70, 229, 0.35), 0 2px 6px rgba(0, 0, 0, 0.06);
    }
    50% {
        box-shadow: 0 14px 32px rgba(79, 70, 229, 0.5), 0 4px 10px rgba(0, 0, 0, 0.1);
    }
}

.fab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

/* Stat KPI Cards (Dashboard) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    padding: 22px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(var(--blur-glass));
    border: 1px solid rgba(226, 232, 240, 0.9);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-glass);
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.12);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-primary { background: rgba(99, 102, 241, 0.12); color: #4f46e5; }
.stat-icon-cyan    { background: rgba(2, 132, 199, 0.12);  color: #0284c7; }
.stat-icon-emerald { background: rgba(5, 150, 105, 0.12);  color: #059669; }
.stat-icon-amber   { background: rgba(217, 119, 6, 0.12);  color: #d97706; }
.stat-icon-purple  { background: rgba(124, 58, 237, 0.12); color: #7c3aed; }

.stat-value {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.stat-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.stat-pill {
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 11px;
}
.stat-pill-success { background: rgba(5, 150, 105, 0.12); color: #047857; }
.stat-pill-danger  { background: rgba(225, 29, 72, 0.12); color: #be123c; }

/* GST Metric Breakdown Box */
.gst-breakdown-box {
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.gst-sub-item {
    text-align: center;
    border-right: 1px solid var(--border-glass);
}
.gst-sub-item:last-child {
    border-right: none;
}
.gst-sub-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.gst-sub-val {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
}

/* UI Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    text-decoration: none;
    outline: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.28);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(79, 70, 229, 0.45);
    color: #fff;
}

.btn-cyan {
    background: var(--gradient-cyan);
    color: #fff;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.25);
}
.btn-cyan:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
    color: #fff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    border-color: #cbd5e1;
    color: var(--text-main);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.btn-danger {
    background: rgba(225, 29, 72, 0.1);
    color: #be123c;
    border-color: rgba(225, 29, 72, 0.25);
}
.btn-danger:hover {
    background: rgba(225, 29, 72, 0.2);
    color: #9f1239;
}

.btn-success {
    background: rgba(5, 150, 105, 0.1);
    color: #047857;
    border-color: rgba(5, 150, 105, 0.25);
}
.btn-success:hover {
    background: rgba(5, 150, 105, 0.2);
    color: #065f46;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-icon-only {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 10px;
}

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

.glass-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

.glass-table th {
    background: rgba(241, 245, 249, 0.95);
    padding: 14px 18px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
}

.glass-table td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    color: var(--text-main);
    vertical-align: middle;
    transition: var(--transition-smooth);
}

.glass-table tbody tr {
    transition: var(--transition-smooth);
}

.glass-table tbody tr:hover {
    background: rgba(241, 245, 249, 0.75);
}

/* Status Chips / Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-paid {
    background: rgba(5, 150, 105, 0.12);
    color: #047857;
    border: 1px solid rgba(5, 150, 105, 0.28);
}

.badge-partial {
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
    border: 1px solid rgba(217, 119, 6, 0.28);
}

.badge-unpaid {
    background: rgba(225, 29, 72, 0.12);
    color: #be123c;
    border: 1px solid rgba(225, 29, 72, 0.28);
}

.badge-cancelled {
    background: rgba(148, 163, 184, 0.15);
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.form-control, .form-select {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 13px;
    transition: var(--transition-smooth);
    outline: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    background: #ffffff;
}

.form-control::placeholder {
    color: var(--text-dim);
}

.form-select option {
    background: #ffffff;
    color: #0f172a;
}

/* Form Row Layouts */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* Filter Bar */
.filter-bar {
    padding: 18px 22px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(var(--blur-glass));
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-glass);
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.search-input-wrap {
    position: relative;
    min-width: 260px;
}

.search-input-wrap input {
    padding-left: 38px;
}

.search-input-wrap svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 20px;
}

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

.modal-content {
    background: var(--bg-glass-modal);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.22);
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(15px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

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

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

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.modal-body {
    padding: 28px;
}

.modal-footer {
    padding: 18px 28px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-smooth);
}
.modal-close-btn:hover {
    color: var(--text-main);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 24px;
    right: 28px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    color: var(--text-main);
    min-width: 320px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    animation: slideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-success { border-left: 4px solid var(--accent-emerald); }
.toast-error   { border-left: 4px solid var(--accent-rose); }
.toast-info    { border-left: 4px solid var(--accent-cyan); }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Interactive Switch / Toggles */
.switch-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.switch-input {
    display: none;
}

.switch-track {
    width: 46px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 999px;
    position: relative;
    transition: var(--transition-smooth);
}

.switch-thumb {
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
}

.switch-input:checked + .switch-track {
    background: var(--gradient-primary);
}

.switch-input:checked + .switch-track .switch-thumb {
    transform: translateX(22px);
}

/* Table-Specific Input Fields (Spacious, Legible, High-Contrast) */
.invoice-items-grid-table {
    min-width: 880px;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.invoice-items-grid-table th {
    padding: 12px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: rgba(241, 245, 249, 0.95);
    border-bottom: 1px solid var(--border-glass);
}

.invoice-items-grid-table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    vertical-align: middle;
}

.invoice-items-grid-table .col-desc  { min-width: 240px; }
.invoice-items-grid-table .col-hsn   { width: 95px; min-width: 95px; }
.invoice-items-grid-table .col-qty   { width: 85px; min-width: 85px; }
.invoice-items-grid-table .col-unit  { width: 75px; min-width: 75px; }
.invoice-items-grid-table .col-rate  { width: 130px; min-width: 130px; }
.invoice-items-grid-table .col-tax   { width: 95px; min-width: 95px; }
.invoice-items-grid-table .col-total { width: 130px; min-width: 130px; }
.invoice-items-grid-table .col-del   { width: 44px; min-width: 44px; text-align: center; }

.table-input {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 8px 10px !important;
    height: 38px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: var(--transition-smooth);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.table-input:focus {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2) !important;
    background: #ffffff !important;
    outline: none;
}

.table-input::placeholder {
    color: #94a3b8 !important;
    font-weight: normal;
}

/* Sidebar Toggle for Mobile */
#sidebar-toggle {
    display: none;
}

.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 95;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

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

/* Create Invoice Grid Layout */
.create-invoice-layout {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 24px;
    align-items: start;
}

/* Responsive Breakpoints & Mobile Polish */
@media (max-width: 1024px) {
    #sidebar-toggle {
        display: inline-flex !important;
    }
    .app-sidebar {
        transform: translateX(-100%);
        box-shadow: 0 0 40px rgba(15, 23, 42, 0.15);
    }
    .app-sidebar.open {
        transform: translateX(0);
    }
    .app-main {
        margin-left: 0;
    }
    .create-invoice-layout {
        grid-template-columns: 1fr;
    }
    .gst-breakdown-box {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .app-topbar {
        padding: 0 16px;
        height: 64px;
    }
    .page-title {
        font-size: 17px;
    }
    .page-container {
        padding: 16px 14px 90px;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .filter-bar {
        padding: 14px;
    }
    .search-input-wrap {
        min-width: 100%;
        width: 100%;
    }
    .filter-bar select, .filter-bar input[type=date] {
        width: 100% !important;
    }
    .gst-breakdown-box {
        grid-template-columns: 1fr;
    }
    .stat-value {
        font-size: 24px;
    }
    .fab-create-invoice {
        bottom: 18px;
        right: 18px;
        padding: 12px 18px;
        font-size: 13px;
    }
}
