/* ============================================
   style.css - استایل‌های اصلی سیستم مدیریت مدارک
   ============================================ */

/* ============================================
   متغیرهای تم روشن (پیش‌فرض)
   ============================================ */
:root,
[data-theme="light"] {
    /* رنگ‌های اصلی برند */
    --primary-color: #6C5CE7;
    --primary-dark: #5A4BD1;
    --secondary-color: #00CEC9;
    --gold-color: #d4a017;
    
    /* گرادیان‌ها */
    --primary-gradient: linear-gradient(135deg, #6C5CE7, #a29bfe);
    --secondary-gradient: linear-gradient(135deg, #00CEC9, #55efc4);
    --gold-gradient: linear-gradient(135deg, #d4a017, #f59e0b);
    
    /* پس‌زمینه */
    --bg-dark: #f5f7fa;
    --bg-body: #eef1f6;
    --bg-card: #ffffff;
    --bg-card-hover: #fafbfc;
    --bg-body-gradient: linear-gradient(135deg, #eef1f6 0%, #f5f7fa 50%, #eef1f6 100%);
    
    /* شیشه‌ای */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.08);
    
    /* حاشیه */
    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-strong: rgba(0, 0, 0, 0.15);
    
    /* متن */
    --text-primary: #1a1a2e;
    --text-secondary: rgba(0, 0, 0, 0.65);
    --text-muted: rgba(0, 0, 0, 0.4);
    
    /* سایه */
    --shadow-glow: 0 8px 40px rgba(108, 92, 231, 0.08);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.08);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    
    /* ورودی‌ها */
    --input-bg: #f8f9fb;
    --input-bg-focus: #ffffff;
    
    /* جدول */
    --table-header-bg: #f5f7fa;
    --table-hover-bg: rgba(108, 92, 231, 0.04);
    
    /* مودال */
    --modal-bg: #ffffff;
    --modal-backdrop: rgba(0, 0, 0, 0.4);
    
    /* هدر */
    --header-bg: rgba(255, 255, 255, 0.9);
    --header-border: rgba(0, 0, 0, 0.06);
    
    /* فوتر */
    --footer-color: rgba(0, 0, 0, 0.35);
    
    /* رنگ متن روی گرادیان */
    --text-on-gradient: #ffffff;
}

/* ============================================
   متغیرهای تم تاریک
   ============================================ */
[data-theme="dark"] {
    --primary-color: #6C5CE7;
    --primary-dark: #5A4BD1;
    --secondary-color: #00CEC9;
    --gold-color: #FDCB6E;
    
    --primary-gradient: linear-gradient(135deg, #6C5CE7, #a29bfe);
    --secondary-gradient: linear-gradient(135deg, #00CEC9, #55efc4);
    --gold-gradient: linear-gradient(135deg, #FDCB6E, #fdcb6e);
    
    --bg-dark: #0a0a1a;
    --bg-body: #0a0a1a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --bg-body-gradient: radial-gradient(ellipse at 50% 0%, #1a1a3e 0%, #0a0a1a 70%, #050510 100%);
    
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.06);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-strong: rgba(255, 255, 255, 0.15);
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.3);
    
    --shadow-glow: 0 8px 40px rgba(108, 92, 231, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.2);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    
    --input-bg: rgba(255, 255, 255, 0.04);
    --input-bg-focus: rgba(255, 255, 255, 0.06);
    
    --table-header-bg: rgba(255, 255, 255, 0.02);
    --table-hover-bg: rgba(255, 255, 255, 0.03);
    
    --modal-bg: rgba(10, 10, 26, 0.98);
    --modal-backdrop: rgba(10, 10, 26, 0.7);
    
    --header-bg: rgba(10, 10, 26, 0.85);
    --header-border: rgba(255, 255, 255, 0.06);
    
    --footer-color: rgba(255, 255, 255, 0.15);
    
    --text-on-gradient: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: inherit;
}

body {
    font-family: 'Vazirmatn', 'IRANSans', 'IRANSansWeb', 'Tahoma', 'Arial', 'sans-serif';
    background: var(--bg-body-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    direction: rtl;
    transition: background 0.4s ease, color 0.4s ease;
}

/* برای تمام عناصر فرم */
input, select, textarea, button, .form-control, .btn-glass {
    font-family: 'Vazirmatn', 'IRANSans', 'IRANSansWeb', 'Tahoma', 'Arial', 'sans-serif';
}

/* ستاره‌های تزئینی - فقط در تم تاریک */
[data-theme="dark"] body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(1px 1px at 10% 20%, rgba(108, 92, 231, 0.08), transparent),
        radial-gradient(1px 1px at 30% 60%, rgba(0, 206, 201, 0.06), transparent),
        radial-gradient(1px 1px at 50% 10%, rgba(253, 203, 110, 0.05), transparent),
        radial-gradient(1px 1px at 70% 80%, rgba(108, 92, 231, 0.07), transparent),
        radial-gradient(1px 1px at 90% 40%, rgba(0, 206, 201, 0.05), transparent);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   هدر اصلی
   ============================================ */
.main-header {
    position: sticky;
    top: 0;
    background: var(--header-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-bottom: 1px solid var(--header-border);
    padding: 12px 0;
    z-index: 100;
    margin-bottom: 20px;
    transition: background 0.4s ease, border-color 0.4s ease;
}

.main-header .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.main-header .logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.main-header .logo-icon {
    width: 46px;
    height: 46px;
    background: var(--primary-gradient);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
    flex-shrink: 0;
}

.main-header .logo h1 {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
    line-height: 1.2;
}

[data-theme="dark"] .main-header .logo h1 {
    background: linear-gradient(135deg, #fff, #a29bfe);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-header .logo small {
    display: block;
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 300;
}

.main-header .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============================================
   دکمه سوییچ تم
   ============================================ */
.btn-theme-toggle {
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0 !important;
    justify-content: center;
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-theme-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-strong);
    transform: translateY(-2px);
}

.btn-theme-toggle .theme-icon-light,
.btn-theme-toggle .theme-icon-dark {
    position: absolute;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-theme-toggle .theme-icon-light {
    color: #FDCB6E;
    transform: rotate(0deg) scale(1);
    opacity: 1;
}

.btn-theme-toggle .theme-icon-dark {
    color: #a29bfe;
    transform: rotate(90deg) scale(0.5);
    opacity: 0;
}

[data-theme="dark"] .btn-theme-toggle .theme-icon-light {
    transform: rotate(-90deg) scale(0.5);
    opacity: 0;
}

[data-theme="dark"] .btn-theme-toggle .theme-icon-dark {
    transform: rotate(0deg) scale(1);
    opacity: 1;
}

.btn-theme-toggle.theme-toggling {
    animation: themeSpin 0.5s ease;
}

@keyframes themeSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   دکمه‌ها
   ============================================ */
.btn-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 14px;
    padding: 10px 20px;
    font-family: 'Vazirmatn', 'IRANSans', 'IRANSansWeb', 'Tahoma', 'Arial', 'sans-serif';
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-glass:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-glass:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary-glass {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(0, 206, 201, 0.1));
    border-color: rgba(108, 92, 231, 0.2);
    color: var(--text-primary);
}

[data-theme="light"] .btn-primary-glass {
    color: var(--primary-dark);
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.12), rgba(0, 206, 201, 0.06));
}

.btn-primary-glass:hover {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.3), rgba(0, 206, 201, 0.2));
    border-color: rgba(108, 92, 231, 0.3);
}

.btn-gold-glass {
    background: linear-gradient(135deg, rgba(212, 160, 23, 0.15), rgba(212, 160, 23, 0.05));
    border-color: rgba(212, 160, 23, 0.2);
    color: var(--gold-color);
}

.btn-gold-glass:hover {
    background: linear-gradient(135deg, rgba(212, 160, 23, 0.25), rgba(212, 160, 23, 0.1));
    border-color: rgba(212, 160, 23, 0.3);
}

.btn-success-glass {
    background: linear-gradient(135deg, rgba(0, 206, 201, 0.15), rgba(0, 206, 201, 0.05));
    border-color: rgba(0, 206, 201, 0.15);
    color: var(--secondary-color);
}

.btn-success-glass:hover {
    background: linear-gradient(135deg, rgba(0, 206, 201, 0.25), rgba(0, 206, 201, 0.1));
    border-color: rgba(0, 206, 201, 0.25);
}

.btn-danger-glass {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(255, 107, 107, 0.05));
    border-color: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
}

