@font-face {
  font-family: 'IRANSansX';
  src: url('../fonts/IRANSansXFaNum-Regular.woff2') format('woff2'),
       url('../fonts/IRANSansXFaNum-Regular.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IRANSansX';
  src: url('../fonts/IRANSansXFaNum-Bold.woff2') format('woff2'),
       url('../fonts/IRANSansXFaNum-Bold.woff') format('woff');
  font-weight: 700;
  font-display: swap;
}

:root {
  --blue-50: #E6F1FB;
  --blue-100: #B5D4F4;
  --blue-200: #85B7EB;
  --blue-400: #378ADD;
  --blue-500: #1F6FC4;
  --blue-600: #185FA5;
  --blue-800: #0C447C;
  --blue-900: #042C53;

  --teal-50: #E1F5EE;
  --teal-600: #0F6E56;
  --teal-800: #04342C;

  --amber-50: #FAEEDA;
  --amber-600: #BA7517;
  --amber-800: #633806;

  --red-50: #FCEBEB;
  --red-600: #A32D2D;
  --red-800: #501313;

  --gray-50: #F7F8FA;
  --gray-100: #EEF1F5;
  --gray-200: #E2E7EE;
  --gray-300: #CBD3DE;
  --gray-400: #94A1B2;
  --gray-500: #64748B;
  --gray-700: #334155;
  --gray-900: #0F1B2D;

  --bg: #F4F7FB;
  --surface: #FFFFFF;
  --text: #1A2B42;
  --text-muted: #64748B;
  --text-light: #94A1B2;
  --border: #E2E7EE;
  --primary: #185FA5;
  --primary-hover: #0C447C;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(16,40,80,0.06);
  --shadow: 0 4px 16px rgba(16,40,80,0.08);
  --shadow-lg: 0 12px 40px rgba(16,40,80,0.12);
  --sidebar-w: 248px;
}

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

html, body {
  font-family: 'IRANSansX', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== LAYOUT ===== */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-left: 1px solid var(--border);
  position: fixed;
  top: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  z-index: 50;
  transition: transform 0.25s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.brand-logo {
  width: 38px; height: 38px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px;
}
.brand-name { font-weight: 700; font-size: 19px; color: var(--text); }
.brand-sub { font-size: 11px; color: var(--text-light); }

.nav { flex: 1; padding: 0 12px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14.5px;
  margin-bottom: 4px;
  transition: all 0.15s;
  width: 100%;
  text-align: right;
}
.nav-item:hover { background: var(--gray-50); color: var(--text); }
.nav-item.active { background: var(--blue-50); color: var(--primary); font-weight: 700; }
.nav-item i { font-size: 20px; width: 22px; text-align: center; }

.nav-footer { padding: 16px 12px 0; border-top: 1px solid var(--border); }
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--blue-50); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.user-chip .name { font-size: 13.5px; font-weight: 700; }
.user-chip .role { font-size: 11.5px; color: var(--text-light); }

.main {
  flex: 1;
  margin-right: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 40;
}
.topbar-title h1 { font-size: 21px; font-weight: 700; }
.topbar-title p { font-size: 13px; color: var(--text-muted); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.menu-toggle { display: none; font-size: 24px; color: var(--text); }

.content { padding: 28px 32px; flex: 1; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700;
  transition: all 0.15s;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.btn:hover { background: var(--gray-50); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn i { font-size: 18px; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--gray-50); }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-icon {
  width: 40px; height: 40px; padding: 0;
  justify-content: center; border-radius: var(--radius-sm);
}

/* ===== CARDS ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.card-title { font-size: 16px; font-weight: 700; }
.card-sub { font-size: 12.5px; color: var(--text-muted); }

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

/* ===== STAT CARDS ===== */
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.stat-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px;
}
.stat-icon.blue { background: var(--blue-50); color: var(--blue-600); }
.stat-icon.teal { background: var(--teal-50); color: var(--teal-600); }
.stat-icon.amber { background: var(--amber-50); color: var(--amber-600); }
.stat-icon.red { background: var(--red-50); color: var(--red-600); }
.stat-label { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.stat-value { font-size: 27px; font-weight: 700; line-height: 1.2; }
.stat-trend { font-size: 12px; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.trend-up { color: var(--teal-600); }
.trend-down { color: var(--red-600); }

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700;
}
.badge.green { background: var(--teal-50); color: var(--teal-600); }
.badge.blue { background: var(--blue-50); color: var(--blue-600); }
.badge.amber { background: var(--amber-50); color: var(--amber-600); }
.badge.red { background: var(--red-50); color: var(--red-600); }
.badge.gray { background: var(--gray-100); color: var(--gray-500); }
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ===== TIMELINE ===== */
.timeline-grid { display: grid; grid-template-columns: 60px 1fr 1fr; gap: 10px; }
.tl-head { font-size: 13px; font-weight: 700; color: var(--text-muted); text-align: center; padding-bottom: 8px; }
.tl-time { font-size: 12.5px; color: var(--text-light); padding-top: 8px; }
.tl-slot {
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin-bottom: 8px;
  border-right: 3px solid;
  cursor: pointer;
  transition: all 0.15s;
}
.tl-slot:hover { transform: translateX(-3px); box-shadow: var(--shadow-sm); }
.tl-slot .pname { font-size: 13px; font-weight: 700; }
.tl-slot .pmeta { font-size: 11.5px; opacity: 0.85; }
.tl-slot.s-confirmed { background: var(--teal-50); border-color: var(--teal-600); color: var(--teal-800); }
.tl-slot.s-pending { background: var(--amber-50); border-color: var(--amber-600); color: var(--amber-800); }
.tl-slot.s-booked { background: var(--blue-50); border-color: var(--blue-600); color: var(--blue-900); }
.tl-slot.s-noshow { background: var(--red-50); border-color: var(--red-600); color: var(--red-800); }
.tl-slot.s-empty {
  background: var(--gray-50);
  border: 1px dashed var(--gray-300);
  color: var(--text-light);
  text-align: center;
  font-size: 12.5px;
  display: flex; align-items: center; justify-content: center;
}
.tl-slot.s-empty:hover { background: var(--blue-50); color: var(--primary); border-color: var(--blue-200); }

/* ===== ALERTS ===== */
.alert-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.alert-item:last-child { border-bottom: none; }
.alert-ico {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.alert-ico.amber { background: var(--amber-50); color: var(--amber-600); }
.alert-ico.red { background: var(--red-50); color: var(--red-600); }
.alert-ico.blue { background: var(--blue-50); color: var(--blue-600); }
.alert-item .at { font-size: 13.5px; font-weight: 700; }
.alert-item .ad { font-size: 12px; color: var(--text-muted); }

.quick-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: right;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  color: var(--text);
  font-size: 13.5px; font-weight: 700;
  margin-bottom: 8px;
  transition: all 0.15s;
}
.quick-btn:hover { background: var(--blue-50); color: var(--primary); }
.quick-btn i { font-size: 19px; }

/* ===== TABLE ===== */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: right;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--gray-50);
}
.table th:first-child { border-radius: 0 var(--radius-sm) 0 0; }
.table th:last-child { border-radius: var(--radius-sm) 0 0 0; }
.table td {
  padding: 14px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background 0.12s; }
.table tbody tr:hover { background: var(--gray-50); }

.pt-cell { display: flex; align-items: center; gap: 10px; }
.pt-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue-50); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700;
}

