/* myDCH (Drewcotech Cloud Hosting control panel): its own layout rules, coloured by Drewcotech Yummy Design.
   Pages load wordmark.css ("myDCH" in Jost), yummy.css (a copy of C:\Srvr\Projects\YummyDesign\yummy.css; re-copy to
   update), then this file. The variables below are aliases of the Yummy roles, so every rule keeps its layout and gets
   the Yummy colours (light and dark follow automatically). The "Yummy layer" at the end restyles the shared pieces. */

:root {
  --bg: var(--md-surface); --surface: var(--md-surface-container-low); --surface-2: var(--md-surface-container);
  --border: var(--md-outline-variant); --text: var(--md-on-surface); --muted: var(--md-on-surface-variant);
  --accent: var(--md-primary); --accent-hover: color-mix(in srgb, var(--md-primary) 82%, var(--md-on-surface));
  --accent-soft: var(--md-primary-container); --on-accent: var(--md-on-primary);
  --good: var(--md-on-success-container); --good-bg: var(--md-success-container);
  --wait: var(--md-on-tertiary-container); --wait-bg: var(--md-tertiary-container);
  --bad: var(--md-on-error-container); --bad-bg: var(--md-error-container);
  --console-bg: #0e1013; --console-text: #d7dbe2;
  --shadow: none; --radius: var(--shape-xl); --max: 1160px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.55; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1 { font-size: 1.6rem; margin: 0 0 18px; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
h3 { font-size: 1rem; margin: 0 0 8px; }
code, .mono { font-family: var(--mono); font-size: .92em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px; z-index: 10; }
.inline { display: inline; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.spacer { flex: 1; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 16px; }

/* ---- Top bar ---------------------------------------------------------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-in { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { width: 48px; height: auto; }
.brand span { font-weight: 700; font-size: 1.05rem; display: flex; flex-direction: column; line-height: 1.15; }
.brand small { font-weight: 500; font-size: .74rem; color: var(--muted); }
.mainnav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.mainnav a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 550; }
.mainnav a:hover { background: var(--surface-2); color: var(--text); }
.mainnav a.active { color: var(--accent); background: var(--accent-soft); }
.mainnav a.staff { border: 1px dashed var(--border); }
.who { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: .9rem; }

.content { padding-top: 28px; padding-bottom: 48px; min-height: 60vh; }
.footer { display: flex; gap: 18px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 32px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--border); }
.footer a { color: var(--muted); }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin: -6px 0 22px; }
.tabs a { padding: 8px 12px; text-decoration: none; color: var(--muted); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font-size: .75rem; text-align: center; }

/* ---- Cards, grids ----------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.project-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); }
.project-card:hover { border-color: var(--accent); }
.project-card .host { font-family: var(--mono); font-size: .9rem; color: var(--muted); word-break: break-all; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

.center-card { min-height: 85vh; display: grid; place-items: center; padding: 24px 16px; }
.center-card .card { width: 100%; max-width: 420px; }
.center-card .brand { margin-bottom: 18px; }

/* ---- Badges, flashes -------------------------------------------------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.badge-good { background: var(--good-bg); color: var(--good); }
.badge-wait { background: var(--wait-bg); color: var(--wait); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid var(--border); }
.flash-ok { background: var(--good-bg); color: var(--good); }
.flash-info { background: var(--accent-soft); color: var(--accent); }
.flash-warn { background: var(--wait-bg); color: var(--wait); }
.flash-error { background: var(--bad-bg); color: var(--bad); }
.notice { padding: 12px 16px; border-radius: 10px; background: var(--wait-bg); color: var(--wait); margin-bottom: 16px; }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice.info { background: var(--accent-soft); color: var(--accent); }
.error { color: var(--bad); }

/* ---- Forms, buttons --------------------------------------------------- */
label { display: block; font-weight: 550; margin-bottom: 12px; }
label .hint { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input:not([type]), select, textarea {
  display: block; width: 100%; margin-top: 5px; padding: 9px 11px; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; }
.button, button.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 8px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; }
.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.button.secondary { background: var(--surface); color: var(--accent); }
.button.secondary:hover { background: var(--accent-soft); color: var(--accent); }
.button.danger { background: var(--surface); color: var(--bad); border-color: var(--bad); }
.button.danger:hover { background: var(--bad-bg); }
.button.small { padding: 5px 10px; font-size: .85rem; }
.button.wide { width: 100%; }
.button[disabled] { opacity: .5; cursor: not-allowed; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
.prefix-input { display: flex; align-items: stretch; margin-top: 5px; }
.prefix-input input { margin-top: 0; border-radius: 8px 0 0 8px; }
.prefix-input span { display: flex; align-items: center; padding: 0 10px; background: var(--surface-2); border: 1px solid var(--border); border-left: 0; border-radius: 0 8px 8px 0; color: var(--muted); font-family: var(--mono); font-size: .88rem; white-space: nowrap; }

.choices { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 16px; }
.choice { position: relative; display: block; margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; font-weight: 400; }
.choice input { position: absolute; opacity: 0; }
.choice:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); }
.choice strong { display: block; }
.choice .price { font-weight: 700; color: var(--accent); }

/* ---- Tables ----------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
.card > .table-wrap { margin: -20px; }
.card > .table-wrap table { border-radius: var(--radius); }

/* ---- File manager ----------------------------------------------------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-family: var(--mono); font-size: .9rem; margin-bottom: 12px; }
.crumbs a { text-decoration: none; }
.files td.name a { text-decoration: none; font-weight: 550; }
.files .icon { display: inline-block; width: 1.4em; color: var(--muted); }
.editor { width: 100%; min-height: 60vh; font-family: var(--mono); font-size: .88rem; line-height: 1.5; tab-size: 4; white-space: pre; }
.usage { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; border: 1px solid var(--border); }
.usage > span { display: block; height: 100%; background: var(--accent); }
.usage.full > span { background: var(--bad); }

/* ---- Console ---------------------------------------------------------- */
.console { background: var(--console-bg); color: var(--console-text); font-family: var(--mono); font-size: .85rem; line-height: 1.45;
  border-radius: 10px; padding: 14px; height: 52vh; overflow-y: auto; white-space: pre-wrap; word-break: break-word; }
.console-input { display: flex; gap: 8px; margin-top: 10px; }
.console-input input { margin-top: 0; font-family: var(--mono); }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.stat b { display: block; font-size: 1.1rem; }
.stat span { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

/* ---- Tickets ---------------------------------------------------------- */
.thread { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.msg { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; }
.msg.staff { border-left: 4px solid var(--accent); }
.msg.internal { background: var(--wait-bg); border-left: 4px solid var(--wait); }
.msg.system { background: var(--surface-2); }
.msg header { display: flex; gap: 10px; color: var(--muted); font-size: .85rem; margin-bottom: 6px; flex-wrap: wrap; }
.msg .body { white-space: pre-wrap; word-break: break-word; }

/* ---- Spacing helpers (no inline styles: the CSP forbids them) --------- */
.m0 { margin: 0; }
.mb { margin-bottom: 16px; }
.mt { margin-top: 24px; }
meter { width: 100%; height: 10px; }

/* ---------------------------------------------------------------------------------------------------------------
   Yummy layer: the shell and shared components in Drewcotech Yummy Design.
   --------------------------------------------------------------------------------------------------------------- */
body { font-size: 15.5px; }
h1 { font-size: 2rem; font-weight: 760; letter-spacing: -.02em; }
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--md-surface) 88%, transparent); backdrop-filter: blur(14px); border: 0; box-shadow: none; view-transition-name: yd-bar; }
.topbar-in { min-height: 72px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--md-on-surface); font: 400 1.55rem/1 var(--font-brand); }
.brand:hover { color: var(--md-on-surface); }
.brand img { width: 48px; height: auto; display: block; }        /* the real DCH cloud, >= 48 px (LOGO-GUIDE.md) */
.brand span { font: inherit; }
.brand small { display: none; }
.mainnav { gap: 4px; }
.mainnav a { color: var(--md-on-surface-variant); font-weight: 560; text-decoration: none; padding: 10px 16px; border-radius: var(--shape-full); border: 0;
  transition: background .2s var(--ease), color .2s var(--ease), border-radius .35s var(--spring); }
