:root {
  --efsw-navy: #102a46;
  --efsw-navy-2: #173d63;
  --efsw-blue: #1677ff;
  --efsw-green: #159a62;
  --efsw-bg: #f4f6f9;
  --efsw-surface: #ffffff;
  --efsw-soft: #f8fafc;
  --efsw-line: #dde5ee;
  --efsw-line-soft: #edf1f5;
  --efsw-text: #172234;
  --efsw-muted: #66758a;
  --efsw-radius: 7px;
  --efsw-radius-lg: 9px;
  --efsw-control-h: 34px;
}

.efsw-app,
.efsw-login,
.efsw-tracking,
.efsw-receipt,
.efsw-print-root {
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
  color: var(--efsw-text);
  font-size: 12.5px;
  line-height: 1.55;
}
.efsw-app *,
.efsw-login *,
.efsw-tracking * { box-sizing: border-box; }

/* Shell */
.efsw-app {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  overflow: hidden !important;
  background: var(--efsw-bg) !important;
}
.admin-bar .efsw-app {
  top: 32px !important;
  height: calc(100vh - 32px) !important;
}
.efsw-main {
  margin-right: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  overflow: auto !important;
  background: var(--efsw-bg) !important;
}
.efsw-top {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 42px;
  padding: 0 14px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--efsw-line);
  background: #fff;
}
.efsw-top a { text-decoration: none; }
.efsw-top-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: #16324d;
  white-space: nowrap;
}
.efsw-top-brand b { font-size: 11.5px; }
.efsw-top-brand span { color: var(--efsw-muted); font-size: 9.5px; }
.efsw-top-nav {
  min-width: 0;
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
  height: 42px;
  overflow-x: auto;
  scrollbar-width: none;
}
.efsw-top-nav::-webkit-scrollbar { display: none; }
.efsw-top-nav a {
  height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-bottom: 2px solid transparent;
  color: #5b6c80;
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
}
.efsw-top-nav a:hover,
.efsw-top-nav a.active { color: #176ac8; border-bottom-color: #1677ff; background: #f8fbff; }
.efsw-top-track {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid #d8e1ea;
  border-radius: 6px;
  background: #fff;
  color: #29445f;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.efsw-content {
  width: 100% !important;
  max-width: 1360px !important;
  margin: 0 auto !important;
  padding: 10px 14px 24px !important;
}

/* Page header / toolbar */
.efsw-head,
.efsw-head.efsw-head-compact {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 7px;
}
.efsw-head h1 {
  margin: 0 0 2px;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 750;
  color: #111d2d;
}
.efsw-head h1 .status { vertical-align: middle; margin-right: 5px; }
.efsw-head small {
  display: inline-block;
  margin-bottom: 3px;
  color: var(--efsw-blue);
  font-size: 10px;
  font-weight: 700;
}
.efsw-head p { margin: 0; color: var(--efsw-muted); font-size: 10.5px; line-height: 1.65; }
.efsw-head-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.efsw-button,
.efsw-filters button,
.efsw-quick-search button {
  min-height: var(--efsw-control-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 11px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--efsw-blue);
  color: #fff !important;
  text-decoration: none;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: none;
}
.efsw-button:hover { filter: brightness(.97); }
.efsw-button-secondary {
  border-color: #d5dee8 !important;
  background: #fff !important;
  color: #29445f !important;
}
.efsw-search-submit {
  min-width: 72px;
  border-color: #1677ff !important;
  background: #1677ff !important;
  color: #fff !important;
  white-space: nowrap;
}
.efsw-search-submit span { display: inline !important; visibility: visible !important; color: #fff !important; opacity: 1 !important; }
.efsw-toolbar,
.efsw-toolbar-dashboard {
  margin: 0 0 7px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}
.efsw-quick-search {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}
.efsw-filters {
  margin: 0 0 9px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 170px auto;
  gap: 6px;
  align-items: center;
}
.efsw-quick-search input,
.efsw-filters input,
.efsw-filters select {
  width: 100% !important;
  min-width: 0 !important;
  height: var(--efsw-control-h) !important;
  min-height: var(--efsw-control-h) !important;
  margin: 0 !important;
  padding: 6px 9px !important;
  border: 1px solid #d5dee8 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: var(--efsw-text) !important;
  font-family: inherit !important;
  font-size: 11.5px !important;
  box-shadow: none !important;
}

/* Cards / KPI */
.efsw-card {
  background: #fff !important;
  border: 1px solid var(--efsw-line) !important;
  border-radius: var(--efsw-radius-lg) !important;
  box-shadow: none !important;
}
.efsw-stats {
  margin: 0 0 7px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 6px;
}
.efsw-stat-card,
.efsw-stats > div {
  min-height: 54px;
  padding: 6px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--efsw-line);
  border-radius: 7px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}
.efsw-stat-card:hover { border-color: #c4d1df; background: #fbfdff; }
.efsw-stat-label,
.efsw-stats span { color: #586b82; font-size: 10.5px; font-weight: 700; }
.efsw-stat-card b,
.efsw-stats b { color: #102139; font-size: 22px; line-height: 1; font-weight: 800; }
.efsw-stat-card small { display: none; }

.efsw-card-title {
  min-height: 34px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--efsw-line-soft);
}
.efsw-card-title-flex { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.efsw-card-title-flex > div { display: flex; align-items: baseline; gap: 7px; }
.efsw-card-title h2 { margin: 0; font-size: 11.5px; font-weight: 750; }
.efsw-card-title small { color: var(--efsw-muted); font-size: 9.5px; }
.efsw-card-link { color: var(--efsw-blue); text-decoration: none; font-size: 10px; font-weight: 700; }

/* Tables */
.efsw-table-wrap { overflow: auto; }
.efsw-data-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  table-layout: fixed;
}
.efsw-data-table thead th {
  padding: 7px 10px;
  border-bottom: 1px solid var(--efsw-line);
  background: #f8fafc;
  color: #617188;
  text-align: right;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 700;
  white-space: nowrap;
}
.efsw-data-table tbody td {
  height: 44px;
  padding: 5px 9px;
  border-bottom: 1px solid var(--efsw-line-soft);
  background: #fff;
  vertical-align: middle;
  font-size: 11.5px;
  line-height: 1.45;
}
.efsw-data-table tbody tr:last-child td { border-bottom: 0; }
.efsw-data-table tbody tr:hover td { background: #fcfdff; }
.efsw-data-table th:nth-child(1), .efsw-data-table td:nth-child(1) { width: 135px; }
.efsw-data-table th:nth-child(3), .efsw-data-table td:nth-child(3) { width: 105px; }
.efsw-data-table th:nth-child(4), .efsw-data-table td:nth-child(4) { width: 125px; }
.efsw-data-table th:nth-child(5), .efsw-data-table td:nth-child(5) { width: 80px; }
.efsw-col-number bdi { color: #1d4f86; font-size: 11.5px; font-weight: 800; direction: ltr; unicode-bidi: isolate; }
.efsw-primary { margin-bottom: 1px; color: #172234; font-size: 11.5px; font-weight: 750; line-height: 1.35; }
.efsw-meta { color: #5f7188; font-size: 9.8px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.efsw-col-date { color: #34475c; white-space: nowrap; font-variant-numeric: tabular-nums; }
.status {
  width: max-content;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  font-style: normal;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.status.received { background: #e7f2ff; color: #176ac8; }
.status.technical { background: #fff0d3; color: #966006; }
.status.parts { background: #eee9ff; color: #6643bb; }
.status.ready { background: #dcf7ea; color: #08764a; }
.status.delivered { background: #e3f7f3; color: #08746b; }
.status.rejected { background: #ffe8e8; color: #b22d2d; }
.efsw-row-action {
  min-width: 62px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border: 1px solid #d8e1eb;
  border-radius: 6px;
  background: #fff;
  color: #1d4f87;
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
}
.empty { margin: 0; padding: 13px 11px; color: var(--efsw-muted); font-size: 10.5px; }

/* Forms */
.efsw-case-form {
  width: 100% !important;
  margin: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0,1fr) 230px !important;
  gap: 9px !important;
  align-items: start !important;
}
.form-section {
  width: 100% !important;
  margin: 0 0 8px !important;
  padding: 11px !important;
  display: grid !important;
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  gap: 8px !important;
}
.section-heading {
  grid-column: 1 / -1;
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--efsw-line-soft);
}
.section-heading i {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: #e9f3ff;
  color: var(--efsw-blue);
  font-style: normal;
  font-size: 9.5px;
  font-weight: 700;
}
.section-heading h2 { margin: 0; font-size: 11.5px; }
.form-section label,
.case-action label,
.efsw-tracking label {
  width: 100% !important;
  margin: 0 !important;
  display: grid !important;
  gap: 4px !important;
  color: #26384d !important;
  font-size: 10.5px !important;
  font-weight: 650 !important;
}
.form-section input,
.form-section select,
.form-section textarea,
.case-action select,
.case-action textarea,
.notes textarea,
.notes select,
.efsw-tracking input,
.efsw-login input {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  border: 1px solid #d7e0e9 !important;
  border-radius: 6px !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--efsw-text) !important;
  font-family: inherit !important;
  font-size: 11px !important;
}
.form-section input,
.form-section select,
.case-action select,
.notes select,
.efsw-tracking input,
.efsw-login input {
  height: 34px !important;
  min-height: 34px !important;
  padding: 5px 8px !important;
}
.form-section textarea,
.case-action textarea,
.notes textarea {
  min-height: 66px !important;
  padding: 7px 8px !important;
  line-height: 1.55;
  resize: vertical;
}
.wide { grid-column: 1 / -1 !important; }
.checks {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 5px;
}
.checks label {
  min-height: 31px;
  display: flex !important;
  align-items: center;
  gap: 5px !important;
  padding: 5px 7px;
  border: 1px solid var(--efsw-line);
  border-radius: 6px;
  background: #fff;
}
.checks input { width: auto !important; height: auto !important; min-height: 0 !important; margin: 0 !important; }
.efsw-summary {
  position: sticky;
  top: 52px;
  width: 100%;
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--efsw-navy);
  color: #fff;
}
.efsw-summary > small { color: #9cb0c3; font-size: 9.5px; }
.efsw-summary > bdi { display: block; margin: 3px 0 9px; font-size: 16px; font-weight: 750; }
.efsw-summary hr { margin: 8px 0; border: 0; border-top: 1px solid rgba(255,255,255,.1); }
.efsw-summary p { margin: 7px 0; display: flex; justify-content: space-between; gap: 7px; font-size: 9.5px; }
.efsw-summary p b { color: #91a7bc; }
.efsw-summary .efsw-button { width: 100%; margin-top: 7px; }

/* Case detail */
.efsw-breadcrumb {
  min-height: 24px;
  margin: 0 0 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #748398;
  font-size: 9.5px;
}
.efsw-breadcrumb a { color: #176ac8; text-decoration: none; font-weight: 700; }
.efsw-breadcrumb bdi { direction: ltr; unicode-bidi: isolate; }
.efsw-case-head { margin-bottom: 7px !important; }
.efsw-case-grid { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 8px; align-items: start; }
.efsw-case-main { min-width: 0; display: grid; gap: 7px; }
.efsw-case-aside { min-width: 0; }
.efsw-details-card,
.efsw-notes-card { padding: 0 !important; overflow: hidden; }
.efsw-section-title {
  min-height: 32px;
  padding: 6px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--efsw-line-soft);
}
.efsw-section-title > div { display: flex; align-items: baseline; gap: 6px; }
.efsw-section-title h2 { margin: 0; font-size: 11px; font-weight: 750; }
.efsw-section-title small { color: var(--efsw-muted); font-size: 9px; }
.efsw-detail-list {
  margin: 0;
  padding: 2px 9px;
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  column-gap: 14px;
}
.efsw-detail-list > div {
  min-width: 0;
  min-height: 38px;
  padding: 6px 0;
  display: grid;
  grid-template-columns: minmax(68px,auto) minmax(0,1fr);
  gap: 7px;
  align-items: center;
  border-bottom: 1px solid #f0f3f7;
}
.efsw-detail-list dt { color: #718095; font-size: 9.5px; font-weight: 500; }
.efsw-detail-list dd { min-width: 0; margin: 0; color: #172234; font-size: 10.5px; font-weight: 700; overflow-wrap: anywhere; }
.efsw-issue-line {
  margin: 5px 9px 8px;
  min-height: 34px;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: 92px minmax(0,1fr);
  gap: 8px;
  align-items: start;
  border-radius: 5px;
  background: #f7f9fb;
  font-size: 10px;
  line-height: 1.55;
}
.efsw-issue-line b { color: #35485e; }
.efsw-issue-line span { color: #24384e; }
.efsw-notes-list { padding: 0 9px; }
.efsw-notes-list article { padding: 6px 0; border-bottom: 1px solid var(--efsw-line-soft); }
.efsw-notes-list article > div { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.efsw-notes-list article b { font-size: 10px; }
.efsw-notes-list article small { color: var(--efsw-muted); font-size: 8.8px; }
.efsw-notes-list article p { margin: 4px 0 0; color: #32465c; font-size: 10px; line-height: 1.55; }
.efsw-disclosure { border: 0; }
.efsw-disclosure > summary,
.efsw-note-composer > summary {
  min-height: 32px;
  padding: 6px 9px;
  display: flex;
  align-items: center;
  color: #176ac8;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}
.efsw-disclosure > summary::-webkit-details-marker,
.efsw-note-composer > summary::-webkit-details-marker,
.efsw-field-disclosure > summary::-webkit-details-marker { display: none; }
.efsw-note-composer { border-top: 1px solid var(--efsw-line-soft); }
.efsw-note-composer form { padding: 0 9px 8px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px; }
.efsw-note-composer textarea { grid-column: 1 / -1; min-height: 58px !important; }
.efsw-disclosure-body { padding: 0 9px 6px; border-top: 1px solid var(--efsw-line-soft); }
.case-action {
  position: sticky;
  top: 50px;
  padding: 0 9px 9px !important;
  display: grid;
  gap: 6px;
  overflow: hidden;
}
.case-action > .efsw-section-title { margin: 0 -9px 1px; }
.case-action label { gap: 3px !important; }
.case-action select { height: 32px !important; min-height: 32px !important; }
.efsw-field-disclosure {
  border: 1px solid #e1e7ee;
  border-radius: 6px;
  background: #fbfcfd;
  overflow: hidden;
}
.efsw-field-disclosure > summary {
  min-height: 34px;
  padding: 5px 7px;
  display: grid;
  gap: 1px;
  cursor: pointer;
  list-style: none;
}
.efsw-field-disclosure > summary span { color: #33485e; font-size: 9.8px; font-weight: 700; }
.efsw-field-disclosure > summary small { color: #7a8798; font-size: 8.8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.efsw-field-disclosure textarea { min-height: 56px !important; border: 0 !important; border-top: 1px solid #e8edf3 !important; border-radius: 0 !important; }
.efsw-save-action { width: 100%; margin-top: 1px; }
.visibility-options { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.visibility-options label {
  min-height: 28px;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 3px 6px;
  border: 1px solid #dce3eb;
  border-radius: 5px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  font-size: 9.2px !important;
}
.visibility-options input {
  position: static !important;
  width: 13px !important;
  min-width: 13px !important;
  height: 13px !important;
  min-height: 13px !important;
  margin: 0 !important;
  opacity: 1 !important;
  accent-color: var(--efsw-blue);
}
.visibility-options input:checked + span { color: #135fac; font-weight: 700; }

/* Notices */
.efsw-notice { margin: 0 0 8px; padding: 7px 9px; border-radius: 6px; background: #e7f7ef; color: #08754a; font-size: 10.5px; }
.efsw-notice.error { background: #ffeaea; color: #aa2929; }

/* SMS history within case */
.efsw-sms-card { margin-top: 0; }
.efsw-sms-history { display: grid; }
.efsw-sms-history-row {
  min-height: 38px;
  padding: 5px 0;
  display: grid;
  grid-template-columns: minmax(125px,.8fr) auto minmax(180px,1.7fr);
  gap: 7px;
  align-items: center;
  border-bottom: 1px solid var(--efsw-line-soft);
}
.efsw-sms-history-row:last-child { border-bottom: 0; }
.efsw-sms-history-row > span { display: grid; gap: 1px; }
.efsw-sms-history-row > span b { font-size: 10px; }
.efsw-sms-history-row > span small,
.efsw-sms-history-row > small { color: #6b7280; font-size: 9px; line-height: 1.45; }
.efsw-sms-history-row > i { padding: 3px 6px; border-radius: 999px; font-style: normal; font-size: 9px; font-weight: 700; white-space: nowrap; }
.efsw-sms-sent { background: #dcfce7; color: #166534; }
.efsw-sms-pending, .efsw-sms-processing { background: #fef3c7; color: #92400e; }
.efsw-sms-failed, .efsw-sms-indeterminate { background: #fee2e2; color: #991b1b; }
.efsw-sms-cancelled { background: #eef2f6; color: #576574; }

/* Login */
.efsw-login { min-height: 100vh; display: grid; grid-template-columns: minmax(320px,.85fr) 1fr; background: #fff; }
.efsw-login > section:first-child {
  padding: clamp(36px,5vw,72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(145deg,#0d2139,#173d63);
  color: #fff;
}
.efsw-brand { font-family: Arial,sans-serif; font-size: 22px; font-weight: 800; letter-spacing: -1px; }
.efsw-brand span { color: var(--efsw-green); font-size: 11px; }
.efsw-login > section:first-child > small { color: #aabacc; font-size: 10px; }
.efsw-login h1 { margin: 18px 0 8px; font-size: 34px; line-height: 1.45; }
.efsw-login h1 em { color: #38cd89; font-style: normal; }
.efsw-login > section:first-child p { max-width: 520px; margin: 0; color: #c8d4e1; font-size: 11.5px; line-height: 1.9; }
.efsw-login > section:last-child { display: grid; place-items: center; padding: 22px; }
.efsw-login-box { width: min(350px,100%); }
.efsw-login-box > b { font-size: 10px; color: var(--efsw-blue); }
.efsw-login-box h2 { margin: 5px 0 2px; font-size: 22px; }
.efsw-login-box > p { margin: 0 0 12px; color: var(--efsw-muted); font-size: 10.5px; }
.efsw-login-box form p { margin: 0 0 8px; display: grid; gap: 4px; font-size: 10.5px; }
.efsw-login .login-submit input { border: 0 !important; background: var(--efsw-blue) !important; color: #fff !important; font-weight: 700; cursor: pointer; }
.efsw-login-box > a { display: block; margin-top: 8px; text-align: center; color: var(--efsw-blue); font-size: 10.5px; }
.efsw-login-box .track { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--efsw-line); }

/* Customer tracking */
body.efsw-standalone-page { min-height: 100vh; margin: 0; overflow-x: hidden; background: #f5f7fa; }
.efsw-tracking {
  width: min(560px,calc(100% - 24px));
  margin: 28px auto;
  padding: 22px;
  border: 1px solid var(--efsw-line);
  border-radius: 9px;
  background: #fff;
  text-align: right;
}
.efsw-brand.dark { color: var(--efsw-navy); }
.efsw-tracking .tracking-kicker { margin: 6px 0 1px; color: var(--efsw-green); font-size: 12px; font-weight: 700; text-align: center; }
.efsw-tracking h1 { margin: 2px 0 5px !important; font-size: 22px !important; line-height: 1.45 !important; text-align: center; }
.efsw-tracking > p { margin: 0 0 13px; color: var(--efsw-muted); font-size: 10.5px; text-align: center; }
.efsw-tracking form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; align-items: end; }
.tracking-number-field { display: grid; grid-template-columns: auto 1fr; direction: ltr; }
.tracking-number-field span {
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 0 9px;
  border: 1px solid #d7e0e9;
  border-right: 0;
  border-radius: 6px 0 0 6px;
  background: #f1f4f8;
  color: #36516e;
  font-size: 10px;
  font-weight: 700;
}
.tracking-number-field input { border-radius: 0 6px 6px 0 !important; direction: ltr !important; }
.tracking-result { margin-top: 12px; padding: 11px; border: 1px solid var(--efsw-line); border-radius: 7px; background: #f9fbfd; }
.tracking-result header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tracking-result h2 { margin: 8px 0 !important; font-size: 17px !important; line-height: 1.4 !important; }
.tracking-result p { margin: 0 0 8px; padding: 8px; border-radius: 6px; background: #eaf3ff; color: #3c6388; font-size: 10.5px; line-height: 1.7; }
.tracking-result > small { color: var(--efsw-muted); font-size: 9.5px; }
.efsw-home-link { display: block; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--efsw-line); color: var(--efsw-blue); text-align: center; text-decoration: none; font-size: 10px; font-weight: 700; }

/* Responsive */
@media (max-width: 1050px) {
  .efsw-stats { grid-template-columns: 1fr 1fr; }
  .efsw-detail-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 850px) {
  .efsw-main { margin-right: 0 !important; width: 100% !important; }
  .efsw-content { padding: 10px 10px 22px !important; }
  .efsw-case-form,
  .efsw-case-grid { grid-template-columns: 1fr !important; }
  .case-action { position: static; }
  .efsw-summary { position: static; }
  .efsw-login { grid-template-columns: 1fr; }
  .efsw-login > section:first-child { display: none; }
  .efsw-login > section:last-child { min-height: 100vh; }
  .efsw-tracking form { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  :root { --efsw-control-h: 40px; }
  .efsw-top { height: 42px; padding: 0 8px; grid-template-columns: auto minmax(0,1fr); gap: 7px; }
  .efsw-top-brand span { display: none; }
  .efsw-top-track { display: none; }
  .efsw-top-nav { justify-content: flex-start; }
  .efsw-top-nav a { padding: 0 8px; }
  .efsw-content { padding: 9px 8px 18px !important; }
  .efsw-head,
  .efsw-head.efsw-head-compact { align-items: stretch; flex-direction: column; gap: 6px; }
  .efsw-head h1 { font-size: 19px; }
  .efsw-head-actions > * { width: 100%; }
  .efsw-toolbar,
  .efsw-toolbar-dashboard,
  .efsw-quick-search,
  .efsw-filters { grid-template-columns: 1fr; }
  .efsw-stats { grid-template-columns: 1fr 1fr; gap: 5px; }
  .efsw-stat-card { min-height: 50px; padding: 6px 8px; }
  .efsw-stat-card b { font-size: 21px; }
  .efsw-stat-card small { display: none; }
  .form-section { grid-template-columns: 1fr !important; }
  .wide, .section-heading { grid-column: auto !important; }
  .checks { grid-column: auto; grid-template-columns: 1fr 1fr; }
  .efsw-detail-list { grid-template-columns: 1fr; }
  .efsw-issue-line { grid-template-columns: 1fr; gap: 3px; }
  .efsw-sms-history-row { grid-template-columns: 1fr auto; }
  .efsw-sms-history-row > small { grid-column: 1 / -1; }
  body.efsw-standalone-page { background: #fff; }
  .efsw-tracking {
    width: 100%;
    min-height: 100svh;
    margin: 0;
    padding: calc(16px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));
    border: 0;
    border-radius: 0;
  }
  .efsw-tracking input { min-height: 42px !important; font-size: 14px !important; }
  .tracking-number-field span { min-height: 42px; }
  .efsw-tracking form .efsw-button { min-height: 42px; width: 100%; }
}
@media (max-width: 782px) {
  .admin-bar .efsw-app { top: 46px !important; height: calc(100vh - 46px) !important; }
}

/* Receipt is hidden on screen and rendered only in print flow */
.efsw-receipt { display: none; }
@page { size: A5 portrait; margin: 4mm; }
@media print {
  html, body {
    display: block !important;
    width: 138mm !important;
    height: 180mm !important;
    min-height: 0 !important;
    max-height: 180mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  body.efsw-printing > *:not(.efsw-print-root) { display: none !important; }
  .efsw-print-root {
    display: block !important;
    position: static !important;
    width: 138mm !important;
    height: 168mm !important;
    margin: 0 !important;
    padding: 4mm !important;
    border: 1px solid #222 !important;
    direction: rtl !important;
    background: #fff !important;
    color: #111 !important;
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    page-break-inside: avoid !important;
  }
  .efsw-print-root .receipt-header {
    display: grid !important;
    grid-template-columns: 1fr 2fr 1fr !important;
    gap: 3mm !important;
    align-items: center !important;
    border-bottom: 2px solid #222 !important;
    padding-bottom: 3mm !important;
  }
  .efsw-print-root .receipt-logo { font-size: 34px !important; line-height: 1 !important; justify-self: start !important; white-space: nowrap !important; }
  .efsw-print-root .receipt-logo span { font-size: 15px !important; }
  .efsw-print-root .receipt-title { text-align: center !important; }
  .efsw-print-root .receipt-title h1 { margin: 0 0 1mm !important; font-size: 13px !important; white-space: nowrap !important; }
  .efsw-print-root .receipt-title small { font-size: 8px !important; font-weight: 700 !important; direction: ltr !important; }
  .efsw-print-root .receipt-number { display: grid !important; gap: 1mm !important; text-align: left !important; justify-self: end !important; }
  .efsw-print-root .receipt-number span { font-size: 8px !important; font-weight: 700 !important; }
  .efsw-print-root .receipt-number bdi { font-size: 10px !important; font-weight: 700 !important; direction: ltr !important; }
  .efsw-print-root .receipt-details { display: grid !important; grid-template-columns: repeat(2,1fr) !important; gap: 3mm 7mm !important; padding: 4mm 0 !important; }
  .efsw-print-root .receipt-details p { display: grid !important; gap: .5mm !important; margin: 0 !important; }
  .efsw-print-root .receipt-details small { color: #666 !important; font-size: 7px !important; }
  .efsw-print-root .receipt-details b { font-size: 9px !important; }
  .efsw-print-root .receipt-issue {
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    gap: 2mm !important;
    align-items: start !important;
    height: 18mm !important;
    padding: 3mm !important;
    border: 1px solid #aaa !important;
    overflow: hidden !important;
    font-size: 8px !important;
    line-height: 1.65 !important;
  }
  .efsw-print-root .receipt-issue > span { display: -webkit-box !important; -webkit-box-orient: vertical !important; -webkit-line-clamp: 3 !important; overflow: hidden !important; }
  .efsw-print-root .receipt-bottom { display: grid !important; grid-template-columns: 1fr !important; gap: 3mm !important; margin-top: 3mm !important; }
  .efsw-print-root .receipt-qr { display: flex !important; align-items: center !important; justify-content: center !important; gap: 3mm !important; padding: 2mm !important; border: 1px dashed #bbb !important; }
  .efsw-print-root .receipt-qr img { display: block !important; width: 17mm !important; height: 17mm !important; object-fit: contain !important; }
  .efsw-print-root .receipt-qr > div { display: grid !important; gap: 1mm !important; }
  .efsw-print-root .receipt-qr b { font-size: 8px !important; }
  .efsw-print-root .receipt-qr small { color: #555 !important; font-size: 6.5px !important; }
  .efsw-print-root .receipt-signatures { display: flex !important; justify-content: space-between !important; padding-top: 5mm !important; font-size: 8px !important; }
}
.efsw-resolution-field.is-hidden { display: none; }
