/* ==========================================================================
   VAKILYAB LUXURY DESIGN SYSTEM & ANIMATIONS
   Modern Persian Legal Tech PWA
   ========================================================================== */

@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
  /* Color Palette */
  --bg-primary: #080d1a;
  --bg-secondary: #0f172a;
  --bg-card: rgba(20, 29, 47, 0.85);
  --bg-card-hover: rgba(27, 39, 64, 0.95);
  --bg-glass: rgba(15, 23, 42, 0.7);
  --border-subtle: rgba(212, 175, 55, 0.18);
  --border-gold: #d4af37;
  --border-gold-glow: rgba(212, 175, 55, 0.35);

  --gold-gradient: linear-gradient(135deg, #d4af37 0%, #f6e082 50%, #aa771c 100%);
  --gold-accent: #d4af37;
  --gold-light: #f6e082;
  --gold-dark: #996515;

  --navy-gradient: linear-gradient(180deg, #090e1c 0%, #131b2e 100%);
  --hero-gradient: radial-gradient(circle at 50% 20%, rgba(212, 175, 55, 0.12) 0%, rgba(8, 13, 26, 0.95) 75%);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-gold: #e5c158;

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --info: #38bdf8;
  --info-bg: rgba(56, 189, 248, 0.15);

  /* Elevation & Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.25);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --trans-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, Tahoma, sans-serif;
  font-feature-settings: "ss01" 1;
  -webkit-font-feature-settings: "ss01" 1;
  direction: rtl;
  text-align: right;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

input, textarea, select, button {
  font-family: inherit;
  font-feature-settings: "ss01" 1;
  -webkit-font-feature-settings: "ss01" 1;
}

body {
  min-height: 100vh;
  background: var(--bg-primary);
  background-image: var(--hero-gradient);
  background-attachment: fixed;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-accent);
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  color: #fff;
  font-weight: 700;
  line-height: 1.3;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 0.95rem;
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--trans-smooth);
}

.glass-panel:hover {
  border-color: rgba(212, 175, 55, 0.35);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(212, 175, 55, 0.08);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(212, 175, 55, 0.2); }
  50% { box-shadow: 0 0 25px rgba(212, 175, 55, 0.5); }
}

@keyframes floatGentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fade {
  animation: fadeIn 0.4s ease-out forwards;
}

.animate-float {
  animation: floatGentle 4s ease-in-out infinite;
}

/* Header & Navigation */
.app-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(8, 13, 26, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 1.5rem;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  cursor: pointer;
}

.brand-logo-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--gold-accent);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
  object-fit: cover;
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: -3px;
}

/* Role Selector Badge Bar */
.role-bar {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.95);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.role-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.role-btn.active {
  background: var(--gold-gradient);
  color: #080d1a;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.4);
  font-weight: 700;
}

.role-btn:hover:not(.active) {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.wallet-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--trans-fast);
}

.wallet-badge:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--gold-accent);
}

.wallet-amount {
  font-weight: 700;
  color: var(--gold-light);
}

.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--trans-fast);
}

.pwa-install-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
}

.icon-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--trans-fast);
}

.icon-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-accent);
  color: var(--gold-light);
}

.badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 12px 4px 6px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--trans-fast);
}

.user-profile-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--gold-accent);
}

.user-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold-accent);
}

.user-info-text {
  text-align: right;
  line-height: 1.2;
}

.user-name-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.user-role-label {
  font-size: 0.7rem;
  color: var(--text-gold);
}

/* Main Container */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 6rem 1.5rem;
}

/* Hero Section */
.hero-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid var(--border-gold-glow);
  box-shadow: var(--shadow-lg);
  min-height: 260px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(11, 19, 43, 0.92) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.hero-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 85% 50%, rgba(212, 175, 55, 0.15), transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2.5rem;
  max-width: 680px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(212, 175, 55, 0.3);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0.8rem;
  color: #fff;
}

