/* CSS Design System for Masjid Kaladeenpur */
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --primary: hsl(152, 69%, 19%);      /* Deep Emerald */
    --primary-light: hsl(152, 55%, 28%);
    --primary-dark: hsl(152, 75%, 11%);
    --primary-glow: hsla(152, 69%, 19%, 0.15);
    --accent: rgb(212, 163, 89);        /* Soft Gold */
    --accent-hover: rgb(194, 143, 67);
    --bg-main: hsl(210, 20%, 97%);      /* Sleek light grey */
    --bg-card: hsl(0, 0%, 100%);
    --bg-sidebar: hsl(152, 75%, 10%);   /* Very dark forest green */
    
    --text-main: hsl(210, 24%, 15%);
    --text-muted: hsl(210, 14%, 45%);
    --text-light: hsl(210, 10%, 75%);
    --text-white: hsl(0, 0%, 100%);
    
    --border: hsl(210, 14%, 90%);
    --border-focus: hsl(152, 55%, 45%);
    
    --success: hsl(142, 70%, 35%);
    --success-bg: hsl(142, 70%, 95%);
    --warning: hsl(38, 92%, 42%);
    --warning-bg: hsl(45, 100%, 94%);
    --danger: hsl(0, 75%, 45%);
    --danger-bg: hsl(0, 75%, 96%);
    
    /* Layout Constants */
    --sidebar-width: 260px;
    --header-height: 70px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 30px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 30px rgba(15, 81, 50, 0.08);
    --shadow-glow: 0 0 15px rgba(212, 163, 89, 0.3);
    
    /* Animations */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 480px) {
    .profile-card-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-name {
        max-width: 100%;
        line-height: 1.1;
    }

    .profile-card-header .badge {
        margin-top: 8px;
    }
}

/* Dark Mode Overrides */
:root.dark-mode {
    --bg-main: hsl(152, 10%, 10%);       /* Very dark green-grey */
    --bg-card: hsl(152, 12%, 14%);       /* Slightly lighter for cards */
    --bg-sidebar: hsl(152, 35%, 6%);     /* Even darker sidebar */
    
    --text-main: hsl(210, 20%, 95%);
    --text-muted: hsl(210, 14%, 65%);
    --text-light: hsl(210, 10%, 80%);
    
    --border: hsl(152, 15%, 22%);
    --border-focus: hsl(152, 55%, 45%);
    
    --success-bg: hsl(142, 70%, 15%);
    --warning-bg: hsl(38, 60%, 18%);
    --danger-bg: hsl(0, 75%, 15%);
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.2);
}

:root.dark-mode body {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M30 30l15-15L30 0 15 15l15 15zm0-30L15-15 0 0l15 15L30 0zm0 60L15 45 0 60l15 15L30 60zm30-30L45 15 30 30l15 15L60 30zm0-30L45-15 30 0l15 15L60 0zm0 60L45 45 30 60l15 15L60 60zM15 15L0-15-15 0l15 15L15 15zm0 60L0 45-15 60l15 15L15 75z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23115336' fill-opacity='0.02'%3E%3Cpath d='M30 30l15-15L30 0 15 15l15 15zm0-30L15-15 0 0l15 15L30 0zm0 60L15 45 0 60l15 15L30 60zm30-30L45 15 30 30l15 15L60 30zm0-30L45-15 30 0l15 15L60 0zm0 60L45 45 30 60l15 15L60 60zM15 15L0-15-15 0l15 15L15 15zm0 60L0 45-15 60l15 15L15 75z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-size: 100px;
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    font-weight: 600;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* Login Page Styling */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-main);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23115336' fill-opacity='0.02'%3E%3Cpath d='M30 30l15-15L30 0 15 15l15 15zm0-30L15-15 0 0l15 15L30 0zm0 60L15 45 0 60l15 15L30 60zm30-30L45 15 30 30l15 15L60 30zm0-30L45-15 30 0l15 15L60 0zm0 60L45 45 30 60l15 15L60 60zM15 15L0-15-15 0l15 15L15 15zm0 60L0 45-15 60l15 15L15 75z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-size: 100px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

:root.dark-mode .login-body {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M30 30l15-15L30 0 15 15l15 15zm0-30L15-15 0 0l15 15L30 0zm0 60L15 45 0 60l15 15L30 60zm30-30L45 15 30 30l15 15L60 30zm0-30L45-15 30 0l15 15L60 0zm0 60L45 45 30 60l15 15L60 60zM15 15L0-15-15 0l15 15L15 15zm0 60L0 45-15 60l15 15L15 75z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    z-index: 10;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.login-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-lg);
    padding: 40px 35px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    text-align: center;
}

.login-logo svg {
    width: 55px;
    height: 55px;
    fill: var(--primary);
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.login-logo h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.4rem, 4vw, 1.75rem);
    font-weight: 700;
    color: var(--text-main);
    margin-top: 8px;
    margin-bottom: 4px;
    line-height: 1.3;
}

.login-logo p {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 4px;
}

.login-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    justify-content: center;
}

.login-tab {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-main);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}

.login-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-white);
}

.login-tab:not(.active):hover {
    border-color: var(--primary-light);
    background-color: var(--bg-main);
}

:root.dark-mode .login-tab:not(.active):hover {
    border-color: var(--accent);
    background-color: var(--border);
}

.login-form {
    display: none;
}

.login-form.active {
    display: block;
}

.member-dashboard-topbar {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 200;
}

