/* ============================================
   JAMIA IMAM MEHDI - ISLAMIC ADMIN DASHBOARD
   Premium Islamic-themed Design System
   ============================================ */

/* CSS Custom Properties */
:root {
    /* Islamic Color Palette */
    --emerald-900: #064e24;
    --emerald-800: #0a6b33;
    --emerald-700: #0f7b3c;
    --emerald-600: #148c46;
    --emerald-500: #1a9e52;
    --emerald-50: #ecfdf3;

    --gold-500: #c9a53a;
    --gold-400: #d4b44e;
    --gold-300: #e6cc7a;
    --gold-200: #f0dfa0;
    --gold-100: #faf3d8;
    --gold-glow: rgba(201, 165, 58, 0.25);

    /* Neutrals */
    --bg-body: #f0f2f0;
    --bg-white: #ffffff;
    --bg-cream: #fdfcf8;
    --text-primary: #1a2e1a;
    --text-secondary: #5a6b5a;
    --text-muted: #8a9a8a;
    --border-color: #d4dcd4;
    --border-light: #e8ede8;

    /* Functional */
    --positive: #16a34a;
    --negative: #dc2626;
    --link-color: #0f7b3c;

    /* Dimensions */
    --sidebar-width: 260px;
    --topbar-height: 80px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(6, 78, 36, 0.06);
    --shadow-md: 0 4px 16px rgba(6, 78, 36, 0.08);
    --shadow-lg: 0 8px 30px rgba(6, 78, 36, 0.12);
    --shadow-card: 0 2px 12px rgba(6, 78, 36, 0.06);
    --shadow-gold: 0 4px 20px rgba(201, 165, 58, 0.15);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
table { border-collapse: collapse; width: 100%; }

/* Hidden SVG defs */
.islamic-pattern-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background-color: var(--emerald-900);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E"),
        linear-gradient(175deg, #042a13 0%, var(--emerald-900) 40%, #053a1a 80%, #042a13 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1100;
    transition: transform var(--transition-smooth);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 4px 0 20px rgba(0,0,0,0.4);
    border-right: 1px solid rgba(201, 165, 58, 0.3);
    padding-bottom: 20px;
}

.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(201, 165, 58, 0.4);
    border-radius: 3px;
}

/* Islamic Pattern Overlay */
.sidebar-pattern-overlay {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 15L60 45L30 60L0 45L0 15Z' fill='none' stroke='rgba(201,165,58,0.04)' stroke-width='0.5'/%3E%3Ccircle cx='30' cy='30' r='8' fill='none' stroke='rgba(201,165,58,0.03)' stroke-width='0.4'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

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

/* Sidebar Header */
.sidebar-header {
    padding: 30px 20px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-container {
    margin: 0 auto 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-img {
    width: 85px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.org-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    background: linear-gradient(to right, #ffffff, var(--gold-300));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.org-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.3px;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 16px 14px;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 0.92rem;
    transition: all var(--transition-fast);
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(to right, rgba(201, 165, 58, 0.15), transparent);
    transition: width var(--transition-normal);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.nav-link.active {
    background: linear-gradient(to right, var(--gold-200), var(--gold-500));
    color: var(--emerald-900);
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(201, 165, 58, 0.3);
    border: 1px solid var(--gold-300);
}

.nav-link.active i {
    color: var(--emerald-900);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--emerald-900);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(4, 42, 19, 0.5);
}

.nav-link:hover::before {
    width: 100%;
}

.nav-link:hover i {
    color: var(--gold-400);
}

.nav-item.active .nav-link {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
    color: var(--emerald-900);
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(201, 165, 58, 0.35);
}

.nav-item.active .nav-link i {
    color: var(--emerald-900);
}

.nav-item.active .nav-link::before {
    display: none;
}

.nav-item.active .nav-link::after {
    content: '';
    position: absolute;
    right: 12px;
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--emerald-900);
    opacity: 0.5;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(201, 165, 58, 0.12);
    position: relative;
}

/* Mosque Silhouette */
.mosque-silhouette {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    height: 80px;
    pointer-events: none;
    opacity: 0.8;
}

.mosque-silhouette svg {
    width: 100%;
    height: 100%;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(201, 165, 58, 0.06);
    border: 1px solid rgba(201, 165, 58, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    transition: all var(--transition-fast);
}

.admin-profile:hover {
    background: rgba(201, 165, 58, 0.1);
    border-color: rgba(201, 165, 58, 0.2);
}

.admin-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--gold-500), var(--gold-300));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(201, 165, 58, 0.3);
}

.admin-avatar i {
    font-size: 1.05rem;
    color: var(--emerald-900);
}

.admin-info h4 {
    font-size: 0.88rem;
    font-weight: 600;
}

.admin-info p {
    font-size: 0.73rem;
    color: rgba(255, 255, 255, 0.5);
}

.online-badge {
    font-size: 0.68rem;
    color: #4ade80;
    display: flex;
    align-items: center;
    gap: 4px;
}

.online-badge i { font-size: 0.4rem; }

.logout-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.logout-link:hover {
    background: rgba(220, 38, 38, 0.15);
    color: #fca5a5;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1050;
    backdrop-filter: blur(4px);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Islamic Background Pattern for Main Area */
.main-pattern-bg {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    bottom: 0;
    background-color: var(--bg-cream);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 15L60 45L30 60L0 45L0 15Z' fill='none' stroke='rgba(6,78,36,0.02)' stroke-width='0.5'/%3E%3Ccircle cx='30' cy='30' r='8' fill='none' stroke='rgba(6,78,36,0.015)' stroke-width='0.4'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   TOP BAR — Premium Redesign
   ============================================ */
.topbar {
    height: 68px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 165, 58, 0.18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(201,165,58,0.12), 0 4px 24px rgba(6,78,36,0.04);
}

/* Left Side */
.topbar-left {
    display: flex;
    align-items: center;
    gap: 0;
}

/* Vertical separator between toggle & greeting */
.topbar-sep {
    width: 1px;
    height: 28px;
    background: rgba(201,165,58,0.25);
    margin: 0 18px;
    flex-shrink: 0;
}

/* Menu Toggle */
.menu-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.menu-toggle:hover {
    background: rgba(6,78,36,0.07);
    color: var(--emerald-700);
}

.menu-toggle svg {
    display: block;
}

/* Greeting */
.greeting h1 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    line-height: 1.2;
}

.greeting-name {
    color: var(--emerald-700);
}

.greeting p {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 400;
    letter-spacing: 0.1px;
}

/* Right Side */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Thin vertical divider between right elements */
.topbar-divider {
    width: 1px;
    height: 24px;
    background: rgba(201,165,58,0.2);
    margin: 0 6px;
    flex-shrink: 0;
}

/* Date Pill */
.date-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: linear-gradient(135deg, rgba(6,78,36,0.04), rgba(201,165,58,0.06));
    border-radius: 10px;
    border: 1px solid rgba(201, 165, 58, 0.15);
    transition: all var(--transition-fast);
}

.date-display:hover {
    border-color: rgba(201,165,58,0.3);
    background: linear-gradient(135deg, rgba(6,78,36,0.06), rgba(201,165,58,0.1));
}

.date-icon {
    color: var(--emerald-600);
    flex-shrink: 0;
    display: block;
}

.date-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.date-value {
    font-size: 0.78rem;
    font-weight: 650;
    color: var(--text-primary);
    line-height: 1;
}

.date-day {
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1;
}

/* Notification Button */
.notification-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    margin: 0 2px;
}

.notification-btn svg {
    display: block;
    transition: all var(--transition-fast);
}

