:root {
    --primary: #1a56db;
    --primary-dark: #123a99;
    --primary-light: #e8f0fe;
    --accent: #f5a623;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --bg-soft: #f7f9fc;
    --border: #e5e7eb;
    --success: #16a34a;
    --danger: #dc2626;
    --radius: 14px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background: var(--bg-soft);
    color: var(--text-dark);
    margin: 0;
    direction: rtl;
}

a { text-decoration: none; }

.container-narrow {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================== Hero Banner ===================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
    padding: 40px 20px;

    /* پس‌زمینه‌ی بنر: اگر فایل تصویر را در assets/images/hero-banner.jpg قرار دهید،
       به‌صورت خودکار به‌عنوان بک‌گراند تمام‌صفحه نمایش داده می‌شود.
       تا وقتی تصویر واقعی اضافه نشده، یک گرادیانت آبی به‌عنوان جایگزین دیده می‌شود. */
    background:
        linear-gradient(180deg, rgba(10,25,60,.55) 0%, rgba(10,25,60,.65) 100%),
        url('assets/images/hero-banner.jpg') center / cover no-repeat;
    background-color: var(--primary-dark);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 25%, rgba(255,255,255,.10) 0, transparent 35%),
        radial-gradient(circle at 85% 15%, rgba(255,255,255,.08) 0, transparent 40%),
        radial-gradient(circle at 75% 85%, rgba(255,255,255,.08) 0, transparent 40%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 800;
    line-height: 1.6;
    margin: 0;
    text-shadow: 0 2px 18px rgba(0,0,0,.35);
}

.hero-wave {
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    line-height: 0;
    z-index: 3;
}

@media (max-width: 700px) {
    .hero { min-height: 70vh; }
}

/* ===================== Form Card ===================== */
.form-wrap {
    margin: -70px auto 60px;
    position: relative;
    z-index: 5;
}

.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 15px 45px rgba(15, 35, 95, .10);
    padding: 34px 30px;
    margin-bottom: 26px;
}

.card h2 {
    font-size: 19px;
    margin: 0 0 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.card h2 .step-num {
    width: 28px; height: 28px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 20px;
}
@media (max-width: 700px) {
    .form-grid { grid-template-columns: 1fr; }
}
.form-grid .full { grid-column: 1 / -1; }

.field label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 7px;
    color: #374151;
}
.field .hint { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; }

.field input[type=text],
.field input[type=tel],
.field input[type=number],
.field select,
.field textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    background: #fbfcfe;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, .12);
    background: #fff;
}

.file-field {
    border: 1.5px dashed var(--border);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    background: #fbfcfe;
    cursor: pointer;
    transition: border-color .15s ease;
    position: relative;
}
.file-field:hover { border-color: var(--primary); }
.file-field input[type=file] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.file-field .file-icon { font-size: 22px; margin-bottom: 6px; }
.file-field .file-name { font-size: 12px; color: var(--primary); margin-top: 6px; word-break: break-all; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 13px 26px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, transform .1s ease;
    font-family: inherit;
}
.btn:hover { background: var(--primary-dark); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-outline {
    background: #fff; color: var(--primary); border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }
.btn-secondary { background: #eef2f7; color: #374151; }
.btn-secondary:hover { background: #e2e8f0; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b91c1c; }

.otp-box {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.otp-box input {
    max-width: 160px;
    letter-spacing: 6px;
    font-size: 20px;
    text-align: center;
    font-weight: 700;
}

.alert {
    padding: 13px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    margin-bottom: 18px;
}
.alert-success { background: #ecfdf3; color: #067647; border: 1px solid #abefc6; }
.alert-error   { background: #fef3f2; color: #b42318; border: 1px solid #fda29b; }
.alert-info    { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #b7d0fb; }

.footer-note {
    text-align: center;
    font-size: 12.5px;
    color: var(--text-muted);
    padding: 30px 0 50px;
}

/* ===================== Admin ===================== */
.admin-shell { min-height: 100vh; display: flex; }
.admin-sidebar {
    width: 230px;
    background: #111827;
    color: #d1d5db;
    padding: 24px 18px;
    flex-shrink: 0;
}
.admin-sidebar h3 { color: #fff; font-size: 16px; margin: 0 0 26px; }
.admin-sidebar a {
    display: flex; align-items: center; gap: 8px;
    color: #d1d5db; padding: 10px 12px; border-radius: 8px; font-size: 14px; margin-bottom: 4px;
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: #1f2937; color: #fff; }
.admin-main { flex: 1; padding: 28px 32px; }

.topbar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.topbar h1 { font-size: 21px; margin: 0; }

.table-wrap {
    background: #fff; border-radius: var(--radius); overflow: hidden;
    box-shadow: 0 4px 18px rgba(15,35,95,.06); border: 1px solid var(--border);
}
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data-table th {
    background: #f9fafb; text-align: right; padding: 13px 14px;
    font-weight: 700; color: #374151; border-bottom: 1px solid var(--border);
}
table.data-table td { padding: 12px 14px; border-bottom: 1px solid #f1f3f6; vertical-align: middle; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover { background: #fafbfe; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 30px; font-size: 11.5px; font-weight: 700; }
.badge-success { background: #ecfdf3; color: #067647; }
.badge-warning { background: #fffaeb; color: #b54708; }

.login-shell {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(120deg, var(--primary-dark), var(--primary));
    padding: 20px;
}
.login-card {
    background: #fff; border-radius: var(--radius); padding: 38px 32px; width: 100%; max-width: 380px;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.login-card h2 { text-align: center; margin-top: 0; }
.login-card .logo { text-align: center; font-size: 30px; margin-bottom: 10px; }

.profile-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 24px;
}
@media (max-width: 700px) { .profile-grid { grid-template-columns: 1fr; } }
.profile-item { background: #fafbfe; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.profile-item .k { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.profile-item .v { font-size: 14.5px; font-weight: 600; }

.doc-images { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.doc-images figure { margin: 0; text-align: center; }
.doc-images img {
    width: 220px; height: 150px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border);
}
.doc-images figcaption { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

@media print {
    .no-print { display: none !important; }
    body { background: #fff; }
    .card, .table-wrap { box-shadow: none; border: 1px solid #ccc; }
}
