/* ============================================================
   CSS VARIABLES & DESIGN TOKENS
   ============================================================ */
:root {
  /* Colors */
  --ink: #14213d;
  --ink-soft: #31415f;
  --muted: #64748b;
  --line: #d8e0ea;
  --surface: #ffffff;
  --surface-soft: #f6f8fb;
  --sky: #0ea5e9;
  --teal: #0f766e;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --violet: #7c3aed;
  
  /* Spacing & Shape */
  --radius: 8px;
  --shadow: 0 18px 48px rgba(20, 33, 61, 0.12);
  
  /* Typography */
  font-family: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
}

/* ============================================================
   GLOBAL STYLES - MOBILE FIRST (320px)
   ============================================================ */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f5f7fb;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand strong,
.panel-heading h2,
.page-title h1 {
  font-family: "Cairo", "Tajawal", "Segoe UI", sans-serif;
}

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

button,
input,
select {
  font: inherit;
}

img {
  max-width: 100%;
  display: block;
}

svg {
  width: 1rem;
  height: 1rem;
}

/* ============================================================
   HEADER & NAVIGATION - MOBILE FIRST
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: auto;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(216, 224, 234, 0.82);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

.brand,
.nav-links,
.hero-actions,
.auth-links,
.merchant-actions,
.tabs,
.action-cell,
.request-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand {
  min-width: 120px;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--sky), var(--teal));
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.site-footer,
.page-title p,
.merchant-hero p,
.section-heading h2,
.card p,
.data-table small,
.empty-state,
.panel-heading span {
  color: var(--muted);
}

.nav-links {
  display: none;
  width: 100%;
  flex-direction: column;
}

.nav-links a,
.nav-logout,
.button,
.icon-button,
.tabs a,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  min-height: 44px;
}

.nav-links a {
  padding: 8px 12px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  width: 100%;
  justify-content: flex-start;
}

.nav-links a.active,
.nav-links a:hover,
.tabs a.active {
  color: var(--teal);
  border-color: rgba(15, 118, 110, 0.3);
  background: rgba(15, 118, 110, 0.09);
}

.language-link {
  color: var(--sky) !important;
}

.logout-form {
  margin: 0;
}

.nav-logout {
  padding: 8px 12px;
  color: var(--red);
  cursor: pointer;
}

/* ============================================================
   AUTH & LOGIN - MOBILE FIRST
   ============================================================ */

.auth-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 137px);
  padding: 28px 16px;
}

.login-card {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.login-art {
  min-height: 240px;
  padding: 24px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 118, 110, 0.72)),
    url("../images/admin-reference.png") center/cover;
  display: none;
}

.login-art p {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.8;
}

.login-panel {
  align-self: center;
  padding: 22px 16px;
}

.auth-links {
  margin-top: 16px;
  flex-direction: column;
  gap: 8px;
}

.auth-links a {
  color: var(--teal);
  font-weight: 700;
  width: 100%;
  justify-content: center;
}

/* ============================================================
   LANDING PAGE & HERO - MOBILE FIRST
   ============================================================ */

.landing-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: flex-start;
  min-height: auto;
  padding: 40px 16px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(10, 25, 47, 0.88), rgba(10, 25, 47, 0.48)),
    url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=2200&q=80") center/cover;
}

.hero-content,
.hero-preview {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 100%;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--sky);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-content h1 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(1.5rem, 5vw, 4.9rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-content p {
  max-width: 100%;
  margin: 16px 0 20px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(0.95rem, 1.5vw, 1.25rem);
  line-height: 1.8;
}

.section-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.button {
  min-height: 44px;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 700;
}

.button.primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--teal), var(--sky));
}

.button.ghost {
  color: var(--ink);
  background: #fff;
}

.button.small {
  min-height: 40px;
  padding: 6px 12px;
  font-size: 0.82rem;
}

.button.success {
  color: var(--green);
  border-color: rgba(22, 163, 74, 0.25);
  background: rgba(22, 163, 74, 0.1);
}

.button.danger {
  color: var(--red);
  border-color: rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.09);
}

.hero-preview {
  align-self: start;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(18px);
  width: 100%;
  display: none;
}

.preview-top {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.preview-top span {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.45);
}

.preview-grid {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.mini-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.mini-days span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
}

.mini-days .hot {
  color: #082f49;
  background: #7dd3fc;
}

.preview-row {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.11);
}

/* ============================================================
   CONTENT SECTIONS & CARDS - MOBILE FIRST
   ============================================================ */

.section {
  width: calc(100% - 32px);
  margin: 0 auto;
  padding: 40px 16px;
}

.section-band {
  width: 100%;
  padding-inline: 16px;
  background: #eef7f5;
}

