:root {
    /* Colors — matching landing page palette */
    --bg-sidebar: #111113;
    --bg-sidebar-hover: #1c1c1f;
    --bg-sidebar-active: #a3e635;
    --text-sidebar: #a1a1aa;
    --text-sidebar-active: #000000;

    --bg-main: #0e0e10;
    --bg-card: #18181b;

    --text-primary: #ffffff;
    --text-secondary: #71717a;

    --primary-color: #a3e635;
    --primary-hover: #bef264;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --border-color: #27272a;

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 80px;
    --border-radius: 12px;
    --transition: all 0.2s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Utility: hide any element */
.hidden {
    display: none !important;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    color: var(--text-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.logo-text {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.sidebar-nav {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 24px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-sidebar);
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-item:hover {
    background-color: var(--bg-sidebar-hover);
    color: var(--text-sidebar-active);
}

.nav-item.active {
    background-color: var(--bg-sidebar-active);
    color: #111827 !important;
    font-weight: 700;
    border-left: 3px solid #111827;
    padding-left: 13px; /* compensate for border */
}

/* Force all child elements inside active nav items to inherit dark text */
.nav-item.active span,
.nav-item.active i,
.nav-item.active svg {
    color: #111827 !important;
    stroke: #111827 !important;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

/* Header */
.top-header {
    height: var(--header-height);
    background-color: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #18181b;
    padding: 10px 16px;
    border-radius: 20px;
    width: 300px;
    border: 1px solid var(--border-color);
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    width: 100%;
}

.search-bar i {
    color: var(--text-secondary);
    width: 18px;
    height: 18px;
}

.search-bar input {
    border: none;
    outline: none;
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.avatar {
    width: 40px;
    height: 40px;
    background-color: #cbd5e1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info .welcome {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.user-info .name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.dropdown-icon {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

/* Page Content */
.page-content {
    padding: 32px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.2);
    border: 1px solid var(--border-color);
}

/* Forms */
.form-section {
    margin-bottom: 32px;
}

.form-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group select {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
    background: #27272a;
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(163, 230, 53, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #000000;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: #27272a;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #3f3f46;
}

.btn-danger {
    background-color: #ef4444;
    color: #ffffff;
    border: none;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Consistent delete icon button - 32px square, red background */
.btn-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    background-color: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.btn-delete:hover {
    background-color: #dc2626;
}

.btn-delete i,
.btn-delete svg {
    width: 16px !important;
    height: 16px !important;
    pointer-events: none;
    display: block;
    flex-shrink: 0;
}

.btn-block {
    width: 100%;
}

/* Line Items */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.section-header h3 {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.line-item-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    align-items: center;
    background: #1c1c1f;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.desc-col {
    flex: 3;
}

.qty-col {
    flex: 1;
}

.price-col {
    flex: 1;
}

.action-col {
    width: 40px;
    display: flex;
    justify-content: center;
}

/* Summary Card */
.summary-card {
    position: sticky;
    top: calc(var(--header-height) + 32px);
    height: max-content;
}

.summary-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.summary-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.total-row {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 4px;
}

.instruction-box {
    margin-top: 24px;
    padding: 16px;
    background-color: rgba(163, 230, 53, 0.08);
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    display: flex;
    gap: 12px;
}

.instruction-box i {
    color: var(--primary-color);
    flex-shrink: 0;
}

.instruction-box p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Dashboard KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.kpi-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.02);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.kpi-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background-color: #eff6ff;
    color: #3b82f6;
}

.kpi-icon.success {
    background-color: #f0fdf4;
    color: #22c55e;
}

.kpi-icon.warning {
    background-color: #fffbeb;
    color: #f59e0b;
}

.kpi-icon i {
    width: 24px;
    height: 24px;
}

.kpi-details {
    display: flex;
    flex-direction: column;
}

.kpi-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 4px;
}

/* Dashboard Table */
.table-card {
    padding: 0;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background-color: #fafafb;
}

.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 16px 24px;
    text-align: left;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    background-color: var(--bg-card);
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background-color: #f8fafc;
    color: #141413;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.sent {
    background-color: #eff6ff;
    color: #3b82f6;
}

.status-badge.paid {
    background-color: #f0fdf4;
    color: #22c55e;
}

.status-badge.pending {
    background-color: #fffbeb;
    color: #f59e0b;
}

/* Sidebar Submenu */
.nav-item.has-submenu {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
}

.nav-item.has-submenu:hover {
    background-color: transparent;
}

.nav-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
    color: var(--text-sidebar);
    font-weight: 500;
}

.nav-item-header:hover {
    background-color: var(--bg-sidebar-hover);
    color: var(--text-sidebar-active);
}

.submenu-icon {
    margin-left: auto;
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.nav-item.has-submenu.open .submenu-icon {
    transform: rotate(180deg);
}

.nav-item.has-submenu .submenu {
    display: none;
    flex-direction: column;
    padding-left: 40px;
    margin-top: 4px;
    padding-bottom: 8px;
}

.nav-item.has-submenu.open .submenu {
    display: flex;
}

.submenu-item {
    padding: 8px 0 8px 12px;
    color: var(--text-sidebar);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    border-left: 1px solid var(--text-sidebar);
    margin-left: -12px;
}

.submenu-item:hover {
    color: var(--text-sidebar-active);
    border-left-color: var(--text-sidebar-active);
}

.submenu-item.active {
    color: var(--primary-color);
    font-weight: 600;
    border-left-color: var(--text-sidebar-active);
}

/* =========================================================
   Auth / Wcrypt Landing Page Styles
   ========================================================= */

.wcrypt-landing {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    background-color: #050505;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow-x: hidden;
}

/* Subtle background glow effects */
.glow-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle, rgba(163, 230, 53, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 64px;
    z-index: 10;
    position: relative;
}

.landing-logo {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.landing-nav {
    display: flex;
    gap: 32px;
}

.landing-nav a {
    color: #a1a1aa;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.landing-nav a:hover,
.landing-nav a.active {
    color: #ffffff;
}

.landing-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-text {
    background: transparent;
    border: none;
    color: #ffffff;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 8px 16px;
}

.btn-text:hover {
    color: #d4d4d8;
}

.btn-pill {
    background-color: #a3e635;
    /* Neon green accent */
    color: #000000;
    border: none;
    border-radius: 9999px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-pill:hover {
    background-color: #bef264;
    transform: translateY(-1px);
}

.large-pill {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.hero-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 10;
    position: relative;
    padding: 60px 24px;
    margin-top: 40px;
}

.hero-subtitle {
    color: #a3e635;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 24px;
}

.hero-tagline {
    font-size: 1.1rem;
    color: #a1a1aa;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-dashboard-mockup {
    margin: 0 auto 40px auto;
    width: 80%;
    max-width: 1000px;
    background: #18181b;
    /* Dark grey container */
    border: 1px solid #27272a;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    z-index: 10;
    position: relative;
    box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.mockup-header-bar {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #27272a;
    background: #111113;
}

.mockup-logo {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    width: 25%;
}

.mockup-tabs {
    flex: 1;
    display: flex;
    gap: 24px;
    justify-content: center;
    font-size: 0.9rem;
    color: #71717a;
}

.mockup-tabs span {
    cursor: default;
}

.mockup-tabs span.active {
    color: #a3e635;
}

.mockup-btn {
    background-color: #a3e635;
    color: #000000;
    border: none;
    border-radius: 9999px;
    padding: 6px 16px;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Modal Overlay Data */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-container {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 440px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: #a1a1aa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
}

.close-btn:hover {
    color: #ffffff;
    background: #27272a;
}

.auth-card h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
}

.auth-card label {
    color: #d4d4d8;
}

.auth-card input {
    background: #27272a;
    border: 1px solid #3f3f46;
    color: #ffffff;
}

.auth-card input:focus {
    border-color: #a3e635;
    outline: none;
}

/* Dashboard Panels */
.btn-panel {
    background-color: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-panel.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: transparent;
}

.btn-panel:hover {
    color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.05);
}

/* ============================================================ */
/* Invoice Analyser / Calculator                                */
/* ============================================================ */

.calc-drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    transition: border-color 0.2s, background-color 0.2s;
    cursor: pointer;
}

.calc-drop-zone.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(163, 230, 53, 0.05);
}

.calc-drop-zone:hover {
    border-color: rgba(163, 230, 53, 0.5);
}

/* Toggle Switch */
.calc-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.calc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.calc-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--border-color);
    border-radius: 26px;
    transition: 0.3s;
}

.calc-toggle-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.calc-toggle input:checked + .calc-toggle-slider {
    background-color: var(--primary-color);
}

.calc-toggle input:checked + .calc-toggle-slider:before {
    transform: translateX(22px);
}

/* Service Bar Chart */
.calc-service-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calc-service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calc-service-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
}

.calc-service-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.calc-service-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.calc-bar-track {
    background: var(--bg-sidebar);
    border-radius: 100px;
    height: 10px;
    overflow: hidden;
}

.calc-bar-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 0.6s ease;
}

/* Category Colour Palette */
.cat-color-web-design    { background: #3b82f6; }
.cat-color-web-hosting   { background: #a3e635; }
.cat-color-marketing     { background: #f59e0b; }
.cat-color-social-media  { background: #ec4899; }
.cat-color-other         { background: #6b7280; }

/* File list item */
.calc-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-sidebar);
    border-radius: 8px;
    font-size: 0.875rem;
}

.calc-file-item .file-icon {
    color: var(--primary-color);
}

/* ============================================================ */
/* Modal Overlay — Full Viewport Centered (fixes sidebar overlap) */
/* ============================================================ */

.modal-overlay-full {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* ============================================================ */
/* Light Theme Override                                          */
/* ============================================================ */

body.light-theme {
    /* User specified exact variables */
    --primary-green: #84cc16;
    --primary-green-dark: #65a30d;
    --text-dark: #111827;
    --bg-light: #ffffff;
    --card-light: #f9fafb;

    /* Variable Mapping */
    --primary-color: var(--primary-green);
    --primary-hover: var(--primary-green-dark);
    --bg-main: var(--bg-light);
    --bg-card: var(--card-light);
    --bg-sidebar: var(--card-light);
    --bg-sidebar-hover: #f3f4f6;
    --bg-sidebar-active: var(--primary-green);
    --text-sidebar: var(--text-dark);
    --text-sidebar-active: var(--text-dark);
    --text-primary: var(--text-dark);
    --text-secondary: var(--text-dark); /* Prevent washed out grays */
    --border-color: #e5e7eb;
    
    color: var(--text-dark);
}

/* Force body elements to use strict dark text to avoid gray wash */
body.light-theme p, 
body.light-theme span, 
body.light-theme label, 
body.light-theme div {
    color: var(--text-dark);
}

/* IMPORTANT: Force hero section text to ALWAYS be white — must not inherit light-mode overrides */
.hero-section,
.hero-section *,
.hero-section h1,
.hero-section p,
.hero-section div,
.hero-section span {
    color: #ffffff !important;
}

body.light-theme .sidebar { border-right: 1px solid var(--border-color); }
body.light-theme input,
body.light-theme select,
body.light-theme textarea { background: var(--bg-light); color: var(--text-dark); border-color: #d1d5db; }

/* Force light format on data tables */
body.light-theme .data-table thead tr { background: #f3f4f6; color: var(--text-dark); }
body.light-theme .data-table tbody tr:hover { background: var(--bg-light); color: #141413; }
body.light-theme .top-header { background: var(--bg-light); border-bottom: 1px solid var(--border-color); }
body.light-theme .calc-drop-zone { border-color: #cbd5e1; background: var(--bg-light); }
body.light-theme .wcrypt-landing { display: none; }

/* Force cards with hardcoded inline dark styles to become light mode compliant */
body.light-theme .card,
body.light-theme .auth-card {
    background: var(--card-light) !important;
    color: var(--text-dark) !important;
}

/* Light Mode Button & Element Overrides - High Contrast */
body.light-theme .btn-primary,
body.light-theme .btn-pill { 
    background-color: var(--primary-green); 
    color: var(--text-dark) !important; /* Button text MUST be dark! */ 
    font-weight: 600; 
}
body.light-theme .btn-primary:hover,
body.light-theme .btn-pill:hover { 
    background-color: var(--primary-green-dark); 
}
body.light-theme .btn-secondary { background-color: var(--bg-light); color: var(--text-dark); border-color: #d1d5db; }
body.light-theme .btn-secondary:hover { background-color: #f3f4f6; }

/* Line Items Spacing and Borders (No shadow) */
body.light-theme .line-item-row { 
    background: var(--bg-light); 
    border: 1px solid var(--border-color) !important; 
    box-shadow: none !important; 
    margin-bottom: 24px;
    padding: 16px; 
    border-radius: 8px;
}
body.light-theme .form-row {
    margin-bottom: 16px; /* spacing between generic rows */
}

body.light-theme .calc-file-item { background: #f3f4f6; }

/* FIX 2: Light mode overrides for pre-login modal forms */
/* The landing page hides in light mode, but auth modals remain visible */
body.light-theme .modal-overlay .modal-container,
body.light-theme .modal-overlay-full .auth-modal {
    background: #ffffff !important;
    color: #111827 !important;
    border-radius: 16px !important;
}
body.light-theme .modal-overlay .auth-card h2,
body.light-theme .modal-overlay-full h2 { color: #111827 !important; }
body.light-theme .modal-overlay .auth-card p,
body.light-theme .modal-overlay-full p { color: #374151 !important; }
body.light-theme .modal-overlay label,
body.light-theme .modal-overlay-full label { color: #374151 !important; }
body.light-theme .modal-overlay input::placeholder,
body.light-theme .modal-overlay-full input::placeholder { color: #9ca3af !important; }
body.light-theme #quick-login-section { border-top-color: #e5e7eb !important; }
body.light-theme #quick-login-section p { color: #374151 !important; }

/* FIX 3: Welcome message styling */
.welcome-message {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 6px;
    margin-bottom: 20px;
    font-weight: 400;
    letter-spacing: 0.01em;
}

body.light-theme .welcome-message {
    color: #6b7280;
}

/* ============================================================ */
/* Two Column Responsive Grid                                    */
/* ============================================================ */

.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .two-col-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================ */
/* Settings Page                                                 */
/* ============================================================ */

.settings-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 700px) {
    .settings-layout { grid-template-columns: 1fr; }
}

.settings-subnav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 8px;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.settings-nav-item i { width: 16px; height: 16px; }

.settings-nav-item:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-primary);
}

.settings-nav-item.active {
    background: var(--bg-sidebar-hover);
    color: var(--primary-color);
}

.settings-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.settings-card {
    padding: 20px 24px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.settings-label {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.settings-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.badge-coming-soon {
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(163, 230, 53, 0.12);
    color: var(--primary-color);
    border: 1px solid rgba(163, 230, 53, 0.25);
    border-radius: 100px;
    padding: 4px 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================================ */
/* Analytics KPI Cards                                           */
/* ============================================================ */

.analytics-kpi-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.analytics-kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.analytics-kpi-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 500;
}

.analytics-kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

/* FIX 1: Service Dropdown Hover Visibility Option A */
select[data-field="serviceId"] option,
select#service-group option {
    background-color: var(--bg-card);
    color: var(--text-primary);
}
select[data-field="serviceId"] option:checked,
select[data-field="serviceId"] option:hover,
select[data-field="serviceId"] option:focus,
select#service-group option:checked,
select#service-group option:hover,
select#service-group option:focus {
    background-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

/* FIX 2: Force Landing Page text and buttons to always be white */
.wcrypt-landing .landing-logo span,
.wcrypt-landing .landing-logo i,
.wcrypt-landing .landing-logo svg,
.wcrypt-landing #btn-show-login {
    color: #ffffff !important;
}

/* Period dropdown — dark theme to match ProgressOS */
#income-filter {
    appearance: none;
    -webkit-appearance: none;
    background-color: #27272a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2.5' 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 10px center;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 32px 8px 12px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}
#income-filter:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(163, 230, 53, 0.15);
}
#income-filter option {
    background: #18181b;
    color: var(--text-primary);
}

/* Delete modal fade-in */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}
#delete-invoice-modal > div {
    animation: fadeIn 0.15s ease;
}