.hero-title span {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-illustration {
  position: absolute;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  max-width: 420px;
  opacity: 0.9;
  pointer-events: none;
}

/* Primary Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--gold-gradient);
  color: #090e1c;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.35);
  transition: all var(--trans-smooth);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(212, 175, 55, 0.4);
  color: var(--gold-light);
}

.btn-outline-gold {
  border: 1.5px solid var(--gold-accent);
  color: var(--gold-light);
  background: transparent;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--trans-fast);
}

.btn-outline-gold:hover {
  background: var(--gold-accent);
  color: #090e1c;
}

/* Tab Bar */
.dashboard-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
  padding-bottom: 0.25rem;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--trans-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.1);
  font-weight: 700;
  position: relative;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--gold-accent);
  border-radius: 2px;
}

.tab-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.tab-btn.active .tab-badge {
  background: var(--gold-accent);
  color: #090e1c;
}

/* Card Grids */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Case Card */
.case-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.case-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--gold-accent);
  opacity: 0.7;
}

.case-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.case-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.meta-chip.city {
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--info);
  background: var(--info-bg);
}

.meta-chip.category {
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.1);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge.bidding {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.in_progress {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.status-badge.completed {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.case-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.case-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.case-budget-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.case-budget-val {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gold-light);
}

/* Proposal Comparison Modal & Cards */
.proposals-comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.proposal-item-card {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform var(--trans-smooth), border-color var(--trans-smooth);
}

.proposal-item-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-accent);
  box-shadow: 0 10px 25px rgba(212, 175, 55, 0.15);
}

.proposal-item-card.best-price {
  border-color: var(--success);
}

.best-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--success);
  color: #080d1a;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.lawyer-mini-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.lawyer-avatar-md {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid var(--gold-accent);
}

.lawyer-title-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.lawyer-rating-stars {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #f59e0b;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 2px;
}

.proposal-fee-box {
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.proposal-fee-amount {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gold-light);
}

.proposal-note-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 8px;
  border-radius: var(--radius-sm);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(4, 7, 15, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.25s ease-out;
}

.modal-card {
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  background: #0d1527;
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-gold), 0 20px 40px rgba(0, 0, 0, 0.8);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--trans-fast);
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.2rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #fff;
  transition: var(--trans-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--gold-accent);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
  background: rgba(20, 29, 47, 0.95);
}

/* Currency Input Styling with 3-digit comma separation */
.input-currency-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-currency-box .currency-input {
  width: 100%;
  padding-left: 60px;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  color: var(--gold-light);
  direction: ltr;
  text-align: right;
}

.input-currency-label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
  background: rgba(11, 17, 32, 0.9);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

/* Persian Language Validation Styles */
.input-lang-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4) !important;
  background: rgba(35, 15, 25, 0.9) !important;
}

.lang-error-msg {
  display: none;
  align-items: center;
  gap: 6px;
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 6px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 6px 12px;
  border-radius: 8px;
  animation: fadeInDown 0.25s ease;
}

.lang-error-msg.visible {
  display: flex;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23d4af37' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5l-5-5h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 36px;
}

/* Chat Component */
.chat-window {
  display: flex;
  flex-direction: column;
  height: 520px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0b1120;
  border: 1px solid var(--border-subtle);
}

.chat-header {
  padding: 1rem;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-messages {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: radial-gradient(circle at center, rgba(17, 24, 39, 0.4), rgba(11, 17, 32, 0.95));
}

.chat-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  position: relative;
  line-height: 1.5;
  animation: fadeIn 0.2s ease-out;
}

.chat-bubble.client {
  align-self: flex-start;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble.lawyer {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(170, 119, 28, 0.25));
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #fff;
  border-bottom-left-radius: 4px;
}

.chat-bubble.system {
  align-self: center;
  background: rgba(56, 189, 248, 0.1);
  border: 1px dashed rgba(56, 189, 248, 0.3);
  color: var(--info);
  font-size: 0.8rem;
  text-align: center;
}

.chat-time {
  font-size: 0.68rem;
  opacity: 0.6;
  margin-top: 4px;
  display: block;
  text-align: left;
}

.chat-input-bar {
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  color: #fff;
}

.chat-input:focus {
  outline: none;
  border-color: var(--gold-accent);
}

/* Admin Dashboard Analytics */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-box {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.stat-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
}

.commission-control-card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.commission-slider-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.slider-input {
  flex: 1;
  accent-color: var(--gold-accent);
  height: 8px;
  border-radius: 4px;
}

