/* ==========================================================================
   FMB Niyaz Calendar - Stylesheet
   Color Scheme: Green #1a6b3c | Gold #c8a951 | Bg #f5f5f0 | Text #333
   ========================================================================== */

/* --- 0. Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    background: #f5f5f0;
    line-height: 1.5;
    min-height: 100vh;
}

a {
    color: #1a6b3c;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img { max-width: 100%; }

h1, h2, h3, h4 {
    color: #222;
    line-height: 1.25;
    margin-bottom: .5rem;
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.15rem; }

/* --- 1. Login Page --- */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a6b3c 0%, #0d4a28 50%, #1a6b3c 100%);
    padding: 1rem;
}

.login-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .25);
    width: 100%;
    max-width: 400px;
    padding: 2.5rem 2rem;
}

.login-card .logo-area {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-card .logo-area h1 {
    color: #1a6b3c;
    font-size: 1.5rem;
    margin-top: .5rem;
}

.login-card .logo-area .subtitle {
    color: #888;
    font-size: .85rem;
}

.login-card .form-group {
    margin-bottom: 1.15rem;
}

.login-card label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: .3rem;
}

.login-card input[type="text"],
.login-card input[type="password"] {
    width: 100%;
    padding: .65rem .85rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: .95rem;
    transition: border-color .2s;
}

.login-card input:focus {
    outline: none;
    border-color: #1a6b3c;
    box-shadow: 0 0 0 3px rgba(26, 107, 60, .12);
}

.login-card .btn-login {
    width: 100%;
    padding: .7rem;
    background: #1a6b3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    margin-top: .5rem;
}

.login-card .btn-login:hover {
    background: #145a31;
}

/* --- 2. App Layout: Sidebar + Content --- */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    min-width: 250px;
    background: #1a6b3c;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform .3s ease;
}

.sidebar .sidebar-logo {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .15);
}

.sidebar .sidebar-logo h2 {
    color: #fff;
    font-size: 1.15rem;
    margin: 0;
}

.sidebar .sidebar-logo .app-subtitle {
    font-size: .75rem;
    color: rgba(255, 255, 255, .6);
}

.sidebar nav {
    flex: 1;
    padding: .75rem 0;
    overflow-y: auto;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .65rem 1.25rem;
    color: rgba(255, 255, 255, .8);
    font-size: .9rem;
    text-decoration: none;
    transition: background .15s, color .15s;
    border-left: 3px solid transparent;
}

.sidebar nav a:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
    text-decoration: none;
}

.sidebar nav a.active {
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border-left-color: #c8a951;
    font-weight: 600;
}

.sidebar nav a .nav-icon {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar .sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, .15);
}

.sidebar .sidebar-footer a {
    color: rgba(255, 255, 255, .65);
    font-size: .85rem;
    text-decoration: none;
}

.sidebar .sidebar-footer a:hover {
    color: #fff;
}

/* Mobile sidebar toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: .75rem;
    left: .75rem;
    z-index: 200;
    background: #1a6b3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: .45rem .65rem;
    font-size: 1.25rem;
    cursor: pointer;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 90;
}

/* --- 3. Content Area --- */
.content {
    flex: 1;
    margin-left: 250px;
    padding: 1.75rem 2rem;
    min-height: 100vh;
    overflow-x: hidden;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.content-header h1 {
    margin-bottom: 0;
}

/* --- 4. Flash Messages --- */
.flash {
    padding: .75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.flash-success {
    background: #e8f5e9;
    color: #1a6b3c;
    border: 1px solid #a5d6a7;
}

.flash-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.flash .flash-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: inherit;
    opacity: .6;
}

.flash .flash-close:hover {
    opacity: 1;
}

/* --- 5. Month Tabs (Hijri Months) --- */
.month-tabs {
    display: flex;
    gap: .25rem;
    overflow-x: auto;
    padding-bottom: .35rem;
    margin-bottom: 1.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.month-tabs::-webkit-scrollbar {
    height: 4px;
}

.month-tabs::-webkit-scrollbar-thumb {
    background: #c8a951;
    border-radius: 4px;
}

.month-tab {
    flex-shrink: 0;
    padding: .5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px 6px 0 0;
    background: #fff;
    color: #555;
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s;
    text-decoration: none;
}

.month-tab:hover {
    background: #f0f0ea;
    text-decoration: none;
}

.month-tab.active {
    background: #1a6b3c;
    color: #fff;
    border-color: #1a6b3c;
    font-weight: 600;
}

/* --- 6. Calendar Grid --- */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 6px;
    margin-bottom: 1.5rem;
}

.cal-day {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: .5rem;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: box-shadow .15s, border-color .15s;
    position: relative;
}

.cal-day:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
    border-color: #bbb;
}

/* Fill states */
.cal-day.fill-empty {
    background: #fff;
}

.cal-day.fill-partial {
    background: #fff8e1;
}

.cal-day.fill-full {
    background: #e8f5e9;
}

.cal-day.fill-over {
    background: #ffebee;
}

/* Miqaat indicator */
.cal-day.is-miqaat {
    border-left: 3px solid rgba(26, 107, 60, .45);
}

.cal-day .day-number {
    font-weight: 700;
    font-size: .95rem;
    color: #222;
    margin-bottom: .2rem;
}

.cal-day .day-event {
    font-size: .7rem;
    color: #1a6b3c;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.cal-day .day-fill {
    margin-top: auto;
    display: inline-block;
    align-self: flex-end;
    font-size: .65rem;
    font-weight: 600;
    padding: .1rem .4rem;
    border-radius: 3px;
    background: rgba(0, 0, 0, .07);
    color: #555;
}

.cal-day.fill-full .day-fill {
    background: rgba(26, 107, 60, .15);
    color: #1a6b3c;
}

.cal-day.fill-over .day-fill {
    background: rgba(198, 40, 40, .12);
    color: #c62828;
}

/* --- 7. Calendar Legend --- */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
    font-size: .82rem;
    color: #555;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.legend-swatch {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.legend-swatch.swatch-empty   { background: #fff; }
.legend-swatch.swatch-partial { background: #fff8e1; }
.legend-swatch.swatch-full    { background: #e8f5e9; }
.legend-swatch.swatch-over    { background: #ffebee; }

.legend-swatch.swatch-miqaat  {
    background: #fff;
    border-left: 3px solid rgba(26, 107, 60, .45);
}

/* --- 8. Modal --- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 500;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

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

.modal {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, .2);
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: modalIn .2s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(16px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    font-size: 1.1rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #888;
    padding: .1rem .35rem;
    border-radius: 4px;
    transition: background .15s;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: .85rem 1.25rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
}

/* --- 9. Forms --- */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: #444;
    margin-bottom: .3rem;
}

.form-control {
    width: 100%;
    padding: .55rem .75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: .9rem;
    font-family: inherit;
    color: #333;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}

.form-control:focus {
    outline: none;
    border-color: #1a6b3c;
    box-shadow: 0 0 0 3px rgba(26, 107, 60, .1);
}

select.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-color: #fff;
    padding-right: 2rem;
    cursor: pointer;
}

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

.form-row {
    display: flex;
    gap: .75rem;
}

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

.form-hint {
    font-size: .78rem;
    color: #888;
    margin-top: .2rem;
}

.form-error {
    font-size: .78rem;
    color: #c62828;
    margin-top: .2rem;
}

/* --- 10. Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .5rem 1.1rem;
    font-size: .88rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
    transition: background .15s, box-shadow .15s;
    white-space: nowrap;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: #1a6b3c;
    color: #fff;
}

.btn-primary:hover {
    background: #145a31;
}

.btn-danger {
    background: #c62828;
    color: #fff;
}

.btn-danger:hover {
    background: #a71e1e;
}

.btn-outline {
    background: transparent;
    color: #1a6b3c;
    border: 1px solid #1a6b3c;
}

.btn-outline:hover {
    background: rgba(26, 107, 60, .06);
}

.btn-sm {
    padding: .3rem .7rem;
    font-size: .8rem;
}

.btn-block {
    width: 100%;
}

.btn-gold {
    background: #c8a951;
    color: #fff;
}

.btn-gold:hover {
    background: #b89840;
}

/* --- 11. Stats Cards Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.15rem 1rem;
    text-align: center;
    border: 1px solid #e8e8e4;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.stat-card .stat-value {
    font-size: 1.65rem;
    font-weight: 700;
    color: #1a6b3c;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: .8rem;
    color: #777;
    margin-top: .25rem;
}

.stat-card.stat-gold .stat-value {
    color: #c8a951;
}

.stat-card.stat-red .stat-value {
    color: #c62828;
}

/* --- 12. Dashboard Grid --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e8e8e4;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.card-header {
    padding: .85rem 1.1rem;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: .95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 1.1rem;
}

.card-full {
    grid-column: 1 / -1;
}

/* --- 13. Settings Grid --- */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}

.settings-grid .card-body .form-group:last-child {
    margin-bottom: 0;
}

/* --- 14. Members Layout (Split View) --- */
.members-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1.25rem;
    align-items: start;
}

