/* ═══════════════════════════════════════════════════════════
   CASE DETAILS — ULTRA MODERN EDITION (PART 1 - CSS)
   🎨 Variables, Reset, Base, Animated Background, Loader
   ═══════════════════════════════════════════════════════════ */

/* --- فونت وزیر (Fallback) --- */
/* @import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap'); */
@import url('https://sunrp.ir/assets/Vazirmatn-Medium-D86t5Axy.woff2');

:root {
  /* رنگ‌های اصلی - هماهنگ با cases-manager */
  --void:           #050814;
  --abyss:          #0a0f2c;
  --depths:         #11183f;
  --midnight:       #192357;
  --twilight:       #22307a;

  --gold-base:      #fbbf24;
  --gold-bright:    #fde047;
  --gold-dark:      #d97706;
  --gold-darker:    #b45309;
  --gold-glow:      rgba(251, 191, 36, 0.4);
  --gold-glow-sm:   rgba(251, 191, 36, 0.15);
  --gold-dim:       rgba(251, 191, 36, 0.08);

  /* رنگ‌های کاربردی */
  --c-info:         #60a5fa;
  --c-success:      #10b981;
  --c-warning:      #f59e0b;
  --c-danger:       #ef4444;
  --c-royal:        #c084fc; /* بنفش سلطنتی */

  --text-0: #ffffff;
  --text-1: #f1f5f9;
  --text-2: #cbd5e1;
  --text-3: #94a3b8;
  --text-4: #64748b;
  --text-5: #475569;

  /* Glass Effect */
  --glass-bg:       rgba(15, 21, 53, 0.75);
  --glass-border:   rgba(255, 255, 255, 0.07);
  --gold-border:    rgba(251, 191, 36, 0.3);

  /* Radius */
  --r-xs:   6px;
  --r-sm:   12px;
  --r-md:   16px;
  --r-lg:   24px;
  --r-xl:   32px;
  --r-2xl:  40px;
  --r-3xl:  48px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 4px 16px rgba(0,0,0,0.2);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.3);
  --shadow-lg:  0 16px 48px rgba(0,0,0,0.4);
  --shadow-xl:  0 24px 64px rgba(0,0,0,0.5);
  --shadow-2xl: 0 40px 100px rgba(0,0,0,0.65);
  --shadow-gold: 0 0 30px var(--gold-glow);

  /* Animation Easing */
  --ease:        cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);

  /* Layout */
  --header-height: 88px;
  --sidebar-width: 380px;

  /* Z-Index */
  --z-bg:       0;
  --z-content:  2;
  --z-header:   100;
  --z-sidebar:  5;
  --z-modal:    9999;
  --z-toast:    10000;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Vazirmatn', sans-serif;
  background: var(--void);
  color: var(--text-1);
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* --- اسکرول بار --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--abyss); }
::-webkit-scrollbar-thumb { background: var(--midnight); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-base); }

/* --- پس‌زمینه متحرک (همان نسخه اصلی) --- */
.animated-bg {
  position: fixed; inset: 0; z-index: var(--z-bg); overflow: hidden;
  background: linear-gradient(135deg, var(--void) 0%, var(--abyss) 40%, var(--depths) 100%);
}
.bg-layer {
  position: absolute; border-radius: 50%; filter: blur(140px);
  animation: orbFloat 30s ease-in-out infinite alternate;
  will-change: transform, opacity;
}
.layer-1 {
  width: 1000px; height: 1000px; top: -400px; right: -300px;
  background: radial-gradient(circle, rgba(251,191,36,0.2), transparent 60%);
  filter: blur(150px); animation-duration: 35s;
}
.layer-2 {
  width: 800px; height: 800px; bottom: -300px; left: -200px;
  background: radial-gradient(circle, rgba(56,189,248,0.15), transparent 60%);
  filter: blur(130px); animation-duration: 40s; animation-direction: alternate-reverse;
}
@keyframes orbFloat {
  0% { opacity: 0.4; transform: translate(0,0) scale(0.9); }
  50% { opacity: 0.8; transform: translate(80px,-60px) scale(1.1); }
  100% { opacity: 0.5; transform: translate(-40px,50px) scale(0.95); }
}
.animated-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(251,191,36,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(56,189,248,0.03) 1px, transparent 1px);
  background-size: 80px 80px; opacity: 0.4;
}
.grain-overlay {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 128px 128px;
}

/* --- لودر سلطنتی (Royal Loader) --- */
#globalLoader {
  position: fixed; inset: 0; background: var(--void); z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}
#globalLoader.hidden { opacity: 0; visibility: hidden; }
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.loader-seal {
  position: relative; width: 160px; height: 160px;
  animation: rotateSeal 12s linear infinite;
}
.loader-seal svg { width: 100%; height: 100%; }
@keyframes rotateSeal { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.loader-seal-center {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  animation: rotateSeal 12s linear infinite reverse;
}
.loader-seal-center i { font-size: 2.2rem; color: var(--gold-base); filter: drop-shadow(0 0 12px var(--gold-glow)); }
.loader-subtitle {
  font-family: 'Cinzel', serif; font-size: 0.85rem; letter-spacing: 4px;
  color: var(--gold-base); text-transform: uppercase;
}
.loader-bar-wrap { width: 220px; height: 3px; background: var(--depths); border-radius: var(--r-full); overflow: hidden; }
.loader-bar-fill {
  height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold-dark), var(--gold-bright), var(--gold-dark));
  border-radius: var(--r-full); animation: loadBar 2.2s var(--ease) forwards;
}
@keyframes loadBar { to { width: 100%; } }