/* ===== CALENDAR ===== */
.cal-grid {
  display: grid;
  grid-template-columns: 70px repeat(2, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cal-cell { border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); min-height: 70px; padding: 6px; position: relative; }
.cal-cell:last-child { border-left: none; }
.cal-time { font-size: 12px; color: var(--text-light); padding: 8px; text-align: center; background: var(--gray-50); border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); }
.cal-colhead { padding: 14px; text-align: center; font-weight: 700; font-size: 14px; background: var(--gray-50); border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); }
.cal-colhead:last-child { border-left: none; }
.cal-corner { background: var(--gray-50); border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); }
.cal-appt {
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 11.5px;
  cursor: grab;
  border-right: 3px solid;
  margin-bottom: 4px;
}
.cal-appt:active { cursor: grabbing; }
.cal-appt.s-confirmed { background: var(--teal-50); border-color: var(--teal-600); color: var(--teal-800); }
.cal-appt.s-booked { background: var(--blue-50); border-color: var(--blue-600); color: var(--blue-900); }
.cal-appt.s-pending { background: var(--amber-50); border-color: var(--amber-600); color: var(--amber-800); }
.cal-appt.s-blocked { background: var(--gray-100); border-color: var(--gray-400); color: var(--gray-700); }
.cal-appt .ct { font-weight: 700; }
.cal-cell.drop-target { background: var(--blue-50); outline: 2px dashed var(--blue-200); outline-offset: -2px; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,27,45,0.5);
  display: none;
  align-items: center; justify-content: center;
  z-index: 200;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; animation: fade 0.2s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface);
  border-radius: 16px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: pop 0.22s;
}
@keyframes pop { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 17px; font-weight: 700; }
.modal-body { padding: 24px; }
.modal-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-start;
}

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
  transition: border 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--blue-50);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ===== CHART ===== */
