﻿/* ===================================================
   Bohubrihi (বহুব্রীহি) - Room Management & Cleaning Attendance
   Theme: Minimalist Sky Blue (#0284c7) + Emerald/Mint Green (#10b981)
   =================================================== */

:root {
    /* Primary Sky Blue Palette */
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-200: #bae6fd;
    --sky-300: #7dd3fc;
    --sky-400: #38bdf8;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --sky-700: #0369a1;

    /* Secondary Green Palette */
    --green-50: #ecfdf5;
    --green-100: #d1fae5;
    --green-200: #a7f3d0;
    --green-500: #10b981;
    --green-600: #059669;
    --green-700: #047857;

    /* Neutrals */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    /* Functional Colors */
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-500: #f59e0b;
    --amber-600: #d97706;

    --rose-50: #fff1f2;
    --rose-100: #ffe4e6;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;

    /* UI Variables */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    --shadow-hover: 0 12px 20px -3px rgb(2 132 199 / 0.12);

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hind Siliguri', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f6fafd;
    color: var(--slate-800);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: #ffffff;
    border-right: 1px solid var(--sky-100);
    display: flex;
    flex-direction: column;
    padding: 24px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 50;
    box-shadow: 2px 0 12px rgba(2, 132, 199, 0.03);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--slate-100);
    margin-bottom: 24px;
}

.brand-logo {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.brand-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--sky-600) 0%, var(--green-600) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.brand-text .tagline {
    font-size: 0.78rem;
    color: var(--slate-500);
    display: block;
    margin-top: 2px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: transparent;
    border: none;
    color: var(--slate-600);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    position: relative;
}

.nav-item i {
    font-size: 1.1rem;
    color: var(--sky-500);
    width: 22px;
    text-align: center;
    transition: var(--transition);
}

.nav-item:hover {
    background-color: var(--sky-50);
    color: var(--sky-700);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--sky-50) 0%, var(--green-50) 100%);
    color: var(--sky-700);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--sky-600);
}

.nav-item.active i {
    color: var(--sky-600);
    transform: scale(1.1);
}

.badge {
    margin-left: auto;
    background-color: var(--sky-100);
    color: var(--sky-700);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.badge-warning {
    background-color: var(--amber-100);
    color: var(--amber-700);
}

.sidebar-footer {
    padding-top: 14px;
    border-top: 1px solid var(--slate-100);
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    transition: var(--transition);
}

.user-profile-badge:hover {
    background: var(--sky-50);
    border-color: var(--sky-200);
}

.user-avatar-mini {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sky-500), var(--green-500));
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.user-profile-info {
    flex: 1;
    overflow: hidden;
    line-height: 1.2;
}

.user-profile-info strong {
    display: block;
    font-size: 0.88rem;
    color: var(--slate-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-profile-info span {
    font-size: 0.75rem;
    color: var(--slate-400);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-login-toggle {
    background: none;
    border: none;
    color: var(--sky-600);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-login-toggle:hover {
    color: var(--sky-700);
    background: var(--sky-100);
}

.room-pill {
    background: var(--sky-50);
    border: 1px solid var(--sky-200);
    color: var(--sky-700);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.footer-note {
    font-size: 0.75rem;
    color: var(--slate-400);
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #ffffff;
    border-bottom: 1px solid var(--sky-100);
    position: sticky;
    top: 0;
    z-index: 40;
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-brand h2 {
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--sky-600), var(--green-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mobile-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    display: block;
    background: #ffffff;
}

.logo-mini {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--sky-500), var(--green-500));
    border-radius: 50%;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--slate-700);
    cursor: pointer;
}

/* Sticky Pinned Notice */
.sticky-notice {
    background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-left: 5px solid var(--amber-500);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    animation: slideDown 0.3s ease;
}

.sticky-notice.hidden {
    display: none;
}

.sticky-notice-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: #92400e;
}

.pin-icon {
    color: var(--amber-600);
    transform: rotate(30deg);
}

.btn-close-notice {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #b45309;
    cursor: pointer;
    line-height: 1;
}

/* Welcome Header */
.welcome-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--slate-900);
    line-height: 1.2;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--slate-500);
    margin-top: 2px;
}

/* Cards */
.card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--slate-100);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--slate-800);
}

.card-title i {
    font-size: 1.1rem;
}

/* Hero Today Card */
.hero-cleaner-card {
    background: linear-gradient(135deg, #ffffff 0%, var(--sky-50) 60%, var(--green-50) 100%);
    border: 1px solid var(--sky-200);
    position: relative;
    overflow: hidden;
}

.hero-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.badge-today {
    background: var(--sky-600);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    letter-spacing: 0.3px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 500;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.pending {
    background-color: var(--amber-500);
    box-shadow: 0 0 0 3px var(--amber-100);
}

.status-dot.completed {
    background-color: var(--green-500);
    box-shadow: 0 0 0 3px var(--green-100);
}

.hero-body {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.cleaner-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sky-500), var(--green-500));
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

.cleaner-info h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--slate-900);
}

.cleaner-info p {
    color: var(--slate-600);
    font-size: 0.95rem;
    margin-top: 2px;
}

/* Big Attendance Button */
.hero-action {
    margin-top: 10px;
}

.btn-attendance {
    width: 100%;
    background: white;
    border: 2px dashed var(--sky-300);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    font-family: inherit;
}

.btn-attendance:hover {
    border-color: var(--sky-500);
    background-color: var(--sky-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.checkbox-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--sky-400);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.btn-attendance.checked {
    background: var(--green-50);
    border: 2px solid var(--green-500);
}

.btn-attendance.checked .checkbox-circle {
    background: var(--green-500);
    border-color: var(--green-500);
    color: white;
    transform: scale(1.05);
}

.btn-attendance-text .action-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--slate-800);
}

.btn-attendance-text .action-sub {
    font-size: 0.85rem;
    color: var(--slate-500);
}

.hero-meta {
    margin-top: 14px;
    font-size: 0.88rem;
    color: var(--green-700);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

/* Grids */
.grid-2col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

/* Upcoming Cleaners Mini-List */
.upcoming-cleaners-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upcoming-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--slate-50);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--sky-400);
    transition: var(--transition);
    gap: 12px;
}

.upcoming-item:hover {
    background: var(--sky-50);
}

.upcoming-item-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upcoming-member-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.upcoming-item-right {
    flex-shrink: 0;
}

.upcoming-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-mini-avatar {
    width: 34px;
    height: 34px;
    background: var(--sky-100);
    color: var(--sky-700);
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.upcoming-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--slate-800);
}

.upcoming-date {
    font-size: 0.82rem;
    color: var(--slate-500);
}

.days-badge {
    font-size: 0.78rem;
    background: var(--sky-100);
    color: var(--sky-700);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

/* Fine Snapshot Body */
.fine-snapshot-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fine-snapshot-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--green-50);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--green-500);
}

.snapshot-unpaid-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background: var(--sky-600);
    color: white;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.btn-primary:hover {
    background: var(--sky-700);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--slate-700);
    border: 1px solid var(--slate-200);
}

.btn-secondary:hover {
    background: var(--slate-50);
    border-color: var(--slate-300);
}

.btn-warning {
    background: var(--amber-500);
    color: white;
}

.btn-warning:hover {
    background: var(--amber-600);
}