/* --- هدر صفحه --- */
.page-header {
  position: sticky; top: 0; z-index: var(--z-header); height: var(--header-height);
  background: rgba(5, 8, 20, 0.95); backdrop-filter: blur(50px) saturate(180%);
  border-bottom: 2px solid rgba(251,191,36,0.25);
  box-shadow: 0 10px 40px rgba(0,0,0,0.7), 0 0 0 1px rgba(251,191,36,0.1) inset;
  display: flex; align-items: center;
}
.header-container {
  width: 100%; max-width: 1800px; margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.logo { display: flex; align-items: center; gap: 1.5rem; }
.logo i {
  width: 60px; height: 60px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--gold-base) 0%, var(--gold-bright) 100%);
  display: flex; align-items: center; justify-content: center; font-size: 1.7rem; color: var(--void);
  box-shadow: 0 10px 40px var(--gold-glow), 0 0 0 5px rgba(251,191,36,0.2);
  transition: all 0.4s var(--ease);
}
.logo i:hover { transform: translateY(-3px) rotate(8deg) scale(1.05); box-shadow: 0 15px 50px var(--gold-glow), 0 0 0 8px rgba(251,191,36,0.3); }
.logo h1 { font-size: 1.3rem; font-weight: 900; color: var(--text-0); }
.logo span { font-size: 0.78rem; letter-spacing: 3.5px; color: var(--gold-base); text-transform: uppercase; font-family: 'Cinzel', serif; display: block; }

.header-actions { display: flex; align-items: center; gap: 1rem; }
.search-box { display: flex; align-items: center; gap: 0.5rem; background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); border-radius: var(--r-full); padding: 0.25rem 0.25rem 0.25rem 1rem; }
.search-box input { background: transparent; border: none; color: var(--text-1); font-family: inherit; font-size: 0.95rem; padding: 0.5rem; width: 250px; outline: none; }
.search-box input::placeholder { color: var(--text-5); }
.btn-search {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1.2rem;
  background: rgba(251,191,36,0.1); border: 1px solid var(--gold-border); border-radius: var(--r-full);
  color: var(--gold-base); font-weight: 600; cursor: pointer; transition: all 0.3s;
}
.btn-search:hover { background: rgba(251,191,36,0.2); transform: scale(1.02); }
.btn-back, .btn-home {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1.5rem;
  background: transparent; border: 1.5px solid var(--glass-border); border-radius: var(--r-full);
  color: var(--text-3); font-weight: 700; cursor: pointer; transition: all 0.3s;
}
.btn-back:hover, .btn-home:hover { border-color: var(--gold-base); color: var(--gold-base); transform: translateY(-2px); box-shadow: 0 4px 12px var(--gold-glow-sm); }
.user-info {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.4rem;
  background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border); border-radius: var(--r-full);
  font-size: 0.85rem; color: var(--text-3);
}
.user-info i { color: var(--gold-base); }
.btn-logout {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1.5rem;
  background: transparent; border: 1.5px solid rgba(239,68,68,0.3); border-radius: var(--r-full);
  color: var(--c-danger); font-weight: 700; cursor: pointer; transition: all 0.3s;
}
.btn-logout:hover { border-color: var(--c-danger); background: rgba(239,68,68,0.1); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(239,68,68,0.2); }

/* --- محتوای اصلی --- */
.main-content { max-width: 1600px; margin: 0 auto; padding: 2rem; position: relative; z-index: var(--z-content); }

/* --- هدر پرونده (Case Header) --- */
.case-hero {
  background: var(--glass-bg); backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border); border-radius: var(--r-2xl);
  padding: 2rem 2.5rem; margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; justify-content: space-between;
  transition: all 0.3s var(--ease);
}
.case-hero:hover { border-color: var(--gold-border); box-shadow: var(--shadow-xl), 0 0 0 1px var(--gold-border) inset; }
.hero-left { display: flex; align-items: center; gap: 2rem; }
.case-icon {
  width: 80px; height: 80px; border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center; font-size: 2.2rem;
  background: linear-gradient(135deg, rgba(251,191,36,0.2), rgba(240,213,118,0.1));
  border: 2px solid var(--gold-border); color: var(--gold-base);
}
.case-icon.court { background: linear-gradient(135deg, rgba(192,132,252,0.2), rgba(192,132,252,0.1)); border-color: rgba(192,132,252,0.4); color: var(--c-royal); }
.case-icon.military { background: linear-gradient(135deg, rgba(239,68,68,0.2), rgba(239,68,68,0.1)); border-color: rgba(239,68,68,0.4); color: var(--c-danger); }
.case-info h2 { font-size: 1.8rem; font-weight: 900; color: var(--text-0); margin-bottom: 0.5rem; }
.case-number-badge {
  display: inline-block; background: rgba(251,191,36,0.1); border: 1px solid var(--gold-border);
  border-radius: 100px; padding: 0.2rem 1.2rem; font-size: 0.9rem; color: var(--gold-base); font-weight: 700;
  font-family: 'Courier New', monospace; margin-left: 1rem;
}
.case-meta { display: flex; gap: 1.5rem; color: var(--text-3); font-size: 0.9rem; }
.hero-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.8rem; }
.status-badge-lg {
  display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem 2rem;
  border-radius: var(--r-full); font-weight: 800; font-size: 1.1rem;
}
.status-badge-lg.pending { background: rgba(245,158,11,0.15); border: 1px solid rgba(245,158,11,0.4); color: var(--c-warning); }
.status-badge-lg.progress { background: rgba(59,130,246,0.15); border: 1px solid rgba(59,130,246,0.4); color: var(--c-info); }
.status-badge-lg.completed { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.4); color: var(--c-success); }
.status-badge-lg.archived { background: rgba(100,116,139,0.15); border: 1px solid rgba(100,116,139,0.4); color: var(--text-4); }
.quick-actions { display: flex; gap: 0.8rem; }
.btn-icon-sm {
  width: 44px; height: 44px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.03); border: 1.5px solid var(--glass-border);
  color: var(--text-3); cursor: pointer; transition: all 0.3s;
}
.btn-icon-sm:hover { border-color: var(--gold-base); color: var(--gold-base); transform: translateY(-2px); box-shadow: 0 4px 12px var(--gold-glow-sm); }
.btn-icon-sm.danger:hover { border-color: var(--c-danger); color: var(--c-danger); box-shadow: 0 4px 12px rgba(239,68,68,0.3); }

