/* allott.cloud admin portal - styled to match the Keycloak "allott" sign-in theme (keycloak.v2 + allott blue/navy).
   Follows the device light/dark setting, like the sign-in pages. Per-tenant accent comes from /t/<realm>/brand.css. */
:root {
  --allott-blue: #1677ff;
  --allott-navy: #092442;
  --accent: var(--allott-blue);
  --accent-hover: #0f5fd6;
  --bg: #f0f0f0;
  --surface: #ffffff;
  --surface-2: #f5f6f8;
  --line: #d2d2d2;
  --line-soft: #e8e9eb;
  --ink: #151515;
  --muted: #4f5255;
  --link: #0f5fd6;
  --input-bg: #ffffff;
  --header-bg: var(--allott-navy);
  --header-ink: #ffffff;
  --header-muted: #c9d6e8;
  --nav-on-bg: #e7f0ff;
  --nav-on-ink: #0b3f9a;
  --ok-bg: #e8f5e9; --ok-ink: #1e4f18;
  --bad-bg: #fdecea; --bad-ink: #8a1c13;
  --warn-bg: #fff4e5; --warn-ink: #7a4100;
  --info-bg: #e7f0ff; --info-ink: #0b3f9a;
  --role-bg: #f1ebff; --role-ink: #4a2a92;
  --pill-bg: #ececec; --pill-ink: #2b2d30;
  --shadow: 0 1px 2px rgba(0, 0, 0, .08);
  --page-bg: radial-gradient(1200px 600px at 50% -10%, #dfe7f3 0%, #f0f0f0 60%);
  color-scheme: light;
}
/* theme choice (cookie allott_theme, shared with the sign-in pages): data-theme="dark" | "light" on <html>;
   no attribute = follow the device setting */
:root[data-theme="dark"] {
  --accent-hover: #4d94ff;
  --bg: #151515;
  --surface: #212427;
  --surface-2: #292c30;
  --line: #444548;
  --line-soft: #34373b;
  --ink: #e8e8e8;
  --muted: #b8bbbe;
  --link: #6aa7ff;
  --input-bg: #36373a;
  --header-bg: #0b1726;
  --header-ink: #ffffff;
  --header-muted: #b9c6d8;
  --nav-on-bg: #10284d;
  --nav-on-ink: #cfe1ff;
  --ok-bg: #16331a; --ok-ink: #b6e6b0;
  --bad-bg: #3d1714; --bad-ink: #ffc2bb;
  --warn-bg: #3a2a10; --warn-ink: #ffd9a1;
  --info-bg: #10284d; --info-ink: #cfe1ff;
  --role-bg: #2b2245; --role-ink: #dccfff;
  --pill-bg: #36373a; --pill-ink: #e0e0e0;
  --shadow: 0 1px 3px rgba(0, 0, 0, .5);
  --page-bg: radial-gradient(1200px 600px at 50% -10%, #1d2a3d 0%, #151515 60%);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent-hover: #4d94ff;
    --bg: #151515;
    --surface: #212427;
    --surface-2: #292c30;
    --line: #444548;
    --line-soft: #34373b;
    --ink: #e8e8e8;
    --muted: #b8bbbe;
    --link: #6aa7ff;
    --input-bg: #36373a;
    --header-bg: #0b1726;
    --header-ink: #ffffff;
    --header-muted: #b9c6d8;
    --nav-on-bg: #10284d;
    --nav-on-ink: #cfe1ff;
    --ok-bg: #16331a; --ok-ink: #b6e6b0;
    --bad-bg: #3d1714; --bad-ink: #ffc2bb;
    --warn-bg: #3a2a10; --warn-ink: #ffd9a1;
    --info-bg: #10284d; --info-ink: #cfe1ff;
    --role-bg: #2b2245; --role-ink: #dccfff;
    --pill-bg: #36373a; --pill-ink: #e0e0e0;
    --shadow: 0 1px 3px rgba(0, 0, 0, .5);
    --page-bg: radial-gradient(1200px 600px at 50% -10%, #1d2a3d 0%, #151515 60%);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--page-bg); background-attachment: fixed; color: var(--ink);
  font: 15px/1.5 "Red Hat Text", "RedHatText", Inter, "Segoe UI", system-ui, -apple-system, sans-serif; min-height: 100vh; }
a { color: var(--link); } a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: "Red Hat Display", "RedHatDisplay", Inter, "Segoe UI", system-ui, sans-serif; }
h1 { font-size: 26px; margin: 0 0 4px; font-weight: 600; } h2 { font-size: 17px; margin: 0 0 12px; font-weight: 600; } h3 { font-size: 15px; margin: 0 0 8px; font-weight: 600; }
code { font-size: 13px; }
.muted { color: var(--muted); font-size: 13px; }

/* header: navy bar like the brand, logo shown as-is */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 10px 24px; background: var(--header-bg); color: var(--header-ink); border-bottom: 3px solid var(--allott-blue); }
.top .brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; letter-spacing: .06em; text-transform: uppercase; }
.top .logo { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; letter-spacing: 0; }
.top .logo.img { background: transparent; border-radius: 0; }
.top .logo img { width: 32px; height: 32px; object-fit: contain; background: transparent; }
.top .tenant { color: var(--header-muted); font-size: 13px; letter-spacing: .04em; }
.top .spacer { flex: 1; }
.top a { color: var(--header-muted); } .top a:hover { color: var(--header-ink); }
.top .me { font-size: 14px; color: var(--header-muted); }

