/* ============================================================
   CUSTOMER PORTAL - GLOBAL BASE
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --blue: #075bc7;
    --blue2: #1e90ff;
    --navy: #061b3c;
    --soft: #f4f8ff;
    --border: #e5efff;
    --muted: #64748b;
    --green: #16a34a;
    --red: #dc2626;
    --orange: #f59e0b;
    --shadow: 0 10px 28px rgba(6, 27, 60, .10);
    --radius: 16px;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f0f4f8;
    color: #10233f;
    min-height: 100vh;
    padding: 20px;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    background: #fff;
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 24px 20px;
}

.hidden {
    display: none !important;
}

/* ===== NAVBAR ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 16px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-brand {
    font-size: 20px;
    font-weight: 800;
    color: var(--blue);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-icon {
    font-size: 22px;
    color: var(--muted);
    text-decoration: none;
    transition: 0.2s;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon:hover {
    color: var(--blue);
    transform: scale(1.1);
}

.nav-icon.logout:hover {
    color: var(--red);
}

/* ===== HEADER ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.header h1 {
    font-size: 18px;
    font-weight: 800;
    color: var(--blue);
}

.header a {
    font-size: 20px;
    color: var(--blue);
    text-decoration: none;
}

/* ===== CARD ===== */
.card {
    background: var(--soft);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    display: block;
}

/* ===== BUTTON ===== */
.btn {
    padding: 13px 20px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 40px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 12px;
    white-space: nowrap;
}

/* ===== FORM / INPUT ===== */
.input-group {
    margin-bottom: 14px;
}

.input-group label {
    display: block;
    font-weight: 700;
    font-size: 13px;
    color: var(--navy);
    margin-bottom: 5px;
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 14px;
    font-size: 15px;
    background: #fff;
    outline: none;
    font-family: inherit;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--blue);
}

.otp-row {
    display: flex;
    gap: 10px;
}

.otp-row input {
    flex: 1;
}

/* ===== BADGE ===== */
.badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 40px;
    font-size: 11px;
    font-weight: 700;
}

.badge-paid {
    background: #dcfce7;
    color: #166534;
}

.badge-unpaid {
    background: #fef3c7;
    color: #92400e;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #1f2937;
    color: #fff;
    padding: 14px 28px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 14px;
    z-index: 999;
    transition: 0.4s ease;
    opacity: 0;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== ALERT ===== */
.alert-success {
    background: #dcfce7;
    color: #15803d;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 14px;
    font-weight: 600;
}

.alert-error {
    background: #fee2e2;
    color: #b91c1c;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 14px;
    font-weight: 600;
}

/* ===== SPINNER ===== */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   DARK MODE
   ============================================================ */

body.dark {
    --soft: #1a1a2e;
    --border: #2d2d44;
    --muted: #94a3b8;
    background: #0f0f1a;
    color: #e4e4e4;
}

body.dark .container {
    background: #181825;
}

body.dark .card {
    background: #1e1e32;
    border-color: #2d2d44;
}

body.dark .header h1 {
    color: #4a9eff;
}

body.dark .nav-brand {
    color: #4a9eff;
}

body.dark .nav-icon {
    color: #94a3b8;
}

body.dark .nav-icon:hover {
    color: #4a9eff;
}

body.dark .menu-item {
    background: #1e1e32;
    color: #d4d4e8;
    border-color: #2d2d44;
}

body.dark .menu-item i {
    color: #4a9eff;
}

body.dark .badge-paid {
    background: #14532d;
    color: #86efac;
}

body.dark .badge-unpaid {
    background: #451a03;
    color: #fcd34d;
}

body.dark .input-group input,
body.dark .input-group textarea,
body.dark .input-group select {
    background: #12121f;
    color: #e4e4e4;
    border-color: #2d2d44;
}

body.dark .input-group label {
    color: #c4c4d8;
}

body.dark .btn {
    background: #075bc7;
}

body.dark .btn:hover {
    background: #1e90ff;
}

body.dark .profile-right .saldo {
    color: #4a9eff;
}

body.dark .tx-item {
    border-color: #2d2d44;
}

body.dark .tx-left .tx-date {
    color: #94a3b8;
}

body.dark .divider hr {
    border-color: #2d2d44;
}

body.dark .divider span {
    color: #94a3b8;
}

body.dark .info-box {
    background: #451a03;
    color: #fcd34d;
}

body.dark .alert-success {
    background: #14532d;
    color: #86efac;
}

body.dark .alert-error {
    background: #451a03;
    color: #fca5a5;
}

body.dark .popup-content {
    background: #181825;
    border: 1px solid #2d2d44;
}

body.dark .popup-header {
    border-color: #2d2d44;
}

body.dark .popup-header h3 {
    color: #e4e4e4;
}

body.dark .popup-close {
    background: #2d2d44;
    color: #94a3b8;
}

body.dark .popup-close:hover {
    background: #451a03;
    color: #fca5a5;
}

body.dark .popup-body .input-group input,
body.dark .popup-body .input-group textarea,
body.dark .popup-body .input-group select {
    background: #12121f;
    color: #e4e4e4;
    border-color: #2d2d44;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 400px) {
    .container {
        padding: 18px 14px;
    }
    .nav-brand {
        font-size: 17px;
    }
    .nav-icon {
        font-size: 19px;
    }
    .header h1 {
        font-size: 16px;
    }
}