.btn-danger-glass:hover {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.25), rgba(255, 107, 107, 0.1));
    border-color: rgba(255, 107, 107, 0.25);
}

/* ============================================
   کارت‌های شیشه‌ای
   ============================================ */
.glass-card {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 28px !important;
    box-shadow: var(--shadow-card) !important;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-color-strong) !important;
}

.glass-card .card-glow {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 150%;
    height: 150%;
    background: radial-gradient(ellipse at 50% 50%, rgba(108, 92, 231, 0.03), transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.glass-card:hover .card-glow {
    opacity: 1;
}

.glass-card .card-header-custom {
    padding: 20px 28px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.glass-card .card-header-custom .title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 14px;
}

.glass-card .card-header-custom .title .title-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.glass-card .card-header-custom .title .title-icon i {
    color: #fff !important;
}

.glass-card .card-body-custom {
    padding: 28px;
}

/* ============================================
   بخش جستجو
   ============================================ */
.search-section {
    max-width: 500px;
    margin: 0 auto;
}

.search-section .input-group-custom {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.search-section .input-group-custom .form-control {
    flex: 1;
    min-width: 180px;
    background: var(--input-bg) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 14px !important;
    padding: 12px 20px;
    font-size: 1rem;
    font-family: 'Vazirmatn', 'IRANSans', 'IRANSansWeb', 'Tahoma', 'Arial', 'sans-serif';
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 2px;
    font-weight: 600;
}

.search-section .input-group-custom .form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1) !important;
    background: var(--input-bg-focus) !important;
}

.search-section .input-group-custom .form-control::placeholder {
    color: var(--text-muted);
    font-weight: 300;
    letter-spacing: 0;
}

.search-section .btn-search {
    padding: 12px 32px;
    border-radius: 14px;
    background: var(--primary-gradient);
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: 'Vazirmatn', 'IRANSans', 'IRANSansWeb', 'Tahoma', 'Arial', 'sans-serif';
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.search-section .btn-search:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(108, 92, 231, 0.3);
}

.search-section .btn-search:active {
    transform: scale(0.96);
}

.search-section .btn-search.verify {
    background: var(--secondary-gradient);
}

.search-section .btn-search.verify:hover {
    box-shadow: 0 8px 30px rgba(0, 206, 201, 0.3);
}

/* ============================================
   اطلاعات شخص (person-card در index.php)
   ============================================ */
.person-card {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.08), rgba(0, 206, 201, 0.04));
    border: 1px solid rgba(108, 92, 231, 0.1);
    border-radius: 16px;
    padding: 16px 20px;
    margin: 12px 0 8px;
}