.btn-link {
    background: none;
    border: none;
    color: var(--sky-600);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-danger-outline {
    background: white;
    border: 1px solid var(--rose-200);
    color: var(--rose-600);
}

.btn-danger-outline:hover {
    background: var(--rose-50);
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-vertical-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

/* Responsive Slide Tables for Mobile */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    margin-top: 8px;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Elegant scrollbar for mobile slide */
.table-responsive::-webkit-scrollbar {
    height: 6px;
}
.table-responsive::-webkit-scrollbar-track {
    background: var(--slate-100);
    border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: var(--sky-400);
    border-radius: 4px;
}

.data-table {
    width: 100%;
    min-width: 620px; /* Crucial: Ensures table columns never squish or compress on phones */
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th {
    background: var(--slate-50);
    color: var(--slate-700);
    font-weight: 700;
    padding: 12px 14px;
    text-align: left;
    border-bottom: 2px solid var(--slate-200);
    white-space: nowrap; /* Prevents text from breaking into awkward lines! */
}

.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--slate-100);
    color: var(--slate-700);
    white-space: nowrap; /* Prevents line break on mobile */
    vertical-align: middle;
}

.data-table tr:hover td {
    background-color: var(--sky-50);
}

/* Mobile Slide Scroll Hint Badge */
.table-scroll-hint {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--sky-700);
    background: #e0f2fe;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    margin-bottom: 6px;
    font-weight: 600;
    width: fit-content;
}

@media (max-width: 868px) {
    .table-scroll-hint {
        display: inline-flex;
    }
}

/* Highlights */
.my-schedule-highlight {
    background: linear-gradient(135deg, var(--sky-50) 0%, #ffffff 100%);
    border: 1px solid var(--sky-200);
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.highlight-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--sky-100);
    color: var(--sky-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.highlight-info {
    flex: 1;
    min-width: 250px;
}

.highlight-info h4 {
    font-size: 1.15rem;
    color: var(--slate-900);
    margin-bottom: 4px;
}

.highlight-info p {
    font-size: 0.88rem;
    color: var(--slate-500);
    margin-bottom: 8px;
}

.form-select.user-select {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--sky-300);
    font-family: inherit;
    font-size: 0.95rem;
    background-color: white;
    width: 100%;
    max-width: 300px;
}

.highlight-result {
    background: white;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--sky-200);
    box-shadow: var(--shadow-sm);
    text-align: center;
    min-width: 180px;
}

.turn-label {
    display: block;
    font-size: 0.78rem;
    color: var(--slate-500);
}

.turn-date {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--sky-700);
    margin: 2px 0;
}

.turn-days-left {
    display: inline-block;
    font-size: 0.78rem;
    background: var(--green-100);
    color: var(--green-700);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

/* Timeline */
.schedule-timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.timeline-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.timeline-item.today {
    background: var(--sky-50);
    border-color: var(--sky-400);
    box-shadow: 0 0 0 1px var(--sky-400);
}

.timeline-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.timeline-date-badge {
    min-width: 90px;
    text-align: center;
    background: var(--slate-100);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate-700);
}

.timeline-item.today .timeline-date-badge {
    background: var(--sky-600);
    color: white;
}

.timeline-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--slate-800);
}

/* Notices Grid */
.notices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.notice-card {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-200);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.notice-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.notice-card.pinned {
    border-top: 4px solid var(--amber-500);
    background: linear-gradient(180deg, var(--amber-50) 0%, #ffffff 25%);
}

.notice-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.notice-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--slate-900);
}

.notice-body {
    color: var(--slate-600);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 18px;
    white-space: pre-line;
}

.notice-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--slate-400);
    padding-top: 12px;
    border-top: 1px solid var(--slate-100);
}

.notice-delete-btn {
    background: none;
    border: none;
    color: var(--slate-400);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.notice-delete-btn:hover {
    color: var(--rose-500);
}

/* Fine Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 20px;
    border-radius: var(--radius-lg);
    background: white;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--slate-100);
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-sky .stat-icon {
    background: var(--sky-100);
    color: var(--sky-600);
}

.stat-green .stat-icon {
    background: var(--green-100);
    color: var(--green-600);
}

.stat-light .stat-icon {
    background: var(--slate-100);
    color: var(--slate-600);
}

.stat-label {
    font-size: 0.82rem;
    color: var(--slate-500);
}

.stat-val {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--slate-900);
}

/* Members Grid */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.member-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--slate-100);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    position: relative;
    transition: var(--transition);
}

.member-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.member-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sky-400), var(--green-400));
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.member-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--slate-900);
}

.member-phone {
    font-size: 0.85rem;
    color: var(--slate-500);
    margin-top: 2px;
}

.member-stats {
    display: flex;
    justify-content: space-around;
    background: var(--slate-50);
    padding: 10px;
    border-radius: var(--radius-md);
    margin-top: 14px;
    font-size: 0.82rem;
}

.member-stats div {
    display: flex;
    flex-direction: column;
}

.member-stats strong {
    font-size: 1rem;
    color: var(--slate-800);
}

.member-del-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--slate-300);
    cursor: pointer;
    font-size: 0.9rem;
}

.member-del-btn:hover {
    color: var(--rose-500);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    padding: 16px;
}

.modal-overlay.active,
.modal-overlay.open {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
}

.modal-box {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(15px);
    transition: transform 0.2s ease;
}

.modal-overlay.active .modal-box,
.modal-overlay.open .modal-box {
    transform: translateY(0) !important;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--slate-100);
}

.modal-header h3 {
    font-size: 1.2rem;
    color: var(--slate-800);
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--slate-400);
    cursor: pointer;
}

.modal-body {
    padding: 22px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 22px;
    background: var(--slate-50);
    border-top: 1px solid var(--slate-100);
}

/* Form Controls */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--slate-700);
    margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--slate-800);
    background-color: white;
    transition: var(--transition);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--sky-500);
    box-shadow: 0 0 0 3px var(--sky-100);
}

.form-group-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    color: var(--slate-700);
}

.modal-rules-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rule-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.rule-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--sky-100);
    color: var(--sky-700);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.rule-text {
    font-size: 0.92rem;
    color: var(--slate-700);
    line-height: 1.5;
}

/* Toast (Lifted above Netlify badge and bottom floating overlays) */
.toast {
    position: fixed;
    bottom: 84px;
    right: 24px;
    background: rgba(15, 23, 42, 0.95);
    color: #ffffff;
    padding: 12px 22px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    font-weight: 500;
    box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.3), 0 4px 10px -2px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    transform: translateY(30px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: calc(100% - 48px);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.toast-icon {
    color: var(--green-400);
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Tab Management */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

/* Helper Utilities */
.text-primary { color: var(--sky-600); }
.text-green { color: var(--green-600); }
.text-warning { color: var(--amber-500); }
.text-muted { color: var(--slate-500); font-size: 0.85rem; }
.mt-4 { margin-top: 1.5rem; }

/* Blood Filter Pills */
.blood-filter-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.blood-pill {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--slate-200);
    background: white;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--slate-700);
    cursor: pointer;
    transition: var(--transition);
}

.blood-pill:hover, .blood-pill.active {
    background: var(--rose-500);
    color: white;
    border-color: var(--rose-500);
    box-shadow: 0 2px 6px rgba(244, 63, 94, 0.25);
}

/* Ranking & Leaderboard Tiers */
.ranking-tier-explainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.tier-explain-item {
    background: white;
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-200);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rank-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    width: fit-content;
}

.badge-platinum {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #3730a3;
    border: 1px solid #a5b4fc;
}

