/* The admin kit (admin.css, a copy of site-kit/kits/admin/admin.css) on
   roamrock.com's dark palette: the client portal and the studio admin.
   Tokens first, then dark-page touches to the kit's buttons, forms and lists. */

body.studio {
  --brand: var(--blue-deep);
  --brand-2: var(--blue);
  --accent: var(--blue);
  --tint: rgba(47, 159, 232, 0.10);
  --muted: var(--ink-muted);
  --cream: var(--bg);
  --text: var(--ink);
  --radius: 14px;
  --radius-sm: 8px;
  --on-dark: #f6fbff;
  --on-dark-muted: var(--ink-muted);
  --adm-primary: var(--blue-deep);
  --adm-primary-ink: #f6fbff;
  --adm-surface: var(--panel);
  --adm-field: #070b11;
  --adm-ok: #7ee2a8; --adm-ok-bg: rgba(46, 160, 98, 0.16); --adm-ok-line: rgba(46, 160, 98, 0.45);
  --adm-warn: #f6b38a; --adm-warn-bg: rgba(230, 120, 60, 0.16); --adm-warn-line: rgba(230, 120, 60, 0.45);
  --adm-off: #9aa8b8; --adm-off-bg: rgba(147, 166, 187, 0.14);
  --adm-info: #ffd979; --adm-info-bg: rgba(255, 200, 70, 0.14);
}

.studio .studio-main { padding-block: 40px 72px; min-height: 60vh; }
.studio .studio-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.studio .studio-title { font-size: clamp(1.6rem, 4.5vw, 2.2rem); margin: 0; letter-spacing: -0.01em; }
.studio .studio-session { display: flex; gap: 10px; align-items: center; }
.studio .adm-who { color: var(--ink-faint); font-size: 0.85rem; }
.studio .studio-gate { max-width: 560px; }
.studio .adm-h2 { font-size: 1.25rem; }
.studio .adm-h2::after, .studio .studio-title::after { display: none; }
.studio h2.adm-h2 { margin: 0 0 6px; }
.studio .small { font-size: 0.88rem; }
.studio .adm-table th { color: var(--ink-faint); }
.studio .adm-table td { color: var(--ink-muted); }
.studio .adm-table td strong, .studio .adm-table td a { color: var(--ink); }
.studio .adm-table td strong { white-space: nowrap; }
.studio .adm-status-line.is-note { color: var(--ink-muted); font-weight: 400; }
.studio .adm-tabs button { color: var(--ink-muted); }
.studio .adm-tabs button[aria-pressed="true"] { color: #f6fbff; }
.studio .adm-flash { background: var(--tint); border-color: var(--line); color: var(--ink); }
.studio code { font-family: Consolas, "Cascadia Mono", ui-monospace, monospace; font-size: 0.85em; color: var(--ink); background: #070b11; border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; word-break: break-all; }

/* Kit buttons on the dark page: secondary buttons are outlined in the site's soft
   blue (the kit's default border, --line, is too faint here); primary is the deep blue. */
.studio .adm-btn:where(:not(.adm-btn-primary):not(.adm-btn-danger)) { background: transparent; color: var(--blue-soft); border-color: rgba(124, 198, 245, 0.5); }
.studio .adm-btn:where(:not(.adm-btn-primary):not(.adm-btn-danger)):hover:not(:disabled) { background: rgba(47, 159, 232, 0.12); border-color: var(--blue-soft); color: var(--blue-soft); }
.studio .adm-btn-primary { box-shadow: 0 6px 20px rgba(20, 102, 168, 0.35); }
.studio .adm-btn-primary:hover:not(:disabled) { filter: brightness(1.12); box-shadow: 0 8px 26px rgba(47, 159, 232, 0.45); }
.studio .adm-btn-danger { background: transparent; }

/* Kit forms: labels and placeholders */
.studio .adm-field > label, .studio .adm-mini { color: var(--ink-muted); }
.studio .adm-hint { color: var(--ink-faint); }
.studio .adm-app input::placeholder { color: var(--ink-faint); }

/* Lists whose rows open in place (.adm-fixed): column widths that fit a 390 px phone */
.studio .adm-fixed td strong { white-space: normal; }
.studio .adm-fixed .c-money { width: 6.6rem; }
.studio .adm-fixed .c-status { width: 8.4rem; }
.studio .adm-fixed .c-toggle { width: 5.6rem; }
.studio .adm-fixed .c-client { width: 12rem; }
.studio .adm-fixed .c-email { width: 15rem; }
.studio .adm-fixed .c-pkg { width: 13rem; }
.studio .adm-fixed .c-select { width: 10rem; }
.studio .adm-fixed .c-plan { width: 13rem; }
.studio .adm-fixed .c-date { width: 8rem; }
.studio .adm-fixed .c-act { width: 7.5rem; }
.studio .adm-fixed select { width: 100%; }
@media (max-width: 700px) {
  /* shares of the phone's width; the first column keeps a third or more */
  .studio .adm-fixed .c-money { width: 22%; }
  .studio .adm-fixed .c-status { width: 25%; }
  .studio .adm-fixed .c-toggle { width: 20%; }
  .studio .adm-fixed .c-select { width: 36%; }
  .studio .adm-fixed .c-plan { width: 22%; }
  .studio .adm-fixed .c-act { width: 22%; }
  .studio .adm-fixed .pill, .studio .adm-fixed td .adm-btn { white-space: normal; }
  .studio .adm-fixed th { white-space: normal; }
}

/* Portal: invoices to pay and plan cards */
.studio .due-list { list-style: none; margin: 0; padding: 0; }
.studio .due-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px 18px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); }
.studio .due-list li:first-child { border-top: 0; }
.studio .due-amount { font-size: 1.35rem; font-weight: 800; color: var(--ink); }
.studio .due-meta { color: var(--ink-faint); font-size: 0.85rem; }
.studio .plan-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin-top: 12px; }
.studio .plan-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: #0a0f17; }
.studio .plan-card b { font-size: 1.5rem; color: var(--ink); }
.studio .plan-card .adm-btn { margin-top: auto; align-self: flex-start; }