[data-theme="dark"] .person-card {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.08), rgba(0, 206, 201, 0.04));
    border-color: rgba(108, 92, 231, 0.1);
}

.person-card .person-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.person-card .person-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.person-card .person-item .icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
}

.person-card .person-item .icon-box.purple { background: var(--primary-gradient); }
.person-card .person-item .icon-box.gold { background: var(--gold-gradient); color: #1a1a3e; }
.person-card .person-item .icon-box.teal { background: var(--secondary-gradient); }

.person-card .person-item .info { 
    display: flex; 
    flex-direction: column; 
    align-items: flex-start; 
}

.person-card .person-item .info .label {
    font-size: 0.55rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: right;
    width: 100%;
}

.person-card .person-item .info .value {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    text-align: right;
    width: 100%;
}

.person-card .person-item .info .value.gold { 
    color: var(--gold-color); 
}

/* ============================================
   اطلاعات شخص (نسخه قدیمی - person-info-card)
   ============================================ */
.person-info-card {
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 18px 24px;
    margin: 20px 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.person-info-card .info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.person-info-card .info-item .label {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.person-info-card .info-item .value {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.person-info-card .info-item .value.highlight {
    color: var(--gold-color);
}

/* ============================================
   کارت‌های مدارک
   ============================================ */
.documents-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 12px;
}

.doc-item {
    background: linear-gradient(145deg, var(--glass-bg), var(--bg-card-hover));
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 18px 22px;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    opacity: 0;
    animation: docCardFadeIn 0.6s ease forwards;
}

[data-theme="dark"] .doc-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.005));
}