.notification-btn:hover {
    background: linear-gradient(135deg, var(--emerald-700), var(--emerald-800));
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(6, 78, 36, 0.25);
}

.notification-btn:hover svg {
    stroke: #ffffff;
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    border: 1.5px solid #fff;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
    50% { transform: scale(1.1); box-shadow: 0 0 0 4px rgba(239,68,68,0); }
}

/* Admin Profile Chip */
.topbar-admin-profile {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 12px 6px 6px;
    background: linear-gradient(135deg, rgba(6,78,36,0.05), rgba(201,165,58,0.07));
    border: 1px solid rgba(201, 165, 58, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.topbar-admin-profile::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(6,78,36,0.06), rgba(201,165,58,0.1));
    opacity: 0;
    transition: opacity var(--transition-normal);
    border-radius: 12px;
    pointer-events: none;
    z-index: 0;
}

.topbar-admin-profile:hover::after {
    opacity: 1;
}

.topbar-admin-profile:hover {
    border-color: rgba(201, 165, 58, 0.45);
    box-shadow: 0 4px 18px rgba(201,165,58,0.15);
    transform: translateY(-1px);
}

/* Avatar with Initials */
.topbar-admin-avatar {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--emerald-800), var(--emerald-900));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(6,78,36,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
    position: relative;
    z-index: 1;
    border: 1.5px solid rgba(201,165,58,0.5);
}

.admin-initials {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--gold-300);
    letter-spacing: 0.5px;
    line-height: 1;
}

.topbar-admin-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    z-index: 1;
}

.topbar-admin-info h4 {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--emerald-800);
    line-height: 1;
    letter-spacing: -0.1px;
}

/* Online Badge */
.topbar-online-badge {
    font-size: 0.66rem;
    color: #15803d;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    line-height: 1;
}

.online-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(34,197,94,0.4);
    animation: pulse-online 2s ease-in-out infinite;
}

@keyframes pulse-online {
    0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
    70% { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* Chevron */
.admin-chevron {
    color: var(--text-muted);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: transform var(--transition-fast);
}

.topbar-admin-profile:hover .admin-chevron {
    transform: translateY(1px);
    color: var(--emerald-600);
}

.topbar-admin-profile.active .admin-chevron {
    transform: rotate(180deg);
    color: var(--emerald-600);
}

/* Logo Badge */
.topbar-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--emerald-50), var(--gold-100));
    border: 1px solid rgba(201, 165, 58, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    margin-left: 4px;
}

.topbar-logo:hover {
    border-color: rgba(201,165,58,0.45);
    box-shadow: 0 4px 14px rgba(201,165,58,0.18);
    transform: scale(1.04);
}

.topbar-logo-img {
    width: 30px;
    height: auto;
    object-fit: contain;
}

/* Admin Dropdown */
.admin-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 210px;
    background: #ffffff;
    border: 1px solid rgba(201,165,58,0.2);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(6,78,36,0.15), 0 2px 8px rgba(0,0,0,0.08);
    z-index: 9999;
    overflow: hidden;
    animation: dropdown-in 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top right;
}

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

@keyframes dropdown-in {
    from { opacity: 0; transform: scale(0.94) translateY(-6px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.admin-dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(6,78,36,0.04), rgba(201,165,58,0.06));
}

.admin-dropdown-avatar {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--emerald-800), var(--emerald-900));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--gold-300);
    flex-shrink: 0;
    border: 1.5px solid rgba(201,165,58,0.4);
}

.admin-dropdown-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--emerald-900);
    line-height: 1.2;
}

.admin-dropdown-role {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.admin-dropdown-divider {
    height: 1px;
    background: rgba(201,165,58,0.12);
    margin: 0;
}

.admin-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.admin-dropdown-item svg {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color var(--transition-fast);
}

.admin-dropdown-item:hover {
    background: rgba(6,78,36,0.05);
    color: var(--emerald-700);
}

.admin-dropdown-item:hover svg {
    color: var(--emerald-600);
}

.admin-dropdown-logout {
    color: #dc2626;
}

.admin-dropdown-logout svg {
    color: #dc2626;
}

.admin-dropdown-logout:hover {
    background: rgba(220,38,38,0.07);
    color: #b91c1c;
}

.admin-dropdown-logout:hover svg {
    color: #b91c1c;
}

/* ============================================
   DASHBOARD CONTENT
   ============================================ */
.dashboard-content {
    padding: 24px 28px;
    flex: 1;
    position: relative;
    z-index: 1;
}

/* ============================================
   BISMILLAH BANNER
   ============================================ */
.bismillah-banner {
    text-align: center;
    padding: 30px 40px 25px;
    margin-bottom: 45px;
    background: radial-gradient(ellipse at top, #095f3b 0%, #053b24 100%);
    border-radius: 120px 120px 20px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.25), 
        inset 0 0 60px rgba(0,0,0,0.3);
    border: 1px solid rgba(20, 75, 49, 0.8);
    position: relative;
    z-index: 10;
}

.bismillah-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 0L40 10L40 30L20 40L0 30L0 10Z' fill='none' stroke='rgba(235,198,103,0.06)' stroke-width='0.75'/%3E%3C/svg%3E");
    pointer-events: none;
    border-radius: 120px 120px 20px 20px;
}

/* Elegant Inner Gold Border */
.bismillah-banner-inner-border {
    position: absolute;
    inset: 8px;
    border-radius: 112px 112px 12px 12px;
    border: 1px solid rgba(235, 198, 103, 0.4);
    box-shadow: inset 0 0 10px rgba(235, 198, 103, 0.05), 0 0 10px rgba(235, 198, 103, 0.05);
    pointer-events: none;
}
.bismillah-banner-inner-border::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 108px 108px 8px 8px;
    border: 1px dashed rgba(235, 198, 103, 0.2);
}

/* Top Ornament (More elegant lantern/shield shape) */
.bismillah-banner::after {
    content: '';
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 48px;
    background: linear-gradient(135deg, #fbe39f, #d2a440, #ad7e26);
    clip-path: polygon(50% 0%, 100% 25%, 90% 85%, 50% 100%, 10% 85%, 0% 25%);
    z-index: 10;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
}

.bismillah-text {
    font-size: 2.4rem;
    background: linear-gradient(to bottom, #fff8e1, #e8c468);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    word-spacing: 6px;
    line-height: 2.8;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.5));
    position: relative;
    z-index: 1;
    direction: rtl;
    font-family: 'Noto Nastaliq Urdu', 'Amiri', serif;
}

.bismillah-ornament {
    color: #e8c468;
    font-size: 2rem;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 5px rgba(232, 196, 104, 0.4));
}

/* Mobile Responsiveness for Bismillah Banner */
@media (max-width: 768px) {
    .bismillah-banner {
        padding: 24px 20px 18px;
        gap: 12px;
        border-radius: 60px 60px 15px 15px;
    }
    .bismillah-banner::before {
        border-radius: 60px 60px 15px 15px;
    }
    .bismillah-banner-inner-border {
        inset: 6px;
        border-radius: 54px 54px 10px 10px;
    }
    .bismillah-banner-inner-border::before {
        inset: 3px;
        border-radius: 51px 51px 7px 7px;
    }
    .bismillah-banner::after {
        width: 24px;
        height: 34px;
        top: -16px;
    }
    .bismillah-text {
        font-size: 1.4rem;
        line-height: 2.2;
        word-spacing: 2px;
    }
    .bismillah-ornament {
        font-size: 1.2rem;
    }
}