.member-detail-card {
    position: sticky;
    top: 1.5rem;
}

.member-detail-card .detail-header {
    padding: 1rem 1.1rem;
    background: linear-gradient(135deg, #1a6b3c, #1e7a44);
    color: #fff;
    border-radius: 8px 8px 0 0;
}

.member-detail-card .detail-header h3 {
    color: #fff;
    margin: 0;
}

.member-detail-card .detail-header .sabeel {
    font-size: .8rem;
    opacity: .8;
}

.member-detail-card .detail-body {
    padding: 1rem 1.1rem;
}

.member-detail-card .detail-row {
    display: flex;
    justify-content: space-between;
    padding: .4rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: .88rem;
}

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

.member-detail-card .detail-row .label {
    color: #888;
}

.member-detail-card .detail-row .value {
    font-weight: 600;
}

/* --- 15. Data Tables --- */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}

table.data-table th,
table.data-table td {
    padding: .65rem .85rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table.data-table th {
    background: #f8f8f5;
    font-weight: 600;
    color: #555;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .3px;
    white-space: nowrap;
}

table.data-table tbody tr:nth-child(even) {
    background: #fafaf7;
}

table.data-table tbody tr:hover {
    background: #f0f5f1;
}

table.data-table tbody tr.selected {
    background: #e8f5e9;
}

/* Compact variant */
table.data-table.compact th,
table.data-table.compact td {
    padding: .4rem .65rem;
    font-size: .82rem;
}

/* --- 16. Filters Bar --- */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: .75rem 1rem;
    background: #fff;
    border: 1px solid #e8e8e4;
    border-radius: 8px;
}

.filters-bar .form-control {
    width: auto;
    min-width: 180px;
}

.filters-bar .search-input {
    flex: 1;
    min-width: 200px;
}

/* --- 17. Report Actions --- */
.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.25rem;
}

/* --- 18. Member Search Autocomplete --- */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-dropdown {
    position: fixed;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
    display: none;
}

.autocomplete-dropdown.open {
    display: block;
}

.autocomplete-item {
    padding: .55rem .85rem;
    cursor: pointer;
    font-size: .88rem;
    border-bottom: 1px solid #f5f5f5;
    transition: background .1s;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background: #e8f5e9;
}

.autocomplete-item .ac-name {
    font-weight: 600;
    color: #222;
}

.autocomplete-item .ac-meta {
    font-size: .78rem;
    color: #888;
}

.autocomplete-no-results {
    padding: .55rem .85rem;
    font-size: .85rem;
    color: #999;
    text-align: center;
}

/* --- 19. Booking List Inside Modal --- */
.booking-list {
    list-style: none;
    margin-bottom: 1rem;
}

.booking-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .5rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: .88rem;
}

.booking-list li:last-child {
    border-bottom: none;
}

.booking-list .booking-member {
    font-weight: 600;
}

.booking-list .booking-share {
    font-size: .78rem;
    color: #777;
    background: #f5f5f0;
    padding: .15rem .45rem;
    border-radius: 3px;
}

.booking-list .booking-actions {
    display: flex;
    gap: .35rem;
}

/* Miqaat events in modal */
.miqaat-events {
    margin-bottom: 1rem;
    padding: .65rem .85rem;
    background: #f0f8f2;
    border-radius: 6px;
    border-left: 3px solid #1a6b3c;
}

.miqaat-events .event-name {
    font-size: .85rem;
    color: #1a6b3c;
    font-weight: 500;
}