/* --- چیدمان دو ستونه --- */
.content-grid { display: grid; grid-template-columns: 1fr var(--sidebar-width); gap: 2rem; }

/* --- تب‌های ناوبری (Tabs) --- */
.tabs-container {
  background: var(--glass-bg); backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border); border-radius: var(--r-2xl);
  padding: 0.5rem; margin-bottom: 1.5rem;
  display: flex; gap: 0.5rem;
}
.tab-btn {
  flex: 1; padding: 1rem 0.5rem; background: transparent; border: none;
  border-radius: var(--r-xl); color: var(--text-3); font-weight: 700;
  cursor: pointer; transition: all 0.3s var(--ease); display: flex;
  align-items: center; justify-content: center; gap: 0.5rem; font-size: 0.95rem;
}
.tab-btn i { font-size: 1.1rem; }
.tab-btn:hover { color: var(--text-1); background: rgba(255,255,255,0.03); }
.tab-btn.active {
  background: linear-gradient(145deg, rgba(251,191,36,0.2), rgba(251,191,36,0.05));
  color: var(--gold-base); box-shadow: 0 0 15px var(--gold-glow-sm), 0 0 0 1px var(--gold-border);
}
.tab-content-pane { display: none; }
.tab-content-pane.active { display: block; animation: fadeUp 0.3s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- کارت‌های اطلاعاتی (Global Card) --- */
.card {
  background: var(--glass-bg); backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border); border-radius: var(--r-2xl);
  padding: 2rem; margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s var(--ease);
}
.card:hover { border-color: var(--gold-border); box-shadow: var(--shadow-lg), 0 0 0 1px var(--gold-border) inset; }
.card-header {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1.8rem;
  padding-bottom: 1.2rem; border-bottom: 1px solid rgba(251,191,36,0.15);
}
.card-header i { font-size: 1.6rem; color: var(--gold-base); background: rgba(251,191,36,0.1); padding: 0.5rem; border-radius: var(--r-md); }
.card-header h3 { font-size: 1.3rem; font-weight: 800; color: var(--text-0); }

/* --- جزئیات شبکه‌ای (Grid Info) --- */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem 1.8rem; }
.info-item { display: flex; flex-direction: column; gap: 0.4rem; }
.info-label { font-size: 0.8rem; font-weight: 700; color: var(--text-4); text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 0.5rem; }
.info-value { font-size: 1rem; color: var(--text-1); font-weight: 600; }
.info-value.highlight { color: var(--gold-base); font-weight: 800; }

/* --- لیست افراد --- */
.person-item {
  display: flex; align-items: center; gap: 1rem; padding: 1rem;
  background: rgba(255,255,255,0.02); border: 1px solid var(--glass-border);
  border-radius: var(--r-lg); margin-bottom: 0.8rem;
}
.person-avatar { width: 48px; height: 48px; border-radius: 50%; background: rgba(59,130,246,0.15); display: flex; align-items: center; justify-content: center; color: var(--c-info); }
.person-info { flex: 1; }
.person-name { font-weight: 700; color: var(--text-0); }
.person-meta { font-size: 0.8rem; color: var(--text-3); }

/* --- تایم‌لاین تاریخچه --- */
.timeline-vertical { position: relative; padding-right: 2rem; }
.timeline-vertical::before { content: ''; position: absolute; right: 8px; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--gold-base), transparent); }
.timeline-node { display: flex; gap: 1.5rem; margin-bottom: 1.5rem; position: relative; }
.timeline-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--gold-base); border: 3px solid var(--abyss); box-shadow: 0 0 10px var(--gold-glow); flex-shrink: 0; margin-top: 3px; }
.timeline-content { flex: 1; }
.timeline-title { font-weight: 800; color: var(--text-0); display: flex; justify-content: space-between; }
.timeline-desc { color: var(--text-3); font-size: 0.9rem; }

/* --- آپلود فایل (Dropzone) --- */
.file-dropzone {
  border: 2px dashed var(--glass-border); border-radius: var(--r-xl);
  padding: 2rem; text-align: center; background: rgba(0,0,0,0.1);
  cursor: pointer; transition: all 0.3s;
}
.file-dropzone:hover { border-color: var(--gold-base); background: rgba(251,191,36,0.05); }
.file-list { margin-top: 1.5rem; }
.file-item {
  display: flex; align-items: center; gap: 1rem; padding: 0.8rem;
  background: rgba(255,255,255,0.03); border-radius: var(--r-md);
  border: 1px solid var(--glass-border);
}
.file-item i { color: var(--gold-base); }