/* ============================================
   STATS CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: rgba(253, 252, 248, 0.9);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    border-radius: 80px 80px 15px 15px;
    padding: 30px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05), 0 0 15px rgba(201, 165, 58, 0.05);
    border: 1px solid rgba(201, 165, 58, 0.4);
    outline: 2px solid rgba(201, 165, 58, 0.15);
    outline-offset: -6px;
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 24px;
    background: linear-gradient(to bottom, var(--gold-200), var(--gold-500));
    clip-path: polygon(50% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%);
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.stat-card:hover::after {
    opacity: 1;
}

/* Subtle Islamic pattern on each stat card */
.stat-card-pattern {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 90px;
    height: 90px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(201, 165, 58, 0.1);
    pointer-events: none;
}

.stat-card-pattern::before {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(201, 165, 58, 0.05);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1), 0 0 20px rgba(201, 165, 58, 0.15);
    border-color: rgba(201, 165, 58, 0.8);
}

#stat-members::before { background: linear-gradient(to right, var(--emerald-700), var(--emerald-500)); }
#stat-hadiya::before { background: linear-gradient(to right, #e65100, #ff8f00); }
#stat-donations::before { background: linear-gradient(to right, #c62828, #ef5350); }
#stat-expenses::before { background: linear-gradient(to right, var(--gold-500), var(--gold-300)); }

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    position: relative;
}

/* Islamic arch shape at top of icon */
.stat-icon::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 4px;
    border-radius: 0 0 10px 10px;
    opacity: 0.3;
}

.members-icon {
    background: linear-gradient(135deg, #d4edda, #b7e4c7);
    color: var(--emerald-700);
}
.members-icon::before { background: var(--emerald-700); }

.hadiya-icon {
    background: linear-gradient(135deg, #ffe0b2, #ffcc80);
    color: #e65100;
}
.hadiya-icon::before { background: #e65100; }

.donations-icon {
    background: linear-gradient(135deg, #ffcdd2, #ef9a9a);
    color: #c62828;
}
.donations-icon::before { background: #c62828; }

.expenses-icon {
    background: linear-gradient(135deg, var(--gold-100), var(--gold-200));
    color: var(--gold-500);
}
.expenses-icon::before { background: var(--gold-500); }

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

.stat-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.stat-change {
    font-size: 0.73rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 20px;
}

.stat-change i { font-size: 0.6rem; }
.stat-change.positive { color: var(--positive); background: rgba(22, 163, 74, 0.08); }
.stat-change.negative { color: var(--negative); background: rgba(220, 38, 38, 0.08); }

/* ============================================
   CARD ARCH DECORATION (Islamic Arch Top)
   ============================================ */
.card-arch-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, transparent, var(--gold-500), var(--emerald-700), var(--gold-500), transparent);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    opacity: 0.6;
}

/* ============================================
   CHART & RECENT HADIYA
   ============================================ */
.chart-section {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.chart-container {
    background-color: rgba(253, 252, 248, 0.9);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05), 0 0 15px rgba(201, 165, 58, 0.05);
    border: 1px solid rgba(201, 165, 58, 0.4);
    outline: 2px solid rgba(201, 165, 58, 0.15);
    outline-offset: -6px;
    position: relative;
    overflow: hidden;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.chart-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-header h3 i {
    color: var(--emerald-700);
    font-size: 0.9rem;
}

.chart-filter {
    position: relative;
    display: flex;
    align-items: center;
}

.chart-filter select {
    appearance: none;
    padding: 7px 32px 7px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-cream);
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.chart-filter select:focus {
    outline: none;
    border-color: var(--emerald-700);
    box-shadow: 0 0 0 3px rgba(6, 78, 36, 0.08);
}

.chart-filter i {
    position: absolute;
    right: 10px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    pointer-events: none;
}

.chart-wrapper {
    height: 280px;
    position: relative;
}

.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Recent Hadiya */
.recent-hadiya {
    background-color: rgba(253, 252, 248, 0.9);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05), 0 0 15px rgba(201, 165, 58, 0.05);
    border: 1px solid rgba(201, 165, 58, 0.4);
    outline: 2px solid rgba(201, 165, 58, 0.15);
    outline-offset: -6px;
    position: relative;
    overflow: hidden;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header h3 i {
    color: var(--emerald-700);
    font-size: 0.9rem;
}

.view-all-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--emerald-700);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 4px;
}

.view-all-link i { font-size: 0.65rem; transition: transform var(--transition-fast); }
.view-all-link:hover { color: var(--emerald-900); }
.view-all-link:hover i { transform: translateX(3px); }

.hadiya-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hadiya-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    border-bottom: 1px solid var(--border-light);
}

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

.hadiya-item:hover {
    background: linear-gradient(135deg, var(--emerald-50), var(--gold-100));
    transform: translateX(4px);
}

.hadiya-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--emerald-700), var(--emerald-600));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(6, 78, 36, 0.2);
}

.hadiya-avatar i {
    font-size: 0.82rem;
    color: #ffffff;
}

.hadiya-details {
    flex: 1;
    min-width: 0;
}

