/* Attendance Gateway — operational RTL interface */
:root {
  --ink: #111c1f;
  --ink-2: #19282c;
  --ink-3: #26383c;
  --paper: #f3f1eb;
  --surface: #fffefa;
  --surface-2: #eae8e1;
  --line: #d9d7cf;
  --line-dark: #b9b8b1;
  --text: #172124;
  --muted: #667276;
  --soft: #8d9698;
  --signal: #c9f24b;
  --signal-dark: #759414;
  --teal: #0eaa9b;
  --teal-soft: #daf3ef;
  --orange: #ed7745;
  --orange-soft: #fff0e8;
  --red: #c84b42;
  --red-soft: #fbe8e5;
  --amber: #c98916;
  --amber-soft: #fff3d8;
  --blue: #39788f;
  --blue-soft: #e3f0f4;
  --shadow: 0 18px 44px rgba(17, 28, 31, .07);
  --font: "DIN Next Arabic", "IBM Plex Sans Arabic", "Noto Kufi Arabic", "Geeza Pro", Tahoma, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --sidebar: 276px;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--paper); font-family: var(--font); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; width: 1.25rem; height: 1.25rem; fill: currentColor; }
h1, h2, h3, p, dl, dd { margin: 0; }
img { max-width: 100%; }
::selection { color: var(--ink); background: var(--signal); }
:focus-visible { outline: 3px solid rgba(14, 170, 155, .35); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 999; inset: 10px auto auto 50%; transform: translate(-50%, -150%); padding: 10px 16px; color: #fff; background: var(--ink); border-radius: 5px; transition: transform .2s; }
.skip-link:focus { transform: translate(-50%, 0); }

/* Shell */
.app-layout { min-height: 100vh; }
.sidebar { position: fixed; z-index: 60; inset: 0 0 0 auto; width: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; overflow: hidden auto; color: #eef3ef; background: var(--ink); border-left: 1px solid rgba(255,255,255,.06); }
.sidebar::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .15; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(to bottom, #000, transparent 78%); }
.sidebar__rail { position: absolute; inset: 0 0 auto auto; width: 4px; height: 152px; background: var(--signal); box-shadow: 0 152px 0 rgba(201,242,75,.18); }
.brand { position: relative; display: flex; align-items: center; gap: 12px; padding: 27px 23px 23px; }
.brand__mark { width: 38px; height: 38px; flex: 0 0 38px; display: flex; align-items: flex-end; gap: 3px; padding: 8px; background: var(--signal); transform: skewY(-4deg); }
.brand__mark span { flex: 1; background: var(--ink); animation: signalBars 1.8s ease-in-out infinite; }
.brand__mark span:nth-child(1) { height: 40%; animation-delay: -.35s; }
.brand__mark span:nth-child(2) { height: 92%; }
.brand__mark span:nth-child(3) { height: 65%; animation-delay: -.7s; }
.brand__copy { min-width: 0; display: grid; }
.brand__copy strong { color: #fff; font-size: 17px; letter-spacing: -.02em; }
.brand__copy small { color: #88989b; font: 8px/1.4 var(--mono); letter-spacing: .12em; direction: ltr; text-align: right; }
.system-beacon { position: relative; display: flex; align-items: center; gap: 10px; margin: 0 18px 20px; padding: 12px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.08); border-radius: 4px; }
.system-beacon__pulse, .riyadh-clock__dot { width: 8px; height: 8px; flex: 0 0 8px; background: var(--signal); border-radius: 50%; box-shadow: 0 0 0 5px rgba(201,242,75,.1); animation: beacon 2s infinite; }
.system-beacon > span:nth-child(2) { display: grid; line-height: 1.35; }
.system-beacon small, .ingress-address small { color: #7f9194; font-size: 10px; }
.system-beacon strong { font-size: 12px; font-weight: 650; }
.system-beacon__port { margin-right: auto; color: var(--signal); font: 11px var(--mono); }
.nav-stack { position: relative; padding: 0 14px 24px; }
.nav-stack__label { padding: 8px 12px; color: #607376; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.nav-stack__label--spaced { margin-top: 18px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 45px; margin: 2px 0; padding: 9px 11px; color: #aab7b8; border: 1px solid transparent; border-radius: 4px; transition: color .18s, background .18s, transform .18s; }
.nav-item svg { width: 18px; color: #718386; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.055); transform: translateX(-2px); }
.nav-item.is-active { color: #fff; background: rgba(201,242,75,.09); border-color: rgba(201,242,75,.14); }
.nav-item.is-active svg { color: var(--signal); }
.nav-item.is-active::before { content: ""; position: absolute; right: 0; width: 3px; height: 25px; background: var(--signal); }
.nav-item__count, .nav-item__signal { margin-right: auto; min-width: 22px; padding: 2px 6px; text-align: center; color: var(--ink); background: var(--signal); border-radius: 10px; font: 10px var(--mono); }
.nav-item__signal { color: #fff; background: var(--orange); }
.sidebar__footer { position: relative; margin-top: auto; padding: 18px; border-top: 1px solid rgba(255,255,255,.07); }
.ingress-address { display: flex; align-items: center; gap: 9px; padding: 10px; background: #0d1618; border-radius: 3px; }
.ingress-address__icon { display: grid; place-items: center; width: 25px; height: 25px; color: var(--signal); border: 1px solid #344548; }
.ingress-address > span:last-child { display: grid; }
.ingress-address b { font: 11px var(--mono); }
.sidebar__footer > p { margin-top: 10px; color: #5f7275; font-size: 9px; }
.main-panel { min-height: 100vh; margin-right: var(--sidebar); }
.topbar { position: sticky; z-index: 45; top: 0; height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 3vw, 44px); background: rgba(243,241,235,.88); border-bottom: 1px solid rgba(185,184,177,.55); backdrop-filter: blur(14px); }
.topbar__start, .topbar__end { display: flex; align-items: center; gap: 12px; }
.context-title { display: grid; line-height: 1.25; }
.context-title__eyebrow { color: var(--teal); font-size: 9px; font-weight: 800; }
.context-title h1 { font-size: 19px; font-weight: 800; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 4px; }
.icon-button:hover { color: var(--text); background: var(--surface); }
.icon-button--small { width: 34px; height: 34px; border: 0; }
.menu-toggle { display: none; }
.riyadh-clock { display: flex; align-items: center; gap: 9px; padding: 0 15px; border-left: 1px solid var(--line); }
.riyadh-clock__dot { width: 6px; height: 6px; flex-basis: 6px; background: var(--teal); box-shadow: 0 0 0 4px rgba(14,170,155,.12); }
.riyadh-clock > span:last-child { display: grid; line-height: 1.2; }
.riyadh-clock small { color: var(--soft); font-size: 9px; }
.riyadh-clock time { font: 12px var(--mono); direction: ltr; }
.notification-button { position: relative; }
.notification-button__count { position: absolute; top: -5px; left: -5px; min-width: 18px; padding: 1px 4px; color: #fff; background: var(--red); border: 2px solid var(--paper); border-radius: 10px; font: 9px var(--mono); }
.user-menu { position: relative; }
.user-menu__trigger { display: flex; align-items: center; gap: 9px; padding: 4px 8px 4px 4px; text-align: right; background: transparent; border: 0; border-radius: 5px; }
.user-menu__trigger:hover { background: rgba(255,255,255,.6); }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; color: var(--signal); background: var(--ink); border-radius: 3px; font-weight: 800; }
.user-menu__identity { display: grid; min-width: 115px; line-height: 1.35; }
.user-menu__identity strong { max-width: 150px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.user-menu__identity small { color: var(--soft); font-size: 9px; }
.user-menu__chevron { width: 16px; }
.user-menu__popover { position: absolute; z-index: 90; top: calc(100% + 8px); left: 0; width: 190px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; box-shadow: var(--shadow); }
.user-menu__popover[hidden] { display: none; }
.user-menu__popover a, .user-menu__popover button { width: 100%; display: block; padding: 9px 10px; text-align: right; background: none; border: 0; border-radius: 3px; font-size: 12px; }
.user-menu__popover a:hover, .user-menu__popover button:hover { background: var(--surface-2); }
.user-menu__divider { display: block; height: 1px; margin: 5px 0; background: var(--line); }
.sidebar-scrim { display: none; }

/* Shared content */
.page-frame { max-width: 1560px; margin: 0 auto; padding: 34px clamp(20px, 3vw, 44px) 60px; }
.page-intro { min-height: 84px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.page-intro__copy h2 { margin: 3px 0 4px; font-size: clamp(24px, 2.2vw, 34px); line-height: 1.25; letter-spacing: -.035em; }
.page-intro__copy > p:last-child { max-width: 650px; color: var(--muted); }
.page-intro__actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.section-kicker { color: var(--teal); font-size: 9px; font-weight: 850; letter-spacing: .07em; }
.section-kicker::before { content: ""; display: inline-block; width: 18px; height: 2px; margin-left: 7px; vertical-align: middle; background: currentColor; }
.button { min-height: 41px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border: 1px solid transparent; border-radius: 4px; font-size: 12px; font-weight: 750; transition: transform .15s, box-shadow .15s, background .15s; }
.button svg { width: 17px; }
.button:hover { transform: translateY(-1px); }
.button--primary { color: var(--ink); background: var(--signal); border-color: #b4da3d; box-shadow: 0 7px 18px rgba(117,148,20,.14); }
.button--primary:hover { background: #d6ff57; box-shadow: 0 9px 22px rgba(117,148,20,.2); }
.button--secondary { color: #fff; background: var(--ink); border-color: var(--ink); }
.button--ghost { background: transparent; border-color: var(--line-dark); }
.button--ghost:hover { background: var(--surface); }
.button--filter { align-self: end; min-width: 76px; color: #fff; background: var(--ink); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 2px 1px rgba(17,28,31,.02); }
.panel__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 21px 22px; border-bottom: 1px solid var(--line); }
.panel__header h3 { margin-top: 2px; font-size: 17px; }
.text-link { color: var(--teal); font-size: 11px; font-weight: 750; }
.text-link:hover { color: var(--ink); }
.message-stack { display: grid; gap: 8px; margin-bottom: 16px; }
.flash-message { display: flex; align-items: center; gap: 11px; padding: 11px 14px; background: var(--blue-soft); border-right: 3px solid var(--blue); border-radius: 3px; }
.flash-message--success { background: var(--teal-soft); border-color: var(--teal); }
.flash-message--warning { background: var(--amber-soft); border-color: var(--amber); }
.flash-message--error { background: var(--red-soft); border-color: var(--red); }
.flash-message__symbol { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-weight: 900; }
.flash-message p { flex: 1; font-size: 12px; }
.flash-message button { padding: 3px 7px; color: var(--muted); background: none; border: 0; font-size: 20px; }

/* Dashboard */
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 15px; }
.metric-card { position: relative; min-height: 168px; padding: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; }
.metric-card::after { content: ""; position: absolute; inset: auto -20px -50px auto; width: 110px; height: 110px; border: 1px solid var(--line); border-radius: 50%; }
.metric-card--ink { color: #fff; background: var(--ink); border-color: var(--ink); }
.metric-card--ink::after { border-color: #334549; }
.metric-card__head, .metric-card__foot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-card__head > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.metric-card--ink .metric-card__head > span, .metric-card--ink .metric-card__foot small { color: #90a0a2; }
.metric-icon { width: 27px; height: 27px; display: grid; place-items: center; color: var(--signal); background: rgba(201,242,75,.1); border-radius: 50%; font: 700 13px var(--mono); }
.metric-icon--success { color: var(--teal); background: var(--teal-soft); }
.metric-icon--pending { color: var(--amber); background: var(--amber-soft); }
.metric-icon--danger { color: var(--red); background: var(--red-soft); }
.metric-card__value { position: relative; z-index: 1; display: block; margin: 15px 0 10px; font: 700 clamp(29px, 3vw, 42px)/1 var(--mono); letter-spacing: -.06em; }
.metric-card__foot { justify-content: flex-start; }
.metric-card__foot small { color: var(--soft); font-size: 9px; }
.trend { color: var(--teal); font: 700 10px var(--mono); }
.trend--down, .trend--warning { color: var(--orange); }
.metric-card__index { position: absolute; left: 14px; bottom: 10px; color: rgba(102,114,118,.18); font: 700 26px var(--mono); }
.dashboard-grid { display: grid; gap: 15px; margin-bottom: 15px; }
.dashboard-grid--lead { grid-template-columns: minmax(0, 2fr) minmax(290px, .72fr); }
.dashboard-grid--feed, .dashboard-grid--lower { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.segmented-control { display: flex; padding: 3px; background: var(--surface-2); border-radius: 3px; }
.segmented-control button { padding: 5px 8px; color: var(--muted); background: transparent; border: 0; border-radius: 2px; font-size: 9px; }
.segmented-control button.is-active { color: #fff; background: var(--ink); }
.throughput-summary { display: flex; gap: clamp(20px, 5vw, 68px); padding: 18px 22px 5px; }
.throughput-summary div { display: grid; }
.throughput-summary strong { font: 700 21px var(--mono); }
.throughput-summary span { color: var(--soft); font-size: 9px; }
.ops-chart { position: relative; height: 235px; padding: 10px 24px 25px 48px; overflow: hidden; background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 55px; }
.ops-chart svg { width: 100%; height: 190px; overflow: visible; }
.ops-chart__line { fill: none; stroke: var(--teal); stroke-width: 3; vector-effect: non-scaling-stroke; }
.ops-chart__area { fill: url(#areaFill); }
.ops-chart__point { fill: var(--surface); stroke: var(--teal); stroke-width: 3; vector-effect: non-scaling-stroke; }
.ops-chart__scale { position: absolute; inset: 6px auto 31px 11px; display: flex; flex-direction: column; justify-content: space-between; color: var(--soft); font: 8px var(--mono); }
.ops-chart__labels { position: absolute; inset: auto 23px 8px 23px; display: flex; justify-content: space-between; color: var(--soft); font: 8px var(--mono); direction: ltr; }
.live-chip { display: flex; align-items: center; gap: 6px; color: var(--teal); font: 700 9px var(--mono); }
.live-chip i { width: 6px; height: 6px; background: currentColor; border-radius: 50%; animation: beacon 2s infinite; }
.health-score { padding: 23px 22px 15px; }
.health-score strong { display: block; font: 700 43px/1 var(--mono); letter-spacing: -.07em; }
.health-score strong small { font-size: 17px; }
.health-score > span { color: var(--muted); font-size: 10px; }
.health-list { margin: 7px 22px 19px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.health-list li { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.health-list li > span { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.health-list b { font-size: 10px; }
.health-dot { width: 7px; height: 7px; background: var(--soft); border-radius: 50%; }
.health-dot--good { background: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.health-dot--warn { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.health-panel > .text-link { display: block; margin: 0 22px 20px; }
.destination-health-list { padding: 4px 20px 11px; }
.destination-health-row { display: grid; grid-template-columns: auto minmax(80px, 1fr) auto auto; align-items: center; gap: 10px; padding: 13px 1px; border-bottom: 1px solid var(--line); }
.destination-health-row:last-child { border-bottom: 0; }
.destination-logo { width: 35px; height: 35px; display: grid; place-items: center; color: #fff; background: var(--ink); border-radius: 4px; font: 800 9px var(--mono); }
.destination-logo--n8n { color: var(--ink); background: var(--orange); }
.destination-logo--google_sheets, .destination-logo--sheets { background: var(--teal); }
.destination-logo--hmac { color: var(--ink); background: var(--signal); }
.destination-health-row__name, .destination-health-row__rate { display: grid; }
.destination-health-row__name strong { font-size: 11px; }
.destination-health-row__name small, .destination-health-row__rate small { color: var(--soft); font-size: 8px; }
.destination-health-row__rate { text-align: left; }
.destination-health-row__rate strong { font: 700 11px var(--mono); }
.mini-empty { display: grid; place-items: center; gap: 6px; padding: 30px; color: var(--muted); text-align: center; font-size: 11px; }
.mini-empty > span { font-size: 26px; }
.mini-empty a { color: var(--teal); font-weight: 750; }
.device-pulse-grid { display: grid; grid-template-columns: repeat(4, 1fr); padding: 26px 18px; }
.device-pulse-grid > div { display: grid; place-items: center; gap: 5px; border-left: 1px solid var(--line); }
.device-pulse-grid > div:last-child { border-left: 0; }
.device-pulse-grid strong { font: 700 23px var(--mono); }
.device-pulse-grid small { color: var(--muted); font-size: 9px; }
.pulse-orbit { width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; }
.pulse-orbit i { width: 8px; height: 8px; background: var(--soft); border-radius: 50%; }
.pulse-orbit--active i { background: var(--teal); box-shadow: 0 0 0 5px var(--teal-soft); }
.pulse-orbit--new i { background: var(--signal-dark); box-shadow: 0 0 0 5px rgba(201,242,75,.25); }
.pulse-orbit--silent i { background: var(--amber); }
.pulse-orbit--blocked i { background: var(--red); }
.activity-timeline { margin: 0; padding: 20px 23px; list-style: none; }
.activity-timeline__item { position: relative; display: flex; gap: 11px; min-height: 52px; }
.activity-timeline__item:not(:last-child)::after { content: ""; position: absolute; right: 5px; top: 17px; bottom: -3px; width: 1px; background: var(--line); }
.activity-timeline__marker { z-index: 1; width: 11px; height: 11px; margin-top: 5px; flex: 0 0 11px; background: var(--blue); border: 3px solid var(--blue-soft); border-radius: 50%; box-sizing: content-box; }
.activity-timeline__item--success .activity-timeline__marker { background: var(--teal); border-color: var(--teal-soft); }
.activity-timeline__item--warning .activity-timeline__marker { background: var(--amber); border-color: var(--amber-soft); }
.activity-timeline__item--error .activity-timeline__marker { background: var(--red); border-color: var(--red-soft); }
.activity-timeline__item p { font-size: 11px; }
.activity-timeline__item time { color: var(--soft); font-size: 8px; }

/* Data, filters, status */
.summary-ribbon { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)) minmax(180px, .8fr); margin-bottom: 14px; background: var(--ink); border-radius: 5px; overflow: hidden; }
.summary-ribbon > div { position: relative; display: grid; grid-template-columns: 9px 1fr; gap: 1px 9px; padding: 14px 17px; color: #fff; border-left: 1px solid #2d3d40; }
.summary-ribbon small { color: #8fa0a2; font-size: 9px; }
.summary-ribbon strong { grid-column: 2; font: 700 18px var(--mono); }
.summary-ribbon__mark { grid-row: 1 / span 2; align-self: center; width: 6px; height: 26px; background: var(--soft); border-radius: 2px; }
.summary-ribbon__mark--good { background: var(--teal); }.summary-ribbon__mark--pending { background: var(--signal); }.summary-ribbon__mark--warn { background: var(--amber); }.summary-ribbon__mark--danger { background: var(--red); }
.summary-ribbon__live { display: flex !important; align-items: center; justify-content: center; gap: 7px !important; color: #aebbbc !important; }
.summary-ribbon__live i { width: 7px; height: 7px; background: var(--teal); border-radius: 50%; animation: beacon 2s infinite; }
.summary-ribbon__live time { color: #fff; font: 10px var(--mono); }
.filter-panel { margin-bottom: 14px; padding: 14px; }
.filter-form { display: grid; grid-template-columns: minmax(230px, 1.35fr) repeat(3, minmax(125px, .55fr)) auto auto; align-items: end; gap: 9px; }
.filter-form--devices { grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(140px, .55fr)) auto auto; }
.filter-form__search { position: relative; align-self: end; }
.filter-form__search svg { position: absolute; top: 50%; right: 12px; width: 17px; color: var(--soft); transform: translateY(-50%); }
.filter-form input, .filter-field select { width: 100%; height: 42px; padding: 0 12px; background: #faf9f5; border: 1px solid var(--line); border-radius: 3px; outline: 0; }
.filter-form__search input { padding-right: 39px; }
.filter-form input:focus, .filter-field select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,170,155,.1); }
.filter-field { display: grid; gap: 4px; }
.filter-field label { color: var(--muted); font-size: 9px; font-weight: 700; }
.filter-field select { padding-left: 28px; font-size: 11px; }
.filter-reset { align-self: end; height: 41px; display: grid; place-items: center; padding: 0 8px; color: var(--muted); font-size: 10px; }
.data-panel { overflow: hidden; }
.data-panel__header { display: flex; align-items: center; justify-content: space-between; padding: 16px 19px; border-bottom: 1px solid var(--line); }
.data-panel__header > div:first-child { display: flex; align-items: baseline; gap: 8px; }
.data-panel__header h3 { font-size: 14px; }
.data-panel__header span, .table-legend { color: var(--soft); font-size: 9px; }
.table-legend > span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 6px; height: 6px; background: var(--soft); border-radius: 50%; }
.legend-dot--live { background: var(--teal); animation: beacon 2s infinite; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.data-table th { height: 42px; padding: 9px 16px; color: var(--muted); background: #f5f4ef; border-bottom: 1px solid var(--line); text-align: right; font-size: 9px; font-weight: 750; }
.data-table td { height: 64px; padding: 10px 16px; border-bottom: 1px solid #e8e6df; font-size: 11px; vertical-align: middle; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: #f7f7f2; }
.data-table tbody tr.is-muted { opacity: .65; }
.data-table--compact th, .data-table--compact td { padding-right: 20px; padding-left: 20px; }
.table-time, .record-link, .rate-cell { display: grid; }
.table-time strong, .employee-code, .serial-code, .ip-code, .rate-cell strong { font-family: var(--mono); font-size: 11px; }
.table-time small, .record-link small, .rate-cell small { color: var(--soft); font-size: 8px; }
.record-link:hover strong, .employee-code:hover { color: var(--teal); }
.device-ref { display: flex; align-items: center; gap: 8px; }
.device-ref > i { width: 7px; height: 7px; flex: 0 0 7px; background: var(--teal); border-radius: 50%; box-shadow: 0 0 0 3px var(--teal-soft); }
.device-ref > i.is-silent { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.device-ref > span { display: grid; }
.device-ref small { color: var(--soft); font: 8px var(--mono); }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 7px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; font-size: 9px; font-weight: 700; }
.status-badge__dot { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.status-badge--delivered, .status-badge--active, .status-badge--healthy { color: #087d72; background: var(--teal-soft); border-color: #bce6e0; }
.status-badge--pending { color: var(--signal-dark); background: #f2f8d8; border-color: #dceba4; }
.status-badge--retry, .status-badge--degraded { color: #9a6411; background: var(--amber-soft); border-color: #efd9a6; }
.status-badge--failed, .status-badge--dlq, .status-badge--blocked { color: #a63a33; background: var(--red-soft); border-color: #efc5c1; }
.status-badge--paused, .status-badge--silent { color: #657174; background: #eceeeb; border-color: #d5dad6; }
.duplicate-chip, .discovery-chip, .ingress-chip { display: inline-block; margin-right: 5px; padding: 3px 5px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 3px; font-size: 8px; }
.ingress-chip { margin: 0; font-family: var(--mono); direction: ltr; }
.delivery-count { display: block; margin-top: 4px; color: var(--soft); font: 8px var(--mono); }
.row-action { width: 29px; height: 29px; display: grid; place-items: center; color: var(--muted); border: 1px solid transparent; border-radius: 3px; }
.row-action svg { width: 16px; transform: rotate(180deg); }
.row-action:hover { color: var(--teal); background: var(--teal-soft); border-color: #bce6e0; }
.empty-state { min-width: 290px; display: grid; place-items: center; gap: 7px; padding: 48px 20px; text-align: center; white-space: normal; }
.empty-state__radar { width: 55px; height: 55px; display: grid; place-items: center; margin-bottom: 5px; border: 1px solid var(--line-dark); border-radius: 50%; box-shadow: inset 0 0 0 9px var(--surface-2); }
.empty-state__radar span { width: 7px; height: 7px; background: var(--teal); border-radius: 50%; animation: beacon 1.8s infinite; }
.empty-state h3 { font-size: 14px; }.empty-state p { max-width: 430px; color: var(--muted); font-size: 10px; }
.pagination { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--line); }
.pagination p { color: var(--muted); font-size: 9px; }.pagination p strong { color: var(--text); font-family: var(--mono); }
.pagination__controls { display: flex; align-items: center; gap: 5px; direction: rtl; }
.pagination__button, .pagination__current { min-width: 34px; height: 32px; display: grid; place-items: center; padding: 0 9px; border: 1px solid var(--line); border-radius: 3px; font-size: 9px; }
.pagination__current { color: #fff; background: var(--ink); border-color: var(--ink); font-family: var(--mono); }.pagination__button.is-disabled { opacity: .4; }

/* Devices */
.device-overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.device-overview article { min-height: 104px; display: grid; grid-template-columns: auto 1fr; align-content: center; gap: 3px 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; }
.device-overview__icon { grid-row: 1 / span 2; width: 39px; height: 39px; display: grid; place-items: center; color: var(--muted); background: var(--surface-2); border-radius: 50%; font: 700 17px var(--mono); }
.device-overview__icon i { width: 8px; height: 8px; background: var(--teal); border-radius: 50%; box-shadow: 0 0 0 6px var(--teal-soft); }
.device-overview__icon--new { color: var(--signal-dark); background: #eff7d5; }.device-overview__icon--silent { color: var(--amber); background: var(--amber-soft); }.device-overview__icon--blocked { color: var(--red); background: var(--red-soft); }
.device-overview article > div { display: flex; align-items: baseline; justify-content: space-between; }.device-overview small { color: var(--muted); font-size: 9px; }.device-overview strong { font: 700 23px var(--mono); }.device-overview p { grid-column: 2; color: var(--soft); font-size: 8px; }
.device-name { display: flex; align-items: center; gap: 9px; }.device-name > span:last-child { display: grid; }.device-name strong { font-size: 11px; }.device-name small { color: var(--soft); font-size: 8px; }
.device-silhouette { position: relative; width: 31px; height: 39px; display: grid; place-items: center; background: var(--ink-2); border-radius: 3px; box-shadow: inset 0 -5px #24363a; }
.device-silhouette::before { content: ""; width: 17px; height: 20px; background: #31474b; border: 1px solid #4b6064; border-radius: 2px; }.device-silhouette i { position: absolute; bottom: 5px; width: 4px; height: 4px; background: var(--soft); border-radius: 50%; }.device-silhouette.is-active i { background: var(--signal); box-shadow: 0 0 5px var(--signal); }
.serial-code, .ip-code { padding: 3px 5px; color: var(--text); background: #f0efe9; border-radius: 2px; }.discovery-chip { display: block; width: max-content; margin: 4px 0 0; color: #55700d; background: #eef7d1; border-color: #dbeaa2; }.error-count, .clean-count { min-width: 24px; display: inline-grid; place-items: center; padding: 3px 6px; color: var(--red); background: var(--red-soft); border-radius: 10px; font: 700 9px var(--mono); }.clean-count { color: var(--teal); background: var(--teal-soft); }

/* Destinations */
.destination-command-bar { display: flex; align-items: stretch; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.destination-command-bar__summary { flex: 1; display: grid; grid-template-columns: 66px repeat(4, minmax(110px, 1fr)); color: #fff; background: var(--ink); border-radius: 5px; overflow: hidden; }
.destination-command-bar__summary > div { display: grid; align-content: center; padding: 11px 17px; border-right: 1px solid #2c3d40; }.destination-command-bar__summary small { color: #8ea0a2; font-size: 8px; }.destination-command-bar__summary strong { font: 700 18px var(--mono); }.command-index { display: grid; place-items: center; color: var(--signal); background: #0c1517; font: 800 11px var(--mono); letter-spacing: .12em; }.danger-text { color: #ff8d7f; }
.view-switch { display: flex; align-items: center; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; }.view-switch button { width: 37px; height: 37px; display: grid; place-items: center; color: var(--muted); background: none; border: 0; border-radius: 3px; }.view-switch button.is-active { color: #fff; background: var(--ink); }.view-switch svg { width: 16px; }
.destination-grid { display: grid; grid-template-columns: repeat(3, minmax(270px, 1fr)); gap: 13px; margin-bottom: 14px; }.destination-grid.is-list { grid-template-columns: 1fr; }.destination-grid.is-list .destination-card { min-height: 0; }
.destination-card { position: relative; min-height: 355px; padding: 19px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; }.destination-card__stripe { position: absolute; top: 0; right: 0; left: 0; height: 3px; background: var(--soft); }.destination-card--active .destination-card__stripe, .destination-card--healthy .destination-card__stripe { background: var(--teal); }.destination-card--paused .destination-card__stripe { background: var(--amber); }.destination-card--failed .destination-card__stripe, .destination-card--degraded .destination-card__stripe { background: var(--red); }
.destination-card__header { display: flex; align-items: center; gap: 10px; }.destination-logo--large { width: 44px; height: 44px; flex: 0 0 44px; }.destination-card__identity { min-width: 0; }.destination-card__identity p { color: var(--soft); font-size: 8px; }.destination-card__identity h3 { max-width: 190px; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }.destination-card__identity a:hover { color: var(--teal); }.destination-card__menu { position: relative; margin-right: auto; }.destination-card__popover { left: 0; right: auto; }
.destination-card__status-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 18px 0; }.destination-card__endpoint { max-width: 60%; overflow: hidden; color: var(--soft); font: 8px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.destination-card__meter-head { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--muted); font-size: 9px; }.destination-card__meter-head strong { color: var(--text); font: 700 12px var(--mono); }.progress-track { height: 5px; overflow: hidden; background: var(--surface-2); border-radius: 3px; }.progress-track i { display: block; width: var(--progress); height: 100%; background: var(--teal); border-radius: inherit; }
.destination-card__metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin: 19px 0; padding: 13px 0; border-block: 1px solid var(--line); }.destination-card__metrics > div { padding: 0 10px; border-left: 1px solid var(--line); }.destination-card__metrics > div:first-child { padding-right: 0; }.destination-card__metrics > div:last-child { border-left: 0; }.destination-card__metrics dt { color: var(--soft); font-size: 8px; }.destination-card__metrics dd { margin-top: 2px; font: 700 14px var(--mono); }
.destination-card__footer { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 8px; }.destination-card__footer > span { display: grid; }.destination-card__footer small { color: var(--soft); font-size: 8px; }.destination-card__footer time { font-size: 9px; }.test-link { display: flex; align-items: center; gap: 5px; padding: 5px; color: var(--teal); background: none; border: 0; font-size: 9px; }.test-link__dot { width: 6px; height: 6px; background: var(--teal); border-radius: 50%; }
.destination-card--add { display: grid; place-items: center; align-content: center; gap: 8px; min-height: 355px; color: var(--muted); background: rgba(255,254,250,.42); border: 1px dashed var(--line-dark); text-align: center; }.destination-card--add:hover { color: var(--text); background: var(--surface); border-color: var(--teal); }.destination-card--add__icon { width: 48px; height: 48px; display: grid; place-items: center; color: var(--teal); border: 1px solid var(--teal); border-radius: 50%; font-size: 26px; }.destination-card--add strong { font-size: 12px; }.destination-card--add small { font-size: 8px; }
.destination-empty { grid-column: 1 / -1; min-height: 390px; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; }.destination-empty > p:not(.section-kicker) { max-width: 500px; color: var(--muted); font-size: 11px; }.destination-empty__diagram { display: flex; align-items: center; margin-bottom: 12px; direction: ltr; }.destination-empty__diagram span { width: 48px; height: 48px; display: grid; place-items: center; color: #fff; background: var(--ink); font: 800 10px var(--mono); border-radius: 50%; }.destination-empty__diagram .diagram-target { color: var(--teal); background: var(--surface); border: 1px dashed var(--teal); font-size: 22px; }.destination-empty__diagram i { width: 75px; border-top: 1px dashed var(--line-dark); }
.routing-note { display: flex; align-items: center; gap: 20px; padding: 18px 22px; }.routing-note__diagram { display: flex; align-items: center; direction: ltr; }.routing-note__diagram span { width: 35px; height: 35px; display: grid; place-items: center; color: var(--signal); background: var(--ink); border-radius: 50%; font: 800 8px var(--mono); }.routing-note__diagram i { width: 19px; border-top: 1px solid var(--line-dark); }.routing-note__diagram b { width: 8px; height: 8px; background: var(--teal); border-radius: 50%; }.routing-note > div:nth-child(2) { flex: 1; }.routing-note h3 { font-size: 13px; }.routing-note p:last-child { color: var(--muted); font-size: 9px; }

/* Functional editors and operational detail views */
.editor-layout { display: grid; gap: 14px; }
.editor-card { padding: 22px; }
.editor-card--single { max-width: 920px; margin-inline: auto; }
.editor-card__header { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.editor-card__header > span { width: 36px; height: 36px; display: grid; place-items: center; color: var(--signal); background: var(--ink); border-radius: 50%; font: 800 9px var(--mono); }
.editor-card__header h3 { font-size: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.form-grid__wide { grid-column: 1 / -1; }
.form-field { min-width: 0; display: grid; align-content: start; gap: 6px; }
.form-field > label { font-size: 10px; font-weight: 800; }
.form-field input:not([type="checkbox"]), .form-field select, .form-field textarea { width: 100%; min-height: 43px; padding: 9px 11px; color: var(--text); background: #f8f7f2; border: 1px solid var(--line); border-radius: 3px; outline: 0; }
.form-field textarea { resize: vertical; line-height: 1.7; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { background: #fff; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,170,155,.1); }
.form-field--error input, .form-field--error select, .form-field--error textarea { border-color: var(--red); }
.form-field__help { color: var(--soft); font-size: 8px; line-height: 1.6; }
.form-field__error { color: var(--red); font-size: 9px; font-weight: 700; }
.form-field--checkbox { grid-column: 1 / -1; padding: 11px; background: var(--surface-2); border: 1px solid var(--line); }
.editor-actions { display: flex; align-items: center; gap: 9px; padding: 17px 0; }
.editor-actions > p { margin-right: auto; color: var(--soft); font-size: 9px; }
.payload-configurator { overflow: hidden; background: #f8f7f2; border: 1px solid var(--line); border-radius: 5px; }
.payload-configurator__lead { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr); gap: 16px; align-items: stretch; padding: 18px; }
.payload-configurator__lead > div:first-child { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.payload-configurator__summary { display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: #fff; background: var(--ink); border-right: 3px solid var(--signal); border-radius: 4px; }
.payload-configurator__mark { width: 37px; height: 37px; flex: 0 0 37px; display: grid; place-items: center; color: var(--ink); background: var(--signal); border-radius: 50%; font: 900 17px var(--mono); }
.payload-configurator__summary div { display: grid; gap: 3px; }.payload-configurator__summary strong { font-size: 12px; }.payload-configurator__summary p { color: #93a2a4; font-size: 9px; }
.payload-field-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; padding: 0 18px 18px; }
.payload-field-map[hidden] { display: none; }
.payload-field-map > div { min-height: 48px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 1px 8px; padding: 9px 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; }
.payload-field-map span { grid-column: 1; color: var(--muted); font-size: 8px; }.payload-field-map i { grid-column: 2; grid-row: 1 / 3; color: var(--teal); font-style: normal; }.payload-field-map code { grid-column: 1; color: var(--text); font: 700 9px var(--mono); direction: ltr; text-align: right; }
.payload-advanced { border-top: 1px solid var(--line); background: var(--surface); }
.payload-advanced > summary { min-height: 58px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 12px; padding: 11px 18px; cursor: pointer; list-style: none; }
.payload-advanced > summary::-webkit-details-marker { display: none; }.payload-advanced > summary::before { content: "+"; grid-row: 1 / 3; width: 30px; height: 30px; display: grid; place-items: center; color: var(--teal); border: 1px solid var(--teal); border-radius: 50%; font: 700 16px var(--mono); }.payload-advanced[open] > summary::before { content: "−"; }
.payload-advanced > summary span { color: var(--teal); font-size: 8px; font-weight: 800; }.payload-advanced > summary strong { grid-column: 2; font-size: 10px; }.payload-advanced > summary small { grid-column: 2; color: var(--soft); font-size: 8px; }
.payload-advanced__body { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(320px, 1.2fr); gap: 14px; padding: 0 18px 18px; }
.payload-advanced__body > .form-field { padding: 14px; border: 1px solid var(--line); border-radius: 3px; }

.detail-hero { min-height: 150px; display: grid; grid-template-columns: 90px minmax(180px, 1fr) minmax(420px, 1.4fr); align-items: stretch; margin-bottom: 14px; overflow: hidden; }
.detail-hero__mark { display: grid; place-items: center; color: var(--signal); background: var(--ink); font: 900 14px var(--mono); letter-spacing: .08em; }
.detail-hero__identity { display: grid; align-content: center; gap: 6px; padding: 22px; border-left: 1px solid var(--line); }
.detail-hero__identity .status-badge { width: max-content; }.detail-hero__identity h3 { max-width: 480px; overflow: hidden; font-size: 18px; text-overflow: ellipsis; }.detail-hero__identity p { color: var(--muted); font-size: 10px; }
.detail-kpis { display: grid; grid-template-columns: repeat(2, 1fr); }
.detail-kpis > div { display: grid; align-content: center; gap: 4px; padding: 17px 21px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }.detail-kpis > div:nth-child(n+3) { border-bottom: 0; }.detail-kpis dt { color: var(--soft); font-size: 8px; }.detail-kpis dd { font: 700 14px var(--mono); }
.detail-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.detail-card { overflow: hidden; }.detail-card .panel__header { padding-block: 16px; }
.definition-list { padding: 5px 20px 18px; }.definition-list > div { display: grid; grid-template-columns: minmax(120px, .7fr) 1.3fr; gap: 15px; padding: 10px 0; border-bottom: 1px solid var(--line); }.definition-list > div:last-child { border-bottom: 0; }.definition-list dt { color: var(--soft); font-size: 9px; }.definition-list dd { overflow-wrap: anywhere; font-size: 10px; font-weight: 700; }
.compact-list { padding: 10px 20px 20px; }.compact-list > div { display: flex; align-items: center; gap: 10px; min-height: 50px; border-bottom: 1px solid var(--line); }.compact-list > div > span:nth-child(2) { display: grid; }.compact-list strong { font-size: 10px; }.compact-list small { color: var(--soft); font-size: 8px; }.compact-list a { margin-right: auto; color: var(--teal); font-size: 9px; }.compact-list__dot { width: 7px; height: 7px; background: var(--soft); border-radius: 50%; }.compact-list__dot.is-active { background: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.action-strip { display: flex; gap: 8px; padding: 16px 20px; border-top: 1px solid var(--line); }
.connection-test { display: block; margin-bottom: 14px; overflow: hidden; scroll-margin-top: 96px; transition: border-color .2s, box-shadow .2s; }
.connection-test:target { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(14,170,155,.09), var(--shadow); }
.connection-test__rail { min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 8px 22px; color: #fff; background: var(--ink); border-bottom: 3px solid var(--signal); }
.connection-test__rail span { color: var(--signal); font: 900 10px var(--mono); letter-spacing: .16em; }
.connection-test__rail i { width: 8px; height: 8px; background: var(--signal); border-radius: 50%; box-shadow: 0 0 0 6px rgba(201,242,75,.1); animation: beacon 2s infinite; }
.connection-test__rail small { color: #8fa0a2; font: 8px var(--mono); letter-spacing: .12em; }
.connection-test__body { min-width: 0; }
.connection-test__header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .55fr); gap: 28px; align-items: center; padding: 25px 26px 20px; border-bottom: 1px solid var(--line); }
.connection-test__header h3 { margin: 3px 0 5px; font-size: 18px; }
.connection-test__header p:last-child { max-width: 720px; color: var(--muted); font-size: 10px; }
.connection-test__endpoint { overflow: hidden; padding: 12px 14px; color: #c2cecf; background: var(--ink-2); border-right: 3px solid var(--signal); border-radius: 3px; font: 9px var(--mono); text-overflow: ellipsis; white-space: nowrap; box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
.connection-test__form { padding: 22px 26px 0; background: linear-gradient(180deg, #faf9f5 0, var(--surface) 100%); }
.connection-test__fields { display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 15px; }
.connection-test__fields .form-field { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.connection-test__fields .form-field input { background: #f8f7f2; font-family: var(--mono); }
.connection-test__footer { display: flex; align-items: center; gap: 18px; margin-top: 19px; padding: 16px 0 18px; border-top: 1px solid var(--line); }
.connection-test__warning { display: grid; margin-left: auto; padding-right: 13px; border-right: 3px solid var(--amber); }
.connection-test__warning strong { color: #7b5411; font-size: 10px; }
.connection-test__warning span { color: var(--soft); font-size: 8px; }
.incident-banner { display: flex; gap: 14px; margin-bottom: 14px; padding: 14px 18px; color: #7d2b27; background: var(--red-soft); border-right: 4px solid var(--red); }.incident-banner--warning { color: #7b5411; background: var(--amber-soft); border-color: var(--amber); }.incident-banner strong { min-width: 130px; }.incident-banner p { font-size: 10px; }
.raw-record { max-height: 160px; margin: 0 20px 20px; padding: 13px; overflow: auto; color: #d5e0e1; background: var(--ink); border-radius: 3px; font: 9px/1.7 var(--mono); white-space: pre-wrap; }
.response-excerpt { max-width: 420px; display: block; overflow: hidden; color: var(--soft); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.table-actions { display: flex; align-items: center; gap: 10px; }.table-actions a, .table-actions button { color: var(--teal); background: none; border: 0; font-size: 9px; }.table-actions button { color: var(--red); }
.summary-ribbon--deliveries { grid-template-columns: repeat(5, 1fr); }.summary-ribbon--deliveries > div { grid-template-columns: 1fr; }.summary-ribbon--deliveries strong { grid-column: 1; }
.success-text { color: var(--teal) !important; }
.status-badge--retry_scheduled, .status-badge--retry-scheduled { color: #9a6411; background: var(--amber-soft); border-color: #efd9a6; }.status-badge--dead_letter, .status-badge--dead-letter, .status-badge--cancelled, .status-badge--worker_lost { color: #a63a33; background: var(--red-soft); border-color: #efc5c1; }.status-badge--sending { color: #315c80; background: #e7f1f8; border-color: #c5dce9; }.status-badge--disabled { color: #657174; background: #eceeeb; border-color: #d5dad6; }

/* Real metrics */
.segmented-control a { padding: 5px 8px; color: var(--muted); border-radius: 2px; font-size: 9px; }.segmented-control a.is-active { color: #fff; background: var(--ink); }
.real-bar-chart { height: 245px; display: flex; align-items: end; gap: clamp(2px, .5vw, 7px); padding: 28px 22px 14px; direction: ltr; background-image: linear-gradient(to bottom, transparent 24%, var(--line) 25%, transparent 25%, transparent 49%, var(--line) 50%, transparent 50%, transparent 74%, var(--line) 75%, transparent 75%); }
.real-bar-chart__column { height: 100%; flex: 1; display: grid; grid-template-rows: 18px 1fr 18px; align-items: end; justify-items: center; min-width: 4px; }.real-bar-chart__column i { width: min(100%, 20px); height: max(2px, var(--bar-height)); display: block; background: linear-gradient(to top, var(--teal), #49c7b9); border-radius: 2px 2px 0 0; transition: height .35s ease; }.real-bar-chart__column:hover i { background: var(--signal-dark); }.real-bar-chart__value { opacity: 0; font: 7px var(--mono); transition: opacity .15s; }.real-bar-chart__column:hover .real-bar-chart__value { opacity: 1; }.real-bar-chart__column small { color: var(--soft); font: 7px var(--mono); }
.health-dot--bad { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }.live-chip--warning { color: var(--red); background: var(--red-soft); }.metric-card__value--small { font-size: 20px; }

/* Health, alerts, audit */
.health-console { display: grid; grid-template-columns: 260px 1fr; margin-bottom: 14px; overflow: hidden; }.health-console__score { display: grid; align-content: center; padding: 28px; color: #fff; background: var(--ink); }.health-console__score.is-degraded { background: #4a2622; }.health-console__score small { color: var(--signal); font: 8px var(--mono); }.health-console__score strong { font: 800 54px var(--mono); }.health-console__score strong span { font-size: 17px; }.health-console__score p { color: #9eadaf; font-size: 9px; }.health-console__components { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }.health-console__components article { display: flex; align-items: flex-start; gap: 12px; padding: 25px; border-left: 1px solid var(--line); }.health-console__components small { color: var(--soft); font: 8px var(--mono); }.health-console__components strong { display: block; margin-top: 3px; font-size: 13px; }.health-console__components p { margin-top: 4px; color: var(--muted); font-size: 8px; }.health-checked { margin-top: 12px; color: var(--soft); font-size: 9px; }.health-checked a { color: var(--teal); }
.subnav { width: max-content; display: flex; gap: 3px; margin-bottom: 14px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; }.subnav a { padding: 8px 13px; color: var(--muted); font-size: 9px; }.subnav a.is-active { color: #fff; background: var(--ink); border-radius: 2px; }
.alert-list { display: grid; gap: 10px; }.alert-row { position: relative; display: grid; grid-template-columns: 5px 1fr auto; gap: 17px; align-items: center; padding: 18px; overflow: hidden; }.alert-row__signal { align-self: stretch; background: var(--soft); border-radius: 3px; }.alert-row--warning .alert-row__signal { background: var(--amber); }.alert-row--critical .alert-row__signal { background: var(--red); }.alert-row h3 { margin: 2px 0; font-size: 14px; }.alert-row p:not(.section-kicker) { color: var(--muted); font-size: 10px; }.alert-row time { color: var(--soft); font-size: 8px; }.alert-row__actions { display: flex; gap: 7px; }
.audit-diff summary { color: var(--teal); cursor: pointer; font-size: 9px; }.audit-diff > div { position: absolute; z-index: 12; left: 25px; width: min(580px, 80vw); padding: 15px; color: #dbe4e5; background: var(--ink); box-shadow: var(--shadow); }.audit-diff pre { max-height: 130px; margin: 4px 0 10px; overflow: auto; font: 8px/1.5 var(--mono); white-space: pre-wrap; }
.auth-card { width: min(92vw, 520px); display: grid; gap: 18px; margin: 9vh auto; padding: 40px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }.auth-card h1 { font-size: 32px; }.auth-card > p:not(.section-kicker) { color: var(--muted); font-size: 11px; }
.auth-card--totp { max-width: 440px; }.auth-card--totp .form-field input { text-align: center; font: 700 26px var(--mono); letter-spacing: .18em; }
.security-state { margin-bottom: 16px; padding: 15px; background: var(--surface-2); border-right: 3px solid var(--soft); }.security-state--enabled { background: var(--teal-soft); border-color: var(--teal); }.security-state strong { font-size: 13px; }.security-state p { margin-top: 4px; color: var(--muted); font-size: 9px; }
.inline-security-form { display: grid; gap: 8px; }.inline-security-form label { font-size: 9px; font-weight: 700; }.inline-security-form input { min-height: 43px; padding: 9px 11px; background: #f8f7f2; border: 1px solid var(--line); border-radius: 3px; }
.two-factor-setup { max-width: 960px; margin-inline: auto; padding: 0; overflow: hidden; }.two-factor-setup__grid { display: grid; grid-template-columns: minmax(320px, .82fr) minmax(390px, 1.18fr); }.two-factor-setup ol { display: grid; align-content: center; gap: 18px; padding: 30px; }.two-factor-setup li { display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }.two-factor-setup li:last-child { padding-bottom: 0; border-bottom: 0; }.two-factor-setup li > span { width: 35px; height: 35px; display: grid; place-items: center; color: var(--signal); background: var(--ink); border-radius: 50%; font: 800 9px var(--mono); }.two-factor-setup strong { display: block; margin-bottom: 4px; }.two-factor-setup p { color: var(--muted); font-size: 10px; }.two-factor-setup code { display: block; width: max-content; max-width: 100%; margin: 8px 0; padding: 10px 13px; overflow-wrap: anywhere; color: var(--signal); background: var(--ink); font: 12px var(--mono); }.two-factor-setup details { font-size: 9px; }.two-factor-setup details summary { color: var(--teal); cursor: pointer; }.two-factor-setup pre { max-width: 100%; margin-top: 7px; padding: 10px; overflow: auto; background: var(--surface-2); font: 8px var(--mono); }
.totp-qr-card { position: relative; min-height: 570px; display: grid; align-content: center; justify-items: center; gap: 18px; margin: 0; padding: 35px; overflow: hidden; color: #fff; background-color: var(--ink); background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 24px 24px; }.totp-qr-card::after { content: ""; position: absolute; width: 250px; height: 250px; left: -120px; bottom: -120px; border: 1px solid rgba(201,242,75,.22); border-radius: 50%; box-shadow: 0 0 0 45px rgba(201,242,75,.025), 0 0 0 90px rgba(201,242,75,.018); }.totp-qr-card__heading { position: relative; z-index: 1; text-align: center; }.totp-qr-card__heading span { display: block; margin-bottom: 4px; color: var(--signal); font: 8px var(--mono); letter-spacing: .16em; }.totp-qr-card__heading strong { font-size: 18px; }.totp-qr-card__frame { position: relative; z-index: 1; width: 292px; height: 292px; display: grid; place-items: center; padding: 14px; background: #fff; border-radius: 6px; box-shadow: 0 20px 50px rgba(0,0,0,.28); }.totp-qr-card__frame::before, .totp-qr-card__frame::after, .totp-qr-card__frame i::before, .totp-qr-card__frame i::after { content: ""; position: absolute; width: 22px; height: 22px; border-color: var(--signal); border-style: solid; }.totp-qr-card__frame::before { top: -7px; right: -7px; border-width: 2px 2px 0 0; }.totp-qr-card__frame::after { bottom: -7px; right: -7px; border-width: 0 2px 2px 0; }.totp-qr-card__frame i::before { top: -7px; left: -7px; border-width: 2px 0 0 2px; }.totp-qr-card__frame i::after { bottom: -7px; left: -7px; border-width: 0 0 2px 2px; }.totp-qr-card__frame img { width: 264px; height: 264px; display: block; image-rendering: pixelated; }.totp-qr-card figcaption { position: relative; z-index: 1; max-width: 290px; color: #91a2a4; text-align: center; font-size: 9px; line-height: 1.8; }
.recovery-sheet { max-width: 650px; margin-inline: auto; padding: 28px; }.recovery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 18px; direction: ltr; }.recovery-grid code { padding: 12px; color: var(--signal); background: var(--ink); text-align: center; font: 12px var(--mono); }.recovery-sheet > p { margin-bottom: 18px; color: var(--muted); font-size: 10px; }

/* Login */
.login-page { min-height: 100vh; background: var(--surface); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(430px, .9fr) minmax(560px, 1.1fr); }
.login-stage { position: relative; min-height: 100vh; display: flex; flex-direction: column; padding: clamp(25px, 4vw, 55px); overflow: hidden; color: #fff; background: var(--ink); }
.login-stage::after { content: ""; position: absolute; width: 460px; height: 460px; left: -190px; bottom: -190px; border: 1px solid #344649; border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.012), 0 0 0 140px rgba(255,255,255,.009); }
.login-stage__grid { position: absolute; inset: 0; opacity: .22; background-image: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 55px 55px; mask-image: linear-gradient(130deg, #000, transparent 78%); }
.login-stage__topline { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; }.brand--login { padding: 0; }.secure-label { display: flex; align-items: center; gap: 7px; color: #91a0a2; font-size: 9px; }.secure-label svg { width: 14px; color: var(--signal); }
.login-stage__content { position: relative; z-index: 2; max-width: 600px; margin: auto 0; }.section-kicker--light { color: var(--signal); }.login-stage__content h1 { margin: 10px 0 20px; font-size: clamp(44px, 5.6vw, 78px); line-height: 1.08; letter-spacing: -.06em; }.login-stage__content h1 em { color: var(--signal); font-style: normal; }.login-stage__content > p:last-of-type { max-width: 500px; color: #93a3a5; font-size: 14px; }
.signal-board { max-width: 480px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin-top: 45px; padding: 14px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.1); border-radius: 4px; }.signal-board__channel { display: flex; align-items: center; gap: 9px; }.signal-board__pulse { width: 8px; height: 8px; background: var(--signal); border-radius: 50%; box-shadow: 0 0 0 6px rgba(201,242,75,.09); animation: beacon 2s infinite; }.signal-board__channel > span:last-child { display: grid; }.signal-board__channel small { color: #7e9295; font-size: 8px; }.signal-board__channel strong { font: 10px var(--mono); }.signal-board__line { height: 26px; display: flex; align-items: end; gap: 3px; overflow: hidden; direction: ltr; }.signal-board__line i { width: 3px; height: 30%; background: var(--teal); animation: signalBars 1.4s ease-in-out infinite; }.signal-board__line i:nth-child(2n) { height: 65%; animation-delay: -.3s; }.signal-board__line i:nth-child(3n) { height: 95%; animation-delay: -.7s; }.signal-board__status { display: grid; text-align: left; }.signal-board__status span { color: var(--signal); font: 8px var(--mono); }.signal-board__status b { font: 700 12px var(--mono); }
.login-stage__footer { position: relative; z-index: 2; display: flex; justify-content: space-between; color: #607376; font-size: 9px; }
.login-panel { display: grid; place-items: center; padding: clamp(28px, 6vw, 85px); background-color: var(--surface); background-image: radial-gradient(#c8cac4 .7px, transparent .7px); background-size: 18px 18px; }.login-panel__inner { width: min(100%, 420px); padding: 38px; background: rgba(255,254,250,.95); border: 1px solid var(--line); box-shadow: var(--shadow); }.login-panel__header { margin-bottom: 28px; }.login-panel__header h2 { margin: 4px 0 5px; font-size: 31px; letter-spacing: -.04em; }.login-panel__header > p:last-child { color: var(--muted); font-size: 11px; }.mobile-brand-mark { display: none; }
.form-alert { display: flex; gap: 9px; margin-bottom: 17px; padding: 10px; color: #94372f; background: var(--red-soft); border-right: 3px solid var(--red); }.form-alert > span { font-weight: 900; }.form-alert p { font-size: 10px; }
.login-form { display: grid; gap: 18px; }.field-group { display: grid; gap: 6px; }.field-group > label, .field-label-row label { font-size: 10px; font-weight: 750; }.field-label-row { display: flex; justify-content: space-between; }.field-label-row a { color: var(--teal); font-size: 9px; }.input-shell { position: relative; }.input-shell > svg { position: absolute; top: 50%; right: 13px; width: 18px; color: var(--soft); transform: translateY(-50%); }.input-shell input { width: 100%; height: 48px; padding: 0 41px 0 42px; background: #f8f7f2; border: 1px solid var(--line); border-radius: 3px; outline: 0; }.input-shell input:focus { background: #fff; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,170,155,.1); }.password-toggle { position: absolute; top: 50%; left: 8px; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; color: var(--muted); background: none; border: 0; transform: translateY(-50%); }.password-toggle svg { width: 17px; }
.check-control { width: max-content; display: flex; align-items: center; gap: 7px; color: var(--muted); cursor: pointer; font-size: 9px; }.check-control input { position: absolute; opacity: 0; }.check-control > span:first-of-type { width: 16px; height: 16px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line-dark); border-radius: 2px; }.check-control input:checked + span { background: var(--ink); border-color: var(--ink); }.check-control input:checked + span::after { content: "✓"; color: var(--signal); font-size: 10px; }.check-control input:focus-visible + span { outline: 3px solid rgba(14,170,155,.25); }
.button--login { width: 100%; min-height: 49px; justify-content: space-between; padding-inline: 18px; }.button--login svg { transform: rotate(180deg); }.login-security-note { display: flex; gap: 9px; margin-top: 28px; padding-top: 18px; color: var(--soft); border-top: 1px solid var(--line); }.login-security-note svg { width: 16px; flex: 0 0 16px; color: var(--teal); }.login-security-note p { font-size: 8px; }
.toast-region { position: fixed; z-index: 120; bottom: 20px; left: 20px; display: grid; gap: 8px; }.toast { min-width: 270px; max-width: 380px; display: flex; align-items: center; gap: 9px; padding: 12px 14px; color: #fff; background: var(--ink); border-right: 3px solid var(--signal); border-radius: 4px; box-shadow: var(--shadow); animation: toastIn .25s ease both; }.toast--error { border-color: var(--red); }.toast p { flex: 1; font-size: 10px; }.toast button { color: #fff; background: none; border: 0; }

@keyframes beacon { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes signalBars { 0%, 100% { transform: scaleY(.65); } 50% { transform: scaleY(1); } }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
.reveal-item { animation: reveal .42s ease both; }.reveal-item:nth-child(2) { animation-delay: .05s; }.reveal-item:nth-child(3) { animation-delay: .1s; }.reveal-item:nth-child(4) { animation-delay: .15s; }

@media (max-width: 1180px) {
  :root { --sidebar: 245px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid--lead { grid-template-columns: 1fr 310px; }
  .destination-grid { grid-template-columns: repeat(2, minmax(270px, 1fr)); }
  .filter-form, .filter-form--devices { grid-template-columns: minmax(220px, 1.2fr) repeat(2, minmax(120px, .6fr)) auto; }
  .filter-form .filter-field:nth-of-type(3) { display: none; }
  .device-overview { grid-template-columns: repeat(2, 1fr); }
  .login-shell { grid-template-columns: minmax(400px, .85fr) minmax(460px, 1.15fr); }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(105%); transition: transform .25s ease; box-shadow: -20px 0 50px rgba(0,0,0,.2); }
  body.sidebar-open { overflow: hidden; }.sidebar-open .sidebar { transform: none; }
  .sidebar-scrim { position: fixed; z-index: 55; inset: 0; width: 100%; height: 100%; background: rgba(10,18,20,.55); border: 0; backdrop-filter: blur(2px); }.sidebar-open .sidebar-scrim { display: block; }
  .main-panel { margin-right: 0; }.menu-toggle { display: grid; }.topbar { padding-inline: 18px; }
  .dashboard-grid--lead, .dashboard-grid--feed, .dashboard-grid--lower { grid-template-columns: 1fr; }
  .health-panel { min-height: 0; }.destination-grid { grid-template-columns: repeat(2, minmax(250px, 1fr)); }
  .login-shell { grid-template-columns: 1fr; }.login-stage { display: none; }.login-panel { min-height: 100vh; }.mobile-brand-mark { width: 38px; height: 38px; display: flex; align-items: flex-end; gap: 3px; margin-bottom: 24px; padding: 8px; background: var(--signal); }.mobile-brand-mark i { flex: 1; background: var(--ink); }.mobile-brand-mark i:nth-child(1) { height: 40%; }.mobile-brand-mark i:nth-child(2) { height: 90%; }.mobile-brand-mark i:nth-child(3) { height: 65%; }
  .detail-hero { grid-template-columns: 70px 1fr; }.detail-kpis { grid-column: 1 / -1; }.health-console { grid-template-columns: 1fr; }.health-console__components { grid-template-columns: repeat(3, 1fr); }
  .two-factor-setup__grid { grid-template-columns: 1fr; }.totp-qr-card { min-height: auto; padding-block: 38px; }
}

@media (max-width: 680px) {
  .topbar { height: 65px; }.context-title__eyebrow, .riyadh-clock, .user-menu__identity, .user-menu__chevron { display: none; }.avatar { width: 35px; height: 35px; }
  .page-frame { padding: 23px 14px 42px; }.page-intro { display: block; min-height: 0; }.page-intro__copy h2 { font-size: 25px; }.page-intro__actions { margin-top: 13px; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 8px; }.metric-card { min-height: 145px; padding: 15px; }.metric-card__value { font-size: 29px; }
  .throughput-summary { gap: 18px; overflow-x: auto; }.throughput-summary > div { min-width: 90px; }.ops-chart { height: 210px; }
  .device-pulse-grid { grid-template-columns: repeat(2, 1fr); row-gap: 22px; }.device-pulse-grid > div:nth-child(2) { border-left: 0; }
  .summary-ribbon { grid-template-columns: repeat(2, 1fr); }.summary-ribbon__live { grid-column: 1 / -1; min-height: 44px; }.summary-ribbon > div:nth-child(2) { border-left: 0; }
  .filter-form, .filter-form--devices { grid-template-columns: 1fr 1fr; }.filter-form__search { grid-column: 1 / -1; }.filter-form .filter-field { display: grid !important; }.filter-form .filter-field:nth-of-type(3) { grid-column: 1 / -1; }.filter-reset { align-self: center; }
  .data-panel__header { align-items: flex-start; }.table-legend { display: none; }.data-table th, .data-table td { padding-inline: 12px; }
  .device-overview { grid-template-columns: 1fr; }.destination-command-bar__summary { grid-template-columns: 50px repeat(4, minmax(95px, 1fr)); overflow-x: auto; }.destination-command-bar { overflow-x: auto; }.view-switch { display: none; }.destination-grid { grid-template-columns: 1fr; }.routing-note { align-items: flex-start; flex-wrap: wrap; }.routing-note .button { width: 100%; }
  .pagination { align-items: flex-start; flex-direction: column; }.login-panel { padding: 18px; }.login-panel__inner { padding: 28px 22px; }.login-panel__header h2 { font-size: 28px; }
  .form-grid, .detail-columns { grid-template-columns: 1fr; }.form-grid__wide { grid-column: auto; }.editor-card { padding: 16px; }.editor-actions { align-items: stretch; flex-direction: column; }.editor-actions > p { margin: 5px 0 0; }.detail-kpis { grid-template-columns: 1fr 1fr; }.health-console__components { grid-template-columns: 1fr; }.health-console__components article { border-left: 0; border-bottom: 1px solid var(--line); }.alert-row { grid-template-columns: 4px 1fr; }.alert-row__actions { grid-column: 2; flex-wrap: wrap; }.summary-ribbon--deliveries { grid-template-columns: 1fr 1fr; }.real-bar-chart { gap: 2px; padding-inline: 10px; }.real-bar-chart__column small { font-size: 6px; }
  .connection-test__rail { padding-inline: 16px; }.connection-test__header { grid-template-columns: 1fr; padding: 18px; }.connection-test__form { padding: 18px 18px 0; }.connection-test__fields { grid-template-columns: 1fr; }.connection-test__fields .form-field { padding: 12px; }.connection-test__footer { align-items: stretch; flex-direction: column; }.connection-test__warning { margin-left: 0; }.connection-test__footer .button { width: 100%; }
  .payload-configurator__lead, .payload-advanced__body { grid-template-columns: 1fr; }.payload-field-map { grid-template-columns: 1fr 1fr; }
  .two-factor-setup ol { padding: 22px 18px; }.totp-qr-card__frame { width: 260px; height: 260px; }.totp-qr-card__frame img { width: 232px; height: 232px; }
}

@media (max-width: 430px) {
  .metric-grid { grid-template-columns: 1fr; }.metric-card { min-height: 130px; }.metric-card__value { margin-block: 12px 8px; }
  .page-intro__actions .button { flex: 1; }.panel__header { padding: 17px; }.filter-form, .filter-form--devices { grid-template-columns: 1fr; }.filter-form__search, .filter-form .filter-field:nth-of-type(3) { grid-column: auto; }.filter-form .button--filter { width: 100%; }.summary-ribbon { grid-template-columns: 1fr; }.summary-ribbon > div { border-left: 0; border-bottom: 1px solid #2d3d40; }.summary-ribbon__live { grid-column: auto; }.destination-card { padding: 15px; }.destination-card__metrics > div { padding-inline: 7px; }
  .payload-field-map { grid-template-columns: 1fr; }
}

@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 {
  .sidebar, .topbar, .page-intro__actions, .filter-panel, .pagination { display: none !important; }.main-panel { margin: 0; }.page-frame { max-width: none; padding: 0; }.panel { box-shadow: none; }
}
.mapping-preview {
    border: 1px solid var(--line, #d9ddd8);
    background: #f6f7f2;
    padding: 1rem;
}

.mapping-preview > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .75rem;
}

.mapping-preview small { color: var(--muted, #68716d); }

.mapping-preview pre {
    margin: 0;
    max-height: 22rem;
    overflow: auto;
    white-space: pre-wrap;
    color: #d8f472;
    background: #101a1d;
    padding: 1rem;
    border-radius: .35rem;
    font-size: .78rem;
    line-height: 1.7;
}