/* --- نوار کناری (Sidebar) --- */
.sidebar .card { padding: 1.8rem; }
.stat-item { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.stat-label { color: var(--text-4); }
.stat-value { font-weight: 800; color: var(--gold-base); font-size: 1.2rem; }
.progress-ring { width: 120px; height: 120px; margin: 1rem auto; }

/* --- مودال‌ها (Modals) --- */
.modal {
  display: none; position: fixed; inset: 0; z-index: var(--z-modal);
  background: rgba(2,6,15,0.85); backdrop-filter: blur(30px);
  padding: 1.5rem; overflow-y: auto; align-items: flex-start; justify-content: center;
}
.modal.active { display: flex; animation: modalFadeIn 0.25s ease; }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-content {
  background: radial-gradient(circle at 20% 10%, rgba(30,40,70,0.95), rgba(10,15,35,0.98));
  backdrop-filter: blur(20px); border: 1.5px solid var(--gold-border);
  border-radius: var(--r-3xl); max-width: 600px; width: 100%;
  box-shadow: var(--shadow-2xl); margin: auto;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.8rem 2rem; border-bottom: 1px solid rgba(251,191,36,0.2);
}
.modal-header h3 { color: var(--gold-base); }
.modal-close { background: none; border: none; color: var(--text-3); font-size: 1.5rem; cursor: pointer; }
.modal-body { padding: 2rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-2); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 1rem; background: rgba(0,0,0,0.2);
  border: 1.5px solid var(--glass-border); border-radius: var(--r-lg);
  color: var(--text-1); font-family: inherit;
}
.modal-actions { display: flex; gap: 1rem; margin-top: 2rem; }

/* --- Toast --- */
.toasts { position: fixed; bottom: 2rem; left: 2rem; z-index: var(--z-toast); display: flex; flex-direction: column; gap: 0.8rem; }
.toast {
  padding: 1rem 1.5rem; border-radius: var(--r-xl); background: var(--glass-bg);
  backdrop-filter: blur(20px); border: 1px solid; display: flex; align-items: center; gap: 1rem;
  transform: translateX(-120%); transition: transform 0.4s var(--ease-bounce);
}
.toast.show { transform: translateX(0); }
.toast.success { border-color: var(--c-success); color: var(--c-success); }
.toast.error { border-color: var(--c-danger); color: var(--c-danger); }

/* --- Empty States --- */
.empty-state { text-align: center; padding: 2rem; color: var(--text-4); }
.empty-state i { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.5; }

/* --- Responsive --- */
@media (max-width: 1200px) {
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
}
@media (max-width: 768px) {
  .header-container { flex-wrap: wrap; }
  .case-hero { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .hero-right { align-items: flex-start; }
  .info-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   CASE DETAILS — ULTRA MODERN EDITION (PART 2 - CSS)
   🎨 Tabs, Grid, Cards, Sidebar, Modals, Responsive
   ═══════════════════════════════════════════════════════════ */

/* --- تب‌های ناوبری (Tabs) --- */
.tabs-container {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-2xl);
  padding: 0.5rem;
  margin-bottom: 2rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
}

.tab-btn {
  flex: 1 1 auto;
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  border-radius: var(--r-xl);
  color: var(--text-3);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  white-space: nowrap;
  border: 1px solid transparent;
}

.tab-btn i {
  font-size: 1.2rem;
}

.tab-btn:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--glass-border);
}

.tab-btn.active {
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.2), rgba(251, 191, 36, 0.05));
  color: var(--gold-base);
  box-shadow: 0 0 20px var(--gold-glow-sm), 0 0 0 1px var(--gold-border);
  border-color: var(--gold-border);
}

.tab-content-pane {
  display: none;
}

.tab-content-pane.active {
  display: block;
  animation: fadeUp 0.35s var(--ease);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- چیدمان دو ستونه (Grid) --- */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
}

.main-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* --- کارت‌های اطلاعاتی (Global Card) --- */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-2xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s var(--ease);
}

.card:hover {
  border-color: var(--gold-border);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--gold-border) inset;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.8rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(251, 191, 36, 0.15);
}

.card-header i {
  font-size: 1.6rem;
  color: var(--gold-base);
  background: rgba(251, 191, 36, 0.1);
  padding: 0.6rem;
  border-radius: var(--r-md);
  border: 1px solid var(--gold-border);
}

.card-header h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-0);
  letter-spacing: -0.01em;
}

/* --- شبکه اطلاعات (Info Grid) --- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 2rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.info-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-1);
  word-break: break-word;
}

.info-value.highlight {
  color: var(--gold-base);
  font-weight: 800;
}

.info-value code {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.2rem 0.5rem;
  border-radius: var(--r-sm);
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

/* --- لیست افراد (People List) --- */
.person-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  margin-bottom: 0.8rem;
  transition: all 0.2s;
}

.person-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--gold-border);
}

.person-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.05));
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-info);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.person-info {
  flex: 1;
}

.person-name {
  font-weight: 700;
  color: var(--text-0);
  margin-bottom: 0.25rem;
}

.person-meta {
  font-size: 0.85rem;
  color: var(--text-3);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.person-meta i {
  margin-left: 0.25rem;
  color: var(--gold-base);
  font-size: 0.8rem;
}

/* --- تایم‌لاین عمودی (History Timeline) --- */
.timeline-vertical {
  position: relative;
  padding-right: 2rem;
}

.timeline-vertical::before {
  content: '';
  position: absolute;
  right: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--gold-base) 0%, var(--gold-dim) 100%);
  border-radius: 2px;
}

.timeline-node {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.8rem;
  position: relative;
}