.hadiya-details h4 {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hadiya-details p {
    font-size: 0.73rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hadiya-amount {
    text-align: right;
    flex-shrink: 0;
}

.hadiya-amount .amount {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--emerald-700);
}

.hadiya-amount .date {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============================================
   TABLES SECTION
   ============================================ */
.tables-section {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.table-container {
    background-color: rgba(253, 252, 248, 0.9);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    border-radius: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05), 0 0 15px rgba(201, 165, 58, 0.05);
    border: 1px solid rgba(201, 165, 58, 0.4);
    outline: 2px solid rgba(201, 165, 58, 0.15);
    outline-offset: -6px;
    position: relative;
    overflow: hidden;
}

.table-wrapper {
    overflow-x: auto;
    width: 100%;
    max-width: 100vw;
    -webkit-overflow-scrolling: touch;
}

.table-wrapper::-webkit-scrollbar { height: 5px; }
.table-wrapper::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.data-table { min-width: 100%; }

.data-table thead {
    background: linear-gradient(135deg, var(--emerald-50), var(--gold-100));
}

.data-table th {
    padding: 12px 14px;
    text-align: left;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--emerald-800);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
    border-bottom: 2px solid rgba(201, 165, 58, 0.2);
}

.data-table td {
    padding: 12px 14px;
    font-size: 0.84rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}

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

.data-table tbody tr:hover {
    background: linear-gradient(135deg, rgba(6, 78, 36, 0.02), rgba(201, 165, 58, 0.03));
}

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

.actions-cell {
    display: flex;
    gap: 6px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    transition: all var(--transition-fast);
}

.view-btn {
    background: linear-gradient(135deg, #d4edda, #b7e4c7);
    color: var(--emerald-700);
}

.view-btn:hover {
    background: linear-gradient(135deg, var(--emerald-700), var(--emerald-600));
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(6, 78, 36, 0.25);
}

.edit-btn {
    background: linear-gradient(135deg, #ffe0b2, #ffcc80);
    color: #e65100;
}

.edit-btn:hover {
    background: linear-gradient(135deg, #e65100, #ff8f00);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(230, 81, 0, 0.25);
}

/* Category Badges */
.category-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.73rem;
    font-weight: 600;
    display: inline-block;
}

.category-badge.general {
    background: linear-gradient(135deg, #d4edda, #b7e4c7);
    color: var(--emerald-800);
}

.category-badge.ramadan {
    background: linear-gradient(135deg, #ffe0b2, #ffcc80);
    color: #bf360c;
}

.category-badge.zakat {
    background: linear-gradient(135deg, #bbdefb, #90caf9);
    color: #0d47a1;
}

/* ============================================
   FOOTER
   ============================================ */
.dashboard-footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.82rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-ornament {
    color: rgba(201, 165, 58, 0.4);
    font-size: 0.75rem;
    margin-bottom: 6px;
    letter-spacing: 4px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

.bismillah-banner {
    animation: fadeInUp 0.6s ease forwards;
}

.stat-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.15s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.25s; }

.chart-container,
.recent-hadiya {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.chart-container { animation-delay: 0.3s; }
.recent-hadiya { animation-delay: 0.35s; }

.table-container {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.table-container:nth-child(1) { animation-delay: 0.4s; }
.table-container:nth-child(2) { animation-delay: 0.45s; }

.hadiya-item {
    animation: slideInLeft 0.4s ease forwards;
    opacity: 0;
}

.hadiya-item:nth-child(1) { animation-delay: 0.4s; }
.hadiya-item:nth-child(2) { animation-delay: 0.45s; }
.hadiya-item:nth-child(3) { animation-delay: 0.5s; }
.hadiya-item:nth-child(4) { animation-delay: 0.55s; }
.hadiya-item:nth-child(5) { animation-delay: 0.6s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1400px) {
    .chart-section { grid-template-columns: 1fr; }
    .tables-section { grid-template-columns: 1fr; }
}

@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
    .sidebar-overlay.active { display: block; }
    .main-content { margin-left: 0; }
    .main-pattern-bg { left: 0; }
    .menu-toggle { display: flex; }
    .topbar { padding: 0 16px; }
    .greeting h1 { font-size: 1.05rem; }
    .greeting p { display: none; }
    .date-display { display: none; }
    .dashboard-content { padding: 16px; }
    .stats-grid { grid-template-columns: 1fr; gap: 12px; }
    .stat-card { padding: 16px; }
    .stat-value { font-size: 1.3rem; }
    .chart-wrapper { height: 220px; }
    .bismillah-text { font-size: 1.1rem; letter-spacing: 1px; }
    .table-container { padding: 16px; }
}

@media (max-width: 480px) {
    .topbar-logo { display: none; }
    .notification-btn { width: 36px; height: 36px; }
    .stat-icon { width: 44px; height: 44px; font-size: 1.1rem; }
    .bismillah-banner { padding: 10px 12px; }
    .bismillah-text { font-size: 0.9rem; }
    .bismillah-ornament { display: none; }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--emerald-700), var(--gold-500));
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--emerald-800); }

/* Selection */
::selection {
    background: rgba(6, 78, 36, 0.2);
    color: var(--emerald-900);
}

/* ============================================
   ADMIN LOGIN OVERLAY
   ============================================ */
.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--emerald-900);
    background-image: url('../images/imambara_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.login-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(6, 78, 36, 0.3) 0%, rgba(15, 123, 60, 0.15) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 0;
}

.login-container {
    background-color: rgba(253, 252, 248, 0.9);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 200px 200px 15px 15px;
    padding: 60px 40px 40px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.6), 0 0 40px rgba(201, 165, 58, 0.1);
    width: 100%;
    max-width: 450px;
    text-align: center;
    border: 1px solid rgba(201, 165, 58, 0.6);
    outline: 2px solid rgba(201, 165, 58, 0.3);
    outline-offset: -8px;
    position: relative;
    z-index: 10;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 35px;
    background: linear-gradient(to bottom, var(--gold-200), var(--gold-500));
    clip-path: polygon(50% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%);
    z-index: 10;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.5));
}

.login-header {
    margin-bottom: 30px;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    border-radius: var(--radius-full);
    background: var(--emerald-900);
    border: 2px solid var(--gold-500);
    padding: 12px;
    box-shadow: 0 10px 20px rgba(6, 78, 36, 0.3), inset 0 0 15px rgba(201, 165, 58, 0.2);
    object-fit: contain;
}

.login-header h2 {
    color: var(--emerald-900);
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    letter-spacing: 1px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 8px;
}

.login-container .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-container label {
    display: block;
    margin-bottom: 8px;
    color: var(--emerald-900);
    font-weight: 600;
    font-size: 0.95rem;
}

.login-container input {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid rgba(201, 165, 58, 0.4);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    outline: none;
    font-size: 1.05rem;
    color: var(--emerald-900);
    transition: all var(--transition-fast);
}

.login-container input:focus {
    border-color: var(--gold-500);
    box-shadow: 0 0 15px rgba(201, 165, 58, 0.2);
    background: #ffffff;
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: var(--emerald-900);
    color: var(--gold-400);
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 30px;
    margin-top: 15px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn:hover {
    background: var(--gold-500);
    color: var(--emerald-900);
    border-color: var(--gold-500);
    box-shadow: 0 10px 20px rgba(201, 165, 58, 0.3);
    transform: translateY(-3px);
}

.login-error {
    color: var(--negative);
    margin-top: 16px;
    font-size: 0.9rem;
    display: none;
    background: rgba(220, 38, 38, 0.1);
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

/* ============================================
   SETTINGS VIEW
   ============================================ */
.settings-container {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.settings-layout {
    display: flex;
    min-height: 500px;
    border-top: 1px solid var(--border-light);
    box-sizing: border-box;
}

.settings-sidebar {
    width: 250px;
    background: rgba(6, 78, 36, 0.02);
    border-right: 1px solid var(--border-light);
    padding: 20px 0;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
}

.settings-nav-item {
    padding: 14px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    border-left: 4px solid transparent;
    margin: 4px 12px;
    border-radius: 10px;
}

.settings-nav-item i {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
}

.settings-nav-item:hover {
    background: rgba(6, 78, 36, 0.04);
    color: var(--emerald-800);
}

.settings-nav-item.active {
    background: rgba(6, 78, 36, 0.08);
    color: var(--emerald-900);
    border-left-color: transparent;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.settings-content {
    flex: 1;
    padding: 30px 40px;
    box-sizing: border-box;
    max-width: 100%;
}

.settings-tab h4 {
    font-size: 1.25rem;
    color: var(--emerald-900);
    margin-bottom: 6px;
}

.settings-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--border-light);
}

.settings-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    box-sizing: border-box;
    width: 100%;
}

.settings-form .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-width: 0;
}

.settings-form .form-group.full {
    flex: 100%;
}

.settings-form label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.settings-form .form-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    background-color: #f8fafc;
    border: 1px solid transparent;
    border-radius: 12px;
    outline: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    font-family: inherit;
    line-height: 1.5;
    min-height: 48px;
    transition: all var(--transition-smooth);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.settings-form .form-input:focus {
    background-color: var(--bg-white);
    border-color: var(--gold-400);
    box-shadow: 0 0 0 4px var(--gold-glow), inset 0 2px 4px rgba(0,0,0,0.01);
}

.settings-form textarea.form-input {
    resize: vertical;
}

.btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--emerald-700), var(--emerald-800));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--emerald-800), var(--emerald-900));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 78, 36, 0.15);
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-body);
    border-color: var(--emerald-500);
}

/* Toggle Switch */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.setting-item:hover {
    border-color: var(--emerald-200);
    background: var(--emerald-50);
}

