/* Smart Luxy Service - Premium Dark Theme */

/* Georgian Fonts */
@import url('//cdn.web-fonts.ge/fonts/bpg-web-002-caps/css/bpg-web-002-caps.min.css');
@import url('//cdn.web-fonts.ge/fonts/bpg-glaho-web/css/bpg-glaho-web.min.css');

/* CSS Variables */
:root {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a25;
    --bg-card-hover: #222230;
    --bg-input: #15151f;
    
    --gold-primary: #d4af37;
    --gold-light: #f4d03f;
    --gold-dark: #b8960c;
    --gold-gradient: linear-gradient(135deg, #d4af37 0%, #f4d03f 50%, #d4af37 100%);
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7b;
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    --border-color: #2a2a3a;
    --border-gold: rgba(212, 175, 55, 0.3);
    
    /* Fonts */
    --font-heading: "BPG WEB 002 Caps", sans-serif;
    --font-body: "BPG Glaho WEB", sans-serif;
    
    /* Sizing */
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    
    /* Shadows */
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.2);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 0.5em;
    letter-spacing: 1px;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--gold-light);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Landing Page */
.landing-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
        var(--bg-primary);
}

.landing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    padding: 60px;
    width: 100%;
    max-width: 500px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.landing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-gradient);
}

.landing-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow-gold);
}
.landing-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.landing-title {
    color: var(--text-primary);
    margin-bottom: 16px;
}

.landing-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 40px;
    line-height: 1.7;
}

.landing-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Auth Wrapper */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: url('https://i.postimg.cc/0jSGRTgx/photo-1569771228349-0f26ac1eaff7.jpg') center center / cover no-repeat;
    filter: blur(8px);
    z-index: 0;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        linear-gradient(to bottom, rgba(10, 10, 15, 0.85) 0%, rgba(18, 18, 26, 0.9) 100%);
    z-index: 1;
}

.auth-card {
    background: rgba(26, 26, 37, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--border-radius-xl);
    padding: 50px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(212, 175, 55, 0.1);
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-gradient);
}

.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
}

.auth-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Generic admin/modal form input used across paneli pages */
.form-input {
    width: 100%;
    padding: 11px 14px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.form-input:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}
.form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}
select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23808090' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    padding-right: 36px;
}
select.form-input[size]:not([size="1"]) {
    background-image: none;
    padding-right: 14px;
}
textarea.form-input {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}
input[type="datetime-local"].form-input,
input[type="date"].form-input,
input[type="time"].form-input {
    color-scheme: dark;
}
input[type="datetime-local"].form-input::-webkit-calendar-picker-indicator,
input[type="date"].form-input::-webkit-calendar-picker-indicator,
input[type="time"].form-input::-webkit-calendar-picker-indicator {
    filter: invert(0.6) sepia(0.3) hue-rotate(180deg);
    cursor: pointer;
    opacity: 0.7;
}
input[type="file"].form-input {
    padding: 8px 14px;
    cursor: pointer;
}
input[type="file"].form-input::file-selector-button {
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold-primary);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    padding: 5px 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    margin-right: 10px;
    transition: background 0.2s;
}
input[type="file"].form-input::file-selector-button:hover {
    background: rgba(212, 175, 55, 0.22);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a0a0b0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.form-select:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 500;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
}

.btn-gold {
    background: var(--gold-gradient);
    background-size: 200% 200%;
    color: var(--bg-primary);
    font-weight: 600;
    box-shadow: var(--shadow-gold);
}

.btn-gold:hover:not(:disabled) {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.35);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gold-primary);
    color: var(--gold-primary);
}

.btn-outline:hover:not(:disabled) {
    background: var(--gold-primary);
    color: var(--bg-primary);
}

.btn-secondary {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--border-color);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
}

.btn-sm {
    padding: 10px 18px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-size: 0.95rem;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: #fca5a5;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning);
    color: var(--warning);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--info);
    color: #93c5fd;
}

/* Dashboard Layout */
.dashboard {
    min-height: 100vh;
    background: var(--bg-primary);
}

.dashboard-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    text-decoration: none;
}

.dashboard-logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.dashboard-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dashboard-logo-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.dashboard-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.dashboard-user {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Header Icon Buttons */
.header-icon-btn {
    display: flex;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(251,191,36,0.08);
    border: 1px solid rgba(251,191,36,0.25);
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    text-decoration: none;
    color: var(--gold);
    transition: all 0.2s ease;
    cursor: pointer;
}
.header-icon-btn:hover {
    background: rgba(251,191,36,0.15);
    border-color: rgba(251,191,36,0.3);
    transform: scale(1.05);
}
.header-logout-btn:hover {
    background: rgba(239,68,68,0.15);
    border-color: rgba(239,68,68,0.3);
}

.dashboard-content {
    padding: 40px 0;
}

/* Payment Progress Strip */
.payment-progress-strip {
    background: linear-gradient(135deg, rgba(26, 26, 37, 0.95), rgba(18, 18, 26, 0.98));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 20px;
}

.progress-strip-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-strip-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.progress-strip-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.progress-strip-label strong {
    color: var(--gold-primary);
}

.progress-strip-numbers {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.progress-paid {
    color: var(--success);
    font-weight: 700;
    font-size: 1rem;
}

.progress-percent {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-left: 4px;
}

.progress-strip-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-strip-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--success), #34d399);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-width: 2px;
}

.progress-strip-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
    animation: progressShimmer 2.5s ease-in-out infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-strip-legend {
    display: flex;
    gap: 16px;
    align-items: center;
}