.timeline-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold-base);
  border: 3px solid var(--abyss);
  box-shadow: 0 0 12px var(--gold-glow);
  flex-shrink: 0;
  margin-top: 5px;
  position: relative;
  z-index: 2;
}

.timeline-content {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 1rem 1.5rem;
  transition: all 0.2s;
}

.timeline-content:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--gold-border);
}

.timeline-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  color: var(--text-0);
  margin-bottom: 0.5rem;
}

.timeline-title small {
  font-weight: 400;
  color: var(--text-4);
  font-size: 0.8rem;
}

.timeline-desc {
  color: var(--text-3);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- بخش آپلود فایل (Dropzone) --- */
.file-dropzone {
  border: 2px dashed var(--glass-border);
  border-radius: var(--r-xl);
  padding: 2.5rem 2rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 1.5rem;
}

.file-dropzone:hover {
  border-color: var(--gold-base);
  background: rgba(251, 191, 36, 0.05);
  transform: scale(1.01);
}

.file-dropzone i {
  font-size: 2.5rem;
  color: var(--gold-base);
  margin-bottom: 1rem;
  display: block;
}

.file-dropzone p {
  color: var(--text-2);
  font-weight: 500;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
}

.file-item i {
  color: var(--gold-base);
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

.file-item span {
  flex: 1;
  color: var(--text-1);
}

.file-item small {
  color: var(--text-4);
  font-size: 0.8rem;
}

/* --- نوار کناری (Sidebar) --- */
.sidebar .card {
  padding: 1.8rem;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.stat-label {
  color: var(--text-4);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.stat-value {
  font-weight: 800;
  color: var(--gold-base);
  font-size: 1.3rem;
}

.progress-ring {
  width: 120px;
  height: 120px;
  margin: 1.5rem auto 0.5rem;
  border-radius: 50%;
  background: conic-gradient(var(--gold-base) 0deg 270deg, var(--depths) 270deg 360deg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--gold-base);
  border: 2px solid var(--gold-border);
  box-shadow: 0 0 20px var(--gold-glow-sm);
}

#creatorInfo {
  color: var(--text-2);
}

#creatorInfo div {
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

#creatorInfo i {
  width: 20px;
  color: var(--gold-base);
}

#recentActivity {
  font-size: 0.9rem;
}

#recentActivity strong {
  color: var(--text-0);
}

/* --- دکمه‌های داخل کارت مدیریتی (Admin Actions) --- */
#adminActionsCard .btn {
  display: flex;
  width: 100%;
  justify-content: center;
  margin-bottom: 0.5rem;
}

/* --- مودال‌ها (Modals) --- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(2, 6, 15, 0.85);
  backdrop-filter: blur(30px) saturate(180%);
  padding: 1.5rem;
  overflow-y: auto;
  align-items: flex-start;
  justify-content: center;
}

.modal.active {
  display: flex;
  animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; backdrop-filter: blur(0); }
  to   { opacity: 1; backdrop-filter: blur(30px) saturate(180%); }
}

.modal-content {
  background: radial-gradient(circle at 20% 10%, rgba(30, 40, 70, 0.98), rgba(10, 15, 35, 0.98));
  backdrop-filter: blur(20px);
  border: 1.5px solid var(--gold-border);
  border-radius: var(--r-3xl);
  max-width: 650px;
  width: 100%;
  box-shadow: var(--shadow-2xl);
  margin: auto;
  overflow: hidden;
  animation: modalPop 0.3s var(--ease-spring);
}

@keyframes modalPop {
  0% { opacity: 0; transform: scale(0.92) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.8rem 2rem;
  border-bottom: 1px solid rgba(251, 191, 36, 0.2);
  background: rgba(5, 8, 20, 0.3);
}

.modal-header h3 {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--gold-base);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-3);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--c-danger);
  transform: rotate(90deg);
}

.modal-body {
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.8rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.9rem 1.2rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--r-lg);
  color: var(--text-1);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold-base);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
}

.modal-actions .btn {
  flex: 1;
}

/* --- Confirm Modal (Overlay & Box) --- */
.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-modal) + 1);
  background: rgba(2, 6, 15, 0.8);
  backdrop-filter: blur(25px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.confirm-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.confirm-modal {
  max-width: 500px;
  width: 100%;
  background: radial-gradient(circle at 20% 20%, rgba(30, 40, 75, 0.98), rgba(12, 18, 35, 0.98));
  backdrop-filter: blur(20px);
  border: 1.5px solid var(--gold-border);
  border-radius: var(--r-3xl);
  box-shadow: 0 30px 50px -10px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s var(--ease-spring);
}

.confirm-modal-overlay.active .confirm-modal {
  transform: scale(1) translateY(0);
}

.confirm-modal-header {
  padding: 2rem 2rem 1rem;
  text-align: center;
}

.confirm-modal-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: rgba(251, 191, 36, 0.12);
  border: 2px solid var(--gold-border);
  color: var(--gold-base);
  box-shadow: 0 0 30px var(--gold-glow-sm);
}

.confirm-modal-icon.danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--c-danger);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.2);
}

.confirm-modal-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-0);
  margin-bottom: 0.5rem;
}

.confirm-modal-subtitle {
  color: var(--text-4);
  font-size: 0.95rem;
}

.confirm-modal-body {
  padding: 1rem 2rem;
}

.summary-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--r-xl);
  padding: 1.2rem 1.5rem;
}

.confirm-modal-footer {
  padding: 1rem 2rem 2rem;
  display: flex;
  gap: 1rem;
}