.setting-info h5 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.setting-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .toggle-slider {
    background-color: var(--emerald-600);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Backup Actions */
.backup-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.backup-card {
    flex: 1;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    transition: all var(--transition-fast);
}

.backup-card:hover {
    border-color: var(--emerald-500);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.backup-icon {
    width: 60px;
    height: 60px;
    background: var(--emerald-50);
    color: var(--emerald-700);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 16px;
}

.backup-card h5 {
    font-size: 1.1rem;
    color: var(--emerald-900);
    margin-bottom: 8px;
}

.backup-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.last-backup-info {
    padding: 16px;
    background: var(--gold-100);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.last-backup-info i {
    color: var(--gold-500);
}

/* ============================================
   REPORTS VIEW
   ============================================ */
.reports-container {
    background-color: rgba(253, 252, 248, 0.9);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05), 0 0 15px rgba(201, 165, 58, 0.05);
    border: 1px solid rgba(201, 165, 58, 0.4);
    outline: 2px solid rgba(201, 165, 58, 0.15);
    outline-offset: -6px;
    position: relative;
    overflow: hidden;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.report-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    gap: 16px;
    background: #fafcfa;
    transition: all var(--transition-fast);
}

.report-card:hover {
    border-color: var(--emerald-300);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
    background: white;
}

.report-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--emerald-100), var(--emerald-50));
    color: var(--emerald-700);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.report-details {
    flex: 1;
}

.report-details h5 {
    font-size: 1.05rem;
    color: var(--emerald-900);
    margin-bottom: 6px;
}

.report-details p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.4;
}

.report-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}

.btn-icon.pdf {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}
.btn-icon.pdf:hover {
    background: #dc2626;
    color: white;
}

.btn-icon.excel {
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
}
.btn-icon.excel:hover {
    background: #16a34a;
    color: white;
}

/* ============================================
   NOTIFICATION DROPDOWN
   ============================================ */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: -10px;
    width: 320px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-light);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
}

.notification-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    border-left: 1px solid var(--border-light);
    transform: rotate(45deg);
}

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

.dropdown-header h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
}

.dropdown-body {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    transition: background var(--transition-fast);
    overflow: hidden;
}

.notification-item:hover {
    background: var(--bg-body);
}

.notification-item.unread {
    background: rgba(6, 78, 36, 0.02);
}

.notification-item .icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.notification-item .content p {
    margin: 0 0 5px;
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.notification-item .content .time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.dropdown-footer {
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    background: #fafcfa;
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

/* ============================================
   MOBILE RESPONSIVENESS FOR LOGIN MODAL
   ============================================ */
@media (max-width: 1024px) {
    .login-container {
        max-width: 88%;
        padding: 45px 25px 25px;
        border-radius: 140px 140px 15px 15px;
    }
    .login-container::before {
        top: -15px;
        width: 20px;
        height: 30px;
    }
    .login-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
        padding: 10px;
    }
    .login-header h2 {
        font-size: 1.6rem;
    }
    .login-header {
        margin-bottom: 20px;
    }
    .login-container input {
        padding: 12px 16px;
        font-size: 1rem;
    }
    .login-btn {
        padding: 14px;
        font-size: 1rem;
    }
}

/* ============================================
   PREMIUM CSS LOADER
   ============================================ */
.css-loader {
    width: 28px;
    height: 28px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    border-right-color: var(--gold-400);
    border-radius: 50%;
    animation: spin-loader 0.8s linear infinite;
    display: none;
    margin: 0 auto;
    box-shadow: 0 0 15px rgba(201, 165, 58, 0.4);
}

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

/* ============================================
   PREMIUM BUTTONS & INPUTS
   ============================================ */
.btn-premium {
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.btn-premium::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.5s ease;
}

.btn-premium:hover::after {
    left: 100%;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.btn-pdf {
    background: linear-gradient(135deg, #f87171, #dc2626);
    color: white;
    border: 1px solid #b91c1c;
}

.btn-excel {
    background: linear-gradient(135deg, #34d399, #10b981);
    color: white;
    border: 1px solid #059669;
}

.btn-add {
    background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
    color: white;
    border: 1px solid var(--emerald-800);
}

.premium-input-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 8px;
    padding: 6px 15px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}

.premium-input-box:focus-within {
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.premium-input-box input, .premium-input-box select {
    border: none;
    background: transparent;
    outline: none;
    padding: 5px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
}

.premium-input-box i {
    color: var(--emerald-600);
    margin-right: 8px;
}

/* Premium Pagination */
.pagination-container {
    padding: 15px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-light);
    background: rgba(253, 252, 248, 0.5);
    border-radius: 0 0 20px 20px;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    gap: 6px;
}

.page-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    background: var(--emerald-50);
    color: var(--emerald-700);
    border-color: var(--emerald-300);
}

.page-btn.active {
    border: 1px solid var(--emerald-500);
    background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
    color: white;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Premium Table Row Hover & Badges */
.category-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* ============================================
   NEXT LEVEL ISLAMIC PREMIUM UI OVERRIDES
   ============================================ */
/* Premium Table Container */
.table-container {
    background: linear-gradient(145deg, #ffffff, var(--bg-cream));
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 15px 35px rgba(6, 78, 36, 0.08), inset 0 0 20px rgba(212, 175, 55, 0.05);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

/* Add an intricate top border to the table container */
.card-arch-top {
    height: 8px;
    background: linear-gradient(90deg, transparent, var(--gold-400), var(--gold-500), var(--emerald-700), var(--gold-500), var(--gold-400), transparent);
    opacity: 0.9;
}

/* Thematic Table Header */
.data-table thead {
    background: linear-gradient(135deg, var(--emerald-900), var(--emerald-800)) !important;
}

.data-table th {
    color: var(--gold-200) !important;
    border-bottom: 3px solid var(--gold-500) !important;
    letter-spacing: 0.5px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    padding: 12px 10px !important;
    font-family: 'Playfair Display', serif;
    font-size: 0.85rem !important;
}

.data-table td {
    padding: 12px 10px !important;
    vertical-align: middle;
    font-size: 0.85rem !important;
}

/* Premium Row Hover with Islamic subtle pattern */
.data-table tbody tr {
    border-bottom: 1px solid rgba(212, 175, 55, 0.15) !important;
    transition: all 0.3s ease !important;
}

.data-table tbody tr:hover {
    background-color: rgba(212, 175, 55, 0.08) !important;
    box-shadow: 0 4px 15px rgba(6, 78, 36, 0.05);
    transform: scale(1.005);
    z-index: 10;
    position: relative;
}

/* Buttons upgrade */
.btn-premium {
    border-radius: 30px !important;
    padding: 10px 24px !important;
    letter-spacing: 0.5px;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    font-size: 0.85rem !important;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
}

.btn-pdf {
    background: transparent !important;
    color: var(--emerald-800) !important;
    border: 1px solid var(--emerald-300) !important;
    box-shadow: none !important;
}

.btn-excel {
    background: transparent !important;
    color: var(--emerald-800) !important;
    border: 1px solid var(--emerald-300) !important;
    box-shadow: none !important;
}

.btn-pdf:hover, .btn-excel:hover {
    background: rgba(6, 78, 36, 0.05) !important;
    border-color: var(--emerald-500) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(6, 78, 36, 0.08) !important;
}

.btn-add {
    background: linear-gradient(135deg, var(--emerald-700), var(--emerald-800)) !important;
    color: var(--gold-200) !important;
    border: 1px solid var(--emerald-600) !important;
    font-weight: 600 !important;
    text-shadow: none !important;
}
.btn-add:hover {
    box-shadow: 0 8px 20px rgba(6, 78, 36, 0.25) !important;
    transform: translateY(-2px) !important;
    color: var(--gold-300) !important;
}
.btn-add i {
    color: var(--gold-400) !important;
}

/* Inputs */
.premium-input-box {
    border-radius: 30px !important;
    border: 1px solid rgba(6, 78, 36, 0.2) !important;
    background: rgba(255,255,255,0.9) !important;
    backdrop-filter: blur(5px);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.02) !important;
    padding: 10px 22px !important;
}

.premium-input-box:focus-within {
    border-color: var(--emerald-500) !important;
    box-shadow: 0 0 15px rgba(6, 78, 36, 0.1) !important;
    background: white !important;
}

.premium-input-box i {
    color: var(--emerald-600) !important;
    font-size: 1.1rem;
}

.premium-input-box input, .premium-input-box select {
    font-size: 0.95rem !important;
    color: var(--emerald-900) !important;
}

/* Action Buttons in table */
.action-btn {
    border-radius: 50% !important;
    width: 38px !important; height: 38px !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05) !important;
}

/* Badges */
.category-badge {
    background: linear-gradient(135deg, #fdfaf3, #f9f1df) !important;
    color: var(--emerald-900) !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.1) !important;
    padding: 6px 16px !important;
    border-radius: 20px !important;
    font-weight: 500 !important;
}
.status-badge {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7) !important;
    color: var(--emerald-800) !important;
    border: 1px solid #bbf7d0 !important;
    padding: 6px 16px !important;
    border-radius: 20px !important;
    font-weight: 500 !important;
    box-shadow: none !important;
}

/* Section Header Typography */
.section-header h3 {
    font-family: 'Playfair Display', serif !important;
    font-size: 1.8rem !important;
    color: var(--emerald-900) !important;
    letter-spacing: 0.5px;
    font-weight: 700 !important;
}
.section-header h3 i {
    color: var(--gold-500) !important;
    margin-right: 12px;
    font-size: 1.6rem;
}

/* Pagination */
.pagination-container {
    background: white !important;
    border-top: 1px solid rgba(6, 78, 36, 0.1) !important;
    padding: 20px 30px !important;
}

.page-btn {
    border-radius: 50% !important;
    width: 38px !important; height: 38px !important;
    padding: 0 !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    border: 1px solid rgba(6, 78, 36, 0.15) !important;
    color: var(--emerald-800) !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    background: white !important;
    transition: all 0.2s ease !important;
}
.page-btn:hover:not(:disabled) {
    background: rgba(6, 78, 36, 0.05) !important;
    border-color: var(--emerald-400) !important;
}
.page-btn.active {
    background: linear-gradient(135deg, var(--emerald-700), var(--emerald-800)) !important;
    color: var(--gold-200) !important;
    border-color: var(--emerald-700) !important;
    box-shadow: 0 4px 12px rgba(6, 78, 36, 0.2) !important;
    transform: scale(1.05);
    font-weight: 600 !important;
}
.page-btn:first-child, .page-btn:last-child {
    border-radius: 20px !important;
    width: auto !important;
    padding: 0 18px !important;
}

/* Premium Custom Scrollbar for Tables */
.table-wrapper::-webkit-scrollbar {
    height: 4px;
}
.table-wrapper::-webkit-scrollbar-track {
    background: transparent;
}
.table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.4);
    border-radius: 10px;
}
.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.8);
}
.table-wrapper {
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.4) transparent;
}