.mainnav a:hover { background: color-mix(in srgb, var(--md-on-surface) 8%, transparent); color: var(--md-on-surface); }
.mainnav a:active { border-radius: var(--shape-md); }
.mainnav a.active { background: var(--md-secondary-container); color: var(--md-on-secondary-container); view-transition-name: yd-nav-current; }
.mainnav a.staff { color: var(--md-tertiary); }
.who > span { color: var(--md-on-surface-variant); font-size: .92rem; }
.content { view-transition-name: yd-content; padding-top: 18px; }
.footer { color: var(--md-on-surface-variant); }

.card { background: var(--md-surface-container-low); border: 0; border-radius: var(--shape-xl); box-shadow: none; }
.project-card { border: 0; border-radius: var(--shape-xl); background: var(--md-surface-container-low);
  transition: transform .45s var(--spring), background .2s var(--ease), border-radius .45s var(--spring); }
.project-card:hover { transform: translateY(-3px); background: var(--md-surface-container); border-radius: var(--shape-xxl); }
.center-card .card { background: var(--md-surface-container-lowest); border-radius: var(--shape-xxl); box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 12px 40px rgb(0 0 0 / .08); animation: yd-rise .5s var(--spring); }
body.plain { background: radial-gradient(60vmax 60vmax at 105% -10%, color-mix(in srgb, var(--md-primary) 16%, transparent), transparent 70%),
  radial-gradient(45vmax 45vmax at -10% 110%, color-mix(in srgb, var(--md-tertiary-container) 80%, transparent), transparent 70%), var(--md-surface); }