.commission-rate-badge {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--gold-accent);
  padding: 4px 18px;
  border-radius: var(--radius-full);
}

/* Table Style */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.9rem;
}

.custom-table th {
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-secondary);
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
}

.custom-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #fff;
}

.custom-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
}

.toast-item {
  background: #0f172a;
  border: 1px solid var(--gold-accent);
  box-shadow: var(--shadow-lg);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: #fff;
}

.toast-item.success {
  border-color: var(--success);
}

.toast-item.danger {
  border-color: var(--danger);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 89;
  background: rgba(8, 13, 26, 0.96);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  padding: 8px 1rem;
  justify-content: space-around;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
}

.bottom-nav-item.active {
  color: var(--gold-light);
}

/* ==========================================================================
   LUXURY APP FOOTER & DESIGNER CREDITS
   ========================================================================== */
.app-footer {
  position: relative;
  width: 100%;
  margin-top: 4rem;
  padding: 3rem 1.5rem 2.5rem 1.5rem;
  background: linear-gradient(180deg, rgba(8, 13, 26, 0.4) 0%, rgba(15, 23, 42, 0.95) 45%, rgba(8, 13, 26, 0.99) 100%);
  border-top: 1px solid rgba(212, 175, 55, 0.18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-align: center;
  z-index: 20;
}

/* Elegant gold gradient top highlight */
.app-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.7), transparent);
  pointer-events: none;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.footer-brand-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.footer-brand-title span {
  color: var(--gold-accent);
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Distinct Designer Badges Container */
.footer-designer-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.45rem 0.6rem;
  background: rgba(11, 17, 32, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.16);
  border-radius: 9999px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

/* Subtle separator between badges */
.designer-divider {
  width: 1px;
  height: 24px;
  background: linear-gradient(180deg, transparent, rgba(212, 175, 55, 0.45), transparent);
}

/* Individual Pill Badge */
.designer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.22);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  color: #e2e8f0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.badge-label {
  color: #94a3b8;
  font-weight: 500;
}

/* Company Badge */
.designer-badge.badge-company {
  border-color: rgba(212, 175, 55, 0.3);
}

.designer-badge.badge-company:hover {
  background: rgba(27, 39, 64, 0.95);
  border-color: var(--gold-accent);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.32);
}

.designer-badge.badge-company:hover .badge-label {
  color: #f1f5f9;
}

.badge-brand {
  font-weight: 800;
  background: linear-gradient(135deg, #f6e082 0%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}

.badge-heart {
  display: inline-block;
  color: #ef4444;
  font-size: 0.95rem;
  animation: heartPulse 1.8s infinite ease-in-out;
  transform-origin: center;
}

@keyframes heartPulse {
  0%, 100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.3);
  }
  30% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.18);
  }
}

.badge-icon-arrow {
  opacity: 0.6;
  color: var(--gold-light);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.designer-badge.badge-company:hover .badge-icon-arrow {
  opacity: 1;
  transform: translate(-2px, -2px);
}

/* Contact Badge */
.designer-badge.badge-contact {
  border-color: rgba(56, 189, 248, 0.25);
}

.designer-badge.badge-contact:hover {
  background: rgba(16, 35, 58, 0.95);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.28);
}

.designer-badge.badge-contact:hover .badge-label {
  color: #f1f5f9;
}

.badge-icon-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  transition: all 0.3s ease;
}

.designer-badge.badge-contact:hover .badge-icon-phone {
  background: #38bdf8;
  color: #080d1a;
  transform: rotate(15deg) scale(1.1);
}

.badge-phone-number {
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.5px;
  direction: ltr;
  display: inline-block;
  color: #38bdf8;
}

