:root {
    --bg: #eef2f8;
    --surface: #ffffff;
    --surface-alt: #f8fbff;
    --text: #102033;
    --muted: #607083;
    --line: #d8e2ee;
    --primary: #0f766e;
    --primary-dark: #0c5d57;
    --primary-soft: #d9f1ed;
    --accent: #df4328;
    --accent-dark: #c7341b;
    --dark-surface: #0a0d18;
    --dark-muted: #c1cbda;
    --danger: #b42318;
    --success: #157347;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Tahoma, sans-serif;
    color: var(--text);
    background: var(--bg);
}
a { color: var(--primary); text-decoration: none; }
h1, h2, h3 { margin-top: 0; }
input, select, textarea, button { font: inherit; }
input, select, textarea {
    width: 100%;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
}
input::placeholder, textarea::placeholder { color: #94a3b8; }
textarea { min-height: 120px; resize: vertical; }
label { display: grid; gap: 10px; font-weight: 700; color: var(--text); }

.public-body {
    background: #eef2f8;
}

.public-header, .panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.public-header {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 14px;
    color: #1d2853;
}

.public-header strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 900;
}

.public-header span {
    color: var(--muted);
    font-size: 0.95rem;
}

.public-header nav a {
    font-weight: 700;
    color: #1f2858;
}

.public-body main {
    padding: 0 0 40px;
}

.page-wrap {
    padding: 0 0 40px;
}

.container {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
}

.visual-stack {
    display: grid;
    gap: 0;
}

.visual-frame {
    margin: 0;
    background: #fff;
    padding: 0;
    border: 0;
    box-shadow: none;
}

.visual-frame img {
    width: 100%;
    display: block;
}

.panel-card,
.auth-card,
.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.inline-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 18px;
    background: linear-gradient(180deg, #11182b 0%, #18213a 100%);
}