.progress-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.progress-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.progress-legend-paid .progress-legend-dot {
    background: var(--success);
}

.progress-legend-unpaid .progress-legend-dot {
    background: var(--danger);
}

@media (max-width: 480px) {
    .payment-progress-strip {
        padding: 12px 14px;
        border-radius: 10px;
        margin-bottom: 14px;
    }
    .progress-strip-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .progress-strip-label {
        font-size: 0.73rem;
        line-height: 1.4;
    }
    .progress-strip-numbers {
        font-size: 0.8rem;
        display: flex;
        align-items: baseline;
        gap: 3px;
    }
    .progress-paid {
        font-size: 0.9rem;
    }
    .progress-percent {
        font-size: 0.72rem;
    }
    .progress-strip-bar {
        height: 6px;
    }
    .progress-strip-legend {
        gap: 12px;
        flex-wrap: wrap;
    }
    .progress-legend-item {
        font-size: 0.7rem;
    }
    .dashboard-nav .dashboard-user {
        display: none;
    }
    .dashboard-nav .btn {
        display: none;
    }
    .header-icon-btn {
        display: flex;
    }
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-gold);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0;
}

.card-body {
    padding: 24px;
}

/* Profile Toggle (mobile only) */
.profile-toggle-btn {
    display: none;
    width: 100%;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(251,191,36,0.08) 0%, rgba(251,191,36,0.03) 100%);
    border: 1px solid rgba(251,191,36,0.25);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    margin-bottom: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: center;
    justify-content: space-between;
}
.profile-toggle-left {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}
.profile-toggle-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}
.profile-toggle-left span:last-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-toggle-arrow {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    line-height: 1;
}
.profile-toggle-btn:hover {
    background: linear-gradient(135deg, rgba(251,191,36,0.15) 0%, rgba(251,191,36,0.06) 100%);
    border-color: rgba(251,191,36,0.4);
}
.profile-toggle-btn.open {
    border-color: var(--gold);
    color: var(--text-primary);
    margin-bottom: 14px;
    background: linear-gradient(135deg, rgba(251,191,36,0.12) 0%, rgba(251,191,36,0.04) 100%);
}
.profile-toggle-btn.open .profile-toggle-arrow {
    transform: rotate(90deg);
}

/* Profile Card */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.profile-item {
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.profile-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.profile-value {
    font-size: 1rem;
    color: var(--text-primary);
}

/* Payment Card */
.payment-card {
    position: relative;
}

.payment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-gradient);
}

.payment-amount {
    text-align: center;
    padding: 30px 0;
}

.payment-amount-value {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--gold-primary);
    margin-bottom: 8px;
}

.payment-amount-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.payment-info {
    background: var(--bg-input);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 20px;
}

.payment-deadline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.payment-deadline-icon {
    color: var(--warning);
}

/* Debt Alert */
.debt-alert {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--danger);
    border-radius: var(--border-radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fca5a5;
}

.debt-alert-icon {
    font-size: 1.5rem;
}

/* ===========================
   Modernized Payment Card
   =========================== */
.pay-modern {
    border-radius: 16px;
    border: 1px solid rgba(212,175,55,0.15);
    background: var(--bg-card);
    overflow: hidden;
    transition: border-color 0.3s;
}
.pay-modern:hover {
    border-color: rgba(212,175,55,0.3);
}
.pay-modern--paid {
    border-color: rgba(34,197,94,0.25);
}
.pay-modern--paid:hover {
    border-color: rgba(34,197,94,0.4);
}
.pay-modern--partial {
    border-color: rgba(245,158,11,0.25);
}
.pay-modern--urgent {
    border-color: rgba(239,68,68,0.3);
    animation: urgentPulse 2s ease-in-out infinite;
}
@keyframes urgentPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
    50% { box-shadow: 0 0 20px 0 rgba(239,68,68,0.1); }
}

.pay-modern-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pay-modern-month {
    display: flex;
    flex-direction: column;
}
.pay-modern-month-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-heading);
}
.pay-modern-period {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 1px;
}
.pay-modern-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-paid {
    background: rgba(34,197,94,0.12);
    color: #4ade80;
    border: 1px solid rgba(34,197,94,0.25);
}
.badge-partial {
    background: rgba(245,158,11,0.12);
    color: #fbbf24;
    border: 1px solid rgba(245,158,11,0.25);
}
.badge-unpaid {
    background: rgba(239,68,68,0.1);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.2);
}

.pay-modern-body {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 18px;
}
.pay-modern-ring-wrap {
    position: relative;
    width: 80px; height: 80px;
    flex-shrink: 0;
}
.pay-modern-ring {
    width: 80px; height: 80px;
    transform: rotate(-90deg);
}
.pay-ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.06);
    stroke-width: 5;
}
.pay-ring-fill {
    fill: none;
    stroke: var(--gold-primary);
    stroke-width: 5;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}