@keyframes docCardFadeIn {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.doc-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 0 4px 4px 0;
    opacity: 0.4;
    transition: all 0.4s ease;
}

.doc-item:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: var(--border-color-strong);
    box-shadow: 0 12px 50px rgba(108, 92, 231, 0.15);
}

.doc-item:hover::before {
    opacity: 1;
    width: 5px;
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.3);
}

.doc-item .doc-glow {
    position: absolute;
    top: -30%;
    left: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(108, 92, 231, 0.03), transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.doc-item:hover .doc-glow {
    opacity: 1;
}

.doc-item .doc-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.doc-item .doc-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    line-height: 1.4;
}

.doc-item .doc-title i {
    color: var(--primary-color);
    margin-left: 4px;
    font-size: 0.9rem;
}

.doc-item .doc-badge {
    background: rgba(212, 160, 23, 0.08);
    border: 1px solid rgba(212, 160, 23, 0.12);
    color: var(--gold-color);
    padding: 3px 14px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.doc-item .doc-badge i {
    font-size: 0.6rem;
    opacity: 0.7;
}

.doc-item .doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 6px 18px;
    padding: 10px 14px;
    background: var(--bg-card-hover);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin: 8px 0 10px;
}

.doc-item .doc-grid .field {
    display: flex;
    flex-direction: column;
    gap: 1px;
    text-align: right;
    align-items: flex-start;
}

.doc-item .doc-grid .field .label {
    font-size: 0.5rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: right;
    width: 100%;
}

.doc-item .doc-grid .field .value {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 500;
    font-family: 'Vazirmatn', sans-serif;
    text-align: right;
    width: 100%;
}

.doc-item .doc-grid .field .value.gold {
    color: var(--gold-color);
    font-family: monospace;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
    direction: ltr;
    text-align: right;
}

.doc-item .doc-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.doc-item .doc-actions .btn-action {
    padding: 6px 16px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-family: 'Vazirmatn', 'IRANSans', 'IRANSansWeb', 'Tahoma', 'Arial', 'sans-serif';
    border: 1px solid var(--glass-border);
    background: var(--bg-card-hover);
    color: var(--text-secondary);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
    justify-content: center;
    min-width: 70px;
}

.doc-item .doc-actions .btn-action.view {
    background: rgba(108, 92, 231, 0.06);
    border-color: rgba(108, 92, 231, 0.1);
    color: var(--primary-color);
}

.doc-item .doc-actions .btn-action.view:hover {
    background: rgba(108, 92, 231, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(108, 92, 231, 0.15);
}

.doc-item .doc-actions .btn-action.download {
    background: rgba(0, 206, 201, 0.06);
    border-color: rgba(0, 206, 201, 0.1);
    color: var(--secondary-color);
}

.doc-item .doc-actions .btn-action.download:hover {
    background: rgba(0, 206, 201, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 206, 201, 0.15);
}

.doc-item .doc-actions .btn-action:active {
    transform: scale(0.95);
}

/* ============================================
   وضعیت خالی
   ============================================ */
.empty-state {
    text-align: center;
    padding: 30px 20px;
}

.empty-state .empty-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    opacity: 0.4;
}

