* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}
body {
    background-color: #001228;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.header-bar {
    background-color: #002244;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #003366;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.brand-title {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-section {
    display: flex;
    align-items: center;
    gap: 15px;
}
.btn {
    background: #ff4081;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s ease;
}
.btn:hover {
    background: #e0356f;
}
.btn-outline {
    background: transparent;
    border: 1px solid #ffffff;
    color: white;
}
.btn-outline:hover {
    background: rgba(255,255,255,0.1);
}
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #003366;
    border: 1px solid #004080;
    color: #ffffff;
    font-size: 14px;
    padding: 6px 14px;
}
.btn-back:hover {
    background: #004080;
    border-color: #ff4081;
}
.btn-refresh {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 51, 102, 0.6);
    border: 1px solid #004080;
    color: #8da4c4;
    font-size: 13px;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s ease;
}
.btn-refresh:hover {
    background: #003366;
    color: #ffffff;
    border-color: #ff4081;
}
.main-content {
    flex: 1;
    padding: 25px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}
.card {
    background: #001d3d;
    border: 1px solid #003366;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.auth-container {
    max-width: 420px;
    margin: 60px auto;
    text-align: center;
}
.form-group {
    margin-bottom: 18px;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #b0c4de;
}
.form-control {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #004080;
    background: #000f24;
    color: white;
    font-size: 15px;
}
.form-control:focus {
    outline: none;
    border-color: #ff4081;
}
.alert-box {
    background: rgba(255, 64, 129, 0.15);
    border: 1px solid #ff4081;
    color: #ff80ab;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

/* Top Main Navigation Bar */
.main-nav-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
    border-bottom: 2px solid #003366;
    padding-bottom: 10px;
    overflow-x: auto;
}
.main-nav-btn {
    background: rgba(0, 51, 102, 0.4);
    border: 1px solid #003366;
    color: #b0c4de;
    padding: 10px 22px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.main-nav-btn:hover {
    background: #003366;
    color: #ffffff;
}
.main-nav-btn.active {
    background: #ff4081;
    color: #ffffff;
    border-color: #ff4081;
    box-shadow: 0 4px 12px rgba(255, 64, 129, 0.3);
}

/* Sub Navigation Tabs */
.sub-nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: #001228;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #002b5c;
    overflow-x: auto;
}
.tab-btn {
    background: transparent;
    border: none;
    color: #a0b2c6;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 6px;
    white-space: nowrap;
    transition: 0.2s ease;
}
.tab-btn.active {
    background: #003366;
    color: white;
    border-bottom: 3px solid #ff4081;
}

/* Home Stat Cards Grid */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}
.stat-card {
    background: linear-gradient(135deg, #002244, #001830);
    border: 1px solid #003870;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    border-color: #ff4081;
}
.stat-icon {
    font-size: 36px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 10px;
}
.stat-info {
    display: flex;
    flex-direction: column;
}
.stat-val {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
}
.stat-lbl {
    font-size: 13px;
    color: #8da4c4;
    margin-top: 2px;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}
.action-card-btn {
    background: #002b5c;
    border: 1px solid #004080;
    color: white;
    padding: 15px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.action-card-btn:hover {
    background: #003a7a;
    border-color: #ff4081;
}

.table-responsive {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
th, td {
    padding: 14px;
    border-bottom: 1px solid #002b5c;
    font-size: 14px;
}
th {
    background: #001228;
    color: #8da4c4;
    font-weight: bold;
}
.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}
.status-running {
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
}
.status-income {
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
}
.status-expense {
    background: rgba(244, 67, 54, 0.2);
    color: #e57373;
}
.footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #002244;
    color: #6a829e;
    font-size: 13px;
}
.pwa-install-banner {
    background: linear-gradient(90deg, #003366, #001d3d);
    border: 1px solid #ff4081;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Modal Form Dialogs */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 10, 25, 0.85);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    overflow-y: auto;
}
.modal-card {
    background: #001d3d;
    border: 1px solid #004080;
    border-radius: 12px;
    width: 100%;
    max-width: 650px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #003366;
    padding-bottom: 12px;
}
.modal-title {
    font-size: 18px;
    font-weight: bold;
    color: #ff80ab;
}
.btn-close {
    background: transparent;
    border: none;
    color: #8da4c4;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s ease;
}
.btn-close:hover {
    color: #ff4081;
}
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}
.btn-add {
    background: #ff4081;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s ease;
}
.btn-add:hover {
    background: #e0356f;
}
.btn-edit {
    background: #1565C0;
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    border: none;
    cursor: pointer;
    margin-right: 6px;
    transition: 0.2s ease;
}
.btn-edit:hover {
    background: #0d47a1;
}
.btn-delete {
    background: #C62828;
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    border: none;
    cursor: pointer;
    transition: 0.2s ease;
}
.btn-delete:hover {
    background: #b71c1c;
}
