/* DANIAN client portal — brand styles (danian.co palette, Sep 3 2026).
   Extracted from the live site CSS: bg #FAFAF8, text #0E1413, primary teal
   #0F4C5C, muted #545B5A, hairline #F2F2EE, tint #E3EDEF, font Geist
   (self-hosted, fonts.css). Light, airy, premium-minimal — matches the
   danian.co look, NOT a dark admin theme. */
:root {
  --bg: #fafaf8;
  --card: #ffffff;
  --line: #f2f2ee;
  --text: #0e1413;
  --muted: #545b5a;
  --brand: #0f4c5c;
  --brand-deep: #0b3d4a;
  --tint: #edefef;
  --brand-tint: #e3edef;
  --ok: #1f6f4a;
  --err: #c0392b;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.shell { max-width: 460px; margin: 7vh auto; padding: 0 20px; }
.top {
  display: flex;
  justify-content: center; /* DANIAN centered (Alek, Sep 3) */
  margin-bottom: 18px;
}
.brand {
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--text);
  font-size: 15px;
}
.brand-dot { color: var(--brand); }
.sub { color: var(--muted); font-size: 13px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px 28px;
  box-shadow: 0 1px 2px rgba(14, 20, 19, 0.04);
}
.card h1 {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.card .lead { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.names-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.stack label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.stack input {
  background: #fff;
  border: 1px solid var(--tint);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 15px;
  font-family: inherit;
  width: 100%;
  transition: border-color 0.15s linear;
}
.stack input::placeholder { color: #b8bebd; }
.stack input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 76, 92, 0.08);
}
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s linear;
}
.btn:hover { background: var(--brand-deep); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--brand);
}
.btn.ghost:hover { background: var(--brand-tint); }
.row { display: flex; gap: 10px; margin-top: 6px; }
.switch {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.switch a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
  margin-left: 6px;
}
.switch a:hover { text-decoration: underline; }
.muted { color: var(--muted); font-size: 14px; }
.muted a { color: var(--brand); }
.form-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 18px; /* breathing room under the Sign In button (mobile tap targets) */
  font-size: 13px;
}
.form-foot a { color: var(--brand); text-decoration: none; }
.form-foot a:hover { text-decoration: underline; }
.err { color: var(--err); margin: 0; font-size: 13.5px; }
.ok { color: var(--ok); margin: 0; font-size: 13.5px; }
/* Neutral form message: amber-slate — informational, not success-green or alarm-red. */
.neutral { color: #8a6d3b; margin: 0; font-size: 13.5px; }
.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 18px;
  margin: 0 0 18px;
  font-size: 14.5px;
}
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
.turnstile { min-height: 65px; }
/* Legal micro-copy: present + clickable, but visually near-invisible. */
.legal {
  margin: 18px 0 0;
  text-align: center;
  font-size: 11px;
  line-height: 1.45;
  color: #a9afae;
}
.legal a { color: #8f9a99; text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--brand); }
@media (max-width: 480px) {
  .shell { margin-top: 4vh; }
  .card { padding: 22px 18px; }
  .names-row { grid-template-columns: 1fr; }
}

/* ---- Phase 6b: dashboard / apps / catalog / credentials ---- */
.shell.wide { max-width: 640px; }
.page-h { margin: 0 0 4px; font-size: 22px; font-weight: 600; }
.page-sub { margin: 0 0 22px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 14px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 14px; text-align: center; text-decoration: none; color: var(--text);
  transition: border-color 0.15s linear;
}
.tile:hover { border-color: var(--brand); }
.tile strong { display: block; font-size: 24px; color: var(--brand); margin-bottom: 4px; }
.tile span { font-size: 12.5px; color: var(--muted); }
.dash-foot { display: flex; justify-content: space-between; margin-top: 8px; }
.link { background: none; border: 0; padding: 0; color: var(--brand); font-size: 14px; cursor: pointer; text-decoration: none; font-family: inherit; }
.link:hover { text-decoration: underline; }
.small { font-size: 12.5px; }
.btn.small { padding: 9px 18px; font-size: 13.5px; }
.app-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.app-row {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; text-decoration: none; color: var(--text);
}
.app-row:hover { border-color: var(--brand); }
.app-row strong { display: block; margin-bottom: 3px; }
.app-row .muted { font-size: 13px; }
.chev { color: var(--brand); font-size: 18px; }
.catalog-list { display: grid; gap: 6px; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 10px; } /* retired Sep 3: dropdown replaces radio list */
.stack select, .stack textarea {
  background: #fff; border: 1px solid var(--tint); color: var(--text);
  border-radius: 10px; padding: 11px 13px; font-size: 15px; font-family: inherit; width: 100%;
}
.pill {
  font-size: 12px; font-weight: 600; border-radius: 999px; padding: 5px 12px;
  background: var(--brand-tint); color: var(--brand); white-space: nowrap;
}
.pill.active { background: #e5f0ea; color: var(--ok); }
.pill.suspended, .pill.cancelled { background: #f5ded8; color: var(--err); }
.sec-h { font-size: 15px; font-weight: 600; margin: 0 0 12px; }
.card + .card { margin-top: 14px; }
.card .kv { margin-bottom: 0; }
.doc-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cred-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cred { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.cred-head { margin-bottom: 8px; }
.cred-line { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 14px; flex-wrap: wrap; }
.cred-line .muted { width: 64px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.cred-line code {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 4px 10px; font-size: 13.5px; word-break: break-all;
}
.reveal, .copy {
  background: var(--brand-tint); color: var(--brand); border: 0; border-radius: 999px;
  padding: 6px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.copy { background: var(--brand); color: #fff; }
@media (max-width: 480px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } }

/* ---- 6c billing card ---- */
.billing-card { margin-top: 0; }

/* ---- Searchable app combobox (one field: type or scroll) ---- */
.combo { position: relative; }
.combo-btn {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  width: 100%; background: #fff; border: 1px solid var(--tint); color: var(--text);
  border-radius: 10px; padding: 11px 13px; font-size: 15px; font-family: inherit;
  cursor: pointer; text-align: left;
}
.combo-btn:hover, .combo.open .combo-btn { border-color: var(--brand); }
.combo-btn .muted, .combo-btn span:first-child { color: var(--muted); }
.combo.open .combo-btn span:first-child, .combo-btn span:first-child:not(.muted) { color: var(--text); }
.combo-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(14, 20, 19, 0.12); overflow: hidden;
}
.combo-search {
  width: 100%; border: 0; border-bottom: 1px solid var(--line);
  padding: 12px 14px; font-size: 15px; outline: none; border-radius: 0;
  background: #fff; color: var(--text); font-family: inherit;
}
.combo-options { max-height: 264px; overflow-y: auto; padding: 6px; }
.combo-item {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  padding: 10px 12px; font-size: 14.5px; cursor: pointer; border-radius: 8px;
  color: var(--text); font-family: inherit;
}
.combo-item:hover, .combo-item.hl { background: var(--brand-tint); }
.combo-item.sel { color: var(--brand); font-weight: 600; }
.combo-empty { padding: 14px; margin: 0; }

/* ---- Phase 7: admin shell (sidebar layout, same brand palette) ---- */
.adm { display: grid; grid-template-columns: 218px minmax(0, 1fr); min-height: 100vh; }
.adm-side {
  border-right: 1px solid var(--line); background: var(--card);
  padding: 22px 14px; display: flex; flex-direction: column; gap: 18px;
  position: sticky; top: 0; height: 100vh;
}
.adm-brand { font-weight: 600; letter-spacing: 0.16em; font-size: 14px; padding: 0 10px; }
.adm-brand span { color: var(--brand); }
.adm-side nav { display: grid; gap: 2px; }
.adm-side nav a {
  padding: 9px 12px; border-radius: 10px; text-decoration: none;
  color: var(--muted); font-size: 14px; font-weight: 500;
}
.adm-side nav a:hover { background: var(--brand-tint); color: var(--brand); }
.adm-side nav a.on { background: var(--brand); color: #fff; }
.adm-side-foot { margin-top: auto; display: grid; gap: 6px; padding: 0 10px; font-size: 12.5px; }
.adm-side-foot a { color: var(--muted); text-decoration: none; }
.adm-side-foot a:hover { color: var(--brand); }
.adm-main { padding: 30px 34px 60px; max-width: 1160px; width: 100%; }
.adm-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 22px; }
.adm-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px; display: grid; gap: 4px;
}
.adm-card-label { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.adm-card-value { font-size: 26px; color: var(--brand); font-weight: 600; }
.adm-card-sub { font-size: 12.5px; color: var(--muted); }
.adm-toolbar { display: flex; gap: 10px; margin: 0 0 16px; flex-wrap: wrap; }
.adm-toolbar input, .adm-toolbar select {
  background: #fff; border: 1px solid var(--tint); border-radius: 10px;
  padding: 10px 13px; font-size: 14.5px; color: var(--text); font-family: inherit;
}
.adm-toolbar input { min-width: 260px; }
.adm-toolbar .btn { padding: 10px 18px; font-size: 13.5px; }
.adm-tablewrap { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-table th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.adm-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table tbody tr:hover { background: var(--bg); }
.adm-inline { display: flex; gap: 10px; margin: 12px 0; flex-wrap: wrap; align-items: center; }
.adm-inline input, .adm-inline select, .adm-inline textarea {
  background: #fff; border: 1px solid var(--tint); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; color: var(--text); font-family: inherit;
}
.adm-card-block { margin-bottom: 16px; }
.adm-card-block textarea {
  width: 100%; background: #fff; border: 1px solid var(--tint); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; color: var(--text); font-family: inherit;
}
.adm-cred-form { max-width: 430px; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.adm-thread { display: grid; gap: 10px; margin: 16px 0; }
.adm-msg { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.adm-msg.internal { background: var(--bg); border-style: dashed; }
.adm-msg-h { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.adm-msg-b { margin: 0; font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }
.adm-subms { display: grid; gap: 12px; }
.adm-subm-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.adm-kv-row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 3px 0; font-size: 14px; }
.adm-kv-row dt { color: var(--muted); }
.adm-kv-row dd { margin: 0; word-break: break-word; }
.adm-ip dd code { background: var(--brand-tint); color: var(--brand); border-radius: 8px; padding: 3px 10px; font-size: 13px; }
.adm-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.adm-plain { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14.5px; }
.adm-code { background: var(--brand-tint); color: var(--brand); border-radius: 6px; padding: 2px 8px; font-size: 12.5px; }
.adm-details { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-warn { color: #8a6d3b; font-weight: 600; }
.adm-trends { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.adm-trend { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.adm-trend-h { display: flex; justify-content: space-between; margin-bottom: 10px; font-weight: 600; font-size: 14px; }
.adm-bars { display: flex; align-items: flex-end; gap: 3px; height: 68px; }
.adm-bar { flex: 1; min-width: 4px; border-radius: 3px 3px 0 0; background: var(--brand-tint); }
.adm-bar.t-signup { background: #9fc2cc; }
.adm-bar.t-order { background: var(--brand); }
.adm-bar.t-ticket { background: #d9c08f; }
@media (max-width: 900px) {
  .adm { grid-template-columns: 1fr; }
  .adm-side { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; gap: 12px; }
  .adm-side nav { display: flex; gap: 4px; }
  .adm-side-foot { display: none; }
  .adm-main { padding: 20px 16px 40px; }
  .adm-two, .adm-trends { grid-template-columns: 1fr; }
  .adm-toolbar input { min-width: 0; flex: 1; }
}

/* ---- Phase 7 QA polish: mobile nav scroll + table containment ---- */
@media (max-width: 900px) {
  .adm-side { width: 100%; max-width: 100%; }
  .adm-side nav { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .adm-side nav::-webkit-scrollbar { display: none; }
  .adm-side nav a { white-space: nowrap; flex: 0 0 auto; }
  .adm-main { overflow-x: hidden; }
  .adm-tablewrap { max-width: 100%; }
  .adm-table { min-width: 560px; } /* readable floor; the wrap scrolls horizontally */
}
/* Balanced 3x2 stat grid (QA: 5-up orphaned the 6th card) */
.adm-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .adm-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