.badge-gold {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.badge-silver {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
    border: 1px solid #cbd5e1;
}

.badge-bronze {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    color: #9a3412;
    border: 1px solid #fdba74;
}

.leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.leaderboard-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--slate-200);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    position: relative;
    transition: var(--transition);
}

.leaderboard-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.leaderboard-rank-pos {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--slate-100);
    color: var(--slate-700);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.leaderboard-stars {
    color: #f59e0b;
    font-size: 1.1rem;
    margin: 8px 0;
}

/* Stock Alerts List */
.stock-alerts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.stock-alert-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--amber-50);
    border: 1px solid var(--amber-200);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: #92400e;
}

/* Member Badges & Tags */
.status-badge-current {
    background: #dcfce7;
    color: #15803d;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-badge-alumni {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.blood-badge {
    background: #ffe4e6;
    color: #e11d48;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Alumni Restricted State */
body.alumni-mode .current-member-only {
    display: none !important;
}

/* Tier Badges & Aliases */
.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 700;
}
.tier-platinum {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #3730a3;
    border: 1px solid #a5b4fc;
}
.tier-gold {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}
.tier-silver {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
    border: 1px solid #cbd5e1;
}
.tier-bronze {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    color: #9a3412;
    border: 1px solid #fdba74;
}

/* Leaderboard Card Elements */
.leaderboard-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-200);
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.leaderboard-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--sky-200);
}
.leaderboard-rank-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--slate-100);
    color: var(--slate-700);
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.leaderboard-rank-badge.rank-1 {
    background: linear-gradient(135deg, #fef08a 0%, #eab308 100%);
    color: #713f12;
    box-shadow: 0 2px 8px rgba(234, 179, 8, 0.4);
}
.leaderboard-rank-badge.rank-2 {
    background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%);
    color: #1e293b;
}
.leaderboard-rank-badge.rank-3 {
    background: linear-gradient(135deg, #fed7aa 0%, #f97316 100%);
    color: #7c2d12;
}
.leaderboard-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--sky-100);
    color: var(--sky-700);
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.leaderboard-info {
    flex: 1;
}
.leaderboard-stars {
    margin: 4px 0 6px 0;
    display: flex;
    align-items: center;
}
.star-filled {
    color: #f59e0b;
}
.star-empty {
    color: #cbd5e1;
}
.leaderboard-metrics {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--slate-600);
}

/* Blood Badge Card */
.blood-badge-card {
    background: #ffe4e6;
    color: #e11d48;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Stock Alert Items */
.stock-alert-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
}
.stock-alert-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.stock-alert-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fef3c7;
    color: #d97706;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.stock-alert-title {
    font-weight: 700;
    color: #92400e;
    font-size: 0.95rem;
}
.stock-alert-meta {
    font-size: 0.82rem;
    color: #78350f;
    margin-top: 2px;
}

/* Shift Swap Request Cards & Alerts */
.dashboard-swap-alert {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.15);
    animation: slideDown 0.3s ease;
}
.dashboard-swap-alert .alert-text {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e40af;
    font-weight: 600;
    font-size: 0.95rem;
}
.dashboard-swap-alert .alert-text i {
    font-size: 1.3rem;
    color: #2563eb;
}

.swap-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.swap-request-card {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-200);
    padding: 16px 20px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--sky-500);
    transition: var(--transition);
}
.swap-request-card.incoming {
    border-left-color: #f59e0b;
    background: #fffdf5;
}
.swap-request-card.accepted {
    border-left-color: #10b981;
    background: #f0fdf4;
}
.swap-request-card.rejected {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.swap-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.swap-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.swap-details-grid {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--slate-50);
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    margin: 12px 0;
    flex-wrap: wrap;
    border: 1px solid var(--slate-200);
}
.swap-box {
    flex: 1;
    min-width: 170px;
}
.swap-box-label {
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--slate-500);
    margin-bottom: 4px;
}
.swap-box strong {
    display: block;
    font-size: 0.95rem;
    color: var(--slate-800);
    margin-bottom: 4px;
}
.swap-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--slate-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sky-600);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.swap-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

/* Keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 899;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.sidebar-backdrop.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 868px) {
    .sidebar {
        position: fixed;
        left: -320px;
        top: 0;
        bottom: 0;
        height: 100vh;
        z-index: 900;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
    }

    .sidebar.open {
        left: 0;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
    }

    .mobile-header {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 100;
        background: #ffffff;
    }

    .main-content {
        padding: 20px 16px;
    }

    .hero-body {
        flex-direction: column;
        text-align: center;
    }

    .hero-header {
        flex-direction: column;
        gap: 8px;
    }

    .toast {
        bottom: 80px;
        right: 16px;
        left: 16px;
        max-width: calc(100% - 32px);
        margin: 0 auto;
        justify-content: center;
        text-align: center;
        padding: 11px 18px;
        font-size: 0.88rem;
    }
}


/* ====================================================================
   SUPABASE REALTIME & ARCHITECTURAL REFACTOR STYLES
   ==================================================================== */

/* Cloud Status Pill in Sidebar */
.cloud-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--slate-600);
    margin-bottom: 16px;
    width: fit-content;
}

.cloud-status-pill.connected {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.cloud-status-pill.disconnected {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.status-dot-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseDot 2s infinite;
}

.cloud-status-pill.disconnected .status-dot-pulse {
    background: #ef4444;
    animation: none;
}

@keyframes pulseDot {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Tier 1 Guest Lock Overlays */
.guest-locked-view {
    padding: 24px 0;
}

.guest-lock-card {
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    max-width: 520px;
    margin: 20px auto;
    box-shadow: var(--shadow-sm);
}

.lock-big-icon {
    font-size: 3rem;
    color: var(--sky-500);
    margin-bottom: 16px;
    background: #f0f9ff;
    width: 72px;
    height: 72px;
    line-height: 72px;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
}

.guest-lock-card h3 {
    font-size: 1.25rem;
    color: var(--slate-800);
    margin-bottom: 10px;
}

.guest-lock-card p {
    font-size: 0.92rem;
    color: var(--slate-600);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Privacy Masked Fields */
.masked-field {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 500;
}

/* Immutable Ledger: Strikethrough & Audit Trail Tags */
.strikethrough-entry {
    text-decoration: line-through;
    color: var(--slate-400);
    margin-right: 6px;
}

.badge-correction {
    background: #fef3c7;
    color: #92400e;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #fde68a;
}

.audit-trail-tag {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    color: #92400e;
    background: #fffbeb;
    padding: 4px 8px;
    border-radius: 4px;
    border-left: 3px solid #f59e0b;
    line-height: 1.4;
}

.audit-preview-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    font-size: 0.88rem;
    color: var(--slate-700);
    margin-bottom: 12px;
}

/* Dynamic Fine Quick-Select Chips */
.quick-fine-chips {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.chip-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate-700);
    cursor: pointer;
    transition: var(--transition);
}

.chip-btn:hover {
    background: var(--sky-100);
    border-color: var(--sky-400);
    color: var(--sky-800);
}

/* Pending Approvals Queue */
.pending-section {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-left: 4px solid var(--amber-500);
    border-radius: 6px;
    padding: 12px 14px;
}

.pending-member-item {
    background: white;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 10px 12px;
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pending-badge {
    background: #fed7aa;
    color: #9a3412;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
}

/* Alumni Welcome Banner */
.alumni-welcome-card {
    background: #f8fafc;
    border-left: 4px solid #475569;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

/* Spinner and Button Loading State */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-loading {
    opacity: 0.82;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

/* Web Push Notification Banner */
.notif-card {
    transition: all 0.3s ease;
}

@media (max-width: 640px) {
    .notif-card {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    .notif-card button {
        width: 100%;
        justify-content: center;
    }
}

/* Directory Segmented Toggle Group */
.directory-toggle-group {
    display: inline-flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: var(--radius-md);
    gap: 4px;
    border: 1px solid #cbd5e1;
}

.dir-toggle-btn {
    border: none;
    background: transparent;
    padding: 8px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--slate-600);
    border-radius: calc(var(--radius-md) - 2px);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dir-toggle-btn:hover {
    color: var(--slate-900);
}

.dir-toggle-btn.active {
    background: #ffffff;
    color: var(--sky-700);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Contact Action Buttons on Member Cards */
.member-contact-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--slate-200);
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-contact-call {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}
.btn-contact-call:hover {
    background: #dbeafe;
    color: #1e40af;
}

.btn-contact-wa {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}
.btn-contact-wa:hover {
    background: #dcfce7;
    color: #166534;
}

.btn-contact-email {
    background: #f8fafc;
    color: #475569;
    border-color: #cbd5e1;
}
.btn-contact-email:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* Print Stylesheet for Audit Reports */
@media print {
    body * {
        visibility: hidden !important;
    }
    #modal-audit-export,
    #modal-audit-export .modal-box,
    #auditPrintableArea,
    #auditPrintableArea * {
        visibility: visible !important;
    }
    #modal-audit-export {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        background: transparent !important;
        padding: 0 !important;
        display: block !important;
    }
    #modal-audit-export .modal-header,
    #modal-audit-export .modal-footer,
    #modal-audit-export .btn-close-modal,
    #modal-audit-export .modal-body > div:first-child {
        display: none !important;
    }
    #modal-audit-export .modal-box {
        max-width: 100% !important;
        width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    #auditPrintableArea {
        border: none !important;
        padding: 0 !important;
    }
    .data-table th, .data-table td {
        border: 1px solid #cbd5e1 !important;
    }
}

/* User Profile Avatar & Preset Styles */
.user-avatar-mini img,
.member-avatar img,
.leaderboard-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.avatar-preset-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
    background: #e2e8f0;
}

