/*
 * NMT LaunchPad shared theme
 * Copyright (c) 2026 Neu Media Technology SG Pte Ltd.
 * Proprietary and confidential.
 */

:root {
  --nmt-bg: #07111f;
  --nmt-bg-deep: #040a13;
  --nmt-surface: #0e1a2a;
  --nmt-surface-raised: #132238;
  --nmt-surface-soft: #0a1625;
  --nmt-border: #26384d;
  --nmt-border-strong: #3b526c;
  --nmt-text: #f4f7fb;
  --nmt-text-muted: #9fb0c3;
  --nmt-orange: #f37021;
  --nmt-orange-hover: #d95d12;
  --nmt-amber: #f6b13d;
  --nmt-blue: #1f2f78;
  --nmt-success: #62b889;
  --nmt-danger: #e36b75;
  --nmt-warning: #e0ae4d;
  --nmt-shadow: 0 18px 42px rgba(0, 0, 0, .22);
  --nmt-shadow-raised: 0 24px 70px rgba(0, 0, 0, .32);
  --nmt-focus: rgba(243, 112, 33, .25);

  /* Compatibility aliases used throughout the existing portal CSS. */
  --bg: var(--nmt-bg);
  --surface: var(--nmt-surface);
  --soft: var(--nmt-surface-soft);
  --text: var(--nmt-text);
  --muted: var(--nmt-text-muted);
  --line: var(--nmt-border);
  --primary: var(--nmt-orange);
  --primary-dark: var(--nmt-orange-hover);
  --accent: var(--nmt-success);
  --danger: var(--nmt-danger);
  --shadow: var(--nmt-shadow);

  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--nmt-bg-deep); }
body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 9% 15%, rgba(31, 47, 120, .16), transparent 28rem),
    radial-gradient(circle at 90% 8%, rgba(243, 112, 33, .07), transparent 24rem),
    var(--nmt-bg);
  color: var(--text);
  line-height: 1.45;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .28;
  background-image:
    radial-gradient(circle at 20% 110%, transparent 0 17rem, rgba(159, 176, 195, .08) 17.05rem 17.15rem, transparent 17.2rem),
    radial-gradient(circle at 88% -15%, transparent 0 22rem, rgba(243, 112, 33, .08) 22.05rem 22.15rem, transparent 22.2rem);
}

a { color: #ff985d; text-decoration: none; }
a:hover { color: #ffb184; text-decoration: underline; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--nmt-focus);
  outline-offset: 2px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.5vw, 34px);
  min-height: 76px;
  padding: 11px clamp(18px, 4vw, 54px);
  background: rgba(4, 10, 19, .96);
  border-bottom: 1px solid var(--nmt-border);
  box-shadow: 0 10px 32px rgba(0, 0, 0, .28);
  backdrop-filter: blur(14px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  margin-right: auto;
  color: var(--nmt-text);
}
.brand:hover { color: var(--nmt-text); text-decoration: none; }
.brand-identity { display: inline-flex; align-items: center; min-width: 42px; min-height: 42px; }
.brand-logo {
  display: block;
  width: auto;
  height: 42px;
  max-width: clamp(84px, 10vw, 138px);
  object-fit: contain;
  object-position: left center;
}
.brand-copy { display: grid; gap: 2px; }
.brand strong { font-size: 15px; line-height: 1.05; letter-spacing: -.01em; }
.brand small { color: #8ea2b8; font-size: 10px; line-height: 1.1; }

.nav { display: flex; align-items: center; gap: 5px; }
.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 9px;
  color: #d9e3ed;
  font-size: 14px;
  font-weight: 680;
  text-decoration: none;
  transition: background .14s ease, color .14s ease;
}
.nav a:hover { background: rgba(159, 176, 195, .08); color: #fff; text-decoration: none; }
.nav a.is-active { background: rgba(243, 112, 33, .10); color: #fff; }
.nav a.is-active::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 4px;
  left: 10px;
  height: 2px;
  border-radius: 999px;
  background: var(--nmt-orange);
}
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--nmt-border);
  border-radius: 9px;
  background: var(--nmt-surface-soft);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}