/* --- 20. Utility Classes --- */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: #888; }
.text-success { color: #1a6b3c; }
.text-danger  { color: #c62828; }
.text-gold    { color: #c8a951; }
.text-sm      { font-size: .82rem; }
.fw-bold      { font-weight: 700; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.muted { color: #888; }
.clickable { cursor: pointer; }
.clickable:hover { background: #f0f5f0; }

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

.members-list {
    overflow-x: auto;
}

tr.selected {
    background: #e8f5e9;
}

.badge {
    display: inline-block;
    padding: .15rem .5rem;
    font-size: .72rem;
    font-weight: 600;
    border-radius: 3px;
    line-height: 1.4;
}

.badge-green {
    background: #e8f5e9;
    color: #1a6b3c;
}

.badge-gold {
    background: #fff8e1;
    color: #8d7630;
}

.badge-red {
    background: #ffebee;
    color: #c62828;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #999;
}

.empty-state .empty-icon {
    font-size: 2.5rem;
    margin-bottom: .5rem;
    opacity: .4;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top-color: #1a6b3c;
    border-radius: 50%;
    animation: spin .6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- 21. Responsive --- */

/* Tablets and below */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .members-layout {
        grid-template-columns: 1fr;
    }

    .member-detail-card {
        position: static;
    }
}

/* Mobile */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    /* Sidebar collapses off-screen */
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: block;
    }

    .sidebar-overlay.open {
        display: block;
    }

    .content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 3.25rem;
    }

    /* Calendar grid adapts */
    .calendar-grid {
        grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
        gap: 4px;
    }

    .cal-day {
        min-height: 72px;
        padding: .35rem;
    }

    .cal-day .day-event {
        font-size: .65rem;
    }

    /* Month tabs scroll horizontally (already handled) */

    /* Modal full width on mobile */
    .modal {
        max-width: 100%;
        max-height: 92vh;
        border-radius: 10px 10px 0 0;
        margin-top: auto;
    }

    .modal-overlay {
        align-items: flex-end;
    }

    /* Stats cards stack to 2 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: .75rem;
    }

    /* Tables scroll */
    .table-responsive {
        margin-left: -.5rem;
        margin-right: -.5rem;
        padding: 0 .5rem;
    }

    /* Filters stack */
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-bar .form-control,
    .filters-bar .search-input {
        width: 100%;
        min-width: 0;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    /* Settings grid single column */
    .settings-grid {
        grid-template-columns: 1fr;
    }

    /* Content header stacks */
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Report actions wrap */
    .report-actions {
        flex-direction: column;
    }

    .report-actions .btn {
        width: 100%;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-card {
        padding: .85rem .65rem;
    }

    .stat-card .stat-value {
        font-size: 1.3rem;
    }

    .calendar-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .cal-day .day-fill {
        font-size: .6rem;
    }

    .login-card {
        padding: 1.75rem 1.25rem;
    }
}

/* ==========================================================================
   22. ENHANCED CALENDAR VIEW
   Refined Islamic luxury aesthetic - geometric accents, serif display type,
   gold foil highlights, smooth reveal animations.
   ========================================================================== */

.cal-view {
    --cv-green: #1a6b3c;
    --cv-green-deep: #0d4a28;
    --cv-green-soft: #e8f5e9;
    --cv-gold: #c8a951;
    --cv-gold-light: #f8f0d8;
    --cv-gold-glow: rgba(200, 169, 81, .15);
    --cv-cream: #faf8f2;
    --cv-text: #2c3e2d;
    --cv-muted: #7a8a7c;
    --cv-border: #e4e0d6;
    --cv-shadow-sm: 0 1px 4px rgba(26, 107, 60, .06);
    --cv-shadow-md: 0 4px 20px rgba(26, 107, 60, .08);
    --cv-shadow-lg: 0 8px 40px rgba(26, 107, 60, .1);
    --cv-font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --cv-font-body: 'DM Sans', 'Segoe UI', Roboto, sans-serif;
    font-family: var(--cv-font-body);
}

/* ── Hero Banner ── */

.cal-hero {
    position: relative;
    background:
        radial-gradient(ellipse at 20% -10%, rgba(200, 169, 81, .12) 0%, transparent 55%),
        linear-gradient(135deg, var(--cv-green-deep) 0%, var(--cv-green) 45%, #1e7a44 100%);
    border-radius: 16px;
    padding: 2.25rem 2rem 1.75rem;
    margin-bottom: 1.25rem;
    overflow: hidden;
    color: #fff;
}

.cal-hero-pattern {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 18px,
            rgba(200, 169, 81, .07) 18px,
            rgba(200, 169, 81, .07) 19px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 18px,
            rgba(200, 169, 81, .07) 18px,
            rgba(200, 169, 81, .07) 19px
        );
    pointer-events: none;
}

.cal-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.cal-hero-eyebrow {
    font-family: var(--cv-font-body);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
    margin-bottom: .35rem;
}

.cal-month-title {
    font-family: var(--cv-font-display) !important;
    font-size: 2.6rem;
    font-weight: 600;
    color: #fff !important;
    margin: 0 !important;
    letter-spacing: .02em;
    line-height: 1.15;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .2);
    animation: heroTitleIn .6s ease both;
}

@keyframes heroTitleIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cal-year-badge {
    display: inline-block;
    background: var(--cv-gold);
    color: var(--cv-green-deep);
    font-family: var(--cv-font-display);
    font-size: .85rem;
    font-weight: 700;
    padding: .2rem .9rem;
    border-radius: 20px;
    margin-top: .5rem;
    letter-spacing: .08em;
    box-shadow: 0 2px 8px rgba(200, 169, 81, .35);
    animation: heroTitleIn .6s ease .15s both;
}

/* ── Month Navigation ── */

.cal-months-wrap {
    margin-bottom: 1rem;
}

.cal-months {
    display: flex;
    gap: .35rem;
    overflow-x: auto;
    padding: .25rem .25rem .5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--cv-gold) transparent;
    -webkit-overflow-scrolling: touch;
}

.cal-months::-webkit-scrollbar {
    height: 3px;
}

.cal-months::-webkit-scrollbar-thumb {
    background: var(--cv-gold);
    border-radius: 3px;
}

.cal-month-pill {
    flex-shrink: 0;
    padding: .45rem 1.05rem;
    border: 1.5px solid var(--cv-border);
    border-radius: 24px;
    background: #fff;
    color: var(--cv-muted);
    font-family: var(--cv-font-body);
    font-size: .8rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
    white-space: nowrap;
}

.cal-month-pill:hover {
    border-color: var(--cv-gold);
    color: var(--cv-green);
    background: var(--cv-gold-glow);
    text-decoration: none;
    transform: translateY(-1px);
}

.cal-month-pill.active {
    background: var(--cv-gold);
    color: var(--cv-green-deep);
    border-color: var(--cv-gold);
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(200, 169, 81, .35);
    transform: translateY(-1px);
}

/* ── Legend ── */

.cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
    margin-bottom: 1rem;
    padding: .6rem 1rem;
    background: #fff;
    border: 1px solid var(--cv-border);
    border-radius: 10px;
    font-family: var(--cv-font-body);
    font-size: .78rem;
    color: var(--cv-muted);
    box-shadow: var(--cv-shadow-sm);
}

.cal-legend-item {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.cal-legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.cal-legend-dot.dot-empty {
    background: #fff;
}

.cal-legend-dot.dot-partial {
    background: var(--cv-gold-light);
    border-color: #e6d9a8;
}

.cal-legend-dot.dot-full {
    background: var(--cv-green-soft);
    border-color: #a5d6a7;
}

.cal-legend-dot.dot-over {
    background: #ffebee;
    border-color: #ef9a9a;
}

.cal-legend-dot.dot-miqaat {
    background: #fff;
    border-color: #ddd;
    border-left: 3px solid var(--cv-gold);
    border-radius: 2px 4px 4px 2px;
}

.cal-legend-dot.dot-off {
    background: repeating-linear-gradient(
        45deg, #f5f5f0, #f5f5f0 2px, #ddd 2px, #ddd 3px
    );
    border-color: #ccc;
}

/* ── Calendar Container ── */

.cal-container {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--cv-border);
    padding: 1.15rem;
    box-shadow: var(--cv-shadow-md);
    margin-bottom: 1.5rem;
}

/* ── Calendar Grid ── */

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

/* ── Day Cell ── */

.cal-cell {
    position: relative;
    background: var(--cv-cream);
    border: 1px solid var(--cv-border);
    border-radius: 10px;
    padding: .55rem .6rem;
    min-height: 95px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform .2s cubic-bezier(.4, 0, .2, 1),
                box-shadow .2s cubic-bezier(.4, 0, .2, 1),
                border-color .2s ease;
    overflow: hidden;
    animation: cellReveal .45s cubic-bezier(.4, 0, .2, 1) both;
}

@keyframes cellReveal {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cal-cell:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(26, 107, 60, .12);
    border-color: var(--cv-gold);
    z-index: 2;
}

.cal-cell:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(26, 107, 60, .1);
}

/* Day Number */
.cal-cell-num {
    font-family: var(--cv-font-display);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--cv-text);
    line-height: 1;
}

/* Gregorian Date */
.cal-cell-greg {
    font-family: var(--cv-font-body);
    font-size: .58rem;
    font-weight: 500;
    color: var(--cv-muted);
    line-height: 1;
    margin-bottom: .15rem;
    letter-spacing: .02em;
    opacity: .75;
}

/* Hero Gregorian Range */
.cal-hero-greg {
    font-family: var(--cv-font-body);
    font-size: .78rem;
    color: rgba(255, 255, 255, .5);
    margin-top: .4rem;
    letter-spacing: .04em;
    animation: heroTitleIn .6s ease .25s both;
}

/* Event Label */
.cal-cell-event {
    font-family: var(--cv-font-body);
    font-size: .65rem;
    color: var(--cv-green);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
    letter-spacing: .01em;
}

/* Fill Indicator Area */
.cal-cell-fill {
    margin-top: auto;
    padding-top: .3rem;
}

.cal-cell-bar-track {
    height: 4px;
    background: rgba(0, 0, 0, .06);
    border-radius: 2px;
    overflow: hidden;
}

.cal-cell-bar {
    height: 100%;
    border-radius: 2px;
    background: var(--cv-green);
    transition: width .5s cubic-bezier(.4, 0, .2, 1);
}

.cal-cell-pct {
    display: block;
    font-family: var(--cv-font-body);
    font-size: .6rem;
    font-weight: 700;
    color: var(--cv-muted);
    text-align: right;
    margin-top: .1rem;
    line-height: 1;
}

/* ── Fill States ── */

.cal-cell.fill-empty {
    background: #fff;
}