/* Admin: price list tiles */
.studio .price-group { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin: 18px 0 10px; }
.studio .price-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.studio .price-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #0a0f17; cursor: text; transition: border-color 0.15s, box-shadow 0.15s; }
.studio .price-tile:focus-within { border-color: rgba(124, 198, 245, 0.7); box-shadow: 0 0 0 3px rgba(47, 159, 232, 0.15); }
.studio .price-tile.is-changed { border-color: rgba(255, 200, 70, 0.6); }
.studio .price-name { font-weight: 700; color: var(--ink); }
.studio .price-blurb { font-size: 0.8rem; color: var(--ink-faint); }
.studio .price-input { display: flex; align-items: baseline; gap: 2px; margin-top: auto; padding-top: 8px; font-size: 1.6rem; font-weight: 800; color: var(--ink); }
.studio .adm-app .price-input input:not([type="checkbox"]) { width: 100%; min-width: 0; font: inherit; color: inherit; background: transparent; border: 0; border-bottom: 1px dashed var(--line); border-radius: 0; padding: 0 0 2px; box-shadow: none; }
.studio .adm-app .price-input input:focus { border-bottom-color: var(--blue-soft); box-shadow: none; }
@supports (field-sizing: content) { .studio .adm-app .price-input input:not([type="checkbox"]) { field-sizing: content; width: auto; min-width: 2ch; max-width: 100%; } }
.studio .price-per { margin-left: 2px; font-size: 0.9rem; font-weight: 600; color: var(--ink-muted); }
.studio .price-note { font-size: 0.78rem; color: var(--ink-muted); min-height: 1.2em; }
.studio .price-tile.is-changed .price-note { color: var(--adm-info); }
@media (max-width: 640px) {
  .studio .price-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .studio .price-tile { padding: 12px; }
  .studio .price-blurb { display: none; }
  .studio .price-input { font-size: 1.3rem; }
}