.designer-badge.badge-contact:hover .badge-phone-number {
  color: #7dd3fc;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .hero-illustration {
    display: none;
  }
  .hero-content {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .role-bar {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .main-container {
    padding: 1rem 1rem 2rem 1rem;
  }
  .app-footer {
    padding-bottom: 6rem; /* Extra padding so bottom mobile nav does not obscure footer */
    margin-top: 2rem;
  }
  .footer-designer-row {
    border-radius: 20px;
    flex-direction: column;
    width: 100%;
    max-width: 360px;
    padding: 0.75rem;
    gap: 0.75rem;
  }
  .designer-divider {
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.35), transparent);
  }
  .designer-badge {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
  }
  .hero-card {
    min-height: auto;
  }
  .hero-content {
    padding: 1.5rem;
  }
  .hero-title {
    font-size: 1.5rem;
  }
  .grid-cards {
    grid-template-columns: 1fr;
  }
  .mobile-bottom-nav {
    display: flex;
  }
}

/* ==========================================================================
   VAKIL VIRA 2.0 ECOSYSTEM LUXURY EXTENSIONS
   Styling for all 17 Core Business Modules & 4 Pillars
   ========================================================================== */

/* Top Global Status Bar */
.top-status-bar {
  background: linear-gradient(90deg, #0b1329 0%, #152248 50%, #0b1329 100%);
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  padding: 6px 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #cbd5e1;
  z-index: 1000;
  position: relative;
}

.status-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px #10b981; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.status-quick-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-badge-urgent {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #fff;
  border: none;
  padding: 3px 12px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.35);
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-badge-urgent:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.5);
}

.btn-badge-link {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 3px 12px;
  border-radius: 9999px;
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-badge-link:hover {
  background: rgba(212, 175, 55, 0.25);
}

/* Luxury 3-Column Footer Layout */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-col-about {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.brand-logo-icon {
  font-size: 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.3);
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.footer-desc {
  font-size: 0.88rem;
  line-height: 1.8;
  color: #94a3b8;
  max-width: 500px;
}

.footer-security-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.security-chip {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: #e2e8f0;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 8px;
}

.footer-heading {
  color: var(--gold-light);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  position: relative;
  padding-bottom: 8px;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 2px;
  background: var(--gold-accent);
  border-radius: 2px;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-list a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.84rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-list a:hover {
  color: var(--gold-light);
  transform: translateX(-4px);
}

.footer-bottom-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Nav AI Bubble in Mobile Bottom Bar */
.nav-ai-bubble {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37 0%, #aa771c 100%);
  color: #070b19;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -16px;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.5);
  border: 2px solid #070b19;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottom-nav-item:hover .nav-ai-bubble,
.bottom-nav-item.active .nav-ai-bubble {
  transform: scale(1.15) translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.8);
}

/* Global Quick Shortcuts Grid (بخش ۲۹ سند: میانبرهای اصلی صفحه اول) */
.shortcuts-section {
  margin-bottom: 2.5rem;
}

.shortcuts-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.shortcuts-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
}

.shortcut-card {
  background: rgba(17, 27, 49, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.16);
  border-radius: 16px;
  padding: 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.shortcut-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.shortcut-card:hover {
  transform: translateY(-5px);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), 0 0 20px rgba(212, 175, 55, 0.15);
  background: rgba(23, 35, 64, 0.85);
}

.shortcut-card:hover::before {
  opacity: 1;
}

.shortcut-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  transition: all 0.3s ease;
}

.shortcut-card:hover .shortcut-icon {
  transform: scale(1.1) rotate(5deg);
  background: rgba(212, 175, 55, 0.22);
}

.shortcut-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.shortcut-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.4;
}

.shortcut-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 9999px;
  font-weight: 700;
}

.badge-ai { background: rgba(56, 189, 248, 0.2); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); }
.badge-calc { background: rgba(16, 185, 129, 0.2); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-hot { background: rgba(239, 68, 68, 0.2); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.4); }

/* Central Global Search (بخش ۱۹ و ۲۰ سند: سیستم جستجوی مرکزی) */
.hero-search-wrapper {
  max-width: 720px;
  margin: 1.5rem auto 2.5rem auto;
  position: relative;
}

.search-input-box {
  display: flex;
  align-items: center;
  background: rgba(17, 27, 49, 0.9);
  border: 2px solid rgba(212, 175, 55, 0.3);
  border-radius: 9999px;
  padding: 6px 14px 6px 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 25px rgba(212, 175, 55, 0.12);
  transition: all 0.3s ease;
}

