/* Dawrak UI — operations-first design system */
:root {
  --dw-blue: #0866ff;
  --dw-blue-700: #0752d6;
  --dw-blue-050: #edf5ff;
  --dw-cyan: #06c7e8;
  --dw-orange: #ff8a00;
  --dw-orange-100: #fff0d9;
  --dw-green: #11a66a;
  --dw-red: #d92d20;
  --dw-navy: #071b3d;
  --dw-navy-2: #0b2657;
  --dw-text: #142033;
  --dw-muted: #66758a;
  --dw-line: #dce5ef;
  --dw-canvas: #f2f6fa;
  --dw-surface: #ffffff;
  --dw-radius: 22px;
  --dw-radius-sm: 14px;
  --dw-shadow: 0 16px 44px rgba(27, 51, 84, .10);
  --dw-shadow-sm: 0 8px 24px rgba(27, 51, 84, .08);
  --dw-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
  --dw-maxw: 1480px;
  --dw-appw: 520px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--dw-canvas); scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--dw-text);
  background:
    radial-gradient(circle at 15% -10%, rgba(6, 199, 232, .12), transparent 31rem),
    radial-gradient(circle at 95% 0%, rgba(8, 102, 255, .10), transparent 38rem),
    var(--dw-canvas);
  font-family: var(--dw-font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--dw-blue); text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(6, 199, 232, .48);
  outline-offset: 2px;
}
[hidden] { display: none !important; }