.pay-modern--paid .pay-ring-fill {
    stroke: #22c55e;
}
.pay-modern--partial .pay-ring-fill {
    stroke: #f59e0b;
}
.pay-modern--urgent .pay-ring-fill {
    stroke: #ef4444;
}
.pay-modern-ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.pay-ring-big {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-heading);
    line-height: 1;
}
.pay-modern--paid .pay-ring-big {
    color: #22c55e;
    font-size: 1.3rem;
}
.pay-ring-small {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}
.pay-modern-details {
    flex: 1;
    min-width: 0;
}
.pay-modern-amount {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}
.pay-amount-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--gold-primary);
    font-family: var(--font-heading);
    line-height: 1;
}
.pay-amount-partial {
    color: #fbbf24;
}
.pay-amount-struck {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
}
.pay-modern-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.pay-modern-breakdown em {
    color: #4ade80;
    font-style: normal;
}
.pay-bk-paid {
    color: #4ade80;
}
.pay-modern-deadline-info {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

.pay-modern-progress {
    height: 3px;
    background: rgba(255,255,255,0.04);
    position: relative;
}
.pay-progress-bar {
    height: 100%;
    background: var(--gold-gradient);
    border-radius: 3px;
    transition: width 1s ease;
}
.pay-modern--paid .pay-progress-bar {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}
.pay-modern--partial .pay-progress-bar {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.pay-modern--urgent .pay-progress-bar {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.pay-modern-footer {
    padding: 14px 18px;
    display: flex;
}
.pay-modern-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: var(--gold-gradient);
    color: #000;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: var(--font-heading);
}
.pay-modern-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212,175,55,0.3);
}
.pay-modern-paid-label {
    width: 100%;
    text-align: center;
    color: #4ade80;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* History Table */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--bg-input);
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: var(--bg-card-hover);
}

.table td {
    color: var(--text-secondary);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-pending {
    background: rgba(107, 107, 123, 0.15);
    color: var(--text-muted);
}

/* Grid */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ===== ADMIN PANEL - MODERN REDESIGN ===== */

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 280px;
    background: linear-gradient(180deg, #0d0d14 0%, #12121a 50%, #0a0a0f 100%);
    border-right: 1px solid rgba(212, 175, 55, 0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.admin-sidebar::-webkit-scrollbar {
    width: 4px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 2px;
}

.admin-sidebar-header {
    padding: 24px 24px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, transparent 100%);
    text-align: center;
}

.sidebar-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    object-fit: cover;
    margin-bottom: 10px;
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.2);
}

.admin-sidebar-header h2 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--gold-primary);
    margin: 0 0 4px 0;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.admin-sidebar-header span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* Admin Navigation */
.admin-nav {
    flex: 1;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-nav-section {
    margin-bottom: 24px;
}

.admin-nav-section-title {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 0 12px;
    margin-bottom: 12px;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: var(--text-secondary);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.admin-nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.15) 0%, transparent 100%);
    transition: width 0.3s ease;
}

.admin-nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.admin-nav-item:hover::before {
    width: 100%;
}

.admin-nav-item:hover svg {
    color: var(--gold-primary);
    transform: scale(1.1);
}

.admin-nav-item.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(212, 175, 55, 0.05) 100%);
    color: var(--gold-primary);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.admin-nav-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--gold-gradient);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.admin-nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.admin-nav-item span {
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
}

/* Sidebar Footer */
.admin-sidebar-footer {
    padding: 20px;
    padding-bottom: 40px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    background: linear-gradient(0deg, rgba(212, 175, 55, 0.05) 0%, transparent 100%);
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    margin-bottom: 12px;
}

.admin-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 14px;
    color: var(--bg-primary);
}

.admin-user-details {
    flex: 1;
    min-width: 0;
}

.admin-user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-user-role {
    font-size: 0.75rem;
    color: var(--gold-primary);
}

.admin-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    color: var(--text-muted);
    border-radius: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.85rem;
}

.admin-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Admin Main Content */
.admin-main {
    flex: 1;
    margin-left: 280px;
    padding: 32px;
    background: var(--bg-primary);
    min-height: 100vh;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.admin-header h1 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--text-primary);
    margin: 0;
}

.admin-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 4px 0 0;
}

/* ─── Pagination (shared) ──────────────── */
.pagination-wrapper {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 18px; border-top: 1px solid var(--border-color);
}
.pagination { display: flex; gap: 4px; align-items: center; }
.pagination-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 34px; padding: 0 8px;
    border-radius: 8px; border: 1px solid transparent;
    background: rgba(255,255,255,0.04); color: var(--text-secondary);
    text-decoration: none; font-size: 13px; font-weight: 500;
    transition: all 0.15s; cursor: pointer;
}
.pagination-btn:hover:not(.disabled):not(.active) {
    background: rgba(212,175,55,0.1); color: #d4af37; border-color: rgba(212,175,55,0.2);
}
.pagination-btn.active {
    background: rgba(212,175,55,0.18); color: #d4af37;
    border-color: rgba(212,175,55,0.35); font-weight: 700;
}
.pagination-btn.disabled { opacity: 0.3; cursor: not-allowed; }
.pagination-dots { color: var(--text-secondary); padding: 0 4px; font-size: 14px; }
.pagination-info { font-size: 12px; color: var(--text-secondary); }
.pagination-right { display: flex; align-items: center; gap: 12px; }
.per-page-select { display: flex; gap: 2px; }
.pp-btn {
    padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 500;
    text-decoration: none; color: var(--text-secondary);
    background: rgba(255,255,255,0.04); transition: all 0.15s;
}
.pp-btn:hover { background: rgba(212,175,55,0.1); color: #d4af37; }
.pp-btn.active { background: rgba(212,175,55,0.18); color: #d4af37; font-weight: 700; }

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(26, 26, 37, 0.8) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.stat-icon.gold {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.1) 100%);
    color: var(--gold-primary);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.15);
}

.stat-icon.green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    color: var(--success);
}

.stat-icon.red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%);
    color: var(--danger);
}

.stat-icon.blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%);
    color: var(--info);
}

