:root {
    --app-primary: #0f5f46;
    --app-primary-deep: #0a3f30;
    --app-accent: #c7a76a;
    --app-bg: #eef3ef;
    --app-surface: #ffffff;
    --app-ink: #16352b;
    --app-muted: #60766d;
    --app-border: rgba(15, 95, 70, 0.14);
    --shadow-soft: 0 16px 40px rgba(12, 56, 43, 0.12);
    --shadow-card: 0 10px 24px rgba(12, 56, 43, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    color: var(--app-ink);
    background: var(--app-bg);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--app-primary-deep);
}

.public-body {
    background:
        radial-gradient(1100px 500px at 8% -6%, rgba(15, 95, 70, 0.18), transparent 62%),
        radial-gradient(900px 460px at 100% 0%, rgba(199, 167, 106, 0.18), transparent 60%),
        var(--app-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.public-body > main {
    flex: 1 0 auto;
}

.site-navbar {
    background: linear-gradient(120deg, #0c4f3a, #0f6a4d);
}

.site-navbar .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

.site-navbar .nav-link.active,
.site-navbar .nav-link:hover {
    color: #fff;
}

.brand-name {
    color: #fff;
    font-weight: 800;
    letter-spacing: 0;
    white-space: nowrap;
    display: inline-block;
    max-width: calc(100vw - 120px);
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    font-size: clamp(0.9rem, 1.4vw, 1.08rem);
}

.public-footer {
    background: #f7f9f6;
    border-top: 1px solid var(--app-border);
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--app-primary);
}

.section-label::before {
    content: '';
    width: 26px;
    height: 2px;
    border-radius: 999px;
    background: var(--app-accent);
}

.landing-hero {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: linear-gradient(130deg, #0c4d39 0%, #0e6c50 55%, #10382e 100%);
    color: #eaf5f0;
    box-shadow: var(--shadow-soft);
}

.landing-hero::before,
.landing-hero::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.landing-hero::before {
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, rgba(199, 167, 106, 0.28), transparent 68%);
    right: -180px;
    top: -160px;
}

.landing-hero::after {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.17), transparent 70%);
    left: -120px;
    bottom: -140px;
}

.hero-content,
.hero-panel {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-title {
    color: #fff;
    font-size: clamp(2rem, 3.8vw, 3.1rem);
    line-height: 1.15;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.02rem;
    color: rgba(232, 247, 239, 0.92);
    margin-bottom: 1.4rem;
    max-width: 640px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.hero-actions .btn {
    border-radius: 999px;
    font-weight: 700;
    padding-left: 1rem;
    padding-right: 1rem;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-actions .btn-warning {
    color: #17392e;
    background: var(--app-accent);
    border-color: var(--app-accent);
}

.hero-actions .btn-warning:hover,
.hero-actions .btn-warning:focus-visible {
    color: #0f2f25;
    background: #d5b982;
    border-color: #d5b982;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(9, 39, 31, 0.25);
}

.hero-actions .btn-light {
    background: rgba(255, 255, 255, 0.92);
    color: #0f6047;
    border-color: rgba(255, 255, 255, 0.92);
}

.hero-actions .btn-light:hover,
.hero-actions .btn-light:focus-visible {
    background: #ffffff;
    color: #0b4a36;
    border-color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(9, 39, 31, 0.18);
}

.hero-actions .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.62);
    color: #fff;
}

.hero-actions .btn-outline-light:hover,
.hero-actions .btn-outline-light:focus-visible {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.92);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(9, 39, 31, 0.2);
}

.hero-panel {
    border-radius: 1rem;
    padding: 1rem;
    background: rgba(11, 40, 32, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(2px);
}

.hero-panel h3 {
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
}

.hero-panel p {
    color: rgba(234, 244, 238, 0.9);
    font-size: 0.93rem;
}

.hero-mini-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.hero-mini-card {
    border-radius: 0.85rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-mini-card .value {
    display: block;
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff;
    line-height: 1.2;
}

.hero-mini-card .label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(226, 243, 234, 0.86);
}

.stats-grid {
    margin-top: 1.5rem;
}

.stat-card {
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    box-shadow: var(--shadow-card);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), #fff);
}

.stat-card .stat-label {
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--app-muted);
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.stat-card .stat-value {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.55rem;
    color: var(--app-primary-deep);
    line-height: 1.2;
}

.surface-card {
    border: 1px solid var(--app-border);
    border-radius: 1.1rem;
    box-shadow: var(--shadow-card);
    background: var(--app-surface);
}

.public-page-shell {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
}

.public-page-header {
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), #ffffff);
    box-shadow: var(--shadow-card);
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
}

.public-page-header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.public-page-title {
    margin: 0;
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
    color: var(--app-primary-deep);
}

.public-page-subtitle {
    margin-top: 0.35rem;
    color: var(--app-muted);
    font-size: 0.95rem;
}

.public-page-toolbar {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.public-page-toolbar .form-select {
    min-width: 220px;
}

.public-page-toolbar .btn {
    font-weight: 700;
}

.public-page-card {
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    box-shadow: var(--shadow-card);
    background: #fff;
}

.public-page-card .card-header {
    border-bottom: 1px solid var(--app-border);
}

.public-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--app-primary-deep);
}