.search-input-box:focus-within {
  border-color: var(--gold-accent);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 35px rgba(212, 175, 55, 0.25);
  background: rgba(22, 35, 64, 0.95);
}

.search-input-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  padding: 8px 12px;
}

.search-input-box input::placeholder {
  color: #64748b;
}

.btn-search-submit {
  background: var(--gold-gradient);
  color: #070b19;
  border: none;
  border-radius: 9999px;
  padding: 9px 24px;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-search-submit:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.search-dropdown-results {
  position: absolute;
  top: 105%;
  right: 0;
  left: 0;
  background: rgba(13, 21, 38, 0.97);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  z-index: 1050;
  max-height: 480px;
  overflow-y: auto;
  display: none;
}

.search-result-category {
  margin-bottom: 1.2rem;
}

.search-result-cat-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--gold-light);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  padding-bottom: 4px;
}

.search-result-item {
  padding: 8px 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-bottom: 4px;
}

.search-result-item:hover {
  background: rgba(212, 175, 55, 0.12);
}

.search-item-main {
  font-size: 0.86rem;
  color: #fff;
  font-weight: 600;
}

.search-item-sub {
  font-size: 0.74rem;
  color: #94a3b8;
}

/* دادحساب (بخش ۱۰ سند: محاسبات حقوقی و مالی) */
.dadhesab-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dadhesab-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding-bottom: 12px;
}

.dadhesab-tab-btn {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.15);
  color: #94a3b8;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.dadhesab-tab-btn.active, .dadhesab-tab-btn:hover {
  background: var(--gold-gradient);
  color: #070b19;
  border-color: transparent;
  font-weight: 800;
}

.dadhesab-panel {
  display: none;
  background: rgba(13, 21, 38, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 16px;
  padding: 1.5rem;
}

.dadhesab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.calc-result-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(13, 21, 38, 0.8) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 14px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.calc-result-val {
  font-size: 1.6rem;
  font-weight: 900;
  color: #34d399;
}

/* ویزارد آیا به وکیل نیاز دارم؟ (بخش ۳.۲ سند) */
.wizard-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.wizard-progress {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.wizard-progress-fill {
  height: 100%;
  background: var(--gold-gradient);
  transition: width 0.4s ease;
}

.wizard-question-box {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.7;
}

.wizard-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wizard-option-btn {
  background: rgba(17, 27, 49, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: #e2e8f0;
  padding: 14px 18px;
  border-radius: 12px;
  text-align: right;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wizard-option-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-accent);
  color: #fff;
  transform: translateX(-4px);
}

.wizard-verdict {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(13, 21, 38, 0.9) 100%);
  border: 1px solid var(--gold-accent);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
}

/* کتابخانه صوتی قوانین (بخش ۱۲.۷ سند) */
.audio-player-wrapper {
  background: rgba(13, 21, 38, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 18px;
  padding: 1.5rem;
}

.audio-header-voice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.voice-switch-btn {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: #94a3b8;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.voice-switch-btn.active {
  background: var(--gold-gradient);
  color: #070b19;
  font-weight: 700;
}

.audio-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.btn-audio-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold-gradient);
  border: none;
  color: #070b19;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
  transition: all 0.2s ease;
}

.btn-audio-play:hover {
  transform: scale(1.08);
}

/* جدول حقوقی و کوئیزها (بخش ۱۶ سند: آموزش و سرگرمی) */
.game-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.crossword-board {
  display: grid;
  grid-template-columns: repeat(5, 50px);
  gap: 6px;
  justify-content: center;
  margin: 1.5rem 0;
}

.crossword-cell {
  width: 50px;
  height: 50px;
  background: rgba(17, 27, 49, 0.9);
  border: 2px solid rgba(212, 175, 55, 0.3);
  border-radius: 10px;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 800;
  text-align: center;
  outline: none;
  font-family: inherit;
}

.crossword-cell:focus {
  border-color: var(--gold-accent);
  background: rgba(212, 175, 55, 0.15);
}

.crossword-cell.block {
  background: #070b19;
  border-color: #1e293b;
  pointer-events: none;
}

/* مقایسه وکلا (بخش ۷.۴ سند) */
.compare-matrix-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.compare-matrix-table th, .compare-matrix-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  text-align: center;
  font-size: 0.84rem;
}