.avatar-preset-btn:hover,
.avatar-preset-btn.active {
    border-color: #4f46e5;
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.avatar-preset-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-profile-badge {
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-radius: var(--radius-md);
}

.user-profile-badge:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* ====================================================================
   MINIMAL HEADER & APP ACTIONS DROPDOWN STYLES
   ==================================================================== */
.app-dropdown-container {
    position: relative;
    display: inline-block;
}

.btn-avatar-menu {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    background: #ffffff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-full);
    color: var(--slate-800);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-avatar-menu:hover,
.btn-avatar-menu.active {
    background: var(--sky-50);
    border-color: var(--sky-400);
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.15);
}

.avatar-xs {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--sky-500);
    display: block;
    background: #e2e8f0;
}

.dropdown-caret {
    font-size: 0.65rem;
    color: var(--slate-400);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-avatar-menu.active .dropdown-caret {
    transform: rotate(180deg);
}

.app-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    background: #ffffff;
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    box-shadow: 0 12px 30px -4px rgba(15, 23, 42, 0.15), 0 4px 12px -2px rgba(15, 23, 42, 0.08);
    padding: 6px 0;
    z-index: 1000;
    display: none;
    animation: dropdownPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-dropdown-menu.show {
    display: block;
}

@keyframes dropdownPop {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-user-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 12px;
    border-bottom: 1px solid var(--slate-100);
    background: var(--slate-50);
    border-radius: 12px 12px 0 0;
    transition: background 0.15s ease;
}

.dropdown-user-header:hover {
    background: #f1f5f9;
}

.dropdown-user-header img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--sky-500);
    background: #e2e8f0;
}

.dropdown-user-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--slate-900);
    line-height: 1.2;
}

.dropdown-user-sub {
    font-size: 0.74rem;
    color: var(--slate-500);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    color: var(--slate-700);
    font-size: 0.88rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
    font-family: inherit;
}

.dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--slate-500);
}

.dropdown-item:hover {
    background: var(--sky-50);
    color: var(--sky-700);
}

.dropdown-item:hover i {
    color: var(--sky-600);
}

.dropdown-divider {
    height: 1px;
    background: var(--slate-100);
    margin: 4px 0;
}

/* ====================================================================
   DEDICATED PROFILE TAB STYLES
   ==================================================================== */
.profile-tab-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0369a1 100%);
    border-radius: var(--radius-lg);
    padding: 26px 24px;
    color: #ffffff;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 22px;
    box-shadow: var(--shadow-md);
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

.profile-tab-header::after {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.22) 0%, transparent 70%);
    pointer-events: none;
}

.profile-tab-avatar-wrapper {
    position: relative;
    width: 96px;
    height: 96px;
    flex-shrink: 0;
}

.profile-tab-avatar-img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3.5px solid #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    background: #e2e8f0;
}

.profile-tab-camera-btn {
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 32px;
    height: 32px;
    background: var(--sky-500);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s ease, background 0.15s ease;
    border: 2px solid #ffffff;
}

.profile-tab-camera-btn:hover {
    transform: scale(1.1);
    background: var(--sky-600);
}

.profile-tab-user-meta {
    flex: 1;
    min-width: 220px;
}

.profile-tab-name {
    font-size: 1.55rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
    line-height: 1.2;
}

.profile-tab-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.profile-tab-meta-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.84rem;
    color: var(--sky-100);
}

.profile-meta-pill {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.profile-edit-section {
    background: #ffffff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.profile-edit-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--slate-100);
    padding-bottom: 10px;
}

/* ====================================================================
   QUICK ACTION RIBBON (মিনিমাল আইকন রিবন)
   ==================================================================== */
.quick-action-ribbon {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex-wrap: wrap;
}

.quick-action-ribbon::-webkit-scrollbar {
    display: none;
}

.ribbon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    background: #f8fafc;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--slate-700);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.ribbon-btn:hover {
    background: var(--sky-50);
    border-color: var(--sky-300);
    color: var(--sky-700);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(2, 132, 199, 0.12);
}

.ribbon-btn:active {
    transform: translateY(0);
}

.ribbon-btn.active {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.ribbon-btn i {
    font-size: 0.88rem;
}

/* ====================================================================
   MINIMAL NOTIFICATION BELL & 30-DAY NOTIFICATION PANEL
   ==================================================================== */
.btn-notif-bell {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--slate-200);
    background: #ffffff;
    color: var(--slate-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-notif-bell:hover {
    background: var(--sky-50);
    border-color: var(--sky-300);
    color: var(--sky-600);
}

.sidebar-notif-bell {
    background: var(--slate-50);
    border-color: var(--slate-200);
    color: var(--slate-700);
    margin-left: auto;
}

.notif-bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: var(--radius-full);
    background: var(--rose-600);
    color: #ffffff;
    font-size: 0.66rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #ffffff;
    line-height: 1;
}

.notif-panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(2px);
    z-index: 9490;
    display: none;
}

.notif-panel-backdrop.show {
    display: block;
}

.notif-panel {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 390px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 36px);
    background: #ffffff;
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.25);
    z-index: 9500;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: dropdownPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.notif-panel.show {
    display: flex;
}

.notif-panel-header {
    padding: 14px 16px;
    background: var(--slate-50);
    border-bottom: 1px solid var(--slate-200);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.notif-panel-count-pill {
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--sky-100);
    color: var(--sky-700);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.btn-close-notif-panel {
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--slate-500);
    cursor: pointer;
    padding: 0 4px;
}