.member-dashboard-summary {
    display: grid;
    gap: 10px;
    padding: 16px 0 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.member-info-row {
    font-size: 14px;
    color: var(--text-muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
}

.payment-status-section {
    margin-top: 10px;
}

.section-title {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-dark);
}

.payment-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.payment-month {
    border-radius: var(--radius-md);
    padding: 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.payment-month.paid {
    border-color: var(--success);
    background: var(--success-bg);
}

.payment-month.unpaid {
    border-color: var(--danger);
    background: var(--danger-bg);
}

.month-name {
    font-weight: 700;
    color: var(--text-main);
}

.month-status {
    font-size: 13px;
    color: var(--text-muted);
}

.member-dashboard-body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    background-color: var(--bg-main);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23115336' fill-opacity='0.02'%3E%3Cpath d='M30 30l15-15L30 0 15 15l15 15zm0-30L15-15 0 0l15 15L30 0zm0 60L15 45 0 60l15 15L30 60zm30-30L45 15 30 30l15 15L60 30zm0-30L45-15 30 0l15 15L60 0zm0 60L45 45 30 60l15 15L60 60zM15 15L0-15-15 0l15 15L15 15zm0 60L0 45-15 60l15 15L15 75z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-size: 100px;
    position: relative;
    overflow: hidden;
    padding: 80px 20px 40px;
}

:root.dark-mode .member-dashboard-body {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M30 30l15-15L30 0 15 15l15 15zm0-30L15-15 0 0l15 15L30 0zm0 60L15 45 0 60l15 15L30 60zm30-30L45 15 30 30l15 15L60 30zm0-30L45-15 30 0l15 15L60 0zm0 60L45 45 30 60l15 15L60 60zM15 15L0-15-15 0l15 15L15 15zm0 60L0 45-15 60l15 15L15 75z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.member-dashboard-container {
    width: 100%;
    max-width: 980px;
    padding: 0 20px 40px;
    z-index: 10;
    animation: fadeIn var(--transition-normal);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.member-dashboard-topbar {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 200;
    display: flex;
    gap: 10px;
    align-items: center;
}

.member-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.member-dashboard-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--text-main);
}

.member-dashboard-header p {
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 640px;
}

.member-info-card {
    margin-bottom: 24px;
}

.member-info-card .card-body {
    padding: 0;
}

.member-info-grid {
    display: grid;
    gap: 0;
    width: 100%;
}

.member-info-row {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    font-size: 14px;
    color: var(--text-main);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

.member-info-row:last-child {
    border-bottom: none;
}

.member-info-row span {
    color: var(--text-muted);
    font-weight: 700;
}

.member-info-row > *:nth-child(2) {
    color: var(--text-main);
}

.member-dashboard-meta .member-info-row strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
}

.payment-status-section {
    margin-top: 10px;
}

.section-title {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-dark);
}

.payment-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.payment-month {
    border-radius: var(--radius-md);
    padding: 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.payment-month.paid {
    border-color: var(--success);
    background: var(--success-bg);
}

.payment-month.unpaid {
    border-color: var(--danger);
    background: var(--danger-bg);
}

.month-name {
    font-weight: 700;
    color: var(--text-main);
}

.month-status {
    font-size: 13px;
    color: var(--text-muted);
}

.member-dashboard-note {
    margin-top: 20px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--bg-main);
    color: var(--text-main);
}

.success-note {
    border: 1px solid var(--success);
    background: var(--success-bg);
}

@media (max-width: 980px) {
    .dashboard-grid,
    .payment-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .dashboard-filters {
        display: grid;
        width: 100%;
        grid-template-columns: 1fr;
        padding: 20px;
        align-items: stretch;
    }

    .filter-summary,
    .filter-form {
        width: 100%;
        align-self: stretch;
    }

    .filter-form {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .filter-field {
        width: 100%;
    }

    .filter-field select {
        min-width: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .member-info-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .dashboard-filters {
        padding: 18px;
        gap: 14px;
    }

    .filter-summary {
        padding-bottom: 8px;
    }

    .filter-form {
        grid-template-columns: 1fr;
    }

    .filter-field {
        min-width: 0;
    }

    .stat-card {
        padding: 18px;
    }

    .stat-value {
        font-size: 24px;
    }

    .member-info-row {
        padding: 14px 16px;
    }

    .payment-status-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .payment-month {
        padding: 14px 16px;
    }

    .member-dashboard-container {
        max-height: none;
        overflow: visible;
        padding-bottom: 24px;
    }

    .member-dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 640px) {
    .member-dashboard-body {
        padding: 18px 10px 24px;
    }

    .member-dashboard-container {
        margin: 0 auto;
        padding: 0;
        max-width: 100%;
        max-height: none;
        overflow: visible;
    }

    .dashboard-grid,
    .payment-status-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-filters {
        grid-template-columns: 1fr;
        padding: 18px;
        gap: 14px;
    }

    .filter-summary,
    .filter-form {
        width: 100%;
    }

    .filter-form {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .filter-field {
        width: 100%;
        min-width: 0;
    }

    .filter-field select {
        min-width: 0;
    }

    .member-dashboard-topbar {
        position: static;
        width: 100%;
        max-width: 100%;
        display: flex;
        /* flex-wrap: wrap; */
        justify-content: center;
        gap: 10px;
        padding: 0 0 18px;
        right: auto;
        top: auto;
    }

    .member-dashboard-topbar .btn {
        flex: 1 1 100%;
        min-width: 0;
        max-width: none;
    }

    .card {
        margin-bottom: 20px;
    }

    .modal-container {
        margin: 0 16px;
    }

    .filter-summary {
        padding-bottom: 10px;
    }

    .dashboard-filters {
        justify-items: stretch;
    }

    .payment-month {
        min-width: 0;
    }
}

@media (max-width: 520px) {
    .dashboard-filters {
        padding: 16px;
        gap: 12px;
    }

    .filter-form {
        gap: 12px;
    }

    .filter-field select {
        font-size: 13px;
        padding: 10px 12px;
    }

    .stat-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .stat-icon-wrapper {
        width: 48px;
        height: 48px;
    }

    .stat-value {
        font-size: 22px;
    }

    .stat-label {
        font-size: 12px;
    }

    .payment-month {
        padding: 12px;
    }

    .member-info-row {
        padding: 12px 14px;
    }

    .member-dashboard-body {
        padding: 18px 10px 32px;
    }

    .member-dashboard-container {
        padding: 0;
    }

    .card-header {
        padding: 16px 18px;
    }

    .card-body {
        padding: 18px;
    }
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: var(--transition-normal);
    box-shadow: 4px 0 25px rgba(0,0,0,0.15);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-white);
}

.sidebar-brand svg {
    width: 32px;
    height: 32px;
    fill: var(--accent);
    flex-shrink: 0;
}

.sidebar-brand span {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

.sidebar-menu {
    list-style: none;
    padding: 24px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-menu-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.sidebar-menu-item a svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.sidebar-menu-item a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
}

.sidebar-menu-item.active a {
    background-color: var(--primary-light);
    color: var(--text-white);
    box-shadow: var(--shadow-sm);
}

.sidebar-menu-item.active a svg {
    fill: var(--accent);
}

.sidebar-footer {
    padding: 20px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: hsl(0, 80%, 75%);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.sidebar-footer a:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: hsl(0, 90%, 85%);
}

.sidebar-footer a svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    transition: var(--transition-normal);
}

/* Top Header */
.top-header {
    height: var(--header-height);
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 35px;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: var(--shadow-sm);
}

.header-title-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-title-area h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.header-user-area {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--primary-glow);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    border: 2px solid var(--primary-light);
}

.user-info span {
    font-size: 14px;
    font-weight: 600;
    display: block;
}

.user-info small {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

.mobile-nav-toggle svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

/* Content Layout */
.content-wrapper {
    padding: 35px;
    flex: 1;
    animation: fadeIn var(--transition-normal);
}

/* Stats Dashboard Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 35px;
}

.stat-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    border-bottom: 3px solid var(--primary); /* Emerald green bottom border */
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23115336' fill-opacity='1'%3E%3Cpath d='M30 30l15-15L30 0 15 15l15 15zm0-30L15-15 0 0l15 15L30 0zm0 60L15 45 0 60l15 15L30 60zm30-30L45 15 30 30l15 15L60 30zm0-30L45-15 30 0l15 15L60 0zm0 60L45 45 30 60l15 15L60 60zM15 15L0-15-15 0l15 15L15 15zm0 60L0 45-15 60l15 15L15 75z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-size: 60px;
    z-index: 0;
}

.stat-card > * {
    position: relative;
    z-index: 1;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
    border-bottom-color: var(--accent);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
}

.stat-icon-wrapper {
    width: 55px;
    height: 55px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-wrapper.primary {
    background-color: var(--primary-glow);
    color: var(--primary);
}

.stat-icon-wrapper.accent {
    background-color: rgba(212, 163, 89, 0.12);
    color: var(--accent-hover);
}

.stat-icon-wrapper svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

/* Dashboard filter panel */
.dashboard-filters {
    display: grid;
    grid-template-columns: minmax(220px, 360px) minmax(260px, 1fr);
    align-items: start;
    gap: 18px;
    margin-bottom: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
}

.filter-summary {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.filter-summary h3 {
    margin: 0 0 6px;
    font-size: 14px;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-summary p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 18px;
    width: 100%;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.filter-field label {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-field select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 14px;
}

/* Dashboard Layout Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .top-header {
        padding: 0 24px;
    }

    .header-title-area h1 {
        font-size: 18px;
    }

    .stats-grid {
        gap: 18px;
    }

    .card-body {
        padding: 20px;
    }

    .card-header {
        padding: 18px 20px;
    }
}

/* Card components */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
}

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

.card-header h2 {
    font-size: 16px;
    font-weight: 700;
}

.card-body {
    padding: 24px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-fast);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--text-white);
}

.btn-primary:hover {
    background-color: var(--primary-light);
}

.btn-accent {
    background-color: var(--accent);
    color: var(--primary-dark);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
}

.btn-outline {
    border-color: var(--border);
    background-color: transparent;
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: var(--bg-main);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 11px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    background-color: var(--bg-card);
    color: var(--text-main);
    transition: var(--transition-fast);
}

.form-control:hover {
    border-color: var(--primary-light);
}

:root.dark-mode .form-control:hover {
    border-color: var(--accent);
}

.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

/* Table Style */
.table-container {
    overflow-x: auto;
    overflow-y: visible;
    border-radius: var(--radius-sm);
}

/* Members filter row - desktop defaults */
.members-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.members-filter-row .search-input-container {
    flex: 1 1 auto;
    min-width: 280px;
}

.members-filter-row .members-filter-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

/* Column width preferences: make Fees Ledger (3rd column) wider */
.data-table th:first-child,
.data-table td:first-child {
    width: 22%;
}

.data-table th:nth-child(2),
.data-table td:nth-child(2) {
    width: 18%;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) {
    width: 45%;
}

.data-table th:nth-child(4),
.data-table td:nth-child(4) {
    width: 15%;
    min-width: 140px;
}

.data-table th {
    background-color: var(--bg-main);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
}

.data-table tbody tr {
    transition: var(--transition-fast);
}

.data-table tbody tr:hover {
    background-color: hsla(152, 69%, 19%, 0.02);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-xl);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background-color: var(--success-bg);
    color: var(--success);
}

