/* ==========================================================================
   ۱. تنظیمات پیکربندی، متغیرهای رنگی و استایل‌های پایه (Global Settings)
   ========================================================================== */
:root {
    --color-bg-workspace: #0f172a;       /* رنگ پس‌زمینه کل صفحه (خاکستری بسیار تیره) */
    --color-phone-body: #1e293b;         /* رنگ بدنه و قاب فیزیکی گوشی */
    --color-app-viewport: #ffffff;       /* پس‌زمینه داخل اپلیکیشن */
    
    /* پالت رنگی بانکداری مدرن */
    --primary-gradient: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #047857 100%);
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    
    /* رنگ‌های متن و المان‌ها */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --color-border: #e2e8f0;
    --color-light-bg: #f8fafc;
    
    /* فواصل و افکت‌ها */
    --border-radius-xl: 24px;
    --border-radius-lg: 16px;
    --border-radius-md: 12px;
    --box-shadow-premium: 0 12px 32px rgba(15, 23, 42, 0.08);
    --box-shadow-card: 0 8px 20px rgba(30, 58, 138, 0.2);
    --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ریست کردن استایل‌های پیش‌فرض مرورگر */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Vazirmatn', sans-serif;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--color-bg-workspace);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    direction: rtl;
    overflow: hidden;
}

/* ==========================================================================
   ۲. شبیه‌ساز فیزیکی قاب تلفن همراه (Smartphone Container)
   ========================================================================== */
.smartphone-wrapper {
    width: 100%;
    max-width: 412px;
    height: 860px;
    background-color: var(--color-app-viewport);
    border: 12px solid var(--color-phone-body);
    border-radius: 48px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* نوار وضعیت بالای گوشی */
.phone-status-bar {
    height: 44px;
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 26px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    user-select: none;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.02);
}

.status-right, .status-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.phone-clock {
    font-feature-settings: "ss01"; /* فعال‌سازی اعداد انگلیسی برای ساعت گوشی */
}

/* محفظه نمایش محتوای داخلی هر صفحه */
.viewport-content {
    flex: 1;
    overflow-y: auto;
    padding: 22px;
    padding-bottom: 95px; /* جلوگیری از رفتن محتوا زیر منوی ناوبری */
    background-color: #fcfdfe;
    position: relative;
}

