:root {
    --bg-cream: #f7f3ea;
    --bg-soft: #fffdf8;
    --brand-green-900: #10382f;
    --brand-green-800: #1b4e42;
    --brand-green-700: #266653;
    --brand-gold-500: #b99856;
    --brand-gold-400: #d2b37a;
    --text-dark: #1a2823;
    --text-muted: #66756f;
    --surface-border: #e7dcc8;
    --shadow-soft: 0 8px 22px rgba(16, 56, 47, 0.08);
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--text-dark);
    background:
        radial-gradient(circle at 7% 8%, rgba(185, 152, 86, 0.14), transparent 28%),
        radial-gradient(circle at 96% 14%, rgba(38, 102, 83, 0.12), transparent 30%),
        linear-gradient(180deg, var(--bg-soft) 0%, var(--bg-cream) 100%);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand,
.card-header,
.app-brand-title {
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 0.2px;
}

.app-navbar {
    background: linear-gradient(115deg, var(--brand-green-900), var(--brand-green-700));
    border-bottom: 2px solid rgba(210, 179, 122, 0.6);
    box-shadow: 0 8px 22px rgba(16, 56, 47, 0.35);
}

.app-brand {
    text-decoration: none;
    color: #fff;
}

.app-brand:hover {
    color: #fff;
}

.app-brand-mark {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(210, 179, 122, 0.7);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f6e8c7;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.09);
}

.app-brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(210, 179, 122, 0.7);
    background: rgba(255, 255, 255, 0.09);
}

.app-brand-title {
    color: #ffffff;
    font-size: 1.55rem;
    line-height: 1;
}

.app-brand-tagline {
    font-family: 'Manrope', sans-serif;
    font-size: 0.72rem;
    color: #e4d4af;
    line-height: 1.2;
    letter-spacing: 0.35px;
}

.app-navbar-meta {
    color: #f7f0de;
}

.app-navbar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    text-align: center;
    max-width: 38%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-navbar-jamaat-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #f6e8c7;
    letter-spacing: 0.4px;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.app-navbar-user {
    font-size: 0.9rem;
    font-weight: 600;
}

.app-navbar-sub {
    font-size: 0.74rem;
    color: #dfcc9f;
}

.app-user-dropdown-btn {
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.app-user-dropdown-btn:hover,
.app-user-dropdown-btn:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.8);
    color: #fff;
}

.app-user-dropdown-menu {
    min-width: 220px;
    border: 1px solid #e6d8be;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(16, 56, 47, 0.2);
}

.app-main-shell {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

.app-main-shell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 220px;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 10% 10%, rgba(38, 102, 83, 0.08) 0%, transparent 32%),
        radial-gradient(circle at 86% 0%, rgba(185, 152, 86, 0.08) 0%, transparent 30%);
}

.card {
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    background: rgba(255, 255, 255, 0.95);
}

.card-header {
    background: linear-gradient(180deg, #f9f3e8, #f3ead8);
    border-bottom: 1px solid #e8dcc3;
    color: #27483f;
    font-size: 1.15rem;
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
}

.kpi-card {
    border: 1px solid #e8ddca;
    box-shadow: var(--shadow-soft);
}

.landing-hero {
    overflow: hidden;
    border: 1px solid rgba(38, 102, 83, 0.16);
    background:
        radial-gradient(circle at 12% 18%, rgba(210, 179, 122, 0.18), transparent 24%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 239, 225, 0.94));
}

.landing-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(38, 102, 83, 0.1);
    color: var(--brand-green-800);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.jamaat-card {
    border: 1px solid #e5dbc8;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.jamaat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(16, 56, 47, 0.12);
}