/* Scrollbar enabled so users know the table is scrollable */

/* ============================================
   NEXT LEVEL ISLAMIC SIDEBAR OVERRIDES
   ============================================ */

.sidebar {
    background: linear-gradient(180deg, #022c16 0%, #064e3b 40%, #022c16 100%) !important;
    position: fixed !important;
    top: 0; left: 0;
    box-shadow: 4px 0 25px rgba(0,0,0,0.4) !important;
    border-right: 1px solid rgba(212, 175, 55, 0.15) !important;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(circle at center, rgba(212, 175, 55, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.8;
    pointer-events: none;
    z-index: 0;
}

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

.logo-container {
    width: 90px !important;
    height: 90px !important;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.15), transparent) !important;
    padding: 5px;
    border: 2px solid var(--gold-400) !important;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.3), inset 0 0 15px rgba(212, 175, 55, 0.2) !important;
    margin-bottom: 15px !important;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.logo-container:hover {
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 0 35px rgba(212, 175, 55, 0.5), inset 0 0 20px rgba(212, 175, 55, 0.3) !important;
}
.logo-img {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.crescent-badge {
    background: linear-gradient(135deg, var(--gold-300), var(--gold-500)) !important;
    color: #022c16 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important;
    border: 1px solid #fff !important;
}

.org-name {
    font-family: 'Playfair Display', serif !important;
    color: var(--gold-200) !important;
    font-size: 1.5rem !important;
    letter-spacing: 1px !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5) !important;
}
.org-subtitle {
    color: var(--gold-400) !important;
    letter-spacing: 2px !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    opacity: 0.9 !important;
}

:root {
    --sidebar-width: 280px !important;
}

.nav-list {
    gap: 4px !important;
    padding: 0 15px !important;
}
.nav-item {
    border-radius: 8px !important;
    overflow: hidden;
    margin-bottom: 2px !important;
}
.nav-link {
    border-radius: 8px !important;
    padding: 14px 18px !important;
    color: rgba(255,255,255,0.75) !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.3px !important;
    transition: all 0.2s ease !important;
    border-left: 3px solid transparent !important;
    display: flex;
    align-items: center;
}
.nav-link i {
    color: var(--gold-600) !important;
    opacity: 0.8;
    transition: all 0.2s ease !important;
    font-size: 1.15rem !important;
    width: 24px;
    margin-right: 12px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--gold-100) !important;
    border-left: 3px solid rgba(212, 175, 55, 0.3) !important;
}
.nav-link:hover i {
    opacity: 1;
    color: var(--gold-400) !important;
}

.nav-item.active .nav-link,
.nav-item.active .nav-link:hover {
    background: rgba(212, 175, 55, 0.12) !important;
    color: var(--gold-300) !important;
    border-left: 3px solid var(--gold-400) !important;
    box-shadow: inset 20px 0 30px -20px rgba(212, 175, 55, 0.15) !important;
    font-weight: 600 !important;
}
.nav-item.active .nav-link i {
    color: var(--gold-400) !important;
    opacity: 1;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.4) !important;
}

.sidebar-footer {
    padding: 20px 15px !important;
    background: transparent !important;
    border-top: 1px solid rgba(212, 175, 55, 0.08) !important;
}
.admin-profile {
    background: transparent !important;
    border: 1px solid rgba(212, 175, 55, 0.15) !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    transition: all 0.2s ease !important;
}
.admin-profile:hover {
    background: rgba(212, 175, 55, 0.05) !important;
    border-color: rgba(212, 175, 55, 0.3) !important;
}
.admin-avatar {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600)) !important;
    border-radius: 8px !important;
}
.admin-avatar i {
    color: #022c16 !important;
}
.admin-info h4 {
    color: var(--gold-100) !important;
    font-family: 'Outfit', sans-serif !important;
    letter-spacing: 0.5px !important;
}
.admin-info p {
    color: var(--gold-500) !important;
}
.logout-btn {
    color: rgba(255,255,255,0.6) !important;
    transition: all 0.3s ease !important;
}
.logout-btn:hover {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
    border-radius: 8px !important;
    padding-left: 10px !important;
}