.btn-close-notif-panel:hover {
    color: var(--slate-900);
}

.notif-push-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 16px;
    background: #f0f9ff;
    border-bottom: 1px solid #bae6fd;
    color: #0369a1;
}

.notif-push-strip.active {
    background: #ecfdf5;
    border-bottom-color: #a7f3d0;
    color: #047857;
}

.btn-xs-pill {
    padding: 3px 10px;
    font-size: 0.74rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    border: 1px solid currentColor;
    background: #ffffff;
    color: inherit;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
}

.btn-xs-pill:hover {
    opacity: 0.85;
}

.notif-panel-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    border-bottom: 1px solid var(--slate-100);
    background: #ffffff;
}

.notif-action-link {
    background: none;
    border: none;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--sky-600);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 6px;
    border-radius: 6px;
    font-family: inherit;
    transition: background 0.15s ease;
}

.notif-action-link:hover {
    background: var(--sky-50);
}

.notif-action-link.danger {
    color: var(--rose-600);
}

.notif-action-link.danger:hover {
    background: var(--rose-50);
}

.notif-panel-body {
    overflow-y: auto;
    flex: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f8fafc;
}

.notif-item {
    background: #ffffff;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    padding: 11px 13px;
    cursor: pointer;
    transition: all 0.16s ease;
    position: relative;
}

.notif-item:hover {
    border-color: var(--sky-300);
    box-shadow: var(--shadow-sm);
}

.notif-item.unread {
    background: #f0f9ff;
    border-color: #bae6fd;
    border-left: 3.5px solid var(--sky-600);
}

.notif-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
}

.notif-scope-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.notif-scope-badge.personal {
    background: #ede9fe;
    color: #5b21b6;
}

.notif-scope-badge.broadcast {
    background: #fef3c7;
    color: #b45309;
}

.notif-time-dhaka {
    font-size: 0.7rem;
    color: var(--slate-500);
    white-space: nowrap;
}

.notif-item-title {
    font-size: 0.87rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 3px;
    line-height: 1.35;
}

.notif-item-body {
    font-size: 0.8rem;
    color: var(--slate-600);
    line-height: 1.45;
}

.notif-empty-state {
    text-align: center;
    padding: 36px 16px;
    color: var(--slate-400);
    font-size: 0.86rem;
}

@media (max-width: 768px) {
    .notif-panel {
        top: 62px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 80px);
    }
}


/* ====================================================================
   APPLE LIQUID / FROSTED PILL GLASS — DUAL THEME (LIGHT + DARK)
   ZERO-OVERLAP & RESPONSIVE FLUID ARCHITECTURE
   ==================================================================== */
:root,
html[data-theme="light"] {
    --bg-canvas: #f4f7fb;
    --bg-mesh:
        radial-gradient(circle at 10% 8%, rgba(56, 189, 248, 0.16) 0%, transparent 42%),
        radial-gradient(circle at 90% 12%, rgba(16, 185, 129, 0.12) 0%, transparent 38%),
        radial-gradient(circle at 50% 94%, rgba(99, 102, 241, 0.09) 0%, transparent 46%);

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;

    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: rgba(148, 163, 184, 0.28);
    --slate-100: rgba(241, 245, 249, 0.85);
    --slate-50: rgba(248, 250, 252, 0.88);

    --sky-50: rgba(14, 165, 233, 0.1);
    --sky-100: rgba(14, 165, 233, 0.18);
    --sky-600: #0284c7;
    --sky-700: #0369a1;

    --green-50: rgba(16, 185, 129, 0.1);
    --green-100: rgba(16, 185, 129, 0.18);
    --green-600: #059669;
    --green-700: #047857;

    --amber-50: rgba(245, 158, 11, 0.12);
    --amber-100: rgba(245, 158, 11, 0.2);

    --rose-50: rgba(244, 63, 94, 0.1);

    --glass-bg: rgba(255, 255, 255, 0.74);
    --glass-bg-hover: rgba(255, 255, 255, 0.88);
    --glass-surface-strong: rgba(255, 255, 255, 0.94);
    --glass-subbox-bg: rgba(248, 250, 252, 0.8);
    --sidebar-bg: rgba(255, 255, 255, 0.82);
    --topbar-bg: rgba(255, 255, 255, 0.8);
    --bottomnav-bg: rgba(255, 255, 255, 0.86);
    --input-bg: rgba(255, 255, 255, 0.92);
    --input-readonly-bg: rgba(241, 245, 249, 0.92);
    --table-head-bg: rgba(241, 245, 249, 0.88);

    --glass-border: rgba(148, 163, 184, 0.28);
    --glass-border-highlight: rgba(255, 255, 255, 0.92);
    --glass-border-hover: rgba(14, 165, 233, 0.42);
    --glass-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    --glass-shadow-hover: 0 16px 38px rgba(15, 23, 42, 0.1);
    --scrim-bg: rgba(15, 23, 42, 0.42);

    --accent-sky: #0369a1;
    --accent-sky-bg: rgba(14, 165, 233, 0.12);
    --accent-sky-border: rgba(14, 165, 233, 0.28);

    --accent-green: #047857;
    --accent-green-bg: rgba(16, 185, 129, 0.12);
    --accent-green-border: rgba(16, 185, 129, 0.3);

    --accent-amber: #b45309;
    --accent-amber-bg: rgba(245, 158, 11, 0.14);
    --accent-amber-border: rgba(245, 158, 11, 0.34);

    --accent-rose: #be123c;
    --accent-rose-bg: rgba(244, 63, 94, 0.11);
    --accent-rose-border: rgba(244, 63, 94, 0.28);

    --accent-indigo: #4338ca;
    --accent-indigo-bg: rgba(99, 102, 241, 0.12);
    --accent-indigo-border: rgba(99, 102, 241, 0.28);

    --radius-card: 22px;
    --radius-pill: 9999px;
    --motion-fluid: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="dark"] {
    --bg-canvas: #060b16;
    --bg-mesh:
        radial-gradient(circle at 12% 8%, rgba(56, 189, 248, 0.15) 0%, transparent 42%),
        radial-gradient(circle at 88% 14%, rgba(16, 185, 129, 0.11) 0%, transparent 38%),
        radial-gradient(circle at 52% 92%, rgba(99, 102, 241, 0.1) 0%, transparent 46%);

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --slate-950: #f8fafc;
    --slate-900: #f1f5f9;
    --slate-800: #e2e8f0;
    --slate-700: #cbd5e1;
    --slate-600: #94a3b8;
    --slate-500: #94a3b8;
    --slate-400: #64748b;
    --slate-300: rgba(148, 163, 184, 0.28);
    --slate-200: rgba(148, 163, 184, 0.18);
    --slate-100: rgba(30, 41, 59, 0.72);
    --slate-50: rgba(15, 23, 42, 0.68);

    --sky-50: rgba(14, 165, 233, 0.14);
    --sky-100: rgba(56, 189, 248, 0.22);
    --sky-600: #38bdf8;
    --sky-700: #7dd3fc;

    --green-50: rgba(16, 185, 129, 0.14);
    --green-100: rgba(16, 185, 129, 0.22);
    --green-600: #34d399;
    --green-700: #6ee7b7;

    --amber-50: rgba(245, 158, 11, 0.14);
    --amber-100: rgba(245, 158, 11, 0.22);

    --rose-50: rgba(244, 63, 94, 0.14);

    --glass-bg: rgba(15, 23, 42, 0.72);
    --glass-bg-hover: rgba(30, 41, 59, 0.8);
    --glass-surface-strong: rgba(11, 18, 34, 0.95);
    --glass-subbox-bg: rgba(30, 41, 59, 0.62);
    --sidebar-bg: rgba(9, 14, 28, 0.86);
    --topbar-bg: rgba(10, 16, 30, 0.82);
    --bottomnav-bg: rgba(9, 14, 28, 0.9);
    --input-bg: rgba(15, 23, 42, 0.82);
    --input-readonly-bg: rgba(15, 23, 42, 0.52);
    --table-head-bg: rgba(30, 41, 59, 0.85);

    --glass-border: rgba(148, 163, 184, 0.18);
    --glass-border-highlight: rgba(148, 163, 184, 0.22);
    --glass-border-hover: rgba(56, 189, 248, 0.42);
    --glass-shadow: 0 12px 32px rgba(0, 0, 0, 0.34);
    --glass-shadow-hover: 0 18px 40px rgba(0, 0, 0, 0.45);
    --scrim-bg: rgba(2, 6, 23, 0.75);

    --accent-sky: #7dd3fc;
    --accent-sky-bg: rgba(14, 165, 233, 0.16);
    --accent-sky-border: rgba(56, 189, 248, 0.32);

    --accent-green: #6ee7b7;
    --accent-green-bg: rgba(16, 185, 129, 0.16);
    --accent-green-border: rgba(16, 185, 129, 0.34);

    --accent-amber: #fde68a;
    --accent-amber-bg: rgba(245, 158, 11, 0.16);
    --accent-amber-border: rgba(245, 158, 11, 0.34);

    --accent-rose: #fda4af;
    --accent-rose-bg: rgba(244, 63, 94, 0.16);
    --accent-rose-border: rgba(244, 63, 94, 0.34);

    --accent-indigo: #c7d2fe;
    --accent-indigo-bg: rgba(99, 102, 241, 0.22);
    --accent-indigo-border: rgba(129, 140, 248, 0.36);
}

