:root {
    --brand-navy: #10263f;
    --brand-blue: #1f4e79;
    --brand-blue-soft: #e8f0f8;
    --brand-gold: #b78a3c;
    --surface: #ffffff;
    --surface-muted: #f5f7fa;
    --text-main: #1f2937;
    --text-muted: #5b6b7c;
    --border-soft: #e3e8ef;
    --radius-lg: 1rem;
}

html {
    font-size: 16px;
}

body.site-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    color: var(--text-main);
    font-family: Vazirmatn, Tahoma, "Segoe UI", sans-serif;
    line-height: 1.8;
}

a {
    color: var(--brand-blue);
    text-decoration: none;
}

a:hover {
    color: var(--brand-navy);
    text-decoration: underline;
}

.site-header {
    background: var(--brand-navy);
    color: #fff;
    border-bottom: 4px solid var(--brand-gold);
}

.site-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0;
}

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

.site-organizer {
    color: #d7e3f1;
    font-size: .95rem;
}

.site-main {
    flex: 1 0 auto;
}

.site-footer {
    background: var(--surface-muted);
    border-top: 1px solid var(--border-soft);
    color: var(--text-muted);
    font-size: .9rem;
}

.hero {
    background:
        radial-gradient(circle at 85% 15%, rgba(183, 138, 60, .12), transparent 45%),
        linear-gradient(180deg, var(--brand-blue-soft), #fff 75%);
}

.hero-badge {
    display: inline-block;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    padding: .25rem .85rem;
    font-size: .82rem;
    color: var(--brand-blue);
}

.hero-points li {
    position: relative;
    padding-inline-start: 1.4rem;
    margin-bottom: .45rem;
    color: var(--text-muted);
}

.hero-points li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: .75rem;
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: var(--brand-gold);
}

.contact-card,
.step-card {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--brand-blue);
    color: #fff;
    font-size: .9rem;
}

.btn-primary {
    background-color: var(--brand-blue);
    border-color: var(--brand-blue);
}

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

.error-page {
    max-width: 46rem;
}

.error-code {
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--brand-blue);
    line-height: 1;
}

.guide-text {
    color: var(--text-muted);
}

.accordion-button:not(.collapsed) {
    background: var(--brand-blue-soft);
    color: var(--brand-navy);
}

.table-responsive {
    border-radius: .75rem;
}

:focus-visible {
    outline: 3px solid var(--brand-gold);
    outline-offset: 2px;
}

@media (max-width: 575.98px) {
    html {
        font-size: 15px;
    }

    .error-code {
        font-size: 3.25rem;
    }
}

/* ---------- ورود ---------- */

body.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at 15% 10%, rgba(183, 138, 60, .14), transparent 40%),
        linear-gradient(180deg, var(--brand-blue-soft), #f7f9fc);
    font-family: Vazirmatn, Tahoma, "Segoe UI", sans-serif;
    color: var(--text-main);
}

.auth-wrap {
    width: 100%;
    max-width: 26rem;
}

.auth-card {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.auth-brand {
    background: var(--brand-navy);
    color: #fff;
    padding: 1.4rem 1.5rem;
    border-bottom: 4px solid var(--brand-gold);
    display: flex;
    flex-direction: column;
    gap: .2rem;
    margin-bottom: 1.25rem;
}

.auth-brand-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.auth-brand-sub {
    color: #d7e3f1;
    font-size: .88rem;
}

.auth-footnote {
    text-align: center;
    color: var(--text-muted);
    font-size: .82rem;
    margin-top: 1rem;
}

/* ---------- پنل ---------- */

body.admin-body {
    margin: 0;
    background: var(--surface-muted);
    color: var(--text-main);
    font-family: Vazirmatn, Tahoma, "Segoe UI", sans-serif;
    line-height: 1.8;
}

.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 15.5rem;
    flex: 0 0 15.5rem;
    background: var(--brand-navy);
    color: #fff;
    padding: 1.1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.02rem;
    padding: .35rem .5rem;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
    padding-bottom: .85rem;
}

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

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.admin-nav-link {
    color: #d7e3f1;
    border-radius: .6rem;
    padding: .5rem .75rem;
    font-size: .95rem;
}

.admin-nav-link:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    text-decoration: none;
}

.admin-nav-link.is-active {
    background: var(--brand-blue);
    color: #fff;
    font-weight: 500;
}

.admin-sidebar-foot {
    margin-top: auto;
    color: #b9c9db;
    font-size: .82rem;
    padding: .35rem .75rem;
}

.admin-sidebar-foot:hover {
    color: #fff;
}

.admin-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: #fff;
    border-bottom: 1px solid var(--border-soft);
    padding: .85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: .85rem;
}

.admin-user-name {
    font-weight: 600;
    font-size: .92rem;
    line-height: 1.4;
}

.admin-user-role {
    color: var(--text-muted);
    font-size: .78rem;
    line-height: 1.4;
}

.admin-content {
    padding: 1.25rem;
    flex: 1 1 auto;
}

.stat-card {
    border: 1px solid var(--border-soft);
    border-radius: .85rem;
}

.stat-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--brand-blue);
    line-height: 1.2;
}

.stat-label {
    color: var(--text-muted);
    font-size: .85rem;
}

.table > :not(caption) > * > * {
    padding: .7rem .6rem;
}

.table thead th {
    background: var(--surface-muted);
    color: var(--text-muted);
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .admin-shell {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        flex: 0 0 auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .admin-brand {
        border: 0;
        padding: 0 .25rem;
        margin-inline-end: auto;
    }

    .admin-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .admin-sidebar-foot {
        display: none;
    }

    .admin-content {
        padding: 1rem;
    }
}