.badge-danger {
    background-color: var(--danger-bg);
    color: var(--danger);
}

/* Search bar styling */
.search-bar-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    width: 100%;
}

.search-input-container {
    position: relative;
    flex: 1;
}

.search-input-container svg {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: var(--text-muted);
}

.search-input-container .form-control {
    padding-left: 45px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 81, 50, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal) ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 48px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    transform: scale(0.9);
    transition: transform var(--transition-normal) ease;
    overflow-y: auto;
    margin: 0 16px;
}

.modal-overlay.open .modal-container {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-main);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-dark);
}

:root.dark-mode .modal-header h3 {
    color: var(--accent);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.modal-close svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 24px;
}

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

/* Tabs */
.tabs-navigation {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
    gap: 20px;
}

.tab-btn {
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 12px 8px;
    cursor: pointer;
    position: relative;
    transition: var(--transition-fast);
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn var(--transition-fast);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background-color: var(--bg-card);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    overflow: hidden;
    position: relative;
    animation: slideInRight var(--transition-normal) forwards;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-content svg {
    width: 20px;
    height: 20px;
}

.toast.success {
    border-left-color: var(--success);
}
.toast.success svg {
    fill: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}
.toast.error svg {
    fill: var(--danger);
}

.toast-message {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
}

.toast-close svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: rgba(0,0,0,0.06);
    animation: toastProgress 4s linear forwards;
}