/* Base Canvas & Safe Overflow Clip (Preserves Sticky + Eliminates Horizontal Spill) */
html, body {
    background-color: var(--bg-canvas);
    background-image: var(--bg-mesh);
    background-attachment: fixed;
    color: var(--text-primary);
    overflow-x: clip;
    transition: background-color 0.28s var(--motion-fluid), color 0.28s var(--motion-fluid);
}

.app-container,
.main-content {
    overflow-x: clip;
    min-width: 0;
}

*:focus-visible {
    outline: 2px solid var(--sky-600);
    outline-offset: 2px;
}

/* Sidebar Frosted Glass */
.sidebar {
    background: var(--sidebar-bg);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border-right: 1px solid var(--glass-border);
}

.brand {
    border-bottom: 1px solid var(--glass-border);
}

.brand-text h1 {
    color: var(--text-primary);
}

.brand-text .tagline {
    color: var(--text-muted);
}

.cloud-status-pill {
    border-radius: var(--radius-pill);
    background: var(--glass-subbox-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.cloud-status-pill.connected {
    background: var(--accent-green-bg);
    border-color: var(--accent-green-border);
    color: var(--accent-green);
}

.cloud-status-pill.disconnected {
    background: var(--accent-rose-bg);
    border-color: var(--accent-rose-border);
    color: var(--accent-rose);
}

.nav-item {
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    border: 1px solid transparent;
    min-height: 44px;
    transition: all 0.22s var(--motion-fluid);
}

.nav-item:hover {
    background: var(--accent-sky-bg);
    color: var(--text-primary);
    border-color: var(--accent-sky-border);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--accent-sky-bg), var(--accent-green-bg));
    border-color: var(--accent-sky-border);
    color: var(--text-primary);
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.14);
}

.nav-item.active i {
    color: var(--sky-600);
}

.user-profile-badge {
    border-radius: 18px;
    background: var(--glass-subbox-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.user-profile-badge:hover {
    background: var(--accent-sky-bg);
    border-color: var(--accent-sky-border);
}

.room-pill {
    border-radius: var(--radius-pill);
    background: var(--glass-subbox-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

/* Unified Minimal Pill Top Bar — High Z-index so Dropdown NEVER Clips or Overwrites */
.app-topbar {
    position: sticky;
    top: 10px;
    z-index: 960;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 14px;
    margin-bottom: 18px;
    border-radius: var(--radius-pill);
    background: var(--topbar-bg);
    backdrop-filter: blur(22px) saturate(165%);
    -webkit-backdrop-filter: blur(22px) saturate(165%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.mobile-brand {
    display: none;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.mobile-brand h2 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--sky-600), var(--green-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.15;
}

.topbar-sub {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.desktop-topbar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.desktop-page-crumb {
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Circular Glass Controls (Theme Toggle + Bell + Pill Avatar Menu) */
.btn-theme-toggle,
.btn-notif-bell {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-subbox-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s var(--motion-fluid), background 0.2s ease, border-color 0.2s ease;
}

.btn-theme-toggle:hover,
.btn-notif-bell:hover {
    transform: scale(1.05);
    background: var(--accent-sky-bg);
    border-color: var(--accent-sky-border);
    color: var(--sky-600);
}

.btn-avatar-menu {
    min-height: 40px;
    background: var(--glass-subbox-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 4px 12px 4px 5px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    transition: all 0.2s var(--motion-fluid);
}

.btn-avatar-menu:hover,
.btn-avatar-menu.active {
    background: var(--accent-sky-bg);
    border-color: var(--accent-sky-border);
    color: var(--text-primary);
}

.avatar-xs {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--sky-600);
    background: var(--glass-subbox-bg);
}

.app-dropdown-menu {
    z-index: 1100;
    max-width: calc(100vw - 24px);
    border-radius: 20px;
    background: var(--glass-surface-strong);
    backdrop-filter: blur(24px) saturate(165%);
    -webkit-backdrop-filter: blur(24px) saturate(165%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow-hover);
}

.dropdown-user-header {
    background: var(--glass-subbox-bg);
    border-bottom: 1px solid var(--glass-border);
    border-radius: 14px 14px 0 0;
}

.dropdown-user-header:hover {
    background: var(--accent-sky-bg);
}

.dropdown-user-title { color: var(--text-primary); }
.dropdown-user-sub { color: var(--text-muted); }

.dropdown-item {
    color: var(--text-primary);
    border-radius: 12px;
    margin: 2px 6px;
    width: calc(100% - 12px);
    min-height: 40px;
}

.dropdown-item:hover {
    background: var(--accent-sky-bg);
    color: var(--accent-sky);
}

.dropdown-divider {
    background: var(--glass-border);
}

/* Segmented Glass Sub-Tab Pills (Fluid Wrap, Never Clipped) */
.sub-tab-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 5px;
    margin-bottom: 16px;
    border-radius: 22px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--glass-shadow);
    width: fit-content;
    max-width: 100%;
}

.sub-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 7px 15px;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--motion-fluid);
    white-space: nowrap;
}

.sub-pill:hover {
    color: var(--text-primary);
    background: var(--glass-subbox-bg);
}

.sub-pill.active {
    background: linear-gradient(135deg, var(--accent-sky-bg), var(--accent-green-bg));
    color: var(--text-primary);
    border-color: var(--accent-sky-border);
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.14);
}

/* ====================================================================
   SUPER MINIMAL FLUID HOME HUB (#tab-home)
   ==================================================================== */
.bento-hero-glass {
    background: linear-gradient(135deg, var(--accent-sky-bg) 0%, var(--glass-bg) 52%, var(--accent-green-bg) 100%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 26px;
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    box-shadow: var(--glass-shadow);
    margin-bottom: 20px;
}

.bento-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: var(--accent-sky-bg);
    border: 1px solid var(--accent-sky-border);
    color: var(--accent-sky);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.bento-hero-heading {
    margin: 0 0 8px 0;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-primary);
}

.bento-hero-desc {
    margin: 0;
    max-width: 680px;
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.65;
}

.bento-duty-hero {
    background: linear-gradient(135deg, var(--accent-sky-bg) 0%, var(--glass-bg) 55%, var(--accent-green-bg) 100%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 22px 24px;
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    box-shadow: var(--glass-shadow);
    margin-bottom: 18px;
}

.bento-duty-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.bento-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
    background: var(--accent-amber-bg);
    color: var(--accent-amber);
    border: 1px solid var(--accent-amber-border);
}

.bento-status-pill.completed {
    background: var(--accent-green-bg);
    color: var(--accent-green);
    border-color: var(--accent-green-border);
}

.bento-duty-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.bento-duty-user {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1 1 240px;
}

.bento-duty-user h3 {
    color: var(--text-primary);
}

.bento-duty-cta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.bento-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 18px 0;
}

.bento-kpi-tile {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    padding: 16px 18px;
    border-radius: var(--radius-card);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(18px) saturate(155%);
    -webkit-backdrop-filter: blur(18px) saturate(155%);
    box-shadow: var(--glass-shadow);
    color: var(--text-primary);
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.22s var(--motion-fluid), border-color 0.22s ease, box-shadow 0.22s ease;
}

.bento-kpi-tile:hover {
    transform: translateY(-2px);
    border-color: var(--glass-border-hover);
    box-shadow: var(--glass-shadow-hover);
}

.kpi-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.kpi-val {
    font-size: 1.32rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.25;
}

.kpi-sub {
    font-size: 0.75rem;
    color: var(--accent-sky);
}

.home-utility-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 2px;
}

.bento-section-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 4px 0 12px 0;
}