/* Hide ALL scrollbars across the entire app for a cleaner app-like experience based on user request */
::-webkit-scrollbar {
    display: none !important;
}
* {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

/* ============================================
   NATIVE MOBILE APP EXPERIENCE OVERRIDES
   ============================================ */

/* Touch & UI Optimizations */
* {
    -webkit-tap-highlight-color: transparent;
}
.btn, .nav-link, .action-btn, .page-btn, .close-modal {
    user-select: none;
    -webkit-user-select: none;
}

@media (max-width: 1024px) {
    /* Sticky Blurred Topbar */
    .main-content {
        padding-top: var(--topbar-height);
    }
    .topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: rgba(253, 252, 248, 0.85) !important;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }
    
    /* Bottom Sheet Modals */
    .modal {
        align-items: flex-end !important;
        padding: 0 !important;
    }
    .modal-content {
        position: relative;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 24px 24px 0 0 !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        padding-bottom: 40px !important; /* Safe area padding */
    }
    .modal.active .modal-content {
        transform: translateY(0);
    }
    /* Responsive Data Tables -> Mobile Cards disabled to keep list view */
    .data-table {
        min-width: 800px; /* Ensure table doesn't squish too much, causing horizontal scroll */
    }
    /* Improve mobile controls layout */
    .controls-wrapper {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    .action-buttons {
        width: 100%;
        justify-content: space-between;
    }
    .action-buttons .btn {
        flex: 1;
        text-align: center;
        justify-content: center;
    }
}


/* ========================================
   MEMBERS CLEAN APP DESIGN (IMAGE MATCH)
   ======================================== */

/* Container */
.members-app-container {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Section Title */
/* =============================================
   MEMBERS TOOLBAR — Single Row Professional
   ============================================= */
.members-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    gap: 12px;
    border-bottom: 1px solid rgba(201,165,58,0.1);
    flex-wrap: wrap;
}

.members-toolbar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.members-toolbar-title svg {
    color: var(--gold-500);
    flex-shrink: 0;
}

.members-toolbar-title h3 {
    font-size: 1.1rem;
    font-weight: 750;
    color: var(--emerald-900);
    margin: 0;
    letter-spacing: -0.2px;
}

.members-toolbar-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Form Switcher Cards */
.form-switcher-cards {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.fs-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.fs-card:hover {
    border-color: var(--emerald-400);
    color: var(--emerald-700);
}
.fs-card.active {
    background: var(--emerald-50);
    border-color: var(--emerald-500);
    color: var(--emerald-800);
}

/* Filter Box */
.members-filter-box {
    display: inline-flex !important;
    align-items: center !important;
    background: rgba(6,78,36,0.04) !important;
    border: 1px solid rgba(201,165,58,0.2) !important;
    border-radius: 9px !important;
    padding: 0 !important;
    box-shadow: none !important;
    width: auto !important;
    overflow: hidden;
}

.members-filter-box select,
.custom-premium-selected {
    background: transparent !important;
    border: none !important;
    border-radius: 9px !important;
    color: var(--emerald-800) !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    padding: 8px 32px 8px 12px !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
    appearance: auto;
    min-width: 140px;
}

/* Search Box */
.members-search-box {
    display: flex !important;
    align-items: center !important;
    background: white !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    border-radius: 9px !important;
    padding: 8px 12px !important;
    gap: 8px !important;
    width: 200px !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease !important;
}

.members-search-box:focus-within {
    border-color: rgba(201,165,58,0.4) !important;
    box-shadow: 0 0 0 3px rgba(201,165,58,0.08) !important;
}

.members-search-box svg {
    color: #9ca3af;
    flex-shrink: 0;
}

.members-search-box input {
    border: none !important;
    background: transparent !important;
    outline: none !important;
    flex: 1;
    font-size: 0.82rem !important;
    color: var(--text-primary) !important;
    min-width: 0;
    box-shadow: none !important;
}

.members-search-box input::placeholder {
    color: #9ca3af;
}

/* Action Buttons Row */
.members-action-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 !important;
}

/* PDF Button */
.members-action-row .btn-pdf {
    flex: 0 0 auto !important;
    background: white !important;
    color: #dc2626 !important;
    border: 1px solid rgba(220,38,38,0.25) !important;
    border-radius: 9px !important;
    padding: 8px 12px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    gap: 5px !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.2s ease !important;
}

.members-action-row .btn-pdf svg {
    stroke: #dc2626 !important;
}

.members-action-row .btn-pdf:hover {
    background: #fef2f2 !important;
    border-color: rgba(220,38,38,0.4) !important;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(220,38,38,0.1) !important;
}

/* Excel Button */
.members-action-row .btn-excel {
    flex: 0 0 auto !important;
    background: white !important;
    color: #16a34a !important;
    border: 1px solid rgba(22,163,74,0.25) !important;
    border-radius: 9px !important;
    padding: 8px 12px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    gap: 5px !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.2s ease !important;
}

.members-action-row .btn-excel svg {
    stroke: #16a34a !important;
}

.members-action-row .btn-excel:hover {
    background: #f0fdf4 !important;
    border-color: rgba(22,163,74,0.4) !important;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(22,163,74,0.1) !important;
}

/* ADD MEMBER Button - compact, not full width */
.members-action-row .btn-add {
    flex: 0 0 auto !important;
    background: linear-gradient(135deg, var(--emerald-700), var(--emerald-900)) !important;
    color: white !important;
    border: 1px solid var(--emerald-800) !important;
    border-radius: 9px !important;
    padding: 8px 14px !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    gap: 6px !important;
    box-shadow: 0 2px 8px rgba(6,78,36,0.2) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    display: flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    transition: all 0.2s ease !important;
}

.members-action-row .btn-add svg {
    stroke: white !important;
}

.members-action-row .btn-add:hover {
    background: linear-gradient(135deg, var(--emerald-600), var(--emerald-800)) !important;
    box-shadow: 0 4px 14px rgba(6,78,36,0.3) !important;
    transform: translateY(-1px) !important;
}

/* Desktop table */
.desktop-table-wrapper { display: block; }

/* ========================================
   MOBILE MEMBER LIST CARDS
   ======================================== */
.members-mobile-list {
    display: none;
    background: white;
    border-radius: 14px;
    margin: 0 12px 12px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.07);
    box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}
.member-list-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 10px 12px 8px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    gap: 6px;
    cursor: pointer;
    background: white;
    transition: background 0.12s;
}
.member-list-item:last-child { border-bottom: none; }
.member-list-item:active { background: #fafafa; }

/* Serial number */
.member-item-serial {
    font-size: 12px;
    font-weight: 600;
    color: #b0b8c1;
    min-width: 16px;
    text-align: center;
    flex-shrink: 0;
    padding-top: 3px;
}

/* Body */
.member-item-body {
    flex: 1;
    min-width: 0;
}

/* Top row: avatar + name + status */
.member-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}
.member-item-name-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}
.member-item-avatar {
    width: 34px;
    height: 34px;
    background: rgba(201,165,58,0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c9a53a;
    font-size: 14px;
    flex-shrink: 0;
}
.member-item-names { min-width: 0; }
.member-item-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a2e1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
    line-height: 1.3;
}
.member-item-phone {
    font-size: 12px;
    color: #6b7280;
    margin-top: 1px;
    line-height: 1.3;
}

/* Status badge */
.member-item-status {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 6px;
}
.member-item-status.valid {
    background: rgba(22,163,74,0.1);
    color: #16a34a;
}
.member-item-status.expired {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
}

