/* Raptool Hub - Raptool house look: deep navy header, #2F7BF6 accent, light content, flat white cards. */
:root {
  --navy: #0B1220;
  --accent: #2F7BF6;
  --accent-dark: #1B5FD6;
  --bg: #F2F4F8;
  --card: #FFFFFF;
  --line: #DCE1EA;
  --line-soft: #EAEEF4;
  --text: #121826;
  --muted: #566074;
  --good-bg: #E1F4E8; --good-fg: #0F6A38;
  --bad-bg: #FCE6E5; --bad-fg: #A11F1D;
  --warn-bg: #FFF0D1; --warn-fg: #7A4F00;
  --info-bg: #E3EDFE; --info-fg: #1A4DB0;
  --off-bg: #ECEFF4; --off-fg: #4A5468;
  --radius: 10px;
  --gutter: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } } /* 1.11.9: hidden turned body into a scroll box, so the sticky left menu scrolled away */
body { font-size: 15px; line-height: 1.45; min-height: 100vh; min-height: 100dvh; }
[hidden] { display: none !important; }
a { color: var(--accent-dark); }
h1 { font-size: 22px; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 17px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; }
.noscript { padding: 24px; }

/* version, bottom right, super small */
.version { position: fixed; right: 6px; bottom: 4px; font-size: 9px; line-height: 1; color: var(--muted); opacity: .75; z-index: 5; pointer-events: none; padding: 2px 3px; background: transparent; }