.compare-matrix-table th {
  background: rgba(15, 23, 42, 0.8);
  color: var(--gold-light);
  font-weight: 700;
}

/* Responsive tweaks for new elements */
@media (max-width: 768px) {
  .top-status-bar {
    flex-direction: column;
    gap: 6px;
    padding: 8px 1rem;
    text-align: center;
  }
  .status-quick-links {
    width: 100%;
    justify-content: center;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .shortcuts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dadhesab-tabs {
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 6px;
  }
}

/* ==========================================================================
   AUTHENTICATION, OTP, ROLE-BASED PANELS & SMS GATEWAY STYLES
   ========================================================================== */

/* Auth & Login Modal */
.auth-modal-card {
  max-width: 480px;
  width: 100%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(8, 13, 26, 0.98) 100%);
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(212, 175, 55, 0.15);
  border-radius: 24px;
  padding: 2.2rem 2rem;
  position: relative;
  overflow: hidden;
}

.auth-modal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gold-gradient);
}

.auth-header {
  text-align: center;
  margin-bottom: 1.8rem;
}

.auth-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(212, 175, 55, 0.12);
  border: 1.5px solid rgba(212, 175, 55, 0.3);
  font-size: 2rem;
  margin-bottom: 12px;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.15);
}

.auth-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Role Selector Grid */
.auth-role-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 1.5rem;
}

.auth-role-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.auth-role-tab .role-icon {
  font-size: 1.1rem;
}

.auth-role-tab.active {
  background: var(--gold-gradient);
  color: #070b19;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* OTP 5-Box Inputs */
.otp-inputs-wrapper {
  display: flex;
  justify-content: center;
  gap: 10px;
  direction: ltr;
  margin: 1.5rem 0 1rem;
}

.otp-box {
  width: 52px;
  height: 58px;
  border-radius: 14px;
  border: 2px solid rgba(212, 175, 55, 0.25);
  background: rgba(15, 23, 42, 0.8);
  color: var(--gold-light);
  font-size: 1.6rem;
  font-weight: 900;
  text-align: center;
  transition: all var(--trans-fast);
  outline: none;
}

.otp-box:focus {
  border-color: var(--gold-accent);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.35);
  background: rgba(20, 30, 55, 0.95);
  transform: translateY(-2px);
}

/* Master bypass badge reminder */
.auth-hint-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px dashed rgba(212, 175, 55, 0.4);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--gold-light);
  margin-bottom: 1.2rem;
  line-height: 1.5;
}

.auth-hint-banner code {
  background: rgba(212, 175, 55, 0.25);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 2px;
  color: #fff;
}

.auth-timer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.auth-btn-resend {
  background: none;
  border: none;
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.auth-btn-resend:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  text-decoration: none;
}

/* User profile widget in header */
.header-user-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 14px;
  padding: 5px 12px 5px 6px;
}

.user-avatar-mini {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  border: 1.5px solid var(--gold-accent);
}

.user-name-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.user-role-chip {
  font-size: 0.68rem;
  color: var(--gold-light);
}

.btn-header-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-gradient);
  color: #070b19;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 8px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.25);
  transition: all var(--trans-fast);
}

.btn-header-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.35);
}

.btn-header-logout {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-header-logout:hover {
  background: #ef4444;
  color: #fff;
}

/* Secretary Panel Cards */
.sec-card {
  background: rgba(17, 27, 49, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 16px;
  padding: 1.4rem;
  transition: all var(--trans-fast);
}

.sec-card:hover {
  border-color: rgba(212, 175, 55, 0.4);
}

.sec-table {
  width: 100%;
  border-collapse: collapse;
}

.sec-table th {
  background: rgba(10, 16, 30, 0.9);
  color: var(--gold-light);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.sec-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
  color: #cbd5e1;
}

.sec-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Admin SMS Gateway Styles */
.sms-log-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
}

.sms-log-simulated {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.sms-log-delivered {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   CURRENCY DUAL DISPLAY, STRICT PERSIAN TYPING ALARM, & 10-FILE UPLOADER
   ========================================================================== */

/* Currency Input with Unit & Dual Rial Display */
.currency-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.currency-input-wrapper .currency-input {
  width: 100%;
  padding-left: 55px;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
}

.currency-input-unit {
  position: absolute;
  left: 14px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-light);
  pointer-events: none;
  background: rgba(212, 175, 55, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, 0.25);
}

/* Rial Live Badge shown directly ABOVE currency inputs */
.rial-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 8px;
  padding: 3px 10px;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.15);
  transition: all var(--trans-fast);
}

