/* Lato is bundled locally; the admin site makes no third-party font request. */
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/Lato-Regular-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/Lato-Regular-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/Lato-Bold-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/Lato-Bold-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Lato";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/Lato-Italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lato";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/Lato-Italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  font-family: "Lato", sans-serif;
  color: #10232d;
  background: #f4f6f7;
  --nav-dark: #004b69;
  --nav: #006f99;
  --blue: #087daa;
  --blue-bright: #079bd0;
  --border: #78919d;
  --strong-border: #082f40;
  --muted: #607783;
  --danger: #b42318;
  --surface: #fff;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #f4f6f7;
}
button, input, textarea, select { font: inherit; }
a { color: #006e9b; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Matches the public index: 52px bar and 24px logo. */
.admin-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  flex: 0 0 52px;
  height: 52px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(105deg, #004b69 0%, #0086b8 100%);
}
.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  flex: 0 1 auto;
}
.brand img {
  display: block;
  width: auto;
  height: 24px;
  max-width: 100%;
}
.header-tools {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
}
.admin-nav {
  min-width: 0;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}
.admin-nav a,
.admin-nav button {
  min-height: 51px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.admin-nav a:hover,
.admin-nav button:hover { background: rgba(255, 255, 255, .13); }
.admin-nav form { margin: 0; display: flex; }
.menu-toggle {
  display: none;
  width: 42px;
  height: 40px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(0, 0, 0, .12);
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  height: 3px;
  margin: 4px 0;
  background: #fff;
}

main {
  width: min(1420px, calc(100% - 36px));
  margin: 34px auto 64px;
  flex: 1 0 auto;
}

/* Matches the compact dark footer from the public index. */
.admin-footer {
  flex: 0 0 auto;
  min-height: 50px;
  padding: 10px 14px 12px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: #1a1a1a;
  color: #fff;
}
.footer-brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.footer-brand img {
  width: 220px;
  height: auto;
  max-height: 28px;
  object-fit: contain;
  object-position: left center;
}
.footer-copyright {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.panel {
  margin-bottom: 24px;
  padding: 30px;
  border: 2px solid var(--strong-border);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(18, 57, 75, .08);
}
h1, h2 { margin: 0 0 14px; color: #066f9c; }
h1 { font-size: clamp(28px, 3vw, 44px); line-height: 1.12; }
h2 { font-size: 23px; }
p { line-height: 1.55; }
.eyebrow {
  margin: 0 0 10px;
  color: #006d98;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.5px;
}
.muted { color: var(--muted); }
.notice {
  margin: 20px 0;
  padding: 14px 16px;
  border-left: 5px solid #e2a600;
  background: #fff8d9;
  color: #4f3b00;
  line-height: 1.45;
}

label {
  display: block;
  margin: 18px 0 0;
  color: #075f86;
  font-size: 14px;
  font-weight: 800;
}
small { color: var(--muted); font-weight: 500; }
input, textarea, select {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 11px 12px;
  border: 2px solid var(--border);
  border-radius: 0;
  background: #fff;
  color: #12212a;
}
input::placeholder, textarea::placeholder { color: #9a9a9a; }
textarea { min-height: 110px; resize: vertical; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.check { display: flex; align-items: center; gap: 9px; }
.check input { width: auto; margin: 0; accent-color: var(--blue); }
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}
.actions a:not(.button-link) { font-weight: 800; }
.primary,
.button-link,
.secondary-button {
  min-height: 42px;
  padding: 7px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--strong-border);
  border-radius: 0;
  background: linear-gradient(90deg, #006d96, #0b91c0);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}
.primary:hover, .button-link:hover { background: #075f83; }
.secondary-button { background: #087daa; color: #fff; }
.secondary-button:hover { background: #075f83; }
.primary:disabled, .danger:disabled { cursor: not-allowed; opacity: .5; }
.danger {
  padding: 7px 12px;
  border: 2px solid #9b1c13;
  border-radius: 0;
  background: #fff1f0;
  color: var(--danger);
  font-weight: 900;
  cursor: pointer;
}
.danger:hover:not(:disabled) { background: #b42318; color: #fff; }

/* New English-only login page. */
.login-page { background: #fff; }
.login-page main {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.admin-login {
  width: min(820px, calc(100% - 32px));
  padding: 40px 0 34px;
}
.admin-login h1 {
  margin-bottom: 26px;
  text-align: center;
  font-size: clamp(27px, 1.8vw, 32px);
  font-weight: 700;
  line-height: 1.15;
}
.login-form { width: 100%; }
.login-field {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}
.login-field > label,
.login-field > .field-label {
  margin: 0;
  color: #006c98;
  font-size: clamp(18px, 1.25vw, 21px);
  font-weight: 800;
  line-height: 1.15;
}
.login-field > input,
.email-control,
.factor-buttons,
.verify-submit,
.recovery-code-button { min-height: 38px; }
.login-field > input {
  height: 38px;
  margin: 0;
  padding: 5px 10px;
  border: 2px solid #111;
  font-size: 15px;
}
.email-control {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
}
.email-control input {
  min-width: 0;
  height: 38px;
  margin: 0;
  padding: 5px 10px;
  border: 2px solid #111;
  border-right: 0;
  font-size: 15px;
}
.email-control span {
  min-width: 230px;
  min-height: 38px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #111;
  background: #ddd;
  color: #111;
  font-size: 15px;
  font-weight: 700;
}
.factor-buttons {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(190px, .9fr);
  gap: 8px;
}
.verify-submit,
.recovery-code-button {
  width: 100%;
  padding: 5px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px solid #111;
  background: linear-gradient(90deg, #00678d, #079bd0);
  color: #fff;
  font-size: 15.5px;
  font-weight: 800;
  cursor: pointer;
}
.recovery-code-button {
  border: 2px solid #111;
  background: linear-gradient(90deg, #00678d, #079bd0);
  color: #fff;
  font-size: 14px;
}
.verify-submit:hover,
.recovery-code-button:hover { background: #076287; }
.verify-submit:disabled,
.recovery-code-button:disabled,
.recovery-code-dialog button:disabled { cursor: wait; opacity: .65; }
.login-status {
  min-height: 20px;
  margin: 10px 0 0 154px;
  color: #005f85;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
.login-actions {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: 12px;
}
.login-actions > * {
  min-width: 108px;
  min-height: 38px;
  padding: 5px 16px;
  font-size: 15px;
}
.login-error {
  margin: 0 0 18px;
  color: #c10000;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}
.login-error strong, .login-error span { display: inline; }
.cookie-notice {
  max-width: 720px;
  margin: 30px auto 0;
  padding: 18px 18px;
  border: 2px solid var(--strong-border);
  background: linear-gradient(100deg, #005776, #0996c8);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}
.recovery-dialog {
  width: min(760px, calc(100% - 32px));
  padding: 24px 24px 18px;
  border: 2px solid var(--strong-border);
  background: #fff;
  color: #111;
  text-align: center;
}
.recovery-dialog::backdrop { background: rgba(0, 0, 0, .55); }
.recovery-dialog h2 { color: #006e9b; font-size: 27px; }
.recovery-dialog p {
  margin: 20px auto 42px;
  max-width: 680px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}
.recovery-code-dialog form {
  width: min(540px, 100%);
  margin: 0 auto;
  text-align: left;
}
.recovery-code-dialog label {
  display: block;
  color: #006e9b;
  font-weight: 800;
}
.recovery-code-dialog input {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border: 2px solid #111;
  font: 700 16px/1.2 "Lato", sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.recovery-code-dialog .login-status {
  margin: 8px 0 0;
  color: #b42318;
  text-align: left;
}
.dialog-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 12px;
}
.dialog-close {
  border: 0;
  background: transparent;
  color: #00933b;
  font-size: 27px;
  font-weight: 900;
  cursor: pointer;
}

.auth-page main { width: min(800px, calc(100% - 32px)); }
.auth {
  width: 100%;
  margin: 60px auto;
  text-align: center;
}
.auth label { text-align: left; }
.auth .actions { justify-content: center; }
.auth .muted { min-height: 24px; font-weight: 700; }
.key-icon {
  width: 74px;
  height: 74px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border: 3px solid var(--strong-border);
  border-radius: 50%;
  background: #e7f7fd;
  font-size: 37px;
}
.key-button { width: min(460px, 100%); margin-top: 12px; }

.dashboard-page { background: #fff; }
.dashboard-page main {
  width: min(1600px, calc(100% - 46px));
  margin: 30px auto 54px;
}
.dashboard-welcome {
  padding: 0 20px 14px;
  text-align: center;
}
.dashboard-welcome h1 {
  margin-bottom: 4px;
  font-size: clamp(28px, 2.5vw, 38px);
}
.dashboard-welcome h1 span { color: #0087bb; }
.role-line {
  margin: 0;
  color: #111;
  font-size: 20px;
  font-weight: 700;
}
.role-line strong { color: #0087bb; }
.dashboard-section { margin-top: 10px; }
.dashboard-section > h2,
.dashboard-heading-row > h2 {
  margin: 0;
  color: #00698f;
  font-size: clamp(22px, 2vw, 29px);
  text-align: center;
}
.dashboard-heading-row {
  position: relative;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.range-picker {
  position: absolute;
  right: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
  white-space: nowrap;
}
.range-picker a {
  color: #111;
  font-size: 19px;
  text-decoration: none;
}
.range-picker a:hover { color: #007daa; }
.range-picker a.active {
  color: #0087bb;
  font-size: 25px;
  font-weight: 900;
}
.dashboard-stats {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.data-card {
  min-height: 210px;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--strong-border);
  background: linear-gradient(105deg, #004e6c, #107da3);
  color: #fff;
  text-align: center;
}
.data-card strong {
  font-size: clamp(40px, 4.1vw, 68px);
  line-height: 1;
}
.data-card span {
  margin-top: 14px;
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1.25;
}
.dashboard-action-grid {
  width: min(1340px, 100%);
  margin: 14px auto 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.dashboard-action {
  min-height: 112px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--strong-border);
  background: linear-gradient(105deg, #004d6a, #117ea4);
  color: #fff;
  font-size: clamp(18px, 1.65vw, 25px);
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
}
.dashboard-action small {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.05;
}
a.dashboard-action:hover { background: #075c7e; }
.dashboard-action.is-pending { cursor: not-allowed; }
.analytics-grid .dashboard-action { min-height: 116px; }
.account-action-grid {
  width: min(560px, 100%);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.account-action-grid:has(> :only-child) {
  width: min(280px, 100%);
  grid-template-columns: 1fr;
}
.dashboard-recent {
  width: min(1320px, 100%);
  margin: 22px auto 0;
}
.dashboard-recent table { margin-top: 16px; }
.dashboard-recent th { background: #e6f2f7; }
.danger-zone {
  margin: 26px auto 0;
  text-align: center;
}
.danger-zone h2 {
  color: #c40000;
  font-size: 25px;
}
.danger-zone h2 small { font-size: .72em; }
.danger-zone button {
  width: 250px;
  min-height: 116px;
  border: 2px solid #111;
  background: #e00000;
  color: #fff;
  font-size: 25px;
  font-weight: 900;
  line-height: 1.05;
  opacity: 1;
  cursor: not-allowed;
}

.language-packs-screen main {
  width: min(1500px, calc(100% - 38px));
  margin: 30px auto 60px;
}
.language-packs-page > header {
  text-align: center;
}
.language-packs-page > header > a {
  float: left;
  color: #111;
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
}
.language-packs-page > header h1 {
  margin: 0;
  color: #0078a6;
  font-size: clamp(30px, 3vw, 42px);
}
.language-packs-page > header p {
  margin: 7px 0 22px;
}
.language-pack-create {
  width: min(720px, 100%);
  margin: 0 auto 18px;
  padding: 15px;
  display: flex;
  align-items: end;
  gap: 12px;
  border: 2px solid var(--strong-border);
  background: #edf7fb;
}
.language-pack-create label { flex: 1; margin: 0; }
.language-pack-create select { margin-top: 5px; }
.language-pack-tabs {
  margin: 16px 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.language-pack-tabs a,
.language-pack-tabs span {
  padding: 9px 14px;
  border: 2px solid var(--strong-border);
  background: #e7f3f8;
  color: #08475f;
  font-weight: 900;
  text-decoration: none;
}
.language-pack-tabs a.active {
  background: linear-gradient(105deg, #004d6a, #117ea4);
  color: #fff;
}
.language-pack-editor {
  border: 2px solid var(--strong-border);
  background: #fff;
}
.language-pack-heading {
  padding: 17px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 2px solid var(--strong-border);
  background: #edf7fb;
}
.language-pack-heading h2 { margin: 0; color: #00698f; }
.language-pack-heading p { margin: 5px 0 0; }
.language-pack-search { width: min(360px, 100%); margin: 0; }
.language-pack-search input { margin-top: 5px; }
.language-pack-enabled {
  margin: 0;
  padding: 12px 17px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid #b6cbd4;
  background: #f8fbfc;
  font-weight: 900;
}
.language-pack-enabled input { width: 19px; height: 19px; }
.translation-grid { display: grid; }
.translation-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #b6cbd4;
}
.translation-row[hidden] { display: none; }
.translation-source,
.translation-target {
  min-width: 0;
  margin: 0;
  padding: 14px 16px;
}
.translation-source {
  border-right: 1px solid #b6cbd4;
  background: #f7fafb;
}
.translation-source small {
  display: block;
  color: #0876a0;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.translation-source p {
  margin: 7px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.translation-target span {
  display: block;
  margin-bottom: 5px;
  color: #47626e;
  font-size: 12px;
  font-weight: 900;
}
.translation-target textarea {
  min-height: 78px;
  margin: 0;
  resize: vertical;
}
.language-pack-save {
  padding: 14px 17px;
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-top: 2px solid var(--strong-border);
  background: rgba(255,255,255,.96);
}
.language-pack-empty { text-align: center; }

.accounts-screen main {
  width: min(1450px, calc(100% - 38px));
  margin: 34px auto 60px;
}
.accounts-page > h1 { color: #0078a6; }
.accounts-page table input,
.accounts-page table select { min-width: 150px; margin: 0; }
.accounts-page table .primary { margin-top: 7px; }
.account-unlock {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 12px;
}
.account-unlock input { min-width: 0 !important; width: 17px; height: 17px; }

.devices-screen main {
  width: min(1450px, calc(100% - 38px));
  margin: 30px auto 60px;
}
.devices-page > header {
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 90px 1fr 90px;
  align-items: start;
  text-align: center;
}
.devices-page > header > a {
  color: #111;
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
  text-align: left;
}
.devices-page > header h1 {
  margin: 0;
  color: #0078a6;
  font-size: clamp(30px, 3vw, 42px);
}
.devices-page > header p { margin: 5px 0; }
.device-confidential-notice {
  min-height: 170px;
  margin: 0 auto 22px;
  padding: 24px clamp(20px, 4vw, 56px);
  display: flex;
  justify-content: center;
  flex-direction: column;
  border: 2px solid #082a3d;
  background: linear-gradient(120deg, #07172f, #012b4b);
  background-position: center;
  background-size: cover;
  color: #fff;
  text-shadow: 0 2px 6px #000;
}
.device-confidential-notice h2 {
  margin: 0 0 8px;
  font-size: clamp(19px, 2vw, 26px);
  text-align: center;
}
.device-confidential-notice p {
  max-width: 1000px;
  margin: 0 auto;
  white-space: pre-wrap;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.55;
}
.device-resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.device-resource-card {
  min-width: 0;
  margin: 0;
}
.device-resource-card h2 {
  margin-top: 0;
  color: #00698f;
}
.device-resource-preview {
  min-height: 250px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #9bb0b9;
  background: #eaf2f5;
}
.device-resource-preview img {
  width: 100%;
  height: 250px;
  display: block;
  object-fit: contain;
}
.device-resource-preview .device-profile-preview {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
}
.device-resource-empty {
  padding: 25px;
  color: #536b76;
  text-align: center;
}
.device-resource-actions {
  min-height: 42px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.device-resource-actions small {
  color: #536b76;
  overflow-wrap: anywhere;
}
.device-policy-card {
  grid-column: 1 / -1;
}
.device-policy-card pre {
  min-height: 160px;
  max-height: 460px;
  margin: 0;
  padding: 15px;
  overflow: auto;
  border: 1px solid #9bb0b9;
  background: #f7fafb;
  color: #152d38;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 14px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.device-read-only {
  margin: 20px 0 0;
  padding: 12px 16px;
  border: 1px solid #9bb0b9;
  background: #edf7fb;
  text-align: center;
  font-weight: 800;
}
.device-owner-editor {
  width: min(1050px, 100%);
  margin: 24px auto 0;
}
.device-owner-editor h2 { color: #00698f; }
.device-owner-editor fieldset {
  min-width: 0;
  padding: 14px;
  border: 1px solid #9bb0b9;
}
.device-owner-editor legend {
  padding: 0 5px;
  font-weight: 900;
}
.device-owner-editor input[type="file"] {
  width: 100%;
}
.device-upload-grid {
  margin: 14px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.announcement-page {
  background: #fff;
  color: #111;
}
.announcement-page main {
  width: min(1280px, calc(100% - 36px));
  margin: 28px auto 42px;
}
.announcement-editor-page {
  position: relative;
  width: 100%;
}
.announcement-editor-page > h1 {
  margin: 0 0 16px;
  color: #0078a6;
  font-size: clamp(28px, 2.5vw, 36px);
  text-align: center;
}
.announcement-back {
  position: absolute;
  top: 5px;
  left: 0;
  color: #111;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}
.announcement-back:hover { color: #007daa; }
.announcement-preview-section > h2 {
  margin: 8px 0 5px;
  color: #111;
  font-size: 18px;
  font-weight: 400;
  text-align: center;
}
.announcement-site-preview {
  overflow: hidden;
  border: 1px solid #9ab0ba;
  background: #172a36;
}
.announcement-preview-bar {
  min-height: 34px;
  padding: 5px 38px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}
.announcement-preview-bar p { margin: 0; line-height: 1.25; }
.announcement-preview-bar a { color: inherit; }
.announcement-preview-bar #announcementPreviewText {
  width: 100%;
  min-width: 0;
  max-width: calc(100% - 60px);
  overflow-wrap: anywhere;
}
.announcement-preview-icon {
  width: 24px;
  height: 24px;
  position: absolute;
  left: 10px;
  display: grid;
  place-items: center;
  font-size: 20px;
}
.announcement-preview-icon img { width: 100%; height: 100%; object-fit: contain; }
.announcement-preview-close {
  position: absolute;
  right: 12px;
  font-size: 22px;
  line-height: 1;
}
.preview-placeholder { opacity: .7; }
.announcement-mini-nav {
  height: 44px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  background: linear-gradient(95deg, #253b48, #102532);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.announcement-mini-nav img {
  width: auto;
  height: 21px;
  margin-right: auto;
}
.announcement-mini-hero {
  height: 45px;
  background:
    linear-gradient(90deg, rgba(7, 26, 38, .55), rgba(0, 111, 153, .28)),
    linear-gradient(135deg, #77838a, #153246 55%, #405565);
}
.announcement-control-group { margin-top: 18px; }
.announcement-control-group > h2,
.announcement-text-control > h2 {
  margin: 0 0 6px;
  color: #111;
  font-size: 17px;
  font-weight: 400;
}
.colour-control {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(130px, .75fr) minmax(250px, 1.65fr) minmax(165px, .8fr) minmax(155px, .8fr) 70px;
  align-items: center;
  border: 2px solid #1a303b;
}
.colour-control > * { min-width: 0; }
.colour-control button {
  height: 44px;
  border: 0;
  background: #fff;
  color: #111;
  font-weight: 700;
  cursor: pointer;
}
.colour-control label {
  margin: 0;
  color: #111;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}
.colour-control input[type="color"] {
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  position: absolute;
  opacity: 0;
}
.colour-control output {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}
.colour-control input[type="text"] {
  height: 44px;
  margin: 0;
  padding: 6px 8px;
  border: 0;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}
.colour-swatch {
  width: 50px;
  height: 36px;
  justify-self: center;
  border: 1px solid #c8c8c8;
}
.announcement-background-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.announcement-background-actions button {
  min-height: 40px;
  padding: 7px 16px;
  border: 2px solid #17313e;
  background: #fff;
  color: #111;
  font-weight: 800;
  cursor: pointer;
}
.announcement-background-actions button.active {
  border-color: #0087bb;
  background: #e8f6fb;
  box-shadow: inset 0 0 0 1px #0087bb;
}
.announcement-background-actions span {
  color: #40515a;
  font-size: 14px;
  font-weight: 700;
}
.announcement-icon-picker {
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}
.announcement-icon-picker legend {
  margin-bottom: 8px;
  font-size: 17px;
}
.announcement-icon-options {
  display: grid;
  grid-template-columns: repeat(4, 130px) minmax(250px, 1fr);
  align-items: center;
  justify-content: center;
  gap: 30px;
}
.announcement-icon-option {
  position: relative;
  margin: 0;
  cursor: pointer;
}
.announcement-icon-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
}
.announcement-icon-option > span:not(.sr-only) {
  width: 94px;
  height: 94px;
  margin: auto;
  padding: 6px;
  display: block;
  border: 4px solid transparent;
}
.announcement-icon-option img { width: 100%; height: 100%; object-fit: contain; }
.announcement-icon-option input:checked + span {
  border-color: #0087bb;
  background: #e8f6fb;
}
.announcement-icon-option input:focus-visible + span {
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
}
.announcement-custom-icon {
  min-height: 98px;
  margin: 0;
  padding: 8px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  align-items: center;
  border: 2px solid #172f3b;
  color: #111;
  cursor: pointer;
}
.announcement-custom-icon > span {
  font-size: 16px;
  font-weight: 700;
}
.announcement-custom-icon input[type="radio"] {
  width: 18px;
  margin: 0;
}
.announcement-custom-icon input[type="file"],
.announcement-custom-icon input[type="url"] {
  grid-column: 1 / -1;
  min-height: 34px;
  margin: 0;
  padding: 5px 7px;
  border: 1px solid #526d79;
  font-size: 12px;
}
.announcement-text-control { margin-top: 18px; }
.announcement-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.announcement-toolbar button {
  min-width: 46px;
  min-height: 42px;
  padding: 5px 16px;
  border: 2px solid #17313e;
  background: #fff;
  color: #111;
  font-size: 17px;
  cursor: pointer;
}
.announcement-toolbar button:hover { background: #e8f3f7; }
.announcement-rich-editor {
  min-height: 420px;
  margin-top: 10px;
  padding: 16px;
  border: 2px solid #17313e;
  background: #fff;
  color: #111;
  line-height: 1.5;
}
.announcement-rich-editor img,
.announcement-preview-bar img {
  max-width: 100%;
  height: auto;
}
.announcement-rich-editor:empty::before {
  content: attr(data-placeholder);
  color: #89979d;
}
.announcement-rich-editor:focus {
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
}
.tte-gradient-text {
  background: linear-gradient(90deg, #005f83, #08a5dc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  color: transparent;
}
.tte-embedded-link {
  padding: 3px 8px;
  display: inline-block;
  border: 1px solid currentColor;
  border-radius: 3px;
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
}
.tte-embed {
  width: min(100%, 640px);
  margin: 10px auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 2px solid #17313e;
  background: #000;
}
.tte-embed iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}
.announcement-preview-bar .tte-embed {
  width: min(100%, 520px);
  margin: 7px auto;
}

.announcement-dialog {
  width: min(980px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 26px;
  overflow: auto;
  border: 3px solid #17313e;
  background: #fff;
  color: #111;
  box-shadow: 0 18px 65px rgba(0, 0, 0, .4);
}
.announcement-dialog::backdrop {
  background: rgba(0, 15, 23, .72);
}
.announcement-dialog > h2 {
  margin: -26px -26px 20px;
  padding: 13px 58px 13px 20px;
  background: linear-gradient(90deg, #005a7b, #079dce);
  color: #fff;
  font-size: 23px;
}
.announcement-dialog > h3 {
  margin: 18px 0 7px;
  color: #111;
  font-size: 17px;
}
.announcement-dialog > p {
  margin: 0 0 18px;
  line-height: 1.45;
}
.announcement-dialog > label {
  margin-top: 13px;
  display: block;
  color: #111;
  font-weight: 800;
}
.announcement-dialog > label input {
  margin-top: 5px;
}
.announcement-dialog .dialog-x {
  width: 42px;
  height: 42px;
  padding: 0;
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  border: 0;
  background: #ef4d4d;
  color: #fff;
  font-size: 25px;
  cursor: pointer;
}
.dialog-error {
  padding: 9px 11px;
  border-left: 5px solid #c40000;
  background: #ffeded;
  color: #980000;
  font-weight: 800;
}
.announcement-dialog .dialog-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 14px;
}
.announcement-dialog .dialog-actions button {
  min-width: 150px;
}
.gradient-strip-wrap {
  margin: 8px 0 16px;
  padding: 18px 20px 38px;
  border: 2px solid #0d1d26;
  background: #20242a;
}
.gradient-strip {
  height: 78px;
  border: 1px dashed #aab0b5;
  cursor: crosshair;
}
.gradient-stop-track {
  height: 30px;
  position: relative;
}
.gradient-stop {
  width: 28px;
  height: 30px;
  padding: 0;
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  border: 0;
  background: transparent;
  cursor: ew-resize;
  touch-action: none;
}
.gradient-stop::before {
  content: "";
  width: 0;
  height: 0;
  position: absolute;
  top: 0;
  left: 6px;
  border-right: 8px solid transparent;
  border-bottom: 13px solid #d9dde0;
  border-left: 8px solid transparent;
}
.gradient-stop::after {
  content: "";
  width: 12px;
  height: 12px;
  position: absolute;
  top: 14px;
  left: 8px;
  border: 2px solid #fff;
  background: var(--stop-colour);
  box-shadow: 0 0 0 1px #111;
}
.gradient-stop.selected::before {
  border-bottom-color: #fff000;
}
.gradient-stop.selected::after {
  box-shadow: 0 0 0 3px #fff000;
}
.gradient-point-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.gradient-point-actions button {
  min-width: 135px;
}
.gradient-point-actions button:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.gradient-position-row {
  margin-top: 16px;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) 90px auto auto 90px auto;
  gap: 8px;
  align-items: center;
}
.gradient-position-row label {
  margin: 0;
  color: #111;
  font-weight: 800;
}
.gradient-position-row input {
  min-height: 38px;
  margin: 0;
}
.gradient-position-row input[type="range"] {
  accent-color: #0089ba;
}
.announcement-save-actions {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
}
.announcement-save-actions > button {
  min-width: 230px;
  min-height: 50px;
  font-size: 19px;
}
.announcement-save-actions .announcement-delete {
  min-width: 110px;
}

.hero-editor-screen {
  background: #fff;
  color: #111;
}
.hero-editor-screen main {
  width: min(1180px, calc(100% - 36px));
  margin: 28px auto 42px;
}
.hero-editor-page {
  width: 100%;
  position: relative;
}
.hero-editor-page > h1 {
  margin: 0 0 12px;
  color: #0078a6;
  font-size: clamp(28px, 2.5vw, 36px);
  text-align: center;
}
.hero-editor-back {
  position: absolute;
  top: 4px;
  left: 0;
  color: #111;
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
}
.hero-editor-back:hover { color: #007daa; }
.hero-preview {
  width: min(100%, 840px);
  min-height: 124px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border: 2px solid #17313e;
  background-position: center;
  background-size: cover;
  color: #fff;
}
.hero-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .2), rgba(0, 0, 0, .48));
}
.hero-preview-overlay {
  position: absolute;
  inset: 0;
  padding: 14px 56px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-preview-above {
  font-size: 12px;
  font-style: italic;
  letter-spacing: .7px;
  opacity: .9;
}
.hero-preview-title {
  margin-top: 2px;
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 900;
  line-height: 1.05;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .55);
}
.hero-preview-cta {
  margin-top: 5px;
  border-bottom: 1px solid currentColor;
  font-size: 11px;
  font-style: italic;
}
.hero-preview-above p,
.hero-preview-title p,
.hero-preview-cta p { margin: 0; }
.hero-preview-arrow {
  width: 32px;
  height: 48px;
  padding: 0;
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  border: 0;
  background: rgba(0, 0, 0, .42);
  color: #fff;
  font-size: 22px;
}
.hero-preview-arrow.left { left: 0; }
.hero-preview-arrow.right { right: 0; }
.hero-preview-dot {
  width: 7px;
  height: 7px;
  position: absolute;
  bottom: 7px;
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #fff;
}
.hero-preview-caption {
  margin: 5px 0 12px;
  font-size: 17px;
  text-align: center;
}
.hero-background-settings > h2,
.hero-rich-field > h2 {
  margin: 10px 0 5px;
  color: #111;
  font-size: 17px;
  font-weight: 400;
}
.hero-background-drop {
  min-height: 98px;
  margin: 0 auto;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(250px, 1fr);
  align-items: center;
  gap: 8px 16px;
  border: 2px solid #17313e;
  color: #111;
  text-align: center;
  cursor: pointer;
}
.hero-background-drop.dragging {
  outline: 4px solid #ffbf47;
  outline-offset: 2px;
  background: #e9f8fd;
}
.hero-background-drop strong { grid-column: 1 / -1; }
.hero-background-drop label {
  margin: 0;
  display: grid;
  gap: 5px;
  color: #111;
  font-size: 13px;
  font-weight: 700;
}
.hero-background-drop input {
  min-height: 38px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #526d79;
  background: #fff;
  color: #111;
}
.hero-rich-field { margin-top: 10px; }
.hero-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero-toolbar button {
  min-width: 46px;
  min-height: 42px;
  padding: 5px 16px;
  border: 2px solid #17313e;
  background: #fff;
  color: #111;
  font-size: 17px;
  cursor: pointer;
}
.hero-toolbar button:hover { background: #e8f3f7; }
.hero-rich-editor {
  min-height: 96px;
  margin-top: 8px;
  padding: 12px;
  border: 2px solid #17313e;
  background: #fff;
  color: #111;
  line-height: 1.35;
}
.hero-rich-editor:focus {
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
}
.hero-link-field {
  margin-top: 12px;
  color: #111;
  font-size: 17px;
  font-weight: 400;
}
.hero-link-field input {
  min-height: 50px;
  margin-top: 5px;
  border: 2px solid #17313e;
}
.hero-duration-settings {
  margin: 16px 0 0;
  padding: 0;
  border: 0;
}
.hero-duration-settings legend {
  margin-bottom: 7px;
  color: #111;
  font-size: 17px;
  font-weight: 800;
}
.hero-duration-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.hero-duration-option,
.hero-custom-duration {
  min-height: 88px;
  margin: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid #17313e;
  background: #006285;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
}
.hero-duration-option.selected {
  outline: 4px solid #ffbf47;
  outline-offset: 2px;
  background: #0089ba;
}
.hero-custom-duration {
  background: #fff;
  color: #111;
  font-size: 16px;
}
.hero-custom-duration input {
  width: 100%;
  min-height: 35px;
  margin: 5px 0 2px;
  padding: 3px 6px;
  border: 1px solid #526d79;
  text-align: center;
}
.hero-custom-duration small { font-size: 11px; }
.hero-save-actions {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 70px;
}
.hero-save-actions > button {
  min-width: 220px;
  min-height: 50px;
  font-size: 19px;
}

.toolbar {
  margin-top: 8px;
  padding: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 2px solid var(--border);
  border-bottom: 0;
  background: #eaf2f6;
}
.toolbar button {
  padding: 6px 9px;
  border: 1px solid #52717f;
  background: #fff;
  color: #12384a;
  cursor: pointer;
}
.editor {
  min-height: 250px;
  padding: 14px;
  border: 2px solid var(--border);
  background: #fff;
  color: #111;
  line-height: 1.55;
}
.editor:focus { outline: 3px solid #ffbf47; outline-offset: 2px; }
.editor img { max-width: 100%; height: auto; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; margin-top: 18px; border-collapse: collapse; }
th, td {
  padding: 13px 10px;
  border-bottom: 1px solid #b8cbd4;
  font-size: 14px;
  text-align: left;
  vertical-align: middle;
}
th {
  background: #e8f2f6;
  color: #075f86;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.status { font-size: 12px; font-weight: 900; text-transform: uppercase; }
.status.published { color: #08783f; }
.status.draft { color: #9b5b00; }
.row-actions { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.row-actions a { font-weight: 900; }
.row-actions form { margin: 0; }
.security-panel { max-width: 1040px; margin-inline: auto; }
.session-lock-settings,
.recovery-settings {
  margin-top: 32px;
  padding-top: 26px;
  border-top: 2px solid var(--line);
}
.session-lock-settings h2,
.recovery-settings h2 { margin-bottom: 8px; }
.recovery-settings form { margin-top: 16px; }
.locked-setting {
  width: 100%;
  margin: 16px 0 7px;
  padding: 13px 15px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border: 2px solid #17313e;
  background: #eef9fd;
  color: #111;
  cursor: not-allowed;
}
.locked-setting input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #0088b8;
}
.locked-setting strong {
  color: #08783f;
  font-size: 12px;
  letter-spacing: .5px;
}
.recovery-codes-page {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}
.recovery-code-list {
  margin: 26px auto;
  padding: 22px 30px 22px 54px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px;
  border: 2px solid var(--strong-border);
  background: #f3fbfe;
  text-align: left;
}
.recovery-code-list code {
  color: #111;
  font: 800 15px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: nowrap;
}

@media (max-width: 1400px) {
  .dashboard-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .data-card { min-height: 170px; }
  .announcement-icon-options {
    grid-template-columns: repeat(4, 110px) minmax(230px, 1fr);
    gap: 18px;
  }
}

@media (max-width: 1250px) {
  .menu-toggle { display: block; }
  .admin-nav {
    display: none;
    position: absolute;
    top: 52px;
    right: 0;
    width: min(390px, 100vw);
    padding: 8px 0;
    flex-direction: column;
    align-items: stretch;
    border: 2px solid var(--strong-border);
    background: #004a68;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .24);
  }
  .admin-nav.open { display: flex; }
  .admin-nav a, .admin-nav button {
    width: 100%;
    min-height: 44px;
    padding: 10px 18px;
    justify-content: flex-start;
  }
  .admin-nav form { width: 100%; }
  .dashboard-action { font-size: 18px; }
}

@media (max-width: 900px) {
  main { width: min(100% - 24px, 1420px); margin-top: 22px; }
  .admin-login { padding-top: 32px; }
  .login-field {
    grid-template-columns: 125px minmax(0, 1fr);
  }
  .login-field > label,
  .login-field > .field-label { font-size: 19px; }
  .email-control span { min-width: 210px; font-size: 14px; }
  .dashboard-page main { width: min(100% - 24px, 1600px); }
  .dashboard-heading-row {
    gap: 8px;
    flex-direction: column;
  }
  .range-picker { position: static; }
  .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .announcement-back {
    position: static;
    display: inline-block;
    margin-bottom: 12px;
  }
  .announcement-editor-page > h1 { margin-top: -32px; }
  .colour-control {
    padding: 7px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }
  .colour-control label { grid-column: span 2; }
  .colour-control input[type="text"] { border: 1px solid #8aa0aa; }
  .gradient-position-row {
    grid-template-columns: auto minmax(150px, 1fr) 90px auto;
  }
  .gradient-position-row label[for="gradientAngle"] { grid-column: 1; }
  .announcement-icon-options {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }
  .announcement-custom-icon { grid-column: 1 / -1; }
  .announcement-save-actions { gap: 20px; }
  .hero-editor-back {
    position: static;
    display: inline-block;
    margin-bottom: 10px;
  }
  .hero-editor-page > h1 { margin-top: -32px; }
  .hero-background-drop { grid-template-columns: 1fr; }
  .hero-background-drop strong { grid-column: auto; }
  .hero-duration-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-save-actions { gap: 20px; }
  .grid { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 650px) {
  .admin-header { padding: 0 12px; }
  .brand img { height: 22px; }
  .admin-footer {
    align-items: center;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  .footer-brand img { width: 210px; }
  .footer-copyright { white-space: normal; font-size: 11px; }
  .admin-login { width: min(100% - 24px, 820px); padding-top: 24px; }
  .admin-login h1 { margin-bottom: 22px; font-size: 26px; }
  .login-field {
    display: block;
    margin-top: 18px;
  }
  .login-field > label,
  .login-field > .field-label {
    display: block;
    margin-bottom: 8px;
    font-size: 19px;
  }
  .email-control { grid-template-columns: minmax(0, 1fr); }
  .email-control input {
    border-right: 2px solid #111;
    border-bottom: 0;
  }
  .email-control span {
    min-width: 0;
    min-height: 36px;
    padding: 6px 8px;
    font-size: 14px;
  }
  .factor-buttons { grid-template-columns: 1fr; }
  .login-status { margin-left: 0; }
  .login-actions {
    flex-direction: column;
    gap: 10px;
    margin-top: 28px;
  }
  .login-actions > * { width: 100%; }
  .cookie-notice {
    margin-top: 24px;
    padding: 15px 12px;
    font-size: 14px;
  }
  .recovery-dialog { padding: 24px 18px 18px; }
  .recovery-dialog h2 { font-size: 24px; }
  .recovery-dialog p { margin-bottom: 32px; font-size: 16px; }
  .dialog-actions { flex-direction: column; }
  .dialog-actions > * { width: 100%; }
  .recovery-code-list {
    grid-template-columns: 1fr;
    padding-left: 48px;
  }
  .panel { padding: 20px 16px; }
  .dashboard-welcome { padding-inline: 14px; }
  .role-line { font-size: 18px; }
  .dashboard-stats,
  .dashboard-action-grid { grid-template-columns: 1fr; }
  .data-card { min-height: 145px; }
  .range-picker { gap: 5px; }
  .range-picker a { font-size: 14px; }
  .range-picker a.active { font-size: 18px; }
  .announcement-editor-page > h1 {
    margin-top: 0;
    font-size: 26px;
  }
  .announcement-mini-nav span { display: none; }
  .announcement-mini-nav img { margin: auto; }
  .announcement-preview-bar {
    padding-right: 34px;
    font-size: 14px;
  }
  .colour-control { grid-template-columns: 1fr; }
  .colour-control label { grid-column: auto; }
  .colour-control output,
  .colour-control input[type="text"] { text-align: center; }
  .announcement-dialog {
    width: min(100% - 16px, 980px);
    padding: 18px 12px;
  }
  .announcement-dialog > h2 {
    margin: -18px -12px 16px;
    padding-left: 13px;
    font-size: 20px;
  }
  .gradient-strip-wrap { padding-inline: 10px; }
  .gradient-strip { height: 60px; }
  .gradient-position-row {
    grid-template-columns: 1fr 80px auto;
  }
  .gradient-position-row label,
  .gradient-position-row input[type="range"] {
    grid-column: 1 / -1;
  }
  .gradient-position-row label[for="gradientAngle"] { grid-column: 1 / -1; }
  .gradient-point-actions button { flex: 1 1 120px; }
  .announcement-icon-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .announcement-icon-option > span:not(.sr-only) {
    width: 82px;
    height: 82px;
  }
  .announcement-custom-icon { grid-column: 1 / -1; }
  .announcement-toolbar button {
    min-height: 38px;
    padding: 4px 10px;
    font-size: 15px;
  }
  .announcement-rich-editor { min-height: 260px; }
  .announcement-save-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }
  .announcement-save-actions > button { width: 100%; min-width: 0; }
  .hero-editor-page > h1 {
    margin-top: 0;
    font-size: 26px;
  }
  .hero-preview { min-height: 150px; }
  .hero-preview-overlay { padding-inline: 42px; }
  .hero-preview-title { font-size: 22px; }
  .hero-toolbar button {
    flex: 1 1 42%;
    min-height: 38px;
    padding: 4px 8px;
    font-size: 15px;
  }
  .hero-duration-options { grid-template-columns: 1fr; }
  .hero-save-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }
  .hero-save-actions > button { width: 100%; min-width: 0; }
  .actions { align-items: stretch; flex-direction: column; }
  .actions > * { width: 100%; text-align: center; }
}

/* Blog Studio */
.blog-editor-screen {
  background: #fff;
  color: #101d23;
}
.blog-editor-screen main {
  width: min(100% - 34px, 1660px);
  margin: 28px auto 44px;
}
.blog-editor-page {
  position: relative;
}
.blog-editor-page > h1 {
  margin: 0 0 22px;
  color: #006f99;
  text-align: center;
  font-size: clamp(27px, 3vw, 38px);
}
.blog-editor-back {
  position: absolute;
  top: 7px;
  left: 0;
  color: #111;
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
}
.blog-editor-back:hover { color: #007daa; }
.blog-preview-suite {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(480px, 1fr) minmax(190px, 240px);
  align-items: center;
  gap: 28px;
  max-width: 1260px;
  margin: 0 auto;
}
.blog-card-preview {
  width: 100%;
  max-width: 230px;
  margin: auto;
  overflow: hidden;
  border: 1px solid #c4d1d7;
  background: #fff;
  box-shadow: 0 4px 16px rgba(8, 47, 64, .11);
}
.blog-card-preview > img,
.blog-card-image-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.blog-card-copy {
  display: grid;
  gap: 3px;
  padding: 10px;
}
.blog-card-copy strong {
  color: #111;
  font-size: 15px;
  line-height: 1.25;
}
.blog-card-copy span {
  color: #687981;
  font-size: 12px;
}
.blog-page-preview {
  min-width: 0;
  height: 235px;
  overflow: hidden;
  border: 2px solid var(--strong-border);
  background: #fff;
}
.blog-preview-hero {
  height: 76px;
  background: var(--blog-preview-color, #082f40);
  background-position: center;
  background-size: cover;
}
.blog-preview-page-copy {
  height: 157px;
  overflow: hidden;
  padding: 12px 18px;
  color: #17252c;
}
#blogPreviewTitle {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}
#blogPreviewSubtitle {
  margin-top: 4px;
  color: #52666f;
  font-size: 13px;
}
#blogPreviewBody {
  margin-top: 9px;
  font-size: 10px;
  line-height: 1.35;
}
#blogPreviewBody h2,
#blogPreviewBody h3,
#blogPreviewBody h4,
#blogPreviewBody p { margin: 4px 0; }
.blog-browser-preview {
  display: grid;
  gap: 10px;
  text-align: center;
}
.blog-browser-tab {
  min-width: 0;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #586c76;
  border-radius: 8px 8px 0 0;
  background: #e7ecef;
  color: #243139;
  text-align: left;
}
.blog-browser-tab img {
  width: 19px;
  height: 19px;
  object-fit: contain;
}
.blog-browser-tab span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.blog-browser-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.blog-preview-caption {
  margin: 8px 0 24px;
  text-align: center;
  font-size: 17px;
}
.blog-plain-settings,
.blog-background-settings,
.blog-rich-field,
.blog-article-studio {
  width: min(100%, 1320px);
  margin: 24px auto;
}
.blog-plain-settings,
.blog-background-settings,
.blog-article-studio {
  padding: 22px;
  border: 1px solid #b6c7cf;
  background: #f8fbfc;
}
.blog-plain-settings > h2,
.blog-background-settings > h2,
.blog-rich-field > h2,
.blog-article-studio h2 {
  margin: 0 0 10px;
  color: #153442;
  font-size: 18px;
}
.blog-background-settings > h2:not(:first-child) { margin-top: 22px; }
.blog-settings-grid {
  width: min(100%, 1320px);
  margin: 22px auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.blog-plain-settings .blog-settings-grid {
  width: 100%;
  margin: 0;
}
.blog-settings-grid label,
.blog-plain-settings label {
  display: grid;
  gap: 6px;
  margin: 0;
  font-weight: 800;
}
.blog-settings-grid label.wide { grid-column: 1 / -1; }
.blog-settings-grid small,
.blog-plain-settings small {
  color: #617680;
  font-size: 12px;
  font-weight: 400;
}
.blog-settings-grid input,
.blog-settings-grid textarea,
.blog-plain-settings input,
.blog-plain-settings textarea {
  width: 100%;
  border: 2px solid #143744;
  border-radius: 0;
  background: #fff;
}
.blog-background-drop {
  min-height: 115px;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border: 2px dashed #3f6474;
  background: #fff;
  text-align: center;
  transition: border-color .15s, background .15s;
}
.blog-background-drop.dragging {
  border-color: #008cc0;
  background: #eaf8fd;
}
.blog-background-drop strong { grid-column: 1 / -1; }
.blog-background-drop label {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #16465a;
  font-weight: 800;
}
.blog-background-drop input {
  min-width: 0;
  width: 100%;
}
.blog-rich-field {
  padding-top: 5px;
}
.blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px;
  border: 2px solid var(--strong-border);
  border-bottom: 0;
  background: #e7f1f5;
}
.blog-toolbar button,
.blog-toolbar select {
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid #527180;
  border-radius: 0;
  background: #fff;
  color: #102832;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.blog-toolbar button:hover,
.blog-toolbar select:hover {
  border-color: #006f99;
  background: #eaf8fd;
}
.blog-toolbar.full {
  position: sticky;
  top: 52px;
  z-index: 20;
  max-height: 176px;
  overflow-y: auto;
  border-bottom: 1px solid #526f7b;
  box-shadow: 0 5px 12px rgba(7, 41, 54, .12);
}
.blog-rich-editor {
  min-height: 92px;
  padding: 15px;
  overflow-wrap: anywhere;
  border: 2px solid var(--strong-border);
  background: #fff;
  color: #111;
  line-height: 1.55;
}
.blog-rich-editor.article {
  min-height: 540px;
  padding: 26px;
  overflow-x: auto;
  font-size: 16px;
  line-height: 1.7;
}
.blog-rich-editor:empty::before {
  content: attr(data-placeholder);
  color: #87949a;
  pointer-events: none;
}
.blog-rich-editor:focus {
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
}
.blog-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}
.blog-section-heading p {
  margin: 0 0 12px;
  color: #5d717a;
}
#blogWordCount {
  flex: 0 0 auto;
  margin-bottom: 12px;
  color: #34545f;
  font-size: 13px;
  font-weight: 800;
}
.blog-save-actions {
  margin: 34px 0 8px;
  display: flex;
  justify-content: center;
  gap: 80px;
}
.blog-save-actions button {
  min-width: 220px;
  min-height: 52px;
  border-radius: 0;
  font-size: 18px;
}
.blog-insert-dialog #blogInsertFields {
  display: grid;
  gap: 14px;
}
.blog-insert-dialog label,
.blog-character-dialog label {
  display: grid;
  gap: 5px;
  margin: 0;
  font-weight: 800;
}
.blog-insert-dialog input,
.blog-insert-dialog textarea,
.blog-insert-dialog select,
.blog-character-dialog input {
  width: 100%;
  border: 2px solid #143744;
  border-radius: 0;
  background: #fff;
}
.dialog-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.blog-dialog-error {
  min-height: 22px;
  color: #a40000;
  font-weight: 800;
}
.blog-character-grid {
  max-height: 390px;
  margin-top: 16px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(6, minmax(80px, 1fr));
  gap: 8px;
  overflow-y: auto;
  border: 1px solid #9dafb7;
  background: #eef5f7;
}
.blog-character-grid button {
  min-height: 78px;
  padding: 7px;
  display: grid;
  place-items: center;
  gap: 3px;
  border: 1px solid #9dafb7;
  background: #fff;
  color: #102832;
  cursor: pointer;
}
.blog-character-grid button:hover {
  border-color: #007daa;
  background: #e5f7fe;
}
.blog-character-grid span { font-size: 27px; }
.blog-character-grid small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

/* Rich post blocks inside the editor and preview */
.blog-rich-editor img,
#blogPreviewBody img {
  max-width: 100%;
  height: auto;
}
.blog-rich-editor figure,
#blogPreviewBody figure {
  margin: 20px auto;
  text-align: center;
}
.blog-rich-editor iframe,
#blogPreviewBody iframe {
  width: min(100%, 760px);
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}
.blog-rich-editor audio,
.blog-rich-editor video,
#blogPreviewBody audio,
#blogPreviewBody video {
  width: min(100%, 760px);
  max-height: 520px;
}
.tte-caption {
  margin-top: 5px;
  color: #667983;
  font-size: 13px;
  font-style: italic;
}
.tte-gradient-text {
  background-clip: text !important;
  -webkit-background-clip: text !important;
  color: transparent;
}
.tte-inline-code {
  padding: 2px 5px;
  border-radius: 3px;
  background: #e8eef1;
  color: #922c2c;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.tte-code-block,
.blog-rich-editor pre {
  padding: 16px;
  overflow: auto;
  background: #14232a;
  color: #f6fbfd;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.tte-spoiler {
  padding: 2px 5px;
  border-radius: 3px;
  background: #202225;
  color: #202225;
  cursor: pointer;
  user-select: none;
}
.tte-spoiler:hover,
.tte-spoiler:focus {
  background: #2f3136;
  color: rgba(255, 255, 255, .18);
}
.tte-callout {
  margin: 20px 0;
  padding: 14px 17px;
  border-left: 5px solid #087daa;
  background: #edf8fc;
}
.tte-callout-success { border-left-color: #188038; background: #edf8ef; }
.tte-callout-warning { border-left-color: #d47b00; background: #fff6df; }
.tte-callout-danger { border-left-color: #b42318; background: #fff0ef; }
.tte-callout > strong { display: block; margin-bottom: 4px; }
.tte-columns {
  margin: 20px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.tte-columns-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tte-column {
  min-width: 0;
  padding: 14px;
  border: 1px solid #aec0c8;
  background: #fafcfd;
}
.tte-details {
  margin: 18px 0;
  border: 1px solid #9bb0b9;
  background: #fff;
}
.tte-details-summary {
  padding: 12px 15px;
  background: #edf4f7;
  font-weight: 800;
  cursor: pointer;
}
.tte-details > :not(summary) { margin-inline: 15px; }
.tte-countdown-card {
  margin: 20px 0;
  padding: 18px;
  display: grid;
  gap: 5px;
  border: 2px solid #0a678c;
  background: #edf9fd;
  text-align: center;
}
.tte-countdown {
  color: #006f99;
  font-size: 22px;
  font-weight: 900;
}
.tte-attachment {
  padding: 12px 15px;
  display: block;
  border: 1px solid #7f9ba7;
  background: #eef7fa;
  font-weight: 800;
  text-decoration: none;
}
.tte-table {
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
}
.tte-table caption {
  padding: 6px;
  font-weight: 800;
}
.tte-table th,
.tte-table td {
  min-width: 80px;
  padding: 8px;
  border: 1px solid #78919d;
  text-align: left;
}
.tte-table th { background: #e6f1f5; }
.tte-checklist {
  padding-left: 0;
  list-style: none;
}
.tte-checklist-item::before {
  content: "☐";
  margin-right: 8px;
}
.tte-checklist-checked::before { content: "☑"; }
.tte-align-left { text-align: left; }
.tte-align-center { text-align: center; }
.tte-align-right { text-align: right; }
.tte-align-justify { text-align: justify; }
.tte-image-left { float: left; max-width: 45% !important; margin: 0 18px 12px 0; }
.tte-image-right { float: right; max-width: 45% !important; margin: 0 0 12px 18px; }
.tte-image-center { display: block; margin-inline: auto; }
.tte-image-wide { width: 100%; }

@media (max-width: 1120px) {
  .blog-preview-suite {
    grid-template-columns: minmax(160px, 210px) minmax(400px, 1fr);
  }
  .blog-browser-preview { grid-column: 1 / -1; width: min(100%, 430px); margin: auto; }
  .blog-character-grid { grid-template-columns: repeat(4, minmax(75px, 1fr)); }
}

@media (max-width: 800px) {
  .account-action-grid {
    width: 100%;
    grid-template-columns: 1fr;
  }
  .language-packs-screen main,
  .accounts-screen main,
  .devices-screen main {
    width: min(100% - 20px, 1500px);
  }
  .language-pack-create,
  .language-pack-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .translation-row {
    grid-template-columns: 1fr;
  }
  .translation-source {
    border-right: 0;
    border-bottom: 1px solid #b6cbd4;
  }
  .devices-page > header {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .devices-page > header > a {
    margin-bottom: 10px;
  }
  .device-resource-grid,
  .device-upload-grid {
    grid-template-columns: 1fr;
  }
  .device-policy-card {
    grid-column: auto;
  }
  .blog-editor-screen main { width: min(100% - 20px, 1660px); }
  .blog-editor-back { position: static; display: inline-block; margin-bottom: 8px; }
  .blog-editor-page > h1 { margin-top: -32px; }
  .blog-preview-suite { grid-template-columns: 1fr; }
  .blog-card-preview { max-width: 260px; }
  .blog-page-preview { width: 100%; height: 260px; }
  .blog-settings-grid { grid-template-columns: 1fr; }
  .blog-settings-grid label.wide { grid-column: auto; }
  .blog-background-drop { grid-template-columns: 1fr; }
  .blog-background-drop strong { grid-column: auto; }
  .blog-toolbar.full { top: 52px; max-height: 205px; }
  .blog-rich-editor.article { min-height: 440px; padding: 18px; }
  .blog-save-actions { gap: 12px; }
  .blog-save-actions button { min-width: 0; flex: 1; }
  .tte-columns,
  .tte-columns-three { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .blog-editor-page > h1 { margin-top: 0; font-size: 25px; }
  .blog-plain-settings,
  .blog-background-settings,
  .blog-article-studio { padding: 13px; }
  .blog-toolbar button,
  .blog-toolbar select { flex: 1 1 auto; font-size: 12px; }
  .blog-section-heading { display: block; }
  .blog-rich-editor.article { min-height: 370px; padding: 13px; }
  .blog-save-actions { align-items: stretch; flex-direction: column; }
  .blog-save-actions button { width: 100%; }
  .blog-character-grid { grid-template-columns: repeat(3, minmax(65px, 1fr)); }
  .dialog-field-grid { grid-template-columns: 1fr; }
  .tte-image-left,
  .tte-image-right { float: none; max-width: 100% !important; margin: 0 auto 12px; }
}

/* TTE V9 additions. They intentionally reuse the v8 Blog Studio visual language. */
.v9-screen main,
.v9-studio-page,
.v9-messages-screen main,
.v9-account-manager-screen main,
.v9-moderation-screen main,
.v9-settings-screen main,
.v9-analytics-screen main,
.v9-experience-screen main,
.v9-page-editor-screen main {
  width: min(100% - 40px, 1660px);
  margin-inline: auto;
}
.v9-page-title {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr);
  align-items: center;
  gap: 18px;
}
.v9-page-title > h1,
.v9-page-title > div { grid-column: 2; text-align: center; }
.v9-page-title > a { grid-column: 1; color: #111; font-weight: 700; text-decoration: none; }
.v9-page-title h1 { margin: 0; color: #0079a7; font-size: 30px; }
.v9-studio-card {
  margin: 18px 0;
  padding: 20px;
  border: 1px solid #aac0ca;
  background: linear-gradient(#fbfdfe, #eef5f8);
  box-shadow: 0 7px 22px rgba(5, 54, 73, .08);
}
details.v9-studio-card > summary {
  color: #006d95;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  margin-bottom: 16px;
}
.v9-studio-card label { display: grid; gap: 6px; margin: 12px 0; font-weight: 700; }
.v9-studio-card input,
.v9-studio-card textarea,
.v9-studio-card select,
.v9-composer input,
.v9-composer textarea,
.v9-composer select {
  width: 100%;
  min-height: 39px;
  border: 1px solid #486c7c;
  background: #fff;
  padding: 8px 10px;
  color: #111;
  font: inherit;
}
.v9-studio-card textarea,
.v9-rich-source { min-height: 130px; resize: vertical; }
.v9-studio-card button,
.v9-composer button,
.v9-message details button,
.v9-message details summary {
  border: 1px solid #063d53;
  background: linear-gradient(90deg, #075d7c, #0a93bf);
  color: #fff;
  padding: 8px 13px;
  font-weight: 700;
  cursor: pointer;
}
.v9-studio-card button.danger { background: linear-gradient(90deg, #9c0000, #e00000); }
.v9-create-admin { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr .7fr auto; gap: 10px; align-items: end; margin-bottom: 18px; }
.v9-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 7px; }
.v9-summary { display: flex; align-items: baseline; gap: 16px; padding: 20px; background: #073f56; color: #fff; }
.v9-summary strong { font-size: 48px; }
.v9-rating-bars { display: grid; gap: 8px; margin: 20px 0; }
.v9-rating-bars > div { display: grid; grid-template-columns: 80px 1fr 55px; gap: 10px; align-items: center; }
.v9-rating-bars meter { width: 100%; height: 24px; }

.v9-messages { min-height: calc(100vh - 100px); display: grid; grid-template-columns: 340px 1fr; border-inline: 1px solid #a5bbc5; }
.v9-thread-list { background: #edf5f8; border-right: 1px solid #a5bbc5; padding: 14px; overflow-y: auto; }
.v9-thread-list .v9-page-title { display: block; min-height: 0; margin-bottom: 14px; }
.v9-thread-list .v9-page-title h1 { font-size: 25px; text-align: left; margin: 8px 0; }
.v9-thread { display: block; margin: 8px 0; padding: 13px; border: 1px solid #9eb5bf; border-left: 5px solid var(--accent, #087bac); background: #fff; color: #102c38; text-decoration: none; }
.v9-thread.active { background: #d8edf5; box-shadow: inset 0 0 0 1px var(--accent, #087bac); }
.v9-thread strong,.v9-thread small { display: block; }
.v9-thread small { margin-top: 4px; color: #627781; }
.v9-new-thread { margin-top: 16px; padding: 12px; border: 1px solid #9bb2bc; background: #fff; }
.v9-new-thread summary { font-weight: 900; cursor: pointer; color: #0079a7; }
.v9-new-thread fieldset { margin: 12px 0; max-height: 230px; overflow-y: auto; }
.v9-chat { min-width: 0; display: grid; grid-template-rows: auto 1fr auto; background: #f8fbfc; }
.v9-chat > header { min-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid #a5bbc5; background: #fff; }
.v9-chat > header h2 { margin: 0; color: #006f98; }
.v9-message-list { padding: 22px; overflow-y: auto; max-height: calc(100vh - 250px); }
.v9-chat-placeholder { height: 100%; display: grid; place-content: center; text-align: center; color: #657982; }
.v9-message { width: min(78%, 760px); margin: 11px 0; padding: 12px 14px; border: 1px solid #bed0d7; border-radius: 8px 8px 8px 2px; background: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.06); }
.v9-message.own { margin-left: auto; border-color: var(--accent, #087bac); background: #e6f6fc; border-radius: 8px 8px 2px 8px; }
.v9-message.spoiler .v9-message-body { color: transparent; background: #17242a; border-radius: 4px; cursor: pointer; user-select: none; }
.v9-message.spoiler .v9-message-body:hover,.v9-message.spoiler.revealed .v9-message-body { color: #fff; }
.v9-message header { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 7px; font-size: 12px; }
.v9-message time { color: #6b7e86; }
.v9-message-body { white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.v9-message-image { max-width: min(100%, 480px); max-height: 430px; margin-top: 9px; object-fit: contain; border: 1px solid #9cb4be; }
.v9-message details { margin-top: 8px; }
.v9-message details summary { display: inline-block; padding: 4px 8px; font-size: 11px; }
.v9-message details form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.v9-message details input { min-width: 180px; flex: 1; }
.v9-poll { display: grid; gap: 6px; margin-top: 10px; }
.v9-composer { padding: 12px; border-top: 1px solid #a5bbc5; background: #fff; }
.v9-composer textarea { min-height: 76px; }
.v9-composer > div { display: grid; grid-template-columns: 150px 1fr 1fr auto; gap: 8px; margin-top: 8px; }
.v9-empty { color: #697d86; }

@media (max-width: 1100px) {
  .v9-messages { grid-template-columns: 270px 1fr; }
  .v9-create-admin { grid-template-columns: 1fr 1fr; }
  .v9-composer > div { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .v9-screen main,.v9-studio-page,.v9-messages-screen main,.v9-account-manager-screen main,.v9-moderation-screen main,.v9-settings-screen main,.v9-analytics-screen main,.v9-experience-screen main,.v9-page-editor-screen main { width: min(100% - 20px, 1660px); }
  .v9-page-title { grid-template-columns: auto 1fr; }
  .v9-page-title > h1,.v9-page-title > div { grid-column: 2; text-align: left; }
  .v9-messages { display: block; }
  .v9-thread-list { border-right: 0; border-bottom: 1px solid #a5bbc5; max-height: 330px; }
  .v9-message-list { max-height: none; }
  .v9-message { width: 94%; }
  .v9-create-admin,.v9-composer > div { grid-template-columns: 1fr; }
}

.v9-profile-card{display:grid;grid-template-columns:150px 1fr;gap:24px;align-items:start;max-width:900px;margin-inline:auto}.v9-profile-avatar{width:150px;height:150px;border-radius:50%;object-fit:cover;border:3px solid #087bac;background:#dcebf1}.v9-profile-avatar.placeholder{display:grid;place-items:center;font-size:58px;font-weight:900;color:#087bac}.v9-profile-card form{display:grid;gap:10px}.v9-reports-screen .table-wrap{overflow:auto}.v9-reports-screen td{max-width:360px;white-space:normal;overflow-wrap:anywhere}.v9-reports-screen form{display:grid;gap:5px;min-width:120px}
@media(max-width:700px){.v9-profile-card{grid-template-columns:1fr}.v9-profile-avatar{margin:auto}}

.v9-message-author{display:flex;align-items:center;gap:7px}.v9-message-avatar{width:26px;height:26px;border-radius:50%;object-fit:cover;background:#dcebf1}.v9-message-avatar.placeholder{display:grid;place-items:center;color:#075d7c;font-weight:900}

/* V9.1 shared Blog Studio styling and exact public previews */
.announcement-studio-page{max-width:1460px;margin-inline:auto}.announcement-studio-page>h1{text-align:center;color:#0079a7}.announcement-studio-page .announcement-preview-section{display:block;max-width:1160px;margin:0 auto 20px}.announcement-studio-page .announcement-site-preview{border:1px solid #8faab6;box-shadow:0 7px 22px rgba(5,54,73,.08)}.announcement-studio-page .blog-background-settings,.announcement-studio-page .blog-plain-settings,.announcement-studio-page .blog-article-studio{max-width:1160px;margin:16px auto}.announcement-studio-page .announcement-icon-picker{border:1px solid #adc3cc}.announcement-studio-page .announcement-text-control{padding:18px}.shared-exact-preview{max-width:1080px;margin:0 auto 18px;text-align:center}.shared-exact-preview>h2{font-size:13px;color:#637982;text-transform:uppercase;letter-spacing:.08em}.admin-exact-video-card{width:240px;margin:0 auto;text-align:left;border:1px solid #ccd7dc;background:#fff;box-shadow:0 4px 16px rgba(0,0,0,.07);overflow:hidden}.admin-exact-video-card .tte-content-card-link{display:block;color:inherit;text-decoration:none}.admin-exact-video-card img,.admin-exact-video-card .tte-card-image{width:100%;aspect-ratio:16/9;display:block;object-fit:cover;background:#082f40}.admin-exact-video-card .tte-content-card-copy{padding:11px}.admin-exact-video-card .tte-content-card-copy h2{margin:0 0 5px;font-size:17px;color:#111}.admin-exact-video-card .tte-content-card-copy p{margin:0;color:#657780;font-size:13px;line-height:1.4}.admin-exact-video-card .tte-reactions{display:flex;gap:8px;padding:9px;border-top:1px solid #d5e0e4;background:#f7fafb}.admin-exact-video-card .tte-reactions button{border:1px solid #527587;background:#fff;color:#075d7c;padding:6px 10px;font-weight:700}.admin-home-block-preview{padding:20px;background:#fff}.admin-home-block-preview .home-block-inner{max-width:1000px;margin:auto;display:grid;grid-template-columns:minmax(210px,34%) 1fr;border:1px solid #a9c0ca;background:linear-gradient(135deg,var(--home-block-color,#eaf2f5),#fff 55%);box-shadow:0 7px 22px rgba(5,54,73,.08);overflow:hidden;text-align:left}.admin-home-block-preview .home-block-image,.admin-home-block-preview .home-block-image-placeholder{width:100%;min-height:230px;height:100%;object-fit:cover;background:var(--home-block-color,#eaf2f5)}.admin-home-block-preview .home-block-copy{padding:24px 27px;line-height:1.65}.admin-home-block-preview .home-block-copy h2{margin:0 0 10px;color:#087bac;font-size:26px}.admin-home-block-preview .home-block-eyebrow{margin:0 0 7px;color:#5f7480;font-size:13px;font-weight:700}.managed-page-studio{max-width:1460px;margin:auto}.managed-page-form{max-width:1200px;margin:auto}.managed-preview-suite{display:block!important}.managed-page-preview{border:1px solid #9cb4bf;background:#fff;box-shadow:0 7px 22px rgba(5,54,73,.08);overflow:hidden}.managed-preview-hero{padding:28px;background:linear-gradient(135deg,#0d3b4f,#061a24);color:#fff;text-align:center}.managed-preview-hero h2{margin:0;font-size:30px}.recommended-preview-items{display:grid;gap:12px;padding:18px}.recommended-preview-card{display:grid;grid-template-columns:130px 1fr;border:1px solid #b1c4cc;background:#f8fbfc}.recommended-preview-card img,.recommended-preview-placeholder{width:130px;height:110px;object-fit:cover;background:#082f40}.recommended-preview-card>div{padding:11px}.recommended-preview-card h3,.recommended-preview-card p{margin:0 0 5px}.contacts-preview-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:18px}.contacts-preview-grid>div{padding:13px;border:1px solid #bdcdd4;background:#f8fbfc}.contacts-preview-grid strong,.contacts-preview-grid span{display:block}.managed-repeat-list{display:grid;gap:14px}.managed-repeat-row{padding:15px;border:1px solid #afc2ca;background:#f8fbfc}.managed-repeat-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px}.managed-repeat-grid .wide{grid-column:1/-1}.managed-page-toolbar{position:static!important}.managed-rich-editor{min-height:240px}.maintenance-button.is-active{background:#087bac!important}.danger-zone form{margin:0}.danger-zone button{cursor:pointer}
@media(max-width:720px){.admin-home-block-preview .home-block-inner,.recommended-preview-card,.contacts-preview-grid,.managed-repeat-grid{grid-template-columns:1fr}.managed-repeat-grid .wide{grid-column:auto}.recommended-preview-card img,.recommended-preview-placeholder{width:100%;height:170px}}

/* V9.1 Socials Studio */
.managed-social-preview{display:flex;flex-wrap:wrap;justify-content:center;gap:18px;padding:28px;background:#f5f5f5}.managed-social-preview-link{width:72px;height:72px;display:grid;place-items:center;border:2px solid transparent;border-radius:9px;background:#fff;box-shadow:0 4px 13px rgba(0,0,0,.08)}.managed-social-preview-link img{width:62px;height:62px;object-fit:cover;border-radius:7px}.managed-social-preview-link.is-disabled{opacity:.25;filter:grayscale(1)}
.generic-managed-preview-body{min-height:220px;padding:24px;line-height:1.65;background:#fff}.generic-managed-preview-body img{max-width:100%;height:auto}.generic-managed-preview-body table{width:100%;border-collapse:collapse}.generic-managed-preview-body th,.generic-managed-preview-body td{border:1px solid #9eb5bf;padding:8px}
.managed-preview-hero{background-size:cover;background-position:center;background-repeat:no-repeat;min-height:150px;display:grid;place-items:center}.recommended-preview-kind{margin:0;color:#647983;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}.recommended-preview-button{display:inline-block;margin-top:8px;padding:6px 10px;background:linear-gradient(90deg,#075d7c,#0a93bf);color:#fff;font-size:12px;font-weight:700}
.studio-page-settings-link{text-align:center;margin:-6px auto 16px}.studio-page-settings-link a{display:inline-block;padding:8px 13px;border:1px solid #527587;background:#f4f8fa;color:#087bac;font-weight:700;text-decoration:none}.studio-page-settings-link a:hover{background:#e6f1f5}


/* V9.2 dashboard centering and responsive navigation */
.dashboard-stats{width:min(1480px,100%);margin:10px auto 0}
.dashboard-action-grid{width:min(1480px,100%);display:flex;flex-wrap:wrap;justify-content:center;align-items:stretch}
.dashboard-action-grid .dashboard-action{flex:0 1 calc((100% - 40px)/5);min-width:190px}
.account-action-grid{width:min(1180px,100%)}
.account-action-grid .dashboard-action{flex:0 1 calc((100% - 30px)/4)}
.analytics-grid{width:min(1600px,100%);flex-wrap:nowrap}
.analytics-grid .dashboard-action{flex:1 1 0;min-width:0;font-size:clamp(13px,1.05vw,18px);padding-inline:7px}
@media(max-width:2050px){
  .menu-toggle{display:block}
  .admin-nav{display:none;position:absolute;top:52px;right:0;width:min(430px,100vw);max-height:calc(100vh - 52px);overflow-y:auto;padding:8px 0;flex-direction:column;align-items:stretch;border:2px solid var(--strong-border);background:#004a68;box-shadow:0 12px 28px rgba(0,0,0,.24)}
  .admin-nav.open{display:flex}
  .admin-nav a,.admin-nav button{width:100%;min-height:44px;padding:10px 18px;justify-content:flex-start}
  .admin-nav form{width:100%}
}
@media(max-width:1400px){.analytics-grid{flex-wrap:wrap}.analytics-grid .dashboard-action{flex:0 1 calc((100% - 20px)/3);min-width:220px}}
@media(max-width:900px){.dashboard-action-grid .dashboard-action,.account-action-grid .dashboard-action,.analytics-grid .dashboard-action{flex:0 1 calc((100% - 10px)/2);min-width:0}}
@media(max-width:560px){.dashboard-action-grid .dashboard-action,.account-action-grid .dashboard-action,.analytics-grid .dashboard-action{flex-basis:100%}}

/* V9.2 internal DM directory */
.v9-user-tools{display:grid;gap:10px;margin:12px 0;padding:12px;border:1px solid #9bb2bc;background:#fff}
.v9-user-tools input[type=search]{width:100%;min-height:40px;padding:8px;border:1px solid #557887}
.v9-user-action-list{display:grid;gap:7px;max-height:260px;overflow:auto}
.v9-user-action{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;padding:8px;border:1px solid #c2d1d7;background:#f8fbfc}
.v9-user-action span{min-width:0}.v9-user-action strong,.v9-user-action small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v9-user-action form{margin:0}.v9-user-action button{min-height:32px;padding:5px 9px;border:1px solid #365f70;background:#087bac;color:#fff;font-weight:700;cursor:pointer}
.v9-user-action button.unblock{background:#536a74}.v9-member-option[hidden],.v9-user-action[hidden]{display:none!important}
.v9-blocked-note{padding:10px;border:1px solid #b77900;background:#fff6d8;color:#563900;font-weight:700}


/* V9.3 accessibility and optional security-key controls */
:root{--admin-text-scale:1}
body{zoom:var(--admin-text-scale)}
.skip-link{position:fixed;left:10px;top:-80px;z-index:100000;padding:10px 14px;background:#fff;color:#003b52;border:2px solid #087bac}.skip-link:focus{top:10px}
.admin-accessibility-toggle{width:36px;height:36px;border:1px solid rgba(255,255,255,.55);border-radius:50%;background:rgba(0,0,0,.12);color:#fff;font-size:19px;cursor:pointer}
.admin-accessibility-panel{position:fixed;right:14px;top:58px;z-index:5000;width:min(360px,calc(100vw - 28px));padding:15px;border:2px solid #087bac;background:#fff;color:#082f40;box-shadow:0 15px 45px rgba(0,0,0,.3)}
.admin-accessibility-panel h2{margin:0 0 10px;font-size:19px}.admin-accessibility-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.admin-accessibility-actions button{padding:9px;border:1px solid #497181;background:#edf5f8;color:#053f57;font-weight:700}
.a11y-high-contrast{filter:contrast(1.28)}.a11y-high-contrast .admin-header{background:#000}.a11y-underline-links a{text-decoration:underline!important;text-decoration-thickness:2px!important}.a11y-reduced-motion *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
.security-key-reminder{width:min(1100px,calc(100% - 30px));margin:18px auto;padding:14px 16px;display:flex;flex-wrap:wrap;gap:10px;align-items:center;border:2px solid #d39400;background:#fff8db;color:#513800}.security-key-reminder strong{font-size:17px}.security-key-reminder span{flex:1 1 420px}.security-key-reminder .button-link{white-space:nowrap}
.managed-social-preview-link{height:auto;min-height:88px;gap:5px;display:flex!important;flex-direction:column}.managed-social-preview-link small{display:block;color:#075f80;font-weight:700}.managed-social-letter{width:62px;height:62px;display:grid;place-items:center;border-radius:8px;background:#087bac;color:#fff;font-size:19px;font-weight:900}


/* V9.4 shared public page appearance */
.appearance-studio{max-width:1380px;margin:auto}.appearance-preview{position:relative;min-height:280px;display:grid;place-items:center;overflow:hidden;background:#082f40 center/cover no-repeat;color:#fff;text-align:center;box-shadow:0 8px 24px rgba(5,54,73,.16)}.appearance-preview h2{margin:0;padding:28px;font-size:clamp(28px,5vw,50px);text-shadow:0 2px 15px rgba(0,0,0,.65)}.appearance-preview small{position:absolute;right:12px;bottom:10px;max-width:70%;padding:4px 8px;border-radius:3px;background:rgba(0,0,0,.48);color:#fff;font-size:11px;text-align:right}.appearance-settings-grid output{align-self:end;padding:9px;border:1px solid #557887;background:#fff;font-weight:700}.appearance-settings-grid input[type=range]{width:100%}


/* V9.5 fixed admin navigation and build label */
body { padding-top: 52px; }
.admin-header {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 100000 !important;
}
.admin-footer { flex-wrap: wrap; }
.admin-build-label {
  flex: 1 0 100%;
  color: #777;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.2;
  text-align: right;
}


/* V9.5 image icons and Icon Manager */
.admin-accessibility-toggle img{width:20px;height:20px;filter:brightness(0) invert(1)}
.admin-inline-icon{width:21px;height:21px;margin-right:8px;filter:brightness(0) invert(1);vertical-align:middle}
.key-icon img{width:58px;height:58px;color:#087bac}
.icon-manager-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px}
.icon-manager-row{display:grid;grid-template-columns:64px 1fr;gap:13px;align-items:start;padding:14px;border:1px solid #adc3cc;background:#f8fbfc}
.icon-manager-preview{width:60px;height:60px;display:grid;place-items:center;border:1px solid #7899a7;background:#082f40}
.icon-manager-preview img{width:38px;height:38px;object-fit:contain;filter:brightness(0) invert(1)}
.icon-manager-fields{display:grid;gap:7px}.icon-manager-fields label{display:grid;gap:4px}.icon-manager-fields input{width:100%}


/* V9.6.3 editor reliability and layout corrections */
[hidden]{display:none!important}
.managed-page-editor-screen main,.v9-page-editor-screen main{width:min(100% - 40px,1460px)!important;margin-inline:auto!important}
.managed-page-studio,.managed-page-form,.blog-editor-page,.shared-studio-editor{margin-inline:auto}
.managed-page-form>.blog-background-settings,.managed-page-form>.blog-plain-settings,.managed-page-form>.blog-article-studio{width:100%;margin-inline:auto}
.managed-rich-editor:focus,.editor:focus,.blog-rich-editor:focus{outline:2px solid #087bac;outline-offset:-2px}
.managed-hero-settings .blog-background-drop{grid-template-columns:1fr 1fr auto;align-items:end}
.shared-rich-toolbar{position:static!important;display:flex;flex-wrap:wrap;gap:6px;padding:8px;border:1px solid #456b7b;border-bottom:0;background:#e9f4f8}
.shared-rich-toolbar button{min-height:34px;padding:6px 10px;border:1px solid #456b7b;background:#fff;color:#0a2632;font-weight:700;cursor:pointer}
.shared-rich-toolbar+.editor{min-height:320px;padding:14px;border:1px solid #456b7b;background:#fff;line-height:1.65}
.tte-attachment{display:block;margin:8px 0;padding:10px 12px;border:1px solid #91aeb9;background:#eef8fc;color:#075d7c;text-decoration:none}
.admin-exact-video-card .tte-reactions{display:none!important}

/* A cleaner login card while retaining the existing TTE look. */
.login-page main{min-height:calc(100vh - 145px);align-items:center;padding:32px 16px}
.admin-login{width:min(760px,100%);padding:30px;border:1px solid #9eb8c3;background:linear-gradient(145deg,#fff,#eef6f9);box-shadow:0 18px 55px rgba(4,48,66,.16)}
.admin-login h1{color:#006f99;margin-top:0}
.login-form{display:grid;gap:14px}
.login-field{margin-top:0}
.cookie-notice{border-width:1px;border-radius:0}
@media(max-width:720px){.managed-hero-settings .blog-background-drop{grid-template-columns:1fr}.admin-login{padding:22px}.login-field{grid-template-columns:1fr}.login-status{margin-left:0}.email-control{grid-template-columns:1fr}.email-control input{border-right:2px solid #111}.email-control span{min-width:0}}

/* Keep every Article Studio tool visible; the editor itself remains sticky. */
.blog-toolbar.full{max-height:none!important;overflow:visible!important}


/* V9.6.4 repair: reliable editors and managed-page controls */
input[hidden],textarea[hidden],[type="hidden"]{display:none!important}
.blog-toolbar.full,.blog-toolbar.managed-page-toolbar{
  position:static!important;top:auto!important;max-height:none!important;height:auto!important;
  overflow:visible!important;overflow-x:visible!important;overflow-y:visible!important;
  display:flex!important;flex-wrap:wrap!important;align-items:center!important;
}
.blog-rich-editor,.managed-rich-editor{min-height:260px;cursor:text}
.managed-page-editor-screen main,.v9-page-editor-screen main,.blog-editor-screen main{width:min(calc(100% - 32px),1460px)!important;margin-inline:auto!important}
.managed-page-form,.managed-page-studio,.blog-editor-page{width:100%;max-width:1380px;margin-inline:auto!important}
.managed-repeat-row input,.managed-repeat-row textarea{min-width:0}
.managed-hero-settings .blog-background-drop input[type=file]{display:block!important}