.confirm-btn {
  flex: 1;
  padding: 0.9rem 1.5rem;
  border-radius: 100px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  border: none;
  transition: all 0.25s;
}

.confirm-btn-primary {
  background: linear-gradient(145deg, var(--gold-base), var(--gold-dark));
  color: #0f172a;
  box-shadow: 0 8px 20px var(--gold-glow);
}

.confirm-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px var(--gold-glow);
}

.confirm-btn-danger {
  background: linear-gradient(145deg, var(--c-danger), #b91c1c);
  color: white;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.confirm-btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(239, 68, 68, 0.5);
}

.confirm-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--glass-border);
  color: var(--text-3);
}

.confirm-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gold-border);
  color: white;
}

/* --- Toast Notifications --- */
.toasts {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.8rem;
  border-radius: var(--r-2xl);
  background: var(--glass-bg);
  backdrop-filter: blur(30px) saturate(200%);
  border: 1.5px solid;
  min-width: 320px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
  transform: translateX(-120%) scale(0.85);
  transition: transform 0.4s var(--ease-bounce), opacity 0.3s;
  opacity: 0;
}

.toast.show {
  transform: translateX(0) scale(1);
  opacity: 1;
}

.toast.success {
  border-color: var(--c-success);
}

.toast.error {
  border-color: var(--c-danger);
}

.toast.warning {
  border-color: var(--c-warning);
}

.toast.info {
  border-color: var(--c-info);
}

.toast-icon {
  font-size: 1.5rem;
  color: inherit;
}

.toast-content h4 {
  font-size: 1rem;
  font-weight: 900;
  margin-bottom: 0.2rem;
  color: var(--text-0);
}

.toast-content p {
  font-size: 0.85rem;
  color: var(--text-3);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-5);
  cursor: pointer;
  margin-right: auto;
}

.toast-close:hover {
  color: white;
}

/* --- حالت‌های خالی (Empty States) --- */
.empty-state {
  text-align: center;
  padding: 2.5rem 2rem;
  color: var(--text-4);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state p {
  font-size: 1rem;
}

/* --- لودینگ اورلی (Loading Overlay) --- */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 20, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.loading-overlay.active {
  display: flex;
}

.loading-spinner {
  text-align: center;
}

.loading-spinner i {
  font-size: 3rem;
  color: var(--gold-base);
  margin-bottom: 1rem;
  animation: spin 1.2s linear infinite;
}

.loading-spinner p {
  font-size: 1.1rem;
  color: var(--text-2);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- صفحه جستجو (Search Page) --- */
.search-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.search-container {
  text-align: center;
  max-width: 500px;
  background: var(--glass-bg);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-2xl);
  padding: 3rem;
  box-shadow: var(--shadow-xl);
}

.search-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(251, 191, 36, 0.1);
  border: 2px solid var(--gold-border);
  border-radius: 50%;
  font-size: 3rem;
  color: var(--gold-base);
}

.search-container h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.search-container p {
  color: var(--text-3);
  margin-bottom: 2rem;
}

/* --- ریسپانسیو (Responsive) --- */
@media (max-width: 1200px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: -1;
  }
}

@media (max-width: 992px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

  .tabs-container {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 0.5rem;
  }

  .tab-btn {
    white-space: nowrap;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .header-actions {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .search-box {
    width: 100%;
    order: -1;
  }

  .search-box input {
    flex: 1;
    width: auto;
  }

  .case-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .hero-right {
    align-items: flex-start;
    width: 100%;
  }

  .quick-actions {
    justify-content: flex-start;
  }

  .main-content {
    padding: 1rem;
  }

  .modal-content {
    margin: 1rem;
  }

  .toasts {
    left: 1rem;
    bottom: 1rem;
    right: 1rem;
  }

  .toast {
    min-width: auto;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .case-info h2 {
    font-size: 1.3rem;
  }

  .case-number-badge {
    font-size: 0.8rem;
  }

  .card {
    padding: 1.5rem;
  }

  .modal-header,
  .modal-body {
    padding: 1.5rem;
  }
}

/* --- پشتیبانی از پرینت --- */
@media print {
  .animated-bg,
  .grain-overlay,
  .page-header,
  .tabs-container,
  .sidebar,
  .btn,
  .modal,
  .loading-overlay,
  #globalLoader,
  .toasts,
  .quick-actions {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .main-content {
    padding: 0;
  }

  .card {
    background: white;
    border: 1px solid #ccc;
    box-shadow: none;
    break-inside: avoid;
  }
}

/* ═══════════════════════════════════════════════════════════
   CASE DETAILS — ULTRA MODERN EDITION (PART 3 - CSS)
   🎨 Missing Styles, Advanced Animations & Micro-interactions
   ═══════════════════════════════════════════════════════════ */

/* ==========================================
   ۱. استایل دکمه‌های رنگی (Fallback برای global-components)
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.8rem 1.8rem;
  border: none;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--glass-border);
  color: var(--text-2);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gold-border);
  color: var(--gold-base);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.btn-primary {
  background: linear-gradient(145deg, var(--gold-base), var(--gold-dark));
  border: none;
  color: #0f172a;
  box-shadow: 0 8px 20px var(--gold-glow);
}
.btn-primary:hover {
  background: linear-gradient(145deg, var(--gold-bright), var(--gold-base));
  color: #000;
  box-shadow: 0 12px 25px var(--gold-glow);
  border: none;
}

.btn-warning {
  background: linear-gradient(145deg, var(--c-warning), #d97706);
  border: none;
  color: white;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}
.btn-warning:hover {
  background: linear-gradient(145deg, #fbbf24, var(--c-warning));
  box-shadow: 0 12px 25px rgba(245, 158, 11, 0.5);
}

.btn-info {
  background: linear-gradient(145deg, var(--c-info), #2563eb);
  border: none;
  color: white;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}
.btn-info:hover {
  background: linear-gradient(145deg, #60a5fa, var(--c-info));
  box-shadow: 0 12px 25px rgba(59, 130, 246, 0.5);
}

.btn-danger {
  background: linear-gradient(145deg, var(--c-danger), #b91c1c);
  border: none;
  color: white;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background: linear-gradient(145deg, #f87171, var(--c-danger));
  box-shadow: 0 12px 25px rgba(239, 68, 68, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--glass-border);
  color: var(--text-3);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--gold-border);
  color: var(--text-1);
}

/* ==========================================
   ۲. استایل جداول (مربوط به آیتم‌های نظامی)
   ========================================== */
#militaryItemsTable table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.95rem;
}

#militaryItemsTable th {
  padding: 1rem 0.5rem;
  color: var(--gold-base);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--gold-border);
  font-size: 0.8rem;
}

#militaryItemsTable td {
  padding: 1rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-1);
}