.stat-icon.purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: #8b5cf6;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Profile Image */
.profile-image-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
}

.profile-image {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    object-fit: cover;
    border: 3px solid rgba(212, 175, 55, 0.3);
    background: var(--bg-card);
}

.profile-image-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border: 3px solid rgba(212, 175, 55, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-primary);
    font-family: var(--font-heading);
    font-size: 2rem;
}

.profile-image-upload {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--gold-gradient);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.profile-image-upload:hover {
    transform: scale(1.1);
}

.profile-image-upload input {
    display: none;
}

.profile-image-upload svg {
    width: 18px;
    height: 18px;
    color: var(--bg-primary);
}

/* User Dashboard Profile Image Section */
.profile-image-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0 30px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.profile-image-container {
    position: relative;
    margin-bottom: 16px;
}

.profile-image-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3),
                0 0 0 4px rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
}

.profile-image-large:hover {
    border-color: var(--gold-primary);
    transform: scale(1.02);
}

.profile-image-section .profile-image-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.05) 100%);
    border: 4px solid rgba(212, 175, 55, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-primary);
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.profile-image-section .profile-image-upload {
    position: absolute;
    bottom: 0;
    right: 0;
}

.profile-image-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gold-gradient);
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
}

.profile-image-upload-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.5);
}

.profile-name-display {
    text-align: center;
}

.profile-fullname {
    display: block;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-project {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--gold-primary);
    background: rgba(212, 175, 55, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.auth-footer a {
    color: var(--gold-primary);
}

/* Utilities */
.text-gold { color: var(--gold-primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
        z-index: 1000;
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .admin-mobile-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .payment-progress-strip {
        padding: 12px 16px;
    }
    .progress-strip-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .progress-strip-label {
        font-size: 0.78rem;
    }
    
    .landing-card {
        padding: 40px 30px;
    }
    
    .auth-card {
        padding: 40px 30px;
    }
    
    .profile-toggle-btn {
        display: flex;
    }
    .profile-grid {
        grid-template-columns: 1fr;
        display: none;
        animation: profileSlideDown 0.3s ease-out;
    }
    .profile-grid.profile-grid-open {
        display: grid;
    }
    @keyframes profileSlideDown {
        from {
            opacity: 0;
            transform: translateY(-8px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .payment-amount-value {
        font-size: 2.5rem;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    
    .admin-main {
        padding: 20px;
    }
    
    /* Approval buttons mobile */
    .approval-item {
        flex-direction: column;
        align-items: stretch !important;
    }
    .approval-buttons {
        width: 100%;
        flex-direction: row;
    }
    .approval-buttons form {
        flex: 1;
    }
    .approval-buttons button {
        width: 100%;
    }
}

/* Mobile Menu Toggle */
.admin-mobile-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--gold-primary);
}

/* Admin Overlay */
.admin-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
    backdrop-filter: blur(4px);
}

.admin-overlay.active {
    display: block;
}
/* ===========================
   Modal System
   =========================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1100;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
    from { 
        opacity: 0; 
        transform: scale(0.95) translateY(-20px); 
    }
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3,
.modal-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-content form {
    padding: 24px;
}

.modal-content .form-group {
    margin-bottom: 18px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
}

/* Modal Large Variant */
.modal-content.modal-lg {
    max-width: 720px;
}

/* ===== User Settings Page ===== */
.settings-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 16px;
    transition: color 0.2s;
}
.settings-back-link:hover {
    color: var(--gold);
}

.settings-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.settings-card {
    margin-bottom: 20px;
}

.settings-current-value {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(251,191,36,0.06);
    border: 1px solid rgba(251,191,36,0.15);
    border-radius: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.settings-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.settings-value {
    color: var(--gold);
    font-weight: 600;
    font-size: 0.95rem;
    word-break: break-all;
}

.settings-step {
    margin-top: 8px;
}

.settings-input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.settings-input-group .form-input {
    flex: 1;
    min-width: 0;
}
.settings-input-group .settings-input-wrapper {
    flex: 1;
    min-width: 0;
}

/* Fancy Input with Icon */
.settings-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.settings-input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 1;
}
.settings-fancy-input {
    padding-left: 42px !important;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    padding: 12px 14px 12px 42px;
    width: 100%;
    transition: all 0.25s ease;
    outline: none;
}
.settings-fancy-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(251,191,36,0.12);
}
.settings-fancy-input:focus + .settings-input-icon,
.settings-input-wrapper:focus-within .settings-input-icon {
    color: var(--gold);
}
.settings-fancy-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Card title icons */
.settings-card .card-title i {
    color: var(--gold);
    margin-right: 6px;
    font-size: 0.95em;
}

.settings-send-btn {
    white-space: nowrap;
    padding: 10px 20px;
    font-size: 0.85rem;
}

.settings-info-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

.verification-code-input {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    letter-spacing: 8px;
    text-align: center;
    max-width: 200px;
}

.settings-step-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 0;
    transition: color 0.2s;
}
.btn-link:hover {
    color: var(--gold);
}

.settings-timer {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.settings-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 8px;
    min-height: 1.2em;
}

.settings-success {
    padding: 16px;
    background: rgba(52,211,153,0.1);
    border: 1px solid rgba(52,211,153,0.3);
    border-radius: 10px;
    color: #34d399;
    font-weight: 600;
    text-align: center;
}

.settings-logout-btn {
    padding: 12px 40px;
    font-size: 1rem;
}
.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 10px 24px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}
.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .settings-input-group {
        flex-direction: column;
    }
    .settings-send-btn {
        width: 100%;
    }
    .verification-code-input {
        max-width: 100%;
    }
    .settings-page-title {
        font-size: 1.2rem;
    }
}