.section-heading {
  display: grid;
  gap: 8px;
  max-width: 100%;
  margin-bottom: 20px;
}

.section-heading h2,
.page-title h1,
.merchant-hero h1,
.panel-heading h2 {
  margin: 0;
  letter-spacing: 0;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.cards.three {
  grid-template-columns: 1fr;
}

.card,
.panel,
.stat-card,
.notice,
.flash {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card {
  padding: 20px 16px;
}

.card i {
  color: var(--teal);
  width: 24px;
  height: 24px;
}

.card h3 {
  margin: 16px 0 8px;
}

.card.light {
  box-shadow: none;
}

.workflow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.workflow li {
  position: relative;
  min-height: 80px;
  padding: 16px 16px 16px 48px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}

[dir="rtl"] .workflow li {
  padding: 16px 48px 16px 16px;
}

.workflow li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  inset-inline-start: 14px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 99px;
  color: #fff;
  background: var(--teal);
}

/* ============================================================
   APP SHELL & PAGE LAYOUTS - MOBILE FIRST
   ============================================================ */

.app-shell {
  width: calc(100% - 32px);
  margin: 0 auto;
  padding: 20px 0 40px;
}

.page-title,
.merchant-hero {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 16px;
  flex-direction: column;
  margin-bottom: 20px;
}

.page-title.with-art {
  overflow: hidden;
  min-height: auto;
  padding: 20px 16px;
  color: #fff;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0f172a, #123c4e);
}

.page-title.with-art p {
  color: rgba(255, 255, 255, 0.74);
  margin: 12px 0 0;
}

.page-title.with-art img {
  width: 100%;
  border-radius: var(--radius);
  opacity: 0.88;
  margin-top: 16px;
}

.flash {
  margin-bottom: 16px;
  padding: 12px 14px;
}

.flash.error {
  border-color: rgba(220, 38, 38, 0.22);
  background: #fef2f2;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.stat-card i {
  color: var(--sky);
  width: 24px;
  height: 24px;
}

.stat-card strong {
  font-size: clamp(1.5rem, 4vw, 2.3rem);
}

.stat-card.success strong,
.stat-card.success i {
  color: var(--green);
}

.stat-card.warning strong,
.stat-card.warning i {
  color: var(--amber);
}

.stat-card.danger strong,
.stat-card.danger i {
  color: var(--red);
}

.panel {
  padding: 16px;
  margin-bottom: 16px;
}

.panel-heading,
.calendar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* ============================================================
   TABLES & DATA - MOBILE FIRST (CARD-BASED LAYOUT)
   ============================================================ */

.table-wrap {
  overflow-x: auto;
}

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

.data-table th,
.data-table td {
  padding: 12px 10px;
  text-align: start;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

.data-table thead {
  display: none;
}

.data-table tbody tr {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.data-table td {
  border: none;
  padding: 0;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  align-items: center;
}

.data-table td::before {
  content: attr(data-label);
  font-weight: 700;
  color: var(--muted);
  font-size: 0.82rem;
}

.data-table td strong,
.data-table td small {
  display: block;
}

.restricted-row {
  background: #fff4f4;
}

.badge {
  min-height: 32px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 800;
  display: inline-flex;
}

.badge-pro,
.badge-paid,
.badge-approved {
  color: var(--green);
  border-color: rgba(22, 163, 74, 0.25);
  background: rgba(22, 163, 74, 0.1);
}

.badge-creator,
.badge-free_trial,
.badge-pending {
  color: var(--amber);
  border-color: rgba(217, 119, 6, 0.25);
  background: rgba(217, 119, 6, 0.1);
}

.badge-agency {
  color: var(--violet);
  border-color: rgba(124, 58, 237, 0.25);
  background: rgba(124, 58, 237, 0.1);
}

.badge-overdue,
.badge-rejected {
  color: var(--red);
  border-color: rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.1);
}

.badge-neutral {
  color: var(--ink-soft);
  background: var(--surface-soft);
}

/* ============================================================
   GRID LAYOUTS - MOBILE FIRST
   ============================================================ */

.admin-grid,
.merchant-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.bar-list,
.form-grid,
.side-stack,
.request-list {
  display: grid;
  gap: 12px;
}

.side-stack {
  align-content: start;
  align-self: start;
}

.bar-row {
  display: grid;
  grid-template-columns: 80px 1fr 32px;
  align-items: center;
  gap: 10px;
}

.bar-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--sky));
}

.form-grid label {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-weight: 700;
}

.form-grid input,
.form-grid select {
  min-height: 44px;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

/* ============================================================
   MERCHANT & MERCHANT HERO - MOBILE FIRST
   ============================================================ */

.merchant-hero {
  padding: 20px 16px;
  border-radius: var(--radius);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 118, 110, 0.72)),
    url("../images/tenant-reference.png") center 42%/cover;
}