.empty-state .empty-title {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.empty-state .empty-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   بررسی اصالت
   ============================================ */
.verify-result-card {
    background: linear-gradient(145deg, rgba(0, 206, 201, 0.04), rgba(0, 206, 201, 0.01));
    border: 1px solid rgba(0, 206, 201, 0.1);
    border-radius: 18px;
    padding: 18px 22px;
    margin-top: 12px;
}

.verify-result-card .status-bar {
    text-align: center;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 14px;
}

.verify-result-card .status-bar.valid {
    color: #00CEC9;
    background: rgba(0, 206, 201, 0.08);
}

.verify-result-card .status-bar.invalid {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.08);
}

.verify-result-card .verify-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px 20px;
    padding: 12px 16px;
    background: var(--bg-card-hover);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.verify-result-card .verify-grid .field {
    display: flex;
    flex-direction: column;
    gap: 1px;
    text-align: right;
    align-items: flex-start;
}

.verify-result-card .verify-grid .field .label {
    font-size: 0.5rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: right;
    width: 100%;
}

.verify-result-card .verify-grid .field .value {
    font-size: 0.82rem;
    color: var(--text-primary);
    font-weight: 500;
    font-family: 'Vazirmatn', sans-serif;
    text-align: right;
    width: 100%;
}

.verify-result-card .verify-grid .field .value.gold {
    color: var(--gold-color);
    font-family: monospace;
    letter-spacing: 1px;
    font-size: 0.85rem;
    direction: ltr;
    text-align: right;
}

.verify-result-card .verify-code-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.verify-result-card .verify-code-row .code-info {
    text-align: center;
}

.verify-result-card .verify-code-row .code-label {
    font-size: 0.55rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.verify-result-card .verify-code-row .code-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold-color);
    font-family: monospace;
    letter-spacing: 2px;
    direction: ltr;
}

.verify-result-card .verify-code-row .qr-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.verify-result-card .verify-code-row .qr-container img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 4px;
    background: #fff;
}

#verificationResult .person-info-card {
    background: rgba(0, 206, 201, 0.03);
    border-color: rgba(0, 206, 201, 0.1);
}

#verificationResult .info-item .value.highlight {
    color: var(--gold-color);
    font-size: 1.1rem;
}

#verificationResult .info-item .value {
    color: var(--text-primary);
}

/* ============================================
   مودال‌ها
   ============================================ */
.modal-content {
    background: var(--modal-bg) !important;
    backdrop-filter: blur(30px) !important;
    -webkit-backdrop-filter: blur(30px) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 24px !important;
    color: var(--text-primary) !important;
}

.modal-header {
    border-bottom: 1px solid var(--glass-border) !important;
    padding: 16px 24px !important;
}

.modal-header .modal-title {
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header .modal-title i {
    color: var(--primary-color);
}

.modal-header .btn-close {
    filter: invert(0) brightness(0) opacity(0.5);
    transition: all 0.3s ease;
}

[data-theme="dark"] .modal-header .btn-close {
    filter: invert(1) brightness(200%) opacity(0.5);
}

.modal-header .btn-close:hover {
    transform: rotate(90deg);
}

[data-theme="dark"] .modal-header .btn-close:hover {
    filter: invert(1) brightness(200%) opacity(1);
}

.modal-body { padding: 20px 24px !important; }

.modal-footer {
    border-top: 1px solid var(--glass-border) !important;
    padding: 12px 24px !important;
}

/* ============================================
   فرم‌ها
   ============================================ */
.modal-form .form-group {
    margin-bottom: 18px;
}

.modal-form .form-group label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 6px;
}

.modal-form .form-group .form-control {
    background: var(--input-bg) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 14px !important;
    padding: 12px 18px;
    font-family: 'Vazirmatn', 'IRANSans', 'IRANSansWeb', 'Tahoma', 'Arial', 'sans-serif';
    font-size: 0.95rem;
    transition: all 0.3s ease;
    width: 100%;
}