/* Modal Small Variant */
.modal-content.modal-sm {
    max-width: 380px;
}

@media (max-width: 600px) {
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 16px 18px;
    }
    
    .modal-content form {
        padding: 18px;
    }
    
    .modal-actions {
        flex-direction: column-reverse;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}

/* =============================================
   Messages & Polls (user-facing)
   ============================================= */

/* Unread badge pill in page header */
.msg-unread-badge {
    background: #ef4444;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

/* Empty state */
.msg-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 60px 20px;
    color: var(--text-secondary);
    text-align: center;
}

/* Messages list */
.msg-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.msg-item {
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.msg-item.unread {
    border-color: rgba(212, 175, 55, 0.5);
}

.msg-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
}

.msg-item-header:hover {
    background: rgba(255,255,255,0.03);
}

.msg-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.msg-dot {
    width: 8px;
    height: 8px;
    background: var(--gold-primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.msg-subject {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg-scope-badge {
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}
.msg-scope-badge.scope-all    { background: rgba(99,102,241,0.15); color: #818cf8; }
.msg-scope-badge.scope-complex { background: rgba(34,197,94,0.12); color: #4ade80; }
.msg-scope-badge.scope-direct  { background: rgba(212,175,55,0.15); color: var(--gold-primary); }

.msg-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.msg-sender { color: var(--text-secondary); }
.msg-date   { color: var(--text-muted, var(--text-secondary)); }

.msg-chevron {
    transition: transform 0.2s;
}

.msg-item-body {
    padding: 0 16px 16px;
    border-top: 1px solid var(--border-color);
    margin-top: 0;
}

.msg-item-body p {
    padding-top: 12px;
    color: var(--text-primary);
    line-height: 1.6;
}

.msg-reply-section textarea {
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.9rem;
}

.msg-reply-section textarea:focus {
    outline: none;
    border-color: var(--gold-primary);
}

/* Poll card */
.poll-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    max-width: 640px;
}

/* Poll countdown strip */
.poll-countdown {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--gold-primary);
    margin-bottom: 16px;
}

/* Poll options */
.poll-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.poll-option {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    transition: border-color 0.15s, background 0.15s;
}

.poll-option.selectable {
    cursor: pointer;
}

.poll-option.selectable:hover {
    border-color: var(--gold-primary);
    background: rgba(212,175,55,0.07);
}

.poll-option.voted {
    border-color: rgba(34,197,94,0.4);
    background: rgba(34,197,94,0.05);
}

.poll-option-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.poll-result-bar-wrap {
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.poll-result-bar {
    height: 100%;
    background: var(--gold-primary);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.poll-vote-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Dashboard polls strip */
.dash-polls-banner {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.dash-poll-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    background: rgba(96,165,250,0.08);
    border: 1px solid rgba(96,165,250,0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.dash-poll-chip:hover {
    background: rgba(96,165,250,0.18);
    border-color: #60a5fa;
    color: #93bbfd;
}

.dash-poll-chip.voted {
    border-color: rgba(96,165,250,0.25);
    background: rgba(96,165,250,0.06);
}

.dash-poll-action {
    font-weight: 600;
    color: #60a5fa;
    font-size: 0.8rem;
}

.dash-poll-voted {
    color: #7dd3fc;
    font-size: 0.8rem;
}

/* FOUC Prevention — hide content during first paint, reveal smoothly */
@keyframes pageReveal {
    from { opacity: 0; }
    to { opacity: 1; }
}
body {
    animation: pageReveal 0.18s ease both;
}
@media (prefers-reduced-motion: reduce) {
    body { animation-duration: 0.01s; }
}

/* Shared User Avatar */
.user-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    object-fit: cover; border: 2px solid rgba(212,175,55,0.2); flex-shrink: 0;
}
.user-avatar-placeholder {
    width: 42px; height: 42px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(212,175,55,0.25), rgba(212,175,55,0.1));
    border: 1px solid rgba(212,175,55,0.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700; color: #d4af37; flex-shrink: 0;
    text-transform: uppercase;
}

/* ===========================
   Header Profile Avatar + Dropdown
   =========================== */
.header-badge {
    position: absolute;
    top: -4px; right: -4px;
    background: #ef4444; color: #fff;
    font-size: 10px; min-width: 16px; height: 16px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px; font-weight: 700;
}

.header-profile-wrap {
    position: relative;
}

/* Unified menu trigger button */
.header-menu-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px 5px 5px;
    border-radius: 24px;
    border: 1px solid rgba(212,175,55,0.2);
    background: rgba(212,175,55,0.06);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}
.header-menu-trigger:hover {
    background: rgba(212,175,55,0.12);
    border-color: rgba(212,175,55,0.4);
}
.header-menu-avatar {
    position: relative;
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(212,175,55,0.05));
    flex-shrink: 0;
}
.header-menu-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.header-menu-avatar .fa-bars {
    font-size: 0.9rem;
    color: var(--gold-primary);
}
.header-menu-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
    min-width: 0;
}
.header-menu-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}
.header-menu-apt {
    font-size: 0.68rem;
    color: var(--gold-primary);
    font-weight: 500;
}
.header-menu-arrow {
    font-size: 0.55rem;
    color: var(--text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
}
.header-profile-dropdown.open ~ .header-menu-arrow,
.header-menu-trigger:focus .header-menu-arrow {
    transform: rotate(180deg);
}
.header-avatar-dot {
    position: absolute;
    bottom: 0; right: 0;
    width: 9px; height: 9px;
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
    z-index: 1;
}
.header-avatar-dot.paid { background: #22c55e; }
.header-avatar-dot.partial { background: #f59e0b; }
.header-avatar-dot.unpaid { background: #ef4444; }

/* ===========================
   Residents Section (Compact)
   =========================== */
.residents-header {
    padding: 12px 16px 8px;
}
.residents-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.residents-icon {
    color: #818cf8;
    font-size: 0.85rem;
}
.residents-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.residents-count {
    background: rgba(99,102,241,0.2);
    color: #a5b4fc;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 10px;
    margin-left: auto;
}
.residents-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 8px 8px;
}
.resident-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    transition: background 0.15s;
}
.resident-chip:hover {
    background: rgba(255,255,255,0.05);
}
.resident-self {
    background: rgba(99,102,241,0.06);
    border-left: 3px solid #818cf8;
    padding-left: 9px;
}
.resident-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255,255,255,0.03);
    position: relative;
}
.resident-avatar span:first-child {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--font-heading);
}
.resident-avatar-img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.resident-status-dot {
    position: absolute;
    bottom: -1px; right: -1px;
    width: 9px; height: 9px;
    border-radius: 50%;
    border: 2px solid var(--bg-card, #1a1a2e);
}
.resident-info {
    flex: 1;
    min-width: 0;
}
.resident-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.resident-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.resident-you {
    font-size: 0.6rem;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(34,197,94,0.15);
    color: #4ade80;
    font-weight: 600;
    flex-shrink: 0;
}
.resident-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 1px;
}
.resident-role {
    font-size: 0.7rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}
.resident-phone {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.resident-remove-form {
    margin: 0;
    flex-shrink: 0;
}
.resident-remove-btn {
    width: 26px; height: 26px;
    border-radius: 6px;
    border: 1px solid rgba(239,68,68,0.2);
    background: rgba(239,68,68,0.08);
    color: #f87171;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.15s;
    padding: 0;
}
.resident-remove-btn:hover {
    background: rgba(239,68,68,0.2);
    border-color: rgba(239,68,68,0.4);
}

/* Profile Dropdown */
.header-profile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 300px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05);
    z-index: 200;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s ease-out;
}
.header-profile-dropdown.open {
    display: block;
}
@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.hpd-header {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(212,175,55,0.05), transparent);
}
.hpd-avatar {
    width: 68px; height: 68px;
    border-radius: 50%;
    margin: 0 auto 10px;
    overflow: hidden;
    border: 3px solid rgba(212,175,55,0.4);
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(212,175,55,0.05));
    position: relative;
}
.hpd-avatar-clickable {
    cursor: pointer;
    transition: border-color 0.2s;
}
.hpd-avatar-clickable:hover {
    border-color: var(--gold-primary);
}
.hpd-avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 50%;
}
.hpd-avatar-clickable:hover .hpd-avatar-overlay {
    opacity: 1;
}
.hpd-avatar-form {
    margin: 0;
}
.hpd-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.hpd-avatar span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-primary);
    font-family: var(--font-heading);
}
.hpd-meta {
    margin-bottom: 8px;
}
.hpd-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.hpd-project {
    font-size: 0.8rem;
    color: var(--gold-primary);
    margin-bottom: 6px;
}
.hpd-status {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.78rem;
    padding: 6px 14px;
    border-radius: 12px;
    font-weight: 500;
    line-height: 1.4;
}
.hpd-status-sub {
    font-size: 0.7rem;
    opacity: 0.75;
    font-weight: 400;
}
.hpd-status.paid {
    background: rgba(34,197,94,0.15);
    color: #4ade80;
    border: 1px solid rgba(34,197,94,0.3);
}
.hpd-status.partial {
    background: rgba(245,158,11,0.15);
    color: #fbbf24;
    border: 1px solid rgba(245,158,11,0.3);
}
.hpd-status.unpaid {
    background: rgba(239,68,68,0.1);
    color: #fca5a5;
    border: 1px solid rgba(239,68,68,0.25);
}
.hpd-details {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
}
.hpd-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.hpd-info-item {
    padding: 8px 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
}
.hpd-info-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hpd-info-value {
    font-size: 0.82rem;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hpd-fee-strip {
    margin-top: 10px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(212,175,55,0.08), rgba(212,175,55,0.02));
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 10px;
}
.hpd-fee-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.hpd-fee-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold-primary);
}
.hpd-fee-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.hpd-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.hpd-row span:first-child {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}
.hpd-actions {
    padding: 8px;
}
.hpd-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.15s ease;
}
.hpd-action:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}
.hpd-action i {
    width: 18px;
    text-align: center;
    color: var(--gold-primary);
    font-size: 0.9rem;
}
.hpd-logout {
    color: #fca5a5;
}
.hpd-logout:hover {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
}
.hpd-logout i {
    color: #ef4444;
}