.announcement-item {
    border: 1px solid var(--app-border);
    border-radius: 0.85rem;
    padding: 0.95rem;
    background: linear-gradient(180deg, #ffffff, #fbfdfc);
}

.feature-card {
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    background: #fff;
    box-shadow: var(--shadow-card);
    padding: 1.05rem;
    height: 100%;
}

.feature-card .feature-index {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 95, 70, 0.12);
    color: var(--app-primary);
    font-weight: 800;
    margin-bottom: 0.7rem;
}

.feature-card h3 {
    font-size: 1.03rem;
    margin-bottom: 0.45rem;
}

.feature-card p {
    font-size: 0.92rem;
    color: var(--app-muted);
    margin-bottom: 0;
}

.role-card {
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    padding: 1.1rem;
    background: linear-gradient(180deg, #fff, #f8fcfa);
    box-shadow: var(--shadow-card);
    height: 100%;
}

.role-card h3 {
    font-size: 1.08rem;
    margin-bottom: 0.55rem;
}

.role-card .role-badge {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.75rem;
}

.role-card.masjid .role-badge {
    background: rgba(15, 95, 70, 0.12);
    color: var(--app-primary);
}

.role-card.musholla .role-badge {
    background: rgba(199, 167, 106, 0.2);
    color: #705424;
}

.role-list {
    margin: 0;
    padding-left: 1rem;
    color: var(--app-muted);
    font-size: 0.92rem;
}

.table-responsive {
    overflow-x: auto;
}

.table-soft thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--app-muted);
    border-bottom-width: 1px;
}

.table-soft td,
.table-soft th {
    vertical-align: middle;
}

.admin-body {
    min-height: 100vh;
    background: #f5f8fb;
}

#adminLayout {
    min-height: 100vh;
}

.admin-sidebar {
    width: 270px;
    min-height: 100vh;
    background: linear-gradient(170deg, #0d4b38, #0a3e2f 58%, #083125 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar .offcanvas-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.admin-sidebar .offcanvas-body .nav {
    width: 100%;
}

.admin-main {
    min-width: 0;
}

.admin-topbar {
    min-height: 64px;
    box-shadow: 0 2px 12px rgba(10, 51, 38, 0.08);
}

.admin-page-title {
    font-size: 1rem;
    font-weight: 800;
    color: #1a4133;
}

.admin-profile-toggle {
    border: 0;
    background: transparent;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-profile-toggle::after {
    margin-left: 0.2rem;
    color: #6c757d;
}

.admin-profile-toggle:focus {
    box-shadow: none;
}

.admin-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #0f6a4d, #0a3d2d);
    border: 2px solid #e9f5ef;
}

.admin-profile-dropdown {
    min-width: 220px;
    border: 1px solid #e7ece9;
}

.admin-profile-dropdown .dropdown-header {
    white-space: normal;
}

.admin-user-card {
    padding: 0.95rem;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-user-role {
    display: inline-block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 800;
    color: rgba(232, 251, 244, 0.9);
    margin-bottom: 0.45rem;
}

.admin-user-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
}

.admin-user-unit {
    font-size: 0.86rem;
    color: rgba(240, 253, 247, 0.92);
}

.admin-sidebar .nav-link {
    border-radius: 0.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 0.7rem;
}

.admin-sidebar .nav-link.active,
.admin-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.login-card {
    max-width: 430px;
    width: 100%;
    margin: 0;
}

.public-login-wrap {
    min-height: clamp(440px, calc(100vh - 280px), 700px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
}

.select2-container .select2-selection--single {
    height: calc(2.25rem + 2px);
}

.select2-container--default .select2-selection--single {
    display: flex;
    align-items: center;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background-color: #fff;
    color: #212529;
    box-shadow: none;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #212529;
    line-height: 1.5;
    padding-left: 0;
    padding-right: 0;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #6c757d;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    width: 1rem;
    right: 0.75rem;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #6c757d transparent transparent transparent;
    border-style: solid;
    border-width: 5px 4px 0 4px;
    height: 0;
    width: 0;
    margin: 0;
    position: static;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #6c757d transparent;
    border-width: 0 4px 5px 4px;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: 0;
}

.select2-container--default.select2-container--disabled .select2-selection--single {
    background-color: #e9ecef;
    color: #6c757d;
}

.select2-dropdown {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.select2-search--dropdown .select2-search__field {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.375rem 0.5rem;
}

.select2-results__option {
    padding: 0.45rem 0.75rem;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #0d6efd;
    color: #fff;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal.delay-1 {
    transition-delay: 0.08s;
}

.reveal.delay-2 {
    transition-delay: 0.16s;
}

.reveal.delay-3 {
    transition-delay: 0.24s;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        width: 285px;
    }

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

    .public-page-toolbar .form-select {
        min-width: 190px;
    }
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 1.85rem;
    }

    .brand-name {
        max-width: calc(100vw - 115px);
        font-size: 0.9rem;
    }

    .public-page-header-row {
        align-items: stretch;
    }

    .public-page-toolbar {
        width: 100%;
    }

    .public-page-toolbar .form-select,
    .public-page-toolbar .btn {
        width: 100%;
    }
}
