@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --font-sans: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Shabnam', 'Tahoma', sans-serif;
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --border: #e2e8f0;
  --border-focus: #3b82f6;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-text: #1e40af;
  
  --success: #10b981;
  --success-light: #ecfdf5;
  --success-text: #065f46;
  
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --warning-text: #92400e;
  
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --danger-text: #991b1b;
  
  --info: #0284c7;
  --info-light: #f0f9ff;
  --info-text: #075985;
  
  /* Operator Colors */
  --mci-blue: #0284c7;
  --mci-orange: #ea580c;
  --mtn-yellow: #f59e0b;
  --mtn-dark: #18181b;
  --rightel-purple: #9333ea;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.09), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.75;
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

img, svg {
  vertical-align: middle;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Site Header */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #0f9fa8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.brand-text strong {
  display: block;
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.brand-text small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: -2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: #475569;
}

.nav-link:hover {
  background: var(--bg-subtle);
  color: var(--primary);
}

.nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
  color: var(--text-main);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #0d9488 100%);
  border-radius: var(--radius-lg);
  color: #fff;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.25);
  margin-bottom: 36px;
}

.hero::after {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  left: -120px;
  top: -120px;
  box-shadow: 0 0 0 40px rgba(255, 255, 255, 0.04), 0 0 0 80px rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 600;
  backdrop-filter: blur(6px);
}

.hero h1 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.45;
  margin-top: 16px;
}

.hero p {
  font-size: 15px;
  color: #cbd5e1;
  margin-top: 12px;
  line-height: 1.8;
}

.hero-search {
  display: flex;
  background: #fff;
  padding: 6px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  margin-top: 24px;
  gap: 8px;
  max-width: 600px;
}

.hero-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-main);
  background: transparent;
}

.hero-search button {
  background: var(--primary);
  color: #fff;
  border: none;
  outline: none;
  border-radius: 10px;
  padding: 10px 22px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.hero-search button:hover {
  background: var(--primary-hover);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-stat-number {
  font-size: 20px;
  font-weight: 800;
  color: #38bdf8;
}

.hero-stat-label {
  font-size: 12px;
  color: #94a3b8;
}

/* Sections & Typography */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 36px 0 18px;
}

.section-head h2, .section-head h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.section-head p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Cards & Panels */
.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  position: relative;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  transition: all 0.2s;
}

.quick-link:hover {
  border-color: var(--primary);
  background: #f8faff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quick-link-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
}

.quick-link-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.grid-3, .grid-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.grid-4, .grid-four {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
}

.badge-success { background: var(--success-light); color: var(--success-text); }
.badge-warning { background: var(--warning-light); color: var(--warning-text); }
.badge-danger  { background: var(--danger-light);  color: var(--danger-text);  }
.badge-info    { background: var(--info-light);    color: var(--info-text);    }
.badge-muted   { background: var(--bg-subtle);     color: var(--text-muted);   }

.badge-mci {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-mtn {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-rightel {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.badge-other {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.badge-rond {
  background: linear-gradient(135deg, #fef08a, #facc15);
  color: #713f12;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(234, 179, 8, 0.3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary, .account-link {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary:hover, .account-link:hover {
  background: var(--primary-hover);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-soft {
  background: var(--primary-light);
  color: var(--primary-text);
}

.btn-soft:hover {
  background: #dbeafe;
  color: var(--primary-hover);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: #475569;
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f8faff;
}

.btn-danger {
  background: var(--danger-light);
  color: var(--danger-text);
  border-color: #fca5a5;
}

.btn-danger:hover {
  background: #fee2e2;
}

.btn-sm {
  padding: 5px 11px;
  font-size: 12px;
  border-radius: 6px;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.field input, .field select, .field textarea, .filter-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  background: #fff;
  outline: none;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-main);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus, .field select:focus, .field textarea:focus, .filter-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.field textarea {
  min-height: 100px;
  resize: vertical;
}

.field-help {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
  font-size: 13.5px;
}

th, td {
  text-align: right;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.2px;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: #fafcff;
}

/* Notices & Alerts */
.alerts-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid transparent;
}

.alert-success { background: var(--success-light); border-color: #a7f3d0; color: var(--success-text); }
.alert-danger  { background: var(--danger-light);  border-color: #fecaca; color: var(--danger-text);  }
.alert-warning { background: var(--warning-light); border-color: #fde68a; color: var(--warning-text); }
.alert-info    { background: var(--info-light);    border-color: #bae6fd; color: var(--info-text);    }

.notice {
  background: var(--success-light);
  border: 1px solid #a7f3d0;
  color: var(--success-text);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
}

.warning {
  background: var(--warning-light);
  border: 1px solid #fde68a;
  color: var(--warning-text);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.8;
}

/* SIM Card Listings */
.sim-number {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 1.5px;
  direction: ltr;
  text-align: center;
  color: var(--text-main);
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed #cbd5e1;
  margin: 12px 0;
  font-family: 'Consolas', 'Courier New', monospace;
}

.sim-price {
  font-size: 17px;
  font-weight: 800;
  color: #059669;
}

.score-bar-wrap {
  background: #e2e8f0;
  height: 6px;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
}

.score-bar-fill {
  background: linear-gradient(90deg, #3b82f6, #10b981);
  height: 100%;
}

/* Tabs */
.tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--primary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Receipt Card (Appointment) */
.receipt-card {
  background: #ffffff;
  border: 2px dashed #3b82f6;
  border-radius: var(--radius-md);
  padding: 28px;
  max-width: 620px;
  margin: 20px auto;
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.08);
}

.receipt-header {
  text-align: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.tracking-badge {
  display: inline-block;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-family: monospace;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 6px 18px;
  border-radius: var(--radius-sm);
  margin-top: 10px;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13.5px;
}

.receipt-row .label {
  color: var(--text-muted);
}

.receipt-row .value {
  font-weight: 700;
  color: var(--text-main);
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #fff;
  margin-top: auto;
  padding-top: 50px;
  border-top: 1px solid #1e293b;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 30px;
  padding-bottom: 40px;
}

.footer-col h3 {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 14px;
}

.footer-col p {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 13px;
  color: #94a3b8;
}

.footer-links a:hover {
  color: #38bdf8;
  padding-right: 4px;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #1e293b;
  padding: 16px 0;
  color: #64748b;
  font-size: 12px;
}

/* Responsive */
@media (max-width: 1024px) {
  .grid-4, .grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .mobile-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  }
  .main-nav.open {
    display: flex;
  }
  .grid-3, .grid-cards, .grid-2, .form-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 30px 20px;
  }
  .hero-search {
    flex-direction: column;
  }
  .hero-search button {
    width: 100%;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .btn, .no-print { display: none !important; }
  .receipt-card { box-shadow: none; border: 1px solid #000; width: 100%; max-width: 100%; }
}
