/* Ithaca dashboard. Shares the landing site's palette and typography (landing/app/globals.css). */
:root {
  --paper: #f7f6f2;
  --ink: #202522;
  --muted: #626761;
  --line: #d5d8d0;
  --accent: #bc6346;
  --sand: #eeede5;
  --dark: #171e1b;
  --allow: #2f6b4f;
  --deny: #9c2f2f;
  --mono: "Courier New", monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-weight: 400; margin: 0; letter-spacing: -0.03em; overflow-wrap: anywhere; }
h1 { font-size: 38px; line-height: 1.1; letter-spacing: -0.045em; }
h2 { font-size: 24px; line-height: 1.2; }
h3 { font-size: 18px; }
p { margin: 0 0 14px; color: var(--muted); }
code, pre, .mono { font-family: var(--mono); font-size: 13px; }
pre { background: var(--dark); color: #e9ece6; padding: 16px 18px; overflow-x: auto; margin: 0 0 16px; white-space: pre-wrap; word-break: break-word; }
.eyebrow { font: 11px/1.5 var(--mono); letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.skip { position: absolute; left: -999px; }
.mt { margin-top: 14px; }
.mt2 { margin-top: 22px; }
.mb { margin-bottom: 14px; }
.span2 { grid-column: span 2; }
.skip:focus { left: 12px; top: 12px; background: #fff; color: #000; padding: 8px 12px; z-index: 50; }

.top { background: var(--dark); color: #fff; }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.brand span { font-size: 23px; letter-spacing: -0.05em; line-height: 1; }
.brand small { display: block; font-size: 9px; letter-spacing: 0.04em; margin-top: 6px; opacity: 0.65; }
.top-right { display: flex; align-items: center; gap: 18px; font-size: 13px; }
.top-right a { opacity: 0.8; text-decoration: none; }
.top-right a:hover { opacity: 1; }
.top-right form { margin: 0; }
.top-right select { background: transparent; color: #fff; border: 1px solid #ffffff40; padding: 6px 8px; font: inherit; }
.top-right select option { color: #000; }
.linkish { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; opacity: 0.8; border-bottom: 1px solid #ffffff50; }

.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: calc(100vh - 68px); }
.side { border-right: 1px solid var(--line); padding: 28px 0; background: var(--sand); }
.side h4 { font: 10px/1.5 var(--mono); letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); margin: 22px 24px 8px; font-weight: 400; }
.side h4:first-child { margin-top: 0; }
.side a { display: flex; justify-content: space-between; padding: 8px 24px; text-decoration: none; font-size: 14px; border-left: 3px solid transparent; }
.side a:hover { background: #e4e3d9; }
.side a[aria-current="page"] { border-left-color: var(--accent); background: var(--paper); }
.badge { background: var(--accent); color: #fff; font: 11px/1 var(--mono); padding: 4px 7px; border-radius: 9px; }
.main { padding: 36px 44px 80px; max-width: 1180px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head p { margin: 8px 0 0; max-width: 640px; }

.flash { padding: 12px 16px; margin-bottom: 22px; border: 1px solid var(--line); background: #fff; }
.flash.ok { border-left: 4px solid var(--allow); }
.flash.err { border-left: 4px solid var(--deny); }
.card { background: #fff; border: 1px solid var(--line); padding: 22px 24px; margin-bottom: 22px; }
.card > h2, .card > h3 { margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.stat { background: #fff; border: 1px solid var(--line); padding: 18px 20px; }
.stat strong { display: block; font-size: 30px; font-weight: 400; letter-spacing: -0.04em; }
.stat span { font: 11px/1.5 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); margin-bottom: 22px; }
th { text-align: left; font: 10px/1.5 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 400; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--sand); }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; word-break: break-word; }
tr:last-child td { border-bottom: 0; }
td form { display: inline; }
.empty { background: #fff; border: 1px dashed var(--line); padding: 34px; text-align: center; color: var(--muted); margin-bottom: 22px; }
.table-wrap { overflow-x: auto; }

label { display: block; font-size: 13px; margin-bottom: 14px; color: var(--ink); }
label span { display: block; margin-bottom: 5px; }
label small, .hint { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #b9bdb3; background: #fff; font: inherit; color: var(--ink); border-radius: 0; }
textarea { font-family: var(--mono); font-size: 13px; min-height: 120px; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { margin-top: 3px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.button, button.button { display: inline-flex; align-items: center; gap: 8px; background: var(--dark); color: #fff; border: 1px solid var(--dark); padding: 11px 18px; font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; border-radius: 0; }
.button:hover { background: #2a342f; }
.button.accent { background: var(--accent); border-color: var(--accent); }
.button.ghost { background: transparent; color: var(--ink); border-color: #b9bdb3; }
.button.danger { background: transparent; color: var(--deny); border-color: var(--deny); }
.button.small { padding: 6px 10px; font-size: 12px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.pill { display: inline-block; font: 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 8px; border: 1px solid var(--line); background: var(--sand); white-space: nowrap; }
.pill.running, .pill.succeeded, .pill.allow, .pill.approved, .pill.active { color: var(--allow); border-color: #a9c8b7; background: #eef5f0; }
.pill.pending, .pill.require_approval, .pill.creating, .pill.stopping, .pill.executing, .pill.past_due { color: #8a5a12; border-color: #e0c89a; background: #fbf4e4; }
.pill.failed, .pill.denied, .pill.rejected, .pill.deny, .pill.unknown, .pill.canceled, .pill.expired { color: var(--deny); border-color: #dcb1b1; background: #faeeee; }

.secret { background: var(--dark); color: #fff; padding: 18px 20px; margin-bottom: 22px; }
.secret code { display: block; font-size: 15px; word-break: break-all; margin: 8px 0; color: #f3d5c8; }
.secret p { color: #c9cec6; margin: 0; }

.timeline { list-style: none; margin: 0 0 22px; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 20px 24px; min-width: 0; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; }
.timeline li.gate::before { border-color: var(--accent); background: var(--accent); }
.timeline .when { font: 11px/1.5 var(--mono); color: var(--muted); letter-spacing: 0.04em; }
.timeline .what { font-size: 15px; margin: 2px 0 4px; }
.timeline .who { color: var(--muted); font-size: 13px; }
.timeline pre { margin: 8px 0 0; }
details { margin-top: 8px; }
summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 8px 18px; margin: 0 0 16px; }
.kv dt { font: 11px/1.7 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.review { border: 2px solid var(--accent); background: #fff; padding: 24px; margin-bottom: 22px; min-width: 0; }
.mono { overflow-wrap: anywhere; }
.review h2 { margin-bottom: 6px; }

.auth { min-height: calc(100vh - 68px); display: grid; place-items: start center; padding: 64px 20px; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); padding: 34px; }
.auth-card h1 { font-size: 32px; margin-bottom: 8px; }
.auth-card .alt { margin-top: 18px; font-size: 13px; color: var(--muted); }
.auth-card .alt a { color: var(--ink); }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .top-right { gap: 12px; min-width: 0; }
  .top-right > span, .top-right > a[href="/app/account"] { display: none; }
  .page-head { align-items: flex-start; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 0; display: flex; overflow-x: auto; }
  .side h4 { display: none; }
  .side a { border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; padding: 10px 16px; gap: 6px; }
  .side a[aria-current="page"] { border-bottom-color: var(--accent); }
  .main { padding: 24px 16px 60px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .top-inner { padding: 0 16px; }
  h1 { font-size: 30px; }
}