/* buttons and inputs: 44px tall, 16px text (no zoom on iPhone) */
.btn, button.btn, a.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--text); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none;
  touch-action: manipulation;
}
.btn:hover { border-color: #b9c2d3; background: #f8f9fc; }
.btn:focus-visible, .kpi:focus-visible, .dt-sort:focus-visible, tr.clickable:focus-visible, .nav a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(47,123,246,.45); outline-offset: 1px; }
button.btn.btn-primary, a.btn.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.btn.btn-primary:hover, a.btn.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
button.btn.btn-danger, a.btn.btn-danger { color: var(--bad-fg); border-color: #efc2c0; }
button.btn.btn-danger:hover, a.btn.btn-danger:hover { background: var(--bad-bg); border-color: #e3a3a1; }
button.btn.btn-quiet, a.btn.btn-quiet { border-color: transparent; background: transparent; color: var(--accent-dark); }
button.btn.btn-quiet:hover, a.btn.btn-quiet:hover { background: #e9f0fe; border-color: transparent; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-sm { min-height: 44px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=tel], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; font-size: 16px; color: var(--text);
  background: #fff; border: 1px solid #c4ccdb; border-radius: 8px;
}
label.field { display: block; font-weight: 600; font-size: 14px; margin: 0 0 14px; }
label.field > input, label.field > select, label.field > textarea { margin-top: 6px; font-weight: 400; }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; margin-top: 4px; }

/* header */
.top { background: var(--navy); color: #fff; border-bottom: 3px solid var(--accent); }
.top-in { max-width: 1400px; margin: 0 auto; padding: 8px var(--gutter); display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; min-height: 44px; }
.brand svg { width: 28px; height: 28px; }
.nav { display: flex; gap: 4px; flex: 1 1 auto; }
.nav a { white-space: nowrap; flex: none; color: #c9d3e6; text-decoration: none; font-weight: 600; padding: 0 14px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 8px; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a[aria-current=page] { background: rgba(47,123,246,.28); color: #fff; }
.top-user { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 13px; color: #aab6cf; }
.top-user .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.28); min-height: 44px; }
.top-user .btn:hover { background: rgba(255,255,255,.1); }
.top-user .who { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) {
  .nav { order: 3; flex: 1 1 100%; overflow-x: auto; margin: 0 -4px; padding-bottom: 2px; }
  .top-user .who { display: none; }
}

main { max-width: 1400px; margin: 0 auto; padding: 18px var(--gutter) 48px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 14px; }
.page-head .sub { color: var(--muted); font-size: 14px; }
.page-head .grow { flex: 1 1 240px; min-width: 0; }
.page-head .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.card > h2:first-child { margin-top: 0; }

.banner { border-radius: 8px; padding: 12px 14px; margin: 0 0 14px; border: 1px solid; font-size: 14px; }
.banner.warn { background: var(--warn-bg); border-color: #f0d596; color: var(--warn-fg); }
.banner.err { background: var(--bad-bg); border-color: #efbab8; color: var(--bad-fg); }
.banner.ok { background: var(--good-bg); border-color: #b8e1c7; color: var(--good-fg); }
.banner strong { display: block; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.kpi { text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; min-height: 44px; display: flex; flex-direction: column; gap: 2px; touch-action: manipulation; border-left: 4px solid var(--line); }
.kpi:hover { border-color: #b9c2d3; border-left-color: var(--accent); }
.kpi .num { font-size: 28px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.kpi .lab { font-weight: 600; font-size: 14px; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.kpi[aria-pressed=true] { border-color: var(--accent); border-left-color: var(--accent); background: #eff5ff; box-shadow: 0 0 0 1px var(--accent) inset; }
.kpi.bad .num { color: var(--bad-fg); }
.kpi.bad { border-left-color: #e5908d; }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pill.good { background: var(--good-bg); color: var(--good-fg); }
.pill.bad { background: var(--bad-bg); color: var(--bad-fg); }
.pill.warn { background: var(--warn-bg); color: var(--warn-fg); }
.pill.info { background: var(--info-bg); color: var(--info-fg); }
.pill.off { background: var(--off-bg); color: var(--off-fg); }

/* table */
.dt-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.dt-count { font-weight: 600; font-size: 14px; }
.dt-spacer { flex: 1; }
.dt-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; -webkit-overflow-scrolling: touch; max-width: 100%; }
.dt-table { border-collapse: separate; border-spacing: 0; table-layout: fixed; width: 100%; }
.dt-table th, .dt-table td { text-align: left; padding: 0 12px; border-bottom: 1px solid var(--line-soft); overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.dt-table td { height: 56px; white-space: nowrap; }
.dt-table td .two { display: block; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; }
.dt-table td .two small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.dt-table .right { text-align: right; }
.dt-heads th { position: relative; background: #F7F9FC; font-size: 13px; color: var(--muted); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; padding: 0; height: 44px; }
.dt-sort { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 6px; width: 100%; height: 44px; padding: 0 16px 0 12px; cursor: pointer; font-weight: 700; color: var(--text); text-transform: none; touch-action: manipulation; }
.dt-sort:hover { background: #eef2f9; }
.dt-label { font-weight: 700; color: var(--text); padding: 0 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-sort .dt-label { padding: 0; }
.dt-arrow { font-size: 9px; color: var(--accent-dark); }
.dt-resize { position: absolute; top: 0; right: 0; width: 12px; height: 100%; cursor: col-resize; touch-action: none; z-index: 2; }
.dt-resize::after { content: ""; position: absolute; right: 5px; top: 12px; bottom: 12px; width: 2px; background: var(--line); border-radius: 1px; }
.dt-resize:hover::after, .dt-resize.active::after { background: var(--accent); }
@media (pointer: coarse) { .dt-resize { width: 20px; } .dt-resize::after { right: 9px; } }
.dt-fcell { padding: 4px 8px !important; background: #fff; border-bottom: 1px solid var(--line) !important; }
.dt-filter { min-height: 36px !important; padding: 4px 8px !important; font-size: 16px !important; border-radius: 6px !important; border-color: #d3dae6 !important; }
@media (pointer: coarse) { .dt-filter { min-height: 44px !important; } }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f6f9ff; }
tr.dt-row.revoked td { color: var(--muted); }
.dt-empty td { height: auto; white-space: normal; }
.empty { padding: 28px 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--muted); }
.dt-tip { font-size: 12px; color: var(--muted); margin: 6px 2px 0; }
.dt-menu { position: fixed; z-index: 50; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 28px rgba(11,18,32,.22); min-width: 230px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow: auto; padding: 6px; }
.dt-menu-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px 4px; }
.dt-menu-item { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 6px; cursor: pointer; font-size: 15px; }
.dt-menu-item:hover { background: #f1f5fc; }
.dt-menu-item input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.dt-menu-all { width: 100%; justify-content: center; margin-top: 4px; }

/* links inside tables */
.link-ext { color: var(--accent-dark); text-decoration: none; font-weight: 500; }
.link-ext:hover { text-decoration: underline; }
.bundle-cell { display: flex; align-items: center; gap: 8px; }
.bundle-cell a { font-weight: 600; font-size: 13px; }

/* drawer and modal */
.scrim { position: fixed; inset: 0; background: rgba(11,18,32,.45); z-index: 30; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: #fff; z-index: 31; display: flex; flex-direction: column; box-shadow: -8px 0 32px rgba(11,18,32,.25); }
.drawer-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.drawer-head .t { flex: 1; min-width: 0; }
.drawer-head h2 { margin: 0; font-size: 19px; }
.drawer-body { padding: 16px; overflow-y: auto; overflow-x: hidden; flex: 1; -webkit-overflow-scrolling: touch; }
.drawer-body h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 20px 0 8px; }
.drawer-body h3:first-child { margin-top: 0; }
.dl { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; word-break: break-word; }
.reasons { margin: 0 0 12px; padding: 10px 12px 10px 28px; background: var(--bad-bg); color: var(--bad-fg); border-radius: 8px; font-size: 14px; }
.versions { width: 100%; border-collapse: collapse; font-size: 13px; }
.versions td { padding: 6px 4px; border-bottom: 1px solid var(--line-soft); }
.modal { position: fixed; z-index: 41; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 16px 48px rgba(11,18,32,.35); }
.modal h2 { margin-top: 0; font-size: 19px; }
.modal .row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.scrim.top { z-index: 40; }

/* device key box */
.keybox { display: flex; gap: 8px; align-items: stretch; margin: 8px 0 14px; }
.keybox .mono { flex: 1; min-width: 0; background: #F3F6FB; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; align-items: center; user-select: all; }
.qrwrap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: center; margin: 4px 0 8px; }
.qrwrap canvas { width: 220px; height: 220px; max-width: 100%; image-rendering: pixelated; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.qrwrap .steps { flex: 1 1 200px; font-size: 14px; }
.qrwrap .steps ol { margin: 6px 0 0; padding-left: 20px; }

.choices { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.choice { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; font-size: 15px; cursor: pointer; }
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }
.applist { border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; margin: 0 0 14px 30px; max-height: 220px; overflow: auto; }
.applist .choice { font-weight: 500; }
.form-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
@media (max-width: 600px) { .form-row { grid-template-columns: minmax(0, 1fr); } }

/* sign-in screens (1.7.3): evening sky, tree silhouettes, frosted card. Only the signed-out pages use .login-wrap. */
.login-wrap {
  position: relative; isolation: isolate; overflow: hidden; min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center; padding: 24px var(--gutter);
  color: #fff;
  background:
    radial-gradient(60% 38% at 12% 46%, rgba(255,160,170,.85), rgba(255,160,170,0) 70%),
    radial-gradient(55% 14% at 68% 24%, rgba(110,120,235,.75), rgba(110,120,235,0) 75%),
    radial-gradient(70% 12% at 22% 18%, rgba(205,140,200,.65), rgba(205,140,200,0) 75%),
    linear-gradient(180deg, #4b3a9e 0%, #5a3fa0 18%, #8a4fa8 40%, #c4709f 60%, #b080b8 70%, #7a58a8 80%, #3a2878 92%, #281a60 100%);
}
.login-wrap::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 62vh; z-index: -1; pointer-events: none;
  background: url(/assets/scene.svg) no-repeat center bottom / cover; }
.login-wrap::after { content: ""; position: absolute; inset: 0 0 45% 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1.5px 1.5px at 74% 12%, #fff, transparent), radial-gradient(1.5px 1.5px at 88% 8%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 78% 23%, #fff, transparent), radial-gradient(1.5px 1.5px at 69% 21%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 93% 21%, #fff, transparent), radial-gradient(1.5px 1.5px at 82% 32%, #fff, transparent),
    radial-gradient(1px 1px at 55% 9%, #fff, transparent), radial-gradient(1px 1px at 36% 14%, #fff, transparent),
    radial-gradient(1px 1px at 18% 7%, #fff, transparent), radial-gradient(1px 1px at 96% 40%, #fff, transparent);
  opacity: .8; animation: login-twinkle 6s ease-in-out infinite alternate; }
@keyframes login-twinkle { from { opacity: .45; } to { opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .login-wrap::after { animation: none; opacity: .75; } }
.login-card {
  width: min(440px, 100%); padding: 34px 40px 30px; color: #fff;
  background: rgba(58, 24, 98, .62); border: 1px solid rgba(255,255,255,.34); border-radius: 24px;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(22, 6, 56, .45);
}
@media (max-width: 480px) { .login-card { padding: 28px 22px 22px; border-radius: 22px; } }
.login-card .kicker { text-align: center; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: #efe6ff; margin: 0 0 8px; }
.login-card h1.login-title { text-align: center; font-size: 34px; line-height: 1.12; font-weight: 800; letter-spacing: -.01em; color: #fff; margin: 0 0 6px; }
@media (max-width: 480px) { .login-card h1.login-title { font-size: 29px; } }
.login-card p.lead { text-align: center; color: #e4d8f8; margin: 0 0 20px; font-size: 15px; }
.login-card p { color: #ece3fb; }
.login-card label.field { color: #e4d8f8; font-size: 13px; letter-spacing: .02em; }
.login-card input[type=text], .login-card input[type=email], .login-card input[type=password], .login-card input[type=tel] {
  background: rgba(22, 8, 52, .5); border: 1px solid rgba(255,255,255,.26); border-radius: 14px; color: #fff; min-height: 48px; padding: 8px 14px;
}
.login-card input::placeholder { color: rgba(228,216,248,.55); }
.login-card input:-webkit-autofill { -webkit-text-fill-color: #fff; caret-color: #fff; box-shadow: 0 0 0 100px #2c1456 inset; }
.login-card input:focus-visible { outline: 3px solid rgba(220,200,255,.55); outline-offset: 1px; border-color: rgba(255,255,255,.55); }
.login-card .hint { color: #cdbde8; }
.login-card .muted { color: #cdbde8; }
.login-card .btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; border-radius: 999px; min-height: 52px; font-size: 16px; }
.login-card .btn:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.45); }
.login-card button.btn.btn-primary, .login-card a.btn.btn-primary { background: #fff; border-color: #fff; color: #2b1458; font-weight: 700; }
.login-card button.btn.btn-primary:hover, .login-card a.btn.btn-primary:hover { background: #f1e9ff; border-color: #f1e9ff; }
.login-card .btn:focus-visible { outline: 3px solid rgba(220,200,255,.65); outline-offset: 2px; }
.login-card .btn[disabled] { opacity: .7; }
.pw-wrap { position: relative; display: block; margin-top: 6px; }
.pw-wrap > input { margin-top: 0; padding-right: 76px; }
.pw-show { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); min-height: 34px; padding: 0 12px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; font: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0; cursor: pointer; }
.pw-show:hover { background: rgba(255,255,255,.22); }
.pw-show:focus-visible { outline: 3px solid rgba(220,200,255,.65); outline-offset: 2px; }
.login-card .form-error { color: #fff; background: rgba(120, 18, 62, .62); border: 1px solid rgba(255,150,180,.6); border-radius: 14px; padding: 12px 15px; font-size: 15px; margin: 0 0 16px; }
.login-card .form-ok { color: #fff; background: rgba(40, 120, 100, .4); border: 1px solid rgba(160,240,210,.5); border-radius: 14px; padding: 12px 15px; font-size: 15px; margin: 0 0 16px; }
.login-card .login-links { margin: 14px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 10px; }
.login-card .login-links a { color: #dccbff; }
.login-card .login-links a:hover { color: #fff; }
.login-card a { color: #dccbff; }
.login-card strong { color: #fff; }
.login-card .login-links a.btn-primary { color: #2b1458; }
.login-card h1.login-title + .form-ok, .login-card h1.login-title + .form-error { margin-top: 18px; }
/* 1.9.1: language picker under the sign-up form */
.lang-pick { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.lang-pick a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
.lang-pick strong { padding: 0 8px; }
.login-card .lang-pick { color: #cdbde8; }
.login-card .lang-pick a { color: #dccbff; }
.login-card .lang-pick strong { color: #fff; }
.login-card p.hint { margin: -6px 0 14px; }
/* 1.9.1: approve dialog choices */
.approve-kinds { border: 0; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.approve-kinds legend { font-weight: 600; margin-bottom: 6px; }
.approve-kind { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line, #dfe5ee); border-radius: 10px; cursor: pointer; min-height: 44px; }
.approve-kind input { margin-top: 3px; }
.approve-kind small { display: block; color: var(--muted); }
.approve-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.req-focus { margin: 0 0 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.banner.info { background: var(--info-bg, #EAF2FE); border-color: #bcd3f7; color: var(--info-fg, #1D4E9E); }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
body:has(.login-wrap) .version, .login-wrap + .version { font-size: 11px; color: #d8c9f5; opacity: .6; right: 12px; bottom: 8px; }
.form-error { color: var(--bad-fg); background: var(--bad-bg); border-radius: 8px; padding: 10px 12px; margin: 0 0 14px; font-size: 14px; }
.form-ok { color: var(--good-fg); background: var(--good-bg); border-radius: 8px; padding: 10px 12px; margin: 0 0 14px; font-size: 14px; }
.narrow { max-width: 520px; }
.loading { padding: 40px 0; text-align: center; color: var(--muted); }

textarea { resize: vertical; min-height: 96px; line-height: 1.4; }
select { appearance: auto; }

/* version 1.1 pages */
.login-links { margin: 14px 0 0; text-align: center; }
.login-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-weight: 600; }
.chips { display: inline-flex; gap: 4px; flex-wrap: nowrap; align-items: center; vertical-align: middle; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--info-bg); color: var(--info-fg); font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip.demo { background: var(--warn-bg); color: var(--warn-fg); }
.chip.scope { background: var(--off-bg); color: var(--off-fg); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.field-grid .wide { grid-column: 1 / -1; }
@media (max-width: 600px) { .field-grid { grid-template-columns: minmax(0, 1fr); } }
.status-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.card.form-card { max-width: 720px; }
.pw-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 6px; }
.accounts { width: 100%; border-collapse: collapse; font-size: 13px; }
.accounts th { text-align: left; color: var(--muted); font-weight: 600; padding: 4px 6px 4px 0; border-bottom: 1px solid var(--line); }
.accounts td { padding: 8px 6px 8px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; word-break: break-word; }
.pre { white-space: pre-wrap; word-break: break-word; }
.envbox { background: #F3F6FB; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 6px 0 12px; white-space: pre-wrap; word-break: break-all; }
.checks { display: flex; gap: 6px 18px; flex-wrap: wrap; margin: 4px 0 12px; }
.checks .choice { min-height: 44px; }
.modal .form-error, .modal .form-ok { margin-top: 12px; }

/* version 1.2 pages (Raptool ID) */
.kpis.kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpis.kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1000px) { .kpis.kpis-5, .kpis.kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .kpis.kpis-5, .kpis.kpis-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.btn-row.tight { display: inline-flex; gap: 6px; margin: 0; flex-wrap: nowrap; }
.btn-row.tight .btn { padding: 0 12px; white-space: nowrap; }
.back { margin: 0 0 4px; }
.back a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.sub-h { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 0 8px; }
.grant-row { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.grant-row .grow { flex: 1 1 200px; min-width: 0; word-break: break-word; }
.banner.ok { margin-bottom: 14px; }
.btn-block { width: 100%; }

/* version 1.3 pages (Licenses) */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.seg button { all: unset; box-sizing: border-box; min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text); touch-action: manipulation; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.seg button:focus-visible { outline: 3px solid rgba(47,123,246,.45); outline-offset: -3px; }
.view-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.lic-cell { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; min-width: 64px; min-height: 36px; padding: 0 10px; border-radius: 8px; font-weight: 700; font-size: 14px; cursor: pointer; border: 1px solid transparent; touch-action: manipulation; white-space: nowrap; }
.lic-cell:focus-visible { outline: 3px solid rgba(47,123,246,.45); outline-offset: 1px; }
.lic-cell.ok { background: var(--good-bg); color: var(--good-fg); }
.lic-cell.near { background: var(--warn-bg); color: var(--warn-fg); }
.lic-cell.over, .lic-cell.expired { background: var(--bad-bg); color: var(--bad-fg); }
.lic-cell.cancelled { background: var(--off-bg); color: var(--off-fg); text-decoration: line-through; }
.lic-cell.none { color: var(--muted); font-weight: 400; border: 1px dashed var(--line); background: transparent; }
.lic-cell:hover { filter: brightness(.96); }
.dt-foot td { background: #F7F9FC; font-weight: 700; height: 48px; border-top: 2px solid var(--line); border-bottom: 0; }
.lic-sum { display: inline-flex; gap: 4px; flex-wrap: nowrap; align-items: center; }
.lic-sum .chip.near { background: var(--warn-bg); color: var(--warn-fg); }
.lic-sum .chip.over, .lic-sum .chip.expired { background: var(--bad-bg); color: var(--bad-fg); }
.lic-sum .chip.cancelled { background: var(--off-bg); color: var(--off-fg); }
.lic-sum .chip.ok { background: var(--good-bg); color: var(--good-fg); }
.kpis.kpis-6 .kpi { min-width: 0; }
.field-check { display: block; margin: 0 0 14px; }

/* version 1.4 pages (Partners) */
.dt-subtotal td { background: #F7F9FC; font-weight: 700; height: 44px; border-bottom: 2px solid var(--line); }
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.filter-bar label { font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.filter-bar select { width: auto; min-width: 200px; max-width: 100%; }
.filter-bar .choice { min-height: 44px; }

/* 1.5.0: Account requests + demo switch */
.demo-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.demo-card p { margin: 0; flex: 1 1 280px; }

/* Hub 1.6.0 - email accounts */
.star-default { color: #d99a00; font-size: 18px; line-height: 1; }
.senders-box { margin: 4px 0 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: #f8f9fc; }
.senders-box[hidden], .senders-list[hidden] { display: none; }
.senders-list { margin: 0 0 4px 30px; }
.help-list { margin: 0; padding-left: 20px; }
.drawer-actions { margin-top: 8px; }
.mail-error { padding-left: 12px; }

/* My Raptool (1.7.0): /id/my */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.my-top { background: var(--navy); border-bottom: 3px solid var(--accent); }
.my-top-in { max-width: 1100px; margin: 0 auto; padding: 8px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.my-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; min-height: 44px; }
.my-brand svg { width: 28px; height: 28px; }
.my-brand svg rect[fill="#0B1220"] { fill: #fff; }
.my-out { margin: 0; }
.my-top .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.28); }
.my-top .btn:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.4); }
.my-main { max-width: 1100px; margin: 0 auto; padding: 24px var(--gutter) 56px; }
.my-h1 { font-size: 24px; margin: 0 0 4px; overflow-wrap: anywhere; }
.my-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.my-mail { margin: 0; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.my-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.my-filter { margin: 0 0 18px; }
.my-filter input { width: 100%; max-width: 420px; }
.my-group { margin: 0 0 24px; }
.my-gh { font-size: 15px; text-transform: none; color: var(--muted); letter-spacing: .01em; display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.my-count { display: inline-block; min-width: 22px; padding: 0 7px; text-align: center; border-radius: 999px; background: var(--off-bg); color: var(--off-fg); font-size: 12px; font-weight: 700; line-height: 20px; }
.my-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.my-tile { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.my-ico { width: 48px; height: 48px; border-radius: 12px; background: var(--navy); color: #fff; font-weight: 700; font-size: 22px; display: flex; align-items: center; justify-content: center; grid-row: span 2; align-self: start; }
.my-tb h3 { font-size: 16px; margin: 0 0 6px; overflow-wrap: anywhere; }
.my-chips { margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.my-act { grid-column: 2; margin-top: 8px; }
.my-act .btn { min-width: 96px; }
.my-note { color: var(--muted); font-size: 13px; display: inline-block; padding: 10px 0; }
.my-empty, .my-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; max-width: 520px; }
.my-card .lead { color: var(--muted); margin: 0 0 18px; }
.my-none { color: var(--muted); }
.my-cat { margin-top: 30px; }
.my-blurb { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.my-sub { margin: 0 0 10px; font-weight: 700; color: var(--muted); overflow-wrap: anywhere; }
.my-notice { margin: 0 0 20px; padding: 12px 14px; font-size: 15px; border-radius: var(--radius); }
.my-act form { margin: 0; }
.my-card .field { display: block; margin: 0 0 16px; }
.my .back { margin: 0 0 14px; }
@media (max-width: 600px) {
  .my-main { padding-top: 18px; }
  .my-tiles { grid-template-columns: minmax(0, 1fr); }
  .my-actions .btn { flex: 1 1 auto; }
  .my-card .btn-primary { width: 100%; }
  .my-act .btn-primary { width: 100%; }
}
body.my .version { color: var(--muted); }

/* Hub 1.8.0: customer sign-up per app (admin Apps page dialog, Trial requests) */
.signup-modes { border: 0; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.signup-modes legend { font-weight: 600; margin: 0 0 6px; padding: 0; }
.signup-mode { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; min-height: 44px; }
.signup-mode input { margin-top: 3px; flex: none; }
.signup-mode span { display: grid; gap: 2px; }
.signup-mode small { color: var(--muted); font-size: 13px; }
.signup-mode:has(input:checked) { border-color: var(--accent); background: var(--info-bg); }
.signup-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .signup-row { grid-template-columns: 1fr; } }

/* ---- 1.9.3: admin shell - dark slate sidebar + light page ---- */
.shell { display: flex; min-height: 100vh; background: #F3F5F9; }
.side { width: 236px; flex: none; box-sizing: border-box; padding: 20px 12px 16px; display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(180deg, #263449 0%, #2E3D57 100%); color: #DCE3EE; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
/* 1.11.9: no visible scrollbar in the sidebar, and the dark colour runs the full page height */
.side { scrollbar-width: none; -ms-overflow-style: none; }
.side::-webkit-scrollbar { width: 0; height: 0; display: none; }
@media (min-width: 901px) { .shell { background: linear-gradient(90deg, #2E3D57 0 236px, #F3F5F9 236px); } .shell-main { background: #F3F5F9; } }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; color: #fff; text-decoration: none; font-weight: 700; font-size: 19px; min-height: 44px; }
.side-brand svg { width: 28px; height: 28px; flex: none; }
.side-group { padding: 14px 12px 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: #93A3BC; }
.side-link { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 8px; color: #DCE3EE; text-decoration: none; font-weight: 500; font-size: 14.5px; }
.side-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-link[aria-current=page] { background: #4A6189; color: #fff; font-weight: 600; }
.side-link:focus-visible, .side-out:focus-visible, .side-brand:focus-visible { outline: 2px solid #93C5FD; outline-offset: 1px; }
.side-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-grow { flex: 1 1 auto; min-height: 16px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 12px 6px; border-top: 1px solid #3C4D6B; color: #fff; font-size: 13.5px; min-width: 0; }
.side-avatar { width: 30px; height: 30px; border-radius: 50%; background: #4A6189; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex: none; }
.side-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-out { margin: 6px 12px 0; min-height: 40px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.side-out:hover { background: rgba(255,255,255,.08); }
.shell-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.crumbs { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 28px; border-bottom: 1px solid #E2E7EF; background: #F8FAFC; font-size: 14px; color: #475569; }
.crumbs strong { color: #0F172A; }
.crumb-sep { color: #94A3B8; }
.crumbs .side-menu { display: none; }
.shell-main > main { max-width: 1440px; width: 100%; box-sizing: border-box; margin: 0; padding: 22px 28px 48px; }
.shell .page-head h1 { font-size: 30px; letter-spacing: -0.01em; }
@media (max-width: 900px) {
  .side { position: fixed; left: 0; top: 0; bottom: 0; height: auto; z-index: 60; transform: translateX(-100%); transition: transform .18s ease; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
  body.side-open .side { transform: none; }
  .crumbs .side-menu { display: inline-flex; min-height: 40px; margin-right: 4px; }
  .crumbs { padding: 0 var(--gutter); }
  .shell-main > main { padding: 16px var(--gutter) 40px; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }

/* ---- 1.9.3: App keys page ---- */
.kpis.strip { gap: 0; background: var(--card); border: 1px solid #E2E7EF; border-radius: 14px; overflow: hidden; }
.kpis.strip .kpi { border: 0; border-radius: 0; border-right: 1px solid #E2E7EF; box-shadow: none; padding: 16px 24px; background: transparent; }
.kpis.strip .kpi:last-child { border-right: 0; }
.kpis.strip .kpi[aria-pressed=true] { background: #EFF5FF; box-shadow: inset 0 -3px 0 var(--accent); }
@media (max-width: 760px) { .kpis.strip .kpi:nth-child(2) { border-right: 0; } .kpis.strip .kpi:nth-child(-n+2) { border-bottom: 1px solid #E2E7EF; } }
.keys-top { display: flex; gap: 18px; align-items: stretch; margin-bottom: 16px; flex-wrap: wrap; }
.keys-form { flex: 999 1 560px; min-width: 0; background: var(--card); border: 1px solid #E2E7EF; border-radius: 14px; display: flex; flex-direction: column; }
.keys-form .kf-head { padding: 22px 24px 6px; }
.keys-form .kf-head h2 { margin: 0; font-size: 21px; }
.keys-form .kf-head p { margin: 4px 0 0; color: var(--muted); }
.kf-step { display: flex; gap: 14px; padding: 14px 24px; border-bottom: 1px solid #E2E7EF; margin: 0 0; }
.kf-step:last-of-type { border-bottom: 0; }
.kf-num { width: 28px; height: 28px; border-radius: 50%; background: #E3EBF8; color: #2B4A80; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex: none; }
.kf-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.kf-body > strong { line-height: 28px; }
.perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 700px) { .perm-grid { grid-template-columns: minmax(0, 1fr); } }
.perm { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid #E2E7EF; border-radius: 10px; cursor: pointer; min-height: 44px; }
.perm:has(input:checked) { border-color: #93B4E8; background: #F2F6FD; }
.perm input { width: 18px; height: 18px; flex: none; }
.perm strong { display: block; font-weight: 600; }
.perm small { color: var(--muted); font-size: 13px; }
.kf-foot { margin-top: auto; border-top: 1px solid #E2E7EF; padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.kf-foot .hint { margin: 0; }
.keys-help { flex: 1 1 300px; max-width: 400px; background: var(--card); border: 1px solid #E2E7EF; border-radius: 14px; padding: 24px; box-sizing: border-box; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 1100px) { .keys-help { max-width: none; } }
.keys-help .kh-ico { width: 52px; height: 52px; border-radius: 12px; background: #E3EBF8; display: inline-flex; align-items: center; justify-content: center; }
.keys-help .kh-ico svg { width: 26px; height: 26px; fill: none; stroke: #2B4A80; stroke-width: 2; stroke-linecap: round; }
.keys-help h2 { margin: 0; font-size: 22px; }
.keys-help p { margin: 0; color: var(--muted); font-size: 14px; }
.keys-help hr { border: 0; border-top: 1px solid #E2E7EF; margin: 2px 0; width: 100%; }
.keys-help .kh-tip strong { display: block; }
.keys-list h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 19px; }
.count-badge { font-size: 12.5px; background: #EEF2F7; color: #475569; padding: 2px 9px; border-radius: 999px; font-weight: 600; }
.kf-err { padding: 0 24px; }

/* 1.10.0: RHPick - the shared custom drop-down (admin6.js), and the Access page */
.pick-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 42px; margin-top: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); font: inherit; font-weight: 400; text-align: left; cursor: pointer; }
.pick-btn:hover { border-color: #b9c2d2; }
.pick-btn[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,123,246,.18); }
.pick-btn.empty .pick-label { color: var(--muted); }
.pick-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-chev { flex: none; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); }
.pick-pop { position: fixed; z-index: 60; max-width: min(420px, calc(100vw - 16px)); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(11,18,32,.22); padding: 6px; outline: none; }
.pick-search { width: 100%; margin: 0 0 6px; }
.pick-list { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow: auto; }
.pick-opt { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.pick-opt small { color: var(--muted); font-size: 12.5px; }
.pick-opt.active { background: var(--info-bg); }
.pick-opt.chosen span { font-weight: 700; }
.pick-none { padding: 8px 10px; color: var(--muted); }
.lic-box { margin-top: 4px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); }
.lic-box.warn { background: var(--warn-bg); border-color: #f0d596; }
.lic-box.good { background: var(--good-bg); border-color: #b8e1c7; }
.lic-box.bad { background: var(--bad-bg); border-color: #efbab8; }
.lic-box .lic-text { margin: 0; }
.lic-add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-weight: 600; font-size: 14px; }
.lic-add .seats-in { width: 90px; margin: 0; }
a.two.plain { color: inherit; text-decoration: none; }
a.two.plain:hover strong { text-decoration: underline; }

/* 1.11.1: app blocks (My apps, account page) in the look of the raptool.ai/rappstore cards */
.app-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin: 4px 0 16px; }
.app-tile { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; text-align: left; font: inherit; color: var(--text); box-shadow: 0 1px 2px rgba(11,18,32,.05); transition: box-shadow .15s, transform .15s; }
.app-tile:hover { box-shadow: 0 10px 28px rgba(11,18,32,.12); transform: translateY(-2px); }
.app-pic { aspect-ratio: 16 / 10; background: #0d1424; overflow: hidden; display: grid; place-items: center; }
.app-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-pic.none { background: linear-gradient(135deg, #1c2b4d, #3b4f8f 55%, #6d4fb3); }
.app-letter { color: #fff; font-size: 54px; font-weight: 800; letter-spacing: -.02em; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.app-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.app-area { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-dark); }
.app-tile .app-name { font-size: 18px; font-weight: 800; line-height: 1.2; }
.app-tile .app-co { color: var(--muted); font-size: 13.5px; }
.app-tile .pill { white-space: normal; }
.app-act { margin-top: auto; padding-top: 8px; }
.app-x { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 999px; background: rgba(11,18,32,.55); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.app-x:hover, .app-x:focus-visible { background: #c62828; }
.app-add { align-items: center; justify-content: center; gap: 6px; min-height: 280px; border: 2px dashed #b9c6da; background: #f8fafd; cursor: pointer; color: var(--accent-dark); box-shadow: none; }
.app-add:hover { border-color: var(--accent); background: var(--info-bg); }
.app-add .app-plus { font-size: 54px; line-height: 1; font-weight: 300; }
.app-add .app-name { font-size: 18px; }
.fold { margin-top: 6px; }
.fold > summary { cursor: pointer; color: var(--accent-dark); font-weight: 600; padding: 6px 0; }
.add-search { width: 100%; font-size: 16px; margin: 0 0 10px; }
.add-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow: auto; }
.add-item { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; font: inherit; cursor: pointer; }
.add-item .app-ico.sm { grid-row: 1 / 3; width: 36px; height: 36px; border-radius: 9px; background: var(--info-bg); color: var(--info-fg); display: grid; place-items: center; font-weight: 800; object-fit: cover; }
.add-item small { color: var(--muted); }
.add-item:hover, .add-item:focus-visible { border-color: var(--accent); background: var(--info-bg); }
.add-item.has { opacity: .6; }
.add-item.other { border-style: dashed; }
/* 1.11.1: edit the licence behind an app block */
.app-seats { font-size: 13px; color: var(--muted); }
.app-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lic-row { display: grid; grid-template-columns: 80px 1fr; align-items: center; gap: 12px; margin: 12px 0; }
.lic-l { font-weight: 700; font-size: 14px; }
.lic-end { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lic-date { width: 170px; margin: 0; }
.lic-seats { width: 100px; margin: 0; text-align: center; font-size: 16px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--bg); }
.seg-b { border: 0; background: transparent; padding: 7px 16px; border-radius: 999px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg-b.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(11,18,32,.15); }
.lic-summary { margin: 16px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--info-bg); color: var(--info-fg); font-weight: 600; }
.lic-row > .seg, .lic-row > .lic-end { justify-self: start; }
.lic-end { flex-wrap: nowrap; }
.modal .lic-end input.lic-date { width: 170px; flex: none; }
.modal .lic-end input.lic-seats { width: 90px; flex: none; }
.lic-end .btn { flex: none; }
@media (max-width: 560px) { .lic-end { flex-wrap: wrap; } }
.lic-end.lic-wrap { flex-wrap: wrap; }

/* 1.11.3: to-do tiles on My apps (only shown when something waits) */
.todo-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
.todo-tile { display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; color: inherit; text-decoration: none; cursor: pointer;
  background: #FFF8E6; border: 1px solid #F1D48A; border-left: 4px solid #E0A100; border-radius: var(--radius); padding: 12px 14px; min-height: 44px; }
.todo-tile:hover { border-color: #E0A100; }
.todo-n { font-size: 28px; font-weight: 700; line-height: 1.1; }
.todo-l { font-weight: 600; }
.todo-s { font-size: 12px; color: var(--muted); }
.todo-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.todo-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; padding: 12px 14px; min-height: 44px; align-items: center;
  color: inherit; text-decoration: none; border-bottom: 1px solid var(--line-soft); }
.todo-row:last-child { border-bottom: 0; }
.todo-row:hover { background: #F5F8FD; }
.todo-row.bad .muted { color: #B42318; }
@media (max-width: 700px) { .todo-row { grid-template-columns: 1fr; gap: 2px; } }

/* 1.11.3: customer card */
.card h2 { font-size: 17px; margin: 0 0 12px; }
.card-grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.card-grid2 > .card { margin-bottom: 16px; }
@media (max-width: 900px) { .card-grid2 { grid-template-columns: 1fr; gap: 0; } }
.people-list { list-style: none; margin: 0; padding: 0; }
.people-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.people-list li:last-child { border-bottom: 0; }
.people-list small { color: var(--muted); overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.strong-link { font-weight: 600; color: inherit; text-decoration: none; }
.strong-link:hover { text-decoration: underline; }
.dt-row.clickable { cursor: pointer; }
.dt-row.clickable:hover td { background: #F5F8FD; }

/* 1.11.4: the whole app block opens the licence settings */
.app-tile.can-edit { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.app-tile.can-edit:hover { box-shadow: 0 6px 18px rgba(20, 30, 60, .14); transform: translateY(-2px); }
.app-tile.can-edit:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* 1.11.5: Show / Hide on every password field (pw.js); light look outside the sign-in card */
.pw-auto > input { font-weight: 400; }
.pw-auto .pw-show { background: #fff; color: var(--text); border: 1px solid var(--line); }
.pw-auto .pw-show:hover { background: #F2F5FA; }
.pw-auto .pw-show:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.login-card .pw-auto .pw-show { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.3); }
.login-card .pw-auto .pw-show:hover { background: rgba(255,255,255,.22); }

/* 1.11.6: My Raptool shows the same app blocks as the Hub (view only, so no lift on hover) */
.my-blocks .app-tile:hover { transform: none; box-shadow: 0 1px 2px rgba(11,18,32,.05); }
.my-blocks .my-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; }
.my-blocks .app-name { margin: 0; }

/* 1.11.7: info tiles in the Device Manager look (Glass Cards, light): compact chips in one frosted bar */
.kpis.kbar { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; margin-bottom: 16px; overflow: visible;
  background: rgba(255,255,255,.62); border: 1px solid rgba(255,255,255,.95); border-radius: 18px;
  box-shadow: 0 8px 24px rgba(71,85,105,.12), inset 0 1px 0 rgba(255,255,255,.95); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .kpis.kbar { -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); } }
.kpis.kbar .kpi.kchip { position: relative; flex: 1 1 170px; min-width: 0; display: flex; flex-direction: row; align-items: center; gap: 10px;
  padding: 8px 10px; min-height: 56px; border-radius: 14px; border: 1px solid #DCE4F0; border-left-width: 1px; background: rgba(255,255,255,.75); box-shadow: none; }
.kpis.kbar .kpi.kchip:hover { border-color: #b9c6dc; background: #fff; }
.kpis.kbar .kpi.kchip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.kchip .kico { flex: none; width: 36px; height: 36px; border-radius: 11px; background: #EDF1F7; color: #475569; display: grid; place-items: center; }
.kchip .kico svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kchip .ktext { display: flex; flex-direction: column; min-width: 0; }
.kpis.kbar .kchip .num { font-size: 22px; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; color: var(--text); }
.kpis.kbar .kchip .lab { font-size: 12.5px; font-weight: 600; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpis.kbar .kchip .sub { display: none; }
.kpis.kbar .kpi.kchip[aria-pressed=true] { background: #E6EFFC; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.kpis.kbar .kchip[aria-pressed=true] .kico { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(47,123,246,.35); }
.kpis.kbar .kchip[aria-pressed=true] .lab { color: var(--accent-dark); }
.kpis.kbar .kpi.kchip.bad .num { color: #9A5B00; }
.kpis.kbar .kchip.bad .kico { background: #FFF0D1; color: #9A5B00; }
.kpis.kbar .kchip.bad::after { content: ''; position: absolute; top: 6px; right: 6px; width: 0; height: 0; border-left: 9px solid transparent; border-top: 9px solid #E0A100; border-radius: 0 6px 0 0; }
@media (max-width: 700px) { .kpis.kbar { padding: 8px; gap: 8px; } .kpis.kbar .kpi.kchip { flex: 1 1 calc(50% - 8px); } }
@media (max-width: 420px) { .kpis.kbar .kpi.kchip { flex-basis: calc(50% - 8px); } .kchip .kico { width: 30px; height: 30px; } .kpis.kbar .kchip .num { font-size: 19px; } }
.kpis.kbar .todo-tile.kchip { position: relative; flex: 0 1 260px; display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 8px 10px; min-height: 56px;
  border-radius: 14px; border: 1px solid #F1D48A; background: #FFF8E6; color: inherit; text-decoration: none; font: inherit; text-align: left; cursor: pointer; }
.kpis.kbar .todo-tile.kchip:hover { border-color: #E0A100; }
.kpis.kbar .todo-tile.kchip .num { font-size: 22px; font-weight: 800; line-height: 1.05; color: #9A5B00; }

/* 1.11.7: clickable cells in the Companies table, and the customer card part you jumped to */
.cell-link { color: inherit; text-decoration: none; display: inline-flex; max-width: 100%; }
.cell-link:hover .chip, .cell-link:hover { text-decoration: underline; }
.num-link { color: var(--accent-dark); font-weight: 700; justify-content: flex-end; min-width: 32px; padding: 6px 4px; }
.card.flash { box-shadow: 0 0 0 3px var(--accent); transition: box-shadow .4s; }

/* 1.11.8: Enroll new devices to MDM on the customer card */
.card-head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.card-head-row h2 { margin: 0; }
.mdm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mdm-label { font-weight: 600; font-size: 14px; cursor: pointer; }
.switch { position: relative; width: 46px; height: 26px; min-height: 26px; padding: 0; border-radius: 999px; border: 1px solid #c4ccdb; background: #DCE1EA; cursor: pointer; flex: none; transition: background .15s; }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(11,18,32,.3); transition: left .15s; }
.switch.on { background: var(--accent); border-color: var(--accent); }
.switch.on .knob { left: 22px; }
.switch:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.switch[disabled] { opacity: .6; cursor: wait; }

/* ---- 1.13.0: My company name + switcher in the sidebar ---- */
.side-co, .side-co-btn { display: flex; align-items: center; gap: 8px; margin: 0 12px 6px; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.06); color: #fff; font: inherit; font-size: 13.5px; font-weight: 600; min-height: 34px; text-align: left; }
.side-co-btn { border: 1px solid rgba(255,255,255,.18); cursor: pointer; width: calc(100% - 24px); }
.side-co-btn:hover { background: rgba(255,255,255,.12); }
.side-co-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; min-width: 0; }
.side-co-caret { flex: none; opacity: .8; }
.side-co-list { margin: 0 12px 8px; border-radius: 8px; background: #1F2B3E; border: 1px solid rgba(255,255,255,.14); padding: 4px; }
.side-co-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 6px; color: #DCE3EE; text-decoration: none; font-size: 13.5px; }
.side-co-item:hover, .side-co-item.on { background: rgba(255,255,255,.1); color: #fff; }
.side-co-item small { color: #93A3BC; font-size: 11.5px; }

/* 1.15.0 Push page: two cards side by side, one column on a phone */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 14px; }
.grid2 > .card { margin: 0; }

/* 1.16.0 single sign-on page: room between Sign in and Cancel */
.sso-cancel{margin-top:10px}

/* 1.16.5: Users > Set password (key at the row end, generator, switches) */
.cell-end { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.key-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; min-height: 28px; padding: 0; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted, #566074); cursor: pointer; flex: none; }
.key-btn:hover { background: rgba(47, 123, 246, .10); color: var(--accent); border-color: rgba(47, 123, 246, .25); }
.key-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.pw-gen { display: flex; gap: 8px; align-items: center; }
.pw-gen input { flex: 1; min-width: 0; }
.pw-gen .pw-wrap { flex: 1; min-width: 0; margin-top: 0; }
.gen-box { display: flex; gap: 8px; align-items: center; margin: -4px 0 10px; padding: 8px 10px; border-radius: 10px; background: rgba(47, 123, 246, .08); border: 1px solid rgba(47, 123, 246, .2); }
.gen-pw { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 15px; letter-spacing: .04em; overflow-wrap: anywhere; user-select: all; }
.sw-row { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.sw-row label { font-size: 14px; cursor: pointer; }

/* 1.16.6: Import wizard + price list */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 140px; padding: 18px; border: 2px dashed #c4ccdb; border-radius: 12px; background: #F7F9FC; text-align: center; cursor: pointer; }
.dropzone.over, .dropzone:focus-within { border-color: var(--accent); background: rgba(47, 123, 246, .06); }
.dropzone input[type=file] { max-width: 100%; font-size: 13px; }
.switch-row { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.facts-list { margin: 8px 0 4px; padding-left: 20px; line-height: 1.9; }
/* 1.16.9: partner page Users - compact row actions so all four fit on one line */
.pu-acts { gap: 6px; }
.pu-acts .btn.btn-sm { min-height: 30px; padding: 3px 10px; font-size: 13px; }
#partner-users .chip { white-space: normal; }

/* 1.17.0 Security pages: Glass Cards (frosted cards over colour blobs, compact KPI chips) */
main.sec-page { position: relative; isolation: isolate; }
main.sec-page::before { content: ""; position: absolute; inset: -24px -24px auto -24px; height: 520px; z-index: -1; pointer-events: none;
  background: radial-gradient(420px 260px at 12% 18%, rgba(56,189,248,.28), transparent 70%), radial-gradient(380px 260px at 58% 6%, rgba(168,85,247,.22), transparent 70%),
    radial-gradient(420px 300px at 92% 30%, rgba(59,130,246,.22), transparent 70%); filter: blur(8px); }
.glass-card { background: rgba(255,255,255,.66); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255,255,255,.75); box-shadow: 0 10px 30px rgba(15,23,42,.08); border-radius: 16px; }
.gc-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.gc-head h2 { margin: 0 0 2px; font-size: 17px; }
.gc-head .btn-row { margin: 0; flex-wrap: nowrap; }
.gc-head .btn-row .btn { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.gc-kpis .kpis { margin-bottom: 14px; }
.gc-settings { display: grid; gap: 10px; }
.gc-set { display: grid; grid-template-columns: 210px 220px 1fr; gap: 12px; align-items: center; }
.gc-set-l { font-weight: 600; }
.gc-set .pick-btn { width: 100%; }
td .pick-btn { min-height: 32px; padding: 2px 10px; width: 100%; }
tr.dt-row.warn td { background: rgba(245,158,11,.06); }
label.check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 14px; cursor: pointer; }
label.check input { width: 18px; height: 18px; margin: 0; }
.login-card label.check { color: #e4d8f8; }
@media (max-width: 760px) { .gc-set { grid-template-columns: 1fr; } .gc-head { flex-wrap: wrap; } }
.gc-head > .grow { flex: 1 1 auto; min-width: 0; }
/* 1.17.4 Device QR page */
.dq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); gap: 20px; align-items: start; }
.dq-form { display: grid; gap: 10px; }
.dq-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dq-f { display: grid; gap: 4px; align-content: start; }
.dq-l { font-weight: 600; font-size: 13px; }
.dq-f input { width: 100%; }
.dq-f .pick-btn { width: 100%; }
.dq-go { align-content: end; }
.dq-show { display: grid; gap: 10px; justify-items: center; text-align: center; background: #fff; border-radius: 16px; padding: 16px; }
.dq-show:fullscreen { align-content: center; background: #fff; }
.dq-show:fullscreen .dq-canvas { width: min(80vh, 80vw); height: auto; }
.dq-canvas { width: 100%; max-width: 340px; height: auto; image-rendering: pixelated; }
.dq-t { margin: 0; font-size: 16px; }
.dq-cd { font-weight: 700; font-variant-numeric: tabular-nums; }
.dq-meta { display: grid; gap: 2px; }
@media (max-width: 900px) { .dq-grid { grid-template-columns: 1fr; } .dq-two { grid-template-columns: 1fr; } }

/* 1.17.7 Devices (device registry) */
.dr-card .gc-kpis .kpis { margin: 4px 0 12px; }
.dr-name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.dr-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #c3c7d1; }
.dr-dot.on { background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.18); }
.dr-dl { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; margin: 12px 0 4px; font-size: 13.5px; }
.dr-dl dt { color: #64748b; }
.dr-dl dd { margin: 0; overflow-wrap: anywhere; }
.dr-apps, .dr-hist { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13.5px; }
.dr-apps li, .dr-hist li { padding: 6px 0; border-bottom: 1px solid rgba(15,23,42,.06); }
.dr-when { display: inline-block; min-width: 150px; color: #64748b; font-variant-numeric: tabular-nums; margin-right: 8px; }
.dr-sub-h { margin: 0 0 8px; font-size: 16px; }
.dr-card td .btn-small { min-height: 30px; padding: 0 10px; }

/* 1.17.10 View as (Raptool Admins): button on Companies and People rows */
.btn.btn-viewas { border-color: #7c5cff; color: #5b3fd6; background: rgba(124, 92, 255, .08); min-height: 32px; padding: 4px 12px; font-size: 13px; white-space: nowrap; }
.btn.btn-viewas:hover { background: rgba(124, 92, 255, .16); }

/* 1.17.11 Temporary / Permanent password */
.pill-pair { display: inline-flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.pill.pw-temp { font-size: 11px; padding: 1px 6px; }
.pw-kind { margin-top: 4px; }
.pw-kind-hint { margin: -4px 0 4px; }