#militaryItemsTable tr:hover td {
  background: rgba(251, 191, 36, 0.05);
}

/* ==========================================
   ۳. استایل صفحه خطا (Error Page)
   ========================================== */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 2rem;
}

.error-container {
  text-align: center;
  max-width: 500px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--r-2xl);
  padding: 3rem 2rem;
  box-shadow: var(--shadow-xl);
  animation: fadeUp 0.5s var(--ease);
}

.error-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid rgba(239, 68, 68, 0.4);
  border-radius: 50%;
  font-size: 3rem;
  color: var(--c-danger);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.2);
}

.error-container h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-0);
}

.error-container p {
  color: var(--text-3);
  margin-bottom: 2rem;
}

/* ==========================================
   ۴. بهبود استایل وضعیت‌ها (Status Badge Large)
   ========================================== */
.status-badge-lg {
  padding: 0.6rem 1.8rem;
  border-radius: var(--r-full);
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  backdrop-filter: blur(5px);
  transition: all 0.3s;
}

.status-badge-lg i {
  font-size: 1.2rem;
}

.status-badge-lg.pending {
  background: rgba(245, 158, 11, 0.1);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  color: var(--c-warning);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.1);
}

.status-badge-lg.progress {
  background: rgba(59, 130, 246, 0.1);
  border: 1.5px solid rgba(59, 130, 246, 0.4);
  color: var(--c-info);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.1);
  animation: pulseGlow 2s infinite;
}

.status-badge-lg.completed {
  background: rgba(16, 185, 129, 0.1);
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  color: var(--c-success);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

.status-badge-lg.archived {
  background: rgba(100, 116, 139, 0.1);
  border: 1.5px solid rgba(100, 116, 139, 0.4);
  color: var(--text-4);
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(59, 130, 246, 0.1); }
  50% { box-shadow: 0 0 25px rgba(59, 130, 246, 0.4); }
}

/* ==========================================
   ۵. انیمیشن‌های پیشرفته و خفن (Advanced Animations)
   ========================================== */

/* انیمیشن ورود پلکانی برای کارت‌ها */
.card {
  animation: cardReveal 0.6s var(--ease-out-expo) both;
  opacity: 0;
}

.main-panel .card:nth-child(1) { animation-delay: 0.05s; }
.main-panel .card:nth-child(2) { animation-delay: 0.1s; }
.main-panel .card:nth-child(3) { animation-delay: 0.15s; }
.sidebar .card:nth-child(1) { animation-delay: 0.08s; }
.sidebar .card:nth-child(2) { animation-delay: 0.12s; }
.sidebar .card:nth-child(3) { animation-delay: 0.16s; }
.sidebar .card:nth-child(4) { animation-delay: 0.2s; }

