:root {
  --bg: #120f10;
  --bg-secondary: #21191a;
  --surface: rgba(33, 24, 25, 0.78);
  --surface-strong: rgba(28, 20, 21, 0.95);
  --surface-soft: rgba(243, 195, 170, 0.08);
  --text: #f8f3ef;
  --muted: #d8b6a5;
  --line: rgba(243, 195, 170, 0.12);
  --accent: #d99a7a;
  --accent-strong: #b97656;
  --accent-soft: rgba(217, 154, 122, 0.16);
  --gold: #f0b995;
  --danger: #d86d6d;
  --shadow: 0 30px 80px rgba(10, 7, 8, 0.5);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --admin-scroll-height: 360px;
}

body.light-mode {
  --bg: #f8f0ea;
  --bg-secondary: #ecd8cb;
  --surface: rgba(255, 250, 247, 0.88);
  --surface-strong: rgba(255, 253, 251, 0.96);
  --surface-soft: rgba(159, 98, 74, 0.07);
  --text: #2a1d1c;
  --muted: #7b5b51;
  --line: rgba(159, 98, 74, 0.12);
  --accent: #b97656;
  --accent-strong: #995e44;
  --accent-soft: rgba(185, 118, 86, 0.12);
  --gold: #d79572;
  --danger: #c65d5d;
  --shadow: 0 28px 70px rgba(95, 58, 45, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(243, 195, 170, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(159, 98, 74, 0.14), transparent 34%),
    linear-gradient(140deg, var(--bg), var(--bg-secondary));
  transition: background 0.35s ease, color 0.35s ease;
}

body[dir="rtl"] {
  font-family: "Cairo", sans-serif;
}

.page-shell {
  width: min(1200px, calc(100% - 24px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.topbar,
.section-title-row,
.progress-label-row,
.card-head,
.cta-row,
.input-row,
.topbar-actions,
.icon-row,
.analytics-grid,
.metrics-grid,
.status-chips {
  display: flex;
  align-items: center;
}

.topbar,
.card-head,
.section-title-row,
.progress-label-row,
.cta-row,
.input-row {
  justify-content: space-between;
}

.topbar {
  gap: 28px;
  margin-bottom: 26px;
  align-items: center;
}

.eyebrow,
.card-label,
.mini-note,
.metric-label {
  color: var(--muted);
  margin: 0;
}

.eyebrow,
.card-label {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.74rem;
}

body[dir="rtl"] .eyebrow,
body[dir="rtl"] .card-label {
  letter-spacing: 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 42px);
  min-width: 0;
  flex: 1 1 auto;
}

.brand-logo {
  width: clamp(210px, 25vw, 330px);
  height: auto;
  max-height: 190px;
  display: block;
  object-fit: contain;
  border-radius: 0;
  filter: drop-shadow(0 8px 20px rgba(16, 10, 9, 0.24));
  flex: 0 0 auto;
}

.brand-copy {
  min-width: 0;
  flex: 1 1 520px;
  max-width: 640px;
}

.brand {
  margin: 10px 0 0;
  font-size: clamp(1.7rem, 2.7vw, 2.95rem);
  letter-spacing: 0.02em;
  line-height: 1.18;
  max-width: none;
  white-space: nowrap;
}

.brand-subtitle {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

body[dir="rtl"] .brand-subtitle {
  letter-spacing: 0.08em;
}

.topbar-actions,
.status-chips,
.icon-row,
.analytics-grid,
.metrics-grid {
  gap: 12px;
}

.topbar-actions {
  flex: 0 0 auto;
  align-self: flex-start;
  padding-top: 6px;
}

.ghost-btn,
.primary-btn,
.danger-btn,
.whatsapp-btn,
.text-btn,
.danger-text-btn,
.ghost-outline-btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
  text-decoration: none;
  font: inherit;
}

.ghost-btn,
.text-btn,
.ghost-outline-btn {
  color: var(--text);
  background: var(--surface-soft);
}

.ghost-btn {
  padding: 12px 16px;
}

.ghost-outline-btn {
  display: inline-flex;
  justify-content: center;
  padding: 14px 18px;
  border: 1px solid var(--line);
}

.text-btn {
  padding: 8px 12px;
}

.danger-text-btn {
  color: #ffd0d0;
  background: rgba(216, 109, 109, 0.16);
}

.compact-btn {
  padding: 10px 12px;
  white-space: nowrap;
}

.primary-btn,
.danger-btn,
.whatsapp-btn {
  padding: 14px 18px;
  font-weight: 700;
  position: relative;
  z-index: 2;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 18px 36px rgba(185, 118, 86, 0.28);
}

.danger-btn {
  width: 100%;
  color: #fff;
  background: linear-gradient(135deg, var(--danger), #a42c39);
}

.whatsapp-btn {
  color: #fff;
  background: linear-gradient(135deg, #25d366, #128c7e);
}

.ghost-btn:hover,
.primary-btn:hover,
.danger-btn:hover,
.whatsapp-btn:hover,
.text-btn:hover,
.danger-text-btn:hover {
  transform: translateY(-1px);
}

.glass-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.tracking-layout,
.admin-layout,
.admin-grid,
.content-grid {
  display: grid;
  gap: 20px;
}

.hero-card,
.results-card,
.search-history-card,
.info-card,
.login-card,
.admin-form-card,
.update-card,
.shipments-table-card,
.suggestions-section {
  padding: 24px;
}

.hero-card {
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243, 195, 170, 0.24), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.hero-copy,
.tracking-form,
.status-chips {
  position: relative;
  z-index: 1;
}

.pill {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 16px;
}

.hero-copy h2,
.results-card h3,
.suggestions-section h3,
.login-card h2,
.admin-form-card h2,
.update-card h2,
.shipments-table-card h2,
.info-card h4 {
  margin: 0 0 12px;
}

.hero-copy p,
.info-card p,
.suggestions-feature-card p {
  max-width: 720px;
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.7;
}

.tracking-form {
  margin-bottom: 20px;
}

.tracking-form .primary-btn {
  flex: 0 0 auto;
  min-width: 170px;
  min-height: 52px;
}

.input-row {
  gap: 12px;
  position: relative;
  z-index: 1;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(217, 154, 122, 0.55);
  box-shadow: 0 0 0 4px rgba(217, 154, 122, 0.12);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.status-chips {
  flex-wrap: wrap;
}

.customer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.customer-tabs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  color: var(--text);
  background: var(--surface-soft);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.customer-tabs button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.customer-tab-panel {
  scroll-margin-top: 120px;
}

.status-chips span {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
}

.content-grid {
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.95fr);
}

.metrics-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.metric-box {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.metric-box strong {
  display: block;
  margin-top: 8px;
  font-size: 1.1rem;
}

.dashboard-overview {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
}

.dashboard-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
  gap: 22px;
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(217, 154, 122, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
}

.dashboard-hero-copy h2 {
  margin: 12px 0 10px;
  font-size: clamp(1.45rem, 2.3vw, 2.1rem);
  line-height: 1.25;
}

.dashboard-hero-copy p:last-child {
  margin: 0;
  max-width: 760px;
  color: color-mix(in srgb, var(--text) 84%, var(--muted) 16%);
  line-height: 1.85;
}

.dashboard-hero-actions {
  display: grid;
  gap: 10px;
  align-content: start;
}

.dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 14px;
}

.summary-card {
  min-height: 128px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.summary-card-primary {
  border-color: rgba(217, 154, 122, 0.28);
  background:
    radial-gradient(circle at top right, rgba(240, 185, 149, 0.24), transparent 35%),
    linear-gradient(140deg, rgba(217, 154, 122, 0.18), rgba(159, 98, 74, 0.07));
}

.summary-card strong {
  display: block;
  margin-top: 12px;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  letter-spacing: -0.02em;
}

.dashboard-activity-card {
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(24, 18, 18, 0.74), rgba(24, 18, 18, 0.58));
}

.activity-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

body[data-page="admin"] .dashboard-activity-card .activity-list {
  max-height: var(--admin-scroll-height);
  overflow-y: auto;
  padding-inline-end: 6px;
}

.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.activity-item p,
.activity-meta small {
  margin: 4px 0 0;
  color: var(--muted);
}

.activity-meta {
  text-align: end;
}

body.light-mode .dashboard-activity-card {
  background:
    linear-gradient(180deg, rgba(255, 249, 245, 0.98), rgba(248, 239, 233, 0.94));
  border: 1px solid rgba(159, 98, 74, 0.1);
  box-shadow: 0 22px 46px rgba(95, 58, 45, 0.08);
}

body.light-mode .dashboard-activity-card h2,
body.light-mode .dashboard-activity-card strong,
body.light-mode .dashboard-activity-card .activity-meta span {
  color: #2f2120;
}

body.light-mode .dashboard-activity-card .card-label,
body.light-mode .dashboard-activity-card .activity-item p,
body.light-mode .dashboard-activity-card .activity-meta small {
  color: #8a675c;
}

body.light-mode .activity-item {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(159, 98, 74, 0.1);
}

.dashboard-logout-btn {
  width: 100%;
}

.metric-subtext {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(217, 154, 122, 0.18);
  color: #f2c6ae;
  font-weight: 800;
  text-align: center;
}

body.light-mode .status-badge {
  color: var(--accent-strong);
}

.progress-block,
.timeline-wrap,
.history-list,
.info-card,
.table-wrap,
.table-tools {
  margin-top: 22px;
}

.feedback-box {
  margin-top: 18px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.feedback-box strong {
  display: block;
  margin-bottom: 8px;
}

.feedback-box p {
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.7;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.trust-grid span {
  padding: 12px;
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 700;
}

.about-card .card-label {
  margin-bottom: 10px;
}

.brand-story-card {
  padding: 28px;
}

.brand-story-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.why-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.why-card strong {
  display: block;
  margin-bottom: 8px;
}

.why-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.site-footer {
  margin-top: 8px;
  padding: 18px 6px 8px;
  border-top: 1px solid var(--line);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.footer-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: #1877f2;
  flex: 0 0 20px;
}

.footer-link-icon-whatsapp {
  color: #25d366;
}

.footer-link-icon-location {
  color: var(--accent);
}

.footer-link-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-address,
.footer-copy {
  margin: 12px 0 0;
  color: var(--muted);
}

.footer-copy {
  font-size: 0.92rem;
}

.footer-legal {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
  margin-top: 10px;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  transition: width 0.5s ease;
}

.timeline {
  display: grid;
  gap: 18px;
}

.timeline-item {
  position: relative;
  padding-inline-start: 28px;
  animation: fadeUp 0.45s ease both;
}

.timeline-item::before {
  content: "";
  position: absolute;
  inset-inline-start: 6px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(217, 154, 122, 0.12);
}

.timeline-item::after {
  content: "";
  position: absolute;
  inset-inline-start: 11px;
  top: 18px;
  bottom: -18px;
  width: 2px;
  background: var(--line);
}

.timeline-item:last-child::after {
  display: none;
}

.timeline-item h5,
.timeline-item p {
  margin: 0;
}

.timeline-item p {
  color: var(--muted);
  margin-top: 4px;
}

.history-list {
  display: grid;
  gap: 10px;
}

.suggestions-note {
  margin-top: -8px;
  margin-bottom: 18px !important;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--muted);
}

.suggestions-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 24px;
  position: relative;
  overflow: hidden;
}

.documents-section {
  display: grid;
  gap: 18px;
  padding: 24px;
  margin-top: 20px;
}

.rating-section {
  display: grid;
  gap: 18px;
  padding: 24px;
  margin-top: 20px;
}

.rating-stars {
  display: flex;
  gap: 8px;
}

.rating-stars button {
  border: 0;
  background: transparent;
  color: rgba(240, 185, 149, 0.35);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  padding: 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.rating-stars button.active,
.rating-stars button:hover {
  color: var(--gold);
  transform: translateY(-1px);
}

.rating-readonly {
  color: var(--gold);
  letter-spacing: 0.05em;
}

.documents-list {
  display: grid;
  gap: 12px;
}

.admin-files-preview {
  margin-top: 18px;
}

body[data-page="admin"] .admin-files-preview {
  max-height: var(--admin-scroll-height);
  overflow-y: auto;
  padding-inline-end: 6px;
}

.admin-files-preview h4 {
  margin: 0 0 12px;
}

.document-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.document-item p {
  margin: 4px 0 0;
  color: var(--muted);
}

.document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.suggestions-section::before {
  content: "";
  position: absolute;
  inset: -120px auto auto -120px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 154, 122, 0.18), transparent 68%);
  pointer-events: none;
}

.suggestions-feature-card,
.suggestions-form {
  position: relative;
  z-index: 1;
}

.suggestions-section h3 {
  font-size: clamp(1.55rem, 2.4vw, 2.35rem);
}

.suggestions-benefits {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.suggestions-benefits span {
  padding: 13px 14px;
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 800;
}

.suggestions-form {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(18, 13, 14, 0.36);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.phone-input-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr);
  gap: 10px;
}

.developer-btn {
  display: inline-flex;
  justify-content: center;
  width: 100%;
}

.developer-link-btn {
  width: 100%;
  margin-top: 12px;
}

.export-btn {
  white-space: nowrap;
}

.table-tools input {
  max-width: 520px;
}

.history-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface-soft);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.history-entry:hover,
.history-entry:focus-visible {
  background: rgba(221, 168, 137, 0.14);
  outline: 1px solid rgba(221, 168, 137, 0.42);
  transform: translateY(-1px);
}

.history-code {
  color: var(--text);
  font-weight: 800;
}

.icon-row {
  font-size: 1.5rem;
}

.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stack-form {
  display: grid;
  gap: 14px;
}

.compact-form {
  margin-top: 18px;
}

.admin-whatsapp-action {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(37, 211, 102, 0.28);
  border-radius: var(--radius-md);
  background: rgba(37, 211, 102, 0.08);
}

.admin-whatsapp-action p {
  margin: 0;
  color: var(--text);
}

.admin-whatsapp-action .whatsapp-btn {
  justify-self: start;
}

.message-preview {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.message-preview textarea {
  min-height: 190px;
}

.import-backup-label {
  align-items: center;
}

.stack-form label,
.stack-form .form-field {
  display: grid;
  gap: 8px;
}

.stack-form .form-field {
  align-items: start;
}

input[type="file"] {
  display: block;
  max-width: 100%;
  min-height: auto;
  padding: 12px;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  margin-inline-end: 12px;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.upload-status {
  color: var(--gold);
  font-weight: 700;
}

button:disabled,
.primary-btn:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: auto;
}

.table-wrap {
  overflow: auto;
}

body[data-page="admin"] .table-wrap {
  max-height: var(--admin-scroll-height);
  border-radius: 18px;
  padding-inline-end: 4px;
}

body[data-page="admin"] .table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-strong);
}

body.light-mode[data-page="admin"] .table-wrap thead th {
  background: rgba(255, 250, 247, 0.96);
}

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

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

tbody tr:hover {
  background: var(--surface-soft);
}

.hidden {
  display: none !important;
}

.empty-state {
  color: var(--muted);
  padding: 16px;
  border-radius: 16px;
  background: var(--surface-soft);
}

.empty-table {
  text-align: center;
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .content-grid,
  .admin-grid,
  .suggestions-section {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-card {
    grid-template-columns: 1fr;
  }

  .topbar,
  .input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-lockup {
    align-items: center;
    width: 100%;
  }

  .topbar-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    align-self: stretch;
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 16px, 1200px);
    padding-top: 16px;
  }

  .hero-card,
  .results-card,
  .search-history-card,
  .info-card,
  .login-card,
  .dashboard-hero-card,
  .dashboard-activity-card,
  .admin-form-card,
  .update-card,
  .shipments-table-card {
    padding: 18px;
  }

  .status-badge {
    width: 100%;
    justify-content: center;
  }

  .brand-logo {
    width: min(210px, 68vw);
    max-height: 132px;
  }

  .brand-lockup {
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
  }

  .brand-copy {
    max-width: 100%;
  }

  .brand {
    white-space: normal;
    font-size: clamp(1.9rem, 8vw, 2.6rem);
  }

  .brand-subtitle,
  .eyebrow {
    text-align: center;
  }

  .card-head,
  .section-title-row,
  .progress-label-row,
  .cta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .export-btn {
    width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .phone-input-row {
    grid-template-columns: 1fr;
  }

  .document-item {
    align-items: stretch;
    flex-direction: column;
  }

  .document-actions {
    flex-direction: column;
  }

  .dashboard-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .summary-card {
    min-height: auto;
  }
}