.shell { display: flex; flex-wrap: wrap; min-height: calc(100vh - 58px); }
nav.side { flex: 1 1 210px; max-width: 100%; background: var(--surface); border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
nav.side a { display: flex; align-items: center; min-height: 42px; padding: 8px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; font-weight: 500; }
nav.side a:hover { background: var(--surface-2); }
nav.side a.on { background: var(--nav-on-bg); color: var(--nav-on-ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--allott-blue); }
nav.side .soon { color: var(--muted); font-size: 13px; padding: 6px 12px; }
nav.side .foot { margin-top: auto; padding: 12px; font-size: 12px; color: var(--muted); }
main { flex: 999 1 640px; min-width: 0; padding: 24px 32px 56px; display: flex; flex-direction: column; gap: 18px; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }

/* cards: same surface + blue top edge as the sign-in card */
.card { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--allott-blue); border-radius: 4px; padding: 18px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow-x: auto; }
.card.flush > h2, .card.flush > .pad { padding: 16px 18px 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.grid.wide { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.kpi .label { color: var(--muted); font-size: 13px; } .kpi .value { font-size: 28px; font-weight: 600; font-family: "Red Hat Display", Inter, system-ui, sans-serif; } .kpi .note { font-size: 13px; color: var(--muted); }
.kpi .warn { color: var(--warn-ink); font-weight: 600; } .kpi .good { color: var(--ok-ink); font-weight: 600; }
.cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.cols > .main { flex: 3 1 520px; min-width: 0; } .cols > .side { flex: 2 1 320px; min-width: 0; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tr.dim td { color: var(--muted); }

.pill { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: var(--pill-bg); color: var(--pill-ink); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok-ink); } .pill.bad { background: var(--bad-bg); color: var(--bad-ink); }
.pill.warn { background: var(--warn-bg); color: var(--warn-ink); } .pill.info { background: var(--info-bg); color: var(--info-ink); } .pill.role { background: var(--role-bg); color: var(--role-ink); }

/* buttons: PatternFly-like, allott blue primary (same as the sign-in button) */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--bad-ink); border-color: var(--bad-ink); } .btn.danger:hover { background: var(--bad-bg); }
.btn.small { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; } .actions form { margin: 0; }

/* forms: same input look as the sign-in page (filled field, blue underline on focus) */
form.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink); font-weight: 600; }
label.inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.row label { flex: 1 1 180px; }
input[type=text], input[type=email], input[type=search], select, textarea { font: inherit; font-size: 14px; border: 1px solid var(--line); border-bottom: 2px solid var(--line); border-radius: 3px; padding: 9px 12px; min-height: 40px; background: var(--input-bg); color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-bottom-color: var(--allott-blue); }
a:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--allott-blue); outline-offset: 2px; }
fieldset.card { margin: 0; }

.flash { border-radius: 3px; padding: 12px 16px; font-size: 14px; border: 1px solid transparent; border-left: 4px solid var(--ok-ink); background: var(--ok-bg); color: var(--ok-ink); }
.flash.err { border-left-color: var(--bad-ink); background: var(--bad-bg); color: var(--bad-ink); }
.rule { border: 1px solid var(--line); border-left: 4px solid var(--allott-blue); background: var(--surface-2); border-radius: 3px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.secret { font-family: ui-monospace, Consolas, monospace; font-size: 22px; letter-spacing: .04em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 3px; padding: 12px 16px; user-select: all; word-break: break-all; }
.list > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }

.chart { display: flex; align-items: flex-end; gap: 12px; height: 150px; border-bottom: 1px solid var(--line); padding: 0 4px; }
.chart .col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.chart .ok { width: 100%; max-width: 34px; background: var(--allott-blue); border-radius: 3px 3px 0 0; }
.chart .fail { width: 100%; max-width: 34px; background: #f0a33a; border-radius: 3px; }
.chart .spam { width: 100%; max-width: 34px; background: #e6c229; }
.chart .col .fail + .spam, .chart .col .spam + .ok { border-top-left-radius: 0; border-top-right-radius: 0; }
.days { display: flex; gap: 12px; padding: 6px 4px 0; } .days span { flex: 1; text-align: center; font-size: 12px; color: var(--muted); }
.bar { height: 8px; border-radius: 999px; background: var(--line-soft); } .bar > div { height: 8px; border-radius: 999px; background: var(--accent); }

/* sign-in pages (landing, no-access): same as the Keycloak sign-in page - dark page background in BOTH colour
   schemes with the light logo above the card; only the card follows light/dark */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 6vh 16px 32px;
  background: radial-gradient(1200px 600px at 50% -10%, #2a2f36 0%, #151515 55%), #151515; }
.login .brandmark { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 28px; }
.login .brandmark img { width: 84px; height: 84px; object-fit: contain; }
.login .brandmark .name { font-family: "Red Hat Display", Inter, system-ui, sans-serif; font-size: 26px; letter-spacing: .14em; text-transform: uppercase; color: #ffffff; font-weight: 400; }
.login .card { width: 100%; max-width: 480px; padding: 32px 32px 28px; display: flex; flex-direction: column; gap: 14px; }
.login .card h1 { font-size: 24px; }
.login .btn { width: 100%; }
.login .or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 2px 0; }
.login .or::before, .login .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

.h-0{height:0}.h-5{height:5%}.h-10{height:10%}.h-15{height:15%}.h-20{height:20%}.h-25{height:25%}.h-30{height:30%}.h-35{height:35%}.h-40{height:40%}.h-45{height:45%}.h-50{height:50%}.h-55{height:55%}.h-60{height:60%}.h-65{height:65%}.h-70{height:70%}.h-75{height:75%}.h-80{height:80%}.h-85{height:85%}.h-90{height:90%}.h-95{height:95%}.h-100{height:100%}
.w-0{width:0}.w-5{width:5%}.w-10{width:10%}.w-15{width:15%}.w-20{width:20%}.w-25{width:25%}.w-30{width:30%}.w-35{width:35%}.w-40{width:40%}.w-45{width:45%}.w-50{width:50%}.w-55{width:55%}.w-60{width:60%}.w-65{width:65%}.w-70{width:70%}.w-75{width:75%}.w-80{width:80%}.w-85{width:85%}.w-90{width:90%}.w-95{width:95%}.w-100{width:100%}
.sr { position: absolute; left: -9999px; }
.logo-preview { background: #1b1d21; border-radius: 4px; padding: 18px; display: flex; justify-content: center; }
.logo-preview img { max-width: 160px; max-height: 120px; object-fit: contain; }
input[type=color] { width: 72px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 3px; background: var(--input-bg); }
input[type=file] { font: inherit; font-size: 14px; color: var(--ink); }

/* theme switch: Follow system | Light | Dark (same control as on the sign-in pages) */
.theme-switch { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; }
.theme-switch .label { margin-right: 6px; }
.theme-switch a { padding: 4px 9px; border: 1px solid transparent; border-radius: 3px; text-decoration: none; }
.theme-switch a[aria-current="true"] { border-color: currentColor; font-weight: 600; }
.top .theme-switch .label, .top .theme-switch a { color: var(--header-muted); }
.top .theme-switch a[aria-current="true"], .top .theme-switch a:hover { color: var(--header-ink); }
.login .theme-switch { margin-top: 18px; }
.login .theme-switch .label, .login .theme-switch a { color: #c9cdd2; }
.login .theme-switch a[aria-current="true"], .login .theme-switch a:hover { color: #ffffff; }
@media (max-width: 700px) { main { padding: 16px; } .top { padding: 10px 16px; } .login .card { padding: 24px 20px; } }