/* Empty State Styling */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state svg {
    width: 60px;
    height: 60px;
    fill: var(--text-light);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 16px;
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Quick Stats Bar */
.progress-container {
    width: 100%;
    background-color: var(--bg-main);
    height: 6px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-xl);
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }
    
    body {
        overflow-x: hidden;
    }

    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 260px;
        transform: translateX(-100%);
        height: 100vh;
        min-height: 100vh;
        transition: transform var(--transition-normal);
        z-index: 110;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.45);
        z-index: 105;
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition-fast);
    }
    
    .sidebar-backdrop.active {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .top-header {
        padding: 10px 16px;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 10px;
        align-items: flex-start;
        height: auto;
        min-height: var(--header-height);
    }
    
    .header-title-area {
        display: flex;
        align-items: center;
        gap: 12px;
        width: auto;
        min-width: 0;
        flex: 1 1 auto;
        padding-top: 8px;
    }

    .header-title-area h1 {
        font-size: 18px;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .header-user-area {
        width: auto;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 0;
    }
    
    .header-user-area .user-profile {
        min-width: 0;
    }
    
    .header-user-area .user-info {
        min-width: 0;
    }
    
    .mobile-nav-toggle {
        display: block;
        z-index: 120;
    }
    
    .sidebar-menu {
        padding: 18px 14px;
    }
    
    .sidebar-menu-item a {
        padding: 12px 14px;
    }
    
    .sidebar-footer {
        padding: 18px 14px;
    }
    
    .content-wrapper {
        padding: 18px;
    }
    
    .search-bar-wrapper {
        flex-direction: column;
    }
    
    .search-bar-wrapper .btn {
        width: 100%;
    }
    
    .stats-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .form-row-two-col {
        grid-template-columns: 1fr !important;
    }

    .filter-summary {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .filter-form {
        width: 100%;
        justify-content: flex-start;
    }

    .filter-field {
        min-width: 0;
        width: 100%;
        flex: 1 1 100%;
    }

    .member-info-row {
        grid-template-columns: 1fr;
    }

    .payment-status-grid {
        grid-template-columns: 1fr;
    }

    .member-dashboard-topbar {
        position: static;
        justify-content: center;
        width: 100%;
        padding-bottom: 10px;
    }

    .member-dashboard-container {
        max-width: 100%;
        max-height: none;
        padding-top: 20px;
    }
    
    .card-header {
        padding: 16px 18px;
    }
    
    .card-body {
        padding: 18px;
    }
    
    .login-container {
        padding: 16px;
        margin: 0 auto;
    }
    
    .login-card {
        padding: 28px 20px;
        margin: 20px 0;
    }

    .login-top-actions {
        bottom: 12px;
        right: 12px;
        left: 12px;
        justify-content: center;
        flex-wrap: wrap;
        width: auto;
        max-width: calc(100% - 24px);
    }

    .login-donate-btn,
    .login-theme-toggle {
        padding: 9px 14px;
        font-size: 12px;
        width: auto;
        max-width: 100%;
    }

    .login-tabs {
        flex-wrap: wrap;
    }

    .login-tab {
        flex: 1 1 45%;
        min-width: 140px;
    }

    .login-logo h2 {
        font-size: 20px;
    }

    .login-logo p {
        font-size: 12px;
    }

    .login-footer {
        padding: 0 12px;
    }

    .donate-modal-container {
        max-width: 92vw;
        margin: 0 16px;
    }

    .members-filter-row {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .members-filter-row .search-input-container {
        width: 100%;
        margin: 0;
        min-width: 0;
    }

    .members-filter-row .members-filter-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
    }

    .members-filter-row .members-filter-actions form {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 0 0 auto;
    }

    .members-filter-row .members-filter-actions form label {
        display: inline-block;
        white-space: nowrap;
        font-size: 13px;
    }

    .members-filter-row .members-filter-actions select,
    .members-filter-row .members-filter-actions .form-control {
        min-width: 120px;
    }

    .data-table th,
    .data-table td {
        padding: 12px 14px;
    }

    .month-badge {
        height: 28px;
        font-size: 8px;
    }

    /* Keep fee badges in a single row on mobile; allow horizontal scroll */
    .fees-grid {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
    }

    .month-badge {
        flex: 0 0 auto;
    }

    /* Member details column layout on mobile: avatar + two-line name */
    .data-table td:first-child > div {
        display: flex;
        align-items: center;
        gap: 14px;
        width: 180px;
        min-width: 0;
    }

    .data-table td:first-child .member-profile-link {
        display: block;
        white-space: normal;
        overflow-wrap: anywhere;
        /* max-width: calc(100% - 80px); */
    }
}

/* Improve members filter layout on small screens */
@media (max-width: 480px) {
    .members-filter-row {
        gap: 12px;
        align-items: stretch;
    }

    .members-filter-row .members-filter-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .members-filter-row .members-filter-actions form {
        display: block;
        width: 100%;
        margin: 0;
    }

    .members-filter-row .members-filter-actions form label {
        display: block;
        margin-bottom: 6px;
        font-size: 13px;
    }

    .members-filter-row .members-filter-actions select {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* hide inline vertical separators used on desktop */
    .members-filter-row .members-filter-actions > div[style*="border-left"] {
        display: none !important;
    }

    .members-filter-row .members-filter-actions .btn {
        width: 100%;
    }

    .login-body {
        align-items: stretch;
        justify-content: flex-start;
        min-height: 100vh;
        padding: 12px 0 0;
    }

    .login-container {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        min-height: auto;
        max-width: 100%;
        padding: 45px 10px 0px !important;
        margin: 0 auto;
    }

    .login-card {
        padding: 18px 14px;
        margin: 0;
        width: 100%;
    }

    .login-logo {
        margin-bottom: 18px;
    }

    .login-logo h2 {
        font-size: 18px;
    }

    .login-logo p {
        font-size: 11px;
    }

    .login-tabs {
        gap: 8px;
        flex-direction: column;
    }

    .login-tab {
        font-size: 13px;
        padding: 10px 12px;
        flex: 1 1 100%;
        min-width: 0;
    }

    .login-top-actions {
        position: fixed;
        bottom: -300px;
        right: 160px;
        z-index: 200;
        justify-content: flex-end;
        gap: 8px;
    }

    .login-donate-btn,
    .login-theme-toggle {
        padding: 10px 12px;
        font-size: 12px;
    }

    .login-theme-toggle {
        width: 40px;
        height: 40px;
    }

    .login-footer {
        font-size: 13px;
        padding: 0 10px;
        margin: 0;
    }
}

/* Monthly Fees Ledger Grid */
/* Monthly Fees Ledger Grid */
.fees-grid {
    display: flex;
    gap: 6px;
    align-items: center;
}

.month-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 30px;
    padding: 0 8px;
    font-size: 9px;
    font-weight: 700;
    border-radius: 6px;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-fast);
    user-select: none;
}

.month-badge.paid {
    background-color: var(--success);
    color: var(--text-white);
    border: 1px solid var(--success);
}

.month-badge.paid:hover {
    filter: brightness(1.15);
    transform: scale(1.08);
}

.month-badge.due {
    background-color: var(--danger-bg);
    color: var(--danger);
    border: 1px dashed rgba(220, 53, 69, 0.4);
}

.month-badge.due:hover {
    background-color: var(--danger);
    color: var(--text-white);
    border: 1px solid var(--danger);
    transform: scale(1.08);
}

.month-badge.partial {
    background-color: var(--warning-bg);
    color: var(--warning);
    border: 1px solid hsl(38, 92%, 55%);
    box-shadow: inset 0 0 0 1px hsla(38, 92%, 42%, 0.15);
}

.month-badge.partial:hover {
    background-color: var(--warning);
    color: var(--text-white);
    border: 1px solid var(--warning);
    transform: scale(1.08);
}

.fees-summary-text {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 6px;
}

/* Member Profile Popup Details */
.member-profile-link,
.member-name-link {
    color: var(--primary-dark);
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;
}

.member-profile-link:hover,
.member-name-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

:root.dark-mode .member-profile-link,
:root.dark-mode .member-name-link {
    color: var(--accent);
}

:root.dark-mode .member-profile-link:hover,
:root.dark-mode .member-name-link:hover {
    color: var(--accent-hover);
}

.profile-card-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    gap: 16px;
}