.jamaat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex: 0 0 36px;
    background: linear-gradient(135deg, var(--jamaat-accent), #ffffff);
    border: 1px solid rgba(16, 56, 47, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.jamaat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jamaat-avatar span {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.jamaat-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.jamaat-stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: #f4ecdc;
    color: #355a4d;
    font-size: 0.8rem;
    font-weight: 600;
}

.list-group-item {
    border-color: #eee3ce;
    background: rgba(255, 255, 255, 0.96);
}

.list-group-item-action {
    color: #305248;
    font-weight: 500;
}

.list-group-item-action:hover,
.list-group-item-action:focus {
    background: linear-gradient(90deg, rgba(38, 102, 83, 0.1), rgba(185, 152, 86, 0.08));
    color: #173f33;
}

.app-sidebar-toggle-btn {
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
    margin-left: auto;
    margin-right: 1rem;
}

.app-sidebar-panel {
    position: sticky;
    top: 1rem;
}

.app-main-shell .row {
    margin-left: 0;
    margin-right: 0;
}

.app-sidebar-column {
    flex: 0 0 300px;
    max-width: 300px;
}

.app-content-column {
    flex: 1 1 auto;
    min-width: 0;
}

.app-sidebar-group {
    border-top: 1px solid #eee3ce;
}

.app-sidebar-group-toggle {
    width: 100%;
    border: 0;
    background: #f7efe0;
    color: #2f584c;
    padding: 0.55rem 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.78rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-sidebar-group-toggle:hover,
.app-sidebar-group-toggle:focus {
    background: #efe2ca;
}

.app-sidebar-indicator {
    display: inline-flex;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    border: 1px solid #b9a682;
    font-size: 0.9rem;
    line-height: 1;
}

.app-sidebar-group-body {
    display: block;
}

.app-sidebar-group-body.is-collapsed {
    display: none;
}

body.app-sidebar-hidden .app-sidebar-panel {
    display: none;
}

body.app-sidebar-hidden .app-sidebar-toggle-btn {
    background: rgba(255, 255, 255, 0.18);
}

body.app-sidebar-hidden .app-sidebar-column {
    display: none;
}

body.app-sidebar-hidden .app-content-column {
    flex: 1 1 100%;
    max-width: 100%;
}

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

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #1d5647, #2d705d);
    border-color: #2d705d;
}

.btn-outline-primary {
    color: var(--brand-green-700);
    border-color: var(--brand-green-700);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: var(--brand-green-700);
    border-color: var(--brand-green-700);
}

.table {
    color: var(--text-dark);
}

.table thead th {
    background: #f4ecdc;
    color: #355a4d;
    font-weight: 700;
}

.badge.bg-secondary {
    background: #53655f !important;
}

.badge.bg-info {
    background: #3c7f92 !important;
}

.badge.bg-warning {
    background: #c89d3f !important;
    color: #1f211d !important;
}

.badge.bg-success {
    background: #2f745f !important;
}

.app-footer {
    border-top: 2px solid #d7c19a;
    background: linear-gradient(180deg, var(--brand-green-800) 0%, var(--brand-green-900) 100%);
    color: #f4e8c9;
}

.app-footer-mark {
    color: #d7bc86;
    font-size: 1.2rem;
}

.app-footer-branding {
    color: #fff6e0;
}

.app-footer-note {
    color: #f1d7a1;
}

.form-control,
.form-select {
    border-color: #dbcdae;
}

.form-control:focus,
.form-select:focus {
    border-color: #3d725f;
    box-shadow: 0 0 0 0.2rem rgba(61, 114, 95, 0.18);
}

#dashboard-members-chart {
    max-height: 280px;
}

@media (max-width: 991.98px) {
    .app-brand-title {
        font-size: 1.35rem;
    }

    .app-sidebar-toggle-btn {
        margin-right: 0.5rem;
        font-size: 0.78rem;
        padding: 0.2rem 0.45rem;
    }

    .app-navbar-user,
    .app-navbar-sub {
        text-align: right;
    }

    .app-user-dropdown-btn {
        font-size: 0.78rem;
        padding: 0.2rem 0.45rem;
    }

    .app-main-shell {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .app-sidebar-column,
    .app-content-column {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .app-sidebar-panel {
        position: relative;
        top: 0;
    }
}
