/* AWH Remote: calm professional device management, APXS 1.2. */
:root {
  color-scheme: light dark;
  --bg: #f7f8fb; --paper: #fff; --sidebar: #f0f3f8;
  --ink: #192538; --muted: #59697c; --line: #dce3ec;
  --accent: #1757b5; --accent-hover: #104897;
  --on-accent: #fff; --soft: #e4edf9; --soft-ink: #17477f;
  --connection: #142c4b; --connection-ink: #fff; --connection-muted: #d0dff1;
  --focus: #2474d5; --radius: 14px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.65; }
a { color: var(--accent); text-underline-offset: 3px; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button { font: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 3.4vw, 2.45rem); line-height: 1.35; font-weight: 750; letter-spacing: -.025em; }
h2 { font-size: 1.16rem; line-height: 1.5; font-weight: 700; }
h3 { font-size: 1rem; line-height: 1.5; font-weight: 700; }
p, a, small { overflow-wrap: anywhere; }
svg { display: block; flex-shrink: 0; }
.skip { position: absolute; top: -100px; left: 16px; padding: 12px; background: var(--paper); z-index: 20; }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }

/* Persistent desktop shell; compact fully visible navigation on phones. */
.shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; overflow-y: auto; background: var(--sidebar); border-right: 1px solid var(--line); padding: 28px 17px 18px; display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; padding: 5px 7px; }
.brand img { border-radius: 10px; flex-shrink: 0; }
.brand strong { display: block; font-size: 1.15rem; font-weight: 760; line-height: 1.4; letter-spacing: -.025em; }
.brand small { display: block; font-size: .72rem; color: var(--muted); }
.workspace { display: grid; gap: 3px; border-bottom: 1px solid var(--line); padding: 0 10px 19px; }
.workspace strong { font-size: .95rem; }
.workspace small { color: var(--muted); font-size: .76rem; }
.eyebrow { font-size: .69rem; letter-spacing: .095em; font-weight: 730; color: var(--muted); }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a { color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 620; border: 1px solid transparent; border-radius: 9px; padding: 9px 11px; display: flex; align-items: center; gap: 12px; min-height: 46px; }
.sidebar nav a:hover { background: var(--paper); color: var(--ink); }
.sidebar nav a[aria-current="page"] { color: var(--soft-ink); background: var(--soft); border-color: transparent; font-weight: 750; }
.sidebar nav .nav-icon { width: 20px; height: 20px; }
.sidebar-foot { margin-top: auto; color: var(--muted); border-top: 1px solid var(--line); padding: 14px 7px 0; font-size: .74rem; display: flex; align-items: center; gap: 8px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }

main { width: 100%; max-width: 1170px; min-width: 0; padding: 24px clamp(24px, 4vw, 58px) 26px; margin: 0 auto; align-self: start; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 19px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.topbar > div { min-width: 0; display: grid; gap: 1px; }
.top-domain { color: var(--ink); font-size: .91rem; font-weight: 680; overflow-wrap: anywhere; }
.pill { color: var(--muted); font-size: .76rem; font-weight: 620; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; background: var(--paper); max-width: 50%; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 6px; }
.notice { display: grid; grid-template-columns: 21px minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); margin-bottom: 28px; }
.notice-mark { display: grid; place-items: center; border: 1.5px solid var(--muted); color: var(--muted); width: 18px; height: 18px; margin-top: 4px; border-radius: 50%; font: 700 12px/1 system-ui, sans-serif; }
.notice strong { font-size: .87rem; font-weight: 700; }
.notice p { color: var(--muted); font-size: .78rem; line-height: 1.6; }
.notice a { font-size: .8rem; font-weight: 650; text-decoration: none; min-height: 44px; display: flex; align-items: center; }
.notice a:hover { text-decoration: underline; }