.profile-avatar-large {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--primary-glow);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    border: 3px solid var(--primary-light);
    margin: 0;
    flex: 0 0 auto;
}

:root.dark-mode .profile-avatar-large {
    color: var(--accent);
    border-color: var(--accent);
    background-color: rgba(212, 163, 89, 0.1);
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 6px 0;
    line-height: 1.05;
    word-break: break-word;
    max-width: calc(100% - 90px);
}

.profile-card-header .badge {
    margin-left: 0;
    margin-top: 6px;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.profile-info-item {
    background-color: var(--bg-main);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.profile-info-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.profile-info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    word-break: break-all;
}

.profile-info-value a {
    color: var(--primary);
    text-decoration: none;
}

.profile-info-value a:hover {
    text-decoration: underline;
}

:root.dark-mode .profile-info-value a {
    color: var(--accent);
}

:root.dark-mode .profile-info-value a:hover {
    color: var(--accent-hover);
}

.profile-address-box {
    background-color: var(--bg-main);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.profile-fees-summary {
    background: linear-gradient(135deg, hsla(152, 69%, 19%, 0.05) 0%, hsla(38, 61%, 59%, 0.05) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
}

.profile-fees-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.profile-fees-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.profile-fee-stat-val {
    font-size: 20px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.profile-fee-amount {
    color: var(--primary-dark);
}

/* Dark Mode Overrides for Profile Fees Summary */
:root.dark-mode .profile-fees-title {
    color: var(--accent);
}

:root.dark-mode .profile-fee-amount {
    color: var(--text-main);
}

.avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-glow);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    border: 1.5px solid var(--primary-light);
    flex-shrink: 0;
}

/* Premium Login UI Extensions */
.login-body {
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

.login-blobs-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.login-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
}

.login-blob-1 {
    width: 350px;
    height: 350px;
    background: rgba(212, 163, 89, 0.15); /* Gold glow */
    top: -100px;
    right: -100px;
}

.login-blob-2 {
    width: 450px;
    height: 450px;
    background: rgba(16, 185, 129, 0.15); /* Emerald glow */
    bottom: -150px;
    left: -150px;
}

.login-blob-3 {
    width: 250px;
    height: 250px;
    background: rgba(56, 189, 248, 0.08); /* Sky blue glow */
    top: 50%;
    left: 20%;
    transform: translateY(-50%);
}

.login-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                border-color 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

:root.dark-mode .login-card {
    background: rgba(21, 32, 26, 0.85);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.login-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 163, 89, 0.35);
    box-shadow: 0 30px 60px rgba(212, 163, 89, 0.08), 0 30px 60px rgba(0, 0, 0, 0.15), 0 3px 10px rgba(0, 0, 0, 0.08);
}

:root.dark-mode .login-card:hover {
    border-color: rgba(212, 163, 89, 0.5);
    box-shadow: 0 30px 60px rgba(212, 163, 89, 0.15), 0 40px 80px rgba(0, 0, 0, 0.55);
}

@keyframes slideUpFade {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.login-logo svg {
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.6s ease;
}

.login-card:hover .login-logo svg {
    transform: scale(1.08) rotate(3deg);
    filter: drop-shadow(0 0 12px rgba(212, 163, 89, 0.4));
}

.login-theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.login-theme-toggle:hover {
    background: var(--bg-main);
    transform: scale(1.05);
}

:root.dark-mode .login-theme-toggle {
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--accent);
}

.login-theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.input-relative-wrapper {
    position: relative;
    width: 100%;
}

.input-icon-left {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.input-icon-left svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.form-control.input-with-icon-left {
    padding-left: 44px;
}

.input-icon-right {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.input-icon-right:hover {
    color: var(--primary-light);
    background-color: rgba(0, 0, 0, 0.03);
}

:root.dark-mode .input-icon-right:hover {
    color: var(--accent);
    background-color: rgba(255, 255, 255, 0.05);
}

.input-icon-right svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.form-control.input-with-icon-right {
    padding-right: 44px;
}

.input-relative-wrapper:focus-within .input-icon-left {
    color: var(--primary);
}

:root.dark-mode .input-relative-wrapper:focus-within .input-icon-left {
    color: var(--accent);
}

.btn-login {
    width: 100%;
    padding: 13px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-white);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: 1px solid var(--primary-dark);
    box-shadow: 0 4px 12px var(--primary-glow);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.25);
}

.btn-login:active {
    transform: translateY(0);
}

:root.dark-mode .btn-login {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: var(--primary-dark);
    border: 1px solid var(--accent-hover);
    box-shadow: 0 4px 12px rgba(212, 163, 89, 0.2);
}

:root.dark-mode .btn-login:hover {
    background: linear-gradient(135deg, rgb(228, 181, 108) 0%, var(--accent) 100%);
    box-shadow: 0 6px 18px rgba(212, 163, 89, 0.35);
}

/* Dark Mode visibility overrides */
:root.dark-mode .login-logo h2 {
    color: var(--text-main);
}

:root.dark-mode .login-logo svg {
    fill: var(--accent);
}

:root.dark-mode .login-logo p {
    color: var(--accent);
}




/* ============================================================
   LOGIN PAGE — TOP ACTION BUTTONS (Donate + Theme Toggle)
   ============================================================ */

.login-top-actions {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

/* Override the old fixed positioning since we now use the wrapper */
.login-theme-toggle {
    position: static !important;
    pointer-events: auto;
}

.login-donate-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: 1px solid var(--primary-dark);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px var(--primary-glow);
    transition: all 0.25s ease;
    pointer-events: auto;
}

.login-donate-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

.login-donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.25);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.login-donate-btn:active {
    transform: translateY(0);
}

:root.dark-mode .login-donate-btn {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: var(--primary-dark);
    border: 1px solid var(--accent-hover);
    box-shadow: 0 4px 12px rgba(212, 163, 89, 0.2);
}

:root.dark-mode .login-donate-btn:hover {
    background: linear-gradient(135deg, rgb(228, 181, 108) 0%, var(--accent) 100%);
    box-shadow: 0 6px 18px rgba(212, 163, 89, 0.35);
}

.login-footer {
    margin: 20px auto 0;
    text-align: center;
    font-size: 14px;
}

.login-footer .footer-link {
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    transition: all 0.2s ease;
}

.login-footer .footer-link:hover {
    color: var(--accent);
    background: rgba(255,255,255,0.08);
    transform: translateY(-1px);
}