.bento-launcher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 14px;
}

.bento-module-card {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 16px;
    border-radius: var(--radius-card);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--glass-shadow);
    color: var(--text-primary);
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.22s var(--motion-fluid), border-color 0.22s ease, background 0.22s ease;
}

.bento-module-card:hover {
    transform: translateY(-2px);
    border-color: var(--glass-border-hover);
    background: var(--glass-bg-hover);
}

.bento-mod-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.bento-mod-icon.sky { background: var(--accent-sky-bg); color: var(--accent-sky); }
.bento-mod-icon.emerald { background: var(--accent-green-bg); color: var(--accent-green); }
.bento-mod-icon.amber { background: var(--accent-amber-bg); color: var(--accent-amber); }
.bento-mod-icon.rose { background: var(--accent-rose-bg); color: var(--accent-rose); }
.bento-mod-icon.violet { background: var(--accent-indigo-bg); color: var(--accent-indigo); }

.bento-mod-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.bento-mod-meta strong {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.bento-mod-meta span {
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.35;
}

/* ====================================================================
   FROSTED PILL MOBILE BOTTOM NAVIGATION
   ==================================================================== */
.mobile-bottom-nav {
    display: none;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    height: 52px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--motion-fluid);
    padding: 4px 2px;
}

.mobile-nav-item i {
    font-size: 1.05rem;
}

.mobile-nav-item.active {
    background: linear-gradient(135deg, var(--accent-sky-bg), var(--accent-green-bg));
    color: var(--accent-sky);
    border-color: var(--accent-sky-border);
}

/* ====================================================================
   ROUNDED GLASS COMPONENTS & ZERO-OVERLAP GRID FIXES
   ==================================================================== */
.section-title { color: var(--text-primary); }
.section-subtitle { color: var(--text-muted); }

/* Prevent flex header + button collisions on ALL pages */
.welcome-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.welcome-bar > div {
    min-width: 0;
    flex: 1 1 220px;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100%;
}

.btn {
    border-radius: var(--radius-pill);
    min-height: 40px;
    transition: transform 0.18s var(--motion-fluid), background 0.18s ease, box-shadow 0.18s ease;
}

.btn:active {
    transform: scale(0.98);
}

.badge {
    border-radius: var(--radius-pill);
}

/* Safe fluid grid breakpoints (eliminates phone horizontal collisions) */
.grid-2col {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.notices-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}
.members-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 255px), 1fr));
}
.leaderboard-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}
.ranking-tier-explainer {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
}

.card,
.stat-card,
.member-card,
.notice-card,
.leaderboard-card,
.guest-lock-card,
.swap-request-card,
.profile-edit-section,
.table-responsive {
    border-radius: var(--radius-card);
    background: var(--glass-bg);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    color: var(--text-primary);
    min-width: 0;
}

.card:hover,
.member-card:hover,
.notice-card:hover,
.leaderboard-card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: var(--glass-shadow-hover);
}

/* Prevent absolute badges/buttons from overwriting member/leaderboard names */
.member-card {
    padding: 26px 20px 20px;
}

.leaderboard-card {
    padding: 26px 20px 20px;
}

.hero-cleaner-card {
    background: linear-gradient(135deg, var(--accent-sky-bg) 0%, var(--glass-bg) 55%, var(--accent-green-bg) 100%);
    border-color: var(--accent-sky-border);
}

.my-schedule-highlight {
    background: linear-gradient(135deg, var(--accent-sky-bg) 0%, var(--glass-bg) 100%);
    border-color: var(--accent-sky-border);
}

.highlight-result {
    border-radius: 18px;
    background: var(--glass-subbox-bg);
    border: 1px solid var(--glass-border);
}

.notice-card.pinned {
    background: linear-gradient(180deg, var(--accent-amber-bg) 0%, var(--glass-bg) 42%);
    border-color: var(--accent-amber-border);
}

.sticky-notice {
    border-radius: 18px;
    background: var(--accent-amber-bg);
    border: 1px solid var(--accent-amber-border);
    backdrop-filter: blur(14px);
    color: var(--accent-amber);
}
.sticky-notice-content { color: var(--accent-amber); }
.btn-close-notice { color: var(--accent-amber); }

.alumni-welcome-card {
    background: linear-gradient(135deg, var(--accent-sky-bg) 0%, var(--accent-green-bg) 100%);
    border: 1px solid var(--accent-sky-border);
}

.btn-attendance {
    border-radius: 18px;
    background: var(--glass-subbox-bg);
    border: 1.5px solid var(--accent-sky-border);
    color: var(--text-primary);
}
.btn-attendance:hover {
    background: var(--accent-sky-bg);
    border-color: var(--sky-600);
}
.btn-attendance.checked {
    background: var(--accent-green-bg);
    border-color: var(--accent-green-border);
}

.btn-secondary {
    background: var(--glass-subbox-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}
.btn-secondary:hover {
    background: var(--accent-sky-bg);
    border-color: var(--accent-sky-border);
}

.btn-danger-outline {
    background: var(--accent-rose-bg);
    color: var(--accent-rose);
    border-color: var(--accent-rose-border);
}

.upcoming-item,
.fine-snapshot-stat,
.snapshot-unpaid-item,
.member-stats,
.member-stats div,
.tier-explain-item,
.timeline-item,
.swap-box,
.audit-preview-box,
.guest-lock-card .lock-big-icon {
    border-radius: 16px;
    background: var(--glass-subbox-bg);
    border-color: var(--glass-border);
}
.upcoming-item:hover {
    background: var(--accent-sky-bg);
}

.data-table th {
    background: var(--table-head-bg);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--glass-border);
}
.data-table td {
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
}
.data-table tr:hover td {
    background: var(--accent-sky-bg);
}