/* مدیریت نمایش انیمیشنی صفحات */
.app-view {
    display: none;
    animation: slideUpTransition 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-view.active {
    display: block;
}

@keyframes slideUpTransition {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   ۳. استایل‌های کامپوننت‌های عمومی فرم‌ها و دکمه‌ها (UI Elements)
   ========================================================================== */
.input-component-group {
    margin-bottom: 20px;
    width: 100%;
}

.field-context-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.field-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-decorator-icon {
    position: absolute;
    right: 14px;
    font-size: 1.1rem;
    color: var(--text-muted);
    pointer-events: none;
}

.field-input-wrapper input, 
.field-input-wrapper select, 
.field-input-wrapper class,
.form-select-native,
.form-textarea-native {
    width: 100%;
    padding: 14px 16px;
    padding-right: 44px; /* فضا برای آیکون‌های سمت راست */
    border: 1.5px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    background-color: var(--color-light-bg);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

.field-input-wrapper input:focus,
.form-select-native:focus,
.form-textarea-native:focus {
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.form-select-native { padding-right: 16px; cursor: pointer; }
.form-textarea-native { padding-right: 16px; resize: none; }

/* دکمه‌های فرم‌ها */
.action-button {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--border-radius-lg);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.btn-gradient-primary { background: var(--primary-gradient); color: white; }
.btn-gradient-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(15,23,42,0.2); }
.btn-solid-success { background: var(--success-gradient); color: white; }
.btn-link-muted { background: transparent; color: var(--text-secondary); font-size: 0.85rem; text-decoration: underline; margin-top: 10px; }
.btn-outline-primary-custom { border: 2px solid #1e3a8a; color: #1e3a8a; background: transparent; }
.btn-outline-primary-custom:hover { background: rgba(30,58,138,0.04); }

/* ==========================================================================
   ۴. ماژول ۱: صفحه ورود و تایید دو مرحله‌ای (Auth Section)
   ========================================================================== */
.auth-screen-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 25px;
}

.auth-brand-area {
    text-align: center;
    margin-bottom: 35px;
}

.app-logo-box {
    width: 70px;
    height: 70px;
    background: var(--accent-gradient);
    border-radius: var(--border-radius-xl);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.logo-geometric-icon { font-size: 2rem; }
.app-main-title { font-size: 1.6rem; font-weight: 900; color: #0f172a; }
.app-subtitle-text { font-size: 0.85rem; color: var(--text-secondary); margin-top: 6px; }

/* گزینه‌های ورود بیومتریک */
.biometric-login-option { margin: 15px 0 25px; text-align: right; }
.checkbox-custom-container { display: flex; align-items: center; position: relative; cursor: pointer; user-select: none; font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); }
.checkbox-custom-container input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.checkbox-checkmark { height: 20px; width: 20px; background-color: var(--color-border); border-radius: 6px; margin-left: 10px; transition: var(--transition-smooth); }
.checkbox-custom-container input:checked ~ .checkbox-checkmark { background-color: #3b82f6; }

/* باکس تایید هویت چند مرحله‌ای OTP */
.mfa-sub-panel-box { background: #ffffff; padding: 24px; border-radius: var(--border-radius-xl); border: 1.5px dashed #10b981; margin-top: 25px; text-align: center; }
.mfa-title { font-size: 1.1rem; font-weight: 900; color: #047857; }
.mfa-description { font-size: 0.8rem; color: var(--text-secondary); margin-top: 4px; }

.otp-digits-wrapper { display: flex; justify-content: center; gap: 14px; margin: 24px 0; }
.single-otp-field { width: 52px; height: 52px; text-align: center; font-size: 1.6rem; font-weight: 700; border: 2px solid var(--color-border); border-radius: var(--border-radius-md); background: var(--color-light-bg); transition: var(--transition-smooth); }
.single-otp-field:focus { border-color: #10b981; background: white; box-shadow: 0 0 0 4px rgba(16,185,129,0.15); }

.mfa-countdown-timer-box { margin-bottom: 20px; font-size: 0.85rem; font-weight: 700; color: #ef4444; }

/* بخش نمایشی مسدودیت ورود قفل حساب */
.error-slate-container { background: rgba(239, 68, 68, 0.06); border: 1.5px solid #ef4444; padding: 20px; border-radius: var(--border-radius-xl); text-align: center; margin-top: 20px; }
.error-badge-icon { font-size: 2.2rem; margin-bottom: 8px; }
.error-panel-title { font-size: 1.05rem; font-weight: 900; color: #b91c1c; }
.error-panel-body { font-size: 0.85rem; color: var(--text-secondary); margin-top: 4px; }

/* ==========================================================================
   ۵. ماژول ۲: داشبورد اصلی و تراکنش‌ها (User Dashboard Section)
   ========================================================================== */
.user-profile-summary-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.profile-meta-data { display: flex; align-items: center; gap: 12px; }
.profile-avatar-frame { width: 46px; height: 46px; background: #e2e8f0; display: flex; justify-content: center; align-items: center; border-radius: 50%; font-size: 1.4rem; }
.profile-text-strings { display: flex; flex-direction: column; text-align: right; }
.welcome-user-string { font-weight: 700; font-size: 0.95rem; }
.security-level-indicator { font-size: 0.75rem; color: #10b981; font-weight: 500; }

.icon-trigger-btn { background: #f1f5f9; border: none; width: 40px; height: 40px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; position: relative; }
.notification-pulse-dot { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; background-color: #ef4444; border-radius: 50%; border: 2px solid white; }

/* طراحی پیشرفته کارت بانکی داشبورد */
.premium-balance-card-component { background: var(--primary-gradient); color: white; padding: 26px; border-radius: var(--border-radius-xl); box-shadow: var(--box-shadow-card); margin-bottom: 28px; }
.card-brand-row { display: flex; justify-content: space-between; font-size: 0.8rem; opacity: 0.75; font-weight: 500; }
.network-protocol-tag { background: rgba(255,255,255,0.15); padding: 2px 8px; border-radius: 20px; font-size: 0.7rem; }
.main-balance-display-block { margin: 22px 0; text-align: right; }
.balance-title-caption { font-size: 0.85rem; opacity: 0.8; }
.balance-numeric-row { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; }
.balance-value-text { font-size: 2.1rem; font-weight: 900; letter-spacing: -0.5px; }
.currency-unit-label { font-size: 0.9rem; opacity: 0.9; }
.privacy-visibility-toggle { background: transparent; border: none; color: white; font-size: 1.2rem; cursor: pointer; margin-right: auto; }

.balance-breakdown-sub-grid { display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,0.12); padding-top: 16px; font-size: 0.8rem; }
.breakdown-column { display: flex; flex-direction: column; text-align: right; }
.breakdown-label { opacity: 0.65; margin-bottom: 2px; }
.breakdown-value { font-weight: 700; }

/* فیلترها و لیست عمودی تراکنش‌ها */
.component-section-header { margin-bottom: 15px; text-align: right; }
.component-section-header h3 { font-size: 1.1rem; font-weight: 900; color: var(--text-primary); }

.transaction-filtering-control-panel { display: flex; gap: 10px; margin-bottom: 18px; }
.select-field-element { flex: 1; }
.select-field-element select { padding: 10px; font-size: 0.8rem; border-radius: var(--border-radius-md); background: #ffffff; }

.transactions-vertical-stream { display: flex; flex-direction: column; gap: 12px; }
.transaction-record-card { display: flex; align-items: center; padding: 16px; background: #ffffff; border: 1.5px solid var(--color-border); border-radius: var(--border-radius-lg); transition: var(--transition-smooth); }
.transaction-record-card:hover { border-color: #cbd5e1; transform: scale(1.01); }

.record-icon-wrapper { width: 42px; height: 42px; display: flex; justify-content: center; align-items: center; border-radius: var(--border-radius-md); font-size: 1.2rem; margin-left: 14px; }
.income-style { background-color: rgba(16, 185, 129, 0.08); }
.expense-style { background-color: rgba(239, 68, 68, 0.08); }

.record-core-details { flex: 1; display: flex; flex-direction: column; text-align: right; }
.record-title-string { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); }
.record-timestamp-string { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }

.record-financial-sum { font-size: 0.95rem; font-weight: 900; direction: ltr; text-align: left; }
.text-color-success { color: #10b981; }
.text-color-danger { color: #ef4444; }

/* ==========================================================================
   ۶. ماژول ۳: منوی عملیات مالی و لودینگ‌های پردازش (Operations Section)
   ========================================================================== */
.view-title-banner { text-align: right; margin-bottom: 22px; }
.view-title-banner h2 { font-size: 1.3rem; font-weight: 900; color: var(--text-primary); }
.view-title-banner p { font-size: 0.82rem; color: var(--text-secondary); margin-top: 2px; }

.operations-tab-navigation-bar { display: flex; background: #f1f5f9; padding: 4px; border-radius: var(--border-radius-md); margin-bottom: 24px; }
.tab-toggle-button { flex: 1; padding: 10px; background: transparent; border: none; font-size: 0.82rem; font-weight: 700; color: var(--text-secondary); border-radius: 8px; cursor: pointer; transition: var(--transition-smooth); }
.tab-toggle-button.active { background: #ffffff; color: #1e3a8a; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

.realtime-inquiry-label { display: block; font-size: 0.8rem; font-weight: 700; margin-top: 6px; text-align: right; min-height: 18px; }

/* مودال بارگذاری مراحل پردازش تراکنش */
.processing-modal-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.processing-card-box { background: white; padding: 32px 24px; border-radius: var(--border-radius-xl); width: 85%; text-align: center; box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.loading-spinner-element { width: 44px; height: 44px; border: 4px solid var(--color-border); border-top-color: #3b82f6; border-radius: 50%; animation: rotateSpin 0.85s linear infinite; margin: 0 auto 18px; }
@keyframes rotateSpin { to { transform: rotate(360deg); } }

.stage-title { font-size: 1.05rem; font-weight: 900; color: var(--text-primary); }
.stage-desc { font-size: 0.8rem; color: var(--text-secondary); margin-top: 4px; margin-bottom: 22px; }

.audit-trail-steps { border-top: 1px solid var(--color-border); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; text-align: right; }
.audit-step { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); transition: var(--transition-smooth); }
.audit-step.done { color: #10b981; font-weight: 700; }

/* ==========================================================================
   ۷. ماژول ۴: مدیریت کارت‌ها و سوییچ انسداد اضطراری (Cards Section)
   ========================================================================== */
.skia-banking-card-item { width: 100%; height: 210px; border-radius: var(--border-radius-xl); padding: 24px; color: white; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--box-shadow-card); margin-bottom: 22px; position: relative; }
.physical-theme-skin { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); border: 1px solid rgba(255,255,255,0.08); }
.virtual-theme-skin { background: linear-gradient(135deg, #5b21b6 0%, #3b0764 100%); }

.card-skin-top-row { display: flex; justify-content: space-between; align-items: center; }
.chip-graphic-emblem { font-size: 1.6rem; }
.card-pill-status { font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.active-state { background-color: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(52,211,153,0.3); }
.virtual-state { background-color: rgba(255,255,255,0.15); color: #f5f3ff; }

.card-skin-numeric-block { font-size: 1.35rem; font-weight: 700; letter-spacing: 2px; text-align: center; margin: 22px 0; direction: ltr; font-feature-settings: "ss01"; }
.card-skin-footer-block { display: flex; justify-content: space-between; direction: ltr; }
.meta-unit { display: flex; flex-direction: column; text-align: left; }
.meta-unit small { font-size: 0.6rem; opacity: 0.5; font-weight: 500; }
.meta-unit strong { font-size: 0.9rem; font-weight: 700; margin-top: 2px; }

/* باکس کنترل و سوییچ‌های امنیتی کارت */
.security-action-toggle-slate { background-color: #ffffff; border: 1.5px solid var(--color-border); padding: 18px; border-radius: var(--border-radius-xl); display: flex; align-items: center; justify-content: space-between; }
.toggle-text-block { flex: 1; text-align: right; padding-left: 12px; }
.toggle-text-block h4 { font-size: 0.92rem; font-weight: 900; color: var(--text-primary); }
.toggle-subtext { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; line-height: 1.4; }

/* دکمه سوییچ شبیه به سیستم عامل iOS */
.ios-toggle-switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.ios-toggle-switch input { opacity: 0; width: 0; height: 0; }
.ios-switch-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .3s; border-radius: 30px; }
.ios-switch-slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.15); }
.ios-toggle-switch input:checked + .ios-switch-slider { background-color: #ef4444; }
.ios-toggle-switch input:checked + .ios-switch-slider:before { transform: translateX(22px); }

/* ==========================================================================
   ۸. ماژول ۵، ۶ و ۷: اعلان‌ها، تنظیمات پیشرفته و تیکت پشتیبانی
   ========================================================================== */
.notification-filter-chips { display: flex; gap: 8px; margin-bottom: 20px; }
.chip-filter-btn { padding: 8px 16px; border: 1px solid var(--color-border); background: white; border-radius: 20px; font-size: 0.78rem; font-weight: 700; color: var(--text-secondary); cursor: pointer; transition: var(--transition-smooth); }
.chip-filter-btn.active { background-color: var(--text-primary); color: white; border-color: var(--text-primary); }

.notification-feed-stream { display: flex; flex-direction: column; gap: 14px; }
.notification-bubble-item { padding: 16px; border-radius: var(--border-radius-lg); background: white; border: 1.5px solid var(--color-border); border-right: 5px solid; text-align: right; }
.category-finance { border-right-color: #10b981; }
.category-security { border-right-color: #f59e0b; }

.bubble-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.bubble-tag-label { font-size: 0.72rem; font-weight: 900; padding: 2px 8px; border-radius: 4px; }
.label-success { background: rgba(16,185,129,0.1); color: #047857; }
.label-warning { background: rgba(245,158,11,0.1); color: #b45309; }
.label-danger { background: rgba(239,68,68,0.1); color: #b91c1c; }
.bubble-time-stamp { font-size: 0.7rem; color: var(--text-muted); }
.bubble-body-text { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }

/* تنظیمات جدولی سیستم */
.settings-tabular-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.tabular-row-item { display: flex; justify-content: space-between; padding: 16px; border: 1.5px solid var(--color-border); border-radius: var(--border-radius-lg); background: #ffffff; font-size: 0.88rem; font-weight: 500; }
.text-muted-color { color: var(--text-muted); font-weight: 700; }
.text-success-color { color: #10b981; font-weight: 700; }
.cursor-pointer-action { cursor: pointer; transition: var(--transition-smooth); }
.cursor-pointer-action:hover { border-color: #cbd5e1; background: var(--color-light-bg); }

/* سیستم رهگیری تیکت پشتیبانی */
.recent-tickets-tracking-area { margin-top: 22px; text-align: right; }
.sub-area-headline { font-size: 0.95rem; font-weight: 900; color: var(--text-primary); margin-bottom: 12px; }
.ticket-tracking-card { padding: 14px; border: 1.5px solid var(--color-border); border-radius: var(--border-radius-lg); background: #ffffff; }
.ticket-card-header { display: flex; justify-content: space-between; font-size: 0.75rem; margin-bottom: 6px; }
.ticket-id-string { font-weight: 700; color: var(--text-primary); }
.ticket-status-pill { font-size: 0.7rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.status-in-progress { background-color: rgba(245,158,11,0.1); color: #d97706; }
.ticket-subject-summary { font-size: 0.8rem; color: var(--text-secondary); }

/* ==========================================================================
   ۹. بار ناوبری ارگونومیک پایین صفحه (Bottom Navigation Menu)
   ========================================================================== */
.ergonomic-bottom-navigation-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-top: 1.5px solid var(--color-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: 12px; /* ارگونومی ایده آل شست دست */
    z-index: 500;
}

.nav-navigation-item-btn {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.7rem;
    font-weight: 700;
    gap: 4px;
    flex: 1;
}

.nav-item-icon {
    font-size: 1.4rem;
    transition: var(--transition-smooth);
}

.nav-navigation-item-btn.active {
    color: #1e3a8a;
}

.nav-navigation-item-btn.active .nav-item-icon {
    transform: translateY(-2px) scale(1.1);
}

/* کلاس‌های عمومی کاربردی سیستم */
.hidden { display: none !important; }