/* ============================================================
   DONATE MODAL OVERLAY
   ============================================================ */

.donate-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.donate-modal-overlay.open {
    display: flex;
}

.donate-modal-container {
    background: var(--bg-card);
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: donateModalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

@keyframes donateModalIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

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

.donate-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.donate-modal-title svg {
    width: 22px;
    height: 22px;
    fill: #e53e3e;
    flex-shrink: 0;
}

.donate-modal-title h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.donate-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-main);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.donate-modal-close:hover {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger-bg);
}

.donate-modal-close svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.donate-modal-body {
    padding: 24px;
    text-align: center;
    overflow-y: auto;
}

.donate-modal-body > p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.donate-qr-wrapper {
    display: inline-block;
    padding: 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.donate-qr-wrapper img {
    display: block;
    width: 220px;
    height: 220px;
    object-fit: contain;
    border-radius: 6px;
}

.donate-footer-text {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 4px !important;
}

/* No QR placeholder */
.donate-no-qr {
    padding: 20px 0 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.donate-no-qr svg {
    opacity: 0.4;
}

/* ============================================================
   SETTINGS PAGE — DONATE QR PREVIEW
   ============================================================ */

.donate-settings-preview {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.donate-preview-img-wrapper {
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.donate-preview-img-wrapper img {
    display: block;
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 4px;
}

.donate-preview-info {
    flex: 1;
    min-width: 160px;
}

.donate-upload-area {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-main);
    overflow: hidden;
}

.donate-upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-glow);
}

/* ============================================================
   SIDEBAR — FOLD / UNFOLD (DESKTOP HAMBURGER)
   ============================================================ */

:root {
    --sidebar-collapsed-width: 64px;
}

/* ── Fold toggle button ── */
.sidebar-fold-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
    margin-left: auto;
}

.sidebar-fold-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.sidebar-fold-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

/* ── Label spans — transition smoothly ── */
.sidebar-brand-text,
.sidebar-label {
    transition: opacity 0.25s ease, max-width 0.3s ease;
    max-width: 200px;
    overflow: hidden;
    white-space: nowrap;
    display: inline-block;
}

/* ── Sidebar width transition ── */
.sidebar {
    transition: width var(--transition-normal);
    overflow: hidden;
}

.main-content {
    transition: margin-left var(--transition-normal);
}

/* ══════════════════════════════════════════
   COLLAPSED STATE  (class on <html>)
══════════════════════════════════════════ */

/* Narrow the sidebar */
:root.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

/* Shift main content */
:root.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Hide labels */
:root.sidebar-collapsed .sidebar-brand-text,
:root.sidebar-collapsed .sidebar-label {
    opacity: 0;
    max-width: 0;
    pointer-events: none;
}

/* Center brand icon */
:root.sidebar-collapsed .sidebar-brand {
    justify-content: center;
    gap: 0;
}

/* Center menu links — keep icon visible */
:root.sidebar-collapsed .sidebar-menu-item a {
    justify-content: center;
    padding: 12px 0;
    gap: 0;
}

/* Center footer link */
:root.sidebar-collapsed .sidebar-footer a {
    justify-content: center;
    padding: 12px 0;
    gap: 0;
}

/* Adjust sidebar header layout */
:root.sidebar-collapsed .sidebar-header {
    padding: 0 8px;
    justify-content: center;
    gap: 0;
    flex-direction: column;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
}

:root.sidebar-collapsed .sidebar-fold-btn {
    margin-left: 0;
    margin-top: 6px;
}

/* Adjust menu padding */
:root.sidebar-collapsed .sidebar-menu {
    padding: 16px 8px;
}

:root.sidebar-collapsed .sidebar-footer {
    padding: 12px 8px;
}

/* ── Hide fold button on mobile ── */
@media (max-width: 768px) {
    .sidebar-fold-btn {
        display: none;
    }

    :root.sidebar-collapsed .sidebar {
        width: 260px;
    }

    :root.sidebar-collapsed .main-content {
        margin-left: 0;
    }
}

/* ============================================================
   MONTH BADGE — CUSTOM TOOLTIP (JS-positioned, body-appended)
   ============================================================ */

.month-badge.has-tooltip {
    position: relative;
}

#badge-tooltip {
    position: fixed;
    z-index: 999999;
    background: var(--text-main);
    color: var(--bg-card);
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.6;
    white-space: pre;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    min-width: 160px;
    text-align: left;
}

#badge-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

#badge-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--text-main);
}

#badge-tooltip.below::before {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: var(--text-main);
}

:root.dark-mode #badge-tooltip {
    background: hsl(210, 20%, 95%);
    color: hsl(210, 24%, 15%);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

:root.dark-mode #badge-tooltip::before {
    border-top-color: hsl(210, 20%, 95%);
}

:root.dark-mode #badge-tooltip.below::before {
    border-top-color: transparent;
    border-bottom-color: hsl(210, 20%, 95%);
}

/* ============================================================
   PREMIUM ISLAMIC UI DESIGN SYSTEM OVERRIDES
   ============================================================ */

/* Page Background Lattice & Glowing Wash */
.islamic-theme-page {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(circle at 50% -10%, rgba(212, 163, 89, 0.15) 0%, transparent 60%),
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23d4a359' stroke-width='0.6' stroke-opacity='0.08'%3E%3Cpath d='M40 0 L80 40 L40 80 L0 40 Z'/%3E%3Cpath d='M0 0 L80 80 M80 0 L0 80'/%3E%3Ccircle cx='40' cy='40' r='18'/%3E%3Cpath d='M40 25 L44 36 L55 40 L44 44 L40 55 L36 44 L25 40 L36 36 Z' fill='%23d4a359' fill-opacity='0.06' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
    background-size: auto, 80px 80px;
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}

:root.dark-mode .islamic-theme-page {
    background-image: 
        radial-gradient(circle at 50% -10%, rgba(212, 163, 89, 0.12) 0%, transparent 65%),
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23d4a359' stroke-width='0.6' stroke-opacity='0.05'%3E%3Cpath d='M40 0 L80 40 L40 80 L0 40 Z'/%3E%3Cpath d='M0 0 L80 80 M80 0 L0 80'/%3E%3Ccircle cx='40' cy='40' r='18'/%3E%3Cpath d='M40 25 L44 36 L55 40 L44 44 L40 55 L36 44 L25 40 L36 36 Z' fill='%23d4a359' fill-opacity='0.04' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
}