/* Business plan tab: a private Markdown document (read view with contents, editor + live preview). */
.studio .bp-tools { border: 0; padding: 0; margin: 10px 0 4px; }
.studio .bp-read.has-toc { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .studio .bp-read.has-toc { grid-template-columns: 210px minmax(0, 1fr); } .studio .bp-toc { position: sticky; top: 16px; align-self: start; } }
.studio .bp-toc { border-left: 2px solid var(--line); padding-left: 14px; font-size: 0.9rem; }
.studio .bp-toc-h { margin: 0 0 6px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--blue-soft); }
.studio .bp-toc ol { margin: 0; padding: 0; list-style: none; }
.studio .bp-toc li { margin-bottom: 5px; }
.studio .bp-toc a { color: var(--ink-muted); text-decoration: none; }
.studio .bp-toc a:hover { color: var(--blue-soft); }
.studio .bp-doc { max-width: 78ch; color: var(--ink-muted); line-height: 1.65; margin-top: 8px; }
.studio .bp-doc h2, .studio .bp-doc h3, .studio .bp-doc h4, .studio .bp-doc h5 { color: var(--ink); line-height: 1.25; scroll-margin-top: 16px; }
.studio .bp-doc h2 { font-size: 1.6rem; margin: 0 0 10px; }
.studio .bp-doc h3 { font-size: 1.25rem; margin: 30px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.studio .bp-doc h4 { font-size: 1.05rem; margin: 20px 0 6px; color: var(--blue-soft); }
.studio .bp-doc h5 { font-size: 0.95rem; margin: 16px 0 4px; }
.studio .bp-doc h2::after, .studio .bp-doc h3::after { display: none; }
.studio .bp-doc p, .studio .bp-doc ul, .studio .bp-doc ol { margin: 0 0 12px; }
.studio .bp-doc li { margin-bottom: 4px; }
.studio .bp-doc li > ul, .studio .bp-doc li > ol { margin: 4px 0 2px; }
.studio .bp-doc strong { color: var(--ink); }
.studio .bp-doc a { color: var(--blue-soft); }
.studio .bp-doc code { background: rgba(124, 198, 245, 0.1); padding: 1px 5px; border-radius: 4px; font-size: 0.9em; }
.studio .bp-doc pre { background: #070b11; border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow-x: auto; }
.studio .bp-doc pre code { background: none; padding: 0; }
.studio .bp-doc blockquote { margin: 0 0 14px; padding: 10px 16px; border-left: 3px solid var(--blue-soft); background: rgba(47, 159, 232, 0.08); border-radius: 0 8px 8px 0; }
.studio .bp-doc blockquote p:last-child { margin-bottom: 0; }
.studio .bp-doc hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.studio .bp-doc li.bp-check { list-style: none; margin-left: -1.1rem; }
.studio .bp-doc li.bp-check.is-done { color: var(--ink-faint); }
.studio .bp-table { overflow-x: auto; margin: 0 0 14px; }
.studio .bp-doc table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.studio .bp-doc th, .studio .bp-doc td { text-align: left; vertical-align: top; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.studio .bp-doc th { color: var(--ink-faint); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.studio .bp-split { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); margin-top: 10px; }
@media (min-width: 1000px) { .studio .bp-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .studio .bp-split > * { height: 70vh; overflow: auto; } }
.studio .adm-app textarea.bp-text { min-height: 60vh; font: 0.9rem/1.55 ui-monospace, "Cascadia Mono", Consolas, monospace; resize: vertical; }
@media (min-width: 1000px) { .studio .adm-app textarea.bp-text { min-height: 0; resize: none; } }
.studio .bp-preview { margin-top: 0; padding: 14px 18px; border: 1px dashed var(--line); border-radius: 10px; max-width: none; }

@media print {
  body.bp-printing > *:not(main), body.bp-printing .studio-head, body.bp-printing .adm-flash,
  body.bp-printing .adm-stats, body.bp-printing .adm-tabs, body.bp-printing .bp-tools, body.bp-printing .bp-toc,
  body.bp-printing .adm-panel-head, body.bp-printing .adm-panel > p { display: none !important; }
  body.bp-printing, body.bp-printing .adm-panel { background: #fff !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
  body.bp-printing .bp-read.has-toc { display: block; }
  body.bp-printing .bp-doc { max-width: none; color: #222; }
  body.bp-printing .bp-doc h2, body.bp-printing .bp-doc h3, body.bp-printing .bp-doc h5, body.bp-printing .bp-doc strong { color: #000; }
  body.bp-printing .bp-doc h4, body.bp-printing .bp-doc a { color: #1466a8; }
  body.bp-printing .bp-doc h3 { break-after: avoid; }
}
