/* ==========================================================================
   GVS Suite — shared component layer
   --------------------------------------------------------------------------
   Promoted out of the GVS.Suite admin pages, where each page had grown its own
   near-identical copy of these rules under its own prefix (.us-* on Users,
   .lc-* on Licences, .au-* on Automation). They differed only in padding and
   font-size, so the density variants below replace all three.

   Chrome and overlay rules (.mh-bar / .mh-sidebar / .mh-modal / .mh-btn /
   .mh-field / .mh-input / .mh-search / .mh-seg / .mh-meter / .mh-toast) are NOT
   duplicated here — they already live in gvs-myhome.css and the components in
   Components/Suite emit those class names directly.

   Linked automatically: gvs-myhome.css @imports this file, so every consumer
   that already links gvs-myhome.css picks it up with no index.html change.
   Tokens only — see colors_and_type / gvs-design-tokens.css.
   ========================================================================== */

/* ---------- Page header --------------------------------------------------- */
/* Title + subtitle on the left, a toolbar of controls on the right. Wraps to two
   rows on narrow viewports rather than crushing the toolbar. */
.gvs-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 22px; }
.gvs-page-head h1 { font-family: var(--gvs-font-display); font-weight: 800; letter-spacing: -0.02em; color: var(--gvs-fg-1); margin: 0; font-size: clamp(26px, 3vw, 34px); line-height: 1.1; }
.gvs-page-sub { color: var(--gvs-fg-3); font-size: 14px; margin-top: 6px; }
.gvs-page-head h1 .gvs-page-icon { font-size: 0.92em; color: var(--gvs-primary); vertical-align: -0.08em; margin-right: 6px; }
.gvs-page-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gvs-page-toolbar .mh-search { width: min(320px, 60vw); }

/* ---------- Data table --------------------------------------------------- */
/* The wrapper is the card; the table sits flush inside it. overflow-x:auto is
   deliberate — a wide table must scroll inside its own container instead of
   clipping its right-hand columns (the MudBlazor-9 fallout MyAudit hit). */
.gvs-dt-wrap { background: var(--gvs-surface); border: 1px solid var(--gvs-border); border-radius: var(--gvs-radius-lg); box-shadow: var(--gvs-elev-1); overflow: hidden; }
.gvs-dt-scroll { overflow-x: auto; }
.gvs-dt { width: 100%; border-collapse: collapse; }
.gvs-dt thead th {
  text-align: left; padding: 13px 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gvs-fg-3); background: var(--gvs-surface-alt);
  border-bottom: 1px solid var(--gvs-divider); white-space: nowrap;
}
.gvs-dt tbody td { padding: 15px 20px; border-bottom: 1px solid var(--gvs-divider); vertical-align: middle; font-size: 14px; }
.gvs-dt tbody tr:last-child td { border-bottom: none; }
.gvs-dt tbody tr { transition: background var(--gvs-dur-fast); }
.gvs-dt tbody tr:hover { background: var(--gvs-surface-alt); }

/* Densities. "comfortable" is the Users default; "compact" is what Licences and
   Automation used. */
.gvs-dt[data-density="compact"] thead th { padding: 12px 18px; }
.gvs-dt[data-density="compact"] tbody td { padding: 13px 18px; font-size: 13.5px; }

/* Rows that navigate on click say so. */
.gvs-dt[data-clickable="true"] tbody tr { cursor: pointer; }

.gvs-dt-actions { text-align: right; white-space: nowrap; }
.gvs-dt-numeric { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Row action button -------------------------------------------- */
/* The quiet outline button that sits in an actions cell ("Manage", "Open"). */
.gvs-rowbtn {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px;
  border: 1px solid var(--gvs-border-strong); border-radius: var(--gvs-radius-sm);
  background: var(--gvs-surface); color: var(--gvs-fg-2);
  font-size: 13.5px; font-weight: 600;
  transition: background var(--gvs-dur-fast), border-color var(--gvs-dur-fast), color var(--gvs-dur-fast);
}
.gvs-rowbtn:hover { background: var(--gvs-primary-weak); border-color: var(--gvs-primary); color: var(--gvs-primary); }
.gvs-rowbtn:disabled { color: var(--gvs-grey-300); border-color: var(--gvs-border); cursor: default; background: var(--gvs-surface); }
.gvs-rowbtn .material-symbols-rounded { font-size: 18px; }

/* ---------- Status pill --------------------------------------------------- */
/* Soft tinted pill with a solid dot. Tone carries the meaning; the dot exists so
   the state survives a greyscale print and does not rely on colour alone. */
.gvs-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; padding: 4px 11px 4px 9px; border-radius: var(--gvs-radius-pill); white-space: nowrap; }
.gvs-status-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.gvs-status.tone-success { color: var(--gvs-success-700); background: var(--gvs-success-50); }
.gvs-status.tone-success .gvs-status-dot { background: var(--gvs-success-500); }
.gvs-status.tone-warning { color: var(--gvs-amber-700); background: var(--gvs-warning-50); }
.gvs-status.tone-warning .gvs-status-dot { background: var(--gvs-warning-500); }
.gvs-status.tone-danger { color: var(--gvs-danger-700); background: var(--gvs-danger-50); }
.gvs-status.tone-danger .gvs-status-dot { background: var(--gvs-danger-500); }
.gvs-status.tone-info { color: var(--gvs-info-700); background: var(--gvs-info-50); }
.gvs-status.tone-info .gvs-status-dot { background: var(--gvs-info-500); }
.gvs-status.tone-neutral { color: var(--gvs-fg-3); background: var(--gvs-surface-sunken); }
.gvs-status.tone-neutral .gvs-status-dot { background: var(--gvs-grey-400); }