/* ===========================
   Credit Banner
   =========================== */
.credit-banner {
    margin-bottom: 24px;
    border: 1px solid rgba(168,85,247,0.35);
    background: linear-gradient(135deg, rgba(168,85,247,0.08), rgba(139,92,246,0.03));
    overflow: hidden;
}
.credit-banner:hover {
    border-color: rgba(168,85,247,0.5);
}
.credit-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    gap: 16px;
}
.credit-banner-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}
.credit-banner-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(168,85,247,0.25), rgba(139,92,246,0.1));
    border: 1px solid rgba(168,85,247,0.3);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: #c084fc;
    font-size: 1.15rem;
}
.credit-banner-info {
    min-width: 0;
}
.credit-banner-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #c084fc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.credit-banner-amount {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.credit-banner-dates {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.credit-banner-counter {
    flex-shrink: 0;
}
.credit-counter-ring {
    width: 62px; height: 62px;
    border-radius: 50%;
    border: 3px solid rgba(168,85,247,0.4);
    background: rgba(168,85,247,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
}
.credit-counter-num {
    font-size: 1.4rem;
    font-weight: 800;
    color: #c084fc;
    line-height: 1;
}
.credit-counter-label {
    font-size: 0.6rem;
    color: #a78bfa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* ===========================
   Advance Payment Collapsible
   =========================== */
.advance-toggle-header {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}
.advance-toggle-header:hover {
    background: rgba(255,255,255,0.02);
}
.advance-toggle-sub {
    font-size: 0.8rem;
}
.advance-toggle-arrow {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-primary);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    flex-shrink: 0;
    line-height: 1;
    transform: rotate(-90deg);
}
.advance-open .advance-toggle-arrow {
    transform: rotate(0deg);
}
.advance-collapse-body {
    display: none;
}
.advance-open .advance-collapse-body {
    display: block;
}

/* ===========================
   Mobile Dashboard Reordering
   =========================== */
@media (max-width: 768px) {
    .header-desktop-only {
        display: none !important;
    }

    .dashboard-logo-text {
        font-size: 0.8rem !important;
        letter-spacing: 0.5px !important;
    }

    .header-menu-name {
        max-width: 80px;
    }
    .header-menu-trigger {
        padding: 4px 8px 4px 4px;
        gap: 7px;
    }
    
    .dashboard-content > .container {
        display: flex;
        flex-direction: column;
    }

    /* Mobile section ordering */
    .section-credit { order: 1; }
    .section-flash { order: 2; }
    .section-polls { order: 3; }
    .section-approvals { order: 4; }
    .section-multi-apt { order: 6; }
    .section-payment-grid { order: 7; }
    .section-debt { order: 8; }
    .section-pin { order: 9; }
    .section-doors { order: 10; }
    .section-residents { order: 5; }
    .section-advance { order: 11; }
    .section-history { order: 12; }
    .section-progress { order: 99; }

    /* Payment card mobile adjustments */
    .pay-modern-body {
        gap: 14px;
        padding: 16px 14px;
    }
    .pay-modern-ring-wrap,
    .pay-modern-ring {
        width: 68px; height: 68px;
    }
    .pay-ring-big { font-size: 1.3rem; }
    .pay-amount-num { font-size: 1.5rem; }

    /* Hide standalone profile card on mobile (info in header dropdown) */
    .mobile-hide-profile {
        display: none !important;
    }

    /* Profile dropdown: full width on small screens */
    .header-profile-dropdown {
        width: calc(100vw - 32px);
        right: -8px;
    }
    
    /* Section wrapper spacing */
    .section-doors,
    .section-pin {
        margin-bottom: 16px;
    }
    .section-doors:empty,
    .section-pin:empty {
        display: none;
    }
    
    /* Advance payment collapsed on mobile by default */
    .advance-toggle-sub {
        display: none;
    }
    
    /* Fix spacing for reordered sections */
    .section-history {
        margin-top: 16px !important;
    }
    .section-progress {
        margin-top: 24px;
    }
}

@media (min-width: 769px) {
    /* Desktop: advance payment always open */
    .advance-collapse-body {
        display: block !important;
    }
    .advance-toggle-arrow {
        display: none;
    }
    .advance-toggle-header {
        cursor: default;
    }
    
    /* Desktop: hide profile avatar if settings/logout are visible */
    /* Actually keep avatar on desktop too - it looks nice */
}

/* ===========================
   Payment History Page — Modern
   =========================== */

/* Page Header */
.ph-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
}
.ph-page-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.ph-back-btn {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.2);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold-primary);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s;
    flex-shrink: 0;
}
.ph-back-btn:hover {
    background: rgba(212,175,55,0.15);
    border-color: rgba(212,175,55,0.35);
    transform: translateX(-2px);
}
.ph-page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ph-page-title i {
    color: var(--gold-primary);
    font-size: 1.1rem;
}
.ph-page-subtitle {
    color: var(--text-secondary);
    margin: 3px 0 0;
    font-size: 0.85rem;
}