/* Elegant Bismillah Calligraphy Styling */
.bismillah-text {
    font-family: 'Amiri', serif;
    font-size: clamp(1.5rem, 8vw, 3.6rem);
    color: var(--accent);
    margin-bottom: 6px;
    line-height: 1.1;
    display: inline-block;
    transition: transform var(--transition-normal), text-shadow var(--transition-normal);
}
.bismillah-text:hover {
    transform: scale(1.08);
    text-shadow: 0 0 20px rgba(212, 163, 89, 0.55);
}

/* Elegant Card Overrides (Double Gold-Foil Border + Micro-Interactions) */
.islamic-theme-page .home-card,
.islamic-theme-page .dua-card,
.islamic-theme-page .login-card {
    background-color: var(--bg-card);
    background-image: radial-gradient(circle at 50% 10%, rgba(212, 163, 89, 0.01) 0%, transparent 80%);
    border: 1.5px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                border-color 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
                background-image 0.4s ease;
}

/* Double border outer gold */
.islamic-theme-page .home-card::before,
.islamic-theme-page .dua-card::before,
.islamic-theme-page .login-card::before {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(212, 163, 89, 0.12);
    pointer-events: none;
    transition: border-color var(--transition-normal);
    z-index: 1;
}

/* Double border inner dashed gold */
.islamic-theme-page .home-card::after,
.islamic-theme-page .dua-card::after,
.islamic-theme-page .login-card::after {
    content: '';
    position: absolute;
    inset: 10px;
    border: 0.8px dashed rgba(212, 163, 89, 0.08);
    pointer-events: none;
    transition: border-color var(--transition-normal), transform var(--transition-normal);
    z-index: 1;
}

/* Custom rounded shapes for home card vs dua card */
.islamic-theme-page .home-card {
    border-radius: 120px 120px var(--radius-md) var(--radius-md);
}
.islamic-theme-page .home-card::before {
    border-radius: 114px 114px var(--radius-sm) var(--radius-sm);
}
.islamic-theme-page .home-card::after {
    border-radius: 110px 110px 6px 6px;
}

.islamic-theme-page .dua-card,
.islamic-theme-page .login-card {
    border-radius: var(--radius-lg);
}
.islamic-theme-page .dua-card::before,
.islamic-theme-page .login-card::before {
    border-radius: calc(var(--radius-lg) - 6px);
}
.islamic-theme-page .dua-card::after,
.islamic-theme-page .login-card::after {
    border-radius: calc(var(--radius-lg) - 10px);
}

/* Card Hover states */
.islamic-theme-page .home-card:hover,
.islamic-theme-page .dua-card:hover,
.islamic-theme-page .login-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(212, 163, 89, 0.12), var(--shadow-lg);
    background-image: radial-gradient(circle at 50% 10%, rgba(212, 163, 89, 0.06) 0%, transparent 80%);
}

.islamic-theme-page .home-card:hover::before,
.islamic-theme-page .dua-card:hover::before,
.islamic-theme-page .login-card:hover::before {
    border-color: rgba(212, 163, 89, 0.4);
}

.islamic-theme-page .home-card:hover::after,
.islamic-theme-page .dua-card:hover::after,
.islamic-theme-page .login-card:hover::after {
    border-color: rgba(212, 163, 89, 0.28);
    transform: scale(0.99);
}

/* Highlight text in cards */
.islamic-theme-page .home-card h2,
.islamic-theme-page .dua-card h2 {
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.35rem;
    font-family: 'Outfit', sans-serif;
    transition: color var(--transition-fast);
}

.islamic-theme-page .home-card:hover h2,
.islamic-theme-page .dua-card:hover h2 {
    color: var(--primary-light);
}
:root.dark-mode .islamic-theme-page .home-card:hover h2,
:root.dark-mode .islamic-theme-page .dua-card:hover h2 {
    color: var(--accent);
}

/* Arabic Text Typography */
.arabic-text {
    font-family: 'Amiri', serif;
    font-size: 2.1rem;
    line-height: 1.8;
    color: var(--primary-dark);
    text-align: center;
    direction: rtl;
    margin: 16px 0;
    font-weight: 500;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
}
:root.dark-mode .arabic-text {
    color: hsl(0, 0%, 95%);
}

.transliteration-text {
    font-size: 0.95rem;
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 8px;
    line-height: 1.6;
}

.translation-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Modals Redesign (Illuminated manuscript borders & themes) */
.islamic-theme-page .donate-modal-container,
.islamic-theme-page .timetable-modal-container {
    border: 2px solid var(--accent);
    border-radius: 24px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4), 0 0 25px rgba(212, 163, 89, 0.15);
    position: relative;
}

.islamic-theme-page .donate-modal-container::before,
.islamic-theme-page .timetable-modal-container::before {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(212, 163, 89, 0.25);
    border-radius: 18px;
    pointer-events: none;
}

.islamic-theme-page .donate-modal-container::after,
.islamic-theme-page .timetable-modal-container::after {
    content: '';
    position: absolute;
    inset: 10px;
    border: 0.8px dashed rgba(212, 163, 89, 0.15);
    border-radius: 14px;
    pointer-events: none;
}

.islamic-theme-page .donate-modal-header,
.islamic-theme-page .timetable-modal-header {
    border-bottom: 1px solid rgba(212, 163, 89, 0.2);
    padding: 24px 28px 18px;
    position: relative;
    z-index: 2;
}

.islamic-theme-page .donate-modal-body,
.islamic-theme-page .timetable-modal-body {
    padding: 28px;
    position: relative;
    z-index: 2;
}

/* Beautiful Quran Verse in Donation Popup */
.donate-quran-verse {
    font-family: 'Amiri', serif;
    font-size: 1.15rem;
    color: var(--primary);
    line-height: 1.7;
    margin-bottom: 18px;
    padding: 0 10px;
}
:root.dark-mode .donate-quran-verse {
    color: var(--accent);
}

.donate-quran-translation {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
    padding: 0 10px;
}

/* Namaz Modal - Next Prayer Highlight */
.next-prayer-row {
    background-color: var(--primary-glow) !important;
    border-left: 4px solid var(--accent) !important;
}

.next-prayer-row td {
    font-weight: 700;
}

:root.dark-mode .next-prayer-row {
    background-color: rgba(212, 163, 89, 0.08) !important;
}