/* Dark mode. The -50 tint tokens remap to translucent fills automatically, but the
   -700 text tokens do NOT — they stay dark and go illegible on a navy surface. The
   Suite had learnt this for one tone ([data-theme="dark"] .us-status.active); all
   five need it. */
[data-theme="dark"] .gvs-status.tone-success { color: var(--gvs-success-500); }
[data-theme="dark"] .gvs-status.tone-warning { color: var(--gvs-amber-300); }
[data-theme="dark"] .gvs-status.tone-danger { color: var(--gvs-danger-500); }
[data-theme="dark"] .gvs-status.tone-info { color: var(--gvs-info-500); }

/* ---------- Native select ------------------------------------------------- */
/* A real <select> keeps the platform picker on a handset; the chevron is drawn
   over it and the appearance reset removes the OS arrow. */
.gvs-select { position: relative; display: inline-flex; align-items: center; }
.gvs-select select {
  appearance: none; -webkit-appearance: none;
  height: 40px; padding: 0 34px 0 12px;
  border: 1px solid var(--gvs-border-strong); border-radius: var(--gvs-radius-sm);
  background: var(--gvs-surface); color: var(--gvs-fg-1);
  font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: border-color var(--gvs-dur-fast), box-shadow var(--gvs-dur-fast);
}
.gvs-select select:hover { border-color: var(--gvs-fg-3); }
.gvs-select select:focus { outline: none; border-color: var(--gvs-primary); box-shadow: var(--gvs-focus-ring); }
.gvs-select select:disabled { color: var(--gvs-fg-3); cursor: default; background: var(--gvs-surface-sunken); }
.gvs-select .material-symbols-rounded { position: absolute; right: 10px; pointer-events: none; font-size: 20px; color: var(--gvs-fg-3); }
.gvs-select.full { display: flex; width: 100%; }
.gvs-select.full select { width: 100%; }
.gvs-select.sm select { height: 34px; padding: 0 32px 0 12px; font-size: 13px; }

/* ---------- Empty state -------------------------------------------------- */
.gvs-empty { padding: 56px 20px; text-align: center; color: var(--gvs-fg-3); }
.gvs-empty .material-symbols-rounded { font-size: 40px; color: var(--gvs-grey-300); }
.gvs-empty-title { font-size: 15px; font-weight: 600; color: var(--gvs-fg-2); margin-top: 10px; }
.gvs-empty-hint { font-size: 13.5px; margin-top: 4px; }
.gvs-empty-action { margin-top: 18px; }
.gvs-empty.inset { padding: 32px 20px; }

/* ---------- Pager -------------------------------------------------------- */
.gvs-pager { display: flex; align-items: center; justify-content: flex-end; gap: 18px; padding: 12px 20px; border-top: 1px solid var(--gvs-divider); background: var(--gvs-surface-alt); flex-wrap: wrap; }
.gvs-pager-rpp { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--gvs-fg-3); }
.gvs-pager-range { font-size: 13px; color: var(--gvs-fg-2); font-weight: 600; }
.gvs-pager-nav { display: flex; gap: 2px; }
.gvs-pager-nav button { width: 34px; height: 34px; border-radius: var(--gvs-radius-sm); display: grid; place-items: center; color: var(--gvs-fg-2); transition: background var(--gvs-dur-fast); }
.gvs-pager-nav button:hover:not(:disabled) { background: var(--gvs-surface-sunken); }
.gvs-pager-nav button:disabled { color: var(--gvs-grey-300); cursor: default; }
.gvs-pager-nav .material-symbols-rounded { font-size: 20px; }

/* ---------- Count pip ---------------------------------------------------- */
.gvs-pip { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--gvs-radius-pill); display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--gvs-fg-2); background: var(--gvs-surface-sunken); }
.gvs-pip.alert { color: #fff; background: var(--gvs-danger-500); }

/* ---------- Inline form error ------------------------------------------- */
/* The visible validation summary the Suite dialogs learned to show instead of
   silently refusing to submit. */
.gvs-formerror { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; margin-bottom: 14px; border-radius: var(--gvs-radius-md); background: var(--gvs-danger-50); color: var(--gvs-danger-700); font-size: 13px; line-height: 1.45; }
.gvs-formerror .material-symbols-rounded { font-size: 19px; flex: none; }

/* ---------- Destructive action button ------------------------------------ */
/* Extends the .mh-btn family in gvs-myhome.css. Lived in the Suite's per-page
   gvs-users.css even though it is chrome, so nothing else could use it. */
.mh-btn.danger { background: var(--gvs-danger-500); color: var(--gvs-fg-on-primary); }
.mh-btn.danger:hover:not(:disabled) { background: var(--gvs-danger-700); }
.mh-btn.danger:disabled { background: var(--gvs-grey-200); color: var(--gvs-grey-400); cursor: default; }

/* ---------- Split dialog footer ------------------------------------------ */
/* Destructive action far left, confirm/cancel right, so "Remove" is nowhere near
   where the thumb goes for "Cancel". */
.mh-modal-foot.gvs-modal-foot-split { justify-content: space-between; }
.gvs-modal-foot-actions { display: flex; gap: 10px; }

/* Quiet destructive action — a delete that is available but not shouting, for a
   footer or a settings row. The filled .mh-btn.danger is for the confirmation. */
.mh-btn.ghost-danger { color: var(--gvs-danger-500); }
.mh-btn.ghost-danger:hover:not(:disabled) { background: var(--gvs-danger-50); }

/* ---------- Culture picker ------------------------------------------------ */
/* Sits in the account menu next to appearance, so it matches that section's
   padding rather than a form field's. */
.gvs-culture { display: flex; flex-direction: column; gap: 6px; padding: 8px 14px 4px; }
.gvs-culture-label { text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }
