/* RadWorks portal skin (2026-10-21): tighter, smaller, glass. Violet RW palette 2026-10-22.
 *
 * Loaded by the portal and the staff console only, after the shared shell.
 * _shared/radtool-saas.css is symlinked into many apps, so every change here is
 * an override, never an edit there. Contrast pairs measured against the light
 * page tint and the dark rail; re-measure if a colour changes.
 */
:root {
  --t-display: 24px;
  --t-h2: 15px;
  --t-h3: 14px;
  --t-body: 14px;
  --t-sm: 13px;
  --bg: #F3F0FA;
  --font-display: 'Poppins', 'Inter', system-ui, sans-serif;
  --glass: rgba(255, 255, 255, 0.68);
  --glass-edge: rgba(255, 255, 255, 0.85);
  --glass-line: rgba(15, 23, 42, 0.08);
  --blur: blur(18px) saturate(160%);
  --shadow-sm: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 1px 2px rgba(15, 23, 42, 0.04),
               0 6px 20px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 10px 30px rgba(15, 23, 42, 0.09);
}

body {
  font-size: 14px;
  line-height: 1.5;
  background:
    radial-gradient(1100px 620px at 88% -12%, rgba(139, 61, 255, 0.14), transparent 62%),
    radial-gradient(900px 620px at 8% 112%, rgba(166, 42, 253, 0.08), transparent 62%),
    radial-gradient(760px 520px at 50% 55%, rgba(91, 18, 218, 0.05), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}

/* ---- rail ---- */
.side {
  width: 224px;
  padding: 16px 0 10px;
  background:
    radial-gradient(420px 260px at 100% 0%, rgba(166, 42, 253, 0.28), transparent 70%),
    linear-gradient(180deg, #1B0C42 0%, #0D0621 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.03) inset;
}
.side-brand { padding: 0 18px 10px; }
.side-brand .eyebrow { font-size: 10px; }
.side-brand .word { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 19px; line-height: 1.25; letter-spacing: -0.015em; }
.side-brand .brand-ic { width: 26px; height: 26px; border-radius: 7px; flex: none; }
.side-brand .tag { font-size: 12px; margin-top: 2px; }

/* The client switcher: whose account this is, and a menu to move between them. */
.acct { position: relative; margin: 2px 10px 10px; }
.acct-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 10px; border-radius: 10px; text-align: left;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--side-ink); font: inherit; cursor: default;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.acct-btn:disabled { opacity: 1; }
.acct-btn[data-switchable='yes'] { cursor: pointer; }
.acct-btn[data-switchable='yes']:hover { background: rgba(255, 255, 255, 0.10); border-color: rgba(255, 255, 255, 0.18); }
.acct-btn:focus-visible { outline: 2px solid var(--accent-on-dark); outline-offset: 2px; }
.acct-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.acct-eyebrow { font: 500 10.5px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--side-dim); }
.acct-name { font: 600 13.5px/1.35 var(--font-body); color: #FFFFFF;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-chev { flex: none; width: 8px; height: 8px; margin-right: 2px;
  border-right: 1.5px solid var(--side-dim); border-bottom: 1.5px solid var(--side-dim);
  transform: translateY(-2px) rotate(45deg); transition: transform var(--dur) var(--ease); }
.acct-btn[data-switchable='no'] .acct-chev { display: none; }
.acct-btn[aria-expanded='true'] .acct-chev { transform: translateY(2px) rotate(-135deg); }

.acct-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  padding: 5px; border-radius: 12px;
  background: rgba(27, 12, 66, 0.94);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  max-height: min(60vh, 420px); overflow-y: auto;
}
/* minmax(0,1fr): a grid column otherwise grows to its longest name and clips the role. */
.acct-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; }
.acct-opt {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px; width: 100%;
  padding: 6px 8px; border: 0; border-radius: 7px; background: none; text-align: left;
  color: var(--side-ink); font: 500 13px/1.35 var(--font-body); cursor: pointer;
}
.acct-opt:hover, .acct-opt:focus-visible { background: rgba(255, 255, 255, 0.08); outline: none; }
.acct-opt.on { background: rgba(196, 163, 255, 0.16); color: #FFFFFF; font-weight: 600; }
.acct-opt-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-role { flex: none; font-size: 11px; color: var(--side-dim); font-weight: 500; }
.acct-opt.act { color: var(--accent-on-dark); }
.acct-sep { height: 1px; margin: 5px 4px; background: rgba(255, 255, 255, 0.10); }
.acct-find {
  width: 100%; margin: 0 0 4px; padding: 6px 8px; border-radius: 7px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14);
  color: #FFFFFF; font: 400 13px var(--font-body);
}
.acct-find::placeholder { color: var(--side-dim); }
.acct-find:focus { outline: 2px solid var(--accent-on-dark); outline-offset: 0; }

.side-nav { padding: 2px 10px; }
.side-nav .nav-item { padding: 7px 10px; margin-bottom: 1px; font-size: 13.5px; border-radius: 8px; }
.side-nav .nav-item.on { background: rgba(255, 255, 255, 0.09); }
.side-nav .nav-label { font-size: 10px; padding: 10px 10px 4px; }

/* The footer: who is signed in, then one link per line. Side by side, the three
   links wrapped onto three lines each in a 248px rail. */
.side-foot { padding: 8px 10px 0; border-top-color: rgba(255, 255, 255, 0.08); }
.side-foot .who { font-size: 12px; margin: 0 0 4px; padding: 0 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; }
.side-foot .foot-links { flex-direction: column; gap: 0; }
.side-foot .foot-links a, .side-foot .foot-links button {
  display: block; padding: 5px 8px; border-radius: 7px; white-space: nowrap;
  font-size: 13px; text-decoration: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.side-foot .foot-links a:hover, .side-foot .foot-links button:hover { background: rgba(255, 255, 255, 0.06); }

/* ---- page ---- */
.main { padding: 22px 30px 40px; }
.main-inner { max-width: 1120px; }
.page-title { font-size: var(--t-display); line-height: 1.2; font-weight: 700; letter-spacing: -0.015em; }
.page-sub { font-size: 13.5px; margin: 2px 0 12px; }
.page-sub:empty { margin-bottom: 8px; }

.card {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.card-title { font-size: var(--t-h2); margin-bottom: 8px; }

.field { margin-bottom: 10px; }
.label { font-size: 12.5px; margin-bottom: 3px; }
.input, select.input, textarea.input {
  padding: 7px 10px; font-size: 14px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.14);
}
.input:focus { outline-offset: 0; }

.btn { padding: 6px 13px; font-size: 13.5px; border-radius: 8px; gap: 6px;
  background: rgba(255, 255, 255, 0.92); }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn.primary { background: linear-gradient(180deg, #7A1EFA 0%, var(--accent-fill) 100%); }
.btn.primary:hover { filter: brightness(0.95); box-shadow: 0 4px 14px rgba(91, 18, 218, 0.28); }
.linklike { font-size: 13.5px; }

.chip { padding: 2px 10px; font-size: 12.5px; background: rgba(255, 255, 255, 0.75); }
.empty { font-size: 13.5px; padding: 18px 12px; }
.msg { font-size: 13px; min-height: 0; }
.note-banner { padding: 8px 12px; margin-bottom: 12px; font-size: 13.5px; gap: 10px; border-radius: 10px; }

.toast { padding: 9px 14px; font-size: 13.5px; border-radius: 10px;
  background: rgba(27, 12, 66, 0.94);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.toast.err { background: rgba(127, 29, 29, 0.95); }

/* ---- tables: denser rows, a glass frame ---- */
.data-table-wrap { border-radius: 12px; box-shadow: var(--shadow-sm); }
.data-table { font-size: 13px; }
/* Sentence-case headers: uppercase cost a third more width, and with ten columns
   that pushed the table past the frame at 1440. */
.data-table th { padding: 8px 10px; font-size: 13px; font-weight: 600; text-transform: none;
  letter-spacing: 0; }
.data-table[data-rt-sort] th:not(.col-check):not([data-nosort]) { padding-right: 22px; }
.data-table td { padding: 6px 10px; }
.table-actions { min-height: 34px; margin-bottom: 6px; }
.dot { margin-right: 5px; }

/* ---- sign-in ---- */
.login-wrap { background: transparent; }
.login-card {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge); border-radius: 18px;
  padding: 26px 28px; box-shadow: var(--shadow-md);
}
.login-card .login-logo { display: block; width: 190px; height: auto; margin: 0 0 16px; }
.card-title { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }

@media (max-width: 820px) {
  .side { width: 100%; }
  .main { padding: 16px 14px 36px; }
}
@media (max-width: 700px) {
  .acct { margin: 0 12px 8px; }
  .side-foot .who { padding: 0; margin: 0; flex: 1 1 100%; }
  .side-foot .foot-links { flex-direction: row; flex-wrap: wrap; gap: 4px 6px; }
  .side-foot .foot-links a { padding: 6px 8px; }
}