.modal-form .form-group .form-control::placeholder {
    color: var(--text-muted);
}

.modal-form .form-group .form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.08) !important;
    background: var(--input-bg-focus) !important;
}

/* ============================================
   منطقه آپلود
   ============================================ */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    background: var(--bg-card);
}

.drop-zone:hover {
    border-color: rgba(108, 92, 231, 0.3);
    background: var(--bg-card-hover);
}

.drop-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(108, 92, 231, 0.03);
}

.drop-zone .drop-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    opacity: 0.5;
}

.drop-zone .drop-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.drop-zone .drop-sub {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.drop-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.drop-zone .file-info {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background: var(--bg-card-hover);
    border-radius: 12px;
    text-align: center;
}

.drop-zone .file-info.show {
    display: block;
}

.drop-zone .file-info i {
    margin-left: 8px;
}

/* ============================================
   نوتیفیکیشن
   ============================================ */
.toast-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    background: var(--modal-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 24px;
    min-width: 280px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform: translateX(-50%) translateY(-20px) scale(0.95);
    pointer-events: none;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
    pointer-events: auto;
}

.toast-notification .toast-icon {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.toast-notification .toast-icon.success { color: #00CEC9; }
.toast-notification .toast-icon.error { color: #ff6b6b; }
.toast-notification .toast-icon.warning { color: var(--gold-color); }
.toast-notification .toast-icon.info { color: var(--primary-color); }

.toast-notification .toast-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.toast-notification .toast-message {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 2px;
}

/* ============================================
   اسپینر
   ============================================ */
.spinner-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--modal-backdrop);
    backdrop-filter: blur(10px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}

.spinner-overlay.active {
    display: flex;
}

.spinner-overlay .spinner-ring {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
    animation: spinnerSpin 0.8s linear infinite;
}

@keyframes spinnerSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-overlay .spinner-text {
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* ============================================
   فوتر
   ============================================ */
.main-footer {
    text-align: center;
    padding: 16px 15px;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--footer-color);
    font-size: 0.8rem;
}

.main-footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
    opacity: 0.7;
}

.main-footer a:hover {
    color: var(--primary-color);
    opacity: 1;
}

/* ============================================
   هشدارها
   ============================================ */
.alert {
    border-radius: 14px;
    padding: 12px 18px;
    border: none;
    margin-top: 12px;
}

.alert-success {
    background: rgba(0, 206, 201, 0.1);
    color: var(--secondary-color);
    border: 1px solid rgba(0, 206, 201, 0.15);
}

.alert-danger {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.15);
}

.alert-warning {
    background: rgba(253, 203, 110, 0.1);
    color: var(--gold-color);
    border: 1px solid rgba(253, 203, 110, 0.15);
}

.alert-sm {
    padding: 8px 14px;
    font-size: 0.85rem;
}

.alert i {
    margin-left: 8px;
}

/* ============================================
   بخش آپلود
   ============================================ */
.upload-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.upload-section .drop-zone {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-section .drop-zone .drop-icon {
    font-size: 2rem;
}

.upload-section .drop-zone .file-info.show {
    display: block;
}

.upload-btn-wrapper {
    margin-top: 20px;
    text-align: center;
}

.upload-btn-wrapper .btn {
    padding: 14px 40px;
    font-size: 1.05rem;
}

.admin-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.admin-actions .btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

/* ============================================
   تنظیمات صفحه index - عدم اسکرول
   ============================================ */

/* ===== کامپیوتر ===== */
@media (min-width: 992px) {
    .glass-card {
        max-height: 480px;
        display: flex;
        flex-direction: column;
    }
    
    .glass-card .card-body-custom {
        flex: 1;
        overflow-y: auto;
        padding: 16px 20px !important;
    }
    
    .glass-card .card-body-custom::-webkit-scrollbar {
        width: 3px;
    }
    
    .glass-card .card-body-custom::-webkit-scrollbar-thumb {
        background: rgba(108, 92, 231, 0.3);
        border-radius: 10px;
    }
    
    .glass-card .card-body-custom::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .col-lg-6 .glass-card {
        max-height: 480px;
    }
    
    .glass-card .card-header-custom {
        padding: 10px 18px !important;
    }
    
    .glass-card .card-header-custom .title {
        font-size: 0.9rem !important;
    }
    
    .glass-card .card-header-custom .title .title-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.85rem !important;
    }
    
    .container {
        padding-top: 0;
    }
    
    .main-header {
        padding: 10px 0;
        margin-bottom: 16px;
    }
    
    .main-header .logo h1 {
        font-size: 1.1rem;
    }
    
    .main-header .logo-icon {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
    
    .main-header .logo small {
        font-size: 0.55rem;
    }
    
    .main-footer {
        padding: 12px 15px;
        margin-top: 16px;
    }
    
    .row.g-3 {
        --bs-gutter-y: 12px;
    }
}

/* ===== موبایل ===== */
@media (max-width: 991px) {
    .glass-card {
        max-height: 500px;
        display: flex;
        flex-direction: column;
    }
    
    .glass-card .card-body-custom {
        flex: 1;
        overflow-y: auto;
        padding: 14px 16px !important;
    }
    
    .glass-card .card-body-custom::-webkit-scrollbar {
        width: 3px;
    }
    
    .glass-card .card-body-custom::-webkit-scrollbar-thumb {
        background: rgba(108, 92, 231, 0.3);
        border-radius: 10px;
    }
    
    .glass-card .card-body-custom::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .col-lg-6 .glass-card {
        max-height: 500px;
    }
    
    .glass-card .card-header-custom {
        padding: 10px 16px !important;
    }
    
    .glass-card .card-header-custom .title {
        font-size: 0.85rem !important;
    }
    
    .glass-card .card-header-custom .title .title-icon {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.8rem !important;
    }
    
    .container {
        padding-top: 0;
    }
    
    .main-header {
        padding: 10px 0;
        margin-bottom: 12px;
    }
    
    .main-header .logo h1 {
        font-size: 0.9rem;
    }
    
    .main-header .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .main-header .logo small {
        font-size: 0.5rem;
    }
    
    .main-footer {
        padding: 10px 15px;
        margin-top: 12px;
    }
    
    .row.g-3 {
        --bs-gutter-y: 12px;
    }
}

/* ===== موبایل کوچک ===== */
@media (max-width: 480px) {
    .glass-card {
        max-height: 440px;
    }
    
    .col-lg-6 .glass-card {
        max-height: 440px;
    }
    
    .glass-card .card-body-custom {
        padding: 10px 12px !important;
    }
    
    .glass-card .card-header-custom {
        padding: 8px 12px !important;
    }
    
    .glass-card .card-header-custom .title {
        font-size: 0.8rem !important;
    }
    
    .glass-card .card-header-custom .title .title-icon {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.7rem !important;
    }
    
    .search-section .input-group-custom .form-control {
        font-size: 0.85rem !important;
        padding: 8px 12px !important;
    }
    
    .search-section .btn-search {
        font-size: 0.8rem !important;
        padding: 8px 16px !important;
    }
    
    .person-card .person-row { 
        flex-direction: column; 
        align-items: stretch; 
        gap: 8px; 
    }
    
    .person-card .person-item { 
        justify-content: flex-start; 
    }
    
    .person-info-card {
        padding: 8px 12px !important;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .person-info-card .info-item {
        justify-content: center;
    }
    
    .person-info-card .info-item .label {
        font-size: 0.6rem !important;
    }
    
    .person-info-card .info-item .value {
        font-size: 0.7rem !important;
    }
    
    .empty-state {
        padding: 12px 8px !important;
    }
    
    .empty-state .empty-icon {
        font-size: 2rem !important;
    }
    
    .empty-state .empty-title {
        font-size: 0.8rem !important;
    }
    
    .empty-state .empty-desc {
        font-size: 0.65rem !important;
    }
    
    .doc-item {
        padding: 10px 14px !important;
    }
    
    .doc-item .doc-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .doc-item .doc-title {
        font-size: 0.8rem !important;
    }
    
    .doc-item .doc-badge {
        font-size: 0.6rem !important;
        padding: 2px 10px !important;
        align-self: flex-start;
    }
    
    .doc-item .doc-grid { 
        grid-template-columns: 1fr; 
    }
    
    .doc-item .doc-actions {
        justify-content: center;
    }
    
    .doc-item .doc-actions .btn-action {
        font-size: 0.65rem !important;
        padding: 4px 10px !important;
        min-width: 50px !important;
    }
    
    .verify-result-card .verify-grid { 
        grid-template-columns: 1fr; 
    }
    
    .verify-result-card .verify-code-row { 
        flex-direction: column; 
        gap: 10px; 
    }
    
    .modal-dialog {
        margin: 8px;
    }
    
    .modal-header {
        padding: 10px 14px !important;
    }
    
    .modal-body {
        padding: 12px 14px !important;
    }
    
    .modal-footer {
        padding: 8px 14px !important;
    }
}

/* ============================================
   استایل‌های راهنما
   ============================================ */
.glass-card .card-body-custom p {
    color: var(--text-secondary) !important;
    font-weight: 400;
    line-height: 1.5;
}

.glass-card .card-body-custom p i {
    opacity: 0.9;
}

.empty-state .empty-title {
    color: var(--text-secondary) !important;
}

.empty-state .empty-desc {
    color: var(--text-muted) !important;
}

.person-info-card .info-item .label {
    color: var(--text-secondary) !important;
}

.person-info-card .info-item .value {
    color: var(--text-primary) !important;
}

.person-info-card .info-item .value.highlight {
    color: var(--gold-color) !important;
}

.glass-card .card-body-custom p i.fa-info-circle {
    font-size: 0.85rem;
}

/* ============================================
   ریسپانسیو - هدر
   ============================================ */
@media (max-width: 768px) {
    .main-header .header-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 8px;
    }
    
    .main-header .logo {
        flex: 1;
        min-width: 0;
        gap: 8px;
    }
    
    .main-header .logo h1 {
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .main-header .logo small {
        font-size: 0.55rem;
        display: none;
    }
    
    .main-header .logo-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
        border-radius: 10px;
        flex-shrink: 0;
    }
    
    .main-header .header-actions {
        flex: 0 0 auto;
    }
    
    .btn-theme-toggle {
        width: 38px;
        height: 38px;
    }
    
    .documents-list {
        grid-template-columns: 1fr;
    }
    
    .doc-item .doc-grid { 
        grid-template-columns: 1fr 1fr; 
    }
    
    .verify-result-card .verify-grid { 
        grid-template-columns: 1fr 1fr; 
    }
}

@media (max-width: 480px) {
    .main-header .logo h1 {
        font-size: 0.75rem;
    }
    
    .main-header .logo-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
        border-radius: 8px;
    }
    
    .btn-theme-toggle {
        width: 34px;
        height: 34px;
    }
    
    .btn-theme-toggle i {
        font-size: 0.9rem;
    }
}

@media (max-width: 992px) {
    .glass-card .card-header-custom { padding: 16px 20px; }
    .glass-card .card-body-custom { padding: 20px; }
    .documents-list { grid-template-columns: 1fr; }
    .upload-section { grid-template-columns: 1fr; }
    .col-lg-6 .glass-card { height: auto !important; }
}

/* ============================================
   اسکرول بار
   ============================================ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg-card); border-radius: 10px; }
::-webkit-scrollbar-thumb { 
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
}

::selection {
    background: rgba(108, 92, 231, 0.2);
    color: var(--text-primary);
}

/* ============================================
   انیمیشن‌ها
   ============================================ */
.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.delay-1 { animation-delay: 0.05s; opacity: 0; }
.delay-2 { animation-delay: 0.12s; opacity: 0; }
.delay-3 { animation-delay: 0.19s; opacity: 0; }