.bar-chart { display: flex; align-items: flex-end; gap: 14px; height: 220px; padding-top: 20px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar {
  width: 100%;
  max-width: 46px;
  background: var(--blue-200);
  border-radius: 6px 6px 0 0;
  transition: all 0.4s ease;
  position: relative;
}
.bar.hi { background: var(--primary); }
.bar:hover { background: var(--blue-600); }
.bar-label { font-size: 12px; color: var(--text-muted); }
.bar-val { font-size: 12px; font-weight: 700; }

.donut-wrap { display: flex; align-items: center; gap: 24px; }
.donut { width: 150px; height: 150px; flex-shrink: 0; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 10px; }
.legend-dot { width: 11px; height: 11px; border-radius: 3px; }

/* ===== PATIENT PROFILE ===== */
.profile-head {
  display: flex; align-items: center; gap: 18px;
  padding-bottom: 22px; border-bottom: 1px solid var(--border); margin-bottom: 22px;
}
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--blue-50); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700;
}
.profile-name { font-size: 22px; font-weight: 700; }
.profile-meta { font-size: 13.5px; color: var(--text-muted); }
.info-row { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.info-row:last-child { border-bottom: none; }
.info-row .k { color: var(--text-muted); }
.info-row .v { font-weight: 700; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab {
  padding: 11px 18px;
  font-size: 14px; font-weight: 700;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade 0.25s; }

.timeline-v { position: relative; padding-right: 24px; }
.timeline-v::before { content: ''; position: absolute; right: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.tv-item { position: relative; padding-bottom: 22px; }
.tv-item::before {
  content: ''; position: absolute; right: -22px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary); border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--blue-100);
}
.tv-date { font-size: 12px; color: var(--text-light); }
.tv-title { font-size: 14px; font-weight: 700; margin: 2px 0; }
.tv-desc { font-size: 13px; color: var(--text-muted); }

.lock-note {
  display: flex; align-items: center; gap: 8px;
  background: var(--amber-50); color: var(--amber-800);
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 12.5px; margin-bottom: 16px;
}

/* ===== TOAST ===== */
.toast-wrap { position: fixed; bottom: 24px; left: 24px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--gray-900); color: #fff;
  padding: 13px 20px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: slideup 0.3s;
}
.toast.success { background: var(--teal-600); }
.toast.info { background: var(--primary); }
@keyframes slideup { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ===== SETTINGS ===== */
.toggle { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--gray-300); border-radius: 26px; transition: 0.2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 20px; height: 20px; right: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: 0.2s;
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(-20px); }
.set-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.set-row:last-child { border-bottom: none; }
.set-row .st { font-size: 14px; font-weight: 700; }
.set-row .sd { font-size: 12.5px; color: var(--text-muted); }

.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  width: 280px;
}
.search-box input { border: none; background: none; outline: none; flex: 1; font-size: 13.5px; color: var(--text); }
.search-box i { color: var(--text-light); font-size: 18px; }

.page { display: none; }
.page.active { display: block; animation: fade 0.3s; }

.empty-state { text-align: center; padding: 50px 20px; color: var(--text-light); }
.empty-state i { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-right: 0; }
  .menu-toggle { display: block; }
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .content { padding: 20px 16px; }
  .topbar { padding: 14px 16px; }
  .dash-cols { grid-template-columns: 1fr !important; }
  .search-box { width: 100%; }
}