.rial-live-badge::before {
  content: '🏷️';
  font-size: 0.75rem;
}

/* Dual Currency Display (Rial above, Toman below, both with 3 digits separated) */
.currency-dual-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.35;
}

.currency-dual-wrap.align-end {
  align-items: flex-end;
}

.currency-dual-wrap.align-center {
  align-items: center;
}

.currency-rial-above {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.3px;
  display: block;
}

.currency-toman-main {
  font-size: 0.95rem;
  color: var(--gold-light);
  font-weight: 800;
  display: block;
}

/* Budget Card Badge for Case Cards */
.budget-card-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 10px;
  padding: 6px 12px;
  margin-top: 6px;
}

.budget-card-badge .budget-rial {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
}

.budget-card-badge .budget-toman {
  font-size: 0.88rem;
  color: var(--gold-light);
  font-weight: 800;
}

/* Strict Persian-Only Typing Alarm & Animations */
.input-lang-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.35) !important;
  background: rgba(239, 68, 68, 0.05) !important;
  animation: inputShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.lang-alarm-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(185, 28, 28, 0.3) 100%);
  border: 1px solid rgba(239, 68, 68, 0.6);
  color: #fca5a5;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 10px;
  padding: 8px 12px;
  margin-top: 8px;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
}

.lang-alarm-badge strong {
  color: #fff;
  text-decoration: underline;
}

.shake-animation {
  animation: inputShake 0.45s ease-in-out;
}

@keyframes inputShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* File Upload Component (Up to 10 files: PDF, JPG, JPEG, PNG) */
.case-upload-wrapper {
  background: rgba(10, 16, 30, 0.6);
  border: 1px dashed rgba(212, 175, 55, 0.35);
  border-radius: 14px;
  padding: 1.25rem;
  transition: all var(--trans-fast);
}

.case-upload-wrapper:hover,
.case-upload-wrapper.dragover {
  border-color: var(--gold-accent);
  background: rgba(212, 175, 55, 0.04);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.12);
}

.upload-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.upload-counter-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.upload-counter-badge.full {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

.upload-drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 1rem;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.5);
  transition: all var(--trans-fast);
  text-align: center;
}

.upload-drop-zone:hover {
  border-color: var(--gold-accent);
  background: rgba(20, 30, 55, 0.7);
}

.upload-drop-icon {
  font-size: 2rem;
  margin-bottom: 6px;
  transition: transform 0.2s;
}

.upload-drop-zone:hover .upload-drop-icon {
  transform: translateY(-3px) scale(1.08);
}

.upload-format-chips {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.upload-format-chip {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.upload-format-chip.pdf {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

.upload-format-chip.img {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.3);
}

/* Uploaded Files Grid */
.uploaded-files-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.uploaded-file-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 10px;
  padding: 8px 10px;
  gap: 8px;
  transition: all var(--trans-fast);
}

.uploaded-file-card:hover {
  border-color: rgba(212, 175, 55, 0.5);
  background: rgba(22, 33, 58, 0.9);
}

.uploaded-file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.uploaded-file-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.uploaded-file-text {
  min-width: 0;
  flex: 1;
}

.uploaded-file-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: ltr;
  text-align: right;
}

.uploaded-file-size {
  font-size: 0.7rem;
  color: #94a3b8;
}

.uploaded-file-remove {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  border-radius: 6px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: all var(--trans-fast);
}

.uploaded-file-remove:hover {
  background: #ef4444;
  color: #fff;
  transform: scale(1.1);
}

/* Attachment Chips for Case Cards & Modals */
.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.75rem;
  color: #e2e8f0;
}

.attachment-chip:hover {
  border-color: var(--gold-accent);
  background: rgba(212, 175, 55, 0.08);
}