/* Buttons: pills that squash on press */
.button, button.button { min-height: 44px; padding: 0 22px; border: 0; border-radius: var(--shape-full); font-weight: 620; background: var(--md-primary); color: var(--md-on-primary);
  transition: background .2s var(--ease), border-radius .4s var(--spring), transform .4s var(--spring-fast), box-shadow .2s var(--ease); }
.button:hover { background: color-mix(in srgb, var(--md-on-primary) 10%, var(--md-primary)); color: var(--md-on-primary); box-shadow: 0 1px 3px rgb(0 0 0 / .18); }
.button:active { border-radius: var(--shape-md); transform: scale(.97); }
.button.secondary { background: var(--md-secondary-container); color: var(--md-on-secondary-container); border: 0; }
.button.secondary:hover { background: color-mix(in srgb, var(--md-on-secondary-container) 9%, var(--md-secondary-container)); color: var(--md-on-secondary-container); }
.button.danger { background: var(--md-error); color: var(--md-on-error); border: 0; }
.button.danger:hover { background: color-mix(in srgb, var(--md-on-error) 10%, var(--md-error)); color: var(--md-on-error); }
.button.small { min-height: 34px; padding: 0 14px; }

/* Fields */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input:not([type]), select, textarea {
  border: 1px solid var(--md-outline); border-radius: var(--shape-md); background: var(--md-surface-container-lowest); padding: 11px 14px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--md-primary); box-shadow: inset 0 0 0 1px var(--md-primary); border-radius: var(--shape-lg); }
.choice { border-radius: var(--shape-xl); transition: border-radius .4s var(--spring), background .2s var(--ease); }
.choice:has(input:checked) { background: var(--md-secondary-container); border-color: transparent; border-radius: var(--shape-xxl); }

/* Badges, notices, tabs, stats, tables */
.badge { border: 0; border-radius: var(--shape-full); padding: 2px 10px; font-weight: 680; }
.badge-accent { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.badge-muted { background: var(--md-surface-container-highest); color: var(--md-on-surface-variant); }
.flash { border: 0; border-radius: var(--shape-lg); animation: yd-rise .5s var(--spring); }
.flash-ok { background: var(--md-inverse-surface); color: var(--md-inverse-on-surface); }
.flash-info { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.notice { border: 0; border-radius: var(--shape-lg); }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 20px; background: var(--md-surface-container); border: 0; border-radius: var(--shape-full); }
.tabs a { padding: 9px 18px; border: 0; border-radius: var(--shape-full); color: var(--md-on-surface-variant); font-weight: 580; text-decoration: none; margin: 0;
  transition: background .25s var(--ease), color .25s var(--ease); }
.tabs a:hover { background: color-mix(in srgb, var(--md-on-surface) 8%, transparent); color: var(--md-on-surface); }
.tabs a.active { background: var(--md-primary); color: var(--md-on-primary); view-transition-name: yd-tab-current; }
.tabs a.active .count { background: var(--md-on-primary); color: var(--md-primary); }
.count { border-radius: var(--shape-full); background: var(--md-error); color: var(--md-on-error); }
.stats { gap: 10px; background: none; border: 0; }
.stat { background: var(--md-surface-container); border-radius: var(--shape-lg); }
.stat b { font-weight: 760; }
.table-wrap { border: 0; border-radius: var(--shape-xl); background: var(--md-surface-container-low); }
.card > .table-wrap { background: transparent; }
th { background: transparent; }
.usage, meter { accent-color: var(--md-primary); }
.console { border-radius: var(--shape-lg); }
.msg { border: 0; border-radius: var(--shape-lg); }
.msg.staff { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.msg.internal { background: var(--md-tertiary-container); color: var(--md-on-tertiary-container); }.grid, .grid-2 { margin-bottom: 16px; }