/* Back to Home Link in Login Page */
.back-to-home-wrapper {
    text-align: center;
    margin-top: 24px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.back-to-home-link {
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.back-to-home-link:hover {
    color: var(--accent);
    transform: translateX(-3px);
}

.back-to-home-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: transform var(--transition-fast);
}


/* ============================================================
   DASHBOARD — ISLAMIC THEME PREMIUM STYLES
   Matches the gold-foil aesthetic of the Home / Dua pages
   ============================================================ */

/* Gold geometric stat card double-border overlay */
.islamic-theme-page .stat-card {
    background-color: var(--bg-card);
    background-image: radial-gradient(circle at 50% 10%, rgba(212, 163, 89, 0.03) 0%, transparent 70%);
    border: 1.5px solid var(--border);
    border-bottom: 3px solid var(--accent);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
                box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
                border-color 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Inner gold outline — outer ring */
.islamic-theme-page .stat-card::before {
    content: '';
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(212, 163, 89, 0.10);
    border-radius: calc(var(--radius-md) - 5px);
    pointer-events: none;
    transition: border-color var(--transition-normal);
    z-index: 1;
}

/* Inner gold outline — dashed inner ring */
.islamic-theme-page .stat-card::after {
    content: '';
    position: absolute;
    inset: 9px;
    border: 0.8px dashed rgba(212, 163, 89, 0.07);
    border-radius: calc(var(--radius-md) - 9px);
    pointer-events: none;
    transition: border-color var(--transition-normal);
    z-index: 1;
}

/* Hover: gold glow lift */
.islamic-theme-page .stat-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    border-bottom-color: var(--accent);
    box-shadow: 0 16px 40px rgba(212, 163, 89, 0.14), var(--shadow-lg);
    background-image: radial-gradient(circle at 50% 10%, rgba(212, 163, 89, 0.07) 0%, transparent 70%);
}

.islamic-theme-page .stat-card:hover::before {
    border-color: rgba(212, 163, 89, 0.38);
}

.islamic-theme-page .stat-card:hover::after {
    border-color: rgba(212, 163, 89, 0.22);
}

/* Ensure stat card content stays above pseudo-elements */
.islamic-theme-page .stat-card > * {
    position: relative;
    z-index: 2;
}

/* Stat icon wrappers — gold accent variant */
.islamic-theme-page .stat-icon-wrapper.accent {
    background-color: rgba(212, 163, 89, 0.12);
    color: var(--accent);
}

/* Dashboard Banner — Premium Bismillah style */
.dashboard-banner {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, hsl(152, 60%, 22%) 100%);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
    border: 1.5px solid rgba(212, 163, 89, 0.25);
    box-shadow: 0 12px 40px rgba(17, 83, 54, 0.3), 0 2px 8px rgba(0,0,0,0.1);
}

/* Gold star geometric tile overlay */
.dashboard-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23d4a359' stroke-width='0.6' stroke-opacity='1'%3E%3Cpath d='M40 0 L80 40 L40 80 L0 40 Z'/%3E%3Cpath d='M0 0 L80 80 M80 0 L0 80'/%3E%3Ccircle cx='40' cy='40' r='18'/%3E%3Cpath d='M40 25 L44 36 L55 40 L44 44 L40 55 L36 44 L25 40 L36 36 Z' fill='%23d4a359' fill-opacity='0.8' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 80px;
    z-index: 0;
}

/* Gold inner frame */
.dashboard-banner::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(212, 163, 89, 0.18);
    border-radius: calc(var(--radius-lg) - 8px);
    pointer-events: none;
    z-index: 0;
}

.dashboard-banner-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.dashboard-banner-text .bismillah-text {
    font-size: clamp(1.6rem, 5vw, 2.8rem);
    color: var(--accent);
    margin-bottom: 2px;
    display: block;
    line-height: 1;
}

.dashboard-banner-text .banner-greeting {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.2rem, 3vw, 1.7rem);
    font-weight: 700;
    color: var(--accent);
    margin: 10px 0 4px;
    letter-spacing: -0.01em;
}

.dashboard-banner-text .banner-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    max-width: 480px;
}

.dashboard-banner-icon {
    opacity: 0.85;
    flex-shrink: 0;
}

/* Islamic section divider heading */
.section-heading-islamic {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(212, 163, 89, 0.2);
}

.section-heading-islamic h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.section-heading-islamic .section-badge {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(212, 163, 89, 0.1);
    border: 1px solid rgba(212, 163, 89, 0.25);
    border-radius: 20px;
    padding: 3px 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.section-heading-islamic .section-link {
    margin-left: auto;
    font-size: 13px;
    background-color: var(--primary);
    color: var(--text-white);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    /* border-radius: var(--radius-xl); */
    transition: var(--transition-fast);
    border-radius: var(--radius-sm);
}

.section-heading-islamic .section-link:hover {
    background-color: var(--primary-light);
    color: var(--text-white);
}

.section-heading-islamic .section-link svg {
    fill: currentColor;
    width: 14px;
    height: 14px;
}

/* Gold glow on sidebar brand in admin */
.islamic-theme-page .sidebar-brand {
    border-bottom: 1px solid rgba(212, 163, 89, 0.15);
    padding-bottom: 16px;
    margin-bottom: 4px;
}

.islamic-theme-page .sidebar-brand svg {
    transition: filter var(--transition-normal);
}

.islamic-theme-page .sidebar-brand:hover svg {
    filter: drop-shadow(0 0 8px rgba(212, 163, 89, 0.45));
}

/* Sidebar active item gold accent */
.islamic-theme-page .sidebar-menu-item.active > a {
    border-left: 3px solid var(--accent);
}

/* Sidebar active item glow */
.islamic-theme-page .sidebar-menu-item.active > a svg {
    filter: drop-shadow(0 0 5px rgba(212, 163, 89, 0.35));
}

/* Top header gold border bottom */
.islamic-theme-page .top-header {
    border-bottom: 1px solid rgba(212, 163, 89, 0.18);
}

/* Progress bar for chanda function */
.chanda-progress-bar {
    height: 6px;
    border-radius: 3px;
    background: rgba(212, 163, 89, 0.12);
    margin-top: 10px;
    overflow: hidden;
}

.chanda-progress-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--accent));
    transition: width 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Dark mode adjustments */
:root.dark-mode .islamic-theme-page .dashboard-banner {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

:root.dark-mode .islamic-theme-page .stat-card {
    background-color: var(--bg-card);
}

/* Chanda Dashboard legibility improvements */
.chanda-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
}

.guest-donor-name {
    font-weight: 500;
    color: var(--primary-dark);
}

:root.dark-mode .chanda-card-title {
    color: var(--accent);
}

:root.dark-mode .guest-donor-name {
    color: var(--text-main);
}

.form-control-static {
    background-color: #f7f7f7;
    border: 1px solid #d1d5db;
    color: var(--text-main);
    opacity: 0.85;
}

:root.dark-mode .form-control-static {
    background-color: hsl(152, 10%, 11%);
    border-color: hsl(152, 15%, 22%);
    color: var(--text-muted);
}



