/* ========================================
   Reset & Base
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg: #f4f6fb;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --danger: #ef4444;
    --radius: 16px;
}

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding-bottom: 110px;
}

/* ========================================
   هدر
   ======================================== */
.header {
    background: linear-gradient(135deg, var(--primary), #4f8ef7);
    color: #fff;
    padding: 20px 20px 60px;
    border-radius: 0 0 28px 28px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: 800;
}

.greeting {
    margin-top: 18px;
}

.greeting h1 {
    font-size: 17px;
    font-weight: 700;
}

.greeting p {
    font-size: 13px;
    opacity: .85;
    margin-top: 4px;
}

/* ========================================
   کارت وضعیت
   ======================================== */
.status-card {
    background: var(--card);
    margin: -40px 20px 0;
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.10);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-card .info h3 {
    font-size: 14px;
    font-weight: 700;
}

.status-card .info p {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

.badge {
    background: #fef3c7;
    color: #b45309;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
}

.badge.active {
    background: #dcfce7;
    color: #15803d;
}

/* ========================================
   CTA
   ======================================== */
.cta {
    margin: 16px 20px 0;
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.cta .icon {
    font-size: 36px;
}

.cta h2 {
    font-size: 16px;
    font-weight: 800;
    margin-top: 10px;
}

.cta p {
    font-size: 13px;
    color: var(--muted);
    margin-top: 6px;
    line-height: 1.9;
}

.btn-primary {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background .2s;
}

.btn-primary:active {
    background: var(--primary-dark);
}

a.btn-primary {
    color: #fff;
}

/* ========================================
   ویژگی‌ها (چرا بهنیس؟)
   ======================================== */
.section-title {
    margin: 24px 20px 12px;
    font-size: 15px;
    font-weight: 800;
}

.feature {
    background: var(--card);
    margin: 0 20px 12px;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.feature .fi {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 20px;
    background: #eff6ff;
}

.feature h4 {
    font-size: 13.5px;
    font-weight: 700;
}

.feature p {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
}

/* ========================================
   منوی پایین شیشه‌ای و فوق‌العاده مدرن (iOS 26 Floating Glass Bar)
   ======================================== */
.bottom-nav {
    position: fixed;
    bottom: max(14px, env(safe-area-inset-bottom, 14px));
    left: 50%;
    transform: translate3d(-50%, 0, 0);
    width: calc(100% - 28px);
    max-width: 420px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(28px) saturate(210%);
    -webkit-backdrop-filter: blur(28px) saturate(210%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 32px;
    padding: 6px 8px;
    box-shadow: 
        0 20px 40px -12px rgba(15, 23, 42, 0.15),
        0 4px 20px -2px rgba(37, 99, 235, 0.12),
        inset 0 1px 1px rgba(255, 255, 255, 0.95);
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.nav-item {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 4px;
    border-radius: 22px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.nav-item .ni,
.nav-item .ni-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.25s ease;
}

.nav-item .ni-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    display: block;
    transition: all 0.25s ease;
}

.nav-item span.label {
    font-size: 11px;
    line-height: 1.1;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.22s ease;
}

/* Active iOS 26 Glass Pill State */
.nav-item.active {
    color: #2563eb;
    font-weight: 800;
    background: rgba(37, 99, 235, 0.12);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.nav-item.active .ni,
.nav-item.active .ni-icon {
    transform: translateY(-2px) scale(1.15);
    color: #2563eb;
}

.nav-item.active .ni-icon svg {
    stroke-width: 2.4;
    filter: drop-shadow(0 3px 8px rgba(37, 99, 235, 0.4));
}

/* Glowing Indicator Dot under active item */
.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 3px;
    width: 5px;
    height: 5px;
    background-color: #2563eb;
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(37, 99, 235, 0.8);
}

.nav-item:hover {
    color: #1e293b;
    background: rgba(241, 245, 249, 0.6);
}

.nav-item:active {
    transform: scale(0.92);
}

.nav-item.logout {
    color: #ef4444;
}

.nav-item.logout.active {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.15);
}

.nav-item.logout.active::after {
    background-color: #dc2626;
    box-shadow: 0 0 10px 2px rgba(220, 38, 38, 0.8);
}

/* ========================================
   استپر
   ======================================== */
.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 18px 20px 4px;
}

.step {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
}

.step .num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--border);
    color: var(--muted);
    font-size: 12px;
}

.step.done .num {
    background: #dcfce7;
    color: #15803d;
}

.step.current .num {
    background: var(--primary);
    color: #fff;
}

.step.current {
    color: var(--primary);
}

.step-line {
    width: 26px;
    height: 2px;
    background: var(--border);
    border-radius: 2px;
}

.step-line.done {
    background: #86efac;
}

/* ========================================
   بخش ورود (Login Section)
   ======================================== */
.login-section {
    padding: 0 20px;
    margin-top: -30px;
}

.login-section .behnis-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.login-section .behnis-form-group {
    margin-bottom: 16px;
}

.login-section .behnis-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

/* ========================================
   OTP Input
   ======================================== */
.otp-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    direction: ltr;
}

.otp-input {
    width: 55px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: #fafbfe;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.otp-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background: #fff;
}

/* ========================================
   فوتر
   ======================================== */
.footer {
    text-align: center;
    padding: 20px;
    color: #94a3b8;
    font-size: 13px;
    margin-top: 10px;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.footer .copy {
    margin-top: 6px;
    font-size: 11px;
    color: #cbd5e1;
}

/* ========================================
   پیام‌ها (Messages)
   ======================================== */
.behnis-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    display: none;
}

.behnis-message.success {
    display: block;
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.behnis-message.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.behnis-message.info {
    display: block;
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.behnis-error {
    color: #dc2626;
    font-size: 13px;
    display: block;
    margin-top: 4px;
}

.behnis-btn-link {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 14px;
    margin-top: 12px;
    display: block;
    width: 100%;
    text-align: center;
    font-family: inherit;
}

.behnis-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.behnis-btn:hover {
    background: var(--primary-dark);
}

.behnis-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.behnis-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 16px;
    background: #fafbfe;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.behnis-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: #fff;
}

.behnis-loading {
    text-align: center;
    padding: 30px;
    color: var(--muted);
}

.behnis-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: behnis-spin 0.8s linear infinite;
}

@keyframes behnis-spin {
    to {
        transform: rotate(360deg);
    }
}