.table-scroll-hint {
    border-radius: var(--radius-pill);
    background: var(--accent-sky-bg);
    color: var(--accent-sky);
}

.directory-toggle-group {
    border-radius: var(--radius-pill);
    background: var(--glass-subbox-bg);
    border: 1px solid var(--glass-border);
    max-width: 100%;
    flex-wrap: wrap;
}
.dir-toggle-btn {
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
}
.dir-toggle-btn.active {
    background: var(--glass-surface-strong);
    color: var(--accent-sky);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.blood-pill {
    border-radius: var(--radius-pill);
    background: var(--glass-subbox-bg);
    color: var(--text-secondary);
    border-color: var(--glass-border);
    min-height: 36px;
}
.blood-pill:hover,
.blood-pill.active {
    background: #e11d48;
    color: #ffffff;
    border-color: #f43f5e;
}

.modal-overlay {
    z-index: 2000;
    background: var(--scrim-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.modal-box {
    border-radius: 24px;
    background: var(--glass-surface-strong);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}
.modal-header {
    border-bottom: 1px solid var(--glass-border);
}
.modal-footer {
    background: var(--glass-subbox-bg);
    border-top: 1px solid var(--glass-border);
    border-radius: 0 0 24px 24px;
}

.form-input,
.form-textarea,
.form-select {
    border-radius: 14px;
    background-color: var(--input-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    min-height: 42px;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--sky-600);
    box-shadow: 0 0 0 3px var(--accent-sky-bg);
}

.status-badge-current {
    background: var(--accent-green-bg);
    color: var(--accent-green);
    border: 1px solid var(--accent-green-border);
}
.status-badge-alumni {
    background: var(--glass-subbox-bg);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}
.blood-badge,
.blood-badge-card {
    background: var(--accent-rose-bg);
    color: var(--accent-rose);
    border: 1px solid var(--accent-rose-border);
}
.badge-platinum, .tier-platinum { background: var(--accent-indigo-bg); color: var(--accent-indigo); border-color: var(--accent-indigo-border); }
.badge-gold, .tier-gold { background: var(--accent-amber-bg); color: var(--accent-amber); border-color: var(--accent-amber-border); }
.badge-silver, .tier-silver { background: var(--glass-subbox-bg); color: var(--text-secondary); border-color: var(--glass-border); }
.badge-bronze, .tier-bronze { background: var(--accent-amber-bg); color: var(--accent-amber); border-color: var(--accent-amber-border); }

.stock-alert-item {
    border-radius: 16px;
    background: var(--accent-amber-bg);
    border-color: var(--accent-amber-border);
}
.stock-alert-icon { background: var(--glass-surface-strong); color: var(--accent-amber); }
.stock-alert-title { color: var(--text-primary); }
.stock-alert-meta { color: var(--accent-amber); }

.dashboard-swap-alert {
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent-sky-bg), var(--glass-bg));
    border-color: var(--accent-sky-border);
}
.dashboard-swap-alert .alert-text { color: var(--text-primary); }
.swap-request-card.incoming { background: var(--accent-amber-bg); }
.swap-request-card.accepted { background: var(--accent-green-bg); }
.swap-request-card.rejected { background: var(--accent-rose-bg); }
.pending-section { border-radius: 18px; background: var(--accent-amber-bg); border-color: var(--accent-amber-border); }
.pending-member-item { border-radius: 14px; background: var(--glass-surface-strong); border-color: var(--accent-amber-border); }
.pending-badge { background: var(--accent-amber-bg); color: var(--accent-amber); }
.chip-btn { border-radius: var(--radius-pill); background: var(--glass-subbox-bg); border-color: var(--glass-border); color: var(--text-primary); }

.btn-contact-call { border-radius: var(--radius-pill); background: var(--accent-sky-bg); color: var(--accent-sky); border-color: var(--accent-sky-border); }
.btn-contact-wa { border-radius: var(--radius-pill); background: var(--accent-green-bg); color: var(--accent-green); border-color: var(--accent-green-border); }
.btn-contact-email { border-radius: var(--radius-pill); background: var(--glass-subbox-bg); color: var(--text-secondary); border-color: var(--glass-border); }

/* Notification Panel Dual-Theme Frosted Glass */
.notif-panel {
    background: var(--glass-surface-strong);
    backdrop-filter: blur(24px) saturate(165%);
    -webkit-backdrop-filter: blur(24px) saturate(165%);
    border-left: 1px solid var(--glass-border);
    box-shadow: -14px 0 42px rgba(0, 0, 0, 0.22);
    color: var(--text-primary);
}
.notif-panel-header,
.notif-panel-actions {
    background: var(--glass-subbox-bg);
    border-bottom-color: var(--glass-border);
}
.notif-action-link {
    border-radius: var(--radius-pill);
    background: var(--glass-surface-strong);
    border-color: var(--glass-border);
    color: var(--text-primary);
}
.notif-item {
    border-radius: 18px;
    background: var(--glass-subbox-bg);
    border-color: var(--glass-border);
}
.notif-item.unread {
    background: var(--accent-sky-bg);
    border-color: var(--accent-sky-border);
}
.notif-item-title { color: var(--text-primary); }
.notif-item-body { color: var(--text-secondary); }

/* Keep Monthly Audit Report Sheet crisp White-Paper for Print & PDF Preview */
#auditPrintableArea,
.audit-printable-sheet {
    background: #ffffff !important;
    color: #0f172a !important;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
}

@media print {
    html, body {
        background: #ffffff !important;
        color: #0f172a !important;
    }
    .app-topbar, .mobile-bottom-nav, .sub-tab-pills {
        display: none !important;
    }
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .bento-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 868px) {
    .sidebar,
    .desktop-topbar-title {
        display: none !important;
    }
    .mobile-brand {
        display: flex !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 10px 12px calc(92px + env(safe-area-inset-bottom, 0px)) 12px !important;
    }
    .app-topbar {
        top: 8px;
        padding: 7px 10px 7px 14px;
        margin-bottom: 14px;
    }
    .mobile-bottom-nav {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        height: 62px;
        z-index: 940;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: center;
        gap: 4px;
        padding: 4px 6px;
        border-radius: var(--radius-pill);
        background: var(--bottomnav-bg);
        backdrop-filter: blur(22px) saturate(165%);
        -webkit-backdrop-filter: blur(22px) saturate(165%);
        border: 1px solid var(--glass-border);
        box-shadow: var(--glass-shadow-hover);
    }
    .toast {
        bottom: 84px;
    }
}

@media (max-width: 480px) {
    .bento-hero-glass { padding: 20px 16px; }
    .bento-hero-heading { font-size: 1.28rem; }
    .bento-kpi-grid { gap: 10px; }
    .bento-kpi-tile { padding: 14px; }
    .kpi-val { font-size: 1.15rem; }
    .sub-tab-pills { width: 100%; border-radius: 18px; }
    .sub-pill { font-size: 0.8rem; padding: 7px 12px; flex: 1 1 auto; justify-content: center; }
    .topbar-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