/* ===== LOGIN PAGE ===== */
.login-screen {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #0C447C 0%, #185FA5 60%, #378ADD 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.login-screen.hidden { display: none; }
.login-box {
  background: var(--surface);
  border-radius: 18px;
  width: 100%; max-width: 410px;
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
  animation: pop 0.3s;
}
.login-logo {
  width: 60px; height: 60px;
  background: var(--primary);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 32px;
  margin: 0 auto 18px;
}
.login-box h2 { text-align: center; font-size: 23px; margin-bottom: 4px; }
.login-box .sub { text-align: center; color: var(--text-muted); font-size: 13.5px; margin-bottom: 28px; }
.login-hint {
  background: var(--blue-50); color: var(--blue-800);
  font-size: 12px; padding: 10px 14px;
  border-radius: var(--radius-sm); margin-bottom: 20px; line-height: 1.9;
}
.login-error {
  background: var(--red-50); color: var(--red-600);
  font-size: 13px; padding: 10px 14px;
  border-radius: var(--radius-sm); margin-bottom: 16px;
  display: none; align-items: center; gap: 8px;
}
.login-error.show { display: flex; }

/* ===== ROLE BADGE ===== */
.role-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 11px; border-radius: 20px;
  font-size: 11.5px; font-weight: 700;
}
.role-badge.manager { background: var(--amber-50); color: var(--amber-600); }
.role-badge.reception { background: var(--blue-50); color: var(--blue-600); }

.nav-item.locked { opacity: 0.4; cursor: not-allowed; }
.nav-item.locked:hover { background: none; color: var(--text-muted); }

/* ===== PROFILE PAGE ===== */
.profile-card-big {
  display: flex; align-items: center; gap: 20px;
  padding-bottom: 24px; border-bottom: 1px solid var(--border); margin-bottom: 24px;
}
.profile-xl {
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--blue-50); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700;
}

/* ===== PATIENT LIST ===== */
.list-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; gap: 14px; flex-wrap: wrap;
}
.clickable-row { cursor: pointer; }
.row-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text-muted);
  border: 1px solid var(--border); background: var(--surface);
  transition: all 0.15s;
}
.icon-btn:hover { background: var(--gray-50); color: var(--text); }
.icon-btn.danger:hover { background: var(--red-50); color: var(--red-600); border-color: var(--red-600); }
.icon-btn.edit:hover { background: var(--blue-50); color: var(--primary); border-color: var(--primary); }

.file-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 11px; border-radius: 20px;
  font-size: 11.5px; font-weight: 700;
}
.file-status.done { background: var(--teal-50); color: var(--teal-600); }
.file-status.pending { background: var(--amber-50); color: var(--amber-600); }

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 700; color: var(--primary);
  margin-bottom: 16px;
}
.back-link:hover { text-decoration: underline; }

/* ===== DATE PICKER ===== */
.dp-wrap { position: relative; }
.dp-pop {
  position: absolute; top: 100%; right: 0; margin-top: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 16px; width: 280px; z-index: 100;
  display: none;
}
.dp-pop.open { display: block; animation: fade 0.15s; }
.dp-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.dp-head .m { font-weight: 700; font-size: 14px; }
.dp-nav {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); font-size: 15px;
}
.dp-nav:hover { background: var(--gray-50); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-dow { text-align: center; font-size: 11px; color: var(--text-light); padding: 6px 0; font-weight: 700; }
.dp-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; border-radius: 7px; cursor: pointer;
}
.dp-day:hover { background: var(--blue-50); color: var(--primary); }
.dp-day.sel { background: var(--primary); color: #fff; font-weight: 700; }
.dp-day.empty { cursor: default; }
.dp-day.empty:hover { background: none; }

@media (max-width: 860px) {
  .profile-card-big { flex-direction: column; text-align: center; }
}
.mf-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.mf-icon svg {
  width: 1.25em;
  height: 1.25em;
  display: inline-block;
  vertical-align: -0.125em;
}
/* اندازه آیکون‌ها در دکمه‌ها و منوها */
.nav-item .mf-icon svg { width: 25px; height: 25px; }
.btn .mf-icon svg { width: 22px; height: 22px; }
.btn-icon .mf-icon svg { width: 25px; height: 25px; }
.stat-icon .mf-icon svg { width: 26px; height: 26px; }
.brand-logo .mf-icon svg { width: 25px; height: 25px; }
.alert-ico .mf-icon svg { width: 22px; height: 22px; }
.icon-btn .mf-icon svg { width: 20px; height: 20px; }
.quick-btn .mf-icon svg { width: 24px; height: 24px; }
.login-logo .mf-icon svg { width: 40px; height: 40px; }
.dp-nav .mf-icon svg { width: 19px; height: 19px; }
.search-box .mf-icon svg { width: 22px; height: 22px; }
.tv-item .mf-icon svg, .timeline-v .mf-icon svg { width: 18px; height: 18px; }
