/* Option 2: Futuristic Glassmorphism Neon Orange Theme */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #08090e;
    --bg-card: rgba(18, 20, 32, 0.75);
    --bg-card-hover: rgba(26, 29, 45, 0.85);
    --border-neon: rgba(255, 107, 0, 0.35);
    --border-neon-strong: rgba(255, 107, 0, 0.7);
    --neon-orange: #ff6b00;
    --neon-orange-bright: #ff8500;
    --neon-orange-light: rgba(255, 107, 0, 0.15);
    --neon-orange-glow: 0 0 20px rgba(255, 107, 0, 0.5);
    --neon-orange-subtle-glow: 0 0 12px rgba(255, 107, 0, 0.25);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background: radial-gradient(circle at 50% 0%, #1c0f05 0%, #08090e 70%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.5;
    padding: 24px 16px;
    min-height: 100vh;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header Glassmorphism */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(20, 15, 25, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-neon);
    box-shadow: 0 8px 32px rgba(255, 107, 0, 0.18), inset 0 0 15px rgba(255, 107, 0, 0.08);
    color: #ffffff;
    padding: 24px 32px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.logo-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8500 100%);
    box-shadow: 0 0 25px rgba(255, 107, 0, 0.7);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #ffffff;
}

.app-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 2px;
    letter-spacing: -0.01em;
    background: linear-gradient(90deg, #ffffff 0%, #ffc099 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-header .subtitle {
    font-size: 0.875rem;
    color: #ffb380;
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Date Info Banner */
.today-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 107, 0, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 0, 0.3);
    color: #ff9e59;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 0.95rem;
    box-shadow: var(--neon-orange-subtle-glow);
}

.today-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.today-info i {
    font-size: 1.2rem;
    color: var(--neon-orange);
}

.today-badge {
    background: linear-gradient(90deg, #ff6b00 0%, #ff8500 100%);
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.5);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.825rem;
    font-weight: 600;
    color: #ffffff;
}

/* Futuristic Neon Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b00 0%, #ff8500 100%);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.5);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff8500 0%, #ffa033 100%);
    box-shadow: 0 0 30px rgba(255, 107, 0, 0.8);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(225, 29, 72, 0.4);
}

.btn-secondary:hover {
    box-shadow: 0 0 25px rgba(225, 29, 72, 0.7);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.7);
    transform: translateY(-2px);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 107, 0, 0.4);
}

.btn-outline:hover {
    background: rgba(255, 107, 0, 0.15);
    border-color: var(--neon-orange);
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.3);
}

.table-controls .btn-outline {
    background: rgba(18, 20, 32, 0.8);
    color: var(--text-main);
    border: 1px solid var(--border-neon);
}

.table-controls .btn-outline:hover {
    background: rgba(255, 107, 0, 0.15);
}

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

.btn-danger-sm {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-danger-sm:hover {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}

.btn-info-sm {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.4);
}

.btn-info-sm:hover {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.6);
}

/* Summary Glass Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.summary-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    border: 1px solid var(--border-neon);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-3px);
    border-color: var(--neon-orange);
    box-shadow: var(--neon-orange-glow);
}

.card-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.card-primary .card-icon { background: rgba(255, 107, 0, 0.15); color: #ff8500; border: 1px solid rgba(255, 107, 0, 0.4); }
.card-warning .card-icon { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.card-danger .card-icon { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.card-success .card-icon { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }

.card-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.card-value {
    font-size: 1.45rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin: 4px 0;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.card-subtext {
    font-size: 0.775rem;
    color: var(--text-light);
}

/* Controls */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 260px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neon-orange);
}

.search-box input {
    width: 100%;
    padding: 11px 14px 11px 42px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-neon);
    background: rgba(18, 20, 32, 0.9);
    color: #ffffff;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.25s;
}

.search-box input:focus {
    border-color: var(--neon-orange);
    box-shadow: var(--neon-orange-glow);
}

.filter-box {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.filter-box select {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-neon);
    background: rgba(18, 20, 32, 0.9);
    color: #ffffff;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}

.filter-box select option {
    background: #121420;
    color: #ffffff;
}

/* Table Container Glass */
.table-container {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-neon);
    overflow-x: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.debtor-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.debtor-table th {
    background: rgba(255, 107, 0, 0.12);
    color: #ffc099;
    font-weight: 600;
    padding: 16px;
    border-bottom: 2px solid var(--border-neon);
    white-space: nowrap;
}

.debtor-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 107, 0, 0.15);
    vertical-align: middle;
    color: #e2e8f0;
}

.debtor-table tbody tr {
    transition: background-color 0.2s ease;
}

.debtor-table tbody tr:hover {
    background-color: rgba(255, 107, 0, 0.08);
}

.debtor-name {
    font-weight: 600;
    color: #ffffff;
    display: block;
    font-size: 0.975rem;
}

.days-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.775rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    margin-top: 4px;
}

.days-badge.active {
    background: rgba(255, 107, 0, 0.2);
    border: 1px solid rgba(255, 107, 0, 0.5);
    color: #ffab73;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.775rem;
    font-weight: 600;
}

.status-closed {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
}

