:root {
  --navy: #02236a;
  --navy-2: #0a4c9e;
  --blue: #0180e1;
  --orange: #fc7f07;
  --orange-ink: #c2410c;
  --bg: #02236a;
  --card: #ffffff;
  --line: #e3eaf3;
  --text: #172033;
  --muted: #5e6d82;
  --ok: #0e8f6e;
  --warn: #9a6700;
  --danger: #b42318;
  --info: #0a4c9e;
  --shadow: 0 10px 28px rgba(2, 24, 70, 0.16);
  --radius: 14px;
  --font-body: "Inter", sans-serif;
  --font-heading: "Plus Jakarta Sans", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: linear-gradient(118deg, #02236a 0%, #0a4c9e 52%, #0180e1 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand-name { font-family: var(--font-heading); font-weight: 700; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button, .btn, .nav a { font-weight: 600; }
.nav a { font-weight: 500; }
.metric, .call-number, .stat-value, .money-value, .phone-number { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.skip {
  position: absolute; left: 12px; top: -40px; background: var(--orange); color: white; padding: 8px 12px; z-index: 5;
}
.skip:focus { top: 12px; }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.shell { display: flex; min-height: 100vh; max-width: 100vw; background: transparent; }
.rail {
  width: 64px; flex: none; background: #021a52; color: white;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 0; height: 100vh; position: sticky; top: 0; z-index: 3;
}
.rail a {
  position: relative; width: 42px; height: 42px; display: grid; place-items: center;
  color: white; border-radius: 12px; text-decoration: none;
}
.rail a:hover, .rail a.is-current { background: rgba(255,255,255,0.22); text-decoration: none; }
.rail .nav-ico { width: 22px; height: 22px; }
.sidebar {
  width: 232px; background: rgba(2, 26, 82, 0.55); color: #f4f8ff; padding: 18px 12px 14px; flex: none;
  display: flex; flex-direction: column; gap: 8px;
  height: 100vh; position: sticky; top: 0; overflow: hidden; border-right: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
}
.shell.is-menu-hidden .sidebar { display: none; }
.role-name { padding: 2px 12px 8px; font-size: 15px; font-weight: 650; color: white; }
.nav { display: flex; flex-direction: column; gap: 2px; overflow: auto; flex: 1; padding-bottom: 8px; }
.nav-label {
  margin: 16px 12px 4px; font-size: 12px; font-weight: 650; letter-spacing: 0;
  text-transform: none; color: rgba(255,255,255,0.62);
}
.nav-label.is-section { margin-top: 14px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.9); text-decoration: none; padding: 8px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
}
.nav a:hover { background: rgba(255,255,255,0.1); text-decoration: none; }
.nav a.is-current { background: rgba(255,255,255,0.16); color: white; box-shadow: inset 3px 0 0 var(--orange); text-decoration: none; }
.nav-ico { width: 18px; height: 18px; flex: none; }
.sidebar .foot { margin-top: auto; color: rgba(255,255,255,0.62); font-size: 12px; padding: 0 8px; }
.menu-btn {
  background: transparent; color: white; border: 0; border-radius: 8px; padding: 6px;
  box-shadow: none; min-width: 36px; min-height: 36px;
}
.menu-btn:hover { background: rgba(255,255,255,0.14); filter: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-x: hidden; background: transparent; }
.topbar {
  display: flex; justify-content: flex-start; gap: 14px; align-items: center; flex-wrap: nowrap;
  min-height: 84px; padding: 8px 18px;
  background: linear-gradient(90deg, rgba(2, 35, 106, 0.94), rgba(1, 128, 225, 0.9));
  border-bottom: 1px solid rgba(255,255,255,0.16);
  position: sticky; top: 0; z-index: 2; color: white;
}
.topbar-start { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand { display: block; text-decoration: none; }
.brand img { height: 72px; width: auto; display: block; background: #fff; border-radius: 12px; padding: 0; }
.top-search { flex: 1 1 220px; min-width: 160px; max-width: 360px; margin: 0; }
.top-search input {
  width: 100%; margin: 0; min-height: 36px; border-radius: 999px; background: rgba(255,255,255,0.95);
  color: var(--navy); border: 0; padding: 8px 16px;
}
.top-search input::placeholder { color: #6d7f99; }
.who { display: flex; gap: 10px; align-items: center; flex-wrap: nowrap; justify-content: flex-end; min-width: 0; margin-left: auto; color: rgba(255,255,255,0.88); font-size: 12px; }
.who button, .user-chip { white-space: nowrap; }
.user-chip { display: flex; align-items: center; gap: 8px; color: white; text-decoration: none; font-weight: 600; font-size: 13px; }
.user-chip:hover { text-decoration: none; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--orange); color: white; font-size: 12px; font-weight: 700;
}
.switcher { display: flex; gap: 8px; align-items: center; }
.switcher label { margin: 0; font-size: 12px; color: rgba(255,255,255,0.88); }
.switcher select { width: 168px; margin: 0; padding: 7px 10px; background: white; color: var(--navy); }
.topbar .btn.ghost, .topbar button.ghost { background: rgba(255,255,255,0.14); color: white; border-color: rgba(255,255,255,0.35); }
.content { padding: 18px 22px 40px; color: #f4f8ff; }
.content a { color: white; }
.card a, .hero a, .stat-grid a, .channel-card a, .flash a, .login-card a { color: var(--blue); }
.support-banner, .notice {
  margin: 16px 28px 0; padding: 12px 14px; border-radius: 12px; background: #fff6ee; color: var(--orange-ink); border: 1px solid #ffd7bd;
}
.notice { margin: 0 0 16px; }

.grid { display: grid; gap: 16px; }
.grid-2 > :only-child { grid-column: 1 / -1; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.section-tabs { display: flex; gap: 4px; overflow-x: auto; margin: 0 0 16px; border-bottom: 1px solid rgba(255,255,255,0.22); }
.section-tabs a { padding: 8px 12px; font-size: 12px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(255,255,255,0.78); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.section-tabs a.is-current, .section-tabs a:hover { color: white; text-decoration: none; border-bottom-color: var(--orange); }
.channel-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.channel-card { background: white; color: var(--text); border: 1px solid rgba(255,255,255,0.45); border-radius: 16px; padding: 12px 14px 10px; box-shadow: var(--shadow); }
.channel-card strong { display: block; margin-top: 2px; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; color: var(--navy); font-variant-numeric: tabular-nums; }
.track { height: 6px; background: #e7eef7; border-radius: 99px; margin: 10px 0 8px; overflow: hidden; }
.track span { display: block; height: 100%; border-radius: 99px; }
.chart-card { overflow: hidden; }
.chart-svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; color: var(--muted); font-size: 12px; }
.legend i, .legend-list i { width: 10px; height: 10px; border-radius: 99px; display: inline-block; margin-right: 6px; }
.legend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.legend-list strong { font-variant-numeric: tabular-nums; }
.donut-wrap { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 8px; align-items: center; }
.donut { max-width: 168px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  background: var(--card); color: var(--text); border: 1px solid rgba(255,255,255,0.45); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px;
  container-type: inline-size;
}
.card h2, .card h3 { margin: 0 0 8px; }
.metric { font-size: 32px; font-weight: 650; letter-spacing: -0.03em; color: var(--navy); }
.metric-card { border-top: 3px solid var(--orange); }
.hero {
  display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; flex-wrap: wrap;
  color: var(--text);
  background: linear-gradient(120deg, #ffffff 0%, #f3f8ff 62%, #fff4ea 100%);
  border: 1px solid rgba(255,255,255,0.5); border-radius: 16px; padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.hero h2 { margin: 0 0 6px; font-size: 30px; letter-spacing: -0.03em; color: var(--navy); }
.hero p { margin: 0; max-width: 560px; }
.eyebrow { margin: 0 0 6px; color: var(--orange-ink); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.hero-meta { display: grid; gap: 6px; color: var(--muted); font-size: 13px; text-align: right; }
.launcher { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.launch {
  display: flex; flex-direction: column; gap: 4px; min-height: 78px; padding: 14px;
  border-radius: 14px; border: 1px solid var(--line); background: #f7faff; color: var(--navy); text-decoration: none;
}
.launch:hover { border-color: var(--orange); background: white; text-decoration: none; box-shadow: var(--shadow); }
.launch strong { font-size: 14px; }
.launch span { color: var(--muted); font-size: 12px; font-weight: 500; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; color: var(--muted); }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
form.row { flex: 1 1 240px; max-width: 100%; justify-content: flex-start; }
form.row select { width: 160px; max-width: 100%; margin: 0; flex: 0 0 auto; }

.btn, button, .button {
  background: var(--orange); color: white; border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 600; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:hover, button:hover { filter: brightness(0.96); text-decoration: none; }
.btn.secondary, button.secondary { background: var(--navy); }
.btn.ghost, button.ghost { background: white; color: var(--navy); border: 1px solid var(--line); }
.btn.danger, button.danger { background: var(--danger); }
.btn.ok, button.ok { background: var(--ok); }
.btn.small, button.small { padding: 6px 10px; font-size: 13px; }

label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
input[type="checkbox"] { width: auto; margin-right: 8px; }
input, select, textarea {
  width: 100%; background: white; border: 1px solid #cfd9e6; border-radius: 10px; padding: 7px 10px; margin-bottom: 8px;
}
textarea { min-height: 72px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 14px; max-width: 720px; }
.card form.stack { display: block; }
.card form:not(.row):not(.keypad):not(.spread):not(.stack) {
  display: grid;
  grid-template-columns: minmax(96px, 150px) minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  width: min(560px, 100%);
}
.card form:not(.row):not(.keypad):not(.spread) > label { margin: 0; }
.card form:not(.row):not(.keypad):not(.spread) > input:not([type="hidden"]),
.card form:not(.row):not(.keypad):not(.spread) > select,
.card form:not(.row):not(.keypad):not(.spread) > textarea { margin: 0; }
.card form:not(.row):not(.keypad):not(.spread) > div,
.card form:not(.row):not(.keypad):not(.spread) > p,
.card form:not(.row):not(.keypad):not(.spread) > h3,
.card form:not(.row):not(.keypad):not(.spread) > .checks,
.card form:not(.row):not(.keypad):not(.spread) > button,
.card form:not(.row):not(.keypad):not(.spread) > .btn {
  grid-column: 1 / -1;
}
.card form:not(.row):not(.keypad):not(.spread) > button,
.card form:not(.row):not(.keypad):not(.spread) > .btn { width: auto; justify-self: start; }
@container (min-width: 760px) {
  .card form:not(.row):not(.keypad):not(.spread) {
    grid-template-columns: minmax(92px, 132px) minmax(140px, 1fr) minmax(92px, 132px) minmax(140px, 1fr);
    width: min(880px, 100%);
  }
}
.checks { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.checks label { font-weight: 500; display: flex; gap: 6px; align-items: center; }
.checks input { width: auto; margin: 0; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td {
  text-align: left; padding: 6px 12px; border-bottom: 1px solid var(--line);
  vertical-align: middle; line-height: 1.35; width: 1%; white-space: nowrap;
}
th:last-child, td:last-child { width: auto; white-space: normal; }
th { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); background: #f3f7fc; }
tbody tr:hover td { background: #f5f9ff; }
.table-wrap { overflow-x: auto; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 650;
  background: #eef3f9; color: var(--navy);
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: currentColor; }
.pill-available, .pill-active, .pill-running, .pill-ok, .pill-completed, .pill-processed { color: var(--ok); background: #e8f7f2; }
.pill-busy, .pill-ringing, .pill-hold, .pill-paused { color: var(--info); background: #e8f3fc; }
.pill-acw, .pill-break, .pill-queued, .pill-ivr, .pill-offered, .pill-draft { color: var(--warn); background: #fff6df; }
.pill-offline, .pill-abandoned, .pill-missed, .pill-suspended, .pill-dead_letter, .pill-failed { color: var(--danger); background: #fdecec; }
.pill-planned { color: var(--warn); background: #fff6df; }
.pill-available.pill-feature { color: var(--ok); background: #e8f7f2; }
.pill-in.progress, .pill-in { color: var(--info); }

.flashes { display: grid; gap: 8px; margin-bottom: 16px; }
.flash { padding: 12px 14px; border-radius: 12px; background: white; color: var(--text); border: 1px solid var(--line); }
.flash-success { border-color: #b7e4d4; background: #f3fbf8; }
.flash-error { border-color: #f3c1bd; background: #fff6f5; }
.flash-info { border-color: #c9dff6; background: #f5f9fd; }

.pager { display: flex; gap: 6px; margin-top: 12px; }
.pager a { padding: 6px 10px; border-radius: 8px; background: white; border: 1px solid var(--line); text-decoration: none; color: var(--navy); }
.pager a.is-current { background: var(--navy); color: white; }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  background: linear-gradient(118deg, #02236a 0%, #0a4c9e 52%, #0180e1 100%);
}
.login-hero {
  position: relative;
  overflow: hidden;
  color: white;
  background: linear-gradient(165deg, #021a52 0%, #02236a 42%, #0a4c9e 100%);
  padding: 32px 0 28px 36px;
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(200px, 0.85fr);
  align-items: end;
  min-height: 100vh;
}
.login-hero-photo {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 100%;
  max-height: 100vh;
  object-fit: cover;
  object-position: center 18%;
  justify-self: end;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 14%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 14%);
}
.login-hero-copy { grid-column: 1; grid-row: 1; position: relative; z-index: 1; align-self: center; padding-bottom: 36px; }
.login-hero .login-logo { width: min(210px, 72%); height: auto; display: block; background: #fff; border-radius: 18px; }
.login-card .login-logo { width: min(168px, 78%); height: auto; display: block; margin: 0 auto 8px; }
.login-hero h1 {
  margin: 28px 0 10px;
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  max-width: 420px;
}
.login-hero h1 span { display: block; color: #ff8a1e; }
.login-lead { margin: 0 0 22px; max-width: 360px; font-size: 15px; line-height: 1.45; color: rgba(255,255,255,0.92); }
.login-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.login-features li { display: flex; gap: 12px; align-items: center; }
.login-features strong { display: block; font-size: 15px; }
.login-features small { display: block; color: rgba(255,255,255,0.82); font-size: 12px; }
.login-badge {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; color: white;
}
.login-badge-orange { background: #ff7a1a; }
.login-badge-blue { background: #2f80ed; }
.login-badge-purple { background: #7c4dff; }
.login-badge-green { background: #22a06b; }
.login-signoff {
  position: absolute; left: 36px; bottom: 22px; z-index: 1;
  font-family: "Apple Chancery", "Segoe Script", cursive; font-size: 28px;
}
.login-stage { display: flex; align-items: center; justify-content: center; padding: 28px 24px 18px; }
.login-shell > .login-stage {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.login-shell > .login-stage > div { width: min(440px, 100%); }
.login-card {
  width: min(440px, 100%);
  background: white;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(7, 36, 86, 0.12);
  padding: 28px 28px 22px;
  text-align: center;
}
.login-card h2 { margin: 4px 0 4px; font-size: 28px; color: #12315f; }
.login-card .login-sub { margin: 0 0 18px; color: var(--muted); }
.login-card .field { position: relative; margin-bottom: 12px; text-align: left; }
.login-card .field-icon, .login-card .field-eye {
  position: absolute; top: 50%; transform: translateY(-50%); color: #7b8798; background: transparent; padding: 0; border-radius: 0;
  box-shadow: none;
}
.login-card .field-icon { left: 14px; display: grid; }
.login-card .field-eye { right: 8px; width: 36px; height: 36px; }
.login-card input {
  background: #f5f7fb; border: 1px solid #e4eaf3; border-radius: 12px; margin: 0;
  min-height: 48px; padding: 12px 44px;
}
.login-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 14px; font-size: 13px; }
.login-row label { margin: 0; font-weight: 500; display: flex; gap: 8px; align-items: center; }
.login-row input { width: auto; min-height: 0; padding: 0; margin: 0; }
.login-card .login-submit {
  width: 100%; border-radius: 12px; min-height: 48px; background: linear-gradient(90deg, #ff7a18, #ff5a00);
  font-size: 16px; box-shadow: 0 10px 20px rgba(255, 106, 0, 0.25);
}
.login-split { display: flex; align-items: center; gap: 10px; color: #8b97a8; font-size: 13px; margin: 16px 0; }
.login-split::before, .login-split::after { content: ""; height: 1px; background: #e6edf5; flex: 1; }
.login-sso {
  width: 100%; background: white; color: #1d4ed8; border: 1.5px solid #93c5fd; border-radius: 12px; min-height: 46px;
}
.login-secure { display: flex; justify-content: center; gap: 6px; align-items: center; color: #6b7788; font-size: 12px; margin: 14px 0 0; }
.login-copy { text-align: center; color: rgba(255,255,255,0.78); font-size: 12px; padding: 0 16px 18px; }
.login-shell .login-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  margin: 0;
  padding: 0 16px;
}
.demo { margin-top: 14px; background: #f8fbff; border-radius: 12px; padding: 10px 12px; font-size: 12px; text-align: left; color: var(--text); }
.demo summary { cursor: pointer; font-weight: 600; }

.call-stage { min-height: 280px; }
[data-phone], [data-coach] { margin-bottom: 16px; }
[data-phone-state].is-live, [data-coach-state].is-live { color: var(--ok); font-weight: 600; }
.call-number { font-size: 34px; font-weight: 650; letter-spacing: -0.03em; margin: 8px 0; }
.state-dot { width: 10px; height: 10px; border-radius: 99px; display: inline-block; background: var(--muted); }
.workspace { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr); gap: 16px; }
.keypad { display: flex; gap: 6px; flex-wrap: wrap; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 48px; gap: 8px; align-items: center; font-size: 13px; }
.bar { height: 10px; background: #e7eef7; border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--blue); }
.hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.hub-card .stat, .chart-card .stat { display: block; font-size: 32px; font-variant-numeric: tabular-nums; color: var(--navy); }
.hub-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.inbox { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
.inbox-side { max-height: 760px; overflow: auto; }
.billing-tabs { display: flex; flex-wrap: nowrap; align-items: center; gap: 18px; margin: 4px 0 14px; overflow-x: auto; }
.billing-tabs a { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.78); text-decoration: none; line-height: 1.4; white-space: nowrap; }
.billing-tabs a.is-current { color: white; }
.money-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 14px; color: white; }
.money-bar form { display: flex; align-items: center; gap: 8px; margin: 0; }
.money-bar label, .money-bar span, .money-bar p { margin: 0; color: rgba(255,255,255,0.86); }
.money-bar input { width: 110px; margin: 0; background: white; color: var(--text); }
form.rate-line { gap: 8px; margin: 0; }
form.rate-line input { width: 120px; margin: 0; flex: 0 0 120px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin: 0 0 14px; }
.stat-grid article { background: var(--card); color: var(--text); border: 1px solid rgba(255,255,255,0.45); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 12px; }
.stat-grid p { margin: 0; }
.stat-grid strong { display: block; margin-top: 4px; font-size: 22px; letter-spacing: -0.03em; color: var(--navy); }
.content .card { overflow-x: auto; }
.inbox-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.inbox-tabs a { font-size: 13px; font-weight: 600; color: #5e6d82; text-decoration: none; }
.inbox-tabs a.is-current { color: #1570d6; }
.inbox-item { display: block; padding: 10px 4px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.inbox-item.is-current { background: #e7f2ff; border-radius: 8px; padding-left: 8px; }
.inbox-empty { min-height: 320px; display: grid; place-items: center; text-align: center; }
.flow-canvas { position: relative; min-height: 280px; margin-top: 12px; background: radial-gradient(#d5deea 1.2px, transparent 1.2px); background-size: 18px 18px; background-color: #f7f9fc; border: 1px solid var(--line); border-radius: 16px; overflow: auto; }
.flow-node { position: absolute; width: 200px; background: white; border: 2px solid #1e88e5; border-radius: 10px; padding: 8px 10px; box-shadow: var(--shadow); }
.flow-node p { margin: 6px 0 0; font-size: 12px; color: #5e6d82; }

.invoice-sheet { padding: 0; overflow: hidden; }
.content .invoice-sheet { overflow: hidden; }
.invoice-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; background: #0e2748; color: #fff; padding: 22px 28px 18px; }
.invoice-head img { width: 72px; height: 72px; background: #fff; border-radius: 8px; }
.invoice-kicker { margin: 0; letter-spacing: .14em; font-size: 11px; font-weight: 700; color: #f15a22; }
.invoice-head h2 { margin: 4px 0 2px; color: #fff; }
.invoice-head p { margin: 0; color: #d5deea; }
.invoice-id { text-align: right; }
.invoice-id strong { display: block; font-size: 20px; }
.invoice-rule { height: 8px; background: #f15a22; }
.invoice-body { padding: 22px 28px 28px; }
.invoice-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.invoice-meta div { background: #f5f7fa; border-radius: 10px; padding: 14px 16px; }
.invoice-meta span { display: block; font-size: 11px; letter-spacing: .12em; font-weight: 700; color: #0e2748; }
.invoice-meta strong { display: block; margin-top: 6px; }
.invoice-sheet table { width: 100%; }
.invoice-sheet th, .invoice-sheet td { width: auto; white-space: normal; }
.invoice-sheet thead th { background: #0e2748; color: #fff; }
.invoice-totals { clear: both; display: block; margin: 16px 0 0 auto; width: min(340px, 100%); background: #f5f7fa; border-radius: 10px; padding: 12px 16px; }
.invoice-totals p { display: flex; justify-content: space-between; gap: 16px; margin: 6px 0; }
.invoice-totals .due { border-top: 2px solid #f15a22; padding-top: 8px; font-size: 16px; }
.invoice-pay { margin-top: 18px; border: 1px solid #d5deea; border-radius: 10px; overflow: hidden; }
.invoice-pay h3 { margin: 0; background: #0e2748; color: #fff; padding: 10px 16px; font-size: 13px; letter-spacing: .08em; }
.invoice-pay table { margin: 0; }
.invoice-pay th { width: 180px; text-align: left; color: #5e6d82; font-weight: 600; }
.invoice-note { margin: 14px 0 0; color: #5e6d82; font-size: 12px; }

@media (max-width: 980px) {
  .shell { flex-direction: column; }
  .rail { width: 100%; height: auto; position: static; flex-direction: row; overflow-x: auto; padding: 8px; }
  .sidebar { width: 100%; height: auto; position: static; }
  .nav { max-height: 280px; }
  .sidebar .foot { display: none; }
  .top-search { display: none; }
  .brand img { height: 56px; }
  .grid-4, .grid-3, .workspace, .form-grid, .grid-2, .launcher, .login-shell, .channel-grid, .hub-grid, .inbox { grid-template-columns: 1fr; }
  .hero-meta { text-align: left; }
  .login-shell > .login-stage { position: relative; height: auto; min-height: auto; padding: 28px 22px 48px; }
  .login-shell .login-copy { position: static; margin-top: 16px; }
  .login-hero { min-height: auto; padding: 28px 22px 32px; }
  .login-hero-photo, .login-signoff { display: none; }
  .login-hero h1 { font-size: 32px; }
  .invoice-sheet { padding: 0; }
  .invoice-head, .invoice-meta { grid-template-columns: 1fr; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .who { flex-wrap: wrap; justify-content: flex-start; margin-left: 0; width: 100%; }
  .switcher { flex-wrap: wrap; }
  .switcher select { width: min(168px, 100%); }
}

.pwa-sheet {
  position: fixed; z-index: 40; left: 50%; bottom: 22px; transform: translateX(-50%);
  width: min(640px, calc(100% - 28px));
  display: grid; grid-template-columns: 168px 1fr; align-items: stretch;
  background: white; color: var(--text); border-radius: 24px;
  box-shadow: 0 24px 60px rgba(2, 24, 70, 0.35); overflow: hidden;
}
.pwa-sheet[hidden] { display: none; }
.pwa-graphic {
  background: linear-gradient(165deg, #02236a 0%, #0a4c9e 70%, #0180e1 100%);
  color: white; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 18px 12px;
}
.pwa-graphic p { margin: 0; font-family: var(--font-heading); font-weight: 700; font-size: 13px; letter-spacing: 0.02em; }
.pwa-home { display: grid; grid-template-columns: repeat(3, 36px); gap: 10px; }
.pwa-home span {
  width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,0.16);
}
.pwa-home .is-app {
  background: black; display: grid; place-items: center; box-shadow: 0 0 0 2px #fc7f07;
}
.pwa-home img { width: 32px; height: 32px; border-radius: 8px; }
.pwa-body { padding: 18px 48px 18px 18px; }
.pwa-kicker { margin: 0 0 4px; color: var(--orange-ink); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.pwa-body h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.03em; color: var(--navy); }
.pwa-body p { margin: 0; color: var(--muted); }
.pwa-ios { margin: 10px 0 0; padding-left: 18px; color: var(--text); }
.pwa-ios li { margin: 4px 0; }
.pwa-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pwa-close {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; padding: 0;
  border-radius: 50%; background: #f4f7fb; color: var(--navy); font-size: 20px; line-height: 1;
}
@media (max-width: 980px) {
  .pwa-sheet { left: 12px; right: 12px; bottom: 12px; width: auto; transform: none; grid-template-columns: 1fr; }
  .pwa-graphic { border-radius: 22px 22px 0 0; }
}
