/* SuperTop Takeoff pages. Colours, type, radii and shadows come only from the brand tokens (--st-*). */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--st-bg-section); color: var(--st-fg); font-size: 14px; line-height: 1.5; }
[data-theme="dark"] body, body[data-theme="dark"] { background: var(--st-bg); }
button, input, select { font-family: var(--st-font-family-body); }
.tk-loading { padding: var(--st-space-8); color: var(--st-fg-muted); }

/* top bar */
.tk-top { position: sticky; top: 0; z-index: 5; height: 56px; display: flex; align-items: center; gap: var(--st-space-4);
  padding: 0 var(--st-space-6); background: var(--st-bg); border-bottom: 1px solid var(--st-line); }
.tk-brand { display: flex; align-items: center; gap: var(--st-space-2); font: 800 17px/1 var(--st-font-family-heading); color: var(--st-fg-heading); text-decoration: none; }
.tk-brand img { width: 26px; height: 26px; }
.tk-brand b { color: var(--st-wordmark-accent); }
.tk-crumb { color: var(--st-fg-muted); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-crumb a { color: var(--st-fg-muted); text-decoration: none; }
.tk-crumb a:hover { color: var(--st-action-hover); }
.tk-spacer { flex: 1; }
.tk-tool { background: transparent; border: 1px solid var(--st-line); color: var(--st-fg); border-radius: var(--st-radius-pill);
  padding: 6px 12px; font-weight: 600; font-size: 13px; cursor: pointer; }
.tk-tool:hover { border-color: var(--st-line-strong); }
.tk-tool:focus-visible { outline: none; box-shadow: var(--st-shadow-focus); }

/* page */
.tk-main { max-width: var(--st-container-max); margin: 0 auto; padding: var(--st-space-6); }
.tk-h1 { font: 800 26px/1.2 var(--st-font-family-heading); color: var(--st-fg-heading); margin: 0 0 var(--st-space-1); }
.tk-sub { color: var(--st-fg-muted); margin: 0 0 var(--st-space-5); }
.tk-row { display: flex; gap: var(--st-space-3); align-items: center; flex-wrap: wrap; }
.tk-card { background: var(--st-bg); border: 1px solid var(--st-line); border-radius: var(--st-radius-lg); box-shadow: var(--st-shadow-card); padding: var(--st-space-5); }
[data-theme="dark"] .tk-card { box-shadow: none; background: var(--st-bg-subtle); }
.tk-section { margin-top: var(--st-space-6); }
.tk-h2 { font: 800 18px/1.3 var(--st-font-family-heading); color: var(--st-fg-heading); margin: 0 0 var(--st-space-3); }
.tk-h3 { font: 700 15px/1.3 var(--st-font-family-heading); margin: var(--st-space-4) 0 var(--st-space-2); }
.tk-card > div > .tk-h3, .tk-card > div > .tk-muted { padding: 0 var(--st-space-4); }
.tk-muted { color: var(--st-fg-muted); }
.tk-error { color: var(--st-color-danger-fg); font-weight: 600; }
.st-input { width: 100%; }
[data-theme="dark"] .st-input { background: var(--st-color-dark-surface); color: var(--st-fg); border-color: var(--st-color-dark-border-strong); }
label.tk-field { display: block; font-weight: 600; font-size: 13px; margin-bottom: var(--st-space-3); }
label.tk-field span { display: block; margin-bottom: 4px; }

/* login */
.tk-login { max-width: 380px; margin: 12vh auto; }
.tk-login .st-btn { width: 100%; justify-content: center; margin-top: var(--st-space-2); }

/* lists and tables */
.tk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tk-table th, .tk-table td { padding: 8px 10px; border-bottom: 1px solid var(--st-line); text-align: left; vertical-align: top; }
.tk-table th { font-weight: 700; color: var(--st-fg-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; background: var(--st-bg-subtle); }
.tk-table td.n, .tk-table th.n { text-align: right; white-space: nowrap; }
.tk-table tr.tk-click { cursor: pointer; }
.tk-table tr.tk-click:hover td { background: var(--st-bg-subtle); }
.tk-table .tk-quote { color: var(--st-fg-muted); font-size: 12px; max-width: 520px; }
.tk-scroll { overflow-x: auto; }

/* cards */
.tk-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--st-space-3); }
.tk-stat { background: var(--st-bg); border: 1px solid var(--st-line); border-radius: var(--st-radius-md); padding: var(--st-space-4); }
[data-theme="dark"] .tk-stat { background: var(--st-bg-subtle); }
.tk-stat b { display: block; font: 800 22px/1.2 var(--st-font-family-heading); color: var(--st-fg-heading); }
.tk-stat span { color: var(--st-fg-muted); font-size: 12px; }

/* tabs */
.tk-tabs { display: flex; gap: var(--st-space-1); border-bottom: 1px solid var(--st-line); margin: var(--st-space-6) 0 var(--st-space-4); flex-wrap: wrap; }
.tk-tab { background: none; border: none; padding: 10px 14px; font-weight: 700; color: var(--st-fg-muted); cursor: pointer; border-bottom: 3px solid transparent; }
.tk-tab[aria-selected="true"] { color: var(--st-action); border-bottom-color: var(--st-action); }
.tk-tab:focus-visible { outline: none; box-shadow: var(--st-shadow-focus); }

/* upload */
.tk-drop { border: 2px dashed var(--st-line-strong); border-radius: var(--st-radius-lg); padding: var(--st-space-8); text-align: center; color: var(--st-fg-muted); cursor: pointer; }
.tk-drop.over { border-color: var(--st-action); background: var(--st-color-success-bg); color: var(--st-color-success-fg); }
.tk-files { list-style: none; padding: 0; margin: var(--st-space-3) 0 0; }
.tk-files li { display: grid; grid-template-columns: 1fr 120px 70px 28px; gap: var(--st-space-3); align-items: center; padding: 6px 0; border-bottom: 1px solid var(--st-line); }
.tk-bar { height: 8px; background: var(--st-bg-subtle); border-radius: var(--st-radius-pill); overflow: hidden; border: 1px solid var(--st-line); }
.tk-bar i { display: block; height: 100%; width: 0; background: var(--st-action); transition: width .2s; }
.tk-x { background: none; border: none; color: var(--st-fg-muted); cursor: pointer; font-size: 18px; line-height: 1; }
.tk-stages { list-style: none; padding: 0; margin: var(--st-space-4) 0 0; display: grid; gap: 6px; }
.tk-stages li { display: flex; gap: var(--st-space-2); align-items: center; color: var(--st-fg-muted); }
.tk-stages li.done { color: var(--st-color-success-fg); }
.tk-stages li.now { color: var(--st-fg); font-weight: 700; }
.tk-stages li::before { content: "○"; width: 18px; display: inline-block; }
.tk-stages li.done::before { content: "✓"; }
.tk-stages li.now::before { content: "●"; color: var(--st-action); }
.tk-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--st-space-5); }
@media (max-width: 900px) { .tk-cards { grid-template-columns: repeat(2, 1fr); } .tk-grid2 { grid-template-columns: 1fr; } }