.user-menu { display: flex; align-items: center; gap: 12px; color: #9db0c3; font-size: 12px; }
.user-menu__identity { max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-button {
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: #f1f5f9;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.link-button:hover { color: var(--nmt-orange); }

.page-shell { width: min(1240px, calc(100% - 32px)); margin: 34px auto 62px; }
.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 21px clamp(18px, 4vw, 54px) 30px;
  border-top: 1px solid rgba(38, 56, 77, .7);
  color: var(--muted);
  font-size: 12px;
}
.footer a { color: #b6c5d4; }

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
h1, h2, h3 { color: var(--nmt-text); }
h1, h2 { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.035em; line-height: 1.08; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
.eyebrow {
  margin-bottom: 8px;
  color: var(--nmt-amber);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.muted { color: var(--muted); }

.content-card,
.auth-card,
.metric {
  border: 1px solid var(--nmt-border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(19, 34, 56, .98), rgba(14, 26, 42, .98));
  box-shadow: var(--shadow);
}
.content-card { padding: clamp(20px, 3vw, 30px); margin-bottom: 22px; }
.narrow-card { width: min(760px, 100%); margin-right: auto; margin-left: auto; }
.callout { border-left: 4px solid var(--nmt-success); }
.destructive-card { border-color: rgba(227, 107, 117, .55); border-left: 4px solid var(--danger); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.metric { min-width: 0; padding: 22px; }
.metric span { display: block; color: var(--muted); font-size: 13px; }
.metric strong { display: block; margin-top: 8px; font-size: 36px; line-height: 1; }
.metric-link { color: inherit; text-decoration: none; transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease; }
.metric-link:hover { transform: translateY(-2px); border-color: var(--nmt-border-strong); color: inherit; text-decoration: none; box-shadow: var(--nmt-shadow-raised); }

.two-column,
.detail-grid,
.grid-two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; }
.detail-grid,
.grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.section-heading h2 { margin-bottom: 0; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(38, 56, 77, .65);
  border-radius: 12px;
  background: rgba(7, 17, 31, .22);
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th {
  background: rgba(4, 10, 19, .42);
  color: #8fa3b7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(159, 176, 195, .035); }
td small { display: block; margin-top: 4px; color: var(--muted); }

.badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid rgba(159, 176, 195, .18);
  border-radius: 999px;
  background: rgba(159, 176, 195, .10);
  color: #c8d4df;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.badge-online, .badge-healthy, .badge-success, .badge-running, .badge-ready, .status-ready {
  border-color: rgba(98, 184, 137, .25);
  background: rgba(98, 184, 137, .14);
  color: #9be0b9;
}
.badge-error, .badge-unreachable, .badge-credential_invalid, .badge-failure, .badge-failed, .badge-destroyed {
  border-color: rgba(227, 107, 117, .25);
  background: rgba(227, 107, 117, .14);
  color: #ffadb4;
}
.badge-starting, .badge-stopping, .badge-provisioning, .badge-requested, .badge-degraded, .badge-creating, .badge-destroying, .status-warning {
  border-color: rgba(224, 174, 77, .27);
  background: rgba(224, 174, 77, .14);
  color: #f5cf81;
}
.badge-stopped, .badge-provisioned, .badge-draft, .badge-unknown, .badge-blocked {
  background: rgba(159, 176, 195, .11);
  color: #bdc9d5;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--nmt-border-strong);
  border-radius: 9px;
  background: #17273a;
  color: #eef3f8;
  font-weight: 750;
  line-height: 1.15;
  cursor: pointer;
  transition: transform .08s ease, border-color .14s ease, background .14s ease, color .14s ease;
}
.button:hover { border-color: #617792; background: #1d3046; color: #fff; text-decoration: none; }
.button:active { transform: translateY(1px); }
.button-primary { border-color: var(--nmt-orange); background: var(--nmt-orange); color: #fff; }
.button-primary:hover { border-color: var(--nmt-orange-hover); background: var(--nmt-orange-hover); color: #fff; }
.button-danger { border-color: #b74d58; background: #a9434c; color: #fff; }
.button-danger:hover { border-color: #d3626c; background: #bd4b55; color: #fff; }
.button:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.actions select { width: auto; min-width: 130px; }

.form-stack { display: grid; gap: 18px; }
.form-stack label,
.form-grid label,
.sizing-row label { display: grid; gap: 7px; color: #dfe7ef; font-weight: 700; }
.form-stack label small,
.form-grid label small,
.sizing-row label small { color: var(--muted); font-weight: 400; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .field-wide { grid-column: 1 / -1; }
.field { display: grid; gap: 7px; }
input, select, textarea {
  width: 100%;
  border: 1px solid #38506a;
  border-radius: 9px;
  padding: 11px 12px;
  background: #091625;
  color: var(--text);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .02);
}
input::placeholder, textarea::placeholder { color: #6f849a; opacity: 1; }
select { color-scheme: dark; }
textarea { min-height: 120px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #4b647f; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--nmt-focus); border-color: var(--nmt-orange); }
input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; background: #0b1420; color: #708397; opacity: .7; }

input[type='checkbox'],
input[type='radio'] {
  appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  padding: 0;
  display: inline-grid;
  place-content: center;
  flex: 0 0 20px;
  border: 1.5px solid #647990;
  background: #081421;
  cursor: pointer;
}
input[type='checkbox'] { border-radius: 5px; }
input[type='radio'] { border-radius: 50%; }
input[type='checkbox']::before,
input[type='radio']::before {
  content: "";
  width: 11px;
  height: 11px;
  transform: scale(0);
  transition: transform .12s ease-in-out;
  background: #fff;
}
input[type='checkbox']::before {
  clip-path: polygon(14% 44%, 0 59%, 40% 100%, 100% 21%, 84% 7%, 39% 70%);
}
input[type='radio']::before { border-radius: 50%; }
input[type='checkbox']:checked,
input[type='radio']:checked { border-color: var(--nmt-orange); background: var(--nmt-orange); }
input[type='checkbox']:checked::before,
input[type='radio']:checked::before { transform: scale(1); }
input[type='checkbox']:disabled,
input[type='radio']:disabled { cursor: not-allowed; opacity: .45; }
.checkbox-row { display: flex !important; grid-template-columns: auto 1fr; align-items: flex-start; gap: 10px !important; }
.checkbox-row input { margin-top: 3px; }
.errorlist { margin: 0; padding-left: 20px; color: #ff9ba4; font-weight: 600; }

.auth-shell { min-height: calc(100vh - 230px); display: grid; place-items: center; padding: 24px 0; }
.auth-card {
  position: relative;
  width: min(520px, 100%);
  overflow: hidden;
  padding: clamp(28px, 5vw, 48px);
}
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(var(--nmt-orange), var(--nmt-amber));
}
.auth-shell.wide .auth-card { width: min(830px, 100%); }
.auth-branding { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--nmt-border); }
.auth-branding .eyebrow { margin-bottom: 4px; }
.auth-tagline { margin: 0; color: #c1ceda; font-size: 13px; }
.enrol-grid { display: grid; grid-template-columns: 280px 1fr; gap: 30px; align-items: center; margin: 25px 0; }
.qr-panel { padding: 15px; border: 1px solid var(--nmt-border); border-radius: 14px; background: #fff; }
.qr-panel img { display: block; width: 100%; height: auto; }
.secret-code, .recovery-grid code, .code-panel {
  border: 1px solid rgba(38, 56, 77, .78);
  border-radius: 9px;
  background: #07131f;
  color: #dce7f1;
}
.secret-code { display: block; margin: 12px 0; padding: 12px; word-break: break-all; }
.recovery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 22px 0; }
.recovery-grid code { padding: 11px; text-align: center; font-size: 16px; }
.code-panel { overflow-x: auto; padding: 14px 16px; }
.code-panel pre { margin: 0; white-space: pre-wrap; word-break: break-word; }
code { color: #d6e0ea; word-break: break-word; }

.messages { margin-bottom: 20px; }
.message,
.service-warning,
.service-danger,
.service-success {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 13px 15px;
}
.message { border-left: 4px solid #6d88a4; background: rgba(109, 136, 164, .13); color: #dce6f0; }
.message + .message { margin-top: 8px; }
.message-success, .service-success { border-color: rgba(98, 184, 137, .25); border-left-color: var(--nmt-success); background: rgba(98, 184, 137, .12); color: #b8ebcb; }
.message-error, .service-danger { border-color: rgba(227, 107, 117, .25); border-left-color: var(--nmt-danger); background: rgba(227, 107, 117, .12); color: #ffc1c6; }
.message-warning, .service-warning { border-color: rgba(224, 174, 77, .25); border-left-color: var(--nmt-warning); background: rgba(224, 174, 77, .11); color: #f7d795; }

.empty-state {
  padding: 30px;
  border: 1px dashed #344b64;
  border-radius: 12px;
  background: rgba(7, 17, 31, .42);
  color: var(--muted);
  text-align: center;
}
.empty-state h2 { margin-bottom: 8px; color: #dce5ee; }
.empty-state p:last-child { margin-bottom: 0; }
.event-list { margin: 0; padding: 0; list-style: none; }
.event-list li { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.event-list li:last-child { border-bottom: 0; }
.event-list span { color: var(--muted); font-size: 12px; }

dl,
.detail-list { display: grid; grid-template-columns: minmax(130px, 170px) minmax(0, 1fr); gap: 12px 18px; margin: 0; }
.detail-list > div { display: contents; }
dt { color: var(--muted); }
dd { min-width: 0; margin: 0; }
.filter-row { display: grid; grid-template-columns: 1fr 220px auto; gap: 10px; margin-bottom: 18px; }
.filter-row-wide { grid-template-columns: minmax(16rem, 1fr) minmax(12rem, 220px) auto; }

.service-summary {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 17, 31, .35);
}
.inline-help { min-height: 22px; color: var(--muted); font-size: 13px; }
.polling-indicator { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.polling-indicator::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--nmt-warning); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* Global server-operation progress shield */
body.operation-active { overflow: hidden; }
.operation-progress[hidden] { display: none !important; }
.operation-progress {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 7, 13, .82);
  backdrop-filter: blur(6px);
}
.operation-progress-card {
  width: min(620px, 100%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: clamp(24px, 5vw, 38px);
  border: 1px solid var(--nmt-border-strong);
  border-radius: 16px;
  background: var(--nmt-surface-raised);
  box-shadow: var(--nmt-shadow-raised);
}
.operation-progress-copy { min-width: 0; }
.operation-progress-copy h2 { margin: 4px 0 10px; }
.operation-progress-copy p { margin: 0 0 12px; }
.operation-spinner {
  width: 46px;
  height: 46px;
  border: 5px solid #26394d;
  border-top-color: var(--nmt-orange);
  border-radius: 50%;
  animation: operation-spin .85s linear infinite;
}
.operation-progress-track { position: relative; height: 7px; overflow: hidden; margin: 18px 0 14px; border-radius: 999px; background: #26394d; }
.operation-progress-track span { position: absolute; inset-block: 0; width: 38%; border-radius: inherit; background: var(--nmt-orange); animation: operation-track 1.35s ease-in-out infinite; }
.operation-progress-meta { color: var(--muted); font-size: 13px; }
.operation-progress-delayed { padding: 10px 12px; border: 1px solid rgba(224, 174, 77, .22); border-radius: 9px; background: rgba(224, 174, 77, .10); color: #f1cf89; font-size: 13px; }
.operation-progress-warning { color: #ff9aa4; font-size: 13px; font-weight: 750; }
.operation-submit-busy { cursor: wait; }
@keyframes operation-spin { to { transform: rotate(360deg); } }
@keyframes operation-track { 0% { left: -40%; } 50% { left: 50%; } 100% { left: 105%; } }

/* Odoo deployment management sub-navigation */
.odoo-profile-subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  margin: 0 0 1.5rem;
  padding: .65rem;
  border: 1px solid var(--nmt-border);
  border-radius: 12px;
  background: rgba(14, 26, 42, .84);
  box-shadow: var(--nmt-shadow);
}
.odoo-profile-subnav__label { margin-right: .35rem; padding: .45rem .55rem; color: #8da2b7; font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.odoo-profile-subnav a { display: inline-flex; align-items: center; min-height: 2.25rem; padding: .45rem .8rem; border: 1px solid transparent; border-radius: 8px; color: #d5e0ea; font-weight: 680; text-decoration: none; }
.odoo-profile-subnav a:hover { border-color: var(--nmt-border-strong); background: rgba(159, 176, 195, .07); color: #fff; }
.odoo-profile-subnav a.is-active { border-color: rgba(243, 112, 33, .45); background: rgba(243, 112, 33, .12); color: #fff; box-shadow: inset 0 -2px 0 var(--nmt-orange); }

/* Public catalogue */
.public-demo-hero {
  position: relative;
  display: flex;
  min-height: 190px;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--nmt-border);
  border-radius: 18px;
  background: linear-gradient(125deg, rgba(19, 34, 56, .96), rgba(8, 20, 34, .96));
  box-shadow: var(--nmt-shadow);
}
.public-demo-hero::after {
  content: "";
  position: absolute;
  right: -5rem;
  bottom: -9rem;
  width: 25rem;
  height: 25rem;
  border: 1px solid rgba(243, 112, 33, .17);
  border-radius: 50%;
  box-shadow: 0 0 0 4rem rgba(31, 47, 120, .07), 0 0 0 8rem rgba(159, 176, 195, .025);
}
.public-demo-hero__copy { position: relative; z-index: 1; max-width: 52rem; }
.public-demo-hero h1 { max-width: 48rem; margin-bottom: .5rem; }
.public-demo-hero p { max-width: 48rem; margin: 0; color: #b3c1cf; font-size: 15px; }
.public-demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1rem; }
.public-demo-card { min-height: 160px; display: flex; flex-direction: column; }
.public-demo-card .public-demo-actions { margin-top: auto; padding-top: 1rem; }
.public-demo-actions form { display: flex; flex-wrap: wrap; gap: .5rem; }
.public-demo-actions input { min-width: 12rem; }
.public-demo-confirm { max-width: 48rem; margin-inline: auto; }
.public-demo-empty { grid-column: 1 / -1; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* M11-S2 mutable instance policy editor */
.policy-editor { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.policy-editor > summary { width: fit-content; list-style: none; }
.policy-editor > summary::-webkit-details-marker { display: none; }
.policy-editor[open] > summary { margin-bottom: 18px; }
.policy-editor__body { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: rgba(7, 17, 31, .42); }
.policy-editor__body h3 { margin-top: 0; }
.policy-editor__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 18px 0; }
.policy-editor__grid label { display: grid; align-content: start; gap: 7px; font-weight: 700; }
.policy-editor__grid label small { color: var(--muted); font-weight: 400; }

/* Public demo start-password dialog */
.public-demo-start-dialog {
  width: min(34rem, calc(100vw - 2rem));
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--nmt-border-strong);
  border-radius: 14px;
  background: var(--nmt-surface-raised);
  color: var(--text);
  box-shadow: var(--nmt-shadow-raised);
}
.public-demo-start-dialog::backdrop { background: rgba(2, 7, 13, .82); backdrop-filter: blur(5px); }
.public-demo-actions .public-demo-start-dialog form { display: grid; gap: 14px; padding: 24px; }
.public-demo-start-dialog__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.public-demo-start-dialog__heading h2 { margin: 4px 0 0; }
.public-demo-start-dialog label { font-weight: 700; }
.public-demo-actions .public-demo-start-dialog input { width: 100%; min-width: 0; }
.public-demo-start-dialog__actions { justify-content: flex-end; margin-top: 4px; }
.dialog-close {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0a1625;
  color: #a8b7c7;
  font: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.dialog-close:hover { border-color: var(--nmt-orange); color: #fff; }

/* M12 sizing editor presentation */
.sizing-row {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--nmt-border);
  border-radius: 13px;
  background: rgba(7, 17, 31, .34);
}
.sizing-row__heading { justify-content: space-between; align-items: center; }
.sizing-row__heading h2 { margin: 0; }
.sizing-default-label {
  display: inline-flex !important;
  width: fit-content;
  align-items: center;
  justify-content: flex-start;
  gap: 9px !important;
  color: #cbd7e2 !important;
  font-weight: 650 !important;
  cursor: pointer;
}
.sizing-default-label span { line-height: 1.2; }

/* M12 dashboard resource presentation */
.resource-target-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.resource-target-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(7, 17, 31, .36);
  color: inherit;
  text-decoration: none;
  transition: border-color .14s ease, background .14s ease, transform .14s ease;
}
.resource-target-card:hover { transform: translateY(-1px); border-color: var(--nmt-border-strong); background: rgba(19, 34, 56, .72); color: inherit; text-decoration: none; }
.resource-rings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.resource-ring {
  --usage: 0;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, #102033 72%, transparent 73% 99%), conic-gradient(var(--nmt-orange) calc(var(--usage) * 1%), #293b50 0);
}
.resource-ring strong { font-size: 1.05rem; }
.resource-ring span { color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.resource-summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.resource-summary-grid article { display: grid; gap: 5px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(7, 17, 31, .36); }
.resource-summary-grid span, .resource-summary-grid small { color: var(--muted); }
.resource-summary-grid strong { font-size: 1.25rem; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; }

/* Shared catalogue/form rows not previously styled by the baseline theme. */
.module-policy-row[hidden], .instance-module-row[hidden] { display: none; }

@media (max-width: 1080px) {
  .topbar { gap: 16px; }
  .nav { gap: 2px; }
  .nav a { padding-inline: 8px; font-size: 13px; }
  .brand small { display: none; }
}

@media (max-width: 900px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-column, .detail-grid, .grid-two { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; }
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav, .user-menu { display: none; width: 100%; }
  body.nav-open .nav, body.nav-open .user-menu { display: flex; }
  .nav { flex-direction: column; align-items: stretch; gap: 3px; padding-top: 5px; border-top: 1px solid var(--nmt-border); }
  .nav a { width: 100%; padding: 10px 12px; }
  .nav a.is-active::after { top: 8px; right: auto; bottom: 8px; left: 3px; width: 2px; height: auto; }
  .user-menu { justify-content: space-between; padding-top: 5px; border-top: 1px solid var(--nmt-border); }
  .policy-editor__grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .odoo-profile-subnav { align-items: stretch; }
  .odoo-profile-subnav__label { width: 100%; }
  .odoo-profile-subnav a { flex: 1 1 12rem; justify-content: center; }
  .resource-summary-grid { grid-template-columns: 1fr; }
  .resource-rings { max-width: 360px; }
}

@media (max-width: 650px) {
  .page-shell { width: min(calc(100% - 20px), 1240px); margin-top: 20px; }
  .page-heading { flex-direction: column; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .field-wide { grid-column: auto; }
  .enrol-grid { grid-template-columns: 1fr; }
  .qr-panel { max-width: 300px; margin: 0 auto; }
  .recovery-grid { grid-template-columns: 1fr; }
  .filter-row, .filter-row-wide { grid-template-columns: 1fr; }
  dl, .detail-list { grid-template-columns: 1fr; gap: 4px; }
  dd { margin-bottom: 12px; }
  .footer { flex-direction: column; gap: 5px; }
  .operation-progress { padding: 14px; }
  .operation-progress-card { grid-template-columns: 1fr; gap: 14px; }
  .operation-spinner { width: 40px; height: 40px; }
  .public-demo-actions .public-demo-start-dialog form { padding: 20px; }
  .public-demo-start-dialog__actions { align-items: stretch; }
  .public-demo-start-dialog__actions .button { width: 100%; }
  .public-demo-hero { min-height: 0; padding: 28px 22px; }
  .public-demo-hero::after { opacity: .55; }
}

@media (max-width: 430px) {
  .metric-grid { grid-template-columns: 1fr; }
  .brand-copy small { display: none; }
  .public-demo-grid { grid-template-columns: 1fr; }
  .actions { align-items: stretch; }
  .actions .button { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

@media print {
  .topbar, .footer, .messages, .actions, .operation-progress { display: none !important; }
  body { background: #fff; color: #111; }
  body::before { display: none; }
  .content-card { border: 0; background: #fff; color: #111; box-shadow: none; }
}