.inline-cta-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 76px;
    padding: 18px 28px;
    border-radius: 16px;
    background: linear-gradient(180deg, #5c88f5 0%, #3f6fe7 100%);
    color: #fff;
    font-size: clamp(1.1rem, 2.2vw, 1.8rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    text-align: center;
    text-transform: uppercase;
    box-shadow: 0 18px 34px rgba(63, 111, 231, 0.28);
}

.inline-cta-btn:hover {
    background: linear-gradient(180deg, #6a95ff 0%, #4a7af0 100%);
}

.form-card {
    padding: 72px 56px 84px;
    background: #ffffff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.form-card > * {
    width: min(100%, 860px);
    margin-left: auto;
    margin-right: auto;
}

.form-intro {
    margin-bottom: 44px;
    text-align: center;
}

.form-intro h2 {
    margin: 0 0 18px;
    color: #1f2858;
    font-size: clamp(2.8rem, 6vw, 5rem);
    line-height: 0.95;
    letter-spacing: -0.07em;
}

.form-intro p {
    max-width: 760px;
    margin: 0 auto;
    color: #30406f;
    font-size: clamp(1.08rem, 2.5vw, 1.5rem);
    line-height: 1.7;
}

.landing-form {
    gap: 18px;
}

.form-steps-indicator {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    width: min(100%, 860px);
    margin: 0 auto 26px;
}

.step-chip {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid #dce6f2;
    background: #f8fbff;
    color: #607083;
}

.step-chip span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #dfe8f5;
    color: #30406f;
    font-weight: 900;
}

.step-chip strong {
    font-size: 0.98rem;
    color: inherit;
}

.step-chip.is-active {
    border-color: #bad0f7;
    background: #eef5ff;
    color: #1f2858;
}

.step-chip.is-active span {
    background: #1f2858;
    color: #fff;
}

.form-step {
    display: none;
}

.form-step.is-active {
    display: block;
}

.form-step-head {
    margin-bottom: 22px;
}

.form-step-head span {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.form-step-head h3 {
    margin-bottom: 8px;
    color: #1f2858;
    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.form-step-head p {
    margin: 0;
    color: #5d6f8f;
    line-height: 1.7;
}

.form-note {
    padding: 18px 18px 20px;
    border-radius: 18px;
    background: #eef5ff;
    color: #30406f;
    line-height: 1.7;
}

.form-note strong {
    color: #1f2858;
}

.grid-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.grid-form .full,
.detail-grid .wide {
    grid-column: 1 / -1;
}

.stack { display: grid; gap: 14px; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border: 0;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

.button:hover { background: var(--primary-dark); }
.button-secondary { background: #e7eceb; color: var(--text); }
.button-small { padding: 8px 12px; font-size: 0.9rem; }

.button-landing {
    width: min(100%, 460px);
    margin: 18px auto 0;
    padding: 22px 24px;
    border-radius: 999px;
    background: linear-gradient(180deg, #5b88f7 0%, #4676eb 100%);
    box-shadow: 0 18px 34px rgba(74, 124, 242, 0.28);
    font-size: 1.06rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.button-landing:hover {
    background: linear-gradient(180deg, #4f7ef1 0%, #3d6fe6 100%);
}

.step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
}

.button-step-next,
.button-step-submit {
    width: min(100%, 420px);
}

.card, .auth-card, .stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.card, .panel-card, .auth-card { padding: 24px; }
.auth-card { max-width: 520px; margin: 32px auto; }

.alert {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px 16px;
    border-radius: 12px;
}
.alert-success { background: #e9f7ef; color: var(--success); }
.alert-error { background: #fff1f1; color: var(--danger); }

.panel-body {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}
.sidebar {
    background: #16342c;
    color: #fff;
    padding: 28px 20px;
}
.sidebar a { color: #edf7f4; display: block; padding: 10px 0; }
.sidebar-brand { margin-bottom: 24px; }
.sidebar-brand small { display: block; color: #b7d6ce; margin-top: 6px; }
.panel-main { padding: 24px; }
.panel-header { margin-bottom: 24px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card { padding: 20px; }
.stat-card span { display: block; color: var(--muted); margin-bottom: 8px; }
.stat-card strong { font-size: 1.8rem; }

.table {
    width: 100%;
    border-collapse: collapse;
}
.table th, .table td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    text-align: left;
}

.toolbar, .actions, .filters, .two-col {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.filters label {
    min-width: 180px;
    flex: 1 1 180px;
}
.mosque-filters {
    margin-top: 18px;
    align-items: end;
}
.filter-actions {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}
.pagination {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 18px;
}
.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font-weight: 700;
}
.pagination-link.is-active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}
.pagination-link.is-disabled {
    pointer-events: none;
    opacity: 0.45;
}
.two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.detail-grid div {
    display: grid;
    gap: 8px;
    padding: 14px;
    background: var(--surface-alt);
    border-radius: 12px;
}

.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.account-sections {
    align-items: start;
}
.recommendation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.recommendation-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-alt);
}
.recommendation-card strong {
    color: #1f2858;
}
.recommendation-card span {
    color: #5d6f8f;
    font-size: 0.92rem;
    line-height: 1.5;
}
.password-field {
    position: relative;
}
.password-field input {
    padding-right: 128px;
}
.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    min-width: 100px;
    padding: 9px 12px;
    border: 1px solid #c9d6e5;
    border-radius: 10px;
    background: #f8fbff;
    color: #30406f;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
}
.password-toggle:hover {
    background: #eef5ff;
}
.password-strength {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    border: 1px solid #dbe6f5;
    border-radius: 16px;
    background: #f8fbff;
}
.password-strength-bar {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: #dce6f2;
}
.password-strength-bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #bcccdc;
    transition: width 160ms ease, background-color 160ms ease;
}
.password-strength strong {
    color: #1f2858;
    font-size: 0.95rem;
}
.password-strength p {
    margin: 0;
    color: #5d6f8f;
    line-height: 1.6;
}
.password-strength[data-strength="weak"] .password-strength-bar span {
    background: #df4328;
}
.password-strength[data-strength="medium"] .password-strength-bar span {
    background: #e19a22;
}
.password-strength[data-strength="strong"] .password-strength-bar span {
    background: #157347;
}
.password-strength[data-strength="empty"] .password-strength-bar span {
    background: #bcccdc;
}
.password-match {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border: 1px solid #dbe6f5;
    border-radius: 16px;
    background: #f8fbff;
}
.password-match strong {
    color: #1f2858;
    font-size: 0.95rem;
}
.password-match p {
    margin: 0;
    color: #5d6f8f;
    line-height: 1.6;
}
.password-match[data-match="match"] {
    border-color: #b9e0c8;
    background: #eefaf2;
}
.password-match[data-match="match"] strong {
    color: #157347;
}
.password-match[data-match="mismatch"] {
    border-color: #f2c6c0;
    background: #fff4f2;
}
.password-match[data-match="mismatch"] strong {
    color: #b42318;
}
.badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eef5ff;
    color: #30406f;
    font-size: 0.85rem;
    font-weight: 800;
}
.badge-static {
    background: #f6efe2;
    color: #9a5b0f;
}

@media (max-width: 980px) {
    .two-col,
    .panel-body,
    .grid-form,
    .form-steps-indicator,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .form-card {
        padding: 40px 24px 48px;
    }

    .inline-cta {
        padding: 14px 16px;
    }

    .inline-cta-btn {
        width: 100%;
        min-height: 66px;
        padding: 16px 18px;
        font-size: 1.02rem;
    }

    .step-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .sidebar { padding-bottom: 8px; }
    .panel-main { padding: 16px; }
}

@media (max-width: 680px) {
    .public-header {
        width: calc(100% - 24px);
        padding: 18px 0 12px;
    }

    .public-header nav a {
        font-size: 0.92rem;
    }

    .container,
    .alert {
        width: calc(100% - 24px);
    }

    .form-card {
        padding: 34px 18px 42px;
    }

    .form-intro {
        margin-bottom: 30px;
    }

    .form-intro h2 {
        font-size: clamp(2.3rem, 12vw, 3.4rem);
    }

    .form-intro p { line-height: 1.45; }

    input, textarea, select {
        padding: 18px 16px;
        font-size: 1rem;
    }

    .button-landing {
        width: 100%;
    }

    .step-chip {
        gap: 12px;
        padding: 12px 14px;
    }

    .password-field input {
        padding-right: 16px;
    }

    .password-toggle {
        position: static;
        transform: none;
        width: 100%;
        margin-top: 10px;
    }
}