.merchant-hero p {
  color: rgba(255, 255, 255, 0.78);
}

.merchant-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.badge-demo {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.tabs {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tabs a {
  min-height: 40px;
  padding: 6px 12px;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.tabs a.active {
  color: #082f49;
  border-color: transparent;
  background: #7dd3fc;
}

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.notice.warning {
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}

.notice.success {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.notice.danger {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

/* ============================================================
   CALENDAR & SLOTS - MOBILE FIRST
   ============================================================ */

.calendar-panel {
  background: #fff;
}

.icon-button {
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
}

.weekday-grid,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.weekday-grid {
  color: var(--muted);
  margin-bottom: 8px;
  font-size: 0.8rem;
  text-align: center;
}

.calendar-empty {
  min-height: 48px;
}

.calendar-day {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 48px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: 0.18s ease;
  font-size: 0.82rem;
}

.calendar-day:hover,
.calendar-day.selected {
  color: var(--teal);
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(15, 118, 110, 0.08);
}

.calendar-day.has-booking {
  background: #eff6ff;
}

.dots {
  display: flex;
  gap: 3px;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 99px;
  background: var(--muted);
}

.dot-approved {
  background: var(--green);
}

.dot-pending {
  background: var(--amber);
}

.dot-rejected {
  background: var(--red);
}

.slot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.slot-card {
  display: grid;
  gap: 8px;
  min-height: 80px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.slot-card > div,
.slot-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  direction: ltr;
  unicode-bidi: plaintext;
}

.request-card span,
.request-card small {
  direction: ltr;
  unicode-bidi: plaintext;
}

.slot-card.disabled {
  pointer-events: none;
  opacity: 0.58;
  background: var(--surface-soft);
}

.slot-card.booked {
  border-color: rgba(14, 165, 233, 0.28);
  background: #eff6ff;
}

.locked-panel {
  position: relative;
  opacity: 0.62;
}

.image-panel {
  padding: 0;
  overflow: hidden;
}

.image-panel img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.request-card {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.request-card > strong,
.request-card > p,
.request-card > small,
.request-card > span,
.request-card > .badge,
.request-card > .request-actions {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}

.request-card > strong {
  color: var(--ink);
}

.request-card span,
.request-card small {
  color: var(--muted);
}

.request-card .request-actions {
  margin-inline-start: auto;
}

.request-card .request-actions,
.request-card .request-actions form {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
}

.request-card .request-actions .button {
  white-space: nowrap;
}

.summary-cards {
  grid-template-columns: 1fr;
  display: grid;
  gap: 10px;
}

.summary-cards article {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 100px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.summary-cards strong {
  font-size: 1.6rem;
}

.empty-state {
  padding: 24px 16px;
  text-align: center;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 20px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ─────────────────────────────────────────────────────────
   BREAKPOINT: Mobile Large (480px+)
   ───────────────────────────────────────────────────────── */
@media (min-width: 480px) {
  .site-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: auto;
    padding: 12px 20px;
  }

  .brand {
    min-width: 140px;
  }

  .nav-links a,
  .nav-logout,
  .button,
  .icon-button,
  .tabs a,
  .badge {
    min-height: 40px;
  }

  .section {
    padding: 48px 20px;
  }

  .workflow {
    grid-template-columns: 1fr;
  }

  .page-title.with-art {
    padding: 24px 20px;
  }

  .data-table td {
    grid-template-columns: 110px 1fr;
  }

  .slot-grid {
    grid-template-columns: 1fr;
  }
}

/* ─────────────────────────────────────────────────────────
   BREAKPOINT: Tablet (768px+)
   ───────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .site-header {
    padding: 12px 32px;
  }

  .brand {
    min-width: 160px;
  }

  .nav-links {
    display: flex !important;
    flex-direction: row;
    width: auto;
    gap: 8px;
  }

  .nav-links a {
    width: auto;
    justify-content: center;
    padding: 6px 12px;
  }

  .section {
    width: calc(100% - 48px);
    max-width: 1180px;
    padding: 56px 24px;
  }

  .section-band {
    padding-inline: 24px;
  }

  .cards {
    gap: 16px;
  }

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

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

  .workflow li {
    min-height: 80px;
    padding: 16px 16px 16px 48px;
  }

  [dir="rtl"] .workflow li {
    padding: 16px 48px 16px 16px;
  }

  .app-shell {
    width: calc(100% - 48px);
    max-width: 1240px;
    padding: 28px 0 56px;
  }

  .page-title,
  .merchant-hero {
    gap: 20px;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .page-title.with-art {
    min-height: 240px;
    padding: 24px 28px;
  }

  .page-title.with-art img {
    width: 45%;
  }

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

  .data-table thead {
    display: table-header-group;
  }

  .data-table tbody tr {
    display: table-row;
    padding: 0;
    margin: 0;
    border: none;
    gap: 0;
  }

  .data-table td {
    border-top: 1px solid var(--line);
    padding: 12px 10px;
    display: table-cell;
    grid-template-columns: none;
    gap: 0;
    align-items: inherit;
  }

  .data-table td::before {
    display: none;
  }

  .data-table th,
  .data-table td {
    padding: 14px 10px;
  }

  .data-table thead th {
    color: var(--muted);
    font-size: 0.84rem;
    border-top: 0;
  }

  .admin-grid,
  .merchant-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
    gap: 18px;
  }

  .bar-row {
    grid-template-columns: 100px 1fr 32px;
  }

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

  .image-panel img {
    height: 320px;
  }

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

  .summary-cards article {
    min-height: 110px;
  }

  .summary-cards strong {
    font-size: 1.7rem;
  }

  .site-footer {
    padding: 24px 32px;
    gap: 20px;
  }
}

/* ─────────────────────────────────────────────────────────
   BREAKPOINT: Desktop (1024px+)
   ───────────────────────────────────────────────────────── */
@media (min-width: 1024px) {
  .site-header {
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    min-height: 68px;
    gap: 16px;
    padding: 12px clamp(32px, 4vw, 48px);
  }

  .brand {
    min-width: 210px;
  }

  .nav-links {
    display: flex !important;
    width: auto;
    flex-direction: row;
  }

  .nav-links a {
    padding: 0 12px;
    width: auto;
  }

  .section {
    padding: 64px 0;
  }

  .section-band {
    padding-inline: max(24px, calc((100% - 1180px) / 2));
  }

  .cards.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .workflow li {
    min-height: 96px;
    padding: 18px 18px 18px 54px;
  }

  [dir="rtl"] .workflow li {
    padding: 18px 54px 18px 18px;
  }

  .workflow li::before {
    inset-inline-start: 18px;
    top: 18px;
    width: 24px;
    height: 24px;
  }

  .landing-hero {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 440px);
    gap: clamp(24px, 5vw, 72px);
    align-items: center;
    min-height: 78vh;
    padding: clamp(76px, 10vw, 120px) clamp(24px, 7vw, 96px) clamp(60px, 8vw, 96px);
  }

  .hero-content {
    max-width: 760px;
  }

  .hero-content h1 {
    max-width: 760px;
    font-size: clamp(2.1rem, 5vw, 4.9rem);
  }

  .hero-content p {
    max-width: 660px;
    margin: 22px 0 28px;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
  }

  .section-actions {
    margin-top: 20px;
    flex-direction: row;
  }

  .button {
    min-height: 44px;
    padding: 8px 16px;
  }

  .hero-preview {
    display: block;
    width: auto;
    align-self: end;
  }

  .page-title,
  .merchant-hero {
    align-items: center;
    justify-content: space-between;
  }

  .page-title.with-art {
    min-height: 220px;
    padding: 28px;
  }

  .page-title.with-art img {
    width: min(46%, 520px);
  }

  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
  }

  .stat-card {
    padding: 20px;
    gap: 12px;
  }

  .stat-card strong {
    font-size: 2.3rem;
  }

  .panel {
    padding: 20px;
    margin-bottom: 18px;
  }

  .merchant-hero {
    padding: 24px;
  }

  .summary-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .summary-cards article {
    min-height: 112px;
  }

  .summary-cards strong {
    font-size: 1.8rem;
  }

  .site-footer {
    padding: 24px clamp(32px, 4vw, 48px);
  }
}

/* ─────────────────────────────────────────────────────────
   BREAKPOINT: Desktop XL (1440px+)
   ───────────────────────────────────────────────────────── */
@media (min-width: 1440px) {
  .site-header {
    padding: 12px 48px;
  }

  .section {
    width: min(1180px, calc(100% - 64px));
    margin: 0 auto;
  }

  .app-shell {
    width: min(1240px, calc(100% - 64px));
    margin: 0 auto;
  }

  .login-card {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  }

  .login-art {
    display: block;
    min-height: 420px;
    padding: clamp(24px, 5vw, 52px);
  }

  .login-panel {
    padding: clamp(22px, 4vw, 38px);
  }

  .landing-hero {
    padding: clamp(76px, 10vw, 120px) clamp(48px, 7vw, 96px) clamp(60px, 8vw, 96px);
  }

  .button {
    padding: 8px 15px;
  }
}

/* ─────────────────────────────────────────────────────────
   DARK MODE READY STRUCTURE
   (CSS variables prepared for future dark mode implementation)
   ───────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here using existing CSS variables */
  /* Example: root { --surface: #1e293b; --ink: #f1f5f9; } */
}