@keyframes cardReveal {
  0% { opacity: 0; transform: translateY(30px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Shimmer Effect برای حالت لودینگ (در صورت نیاز) */
.loading-shimmer {
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.05), 
    transparent);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Hover افکت سه‌بعدی برای آیتم‌های مهم */
.case-hero {
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.case-hero:hover {
  transform: perspective(1000px) translateZ(10px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 0 2px var(--gold-border) inset;
}

/* پالس نرم برای دکمه اقدام سریع */
.btn-icon-sm {
  transition: all 0.3s var(--ease-spring);
}
.btn-icon-sm:hover {
  transform: scale(1.15) translateY(-3px);
}

/* انیمیشن چرخش آیکن در مودال */
.modal-close:hover i {
  display: inline-block;
  animation: spinOnce 0.4s ease;
}
@keyframes spinOnce {
  0% { transform: rotate(0); }
  100% { transform: rotate(90deg); }
}

/* انیمیشن ورود Toast */
.toast {
  animation: toastSlideIn 0.5s var(--ease-bounce) forwards;
}
@keyframes toastSlideIn {
  0% { transform: translateX(100%) scale(0.8); opacity: 0; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}

/* ==========================================
   ۶. بهبودهای واکنش‌گرایی و جزئیات
   ========================================== */
@media (max-width: 768px) {
  .case-hero {
    padding: 1.5rem;
  }
  .case-icon {
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
  }
  .case-info h2 {
    font-size: 1.2rem;
  }
  .tab-btn {
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
  }
  .tab-btn i {
    font-size: 1rem;
  }
  .info-grid {
    gap: 1rem;
  }
}

/* ==========================================
   ۷. استایل برای لینک‌های داخل کارت
   ========================================== */
a {
  color: var(--gold-base);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--gold-bright);
  text-decoration: underline;
}

/* ==========================================
   ۸. استایل برای بخش جستجو (زمانی که پرونده‌ای نیست)
   ========================================== */
.search-page .search-box {
  background: var(--glass-bg);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-full);
  padding: 0.5rem;
  display: flex;
  width: 100%;
}
.search-page .search-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: white;
  padding: 1rem;
  font-family: inherit;
}
.search-page .search-box input::placeholder {
  color: var(--text-4);
}


/* ═══════════════════════════════════════════════════════════
   CONFIRM MODAL — EXACT MATCH WITH CASES-MANAGER
   ═══════════════════════════════════════════════════════════ */

.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-modal) + 1);
  background: rgba(2, 6, 15, 0.7);
  backdrop-filter: blur(25px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.confirm-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.confirm-modal {
  max-width: 500px;
  width: 100%;
  background: radial-gradient(circle at 20% 20%, rgba(30, 40, 75, 0.98), rgba(12, 18, 35, 0.98));
  backdrop-filter: blur(20px);
  border: 1.5px solid rgba(251, 191, 36, 0.5);
  border-radius: var(--r-3xl);
  box-shadow: 0 30px 50px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(251, 191, 36, 0.2) inset;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s var(--ease-spring);
}

.confirm-modal-overlay.active .confirm-modal {
  transform: scale(1) translateY(0);
}

.confirm-modal-header {
  padding: 1.8rem 2rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(251, 191, 36, 0.15);
}

.confirm-modal-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  background: rgba(251, 191, 36, 0.12);
  border: 2px solid var(--gold-border);
  color: var(--gold-base);
  box-shadow: 0 0 30px var(--gold-glow-sm);
}

.confirm-modal-icon.danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--danger);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.2);
}

.confirm-modal-icon.success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--success);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.2);
}

.confirm-modal-title {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text-0);
  margin-bottom: 0.5rem;
}

.confirm-modal-subtitle {
  color: var(--text-4);
  font-size: 0.9rem;
}

.confirm-modal-body {
  padding: 1.5rem 2rem;
}

.summary-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--r-xl);
  padding: 1.2rem 1.5rem;
  backdrop-filter: blur(8px);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-label {
  color: var(--text-4);
  font-size: 0.85rem;
  font-weight: 600;
}

.summary-value {
  color: var(--text-0);
  font-weight: 700;
  font-size: 0.95rem;
}

.confirm-modal-footer {
  padding: 0 2rem 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.confirm-btn {
  flex: 1;
  padding: 0.9rem 1.5rem;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
}

.confirm-btn-primary {
  background: linear-gradient(145deg, var(--gold-base), var(--gold-dark));
  color: #0f172a;
  box-shadow: 0 8px 20px var(--gold-glow);
}

.confirm-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px var(--gold-glow);
}

.confirm-btn-danger {
  background: linear-gradient(145deg, var(--danger), #b91c1c);
  color: white;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.confirm-btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(239, 68, 68, 0.5);
}

.confirm-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--glass-border);
  color: var(--text-3);
}

.confirm-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gold-border);
  color: white;
}

/* ═══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS — EXACT MATCH WITH CASES-MANAGER
   ═══════════════════════════════════════════════════════════ */

.toasts {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.2rem 1.8rem;
  border-radius: var(--r-2xl);
  background: radial-gradient(circle at 20% 10%, rgba(30, 40, 70, 0.95), rgba(10, 15, 35, 0.98));
  backdrop-filter: blur(30px) saturate(200%);
  border: 1.5px solid;
  min-width: 360px;
  max-width: 480px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  transform: translateX(-120%) scale(0.85);
  transition: transform 0.5s var(--ease-bounce), opacity 0.3s;
  opacity: 0;
  position: relative;
  overflow: hidden;
}

.toast.show {
  transform: translateX(0) scale(1);
  opacity: 1;
}

.toast::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: currentColor;
  border-radius: 4px 0 0 4px;
}

.toast-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid currentColor;
  box-shadow: 0 0 15px currentColor;
}

.toast-content {
  flex: 1;
}

.toast-content h4 {
  font-size: 1rem;
  font-weight: 900;
  margin-bottom: 0.25rem;
  color: var(--text-0);
}

.toast-content p {
  font-size: 0.85rem;
  color: var(--text-3);
  font-weight: 500;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-5);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 8px;
  transition: all 0.2s;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.toast.success {
  border-color: rgba(16, 185, 129, 0.5);
  color: var(--success);
}

.toast.success .toast-icon {
  background: rgba(16, 185, 129, 0.1);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.toast.success::before {
  background: var(--success);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.5);
  color: var(--danger);
}

.toast.error .toast-icon {
  background: rgba(239, 68, 68, 0.1);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.toast.error::before {
  background: var(--danger);
}

.toast.warning {
  border-color: rgba(245, 158, 11, 0.5);
  color: var(--warning);
}

.toast.warning .toast-icon {
  background: rgba(245, 158, 11, 0.1);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.toast.warning::before {
  background: var(--warning);
}

.toast.info {
  border-color: rgba(59, 130, 246, 0.5);
  color: var(--c-info);
}

.toast.info .toast-icon {
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.toast.info::before {
  background: var(--c-info);
}

.toast.hiding {
  transform: translateX(-120%) scale(0.8);
  opacity: 0;
  transition: transform 0.4s ease-in, opacity 0.3s;
}