:root {
  color-scheme: light;
  --navy: #082b67;
  --navy-2: #0c3d86;
  --blue: #1769e8;
  --blue-2: #eaf2ff;
  --yellow: #ffc400;
  --ink: #172b4d;
  --muted: #74839a;
  --line: #e4eaf2;
  --canvas: #f2f5fa;
  --surface: #fff;
  --green: #21a675;
  --orange: #e99b26;
  --red: #db5866;
  --shadow: 0 12px 34px rgba(29, 55, 97, .08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(23, 105, 232, .24); outline-offset: 2px; }
button:disabled { opacity: .55; cursor: not-allowed; }

.topbar { height: 68px; display: flex; align-items: center; gap: 24px; padding: 0 clamp(16px, 3vw, 42px); color: #fff; background: var(--navy); box-shadow: 0 3px 14px rgba(6, 31, 72, .16); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 230px; }
.brand-mark { width: 35px; height: 35px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; overflow: hidden; border-radius: 8px; background: var(--yellow); transform: rotate(-4deg); box-shadow: 0 5px 14px rgba(255,196,0,.2); }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { background: var(--navy); }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 15px; letter-spacing: .01em; }
.brand-copy small { font-size: 9px; color: #a9c5ed; letter-spacing: .12em; text-transform: uppercase; }
.role-switch { display: flex; gap: 3px; margin: 0 auto; padding: 4px; border: 1px solid rgba(255,255,255,.13); border-radius: 12px; background: rgba(255,255,255,.07); }
.role-button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 9px; color: #c4d4ec; background: transparent; font-size: 12px; transition: .18s ease; white-space: nowrap; }
.role-button:hover { background: rgba(255,255,255,.1); color: #fff; }
.role-button.active { background: #fff; color: var(--navy); box-shadow: 0 3px 10px rgba(0,0,0,.13); font-weight: 650; }
.topbar-right { display: flex; align-items: center; gap: 14px; min-width: 230px; justify-content: flex-end; }
.demo-badge { padding: 5px 9px; border-radius: 6px; color: #ffe38a; background: rgba(255,196,0,.13); font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.reset-button { border: 0; padding: 8px 0; color: #c4d4ec; background: transparent; font-size: 11px; }
.reset-button:hover { color: white; }
.backend-scope { display: flex; align-items: center; gap: 8px; margin: 0 auto; color: #b9d2f5; font-size: 9px; font-weight: 650; letter-spacing: .08em; }
.backend-live-dot { width: 8px; height: 8px; display: inline-block; flex: 0 0 auto; border-radius: 50%; background: #41d59a; box-shadow: 0 0 0 3px rgba(65,213,154,.13); }
.backend-user { max-width: 180px; overflow: hidden; color: #dce9fc; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right .reset-button[data-action="backend-login"] { padding: 8px 11px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; color: #fff; background: rgba(255,255,255,.08); }
.backend-login-note { grid-column: 1 / -1; margin: 0; color: #74839a; font-size: 9px; line-height: 1.5; }
.backend-notice { margin: 0 0 13px; padding: 10px 12px; border: 1px solid #f1d79e; border-radius: 9px; color: #765619; background: #fff8e9; font-size: 10px; line-height: 1.45; }
.backend-footnote { margin: 12px 0 0; color: #8390a2; font-size: 9px; text-align: right; }
.mobile-only-brand { display: none; }

.driver-stage { min-height: calc(100vh - 68px); display: grid; grid-template-columns: minmax(120px, 1fr) minmax(330px, 390px) minmax(120px, 1fr); align-items: center; gap: 28px; padding: 28px clamp(20px, 6vw, 90px); background: radial-gradient(ellipse at 50% 25%, #fff 0, #f2f5fa 68%); }
.stage-note { max-width: 270px; }
.stage-note h1 { margin: 12px 0; color: var(--navy); font-size: clamp(26px, 3vw, 40px); line-height: 1.05; letter-spacing: -.04em; }
.stage-note p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.eyebrow { color: var(--blue); font-size: 9px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.stage-points { display: grid; gap: 11px; margin-top: 26px; color: #52647e; font-size: 11px; }
.stage-points span { display: flex; align-items: center; gap: 9px; }
.stage-points i { width: 20px; height: 20px; display: grid; place-items: center; color: var(--blue); background: var(--blue-2); border-radius: 6px; font-style: normal; }
.device { width: min(100%, 390px); height: min(790px, calc(100vh - 104px)); min-height: 630px; justify-self: center; padding: 7px; border: 1px solid #d7deea; border-radius: 34px; background: #101b2f; box-shadow: 0 35px 80px rgba(15, 39, 82, .2), 0 8px 24px rgba(15, 39, 82, .1); }
.device-screen { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 27px; background: #f7f9fc; position: relative; }
.device-status { flex: 0 0 24px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; color: #203451; background: #fff; font-size: 9px; font-weight: 700; }
.device-status span:last-child { letter-spacing: .12em; }
.driver-app-header { min-height: 57px; display: flex; align-items: center; gap: 11px; padding: 9px 16px; color: white; background: var(--navy); }
.driver-app-header .brand-mark { width: 30px; height: 30px; border-radius: 7px; }
.driver-app-header strong { display: block; font-size: 12px; }
.driver-app-header small { display: block; margin-top: 3px; color: #afc8ea; font-size: 9px; }
.driver-app-header .header-action { margin-left: auto; width: 31px; height: 31px; border: 1px solid rgba(255,255,255,.17); border-radius: 9px; color: #dce9fc; background: rgba(255,255,255,.08); }
.mobile-content { flex: 1; min-height: 0; overflow-y: auto; padding: 15px 15px 20px; scrollbar-width: thin; scrollbar-color: #c8d2e1 transparent; }
.mobile-content::-webkit-scrollbar { width: 4px; }
.mobile-content::-webkit-scrollbar-thumb { border-radius: 4px; background: #c8d2e1; }
.mobile-bottom-nav { flex: 0 0 59px; display: grid; grid-template-columns: repeat(4, 1fr); align-items: stretch; border-top: 1px solid #e7ebf1; background: rgba(255,255,255,.97); }
.mobile-bottom-nav button { display: grid; align-content: center; justify-items: center; gap: 3px; border: 0; color: #8996a9; background: transparent; font-size: 8px; }
.mobile-bottom-nav button.active { color: var(--blue); font-weight: 700; }
.mobile-bottom-nav .nav-icon { font-size: 17px; line-height: 1; }
.mobile-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin: 3px 0 15px; }
.mobile-title-row h2 { margin: 0; color: #172c4c; font-size: 19px; letter-spacing: -.03em; }
.mobile-title-row p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.date-chip { padding: 6px 8px; color: #6d7b91; border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 8px; white-space: nowrap; }
.status-card { padding: 13px; display: flex; align-items: center; gap: 11px; border: 1px solid #d9e7fb; border-radius: 13px; background: linear-gradient(120deg,#fff,#f0f6ff); }
.status-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: #e2eeff; font-size: 17px; }
.status-copy { flex: 1; min-width: 0; }
.status-copy strong { display: block; color: #183c75; font-size: 11px; }
.status-copy small { display: block; margin-top: 4px; color: #7c8ca4; font-size: 9px; }
.online-pill { padding: 5px 7px; border-radius: 20px; color: #158257; background: #ddf5eb; font-size: 8px; font-weight: 700; }
.section-label { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 9px; color: #344967; font-size: 11px; font-weight: 700; }
.section-label button { border: 0; color: var(--blue); background: transparent; font-size: 9px; }
.next-service-card { padding: 12px; border: 1px solid #e4eaf3; border-radius: 12px; background: white; box-shadow: 0 5px 16px rgba(34,62,105,.035); }
.service-card-top { display: flex; align-items: center; gap: 9px; }
.service-calendar-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: #fff4d0; color: #af7c00; font-size: 15px; }
.service-card-top strong { display: block; font-size: 10px; }
.service-card-top small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.service-status { margin-left: auto; color: #1678cf; background: #eaf4ff; padding: 5px 7px; border-radius: 20px; font-size: 8px; }
.service-card-detail { margin: 10px 0 0 40px; color: #74839a; font-size: 9px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-action { min-height: 66px; padding: 10px; display: flex; align-items: center; gap: 8px; border: 1px solid #e4eaf3; border-radius: 11px; text-align: left; color: #364c6a; background: #fff; font-size: 9px; font-weight: 600; transition: .16s; }
.quick-action:hover { border-color: #a6c5f3; transform: translateY(-1px); box-shadow: 0 6px 15px rgba(23,105,232,.08); }
.quick-action i { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: var(--blue); background: var(--blue-2); font-size: 14px; font-style: normal; flex: 0 0 auto; }
.announcement-preview { padding: 11px 12px; border-left: 3px solid var(--yellow); border-radius: 0 9px 9px 0; background: #fff; }
.announcement-preview strong { display: block; font-size: 10px; }
.announcement-preview p { margin: 5px 0 0; color: #74839a; font-size: 9px; line-height: 1.45; }
.announcement-preview small { display: block; margin-top: 8px; color: #9aa6b7; font-size: 8px; }
.list-stack { display: grid; gap: 8px; }
.list-card { width: 100%; padding: 11px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid #e4eaf3; border-radius: 11px; text-align: left; background: white; color: inherit; }
.list-card:hover { border-color: #abc7ef; }
.list-avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; color: #1558b8; background: #e7f0ff; font-size: 12px; font-weight: 700; }
.list-copy { min-width: 0; flex: 1; }
.list-copy strong { display: block; font-size: 10px; }
.list-copy p { margin: 4px 0 0; color: #7a8798; font-size: 9px; line-height: 1.4; }
.list-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; color: #9aa6b7; font-size: 8px; }
.unread-dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--blue); }
.mobile-primary { width: 100%; min-height: 41px; margin-top: 12px; border: 0; border-radius: 10px; color: white; background: var(--blue); font-size: 10px; font-weight: 650; box-shadow: 0 5px 13px rgba(23,105,232,.2); }
.mobile-primary:hover, .button-primary:hover { background: #0f58c8; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 20px; font-size: 8px; font-weight: 650; white-space: nowrap; }
.tag.blue { color: #1769c8; background: #e7f2ff; }
.tag.green { color: #11815a; background: #e1f6ed; }
.tag.orange { color: #aa6c09; background: #fff1d7; }
.tag.red { color: #b64754; background: #ffeaed; }
.chat-conversation { display: flex; flex-direction: column; min-height: 450px; }
.conversation-head { display: flex; align-items: center; gap: 9px; padding: 3px 0 11px; border-bottom: 1px solid var(--line); }
.back-button { width: 27px; height: 27px; border: 0; border-radius: 8px; color: var(--blue); background: #eaf2ff; }
.conversation-head strong { display: block; font-size: 10px; }
.conversation-head small { display: block; margin-top: 3px; color: var(--green); font-size: 8px; }
.conversation-messages { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 13px 0; }
.bubble { max-width: 83%; padding: 9px 10px; border-radius: 12px; color: #445675; background: white; font-size: 9px; line-height: 1.45; box-shadow: 0 2px 7px rgba(27,52,92,.04); }
.bubble.mine { align-self: flex-end; color: white; background: var(--blue); border-bottom-right-radius: 4px; }
.bubble.theirs { align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble time { display: block; margin-top: 4px; opacity: .65; text-align: right; font-size: 7px; }
.message-compose { display: flex; gap: 6px; margin-top: auto; }
.message-compose input { min-width: 0; flex: 1; height: 37px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: white; font-size: 9px; }
.message-compose button { width: 38px; border: 0; border-radius: 10px; color: white; background: var(--blue); }
.profile-card { padding: 15px; text-align: center; border: 1px solid var(--line); border-radius: 13px; background: white; }
.profile-avatar { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 9px; border-radius: 18px; color: var(--navy); background: #eaf2ff; font-weight: 750; font-size: 19px; }
.profile-card h3 { margin: 0; font-size: 13px; }
.profile-card p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.profile-data { display: grid; gap: 0; margin-top: 12px; text-align: left; }
.profile-data div { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid #edf0f5; font-size: 9px; }
.profile-data span { color: var(--muted); }
.stage-caption { justify-self: start; max-width: 235px; padding: 17px; border: 1px solid rgba(220,228,239,.8); border-radius: 14px; background: rgba(255,255,255,.65); }
.stage-caption strong { display: block; color: var(--navy); font-size: 12px; }
.stage-caption p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

.console-shell { min-height: calc(100vh - 68px); display: grid; grid-template-columns: 228px minmax(0, 1fr); }
.console-sidebar { padding: 22px 14px; color: white; background: var(--navy); }
.console-org { padding: 0 9px 20px; border-bottom: 1px solid rgba(255,255,255,.14); }
.console-org small { display: block; margin-bottom: 6px; color: #a9c5ed; font-size: 8px; letter-spacing: .12em; }
.console-org strong { display: block; font-size: 12px; }
.console-org span { display: block; margin-top: 5px; color: #b2c4df; font-size: 9px; }
.sidebar-label { display: block; margin: 20px 10px 8px; color: #92aed4; font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.sidebar-nav { display: grid; gap: 4px; }
.sidebar-nav button { min-height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border: 0; border-radius: 8px; color: #c3d3ea; background: transparent; text-align: left; font-size: 10px; transition: .15s; }
.sidebar-nav button:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar-nav button.active { color: #fff; background: #1556b7; box-shadow: inset 3px 0 0 var(--yellow); }
.sidebar-nav button i { width: 17px; color: #a8c7f1; font-style: normal; text-align: center; font-size: 13px; }
.console-main { min-width: 0; padding: 27px clamp(18px, 3vw, 42px) 40px; }
.console-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.console-header h1 { margin: 5px 0 0; color: #172b4d; font-size: clamp(22px, 2.3vw, 30px); letter-spacing: -.04em; }
.console-header p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.button-primary, .button-secondary { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; border-radius: 8px; font-size: 10px; font-weight: 650; transition: .15s; }
.button-primary { border: 1px solid var(--blue); color: #fff; background: var(--blue); }
.button-secondary { border: 1px solid #dbe3ee; color: #526581; background: #fff; }
.button-secondary:hover { border-color: #9db8df; color: var(--blue); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.metric-card { min-height: 105px; padding: 15px; display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 3px 12px rgba(26,55,98,.025); }
.metric-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; font-size: 15px; }
.metric-icon.blue { color: #2368c6; background: #eaf2ff; }
.metric-icon.yellow { color: #a87500; background: #fff4d4; }
.metric-icon.green { color: #18805c; background: #e2f6ed; }
.metric-icon.purple { color: #7253bc; background: #f0eaff; }
.metric-copy { min-width: 0; }
.metric-copy small { display: block; color: #8090a7; font-size: 8px; font-weight: 700; letter-spacing: .07em; }
.metric-copy strong { display: block; margin-top: 6px; color: #1b3357; font-size: 23px; line-height: 1; }
.metric-copy span { display: block; margin-top: 6px; color: #8a97aa; font-size: 8px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(265px,.85fr); gap: 14px; align-items: start; }
.surface { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 3px 12px rgba(26,55,98,.025); overflow: hidden; }
.surface + .surface { margin-top: 14px; }
.surface-heading { min-height: 52px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf0f5; }
.surface-heading h2 { margin: 0; color: #263d60; font-size: 12px; }
.surface-heading p { margin: 4px 0 0; color: #8c99ab; font-size: 9px; }
.surface-content { padding: 13px 15px; }
.inline-link { border: 0; color: var(--blue); background: transparent; font-size: 9px; }
.announcement-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f2f6; }
.announcement-row:last-child { border-bottom: 0; }
.announcement-line { width: 3px; border-radius: 3px; background: var(--yellow); flex: 0 0 auto; }
.announcement-row strong { display: block; font-size: 10px; }
.announcement-row p { margin: 4px 0; color: #76859a; font-size: 9px; line-height: 1.45; }
.announcement-row small { color: #9ba7b7; font-size: 8px; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { padding: 10px 12px; color: #8694a8; background: #fafbfd; font-size: 8px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.data-table td { padding: 11px 12px; border-top: 1px solid #eff2f6; color: #405574; font-size: 9px; vertical-align: middle; }
.data-table td strong { color: #213b60; font-weight: 650; }
.subtext { display: block; margin-top: 4px; color: #8f9bad; font-size: 8px; }
.table-actions { display: flex; gap: 6px; align-items: center; }
.table-actions select, .compact-select { min-height: 27px; padding: 0 7px; border: 1px solid #e2e8f0; border-radius: 6px; color: #526581; background: white; font-size: 8px; }
.small-button { min-height: 27px; padding: 0 8px; border: 1px solid #dbe4f0; border-radius: 6px; color: #41618e; background: white; font-size: 8px; white-space: nowrap; }
.small-button:hover { border-color: #9db8df; color: var(--blue); }
.small-button.danger { color: #ba4c5a; }
.week-strip { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 6px; margin: 0 0 12px; }
.day-cell { padding: 8px 3px; border: 1px solid #edf0f5; border-radius: 8px; text-align: center; color: #78879c; background: #fff; font-size: 8px; }
.day-cell strong { display: block; margin-top: 5px; color: #2b4366; font-size: 12px; }
.day-cell.selected { border-color: var(--blue); color: var(--blue); background: #edf4ff; box-shadow: inset 0 0 0 1px var(--blue); }
.slot-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.slot-pill { min-width: 96px; padding: 8px 10px; display: inline-grid; gap: 4px; border: 1px solid #dbe6f4; border-radius: 8px; color: #2d568e; background: #f5f9ff; text-align: left; transition: .15s; }
.slot-pill:not(.readonly):hover { border-color: var(--blue); background: #edf4ff; transform: translateY(-1px); }
.slot-pill strong { font-size: 9px; }
.slot-pill small { color: #7a8aa1; font-size: 8px; }
.slot-pill.readonly { cursor: default; min-width: 140px; }
.schedule-list { display: grid; gap: 7px; }
.schedule-item { display: flex; align-items: center; gap: 10px; padding: 9px; border: 1px solid #edf0f5; border-radius: 9px; }
.schedule-time { width: 43px; color: #28569c; font-size: 9px; font-weight: 700; }
.schedule-copy { min-width: 0; flex: 1; }
.schedule-copy strong { display: block; font-size: 9px; }
.schedule-copy small { display: block; margin-top: 3px; color: #8997a9; font-size: 8px; }
.search-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.search-row input { width: min(290px,100%); height: 34px; padding: 0 10px; border: 1px solid #e1e7ef; border-radius: 8px; background: white; font-size: 9px; }
.search-row select { height: 34px; padding: 0 9px; border: 1px solid #e1e7ef; border-radius: 8px; color: #536580; background: white; font-size: 9px; }
.empty-state { padding: 28px 15px; text-align: center; color: #8997a9; font-size: 10px; }
.empty-state strong { display: block; margin-bottom: 5px; color: #4f6380; font-size: 12px; }
.system-list { display: grid; gap: 0; }
.system-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid #eff2f6; font-size: 9px; }
.system-row:last-child { border-bottom: 0; }
.system-row span { color: #6f8098; }
.system-row strong { display: flex; align-items: center; gap: 6px; color: #21825f; font-size: 9px; }
.system-row strong i { width: 6px; height: 6px; border-radius: 50%; background: #21a675; }
.access-note { padding: 10px; border: 1px solid #f3e4b5; border-radius: 8px; color: #7a6740; background: #fff9e9; font-size: 9px; line-height: 1.45; }
.tab-row { display: flex; gap: 6px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.tab-row button { min-height: 34px; padding: 0 11px; border: 0; border-bottom: 2px solid transparent; color: #7c8aa0; background: transparent; font-size: 9px; }
.tab-row button.active { border-color: var(--blue); color: var(--blue); font-weight: 700; }
.message-panel { display: grid; grid-template-columns: 235px minmax(0,1fr); min-height: 420px; }
.thread-list { border-right: 1px solid var(--line); }
.thread-button { width: 100%; padding: 12px; display: flex; gap: 9px; border: 0; border-bottom: 1px solid #eff2f6; text-align: left; background: white; }
.thread-button.active { background: #f0f5ff; box-shadow: inset 3px 0 0 var(--blue); }
.thread-button strong { display: block; font-size: 9px; }
.thread-button small { display: block; margin-top: 5px; overflow: hidden; color: #8a97a9; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.admin-chat { min-width: 0; display: flex; flex-direction: column; padding: 13px; }
.admin-chat-head { padding-bottom: 9px; border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 700; }
.admin-chat-messages { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 12px 0; }
.admin-chat-messages .bubble { font-size: 9px; }
.admin-chat .message-compose input { height: 34px; }
.backend-admin-shell { min-height: calc(100vh - 68px); padding: clamp(20px, 4vw, 48px); background: radial-gradient(ellipse at 25% 0, #fff 0, #f2f5fa 72%); }
.backend-admin-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; max-width: 1280px; margin: 0 auto 18px; }
.backend-admin-header h1 { margin: 6px 0 0; color: var(--navy); font-size: clamp(23px, 3vw, 34px); letter-spacing: -.04em; }
.backend-admin-header p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.backend-admin-chat-panel { max-width: 1280px; min-height: min(620px, calc(100vh - 220px)); margin: 0 auto; display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); overflow: hidden; border: 1px solid #e1e8f1; border-radius: 15px; background: white; box-shadow: var(--shadow); }
.backend-admin-list { min-width: 0; padding: 15px 0; border-right: 1px solid var(--line); }
.backend-admin-list h2 { margin: 0 14px 12px; color: #2a4162; font-size: 12px; }
.backend-admin-list .thread-list { border: 0; }
.backend-admin-list .thread-button { padding: 12px 14px; }
.backend-admin-list .thread-button > span:nth-child(2) { min-width: 0; }
.backend-admin-current { min-width: 0; min-height: 470px; display: flex; }
.backend-admin-current .admin-chat { width: 100%; padding: 17px 20px; }
.backend-admin-current .admin-chat-head { display: flex; align-items: center; gap: 12px; }
.backend-admin-current .admin-chat-head > div { min-width: 0; flex: 1; }
.backend-admin-current .admin-chat-head small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 400; }
.backend-admin-current .admin-chat-messages { min-height: 330px; overflow-y: auto; }
.backend-admin-current .message-compose input { height: 42px; font-size: 11px; }
.backend-admin-current .message-compose button { flex: 0 0 42px; }
.connected-driver-stage .stage-caption strong { display: block; margin-top: 8px; color: #23456e; font-size: 13px; }
.connected-driver-stage .mobile-bottom-nav { grid-template-columns: 1fr; }
.connected-driver-stage .mobile-bottom-nav button { grid-column: 1; }
.connected-driver-stage .backend-notice { font-size: 9px; }
.backend-messages { overflow-y: auto; }
.backend-empty-messages { align-self: center; max-width: 280px; margin: auto; text-align: center; }
.backend-refresh { margin-left: auto; flex: 0 0 auto; }
.backend-section-tabs, .connected-driver-nav { display: flex; gap: 4px; }
.backend-section-tabs { max-width: 1280px; margin: 0 auto 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.connected-driver-nav { margin: 0 0 10px; padding: 3px; border: 1px solid #e7edf5; border-radius: 9px; background: #f7f9fc; }
.backend-section-tabs button, .connected-driver-nav button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 7px; color: #687a92; background: transparent; font-size: 10px; font-weight: 550; }
.backend-section-tabs button.active, .connected-driver-nav button.active { color: #1558b6; background: #eaf2ff; font-weight: 700; }
.backend-announcement-feed { max-width: 1280px; margin: 0 auto; }
.backend-announcement-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.backend-announcement-toolbar h2 { margin: 4px 0 0; color: var(--navy); font-size: 18px; letter-spacing: -.025em; }
.backend-announcement-toolbar p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.backend-announcement-actions { display: flex; align-items: center; gap: 8px; }
.backend-announcement-list { display: grid; gap: 10px; }
.backend-announcement-card { padding: 16px 18px; border: 1px solid #e1e8f1; border-radius: 12px; background: #fff; box-shadow: 0 5px 18px rgba(29, 55, 97, .035); }
.backend-announcement-card.is-pinned { border-left: 3px solid var(--yellow); }
.backend-announcement-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; }
.backend-announcement-meta time { margin-left: auto; white-space: nowrap; }
.announcement-category { padding: 4px 7px; border-radius: 6px; color: #245b9f; background: #edf4ff; font-weight: 650; }
.announcement-pinned { color: #987500; }
.backend-announcement-card h3 { margin: 11px 0 5px; color: var(--ink); font-size: 14px; font-weight: 650; line-height: 1.35; }
.backend-announcement-card > p { margin: 0; color: #52647e; font-size: 11px; line-height: 1.65; overflow-wrap: anywhere; }
.backend-announcement-confirm { display: flex; justify-content: flex-end; margin-top: 12px; padding-top: 10px; border-top: 1px solid #edf0f5; }
.backend-announcement-confirm .button-secondary { min-height: 32px; font-size: 9px; }
.read-confirmed { color: #16815b; font-size: 9px; font-weight: 650; }
.backend-announcement-check { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; color: #52647e; font-size: 10px; }
.backend-announcement-check input { width: 15px; min-height: 15px; margin: 0; }
.backend-announcement-loading { margin: -5px 0 10px; color: var(--muted); font-size: 9px; }
.backend-appeals { max-width: 1280px; margin: 0 auto; }
.backend-appeals-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.backend-appeals-toolbar h2 { margin: 4px 0 0; color: var(--navy); font-size: 18px; letter-spacing: -.025em; }
.backend-appeals-toolbar p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.backend-appeal-list { display: grid; gap: 8px; }
.backend-appeal-card { width: 100%; display: grid; gap: 7px; padding: 14px 16px; border: 1px solid #e1e8f1; border-radius: 11px; color: var(--ink); background: #fff; text-align: left; box-shadow: 0 5px 18px rgba(29,55,97,.035); }
.backend-appeal-card:hover { border-color: #bed2ee; box-shadow: 0 8px 22px rgba(29,55,97,.07); }
.backend-appeal-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.backend-appeal-card > strong { font-size: 12px; font-weight: 650; }
.backend-appeal-card > small { color: var(--muted); font-size: 9px; }
.backend-appeal-card > p { margin: 0; color: #52647e; font-size: 10px; line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.backend-appeal-status-pill { display: inline-flex; align-items: center; min-height: 23px; padding: 3px 8px; border-radius: 999px; color: #245b9f; background: #edf4ff; font-size: 9px; font-weight: 650; white-space: nowrap; }
.backend-appeal-detail { padding: 18px; border: 1px solid #e1e8f1; border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.backend-appeal-detail-head { display: flex; align-items: center; gap: 12px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.backend-appeal-detail-head > div { min-width: 0; flex: 1; }
.backend-appeal-detail-head h2 { margin: 5px 0 0; color: var(--navy); font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.backend-appeal-status-control { display: grid; gap: 4px; min-width: 150px; color: var(--muted); font-size: 9px; }
.backend-appeal-status-control select { min-height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: white; font-size: 10px; }
.backend-appeal-summary { display: flex; flex-wrap: wrap; gap: 20px; margin: 14px 0; }
.backend-appeal-summary span { display: grid; gap: 4px; }
.backend-appeal-summary small { color: var(--muted); font-size: 8px; }
.backend-appeal-summary strong { color: #3b4f6b; font-size: 10px; font-weight: 600; }
.backend-appeal-description { margin: 0 0 16px; color: #425773; font-size: 11px; line-height: 1.65; overflow-wrap: anywhere; }
.backend-appeal-thread { padding-top: 13px; border-top: 1px solid var(--line); }
.backend-appeal-thread h3 { margin: 0 0 10px; color: #2a4162; font-size: 11px; }
.backend-appeal-comments { display: grid; gap: 8px; max-height: 360px; overflow: auto; padding: 2px 0 10px; }
.backend-appeal-comment { padding: 10px 12px; border: 1px solid #e8edf4; border-radius: 9px; background: #f9fbfe; }
.backend-appeal-comment.is-internal { border-color: #f1d79e; background: #fff9eb; }
.backend-appeal-comment > div { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 8px; }
.backend-appeal-comment strong { color: #425773; font-size: 9px; }
.backend-appeal-comment p { margin: 6px 0 0; color: #344a68; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.backend-appeal-compose { display: grid; gap: 8px; padding-top: 10px; }
.backend-appeal-compose textarea { min-height: 72px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; font-size: 10px; resize: vertical; }
.backend-appeal-compose > button { justify-self: end; min-width: 105px; min-height: 34px; }
.backend-maintenance { max-width: 1280px; margin: 0 auto; }
.backend-maintenance-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.backend-maintenance-toolbar h2 { margin: 4px 0 0; color: var(--navy); font-size: 18px; letter-spacing: -.025em; }
.backend-maintenance-toolbar p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.backend-maintenance-panel { min-width: 0; padding: 16px; border: 1px solid #e1e8f1; border-radius: 12px; background: #fff; box-shadow: 0 5px 18px rgba(29,55,97,.035); }
.backend-maintenance-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.backend-maintenance-panel-head h3 { margin: 0; color: var(--navy); font-size: 12px; font-weight: 650; }
.backend-maintenance-panel-head > span { color: var(--muted); font-size: 10px; }
.backend-maintenance-date { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; }
.backend-maintenance-date input { min-height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: #fff; font: inherit; }
.backend-maintenance-slot-list, .backend-maintenance-booking-list, .backend-maintenance-facility-list { display: grid; gap: 8px; }
.backend-maintenance-slot, .backend-maintenance-booking, .backend-maintenance-facility { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 12px; border: 1px solid #e8edf4; border-radius: 9px; background: #fbfcfe; }
.backend-maintenance-slot > div:first-child, .backend-maintenance-booking > div, .backend-maintenance-facility > div { min-width: 0; display: grid; gap: 4px; }
.backend-maintenance-slot strong, .backend-maintenance-booking strong, .backend-maintenance-facility strong { color: #2e4667; font-size: 10px; font-weight: 650; }
.backend-maintenance-slot small, .backend-maintenance-booking small, .backend-maintenance-facility small { color: var(--muted); font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; }
.backend-maintenance-slot.is-unavailable { opacity: .68; }
.backend-maintenance-slot-action { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.backend-maintenance-slot-action > button { min-height: 31px; padding: 0 11px; font-size: 9px; }
.backend-maintenance-count { min-width: 74px; color: #437252; font-size: 9px; text-align: right; }
.backend-maintenance-slot.is-unavailable .backend-maintenance-count { color: var(--muted); }
.backend-maintenance-status { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: #245b9f; background: #edf4ff; font-size: 8px; font-weight: 650; white-space: nowrap; }
.backend-maintenance-status.status-completed { color: #267245; background: #eaf7ef; }
.backend-maintenance-status.status-cancelled { color: #7a8493; background: #f0f2f5; }
.backend-maintenance-admin-grid { display: grid; grid-template-columns: minmax(260px, .78fr) minmax(0, 1.55fr); align-items: start; gap: 12px; }
.backend-maintenance-setup-column { display: grid; gap: 12px; min-width: 0; }
.backend-maintenance-facility { align-items: flex-start; }
.backend-maintenance-facility .facility-mark { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 8px; color: #2561ae; background: #edf4ff; }
.backend-maintenance-facility > div { flex: 1; }
.backend-maintenance-facility .small-button { min-height: 29px; padding: 0 8px; white-space: nowrap; }
.backend-maintenance-admin-grid .table-wrap { max-height: 580px; overflow: auto; }
.backend-maintenance-admin-grid .data-table { min-width: 720px; }
.backend-maintenance-admin-grid .data-table td { vertical-align: middle; }
.backend-maintenance-admin-grid .data-table td:first-child { min-width: 150px; }
.backend-maintenance-admin-grid .compact-select { min-width: 130px; min-height: 30px; }
.backend-maintenance-facility .compact-select { width: 100%; min-width: 0; margin-top: 4px; }
.is-driver-maintenance .backend-maintenance-panel + .backend-maintenance-panel { margin-top: 12px; }
.is-driver-maintenance .backend-maintenance-slot { align-items: flex-start; }
.is-driver-maintenance .backend-maintenance-toolbar .backend-announcement-actions { flex: 0 0 auto; }
.nav-count { display: inline-grid; min-width: 17px; height: 17px; margin-left: 4px; padding: 0 4px; place-items: center; border-radius: 999px; color: #fff; background: #e58b29; font-size: 8px; font-weight: 700; line-height: 1; }
.backend-maintenance-request-list { display: grid; gap: 10px; }
.backend-maintenance-request { min-width: 0; padding: 14px; border: 1px solid #e3eaf3; border-radius: 10px; background: #fbfcfe; }
.backend-maintenance-request-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.backend-maintenance-request-head > div { min-width: 0; }
.backend-maintenance-request-head .eyebrow { color: #657b9b; font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.backend-maintenance-request-head h3 { margin: 4px 0 0; color: var(--navy); font-size: 13px; font-weight: 650; }
.backend-maintenance-request-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.backend-maintenance-request-details > span { display: grid; align-content: start; gap: 4px; min-width: 0; }
.backend-maintenance-request-details small { color: var(--muted); font-size: 8px; }
.backend-maintenance-request-details strong { color: #324b6d; font-size: 10px; font-weight: 550; overflow-wrap: anywhere; }
.backend-maintenance-instructions { margin: 11px 0 0; color: #647792; font-size: 10px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.backend-maintenance-response { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 13px; padding-top: 12px; border-top: 1px solid #e8edf4; }
.backend-maintenance-response label { display: grid; flex: 1; gap: 5px; min-width: 0; color: #61738e; font-size: 9px; }
.backend-maintenance-response select { width: 100%; min-height: 36px; padding: 0 9px; border: 1px solid #dbe4f0; border-radius: 8px; color: #2d4568; background: white; font: inherit; }
.backend-maintenance-response button { min-height: 36px; flex: 0 0 auto; padding: 0 12px; font-size: 9px; }
.backend-maintenance-response button:disabled { cursor: not-allowed; opacity: .55; }
.backend-maintenance-selected-time { display: block; margin-top: 12px; padding: 10px; border-radius: 8px; color: #267245; background: #eaf7ef; font-size: 10px; font-weight: 600; }
.backend-maintenance-conflict { margin: 12px 0 0; padding: 10px; border-radius: 8px; color: #8a5a20; background: #fff5e5; font-size: 9px; line-height: 1.5; }
.backend-maintenance-status.status-pending_driver { color: #855318; background: #fff2d9; }
.backend-maintenance-status.status-confirmed { color: #267245; background: #eaf7ef; }
.conversation-head > div { min-width: 0; flex: 1; }
.conversation-head > div strong, .conversation-head > div small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.driver-app-header .backend-live-dot { margin-left: auto; }
.platform-note { max-width: 780px; margin-bottom: 14px; padding: 11px 13px; border: 1px solid #dbe7f8; border-radius: 9px; color: #45658f; background: #f3f8ff; font-size: 9px; line-height: 1.5; }
.platform-org-cell { display: flex; align-items: center; gap: 9px; }
.org-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: #2058ac; background: #e9f1ff; font-size: 9px; font-weight: 750; }
.role-chip { color: #5b6d86; font-size: 8px; }

dialog { width: min(520px, calc(100vw - 28px)); max-height: min(86vh, 800px); padding: 0; border: 1px solid #dbe4f0; border-radius: 15px; color: var(--ink); background: white; box-shadow: 0 25px 80px rgba(12,35,72,.28); }
dialog::backdrop { background: rgba(9,26,54,.44); backdrop-filter: blur(2px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; color: #1b355d; font-size: 17px; letter-spacing: -.02em; }
.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.modal-close { width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 8px; color: #6f8098; background: white; }
.modal-body { max-height: 62vh; overflow: auto; padding: 17px 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; border-top: 1px solid #edf0f5; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-field { display: grid; gap: 6px; min-width: 0; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: #60728d; font-size: 9px; font-weight: 650; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 37px; padding: 8px 10px; border: 1px solid #dfe6ef; border-radius: 8px; color: #2b4265; background: #fff; font-size: 10px; }
.form-field textarea { min-height: 86px; resize: vertical; line-height: 1.45; }
.modal-help { margin: 0 0 13px; padding: 9px 10px; border-radius: 8px; color: #667a98; background: #f3f7fd; font-size: 9px; line-height: 1.45; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 22px; transform: translate(-50%, 12px); padding: 10px 14px; border-radius: 9px; color: white; background: #153c7a; box-shadow: 0 8px 25px rgba(20,48,92,.2); font-size: 10px; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.visible { transform: translate(-50%,0); opacity: 1; }
.theme-dark .device-screen { background: #0d1d35; color: #e8f0ff; }
.theme-dark .mobile-content { color: #e8f0ff; }
.theme-dark .mobile-title-row h2, .theme-dark .section-label { color: #e5efff; }
.theme-dark .status-card, .theme-dark .next-service-card, .theme-dark .quick-action, .theme-dark .announcement-preview, .theme-dark .list-card, .theme-dark .profile-card { border-color: #233d61; color: #e5efff; background: #142a49; }
.theme-dark .status-copy strong, .theme-dark .service-card-top strong, .theme-dark .list-copy strong { color: #e5efff; }
.theme-dark .mobile-bottom-nav, .theme-dark .device-status { color: #e5efff; background: #10213b; border-color: #243a58; }
.theme-dark .mobile-bottom-nav button { color: #a6b7d1; }
.theme-dark .message-compose input, .theme-dark .bubble.theirs { color: #e5efff; background: #183253; border-color: #294363; }

@media (max-width: 1050px) {
  .brand { min-width: auto; }
  .topbar-right { min-width: auto; }
  .stage-note { display: none; }
  .driver-stage { grid-template-columns: 1fr minmax(330px,390px) 1fr; }
  .stage-caption { justify-self: center; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .topbar { height: auto; min-height: 60px; flex-wrap: wrap; gap: 8px; padding: 9px 12px; }
  .brand { gap: 8px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-copy strong { font-size: 12px; }
  .brand-copy small { font-size: 7px; }
  .role-switch { order: 3; width: 100%; justify-content: stretch; margin: 0; }
  .role-button { flex: 1; padding: 0 5px; min-height: 32px; font-size: 9px; }
  .topbar-right { margin-left: auto; gap: 8px; }
  .backend-scope { order: 3; width: 100%; margin: 0; font-size: 7px; }
  .backend-user { display: none; }
  .topbar-right .reset-button[data-action="backend-login"] { padding: 6px 8px; font-size: 8px; }
  .demo-badge { padding: 4px 6px; font-size: 7px; }
  .reset-button { font-size: 9px; }
  .driver-stage { min-height: calc(100dvh - 103px); display: block; padding: 0; background: #eaf0f8; }
  .device { width: 100%; height: calc(100dvh - 103px); min-height: 560px; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .device-screen { border-radius: 0; }
  .device-status { flex-basis: 20px; padding: 0 14px; }
  .driver-app-header { min-height: 52px; }
  .mobile-content { padding: 13px 13px 18px; }
  .console-shell { min-height: calc(100dvh - 103px); display: block; }
  .console-sidebar { padding: 8px 10px; }
  .console-org, .sidebar-label { display: none; }
  .sidebar-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .sidebar-nav button { flex: 0 0 auto; min-height: 34px; padding: 0 9px; font-size: 8px; }
  .sidebar-nav button i { display: none; }
  .sidebar-nav button.active { box-shadow: inset 0 -2px 0 var(--yellow); }
  .console-main { padding: 18px 13px 28px; }
  .console-header { align-items: center; margin-bottom: 14px; }
  .console-header h1 { font-size: 21px; }
  .console-header p { font-size: 9px; }
  .metric-grid { gap: 8px; }
  .metric-card { min-height: 88px; padding: 11px; gap: 8px; }
  .metric-icon { width: 29px; height: 29px; }
  .metric-copy strong { font-size: 19px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .message-panel { grid-template-columns: 140px minmax(0,1fr); min-height: 390px; }
  .thread-button { padding: 9px 7px; gap: 6px; }
  .thread-button .list-avatar { width: 26px; height: 26px; }
  .thread-button strong { font-size: 8px; }
  .thread-button small { font-size: 7px; }
  .backend-admin-shell { min-height: calc(100dvh - 103px); padding: 18px 12px; }
  .backend-admin-header { align-items: flex-start; margin-bottom: 13px; }
  .backend-admin-header h1 { font-size: 22px; }
  .backend-admin-header p { max-width: 340px; font-size: 9px; }
  .backend-admin-chat-panel { min-height: auto; grid-template-columns: 1fr; }
  .backend-admin-list { padding: 11px 0 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .backend-admin-list h2 { margin-bottom: 5px; }
  .backend-admin-list .thread-list { max-height: 160px; overflow: auto; }
  .backend-admin-current { min-height: 390px; }
  .backend-admin-current .admin-chat { padding: 12px; }
  .backend-admin-current .admin-chat-messages { min-height: 260px; }
  .backend-announcement-toolbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  .backend-announcement-actions { width: 100%; }
  .backend-announcement-actions > button { flex: 1; }
  .backend-announcement-card { padding: 13px; }
  .backend-appeals-toolbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  .backend-appeals-toolbar .backend-announcement-actions { width: 100%; }
  .backend-appeals-toolbar .backend-announcement-actions > button { flex: 1; }
  .backend-appeal-detail { padding: 12px; }
  .backend-appeal-detail-head { align-items: flex-start; flex-wrap: wrap; }
  .backend-appeal-status-control { width: 100%; margin-left: 40px; }
  .connected-driver-nav { overflow-x: auto; }
  .connected-driver-nav button { flex: 1 0 auto; padding: 0 9px; }
  .backend-maintenance-toolbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  .backend-maintenance-toolbar .backend-announcement-actions { width: 100%; flex-wrap: wrap; }
  .backend-maintenance-toolbar .backend-announcement-actions > button { flex: 1; }
  .backend-maintenance-admin-grid { grid-template-columns: 1fr; }
  .backend-maintenance-panel { padding: 12px; }
  .backend-maintenance-panel-head { align-items: flex-start; flex-direction: column; }
  .backend-maintenance-slot, .backend-maintenance-booking, .backend-maintenance-facility { align-items: flex-start; }
  .backend-maintenance-slot { flex-direction: column; }
  .backend-maintenance-slot-action { width: 100%; justify-content: space-between; }
  .backend-maintenance-count { text-align: left; }
  .backend-maintenance-date { width: 100%; justify-content: space-between; }
  .backend-maintenance-date input { flex: 1; }
  .backend-maintenance-facility { flex-wrap: wrap; }
  .backend-maintenance-facility > div { flex-basis: calc(100% - 46px); }
  .backend-maintenance-request { padding: 11px; }
  .backend-maintenance-request-details { grid-template-columns: 1fr; gap: 7px; }
  .backend-maintenance-response { align-items: stretch; flex-direction: column; }
  .backend-maintenance-response button { width: 100%; }
}
@media (max-width: 420px) {
  .brand { min-width: 0; }
  .brand-copy small { display: none; }
  .topbar-right { min-width: 0; }
  .backend-admin-header { flex-direction: column; gap: 10px; }
  .backend-admin-header > button { align-self: stretch; }
  .backend-footnote { text-align: left; line-height: 1.45; }
  .role-button { font-size: 8px; }
  .console-header { align-items: flex-start; }
  .console-header .button-primary { min-height: 31px; padding: 0 8px; font-size: 8px; }
  .metric-card { display: block; }
  .metric-icon { margin-bottom: 7px; }
  .metric-copy small { font-size: 7px; }
  .message-panel { grid-template-columns: 1fr; }
  .thread-list { max-height: 132px; overflow-y: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .thread-button { display: inline-flex; width: auto; min-width: 150px; border-right: 1px solid #eff2f6; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
}

/* Standalone ДТП module — shares the Taxi Connect v1.1 light-blue system. */
.accident-home-cta { width: 100%; min-height: 72px; margin-top: 11px; padding: 11px 13px; display: flex; align-items: center; gap: 11px; border: 1px solid #f0d6d4; border-radius: 13px; color: #493539; background: linear-gradient(115deg,#fff7f5,#fff 72%); text-align: left; box-shadow: 0 5px 16px rgba(141,48,56,.06); transition: .16s ease; }
.accident-home-cta:hover { border-color: #dda8a5; box-shadow: 0 8px 20px rgba(141,48,56,.1); transform: translateY(-1px); }
.accident-cta-icon { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; color: #fff; background: #c6535c; font-size: 20px; font-weight: 750; }
.accident-home-cta > span:nth-child(2) { min-width: 0; flex: 1; }
.accident-home-cta strong, .accident-home-cta small { display: block; }
.accident-home-cta strong { color: #713940; font-size: 11px; }
.accident-home-cta small { margin-top: 4px; color: #8e7376; font-size: 8px; line-height: 1.35; }
.accident-home-cta > i { color: #b8797d; font-size: 20px; font-style: normal; }
.accident-history-link { width: 100%; min-height: 35px; display: flex; align-items: center; gap: 7px; padding: 7px 2px 2px; border: 0; color: #697991; background: transparent; text-align: left; font-size: 9px; }
.accident-history-link span { min-width: 19px; padding: 3px 6px; border-radius: 20px; color: #a64e55; background: #fcebed; text-align: center; font-size: 8px; }
.accident-history-link b { margin-left: auto; color: #93a0b1; font-size: 15px; font-weight: 500; }
.accident-back { display: inline-grid; margin: 0 0 7px; vertical-align: middle; }
.accident-mobile-list { display: grid; gap: 8px; }
.accident-mobile-card { width: 100%; min-width: 0; padding: 10px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 11px; color: inherit; background: #fff; text-align: left; }
.accident-mobile-card:hover { border-color: #caa1a3; }
.accident-mobile-symbol { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: #b44750; background: #fcebed; font-weight: 750; }
.accident-mobile-copy { min-width: 0; flex: 1; display: grid; justify-items: start; gap: 5px; }
.accident-mobile-copy strong { color: #263b5b; font-size: 9px; }
.accident-mobile-copy small { color: var(--muted); font-size: 8px; line-height: 1.35; }
.accident-mobile-card > b { color: #9aa6b7; }
.accident-primary { margin-top: 11px; }
.accident-summary-card { padding: 11px; border: 1px solid #e4eaf3; border-radius: 11px; background: white; }
.accident-summary-line { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #f0f2f6; font-size: 8px; }
.accident-summary-line span { color: var(--muted); }
.accident-summary-line strong { max-width: 64%; color: #354a69; text-align: right; }
.accident-summary-card p { margin: 9px 0 0; color: #5d6e87; font-size: 9px; line-height: 1.5; }
.accident-file-section { margin-top: 12px; padding: 10px; border: 1px solid #e5eaf1; border-radius: 11px; background: rgba(255,255,255,.84); }
.accident-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; color: #304664; font-size: 9px; font-weight: 700; }
.accident-section-heading span { color: #8491a4; font-size: 8px; font-weight: 500; }
.accident-file-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.accident-file-tile { min-width: 0; padding: 6px; display: grid; gap: 6px; border: 1px solid #e5eaf1; border-radius: 9px; color: #526580; background: #fff; text-align: left; font-size: 8px; }
.accident-file-tile:hover, .accident-file-row:hover { border-color: #9db8df; background: #f8fbff; }
.accident-file-tile > img, .accident-demo-illustration { width: 100%; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; border-radius: 6px; background: linear-gradient(145deg,#eef4fc,#dae6f7); object-fit: cover; }
.accident-demo-illustration { align-content: center; gap: 2px; }
.accident-demo-illustration svg { width: 92%; max-height: 72px; }
.accident-demo-illustration small { color: #7185a4; font-size: 6px; letter-spacing: .08em; }
.accident-file-tile > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.accident-file-icon, .pending-file-icon { min-height: 74px; display: grid; place-items: center; border-radius: 6px; color: #a84b52; background: #fff0ef; font-size: 11px; font-weight: 750; }
.accident-file-list { display: grid; gap: 7px; }
.accident-file-row { width: 100%; min-width: 0; padding: 8px; display: flex; align-items: center; gap: 9px; border: 1px solid #e5eaf1; border-radius: 9px; color: #405574; background: #fff; text-align: left; }
.accident-file-type { width: 33px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 7px; color: #a74a51; background: #fff0ef; font-size: 8px; font-weight: 750; }
.accident-file-row > span:nth-child(2) { min-width: 0; flex: 1; }
.accident-file-row strong, .accident-file-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.accident-file-row strong { color: #344a69; font-size: 8px; }
.accident-file-row small { margin-top: 4px; color: #8b98aa; font-size: 7px; }
.accident-file-row > b { color: var(--blue); font-size: 8px; font-weight: 600; }
.accident-empty-files { grid-column: 1 / -1; padding: 13px 9px; border: 1px dashed #dbe3ed; border-radius: 8px; color: #8390a2; background: #fbfcfe; text-align: center; font-size: 8px; line-height: 1.45; }
.accident-add-docs { margin-top: 9px; padding-top: 9px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; border-top: 1px solid #edf0f5; }
.accident-add-docs > small { width: 100%; color: #8491a4; font-size: 7px; }
.accident-upload-button { min-height: 31px; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 9px; overflow: hidden; border: 1px solid #d8e2f0; border-radius: 7px; color: #315d9a; background: #f7faff; font-size: 8px; font-weight: 650; cursor: pointer; }
.accident-upload-button:hover { border-color: #9db8df; background: #eff5ff; }
.accident-upload-button input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.accident-upload-group { min-width: 0; padding: 10px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; border: 1px solid #e7ebf1; border-radius: 10px; background: #fff; }
.accident-upload-group > div:first-child strong, .accident-upload-group > div:first-child small { display: block; }
.accident-upload-group > div:first-child strong { color: #354a68; font-size: 9px; }
.accident-upload-group > div:first-child small { margin-top: 3px; color: #8390a2; font-size: 7px; line-height: 1.35; }
.accident-upload-group .upload-guidance, .accident-upload-group .attachment-previews { grid-column: 1 / -1; }
.upload-guidance { color: #8b98a9; font-size: 7px; }
.attachment-previews { width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.pending-file { min-width: 0; padding: 5px; display: flex; align-items: center; gap: 6px; border: 1px solid #e6ebf2; border-radius: 7px; background: #fff; }
.pending-file img, .pending-file-icon { width: 36px; height: 34px; min-height: 34px; flex: 0 0 auto; border-radius: 5px; object-fit: cover; }
.pending-file > span:nth-child(2) { min-width: 0; flex: 1; overflow: hidden; color: #536680; text-overflow: ellipsis; white-space: nowrap; font-size: 7px; }
.pending-file > span:nth-child(2) small { display: block; margin-top: 3px; color: #929eae; }
.pending-file > button { width: 22px; height: 22px; flex: 0 0 auto; border: 0; border-radius: 6px; color: #a34c53; background: #fff0f0; }
.accident-local-note { margin-top: 12px; padding: 9px 10px; border: 1px solid #f0e4c7; border-radius: 8px; color: #786b4d; background: #fffbf1; font-size: 8px; line-height: 1.45; }
.accident-local-note strong { color: #645735; }
.accident-conversation { min-width: 0; }
.accident-messages { max-height: 235px; min-height: 90px; overflow: auto; display: flex; flex-direction: column; gap: 7px; padding: 2px 2px 9px; }
.accident-message { max-width: 88%; padding: 8px 9px; border: 1px solid #e6ebf2; border-radius: 9px 9px 9px 3px; color: #455976; background: #fff; }
.accident-message.mine { align-self: flex-end; border-color: #dce8fc; border-radius: 9px 9px 3px 9px; background: #f1f6ff; }
.accident-message strong { color: #31527f; font-size: 7px; }
.accident-message p { margin: 4px 0; font-size: 8px; line-height: 1.45; }
.accident-message time { color: #929eae; font-size: 7px; }
.accident-compose { display: flex; gap: 6px; padding-top: 7px; border-top: 1px solid #edf0f5; }
.accident-compose input { min-width: 0; min-height: 34px; flex: 1; padding: 0 9px; border: 1px solid #dfe6ef; border-radius: 7px; font-size: 8px; }
.accident-compose button { min-height: 34px; padding: 0 10px; border: 0; border-radius: 7px; color: #fff; background: var(--blue); font-size: 8px; }
.accident-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.accident-metrics article { padding: 12px 14px; display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.accident-metrics span { color: #74839a; font-size: 8px; }
.accident-metrics strong { color: #233d63; font-size: 21px; line-height: 1; }
.accident-metrics small { color: #94a0b0; font-size: 7px; }
.accident-admin-layout { display: grid; grid-template-columns: minmax(245px, .78fr) minmax(0, 1.65fr); gap: 13px; align-items: start; }
.accident-queue, .accident-admin-detail { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgba(26,55,98,.025); }
.accident-queue > header { min-height: 57px; padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #edf0f5; }
.accident-queue > header h2 { margin: 0; color: #293f60; font-size: 11px; }
.accident-queue > header p { margin: 4px 0 0; color: #8a97a9; font-size: 8px; }
.accident-queue-list { display: grid; max-height: 720px; overflow: auto; }
.accident-queue-item { width: 100%; min-width: 0; padding: 11px 10px; display: flex; align-items: flex-start; gap: 8px; border: 0; border-bottom: 1px solid #edf0f5; color: inherit; background: white; text-align: left; }
.accident-queue-item:hover { background: #fafcff; }
.accident-queue-item.active { background: #f3f7ff; box-shadow: inset 3px 0 0 #c6535c; }
.accident-queue-item > span:nth-child(2) { min-width: 0; flex: 1; display: grid; justify-items: start; gap: 5px; }
.accident-queue-marker { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; color: #b44750; background: #fcebed; font-weight: 750; }
.accident-queue-item strong { color: #334967; font-size: 8px; }
.accident-queue-item small { max-width: 100%; overflow: hidden; color: #8491a4; text-overflow: ellipsis; white-space: nowrap; font-size: 7px; }
.accident-queue-item > b { color: #9ca7b6; }
.accident-admin-detail { padding: 15px; }
.accident-detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.accident-detail-top h2 { margin: 4px 0 0; color: #233c62; font-size: 19px; letter-spacing: -.02em; }
.accident-detail-top p { margin: 4px 0 0; color: #73829a; font-size: 9px; }
.accident-detail-top > .tag { margin-top: 4px; }
.accident-admin-meta { margin-top: 13px; padding: 11px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; border: 1px solid #e9edf3; border-radius: 9px; background: #fbfcfe; }
.accident-admin-meta small, .accident-admin-meta strong { display: block; }
.accident-admin-meta small { color: #8b98a9; font-size: 7px; letter-spacing: .05em; }
.accident-admin-meta strong { margin-top: 4px; color: #3c516f; font-size: 8px; line-height: 1.4; }
.accident-description { margin: 11px 0; color: #596d89; font-size: 9px; line-height: 1.5; }
.accident-admin-controls { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 0; border-top: 1px solid #edf0f5; }
.accident-admin-controls label { min-width: 150px; display: grid; gap: 5px; color: #7e8da2; font-size: 7px; }
.accident-admin-controls select { min-height: 30px; }
.accident-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.accident-tabs::-webkit-scrollbar { display: none; }
.accident-tabs button { min-height: 36px; padding: 0 9px; display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; border: 0; border-bottom: 2px solid transparent; color: #78879c; background: transparent; font-size: 8px; }
.accident-tabs button.active { border-color: var(--blue); color: var(--blue); font-weight: 700; }
.accident-tabs button span { padding: 2px 5px; border-radius: 12px; color: #61728c; background: #eff3f8; font-size: 7px; }
.accident-tab-panel { min-height: 150px; padding-top: 11px; }
.admin-files { grid-template-columns: repeat(3,minmax(0,1fr)); }
.accident-history-list { display: grid; gap: 0; }
.accident-history-entry { position: relative; display: flex; gap: 9px; padding: 4px 0 12px; }
.accident-history-entry:not(:last-child)::after { position: absolute; top: 14px; bottom: -1px; left: 4px; width: 1px; background: #dce5f1; content: ""; }
.accident-history-dot { width: 9px; height: 9px; margin-top: 3px; flex: 0 0 auto; border: 2px solid #4d83cf; border-radius: 50%; background: white; z-index: 1; }
.accident-history-entry strong { color: #405675; font-size: 8px; }
.accident-history-entry p, .accident-history-entry time { margin: 3px 0 0; display: block; color: #8895a7; font-size: 7px; }
.accident-admin-empty { min-height: 390px; padding: 25px; display: grid; align-content: center; justify-items: center; text-align: center; }
.accident-admin-empty > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #b44750; background: #fcebed; font-size: 20px; font-weight: 700; }
.accident-admin-empty strong { margin-top: 11px; color: #354a69; font-size: 12px; }
.accident-admin-empty p { max-width: 220px; color: #8794a6; font-size: 9px; line-height: 1.5; }
.accident-image-preview { margin: 0; display: grid; justify-items: center; gap: 8px; }
.accident-image-preview img { max-width: 100%; max-height: 58vh; object-fit: contain; border-radius: 8px; }
.accident-image-preview figcaption { color: #8491a4; font-size: 8px; }
.accident-pdf-preview { min-height: 160px; display: grid; justify-items: center; align-content: center; gap: 9px; color: #526580; }
.accident-pdf-preview > span { width: 45px; height: 52px; display: grid; place-items: center; border-radius: 8px; color: #a84b52; background: #fff0ef; font-size: 12px; font-weight: 750; }
.accident-pdf-preview strong { font-size: 10px; }
.accident-pdf-preview small { color: #8b98aa; font-size: 8px; }

@media (max-width: 900px) {
  .accident-admin-layout { grid-template-columns: 1fr; }
  .accident-queue-list { max-height: 260px; }
}
@media (max-width: 600px) {
  .accident-metrics { gap: 6px; }
  .accident-metrics article { padding: 9px; }
  .accident-metrics strong { font-size: 17px; }
  .accident-metrics span { font-size: 7px; }
  .accident-admin-detail { padding: 11px; }
  .admin-files { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .accident-admin-controls { display: grid; grid-template-columns: 1fr 1fr; }
  .accident-admin-controls label { min-width: 0; }
  .accident-upload-group { grid-template-columns: 1fr; }
  .accident-upload-group .accident-upload-button { justify-self: start; }
}
/* Taxi Connect v1.2 · registration and weekly subscription module */
.subscription-home-card { width:100%; min-height:58px; margin:2px 0 8px; padding:10px 11px; display:flex; align-items:center; gap:9px; border:1px solid #dbe6f4; border-radius:12px; color:#243b5d; background:linear-gradient(105deg,#f4f8ff,#fff 74%); text-align:left; }
.subscription-home-card:hover { border-color:#a9c4ec; background:#f4f8ff; }
.subscription-home-icon { width:30px; height:30px; display:grid; place-items:center; flex:0 0 auto; border-radius:9px; color:#2563ba; background:#e7f0ff; font-size:16px; font-weight:700; }
.subscription-home-card > span:nth-child(2) { min-width:0; flex:1; }
.subscription-home-card strong,.subscription-home-card small { display:block; }
.subscription-home-card strong { font-size:9px; }
.subscription-home-card small { margin-top:4px; color:#71819a; font-size:7px; }
.subscription-home-card > i { color:#91a0b4; font-size:17px; font-style:normal; }
.subscription-list-action { margin-top:8px; }
.registration-method-list { display:grid; gap:9px; margin:12px 0; }
.registration-method-card { position:relative; width:100%; min-height:77px; padding:12px 35px 12px 48px; display:grid; gap:4px; border:1px solid #dce5f1; border-radius:12px; color:#2d4365; background:#fff; text-align:left; }
.registration-method-card:hover { border-color:#89afe9; background:#f7faff; }
.registration-method-card > span { position:absolute; top:13px; left:12px; width:27px; height:27px; display:grid; place-items:center; border-radius:8px; color:#2762b7; background:#eaf2ff; font-size:14px; }
.registration-method-card strong { font-size:10px; }
.registration-method-card small { color:#78879b; font-size:8px; line-height:1.4; }
.registration-method-card b { position:absolute; top:26px; right:13px; color:#99a7b8; font-size:17px; font-weight:500; }
.registration-form { display:grid; gap:10px; margin:11px 0; }
.registration-form .form-field { display:grid; gap:5px; color:#52647f; font-size:8px; font-weight:650; }
.registration-form input,.registration-form select { width:100%; min-height:39px; padding:0 10px; border:1px solid #dce4ef; border-radius:9px; color:#2d4262; background:#fff; font:inherit; font-size:10px; }
.registration-form input:focus,.registration-form select:focus { border-color:#6c98dd; outline:3px solid rgba(77,128,206,.13); }
.registration-form .mobile-primary { width:100%; margin-top:2px; }
.registration-secondary { width:100%; margin:8px 0; }
.registration-demo-fill,.registration-resend { justify-self:start; margin:0; padding:0; font-size:8px; }
.form-demo-help { color:#8592a4; font-size:7px; line-height:1.5; }
.form-demo-help strong { color:#315f9c; letter-spacing:.13em; }
.form-error-note { padding:8px; border-radius:8px; color:#98454b; background:#fff0ef; font-size:8px; }
.registration-result { margin:10px 0; padding:16px 13px; border:1px solid #dce6f3; border-radius:13px; background:#fff; text-align:center; }
.registration-result > span { width:34px; height:34px; margin:auto; display:grid; place-items:center; border-radius:50%; color:#3169b9; background:#e8f1ff; font-size:17px; }
.registration-result h3 { margin:10px 0 5px; color:#253e62; font-size:11px; }
.registration-result p { margin:0; color:#697991; font-size:8px; line-height:1.5; }
.registration-result small { display:block; margin-top:9px; color:#8895a7; font-size:7px; }
.registration-result.success { border-color:#b9e4d0; background:#f7fcf9; }
.registration-result.success > span { color:#26835e; background:#e3f7ec; }
.registration-result.rejected { border-color:#f0cece; background:#fffafa; }
.registration-result.rejected > span { color:#ad4a52; background:#fde9e9; }
.registration-qr-card { margin:10px 0; padding:13px; display:grid; justify-items:center; gap:8px; border:1px solid #e0e8f2; border-radius:12px; background:#fff; text-align:center; }
.registration-qr-card strong { color:#344b6d; font-size:9px; }
.registration-qr-card small { max-width:210px; color:#8390a2; font-size:7px; line-height:1.45; }
.registration-qr-card code { padding:5px 8px; border-radius:6px; color:#275d9f; background:#edf4ff; font-size:8px; }
.demo-qr-pattern { width:120px; height:120px; padding:6px; display:grid; grid-template-columns:repeat(12,1fr); gap:2px; border:1px solid #dbe4ef; border-radius:7px; background:#fff; }
.demo-qr-pattern i { border-radius:1px; background:transparent; }
.demo-qr-pattern i.filled { background:#17365f; }
.subscription-info-note { margin:10px 0; padding:9px 10px; border:1px solid #e1e8f2; border-radius:9px; color:#6f7f95; background:#f7f9fc; font-size:7px; line-height:1.5; }
.subscription-status-card { margin:9px 0; padding:10px; border:1px solid #e0e8f2; border-radius:10px; background:#fff; }
.subscription-status-card p { margin:7px 0 0; color:#64758f; font-size:8px; line-height:1.5; }
.subscription-main-card { margin:10px 0; padding:13px; border:1px solid #dce5f1; border-radius:14px; background:linear-gradient(145deg,#fff,#f5f8fd); box-shadow:0 7px 20px rgba(29,57,97,.05); }
.subscription-main-card.restricted { border-color:#efc9c9; background:linear-gradient(145deg,#fff,#fff7f7); }
.subscription-main-head { display:flex; align-items:center; justify-content:space-between; gap:8px; color:#8491a4; font-size:7px; font-weight:700; letter-spacing:.06em; }
.subscription-price { display:block; margin:12px 0; color:#263e60; font-size:22px; font-weight:700; letter-spacing:-.04em; }
.subscription-price small { color:#8492a6; font-size:9px; font-weight:500; letter-spacing:0; }
.subscription-dates { display:grid; gap:7px; padding:9px 0; border-top:1px solid #e9edf4; }
.subscription-dates div { display:flex; justify-content:space-between; gap:10px; font-size:7px; }
.subscription-dates span { color:#8290a4; }
.subscription-dates strong { color:#475b78; text-align:right; }
.subscription-pay-button { width:100%; margin:7px 0 8px; }
.subscription-autorenew { width:100%; padding:8px 2px; display:grid; grid-template-columns:22px 1fr; gap:3px 8px; align-items:center; border:0; color:#405777; background:transparent; text-align:left; font-size:8px; }
.subscription-autorenew small { grid-column:2; color:#8a97a8; font-size:7px; }
.toggle-track { width:22px; height:13px; padding:2px; border-radius:10px; background:#cbd4e0; }
.toggle-track i { width:9px; height:9px; display:block; border-radius:50%; background:#fff; transition:transform .16s; }
.subscription-autorenew.enabled .toggle-track { background:#477bc4; }
.subscription-autorenew.enabled .toggle-track i { transform:translateX(9px); }
.subscription-cancel-link { margin-top:3px; padding:5px 0; border:0; color:#a45a60; background:transparent; font-size:7px; text-decoration:underline; }
.subscription-lock-card { margin:10px 0; padding:11px; display:flex; gap:9px; border:1px solid #f0d3d1; border-radius:11px; color:#79474a; background:#fff8f7; }
.subscription-lock-card > span { font-size:16px; }
.subscription-lock-card strong { font-size:8px; }
.subscription-lock-card p { margin:5px 0 0; color:#907275; font-size:7px; line-height:1.45; }
.subscription-access-card { margin:10px 0; padding:11px; border:1px solid #dce8e3; border-radius:11px; background:#f8fcfa; }
.subscription-access-card > strong { color:#2e5e4d; font-size:8px; }
.subscription-access-card > div { display:grid; gap:6px; margin:8px 0; }
.subscription-access-card button { justify-self:start; padding:0; border:0; color:#3569aa; background:transparent; font-size:7px; text-align:left; }
.subscription-access-card small { display:block; color:#778c82; font-size:7px; line-height:1.45; }
.subscription-payments,.subscription-terms { margin:12px 0; }
.subscription-payment-list { display:grid; gap:6px; }
.subscription-payment-row { padding:8px; display:grid; grid-template-columns:20px minmax(0,1fr) auto; gap:7px; align-items:center; border:1px solid #e6ebf2; border-radius:9px; background:white; }
.payment-mark { width:18px; height:18px; display:grid; place-items:center; border-radius:50%; color:#26835e; background:#e7f6ed; font-size:9px; }
.subscription-payment-row strong,.subscription-payment-row small { display:block; }
.subscription-payment-row strong { color:#445a78; font-size:7px; }
.subscription-payment-row small { margin-top:3px; color:#8793a4; font-size:6px; }
.subscription-payment-row b { color:#3e5677; font-size:7px; }
.subscription-payment-row em { grid-column:2/4; color:#8b98a7; font-size:6px; font-style:normal; }
.subscription-terms { padding:10px; border-radius:9px; color:#738198; background:#f3f6fa; font-size:7px; line-height:1.5; }
.subscription-terms strong { color:#536783; font-size:8px; }
.subscription-terms p { margin:5px 0 0; }
.subscription-test-controls { margin:12px 0 18px; padding:9px; border:1px dashed #cbd8e9; border-radius:9px; color:#74839a; font-size:7px; }
.subscription-test-controls summary { color:#49658b; cursor:pointer; font-weight:650; }
.subscription-test-controls label { display:grid; gap:5px; margin-top:9px; }
.subscription-test-controls select { min-height:32px; border:1px solid #dce4ef; border-radius:7px; color:#3b5170; background:#fff; }
.subscription-test-controls p { margin:6px 0 0; }
.subscription-admin-warning { margin:0 0 15px; padding:11px 13px; display:grid; gap:4px; border:1px solid #e5eaf2; border-radius:10px; color:#6e7f98; background:#f7f9fc; font-size:9px; }
.subscription-admin-warning strong { color:#385779; font-size:10px; }
.subscription-admin-grid { align-items:start; }
.subscription-plan-form { display:grid; grid-template-columns:repeat(2,minmax(130px,1fr)); gap:10px; align-items:end; }
.subscription-plan-form label,.invite-create-form label { display:grid; gap:5px; color:#64758f; font-size:8px; font-weight:650; }
.subscription-plan-form input,.subscription-plan-form select,.invite-create-form select { width:100%; min-height:36px; padding:0 9px; border:1px solid #dce4ef; border-radius:8px; color:#334a6b; background:#fff; font:inherit; font-size:9px; }
.subscription-plan-form input[readonly] { background:#f5f7fa; }
.subscription-plan-form button { min-height:36px; grid-column:1/-1; }
.subscription-list-toolbar { margin:0 0 10px; display:flex; gap:6px; }
.subscription-list-toolbar button { min-height:30px; padding:0 9px; border:1px solid #dce4ef; border-radius:7px; color:#63758e; background:white; font-size:8px; }
.subscription-list-toolbar button.active { border-color:#adc6e9; color:#2f5f9e; background:#eff5ff; }
.subscription-admin-table { min-width:790px; }
.subscription-scenario-select { min-width:142px; }
.enrollment-card { padding:11px; display:flex; justify-content:space-between; align-items:center; gap:12px; border:1px solid #e2e9f2; border-radius:9px; background:#fff; }
.enrollment-card > div:first-child { display:grid; gap:5px; }
.enrollment-card strong { color:#334b6d; font-size:9px; }
.enrollment-card small { color:#8491a3; font-size:7px; }
.enrollment-card > div:last-child { display:flex; gap:6px; flex:0 0 auto; }
.enrollment-card .button-primary { min-height:30px; padding:0 9px; font-size:8px; }
.invite-create-form { margin-bottom:10px; display:flex; gap:8px; align-items:end; }
.invite-create-form label { min-width:100px; flex:1; }
.invite-create-form button { min-height:36px; white-space:nowrap; }
.invite-admin-list,.subscription-audit-list { display:grid; gap:7px; }
.invite-admin-row { padding:9px; display:flex; gap:8px; align-items:center; border:1px solid #e5eaf1; border-radius:9px; background:#fff; }
.invite-status-dot { width:8px; height:8px; flex:0 0 auto; border-radius:50%; background:#3aa578; box-shadow:0 0 0 3px #e9f7f0; }
.invite-status-dot.inactive { background:#bd6870; box-shadow:0 0 0 3px #fff0ef; }
.invite-status-dot.used { background:#c99537; box-shadow:0 0 0 3px #fff7e7; }
.invite-admin-row > div { min-width:0; flex:1; }
.invite-admin-row strong,.invite-admin-row small { display:block; overflow-wrap:anywhere; }
.invite-admin-row strong { color:#3b5273; font-size:8px; }
.invite-admin-row small { margin-top:4px; color:#8793a5; font-size:6px; line-height:1.4; }
.danger-outline { border-color:#efd4d4; color:#a55359; }
.subscription-audit-row { position:relative; padding:1px 0 8px 15px; border-left:1px solid #dfe6ef; }
.subscription-audit-row > i { position:absolute; left:-4px; top:3px; width:7px; height:7px; border-radius:50%; background:#5f8dcc; }
.subscription-audit-row strong,.subscription-audit-row small,.subscription-audit-row time { display:block; }
.subscription-audit-row strong { color:#435a79; font-size:8px; }
.subscription-audit-row small { margin-top:4px; color:#8491a2; font-size:7px; line-height:1.4; }
.subscription-audit-row time { margin-top:3px; color:#a0a9b6; font-size:6px; }
@media (max-width: 720px) {
  .subscription-plan-form { grid-template-columns:1fr 1fr; }
  .subscription-admin-grid { display:grid; grid-template-columns:1fr; }
  .subscription-admin-warning { font-size:8px; }
  .enrollment-card { align-items:flex-start; flex-direction:column; }
  .subscription-admin-table { min-width:720px; }
}