.text-right { text-align: right; }
.text-center { text-align: center; }
.font-semibold { font-weight: 600; }
.text-primary { color: #ff8500; }
.text-success { color: #34d399; }
.text-warning { color: #fbbf24; text-shadow: 0 0 8px rgba(251, 191, 36, 0.4); }
.text-danger { color: #f87171; text-shadow: 0 0 8px rgba(248, 113, 113, 0.4); }

.empty-state {
    text-align: center;
    padding: 50px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 50px;
    color: var(--neon-orange);
    margin-bottom: 12px;
    text-shadow: var(--neon-orange-glow);
}

.empty-state h3 {
    font-size: 1.15rem;
    color: #ffffff;
    margin-bottom: 4px;
}

/* Modals Glassmorphism */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 6, 10, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

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

.modal-card {
    background: rgba(18, 20, 32, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-neon-strong);
    box-shadow: 0 0 40px rgba(255, 107, 0, 0.3);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    padding: 28px;
    transform: translateY(20px);
    transition: transform 0.25s ease;
    max-height: 90vh;
    overflow-y: auto;
    color: #ffffff;
}

.modal-card.modal-lg {
    max-width: 880px;
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

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

.modal-header h3 {
    font-size: 1.25rem;
    color: #ffffff;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: color 0.2s;
}

.btn-close:hover {
    color: #ef4444;
}

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

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .col {
    flex: 1;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #ffc099;
    margin-bottom: 6px;
}

.required {
    color: #f87171;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-neon);
    background: rgba(10, 12, 20, 0.8);
    color: #ffffff;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--neon-orange);
    box-shadow: var(--neon-orange-glow);
}

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

/* Payment Info Box Glass */
.payment-info-box {
    background: rgba(255, 107, 0, 0.06);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 18px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: #cbd5e1;
}

.info-row.total-highlight {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 107, 0, 0.4);
    font-size: 1.05rem;
}

/* Payment Split Preview */
.payment-split-preview {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 14px;
}

.payment-split-preview h4 {
    font-size: 0.9rem;
    color: #34d399;
    margin-bottom: 10px;
}

.split-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    margin-bottom: 4px;
    color: #a7f3d0;
}

.split-row.total {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.975rem;
    color: #6ee7b7;
}

/* Print Styles */
@media print {
    body {
        background: #ffffff;
        color: #000000;
        padding: 0;
    }

    .header-actions,
    .today-banner,
    .table-controls,
    .modal-overlay,
    td:last-child,
    th:last-child {
        display: none !important;
    }

    .app-header {
        background: none;
        color: #000;
        box-shadow: none;
        padding: 0 0 16px 0;
        border-bottom: 2px solid #000;
    }

    .app-header h1 {
        font-size: 18pt;
        -webkit-text-fill-color: initial;
        color: #000;
    }

    .logo-icon { display: none; }
    .summary-card { border: 1px solid #ccc; box-shadow: none; background: #fff; color: #000; }
    .card-value { color: #000; text-shadow: none; }
    .table-container { box-shadow: none; border: 1px solid #ccc; background: #fff; }
    .debtor-table th { background: #eee; color: #000; border: 1px solid #ccc; }
    .debtor-table td { border: 1px solid #ccc; color: #000; }
}

/* ==========================================
   Navigation Tabs & Expenses Module Styles
   ========================================== */
.nav-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
    border-bottom: 2px solid var(--border-neon);
    padding-bottom: 12px;
}

.tab-btn {
    background: rgba(18, 20, 32, 0.7);
    color: var(--text-muted);
    border: 1px solid var(--border-neon);
    border-radius: var(--radius-md);
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
}

.tab-btn:hover {
    color: #ffffff;
    border-color: var(--neon-orange);
    background: rgba(255, 107, 0, 0.15);
    box-shadow: var(--neon-orange-glow);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.3) 0%, rgba(255, 133, 0, 0.15) 100%);
    color: #ffffff;
    border-color: var(--neon-orange);
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.4);
    position: relative;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: var(--neon-orange);
    border-radius: 2px;
    box-shadow: var(--neon-orange-glow);
}

/* Year Selector Box */
.year-selector-box {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.year-selector-box select {
    padding: 10px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-neon);
    background: rgba(18, 20, 32, 0.9);
    color: var(--neon-orange);
    font-weight: 700;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
    box-shadow: var(--neon-orange-glow);
}

/* 12-Month Checklist Matrix Table */
.expense-table th.month-col {
    padding: 10px 4px;
    font-size: 0.85rem;
    text-align: center;
    width: 44px;
    min-width: 44px;
}

.expense-table th.month-col.is-current-month {
    background: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
    border-bottom-color: #10b981;
    font-weight: 700;
}

.expense-table td.month-cell {
    padding: 8px 4px;
    text-align: center;
}

.expense-table td.month-cell.is-current-month {
    background: rgba(16, 185, 129, 0.05);
}

/* Custom Interactive Month Checkbox Button */
.month-chk-box {
    width: 32px;
    height: 32px;
    margin: 0 auto;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(10, 12, 20, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    color: transparent;
    user-select: none;
}

.month-chk-box:hover {
    border-color: var(--neon-orange);
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
}

.month-chk-box.checked {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #34d399;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.month-chk-box.checked i {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
}

.month-chk-box.current-unpaid {
    border-color: #f87171;
    background: rgba(248, 113, 113, 0.12);
    animation: pulseBorder 2s infinite;
}

@keyframes pulseBorder {
    0% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(248, 113, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
}

.due-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

.due-badge.due-soon {
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.5);
    color: #fbbf24;
}

.due-badge.overdue {
    background: rgba(248, 113, 113, 0.2);
    border: 1px solid rgba(248, 113, 113, 0.5);
    color: #f87171;
}