.cal-cell.fill-partial {
    background: linear-gradient(170deg, #fff 50%, var(--cv-gold-light) 100%);
}

.cal-cell.fill-partial .cal-cell-bar {
    background: linear-gradient(90deg, var(--cv-gold), #d4b85e);
}

.cal-cell.fill-partial .cal-cell-pct {
    color: #a08935;
}

.cal-cell.fill-full {
    background: linear-gradient(170deg, #fff 35%, var(--cv-green-soft) 100%);
}

.cal-cell.fill-full .cal-cell-bar {
    background: linear-gradient(90deg, var(--cv-green), #2a8f55);
}

.cal-cell.fill-full .cal-cell-pct {
    color: var(--cv-green);
}

.cal-cell.fill-over {
    background: linear-gradient(170deg, #fff 35%, #ffebee 100%);
}

.cal-cell.fill-over .cal-cell-bar {
    background: linear-gradient(90deg, #c62828, #e53935);
}

.cal-cell.fill-over .cal-cell-pct {
    color: #c62828;
}

/* ── Miqaat Day ── */

.cal-cell.is-miqaat {
    border-left: 3px solid var(--cv-gold);
}

.cal-cell-miqaat-corner {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 18px 18px 0;
    border-color: transparent var(--cv-gold) transparent transparent;
    opacity: .7;
}

.cal-cell.is-miqaat .cal-cell-num {
    color: #8a6d20;
}

.cal-cell.is-miqaat:hover {
    border-color: var(--cv-gold);
    box-shadow: 0 6px 24px rgba(200, 169, 81, .2);
}

/* ── Off Day ── */

.cal-cell.fill-off,
.cal-cell.is-off {
    background: repeating-linear-gradient(
        45deg, #f8f7f4, #f8f7f4 4px, #f0ede6 4px, #f0ede6 5px
    ) !important;
    opacity: .6;
    border-color: #ddd;
}

.cal-cell.is-off .cal-cell-num {
    color: #bbb;
    text-decoration: line-through;
}

.cal-cell.is-off .cal-cell-event,
.cal-cell.is-off .cal-cell-greg {
    opacity: .5;
}

.cal-cell.is-off:hover {
    opacity: .85;
}

/* ── Enhanced Modal ── */

.cal-modal-overlay {
    backdrop-filter: blur(4px);
    background: rgba(13, 74, 40, .35) !important;
}

.cal-modal {
    position: relative;
    border-radius: 14px !important;
    box-shadow: var(--cv-shadow-lg) !important;
    animation: calModalIn .3s cubic-bezier(.4, 0, .2, 1) both;
}

.cal-modal .cal-modal-accent {
    border-radius: 14px 14px 0 0;
}

.cal-modal .modal-body {
    overflow-y: auto;
    overflow-x: hidden;
}

@keyframes calModalIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(.96);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.cal-modal-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--cv-green), var(--cv-gold), var(--cv-green));
    background-size: 200% 100%;
    animation: accentShimmer 3s ease infinite;
}

@keyframes accentShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.cal-modal .modal-header {
    padding: 1rem 1.35rem;
}

.cal-modal .modal-header h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e2d;
    letter-spacing: .01em;
}

.cal-modal .modal-body {
    padding: 1.15rem 1.35rem 1.35rem;
}

/* Modal: Off-day toggle row */
.cal-modal-off-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .5rem .7rem;
    background: #fafaf7;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: .75rem;
}

.cal-modal-off-label {
    font-size: .8rem;
    font-weight: 600;
    color: #666;
}

.cal-off-toggle {
    padding: .3rem .75rem;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: .75rem;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: all .2s ease;
}

.cal-off-toggle:hover {
    border-color: #c62828;
    color: #c62828;
    background: #ffebee;
}

.cal-off-toggle.is-off {
    border-color: #1a6b3c;
    color: #1a6b3c;
    background: #e8f5e9;
}

.cal-off-toggle.is-off:hover {
    background: #c8e6c9;
}

/* Modal: Event badges */
.cal-modal-events {
    background: linear-gradient(135deg, #f0f8f2, #f8f5e8);
    border: 1px solid #d4e8d4;
    border-radius: 10px;
    padding: .7rem .9rem;
    margin-bottom: 1rem;
}

.cal-modal-event {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-family: 'DM Sans', sans-serif;
    font-size: .85rem;
    color: #1a6b3c;
    font-weight: 500;
    padding: .15rem 0;
}

.cal-modal-event-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #c8a951;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(200, 169, 81, .4);
}

/* Modal: Fill indicator */
.cal-modal-fill {
    margin-bottom: 1rem;
    padding: .65rem .85rem;
    background: #fafaf7;
    border-radius: 8px;
    border: 1px solid #eee;
}

.cal-modal-fill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .4rem;
}