/* Stats Row */
.ph-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.ph-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}
.ph-stat-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-1px);
}
.ph-stat-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.ph-stat-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.ph-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ph-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Apartment Selector */
.ph-apt-selector {
    background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(99,102,241,0.03));
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.ph-apt-label {
    color: #818cf8;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}
.ph-apt-label i {
    margin-right: 5px;
}
.ph-apt-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.ph-apt-chip {
    padding: 8px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    background: rgba(99,102,241,0.12);
    color: #a5b4fc;
    border: 1px solid rgba(99,102,241,0.25);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ph-apt-chip:hover {
    background: rgba(99,102,241,0.2);
    border-color: rgba(99,102,241,0.4);
}
.ph-apt-chip.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
    box-shadow: 0 2px 10px rgba(99,102,241,0.35);
}
.ph-apt-chip small {
    opacity: 0.7;
    font-size: 0.78rem;
}

/* History Card */
.ph-history-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

/* Table Enhancements */
.ph-table-wrap {
    overflow-x: auto;
}
.ph-table th {
    font-size: 0.8rem;
    padding: 14px 16px;
}
.ph-row-num {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
}
.ph-month {
    font-weight: 500;
    color: var(--text-primary);
}
.ph-month-icon {
    color: var(--gold-primary);
    margin-right: 6px;
    font-size: 0.85rem;
}
.ph-amount {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
}
.ph-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.ph-complex {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Badge refunded */
.badge-refunded {
    background: rgba(96,165,250,0.15);
    color: #60a5fa;
}
.badge i {
    margin-right: 4px;
    font-size: 0.75rem;
}

/* Empty State */
.ph-empty-state {
    padding: 60px 40px;
    text-align: center;
}
.ph-empty-icon {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.2);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.8rem;
    color: var(--gold-primary);
}
.ph-empty-text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Mobile Cards (hidden on desktop, shown on mobile) */
.ph-mobile-cards {
    display: none;
}

@media (max-width: 768px) {
    .ph-table-wrap { display: none; }
    .ph-mobile-cards { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
    
    .ph-stats-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .ph-stat-card {
        padding: 12px 14px;
    }
    .ph-stat-icon {
        width: 36px; height: 36px;
        font-size: 0.9rem;
    }
    .ph-stat-value {
        font-size: 0.95rem;
    }
    .ph-page-title {
        font-size: 1.15rem;
    }
    .ph-apt-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Mobile Payment Card */
.ph-mobile-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    transition: all 0.2s;
}
.ph-mobile-card:hover {
    border-color: var(--border-gold);
}
.ph-mc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.ph-mc-month {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}
.ph-mc-month i {
    color: var(--gold-primary);
    margin-right: 5px;
}
.ph-mc-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 14px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.ph-mc-badge.ph-mc-success { background: rgba(16,185,129,0.15); color: var(--success); }
.ph-mc-badge.ph-mc-danger { background: rgba(239,68,68,0.15); color: var(--danger); }
.ph-mc-badge.ph-mc-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.ph-mc-badge.ph-mc-refunded { background: rgba(96,165,250,0.15); color: #60a5fa; }
.ph-mc-badge.ph-mc-pending { background: rgba(107,107,123,0.15); color: var(--text-muted); }
.ph-mc-body {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}
.ph-mc-amount {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold-primary);
}
.ph-mc-date {
    font-size: 0.78rem;
    color: var(--text-secondary);
}
.ph-mc-footer {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 8px;
}
.ph-mc-complex {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.ph-mc-complex i {
    margin-right: 4px;
}

/* Status-based left border on mobile cards */
.ph-mobile-card.ph-mc-success { border-left: 3px solid var(--success); }
.ph-mobile-card.ph-mc-danger { border-left: 3px solid var(--danger); }
.ph-mobile-card.ph-mc-warning { border-left: 3px solid var(--warning); }
.ph-mobile-card.ph-mc-refunded { border-left: 3px solid #60a5fa; }
.ph-mobile-card.ph-mc-pending { border-left: 3px solid var(--text-muted); }


/* ===========================
   User Settings Page — Modern
   =========================== */

/* Page Header */
.us-page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}
.us-back-btn {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.2);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold-primary);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s;
    flex-shrink: 0;
}
.us-back-btn:hover {
    background: rgba(212,175,55,0.15);
    border-color: rgba(212,175,55,0.35);
    transform: translateX(-2px);
}
.us-page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.us-page-title i {
    color: var(--gold-primary);
    font-size: 1.1rem;
}
.us-page-subtitle {
    color: var(--text-secondary);
    margin: 2px 0 0;
    font-size: 0.85rem;
}

/* Profile Card */
.us-profile-card {
    background: linear-gradient(135deg, rgba(212,175,55,0.06), rgba(212,175,55,0.02));
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}
.us-profile-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}
.us-profile-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212,175,55,0.25), rgba(212,175,55,0.1));
    border: 2px solid rgba(212,175,55,0.35);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.us-profile-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.us-profile-avatar span {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold-primary);
    font-family: var(--font-heading);
}
.us-profile-info {
    min-width: 0;
}
.us-profile-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.us-profile-details {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.us-profile-details i {
    color: var(--gold-primary);
    margin-right: 5px;
    font-size: 0.78rem;
}

/* Section Cards */
.us-section-card {
    border-radius: 16px !important;
    overflow: hidden;
}
.us-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
}
.us-card-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.us-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}
.us-card-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 2px 0 0;
}

/* Danger Zone */
.us-danger-zone {
    margin-top: 32px;
    padding: 20px;
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: 16px;
    background: rgba(239,68,68,0.04);
    text-align: center;
}
.us-danger-header {
    font-size: 0.82rem;
    font-weight: 600;
    color: #fca5a5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}
.us-danger-header i {
    margin-right: 5px;
    color: #ef4444;
}

@media (max-width: 768px) {
    .us-page-title {
        font-size: 1.15rem;
    }
    .us-profile-inner {
        gap: 12px;
    }
    .us-profile-avatar {
        width: 46px; height: 46px;
    }
    .us-profile-name {
        font-size: 0.95rem;
    }
    .us-profile-details {
        flex-direction: column;
        gap: 4px;
        font-size: 0.78rem;
    }
    .us-card-header {
        padding: 14px 16px;
    }
    .settings-input-group {
        flex-direction: column;
    }
    .settings-send-btn {
        width: 100%;
    }
}