.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 22px; }
.page-heading .eyebrow { margin-bottom: 5px; }
.intro { color: var(--muted); margin: 9px 0 22px; font-size: .95rem; }
.page-heading .intro { margin: 6px 0 0; }
.connection-panel { background: var(--connection); color: var(--connection-ink); border-radius: 17px; padding: clamp(20px, 3vw, 32px); }
.connection-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.connection-heading > div { min-width: 0; }
.connection-heading .eyebrow { color: var(--connection-muted); }
.connection-heading h2 { margin-top: 5px; font-size: clamp(1.22rem, 2.4vw, 1.58rem); }
.connection-heading p { color: var(--connection-muted); font-size: .92rem; margin-top: 8px; max-width: 57ch; }
.connection-icon { display: grid; place-items: center; width: 58px; height: 58px; flex: 0 0 58px; border: 1px solid #7890ad; border-radius: 15px; color: #e1eeff; }
.connection-icon svg { width: 32px; height: 32px; }
.connection-panel .primary { color: #142c4b; background: #fff; }
.connection-panel .primary:hover { background: #e6edf7; }
.connection-panel .secondary { color: #fff; background: transparent; border-color: #7890ad; }
.connection-panel .secondary:hover { background: #254263; }
.connection-panel .button:focus-visible { outline-color: #b7d5ff; }
.connection-note { font-size: .76rem; color: var(--connection-muted); margin-top: 14px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 15px; border: 1px solid transparent; border-radius: 9px; text-align: center; text-decoration: none; font-weight: 680; font-size: .91rem; cursor: pointer; }
.primary { background: var(--accent); color: var(--on-accent); }
.primary:hover { background: var(--accent-hover); }
.secondary { background: var(--paper); color: var(--accent); border-color: var(--line); }
.secondary:hover { background: var(--soft); }
button:disabled { cursor: wait; opacity: .65; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 7px 14px; margin: 27px 0 11px; }
.section-heading > span { color: var(--muted); font-size: .79rem; }
.state { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); background: var(--bg); border: 1px solid var(--line); padding: 4px 9px; border-radius: 6px; font-size: .75rem; font-weight: 620; max-width: 100%; }
.state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 6px; }
.status-list { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px; }
.status-row { display: grid; grid-template-columns: 40px minmax(0,1fr) auto auto; gap: 13px; align-items: center; padding: 17px 0; }
.status-row + .status-row { border-top: 1px solid var(--line); }
.row-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--soft); color: var(--soft-ink); display: grid; place-items: center; flex-shrink: 0; }
.row-icon svg { width: 22px; height: 22px; }
.status-row p { color: var(--muted); font-size: .79rem; line-height: 1.5; margin-top: 3px; }
.status-row a { display: flex; gap: 5px; align-items: center; min-height: 44px; font-size: .82rem; font-weight: 680; text-decoration: none; }
.status-row a:hover { text-decoration: underline; }
.status-row a span, .quick-links > a > span:last-child { font-size: 1.4rem; line-height: 1; }
.quick-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.quick-links > a { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 88px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); text-decoration: none; }
.quick-links > a:hover { border-color: var(--accent); }
.quick-links strong { display: block; font-size: .9rem; }
.quick-links small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.5; margin-top: 3px; }
.quick-links > a > span:last-child { color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 23px; background: var(--paper); display: grid; align-content: start; gap: 12px; }
.card p { color: var(--muted); font-size: .91rem; }
.card .state, .card .button { justify-self: start; }
.card a:not(.button) { font-size: .89rem; font-weight: 650; display: inline-flex; align-items: center; min-height: 44px; }
.card + .card, .grid + .card { margin-top: 14px; }
.grid .card + .card { margin-top: 0; }
.empty { min-height: 210px; padding: 30px; justify-items: start; align-content: center; }
.empty p { max-width: 62ch; }
.muted, .card .muted { color: var(--muted); font-size: .81rem; }
.steps { margin: 0; padding-left: 1.6rem; }
.steps li { padding: 13px 4px; }
.steps li + li { border-top: 1px solid var(--line); }
.steps li::marker { color: var(--accent); font-weight: 750; }
.steps p { margin: 5px 0; }
.details { margin: 0; }
.details div { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.details div:first-child { padding-top: 0; }
.details div:last-child { border-bottom: 0; }
.details dt { font-size: .9rem; color: var(--muted); }
.details dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-size: .9rem; font-weight: 650; }
footer { margin-top: 32px; border-top: 1px solid var(--line); padding: 15px 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .72rem; color: var(--muted); }

@media (max-width: 1060px) {
  .shell { grid-template-columns: 220px minmax(0,1fr); }
  .grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .status-row { grid-template-columns: 40px minmax(0,1fr) auto; }
  .status-row .state { grid-column: 2; grid-row: 2; justify-self: start; }
  .status-row a { grid-column: 3; grid-row: 1 / span 2; }
}
@media (max-width:740px) {
  .shell { display: block; }
  .sidebar { position: static; height: auto; overflow: visible; gap: 11px; padding: calc(12px + env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) 12px max(14px,env(safe-area-inset-left)); border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { gap: 10px; padding: 0 2px; }
  .brand img { width: 34px; height: 34px; }
  .brand strong { font-size: 1.08rem; }
  .brand small { font-size: .67rem; }
  .workspace, .sidebar-foot { display: none; }
  .sidebar nav { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 3px; }
  .sidebar nav a { min-width: 0; min-height: 48px; justify-content: center; flex-direction: column; gap: 3px; font-size: .73rem; line-height: 1.4; padding: 5px 3px; text-align: center; }
  .sidebar nav .nav-icon { width: 18px; height: 18px; }
  main { padding: 15px max(16px,env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)); }
  .topbar { margin-bottom: 14px; padding-bottom: 13px; gap: 10px; }
  .topbar .eyebrow { font-size: .62rem; }
  .top-domain { font-size: .81rem; }
  .pill { font-size: .69rem; max-width: 48%; padding: 5px 7px; }
  .notice { grid-template-columns: 20px minmax(0,1fr); gap: 6px 9px; padding: 11px; margin-bottom: 22px; }
  .notice a { grid-column: 2; min-height: 44px; }
  .page-heading { margin-bottom: 17px; }
  .connection-panel { padding: 20px; }
  .connection-heading { gap: 10px; }
  .connection-icon { width: 42px; height: 42px; flex-basis: 42px; border-radius: 10px; }
  .connection-icon svg { width: 24px; height: 24px; }
  .actions .button { flex: 1 1 auto; }
  .status-list { padding: 0 13px; }
  .status-row { grid-template-columns: 36px minmax(0,1fr) auto; gap: 8px 10px; padding: 14px 0; }
  .row-icon { width: 36px; height: 36px; border-radius: 9px; }
  .row-icon svg { width: 20px; height: 20px; }
  .status-row a { font-size: .76rem; }
  .status-row .state { font-size: .69rem; }
  .quick-links, .grid, .grid.two { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .quick-links > a { min-height: 76px; padding: 13px; grid-template-columns: 36px minmax(0,1fr) auto; }
  .card { padding: 18px; }
  .empty { padding: 24px 18px; min-height: 180px; }
  .details div { display: grid; gap: 4px; }
  .details dd { text-align: left; }
  .section-heading { margin-top: 23px; }
}
@media (prefers-color-scheme:dark) {
  :root {
    --bg: #111925; --paper: #192433; --sidebar: #151f2c;
    --ink: #eff3fa; --muted: #b4c1d2; --line: #35465a;
    --accent: #9ac5ff; --accent-hover: #c1dcff; --on-accent: #112640;
    --soft: #243b58; --soft-ink: #c0daff;
    --connection: #1b3456; --focus: #a7ccff;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