.dw-app { min-height: 100vh; }
.dw-container {
  width: min(calc(100% - 32px), var(--dw-maxw));
  margin-inline: auto;
  padding-block: 34px 56px;
}
.dw-stack { display: flex; flex-direction: column; gap: 20px; }
.dw-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.dw-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  min-height: 74px;
  padding: 10px max(20px, calc((100vw - var(--dw-maxw)) / 2));
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #fff;
  background: linear-gradient(100deg, var(--dw-blue-700), var(--dw-blue) 60%, #177bff);
  border-bottom: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 7px 24px rgba(0, 67, 176, .18);
}
.dw-brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; direction: ltr; }
.dw-brand__mark {
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 15px;
  color: var(--dw-navy);
  background: linear-gradient(145deg, var(--dw-orange), #ffb423);
  box-shadow: inset 0 1px rgba(255,255,255,.5), 0 8px 20px rgba(26, 42, 76, .22);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -.08em;
}
.dw-brand__copy { display: flex; flex-direction: column; line-height: 1.1; }
.dw-brand__name { font-size: 22px; font-weight: 850; letter-spacing: -.025em; }
.dw-brand__tagline { margin-top: 5px; color: rgba(255,255,255,.78); font-size: 11px; letter-spacing: .055em; text-transform: uppercase; }

.dw-conn {
  display: inline-flex;
  min-height: 36px;
  padding: 7px 12px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  color: inherit;
  background: rgba(3, 31, 80, .16);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.dw-conn__dot { width: 9px; height: 9px; border-radius: 50%; background: #52dd98; box-shadow: 0 0 0 5px rgba(82,221,152,.16); }
.dw-conn[data-state="lost"] .dw-conn__dot { background: #ffb020; box-shadow: 0 0 0 5px rgba(255,176,32,.17); }

.dw-btn {
  display: inline-flex;
  min-height: 46px;
  padding: 11px 18px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.15;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, opacity .16s ease;
}
.dw-btn:hover { transform: translateY(-1px); }
.dw-btn:active { transform: translateY(0); }
.dw-btn:disabled { cursor: wait; opacity: .52; transform: none; }
.dw-btn--block { width: 100%; }
.dw-btn--compact { min-height: 38px; padding: 8px 12px; border-radius: 11px; font-size: 13px; }
.dw-btn--action { color: #fff; background: linear-gradient(135deg, var(--dw-orange), #ff9e1b); box-shadow: 0 9px 22px rgba(255,138,0,.22); }
.dw-btn--primary { color: #fff; background: linear-gradient(135deg, var(--dw-blue), #2180ff); box-shadow: 0 9px 22px rgba(8,102,255,.20); }
.dw-btn--accent { color: #05233a; background: var(--dw-cyan); }
.dw-btn--secondary { color: var(--dw-text); background: #fff; border-color: var(--dw-line); }
.dw-btn--danger { color: #fff; background: var(--dw-red); }
.dw-btn--ghost { color: inherit; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }

.dw-card, .dw-panel {
  padding: 24px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(201, 214, 229, .86);
  border-radius: var(--dw-radius);
  box-shadow: var(--dw-shadow-sm);
}
.dw-card h1, .dw-card h2, .dw-card h3 { margin: 0; line-height: 1.2; }
.dw-hint, .dw-page-subtitle { margin: 0; color: var(--dw-muted); }
.dw-eyebrow, .dw-section-kicker {
  display: block;
  color: var(--dw-blue);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.dw-page-heading h1 { margin: 4px 0 3px; font-size: clamp(28px, 6vw, 40px); line-height: 1.12; letter-spacing: -.035em; }

.dw-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.dw-field label { font-size: 14px; font-weight: 750; }
.dw-field input, .dw-input, .dw-field select {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  color: var(--dw-text);
  background: #f9fbfd;
  border: 1px solid #cbd8e7;
  border-radius: 13px;
  transition: border .15s, box-shadow .15s, background .15s;
}
.dw-field input:focus, .dw-input:focus, .dw-field select:focus { background: #fff; border-color: var(--dw-blue); box-shadow: 0 0 0 4px rgba(8,102,255,.10); outline: none; }
.dw-field input[readonly] { color: var(--dw-blue-700); background: var(--dw-blue-050); font-weight: 800; }
.dw-error-text, [data-state="error"] { margin: 0; padding: 10px 12px; color: #a82017; background: #fff0ee; border: 1px solid #ffd0cb; border-radius: 10px; font-size: 14px; }
[data-state="empty"] { padding: 28px 18px; color: var(--dw-muted); background: #f7f9fc; border: 1px dashed #cbd8e7; border-radius: 14px; text-align: center; }
[data-state="loading"] { min-height: 130px; display: grid; place-items: center; color: var(--dw-muted); }
[data-state="loading"]::before { content: ""; width: 28px; height: 28px; border: 3px solid #dbe8f8; border-top-color: var(--dw-blue); border-radius: 50%; animation: dw-spin .8s linear infinite; }
@keyframes dw-spin { to { transform: rotate(360deg); } }

/* Auth */
[data-screen="login"] .dw-container, [data-screen="register"] .dw-container, [data-screen="register-submitted"] .dw-container {
  display: grid;
  width: min(calc(100% - 28px), 1050px);
  min-height: calc(100vh - 74px);
  grid-template-columns: minmax(0, .88fr) minmax(390px, 1.12fr);
  align-items: stretch;
  gap: 0;
  padding-block: 42px;
}
.dw-auth-intro {
  position: relative;
  display: flex;
  padding: 58px 48px;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 80% 10%, rgba(6,199,232,.7), transparent 13rem),
    linear-gradient(145deg, #074db9, var(--dw-blue));
  border-radius: 28px 0 0 28px;
  box-shadow: var(--dw-shadow);
}
[dir="rtl"] .dw-auth-intro { border-radius: 0 28px 28px 0; }
.dw-auth-intro::after { content: ""; position: absolute; inset: 26px -80px auto auto; width: 260px; height: 260px; border: 38px solid rgba(255,255,255,.08); border-radius: 50%; }
.dw-auth-intro__mark { display: grid; width: 74px; height: 74px; margin-bottom: auto; place-items: center; color: var(--dw-navy); background: var(--dw-orange); border-radius: 22px; font-size: 42px; font-weight: 900; box-shadow: 0 18px 36px rgba(5,30,80,.22); }
.dw-auth-intro .dw-eyebrow { color: #9ceeff; }
.dw-auth-intro h1 { max-width: 460px; margin: 9px 0 12px; font-size: clamp(38px, 4.4vw, 62px); line-height: .98; letter-spacing: -.05em; }
.dw-auth-intro p { max-width: 430px; margin: 0; color: rgba(255,255,255,.8); font-size: 17px; }
.dw-auth-card { justify-content: center; padding: clamp(28px, 5vw, 56px); border-radius: 0 28px 28px 0; box-shadow: var(--dw-shadow); }
[dir="rtl"] .dw-auth-card { border-radius: 28px 0 0 28px; }
.dw-auth-card form { display: flex; flex-direction: column; }
.dw-success-card { align-items: center; justify-content: center; text-align: center; }
.dw-success-mark { display: grid; width: 72px; height: 72px; place-items: center; color: #fff; background: var(--dw-green); border-radius: 24px; font-size: 36px; font-weight: 900; }

/* Courier */
[data-screen^="courier-"] { padding-bottom: 86px; }
[data-screen^="courier-"] .dw-container { width: min(calc(100% - 24px), var(--dw-appw)); padding-top: 26px; }
[data-screen^="courier-"] .dw-header { padding-inline: max(16px, calc((100vw - var(--dw-appw)) / 2)); }
.dw-status-hero {
  position: relative;
  min-height: 210px;
  padding: 28px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #073e9e, var(--dw-blue) 75%);
  border: 0;
  box-shadow: 0 22px 44px rgba(8,102,255,.22);
}
.dw-status-hero::after { content: ""; position: absolute; width: 180px; height: 180px; inset-inline-end: -40px; bottom: -60px; border: 30px solid rgba(255,255,255,.09); border-radius: 50%; }
.dw-status-hero__copy { position: relative; z-index: 1; }
.dw-status-hero .dw-eyebrow { color: #a7edff; }
.dw-status-hero .dw-state__title { margin-top: 12px; font-size: clamp(35px, 10vw, 50px); line-height: 1.05; letter-spacing: -.04em; }
.dw-status-hero__signal { position: absolute; inset-inline-end: 24px; top: 24px; width: 13px; height: 13px; background: var(--dw-orange); border: 4px solid rgba(255,255,255,.3); border-radius: 50%; box-sizing: content-box; }
.dw-metric-card { display: flex; padding: 22px; align-items: center; gap: 18px; }
.dw-metric-card__icon { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 18px; background: var(--dw-orange-100); }
.dw-metric-card__icon::before { content: "✓"; color: var(--dw-orange); font-size: 25px; font-weight: 900; }
.dw-metric-card__copy { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 20px; }
.dw-metric-card__label { color: var(--dw-muted); font-weight: 700; }
.dw-metric-card__value { color: var(--dw-navy); font-size: 34px; font-weight: 900; }
.dw-action-panel { padding: 16px; }
.dw-action-panel .dw-btn { min-height: 56px; }
.dw-position { padding: 28px; color: #fff; background: linear-gradient(145deg, #ff7c00, #ff9e00); border: 0; box-shadow: 0 20px 42px rgba(255,138,0,.22); text-align: center; }
.dw-position__eyebrow { display: block; color: rgba(255,255,255,.78); font-weight: 800; }
.dw-position__number { display: block; font-size: clamp(80px, 27vw, 132px); font-weight: 900; line-height: .95; letter-spacing: -.07em; }
.dw-position__label { font-size: 18px; font-weight: 800; }
.dw-queue-action { padding: 22px; }
.dw-trip-card { position: relative; padding: 28px; overflow: hidden; }
.dw-trip-card__visual { width: 72px; height: 72px; border-radius: 22px; background: linear-gradient(135deg, var(--cyan, #06c7e8), var(--dw-blue)); }
.dw-trip-card__visual::before { content: "→"; display: grid; height: 100%; place-items: center; color: #fff; font-size: 35px; font-weight: 900; }
.dw-trip-card__state { color: var(--dw-blue-700); font-size: 24px; font-weight: 900; }

.dw-bottom-nav {
  position: fixed;
  z-index: 35;
  inset-inline: 0;
  bottom: 0;
  display: grid;
  width: min(calc(100% - 20px), 500px);
  min-height: 68px;
  margin: 0 auto 10px;
  padding: 7px;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(198,211,226,.86);
  border-radius: 21px;
  box-shadow: 0 16px 45px rgba(20, 43, 77, .18);
  backdrop-filter: blur(18px);
}
.dw-bottom-nav__item { display: flex; padding: 7px 4px; flex-direction: column; align-items: center; gap: 3px; color: var(--dw-muted); border-radius: 14px; font-size: 11px; font-weight: 750; }
.dw-bottom-nav__item[aria-current="page"] { color: var(--dw-blue); background: var(--dw-blue-050); }
.dw-bottom-nav__icon { display: block; width: 22px; height: 22px; position: relative; }
.dw-bottom-nav__item[data-icon="home"] .dw-bottom-nav__icon::before { content: "⌂"; font-size: 23px; line-height: 20px; }
.dw-bottom-nav__item[data-icon="queue"] .dw-bottom-nav__icon::before { content: "≡"; font-size: 27px; line-height: 18px; }
.dw-bottom-nav__item[data-icon="trip"] .dw-bottom-nav__icon::before { content: "→"; font-size: 24px; line-height: 20px; }

/* Supervisor */
[data-screen="supervisor"] .dw-container { padding-top: 26px; }
.dw-dashboard-intro { display: flex; padding: 8px 4px 0; align-items: end; justify-content: space-between; gap: 20px; }
.dw-dashboard-intro h1 { margin: 4px 0 0; font-size: clamp(31px, 4vw, 47px); line-height: 1.05; letter-spacing: -.045em; }
.dw-live-badge { display: inline-flex; padding: 8px 13px; align-items: center; gap: 8px; color: #067747; background: #e6f8ef; border: 1px solid #b9ebd1; border-radius: 999px; font-size: 13px; font-weight: 850; }
.dw-live-badge::before { content: ""; width: 8px; height: 8px; background: #12b76a; border-radius: 50%; box-shadow: 0 0 0 4px rgba(18,183,106,.13); }
.dw-subnav { display: flex; padding: 7px; gap: 4px; overflow-x: auto; background: #fff; border: 1px solid var(--dw-line); border-radius: 15px; box-shadow: var(--dw-shadow-sm); scrollbar-width: none; }
.dw-subnav__item { padding: 9px 14px; color: var(--dw-muted); border-radius: 10px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.dw-subnav__item:first-child { color: #fff; background: var(--dw-blue); }
.dw-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.dw-kpi { display: flex; min-height: 122px; padding: 20px; align-items: center; gap: 15px; background: #fff; border: 1px solid var(--dw-line); border-radius: 18px; box-shadow: var(--dw-shadow-sm); }
.dw-kpi__icon { display: grid; width: 46px; height: 46px; place-items: center; flex: 0 0 auto; color: var(--dw-blue); background: var(--dw-blue-050); border-radius: 15px; font-weight: 900; }
.dw-kpi__icon[data-icon="delivered"]::before { content: "✓"; }
.dw-kpi__icon[data-icon="queue"]::before { content: "≡"; font-size: 24px; }
.dw-kpi__icon[data-icon="trip"]::before { content: "→"; font-size: 22px; }
.dw-kpi__icon[data-icon="people"]::before { content: "●"; }
.dw-kpi[data-tone="cyan"] .dw-kpi__icon { color: #0089a7; background: #e6faff; }
.dw-kpi[data-tone="orange"] .dw-kpi__icon { color: #d66a00; background: var(--dw-orange-100); }
.dw-kpi[data-tone="green"] .dw-kpi__icon { color: #078452; background: #e8f8f0; }
.dw-kpi__copy { min-width: 0; }
.dw-kpi__label { color: var(--dw-muted); font-size: 13px; font-weight: 750; }
.dw-kpi__value { margin-top: 2px; color: var(--dw-navy); font-size: 36px; font-weight: 900; line-height: 1; }
[data-role="dashboard-grid"] { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, .72fr); align-items: start; gap: 18px; }
.dw-section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--dw-navy); font-size: 20px; font-weight: 900; }
.dw-count { display: grid; min-width: 30px; height: 30px; padding: 0 9px; place-items: center; color: var(--dw-blue); background: var(--dw-blue-050); border-radius: 999px; font-size: 13px; }
.dw-queue-cards { display: flex; flex-direction: column; gap: 12px; }
.dw-action-card { display: grid; grid-template-columns: 94px minmax(0, 1fr); overflow: hidden; background: #fff; border: 1px solid var(--dw-line); border-radius: 18px; box-shadow: 0 7px 18px rgba(24,48,80,.06); }
.dw-action-card[data-first="true"] { border-color: rgba(255,138,0,.55); box-shadow: 0 12px 26px rgba(255,138,0,.12); }
.dw-action-card__rank { display: flex; padding: 16px 10px; flex-direction: column; align-items: center; justify-content: center; color: var(--dw-blue); background: var(--dw-blue-050); border-inline-end: 1px solid #d6e7ff; text-align: center; }
.dw-action-card[data-first="true"] .dw-action-card__rank { color: #fff; background: linear-gradient(150deg, #ff7800, var(--dw-orange)); border: 0; }
.dw-action-card__rank span { font-size: 10px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.dw-action-card__rank strong { font-size: 42px; line-height: 1; }
.dw-action-card__body { padding: 17px; }
.dw-action-card__head { display: flex; align-items: center; gap: 12px; }
.dw-avatar { display: grid; width: 46px; height: 46px; place-items: center; flex: 0 0 auto; color: #fff; background: linear-gradient(145deg, var(--dw-blue), var(--dw-cyan)); border-radius: 15px; font-size: 19px; font-weight: 900; }
.dw-action-card__identity { min-width: 0; }
.dw-action-card__name { overflow: hidden; color: var(--dw-navy); font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.dw-action-card__meta { margin-top: 2px; color: var(--dw-muted); font-size: 13px; }
.dw-badge { display: inline-flex; margin-top: 7px; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 850; }
.dw-badge--orange { color: #9c4d00; background: var(--dw-orange-100); }
.dw-action-card__actions { display: grid; margin-top: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dw-action-card__actions .dw-btn { min-height: 42px; padding: 8px; font-size: 12px; }
.dw-action-card__actions [data-action="primary"] { grid-column: span 2; order: -2; }
.dw-action-card__actions [data-action="support"] { order: -1; }
.dw-list { display: flex; margin: 0; padding: 0; flex-direction: column; gap: 9px; list-style: none; }
.dw-list__item { display: flex; padding: 13px; align-items: center; justify-content: space-between; gap: 12px; background: #f8fafc; border: 1px solid #e5ebf2; border-radius: 13px; }
.dw-table-wrap { max-height: 360px; overflow: auto; border: 1px solid var(--dw-line); border-radius: 14px; }
.dw-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dw-table th { position: sticky; top: 0; z-index: 1; padding: 12px; color: var(--dw-muted); background: #f4f7fa; text-align: start; font-size: 11px; text-transform: uppercase; letter-spacing: .055em; }
.dw-table td { padding: 12px; border-top: 1px solid #e7edf4; }
.dw-table tr:hover td { background: #f9fbfd; }
.dw-panel--qr .dw-qr-holder { max-width: 190px; margin-inline: auto; }
.dw-qr-holder svg, .dw-qr-holder canvas { display: block; max-width: 100%; height: auto; margin-inline: auto; }

/* Station display */
[data-screen="station"] { min-height: 100vh; color: #fff; background: #061631; overflow: hidden; }
.dw-station__controls { display: grid; height: 82px; padding: 11px 24px; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; background: #081f47; border-bottom: 1px solid rgba(78,199,255,.3); }
.dw-station__brand { display: flex; align-items: center; gap: 11px; direction: ltr; }
.dw-station__brand .dw-brand__mark { width: 48px; height: 48px; }
.dw-station__brand div { display: flex; flex-direction: column; line-height: 1.15; }
.dw-station__brand strong { font-size: 20px; }
.dw-station__brand small { margin-top: 4px; color: #87b7df; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.dw-station__clock { color: #fff; font-size: 24px; font-weight: 850; direction: ltr; }
.dw-station__actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.dw-station__actions .dw-btn { min-height: 38px; padding: 8px 11px; font-size: 12px; }
.dw-station__layout { display: grid; height: calc(100vh - 82px); padding: 20px 24px 24px; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .58fr); gap: 20px; }
.dw-station__board { display: grid; min-height: 0; grid-template-rows: minmax(0, 1.15fr) minmax(0, .85fr); gap: 18px; }
.dw-station__now { display: flex; min-height: 0; padding: clamp(24px, 4vh, 42px); flex-direction: column; justify-content: center; overflow: hidden; background: radial-gradient(circle at 90% 10%, rgba(6,199,232,.18), transparent 45%), linear-gradient(145deg, #0b2f71, #0b2657); border: 1px solid rgba(93,181,255,.28); border-radius: 28px; box-shadow: 0 24px 60px rgba(0,0,0,.22); }
.dw-station__section-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.dw-station__now-label, .dw-station__section-title { color: var(--dw-cyan); font-size: clamp(13px, 1.25vw, 20px); font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.dw-station__rank { display: grid; width: 54px; height: 54px; place-items: center; color: var(--dw-navy); background: var(--dw-orange); border-radius: 17px; font-size: 18px; font-weight: 900; }
.dw-station__now-id { margin-top: auto; overflow: hidden; font-size: clamp(48px, 6.5vw, 112px); font-weight: 950; line-height: .98; letter-spacing: -.045em; text-overflow: ellipsis; white-space: nowrap; }
.dw-station__now-name { margin-top: 14px; color: #abc6e5; font-size: clamp(17px, 2vw, 30px); font-weight: 750; direction: ltr; }
.dw-station__next-panel { display: flex; min-height: 0; padding: 20px; flex-direction: column; background: rgba(11,38,87,.72); border: 1px solid rgba(90,144,214,.25); border-radius: 24px; }
.dw-station__next { display: grid; min-height: 0; margin-top: 12px; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.dw-station__next-item { display: grid; padding: 13px 15px; grid-template-columns: auto 1fr; align-items: center; gap: 11px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09); border-radius: 16px; }
.dw-station__next-item[data-empty="true"] { opacity: .4; }
.dw-station__next-pos { display: grid; min-width: 38px; height: 38px; place-items: center; color: #fff; background: rgba(6,199,232,.17); border-radius: 12px; font-size: 11px; font-weight: 850; }
.dw-station__next-id { overflow: hidden; font-size: clamp(16px, 1.55vw, 25px); font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.dw-station__next-item small { grid-column: 2; margin-top: -8px; color: #87a7cb; direction: ltr; }
.dw-station__qr { display: flex; min-height: 0; padding: clamp(20px, 2.2vw, 34px); flex-direction: column; align-items: center; text-align: center; background: #fff; color: var(--dw-navy); border-radius: 28px; box-shadow: 0 24px 65px rgba(0,0,0,.28); }
.dw-station__qr .dw-eyebrow { color: var(--dw-orange); }
.dw-station__qr h2 { margin: 5px 0 2px; font-size: clamp(22px, 2.2vw, 35px); line-height: 1.1; }
.dw-station__qr-hint { margin: 0; color: var(--dw-muted); font-size: 13px; }
.dw-station__qr .dw-qr-holder { display: grid; width: min(100%, 320px); margin-block: auto; padding: 14px; place-items: center; background: #fff; border: 1px solid var(--dw-line); border-radius: 20px; }
.dw-station__countdown { min-width: 90px; padding: 7px 14px; color: var(--dw-blue); background: var(--dw-blue-050); border-radius: 999px; font-size: 20px; font-weight: 900; direction: ltr; }
.dw-station-gate { display: grid; min-height: 100vh; padding: 0; grid-template-columns: 1.1fr .9fr; align-items: stretch; }
.dw-station-gate__hero { display: flex; padding: 8vw; flex-direction: column; justify-content: center; background: radial-gradient(circle at 10% 20%, rgba(6,199,232,.25), transparent 28rem), #071b3d; }
.dw-station-gate__hero .dw-brand__mark { width: 82px; height: 82px; font-size: 44px; }
.dw-station-gate__hero .dw-eyebrow { margin-top: 32px; color: var(--dw-cyan); }
.dw-station-gate__hero h1 { margin: 7px 0 0; font-size: clamp(60px, 8vw, 118px); line-height: 1; }
.dw-station-gate__hero p { color: #9eb8d8; }
.dw-station-gate__card { justify-content: center; color: var(--dw-text); border-radius: 0; }
[data-fullscreen="true"] .dw-station__controls { display: none; }
[data-fullscreen="true"] .dw-station__layout { height: 100vh; }

/* Scanner, modal, toasts */
.dw-scan-wrap { position: fixed; z-index: 100; inset: 0; display: flex; padding: 24px; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: #fff; background: rgba(3,14,36,.96); }
.dw-scan-video { width: min(100%, 560px); aspect-ratio: 3/4; object-fit: cover; border: 2px solid var(--dw-cyan); border-radius: 25px; box-shadow: 0 0 0 9px rgba(6,199,232,.10); }
.dw-manual-qr { width: min(100%, 560px); }
.dw-modal-backdrop { position: fixed; z-index: 120; inset: 0; display: grid; padding: 20px; place-items: center; background: rgba(4,17,42,.65); backdrop-filter: blur(8px); }
.dw-modal { width: min(100%, 460px); padding: 26px; background: #fff; border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.27); }
.dw-modal__title { margin: 0; font-size: 21px; }
.dw-modal__actions { display: flex; margin-top: 22px; justify-content: flex-end; gap: 9px; }
.dw-toast-region { position: fixed; z-index: 150; inset-inline-end: 18px; top: 90px; display: flex; width: min(calc(100% - 36px), 430px); flex-direction: column; gap: 10px; }
.dw-toast { padding: 15px 17px; background: #fff; border: 1px solid var(--dw-line); border-inline-start: 5px solid var(--dw-blue); border-radius: 14px; box-shadow: var(--dw-shadow); }
.dw-toast--error { border-inline-start-color: var(--dw-red); }
.dw-toast--success { border-inline-start-color: var(--dw-green); }
.dw-toast__title { font-weight: 850; }
.dw-toast__body { margin-top: 3px; color: var(--dw-muted); font-size: 13px; }
.dw-update-banner { position: fixed; z-index: 140; inset-inline: 18px; bottom: 18px; padding: 14px; color: #fff; background: var(--dw-navy); border-radius: 14px; text-align: center; box-shadow: var(--dw-shadow); }

@media (max-width: 1000px) {
  [data-role="dashboard-grid"] { grid-template-columns: 1fr; }
  .dw-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dw-station__layout { grid-template-columns: minmax(0, 1.4fr) minmax(270px, .65fr); padding: 14px; gap: 14px; }
  .dw-station__controls { padding-inline: 14px; }
  .dw-station__actions .dw-btn { padding-inline: 8px; }
}

@media (max-width: 760px) {
  .dw-header { min-height: 64px; padding: 8px 13px; }
  .dw-brand__mark { width: 40px; height: 40px; border-radius: 13px; font-size: 22px; }
  .dw-brand__name { font-size: 19px; }
  .dw-brand__tagline { display: none; }
  .dw-header .dw-conn [data-role="conn-label"] { display: none; }
  .dw-header .dw-conn { min-height: 34px; padding-inline: 10px; }
  .dw-container { width: min(calc(100% - 20px), var(--dw-maxw)); padding-block: 22px 40px; }
  [data-screen="login"] .dw-container, [data-screen="register"] .dw-container, [data-screen="register-submitted"] .dw-container { display: flex; width: min(calc(100% - 20px), 520px); min-height: 0; padding-block: 20px; flex-direction: column; }
  .dw-auth-intro { min-height: 210px; padding: 26px; border-radius: 24px 24px 0 0 !important; }
  .dw-auth-intro__mark { width: 54px; height: 54px; margin-bottom: 28px; border-radius: 17px; font-size: 30px; }
  .dw-auth-intro h1 { font-size: 36px; }
  .dw-auth-intro p { font-size: 14px; }
  .dw-auth-card { padding: 24px 20px; border-radius: 0 0 24px 24px !important; }
  .dw-card { padding: 20px; border-radius: 19px; }
  .dw-status-hero { min-height: 195px; }
  .dw-dashboard-intro { align-items: start; }
  .dw-dashboard-intro .dw-live-badge { display: none; }
  .dw-kpi { min-height: 105px; padding: 14px; }
  .dw-kpi__icon { width: 39px; height: 39px; border-radius: 12px; }
  .dw-kpi__value { font-size: 30px; }
  .dw-action-card { grid-template-columns: 72px minmax(0, 1fr); }
  .dw-action-card__rank strong { font-size: 34px; }
  .dw-action-card__actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dw-action-card__actions [data-action="primary"] { grid-column: span 2; }
  .dw-list__item { align-items: flex-start; flex-direction: column; }
  .dw-station-gate { grid-template-columns: 1fr; }
  .dw-station-gate__hero { display: none; }
  .dw-station-gate__card { min-height: 100vh; border-radius: 0; }
  [data-screen="station"] { overflow: auto; }
  .dw-station__controls { height: auto; min-height: 72px; grid-template-columns: 1fr auto; }
  .dw-station__clock { display: none; }
  .dw-station__actions { grid-column: 1 / -1; justify-content: flex-start; overflow-x: auto; }
  .dw-station__layout { height: auto; min-height: calc(100vh - 120px); grid-template-columns: 1fr; }
  .dw-station__board { min-height: 720px; }
  .dw-station__qr { min-height: 600px; }
}

@media (max-width: 430px) {
  body { font-size: 15px; }
  .dw-header .dw-btn { padding-inline: 9px; }
  .dw-kpis { grid-template-columns: 1fr 1fr; gap: 9px; }
  .dw-kpi { min-height: 92px; gap: 9px; }
  .dw-kpi__icon { display: none; }
  .dw-action-card { grid-template-columns: 58px minmax(0, 1fr); }
  .dw-action-card__body { padding: 13px; }
  .dw-avatar { width: 39px; height: 39px; border-radius: 12px; }
  .dw-action-card__actions .dw-btn { font-size: 11px; }
  .dw-modal { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .dw-header, .dw-subnav, .dw-btn, .dw-bottom-nav { display: none !important; }
  body, .dw-app { background: #fff !important; }
  .dw-card { box-shadow: none; }
}