/* Bottom row: date · amount · badge · edit · delete – single line */
.member-item-bottom {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: nowrap;
    overflow: visible;
    min-width: 0;
}
.member-item-date {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 10.5px;
    color: #6b7280;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
}
.member-item-date i { color: #c9a53a; font-size: 10px; }
.member-item-amount {
    font-size: 11.5px;
    font-weight: 700;
    color: #1a2e1a;
    white-space: nowrap;
    flex-shrink: 0;
}
/* ₹ is already rendered by JS – no ::before needed */
.member-item-badge {
    background: rgba(201,165,58,0.1);
    color: #7c5c10;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
    border: 1px solid rgba(201,165,58,0.2);
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}
.member-item-actions {
    display: flex;
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0;
}
.mi-edit-btn {
    background: rgba(59,130,246,0.1) !important;
    color: #3b82f6 !important;
    border: none !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    padding: 0 !important;
    flex-shrink: 0;
}
.mi-delete-btn {
    background: rgba(239,68,68,0.1) !important;
    color: #ef4444 !important;
    border: none !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    padding: 0 !important;
    flex-shrink: 0;
}
.member-item-arrow {
    display: flex;
    align-items: center;
    color: #d1d5db;
    font-size: 10px;
    flex-shrink: 0;
    align-self: center;
}

/* ========================================
   BOTTOM NAVIGATION BAR
   ======================================== */
.bottom-nav-bar {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 1000;
    background: white;
    border-top: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 -10px 25px rgba(0,0,0,0.04);
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
    align-items: center;
}
.bnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none !important;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 24px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 60px;
    border: 1.5px solid transparent;
}
.bnav-item svg {
    width: 24px;
    height: 24px;
    stroke: #94a3b8;
    fill: none;
    transition: all 0.25s;
    flex-shrink: 0;
}
.bnav-item span { font-size: 11px; font-weight: 600; }
.bnav-item.active { 
    color: #166534; 
    background: #ebf5ee; 
    border-color: #0f172a; /* Solid dark border like screenshot */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 101, 52, 0.1);
}
.bnav-item.active svg { stroke: #166534; stroke-width: 2.2; }
.bnav-item:active { transform: scale(0.95); }

/* ========================================
   MOBILE OVERRIDES
   ======================================== */
@media (max-width: 1024px) {
    .bottom-nav-bar { display: flex; }
    .main-content { padding-bottom: 78px; }
    .desktop-table-wrapper { display: none !important; }
    .members-mobile-list { display: block; }
    .members-filter-row { padding-left: 14px; padding-right: 14px; position: relative; z-index: 10; }
    .members-search-row { padding-left: 14px; padding-right: 14px; }
    .members-action-row { padding: 0 14px 14px; gap: 8px; }
    #members-pagination-container { padding: 10px 14px 6px; }
    .pagination-info { font-size: 0.8rem; color: #6b7280; }
    .topbar-admin-info { display: none; }
    .topbar-admin-profile { padding: 4px; border: none; background: transparent; }
    .greeting h1 { font-size: 0.95rem; }
    
    /* Settings Layout Fix */
    /* Premium Mobile Settings Layout - Stacked Cards */
    .settings-container {
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0 15px; /* Add some padding around the cards */
    }
    .card-arch-top { display: none; } /* Hide the arch on mobile */
    .settings-layout {
        flex-direction: column;
        background: transparent;
        border-top: none;
        gap: 20px; /* Space between the two cards */
    }
    .settings-sidebar {
        width: 100%;
        background: var(--bg-white);
        border: 1px solid var(--border-light);
        border-radius: 16px;
        box-shadow: var(--shadow-sm);
        padding: 8px 0;
    }
    .settings-nav {
        flex-direction: column;
        padding: 0;
        background: transparent;
        border-radius: 0;
        gap: 0;
        box-shadow: none;
    }
    .settings-nav::-webkit-scrollbar {
        display: none;
    }
    .settings-nav-item {
        white-space: normal;
        flex-shrink: 1;
        padding: 16px 20px;
        border-radius: 8px;
        margin: 4px 12px;
        color: var(--text-secondary);
        font-weight: 600;
        font-size: 0.95rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .settings-nav-item i {
        display: inline-block;
        margin-right: 14px;
        width: 20px;
        text-align: center;
        color: inherit;
    }
    .settings-nav-item::after {
        content: '\f054'; /* FontAwesome chevron-right */
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        margin-left: auto;
        color: var(--text-tertiary);
        font-size: 0.85rem;
    }
    .settings-nav-item.active {
        background: rgba(6, 78, 36, 0.08);
        color: var(--emerald-900);
        box-shadow: none;
    }
    .settings-nav-item.active::after {
        color: var(--emerald-800);
    }
    .settings-content {
        padding: 24px 20px 30px;
        background: var(--bg-white);
        border-radius: 16px;
        border: 1px solid var(--border-light);
        box-shadow: var(--shadow-sm);
        margin-top: 0;
    }
    .settings-form .form-row {
        flex-direction: column;
        gap: 15px;
    }
    .settings-form .btn {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        padding: 14px;
        font-size: 1.05rem;
        margin-top: 10px;
    }
}

/* Forms Overview Page */
.forms-overview-header {
    text-align: center;
    max-width: 650px;
    margin: 10px auto 40px auto;
    padding: 20px;
}
.forms-overview-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--emerald-800);
    margin-bottom: 12px;
}
.forms-overview-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.forms-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 30px 0;
}
@media (max-width: 768px) {
    .forms-grid {
        grid-template-columns: 1fr;
    }
}
.form-large-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    min-height: 160px;
}
.form-large-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(240,253,244,0.4) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}
.form-large-card:hover::before {
    opacity: 1;
}
.form-large-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: var(--emerald-300);
}
.flc-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 16px rgba(0,0,0,0.05);
}
.flc-content {
    flex: 1;
    position: relative;
    z-index: 1;
}
.flc-content h3 {
    margin: 0 0 8px 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}
.flc-content p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.flc-arrow {
    color: #cbd5e1;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}
.form-large-card:hover .flc-arrow {
    transform: translateX(6px);
    color: var(--emerald-600);
}

/* =========================================================
   IPHONE & MOBILE NATIVE RESPONSIVE FIXES (MODALS & REPORTS)
   ========================================================= */
@media (max-width: 1024px) {
    /* Prevent horizontal viewport stretching */
    html, body, .main-content, .page-section, .table-container {
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    /* Ensure modals fit mobile screens without padding waste */
    .modal-overlay {
        padding: 10px !important;
        box-sizing: border-box !important;
        align-items: center !important;
    }
    .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 18px 14px !important;
        border-radius: 18px !important;
        max-height: 88vh !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    /* Stack Add Expense & other modal grid inputs on mobile */
    .expense-top-grid,
    .expense-salary-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    /* Toolbar & Search Controls layout on iPhone / Mobile */
    .members-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 14px !important;
        gap: 12px !important;
        box-sizing: border-box !important;
        height: auto !important;
    }
    .members-toolbar-title {
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }
    .members-toolbar-controls {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 10px !important;
        box-sizing: border-box !important;
    }
    .members-search-box {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .members-toolbar-controls .premium-input-box {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .members-action-row {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        gap: 8px !important;
        padding: 4px 0 0 !important;
        box-sizing: border-box !important;
    }
    .members-action-row .btn-add {
        width: 100% !important;
        order: -1 !important;
        justify-content: center !important;
        padding: 12px !important;
        font-size: 0.95rem !important;
    }
    .members-action-row .btn-pdf,
    .members-action-row .btn-excel {
        flex: 1 1 calc(50% - 6px) !important;
        justify-content: center !important;
        padding: 10px !important;
    }

    /* Mobile form switcher cards wrapping */
    .form-switcher-cards {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .fs-card {
        text-align: center !important;
        padding: 8px 6px !important;
        font-size: 0.82rem !important;
    }

    /* Safe table wrapper scrolling if any table remains on screen */
    .table-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Enhance mobile card appearance for expenses */
    #expenses-mobile-list .member-item-name {
        max-width: 240px !important;
        white-space: normal !important;
        word-break: break-word !important;
    }
}