.cal-modal-fill-label {
    font-family: 'DM Sans', sans-serif;
    font-size: .75rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.cal-modal-fill-pct {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    font-weight: 700;
}

.cal-modal-fill-pct.fill-text-empty { color: #aaa; }
.cal-modal-fill-pct.fill-text-partial { color: #a08935; }
.cal-modal-fill-pct.fill-text-full { color: #1a6b3c; }
.cal-modal-fill-pct.fill-text-over { color: #c62828; }

.cal-modal-fill-track {
    height: 6px;
    background: #e8e8e4;
    border-radius: 3px;
    overflow: hidden;
}

.cal-modal-fill-bar {
    height: 100%;
    border-radius: 3px;
    transition: width .5s ease;
}

.cal-modal-fill-bar.fill-bar-empty { width: 0; background: #ddd; }
.cal-modal-fill-bar.fill-bar-partial { background: linear-gradient(90deg, #c8a951, #d4b85e); }
.cal-modal-fill-bar.fill-bar-full { background: linear-gradient(90deg, #1a6b3c, #2a8f55); }
.cal-modal-fill-bar.fill-bar-over { background: linear-gradient(90deg, #c62828, #e53935); }

/* Modal: Section titles */
.cal-modal-section {
    margin-bottom: .75rem;
}

.cal-modal-section-title {
    font-family: 'DM Sans', sans-serif;
    font-size: .85rem;
    font-weight: 700;
    color: #444;
    margin-bottom: .65rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.cal-modal-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    background: #e8f5e9;
    color: #1a6b3c;
    font-size: .7rem;
    font-weight: 700;
    border-radius: 10px;
    padding: 0 .35rem;
}

/* Modal: Bookings list */
.cal-modal-bookings {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #f0f0ec;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: .75rem;
}

.cal-modal-booking {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem .75rem;
    background: #fff;
    gap: .5rem;
    transition: background .15s ease;
}

.cal-modal-booking:hover {
    background: #fafaf7;
}

.cal-modal-booking-info {
    flex: 1;
    min-width: 0;
}

.cal-modal-booking-name {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: .88rem;
    color: #333;
}

.cal-modal-booking-sabeel {
    font-size: .75rem;
    color: #999;
    margin-left: .35rem;
}

.cal-modal-booking-notes {
    font-size: .75rem;
    color: #888;
    margin-top: .1rem;
    font-style: italic;
}

.cal-modal-booking-meta {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-shrink: 0;
}

.cal-modal-booking-amt {
    font-family: 'DM Sans', sans-serif;
    font-size: .85rem;
    font-weight: 700;
    color: #333;
    min-width: 32px;
    text-align: right;
}

/* Modal: Empty state */
.cal-modal-empty {
    text-align: center;
    padding: 1.5rem 1rem;
    color: #bbb;
}

.cal-modal-empty-icon {
    font-size: 1.8rem;
    margin-bottom: .35rem;
    opacity: .5;
}

.cal-modal-empty p {
    font-family: 'DM Sans', sans-serif;
    font-size: .85rem;
    margin: 0;
}

/* Modal: Booking form */
.cal-modal-form {
    border-top: 1px solid #eee;
    padding-top: 1.1rem;
    margin-top: .75rem;
}

.cal-selected-member {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .8rem;
    background: linear-gradient(135deg, #e8f5e9, #f0f8f2);
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 500;
    color: #1a6b3c;
    margin-bottom: .35rem;
}

.cal-clear-btn {
    background: none;
    border: 1px solid #a5d6a7;
    color: #1a6b3c;
    padding: .15rem .5rem;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
    margin-left: auto;
}

.cal-clear-btn:hover {
    background: #c8e6c9;
}

.cal-submit-btn {
    margin-top: .5rem;
    padding: .65rem 1rem !important;
    font-size: .9rem !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #1a6b3c, #1e7a44) !important;
    box-shadow: 0 3px 12px rgba(26, 107, 60, .25);
    transition: all .2s ease !important;
}

.cal-submit-btn:hover {
    background: linear-gradient(135deg, #145a31, #1a6b3c) !important;
    box-shadow: 0 4px 16px rgba(26, 107, 60, .35);
    transform: translateY(-1px);
}

/* ── Calendar Responsive ── */

@media (max-width: 1024px) {
    .cal-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }

    .cal-cell {
        min-height: 85px;
    }
}

@media (max-width: 768px) {
    .cal-hero {
        padding: 1.75rem 1.25rem 1.5rem;
        border-radius: 12px;
    }

    .cal-month-title {
        font-size: 1.8rem !important;
    }

    .cal-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
    }

    .cal-cell {
        min-height: 78px;
        padding: .45rem .5rem;
        border-radius: 8px;
    }

    .cal-cell-num {
        font-size: 1.25rem;
    }

    .cal-cell-event {
        font-size: .6rem;
    }

    .cal-container {
        padding: .75rem;
        border-radius: 12px;
    }

    .cal-legend {
        gap: .5rem;
        padding: .5rem .75rem;
        font-size: .72rem;
    }

    .cal-modal {
        max-width: 100% !important;
        max-height: 92vh !important;
        border-radius: 14px 14px 0 0 !important;
        margin-top: auto;
    }

    .cal-modal-overlay.open {
        align-items: flex-end;
    }
}

@media (max-width: 480px) {
    .cal-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }

    .cal-cell {
        min-height: 70px;
        padding: .35rem .4rem;
    }

    .cal-cell-num {
        font-size: 1.1rem;
    }

    .cal-cell-event {
        font-size: .55rem;
    }

    .cal-cell-pct {
        font-size: .55rem;
    }

    .cal-hero {
        padding: 1.5rem 1rem 1.25rem;
    }

    .cal-month-title {
        font-size: 1.5rem !important;
    }

    .cal-year-badge {
        font-size: .75rem;
        padding: .15rem .7rem;
    }
}

/* ==========================================================================
   23. SETTINGS PAGE
   Refined settings view matching the calendar aesthetic.
   ========================================================================== */

.stg-view {
    --stg-green: #1a6b3c;
    --stg-gold: #c8a951;
    --stg-red: #c62828;
    --stg-border: #e4e0d6;
    --stg-font-display: 'Cormorant Garamond', Georgia, serif;
    --stg-font-body: 'DM Sans', 'Segoe UI', sans-serif;
    font-family: var(--stg-font-body);
}

.stg-header {
    margin-bottom: 1.75rem;
}

.stg-title {
    font-family: var(--stg-font-display) !important;
    font-size: 2rem;
    font-weight: 600;
    color: #222;
    margin: 0 0 .25rem;
}

.stg-subtitle {
    font-family: var(--stg-font-body);
    font-size: .88rem;
    color: #888;
    margin: 0;
}

/* Cards Grid */
.stg-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.stg-card {
    background: #fff;
    border: 1px solid var(--stg-border);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(26, 107, 60, .05);
    transition: box-shadow .2s ease, transform .2s ease;
}

.stg-card:hover {
    box-shadow: 0 4px 20px rgba(26, 107, 60, .1);
}

.stg-card-wide {
    grid-column: 1 / -1;
}

/* Card Icon */
.stg-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.stg-icon-green {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #1a6b3c;
}

.stg-icon-gold {
    background: linear-gradient(135deg, #fff8e1, #f5e6b8);
    color: #8d7630;
}

.stg-icon-red {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    color: #c62828;
}

/* Card Content */
.stg-card-title {
    font-family: var(--stg-font-body);
    font-size: 1.05rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 .25rem;
}

.stg-card-desc {
    font-size: .82rem;
    color: #999;
    margin: 0 0 1.15rem;
    line-height: 1.45;
}

/* Form overrides */
.stg-form .form-group {
    margin-bottom: .85rem;
}

.stg-form .form-group label {
    font-family: var(--stg-font-body);
    font-size: .8rem;
    font-weight: 600;
    color: #555;
    margin-bottom: .3rem;
}

.stg-form .form-control {
    font-family: var(--stg-font-body);
    border-radius: 8px;
    border: 1.5px solid #ddd;
    padding: .6rem .85rem;
    font-size: .9rem;
    transition: border-color .2s, box-shadow .2s;
}

.stg-form .form-control:focus {
    border-color: var(--stg-green);
    box-shadow: 0 0 0 3px rgba(26, 107, 60, .1);
}

/* Rate Breakdown */
.stg-rate-breakdown {
    display: flex;
    gap: .5rem;
    margin-bottom: 1rem;
    padding: .65rem .75rem;
    background: #fafaf7;
    border: 1px solid #eee;
    border-radius: 8px;
}

.stg-rate-item {
    flex: 1;
    text-align: center;
}

.stg-rate-label {
    display: block;
    font-size: .68rem;
    font-weight: 600;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .2rem;
}

.stg-rate-value {
    font-family: var(--stg-font-display);
    font-size: 1.15rem;
    font-weight: 700;
}

.stg-rv-green { color: var(--stg-green); }
.stg-rv-gold { color: var(--stg-gold); }
.stg-rv-muted { color: #999; }

/* Current badge */
.stg-current-badge {
    font-size: .82rem;
    color: #888;
    padding: .5rem .75rem;
    background: #f5f5f0;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.stg-current-badge strong {
    color: var(--stg-green);
    font-family: var(--stg-font-display);
    font-size: 1rem;
}

/* Password 3-column layout */
.stg-pass-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
}

/* Button */
.stg-btn {
    margin-top: .25rem;
    border-radius: 8px !important;
    padding: .55rem 1.25rem !important;
    font-family: var(--stg-font-body) !important;
    font-size: .85rem !important;
    transition: all .2s ease !important;
}

.stg-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(26, 107, 60, .2);
}

/* Responsive */
@media (max-width: 768px) {
    .stg-grid {
        grid-template-columns: 1fr;
    }

    .stg-pass-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .stg-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .stg-card {
        padding: 1.15rem;
    }

    .stg-rate-breakdown {
        flex-direction: column;
        gap: .35rem;
    }

    .stg-rate-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
}

/* ==========================================================================
   24. MEMBERS PAGE
   Refined member directory with search, table, and detail panel.
   ========================================================================== */

.mem-view {
    --mem-green: #1a6b3c;
    --mem-green-deep: #0d4a28;
    --mem-green-soft: #e8f5e9;
    --mem-gold: #c8a951;
    --mem-gold-light: #f8f0d8;
    --mem-cream: #faf8f2;
    --mem-text: #2c3e2d;
    --mem-muted: #7a8a7c;
    --mem-border: #e4e0d6;
    --mem-font-display: 'Cormorant Garamond', Georgia, serif;
    --mem-font-body: 'DM Sans', 'Segoe UI', sans-serif;
    font-family: var(--mem-font-body);
}

/* ── Header ── */

.mem-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.mem-title {
    font-family: var(--mem-font-display) !important;
    font-size: 2rem;
    font-weight: 600;
    color: #222;
    margin: 0 0 .2rem;
}

.mem-subtitle {
    font-family: var(--mem-font-body);
    font-size: .85rem;
    color: #999;
    margin: 0;
}

.mem-header-stats {
    display: flex;
    gap: .75rem;
}

.mem-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: .5rem .85rem;
    background: #fff;
    border: 1px solid var(--mem-border);
    border-radius: 10px;
    min-width: 68px;
}

.mem-stat-num {
    font-family: var(--mem-font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--mem-green);
    line-height: 1.1;
}

.mem-stat-label {
    font-size: .62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #aaa;
    margin-top: .1rem;
}

/* ── Filters ── */

.mem-filters {
    display: flex;
    gap: .5rem;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.mem-search-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.mem-search-icon {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #bbb;
    pointer-events: none;
}

.mem-search {
    width: 100%;
    padding: .6rem .85rem .6rem 2.35rem;
    border: 1.5px solid var(--mem-border);
    border-radius: 10px;
    font-family: var(--mem-font-body);
    font-size: .88rem;
    background: #fff;
    color: var(--mem-text);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.mem-search:focus {
    border-color: var(--mem-gold);
    box-shadow: 0 0 0 3px rgba(200, 169, 81, .12);
}

.mem-search::placeholder {
    color: #bbb;
}

.mem-sector-select {
    padding: .6rem 2.2rem .6rem .85rem;
    border: 1.5px solid var(--mem-border);
    border-radius: 10px;
    font-family: var(--mem-font-body);
    font-size: .85rem;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right .85rem center;
    color: var(--mem-text);
    cursor: pointer;
    outline: none;
    min-width: 150px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border-color .2s;
}

.mem-sector-select:focus {
    border-color: var(--mem-gold);
}

.mem-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .6rem 1.1rem;
    background: linear-gradient(135deg, var(--mem-green), #1e7a44);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: var(--mem-font-body);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.mem-filter-btn:hover {
    background: linear-gradient(135deg, #145a31, var(--mem-green));
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(26, 107, 60, .25);
    text-decoration: none;
    color: #fff;
}

.mem-clear-btn {
    padding: .6rem .9rem;
    color: var(--mem-muted);
    font-size: .82rem;
    font-weight: 500;
    text-decoration: none;
    border: 1.5px solid var(--mem-border);
    border-radius: 10px;
    background: #fff;
    transition: all .2s;
}

.mem-clear-btn:hover {
    border-color: #c62828;
    color: #c62828;
    text-decoration: none;
}

/* ── Content Layout ── */

.mem-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: start;
}

.mem-content.has-detail {
    grid-template-columns: 1fr 340px;
}

/* ── Table ── */

.mem-table-wrap {
    background: #fff;
    border: 1px solid var(--mem-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(26, 107, 60, .05);
}

.mem-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}

.mem-table thead th {
    padding: .7rem .85rem;
    background: var(--mem-cream);
    font-family: var(--mem-font-body);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--mem-muted);
    text-align: left;
    border-bottom: 2px solid var(--mem-border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.mem-table tbody tr {
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
    animation: memRowIn .35s cubic-bezier(.4, 0, .2, 1) both;
    border-bottom: 1px solid #f0ede6;
}

@keyframes memRowIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mem-table tbody tr:hover {
    background: linear-gradient(90deg, var(--mem-green-soft), #fff);
}

.mem-table tbody tr.is-selected {
    background: linear-gradient(90deg, #d4edda, #e8f5e9);
    box-shadow: inset 3px 0 0 var(--mem-green);
}

.mem-table tbody td {
    padding: .6rem .85rem;
    vertical-align: middle;
}

/* Sabeel Badge */
.mem-sabeel-badge {
    display: inline-block;
    font-family: var(--mem-font-body);
    font-size: .78rem;
    font-weight: 700;
    color: var(--mem-green);
    background: var(--mem-green-soft);
    padding: .15rem .5rem;
    border-radius: 5px;
    letter-spacing: .02em;
}

/* Name */
.mem-name {
    font-weight: 600;
    color: var(--mem-text);
    font-size: .88rem;
}

/* Sector Tag */
.mem-sector-tag {
    font-size: .75rem;
    color: #8d7630;
    background: var(--mem-gold-light);
    padding: .12rem .45rem;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    display: inline-block;
}

/* Amount */
.mem-amount {
    font-family: var(--mem-font-body);
    font-weight: 700;
    color: var(--mem-green);
}

/* Status Badges */
.mem-status-badge {
    display: inline-block;
    padding: .15rem .5rem;
    border-radius: 8px;
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.mem-status-badge.status-done {
    background: #e8f5e9;
    color: #1a6b3c;
}

.mem-status-badge.status-pending {
    background: #fef3c7;
    color: #92740c;
}

.mem-status-badge.status-nothali {
    background: #f3f3f0;
    color: #999;
}

.col-status {
    white-space: nowrap;
}

.mem-no-data {
    color: #ccc;
    font-size: .8rem;
}

/* ── Empty State ── */

.mem-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #bbb;
}

.mem-empty-icon {
    margin-bottom: .75rem;
    opacity: .35;
    color: var(--mem-muted);
}

.mem-empty p {
    font-size: .9rem;
    color: #999;
    margin: 0;
}

/* ── Detail Panel ── */

.mem-detail {
    position: sticky;
    top: 1.25rem;
    background: #fff;
    border: 1px solid var(--mem-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(26, 107, 60, .08);
    animation: memDetailIn .35s cubic-bezier(.4, 0, .2, 1) both;
}

@keyframes memDetailIn {
    from {
        opacity: 0;
        transform: translateX(15px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mem-detail-close {
    position: absolute;
    top: .65rem;
    right: .75rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .2);
    color: rgba(255, 255, 255, .7);
    border-radius: 50%;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all .2s;
    z-index: 2;
    line-height: 1;
}

.mem-detail-close:hover {
    background: rgba(255, 255, 255, .35);
    color: #fff;
    text-decoration: none;
}

/* Profile Header */
.mem-detail-header {
    background: linear-gradient(135deg, var(--mem-green-deep), var(--mem-green));
    padding: 1.5rem 1.25rem 1.25rem;
    text-align: center;
    position: relative;
}

.mem-detail-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--mem-gold);
    color: var(--mem-green-deep);
    font-family: var(--mem-font-display);
    font-size: 1.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto .65rem;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .2);
}

.mem-detail-name {
    font-family: var(--mem-font-display) !important;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff !important;
    margin: 0 0 .15rem;
    line-height: 1.25;
}

.mem-detail-sabeel {
    font-size: .78rem;
    color: rgba(255, 255, 255, .55);
    font-weight: 500;
    letter-spacing: .04em;
}

/* Info Grid */
.mem-detail-info {
    padding: .85rem 1.15rem;
}

.mem-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .45rem 0;
    border-bottom: 1px solid #f5f3ee;
    font-size: .85rem;
}

.mem-detail-row:last-child {
    border-bottom: none;
}

.mem-detail-label {
    color: var(--mem-muted);
    font-size: .78rem;
    font-weight: 500;
}

.mem-detail-value {
    font-weight: 600;
    color: var(--mem-text);
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.mem-detail-takhmeen {
    color: var(--mem-green);
    font-family: var(--mem-font-body);
    font-size: .9rem;
}

/* Bookings Section */
.mem-detail-bookings {
    padding: .85rem 1.15rem 1.15rem;
    border-top: 1px solid var(--mem-border);
}

.mem-detail-bookings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .65rem;
}

.mem-detail-bookings-header h4 {
    font-family: var(--mem-font-body);
    font-size: .85rem;
    font-weight: 700;
    color: #444;
    margin: 0;
}

.mem-detail-bookings-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    background: var(--mem-green-soft);
    color: var(--mem-green);
    font-size: .72rem;
    font-weight: 700;
    border-radius: 11px;
    padding: 0 .4rem;
}

/* Booking List */
.mem-booking-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #f0ede6;
    border-radius: 8px;
    overflow: hidden;
}

.mem-booking-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .65rem;
    background: #fff;
    font-size: .82rem;
}

.mem-booking-day {
    min-width: 58px;
}

.mem-booking-daynum {
    font-family: var(--mem-font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--mem-text);
}

.mem-booking-month {
    font-size: .62rem;
    color: var(--mem-muted);
    display: block;
    line-height: 1;
    margin-top: .05rem;
}

.mem-booking-share {
    flex: 1;
}

.mem-booking-amt {
    font-weight: 700;
    color: var(--mem-text);
    font-size: .85rem;
    min-width: 45px;
    text-align: right;
}

/* Booking Total */
.mem-booking-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .6rem .65rem;
    margin-top: .5rem;
    background: var(--mem-green-soft);
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--mem-green);
}

.mem-booking-total-amt {
    font-family: var(--mem-font-display);
    font-size: 1.05rem;
    font-weight: 700;
}

/* Booking Empty */
.mem-booking-empty {
    text-align: center;
    padding: 1rem .5rem;
    color: #bbb;
}

.mem-booking-empty p {
    font-size: .82rem;
    margin: 0;
}

/* ── Members Responsive ── */

@media (max-width: 1024px) {
    .mem-content.has-detail {
        grid-template-columns: 1fr;
    }

    .mem-detail {
        position: static;
    }
}

@media (max-width: 768px) {
    .mem-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .mem-header-stats {
        width: 100%;
    }

    .mem-stat {
        flex: 1;
    }

    .mem-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .mem-search-wrap {
        min-width: 0;
    }

    .mem-sector-select {
        min-width: 0;
        width: 100%;
    }

    .mem-filter-btn,
    .mem-clear-btn {
        justify-content: center;
        text-align: center;
    }

    .mem-title {
        font-size: 1.6rem;
    }

    /* Hide less important columns on mobile */
    .mem-table .col-phone,
    .mem-table .col-sector {
        display: none;
    }
}

@media (max-width: 480px) {
    .mem-header-stats {
        gap: .4rem;
    }

    .mem-stat {
        padding: .4rem .5rem;
        min-width: 0;
    }

    .mem-stat-num {
        font-size: 1.1rem;
    }

    .mem-table tbody td {
        padding: .5rem .55rem;
    }

    .mem-sabeel-badge {
        font-size: .72rem;
        padding: .1rem .35rem;
    }

    .mem-name {
        font-size: .82rem;
    }

    .mem-detail-header {
        padding: 1.25rem 1rem 1rem;
    }

    .mem-detail-avatar {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
}

/* ==========================================================================
   25. ZABIHAT PAGE
   ========================================================================== */

.zab-view {
    --zab-green: #1a6b3c;
    --zab-green-deep: #0d4a28;
    --zab-green-soft: #e8f5e9;
    --zab-gold: #c8a951;
    --zab-gold-light: #f8f0d8;
    --zab-border: #e4e0d6;
    --zab-font-display: 'Cormorant Garamond', Georgia, serif;
    --zab-font-body: 'DM Sans', 'Segoe UI', sans-serif;
    font-family: var(--zab-font-body);
}

/* ── Hero ── */

.zab-hero {
    position: relative;
    background:
        radial-gradient(ellipse at 80% -20%, rgba(200, 169, 81, .15) 0%, transparent 55%),
        linear-gradient(135deg, #4a2c0a 0%, #6b3d12 45%, #7a4518 100%);
    border-radius: 16px;
    padding: 2rem 2rem 1.5rem;
    margin-bottom: 1.25rem;
    overflow: hidden;
    color: #fff;
}

.zab-hero-pattern {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            60deg,
            transparent,
            transparent 22px,
            rgba(200, 169, 81, .06) 22px,
            rgba(200, 169, 81, .06) 23px
        ),
        repeating-linear-gradient(
            -60deg,
            transparent,
            transparent 22px,
            rgba(200, 169, 81, .06) 22px,
            rgba(200, 169, 81, .06) 23px
        );
    pointer-events: none;
}

.zab-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.zab-hero-eyebrow {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
    margin-bottom: .25rem;
}

.zab-hero-title {
    font-family: var(--zab-font-display) !important;
    font-size: 2.4rem;
    font-weight: 600;
    color: #fff !important;
    margin: 0 !important;
    letter-spacing: .02em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .3);
}

.zab-hero-sub {
    font-size: .82rem;
    color: rgba(255, 255, 255, .5);
    margin: .25rem 0 0;
}

/* Stats Row in Hero */
.zab-stats-row {
    display: flex;
    justify-content: center;
    gap: .65rem;
    margin-top: 1.15rem;
    flex-wrap: wrap;
}

.zab-stat-chip {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 10px;
    padding: .5rem .85rem;
    text-align: center;
    min-width: 80px;
    backdrop-filter: blur(4px);
}

.zab-stat-chip-num {
    display: block;
    font-family: var(--zab-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
}

.zab-stat-chip-label {
    font-size: .6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255, 255, 255, .5);
}

.zab-stat-done .zab-stat-chip-num { color: #8ce99a; }
.zab-stat-pending .zab-stat-chip-num { color: #ffd43b; }

/* ── Search Bar ── */

.zab-search-bar {
    display: flex;
    gap: .5rem;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

/* ── Progress Bar ── */

.zab-progress {
    background: #fff;
    border: 1px solid var(--zab-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 12px rgba(26, 107, 60, .05);
}

.zab-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .45rem;
}

.zab-progress-label {
    font-size: .78rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.zab-progress-pct {
    font-family: var(--zab-font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--zab-green);
}

.zab-progress-track {
    height: 10px;
    background: #f0ede6;
    border-radius: 5px;
    overflow: hidden;
}

.zab-progress-bar {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--zab-green), #2a8f55);
    transition: width .6s cubic-bezier(.4, 0, .2, 1);
}

.zab-progress-detail {
    display: flex;
    justify-content: space-between;
    margin-top: .4rem;
    font-size: .75rem;
    color: #999;
}

/* ── Zabihat Cards Grid ── */

.zab-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.zab-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid var(--zab-border);
    border-radius: 10px;
    padding: .65rem 1rem;
    transition: all .2s ease;
    animation: memRowIn .35s cubic-bezier(.4, 0, .2, 1) both;
}

.zab-card:hover {
    box-shadow: 0 3px 16px rgba(26, 107, 60, .08);
    transform: translateY(-1px);
}

.zab-card.is-done {
    background: linear-gradient(90deg, var(--zab-green-soft), #fff);
    border-color: #c8e6c9;
}

.zab-card-left {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex: 1;
    min-width: 0;
}

/* Toggle Button */
.zab-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
    flex-shrink: 0;
    color: transparent;
}

.zab-toggle:hover {
    border-color: var(--zab-green);
    background: var(--zab-green-soft);
    color: #a5d6a7;
}

.zab-toggle.checked {
    background: var(--zab-green);
    border-color: var(--zab-green);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26, 107, 60, .3);
}

.zab-toggle.checked:hover {
    background: #145a31;
    color: #fff;
}

/* Card Info */
.zab-card-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.zab-card-name {
    font-weight: 600;
    font-size: .88rem;
    color: #2c3e2d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zab-card-meta {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-top: .15rem;
}

.zab-card-phone {
    font-size: .72rem;
    color: var(--zab-green);
    text-decoration: none;
    font-weight: 500;
}

.zab-card-phone:hover {
    text-decoration: underline;
}

.zab-card-sector {
    font-size: .7rem;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

/* Card Right */
.zab-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    text-align: right;
}

.zab-card-units {
    font-family: var(--zab-font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: #6b3d12;
    line-height: 1.1;
}

.zab-card-units-label {
    font-size: .58rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #aaa;
}

.zab-card-amt {
    font-size: .72rem;
    color: #999;
    margin-top: .1rem;
}

.zab-card.is-done .zab-card-name {
    color: var(--zab-green);
}

.zab-card.is-done .zab-card-units {
    color: var(--zab-green);
}

/* ── Zabihat Responsive ── */

@media (max-width: 768px) {
    .zab-hero {
        padding: 1.5rem 1.25rem 1.25rem;
        border-radius: 12px;
    }

    .zab-hero-title {
        font-size: 1.8rem !important;
    }

    .zab-stats-row {
        gap: .4rem;
    }

    .zab-stat-chip {
        padding: .4rem .6rem;
        min-width: 65px;
    }

    .zab-stat-chip-num {
        font-size: 1.2rem;
    }

    .zab-search-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .zab-card {
        padding: .55rem .75rem;
    }

    .zab-card-sector {
        display: none;
    }
}

@media (max-width: 480px) {
    .zab-hero {
        padding: 1.25rem 1rem 1rem;
    }

    .zab-hero-title {
        font-size: 1.5rem !important;
    }

    .zab-stat-chip {
        flex: 1;
        min-width: 0;
    }

    .zab-toggle {
        width: 32px;
        height: 32px;
    }

    .zab-card-name {
        font-size: .82rem;
    }
}

/* ==========================================================================
   26. DASHBOARD PAGE
   ========================================================================== */

.dash-view {
    --dash-green: #1a6b3c;
    --dash-green-deep: #0d4a28;
    --dash-green-soft: #e8f5e9;
    --dash-gold: #c8a951;
    --dash-gold-light: #f8f0d8;
    --dash-border: #e4e0d6;
    --dash-font-display: 'Cormorant Garamond', Georgia, serif;
    --dash-font-body: 'DM Sans', 'Segoe UI', sans-serif;
    font-family: var(--dash-font-body);
}

/* Header */
.dash-header {
    margin-bottom: 1.5rem;
}

.dash-title {
    font-family: var(--dash-font-display) !important;
    font-size: 2rem;
    font-weight: 600;
    color: #222;
    margin: 0 0 .2rem;
}

.dash-subtitle {
    font-size: .85rem;
    color: #999;
    margin: 0;
}

/* Stats Grid */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .85rem;
    margin-bottom: 1.5rem;
}

.dash-stat-card {
    background: #fff;
    border: 1px solid var(--dash-border);
    border-radius: 12px;
    padding: 1.15rem;
    transition: all .2s ease;
    position: relative;
    overflow: hidden;
}

.dash-stat-card:hover {
    box-shadow: 0 4px 20px rgba(26, 107, 60, .08);
    transform: translateY(-2px);
}

.dash-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 12px 12px 0 0;
}

.dash-stat-card.accent-green::before { background: var(--dash-green); }
.dash-stat-card.accent-gold::before { background: var(--dash-gold); }
.dash-stat-card.accent-brown::before { background: #6b3d12; }
.dash-stat-card.accent-blue::before { background: #2563eb; }

.dash-stat-label {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #aaa;
    margin-bottom: .3rem;
}

.dash-stat-value {
    font-family: var(--dash-font-display);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    color: #222;
}

.dash-stat-sub {
    font-size: .75rem;
    color: #999;
    margin-top: .25rem;
}

/* Cards Grid */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.dash-card {
    background: #fff;
    border: 1px solid var(--dash-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(26, 107, 60, .05);
}

.dash-card-header {
    padding: .85rem 1.15rem;
    border-bottom: 1px solid #f0ede6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dash-card-title {
    font-family: var(--dash-font-body);
    font-size: .9rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.dash-card-badge {
    font-size: .68rem;
    font-weight: 600;
    padding: .15rem .5rem;
    border-radius: 10px;
    background: var(--dash-green-soft);
    color: var(--dash-green);
}

.dash-card-body {
    padding: 0;
}

/* Dashboard Table */
.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
}

.dash-table th {
    padding: .55rem .85rem;
    text-align: left;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #aaa;
    background: #fafaf7;
    border-bottom: 1px solid #f0ede6;
}

.dash-table td {
    padding: .5rem .85rem;
    border-bottom: 1px solid #f5f3ee;
    color: #444;
}

.dash-table tbody tr:last-child td {
    border-bottom: none;
}

.dash-table tbody tr:hover {
    background: #fafaf7;
}

.dash-table tfoot td {
    background: var(--dash-green-soft);
    font-weight: 700;
    color: var(--dash-green);
    border: none;
}

/* Full-width card */
.dash-card-full {
    grid-column: 1 / -1;
}

/* Niyaz Potential Card */
.dash-niyaz-potential {
    padding: 1.15rem;
}

.dash-potential-grid {
    display: flex;
    gap: 1rem;
    margin-top: .75rem;
}

.dash-potential-item {
    flex: 1;
    text-align: center;
    padding: .75rem;
    background: #fafaf7;
    border-radius: 10px;
    border: 1px solid #f0ede6;
}

.dash-potential-value {
    font-family: var(--dash-font-display);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
}

.dash-potential-label {
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #aaa;
    margin-top: .2rem;
    display: block;
}

.dash-potential-value.val-green { color: var(--dash-green); }
.dash-potential-value.val-gold { color: var(--dash-gold); }
.dash-potential-value.val-brown { color: #6b3d12; }

/* Dashboard Responsive */
@media (max-width: 1024px) {
    .dash-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dash-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: .5rem;
    }

    .dash-stat-card {
        padding: .85rem;
    }

    .dash-stat-value {
        font-size: 1.4rem;
    }

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

    .dash-title {
        font-size: 1.6rem;
    }

    .dash-potential-grid {
        flex-direction: column;
        gap: .5rem;
    }
}

@media (max-width: 480px) {
    .dash-stat-card {
        padding: .7rem;
    }

    .dash-stat-value {
        font-size: 1.2rem;
    }

    .dash-stat-label {
        font-size: .62rem;
    }
}

/* ==========================================================================
   27. REPORTS PAGE
   Comprehensive analytics with status breakdowns, tables, and exports.
   ========================================================================== */

.rpt-view {
    --rpt-green: #1a6b3c;
    --rpt-green-deep: #0d4a28;
    --rpt-green-soft: #e8f5e9;
    --rpt-gold: #c8a951;
    --rpt-gold-light: #f8f0d8;
    --rpt-cream: #faf8f2;
    --rpt-text: #2c3e2d;
    --rpt-muted: #7a8a7c;
    --rpt-border: #e4e0d6;
    --rpt-font-display: 'Cormorant Garamond', Georgia, serif;
    --rpt-font-body: 'DM Sans', 'Segoe UI', sans-serif;
    font-family: var(--rpt-font-body);
}

/* Hero */
.rpt-hero {
    background: linear-gradient(135deg, #0d4a28 0%, #1a6b3c 45%, #1e7a44 100%);
    border-radius: 16px;
    padding: 2.25rem 2rem 1.75rem;
    margin-bottom: 1.25rem;
    overflow: hidden;
    color: #fff;
    position: relative;
}

.rpt-hero-pattern {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        120deg,
        transparent,
        transparent 20px,
        rgba(200, 169, 81, .06) 20px,
        rgba(200, 169, 81, .06) 21px
    );
    pointer-events: none;
}

.rpt-hero-content {
    position: relative;
    z-index: 1;
}

.rpt-hero-eyebrow {
    font-family: var(--rpt-font-body);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: rgba(200, 169, 81, .85);
    margin-bottom: .35rem;
}

.rpt-hero-title {
    font-family: var(--rpt-font-display) !important;
    font-size: 2.2rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 .25rem;
    letter-spacing: -.01em;
}

.rpt-hero-sub {
    font-size: .85rem;
    color: rgba(255, 255, 255, .7);
    margin: 0;
}

/* Exports */
.rpt-exports {
    display: flex;
    gap: .5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.rpt-export-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1.1rem;
    background: linear-gradient(135deg, var(--rpt-green), #1e7a44);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: var(--rpt-font-body);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    text-decoration: none;
}

.rpt-export-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(26, 107, 60, .25);
    text-decoration: none;
    color: #fff;
}

.rpt-export-alt {
    background: linear-gradient(135deg, #5a4a1e, #8b7632);
}

.rpt-export-alt:hover {
    box-shadow: 0 3px 12px rgba(200, 169, 81, .3);
}

/* Stats Row */
.rpt-stats {
    display: flex;
    gap: .5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.rpt-stat {
    flex: 1;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: .65rem .5rem;
    background: #fff;
    border: 1px solid var(--rpt-border);
    border-radius: 10px;
}

.rpt-stat-num {
    font-family: var(--rpt-font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: #222;
    line-height: 1.1;
    white-space: nowrap;
}

.rpt-stat-green .rpt-stat-num { color: var(--rpt-green); }
.rpt-stat-gold .rpt-stat-num { color: #b8941a; }
.rpt-stat-muted .rpt-stat-num { color: #999; }

.rpt-stat-label {
    font-size: .6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #aaa;
    margin-top: .15rem;
}

/* Cards */
.rpt-card {
    background: #fff;
    border: 1px solid var(--rpt-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(26, 107, 60, .05);
    margin-bottom: 1.25rem;
}

.rpt-card-header {
    padding: .85rem 1.15rem;
    border-bottom: 1px solid #f0ede6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rpt-card-title {
    font-family: var(--rpt-font-body);
    font-size: .9rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.rpt-card-badge {
    font-size: .68rem;
    font-weight: 600;
    padding: .15rem .5rem;
    border-radius: 10px;
    background: var(--rpt-green-soft);
    color: var(--rpt-green);
}

.rpt-card-body {
    padding: 0;
}

/* Grid */
.rpt-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.rpt-grid .rpt-card {
    margin-bottom: 0;
}

/* Status Breakdown */
.rpt-status-grid {
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.rpt-status-item {}

.rpt-status-bar-wrap {
    height: 8px;
    background: #f0ede6;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: .35rem;
}

.rpt-status-bar {
    height: 100%;
    border-radius: 4px;
    transition: width .6s cubic-bezier(.4, 0, .2, 1);
}

.rpt-bar-green { background: linear-gradient(90deg, #1a6b3c, #2a8f55); }
.rpt-bar-gold { background: linear-gradient(90deg, #b8941a, #c8a951); }
.rpt-bar-muted { background: linear-gradient(90deg, #999, #bbb); }

.rpt-status-info {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
}

.rpt-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rpt-status-dot.dot-done { background: #1a6b3c; }
.rpt-status-dot.dot-pending { background: #c8a951; }
.rpt-status-dot.dot-nothali { background: #bbb; }

.rpt-status-name {
    font-weight: 600;
    color: #444;
    min-width: 60px;
}

.rpt-status-count {
    font-family: var(--rpt-font-display);
    font-weight: 700;
    font-size: .95rem;
    color: #222;
}

.rpt-status-pct {
    color: #999;
    font-size: .75rem;
    margin-left: auto;
}

/* Overview Body */
.rpt-overview-body {
    padding: .5rem 0;
}

.rpt-overview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5rem 1.15rem;
    border-bottom: 1px solid #f5f3ee;
}

.rpt-overview-row:last-child {
    border-bottom: none;
}

.rpt-overview-label {
    font-size: .82rem;
    color: #888;
}

.rpt-overview-value {
    font-family: var(--rpt-font-body);
    font-size: .88rem;
    font-weight: 700;
    color: #222;
}

.rpt-val-green { color: var(--rpt-green) !important; }
.rpt-val-gold { color: #b8941a !important; }

/* Tables */
.rpt-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.rpt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
}

.rpt-table th {
    padding: .55rem .85rem;
    text-align: left;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #aaa;
    background: #fafaf7;
    border-bottom: 1px solid #f0ede6;
}

.rpt-table td {
    padding: .5rem .85rem;
    border-bottom: 1px solid #f5f3ee;
    color: #444;
}

.rpt-table tbody tr:last-child td {
    border-bottom: none;
}

.rpt-table tbody tr:hover {
    background: #fafaf7;
}

.rpt-table tfoot td {
    background: var(--rpt-green-soft);
    font-weight: 700;
    color: var(--rpt-green);
    border: none;
}

.rpt-month-name {
    font-weight: 600;
}

.rpt-fill-cell {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.rpt-fill-track {
    flex: 1;
    height: 5px;
    background: #f0ede6;
    border-radius: 3px;
    overflow: hidden;
    max-width: 60px;
}

.rpt-fill-bar {
    height: 100%;
    border-radius: 3px;
}

.rpt-fill-pct {
    font-size: .72rem;
    color: #888;
    min-width: 28px;
}

.rpt-rank {
    font-family: var(--rpt-font-display);
    font-weight: 700;
    color: #bbb;
    font-size: .95rem;
}

.rpt-member-name {
    font-weight: 600;
    color: #2c3e2d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.rpt-amount {
    font-weight: 700;
    color: var(--rpt-green);
}

/* Reports Responsive */
@media (max-width: 768px) {
    .rpt-hero {
        padding: 1.75rem 1.25rem 1.5rem;
        border-radius: 12px;
    }

    .rpt-hero-title {
        font-size: 1.8rem;
    }

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

    .rpt-stats {
        flex-wrap: wrap;
    }

    .rpt-stat {
        min-width: calc(33% - .5rem);
    }

    .rpt-stat-num {
        font-size: 1.1rem;
    }

    .rpt-member-name {
        max-width: 130px;
    }
}

@media (max-width: 480px) {
    .rpt-stat {
        min-width: calc(50% - .5rem);
    }

    .rpt-exports {
        flex-direction: column;
    }
}
