/* ControlTower — minimal admin style */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1a1a1a;
  background: #f5f5f5;
}

/* Nav */
.nav {
  background: #1e293b;
  color: #f8fafc;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 48px;
}
.nav a { color: #cbd5e1; text-decoration: none; font-size: 13px; }
.nav a:hover { color: #f8fafc; }
.nav .brand { color: #f8fafc; font-weight: 600; font-size: 15px; margin-right: 1rem; }

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }
.page-header {
  display: flex; align-items: baseline; gap: 0.75rem;
  margin-bottom: 1.5rem; padding-bottom: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}
.page-header h1 { font-size: 1.4rem; font-weight: 600; }
.page-header .sub { color: #64748b; font-size: 13px; }

/* Cards */
.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.card h2 { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.5rem 0.75rem; border-bottom: 1px solid #e2e8f0; }
td { padding: 0.6rem 0.75rem; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }

/* Buttons */
.btn { display: inline-block; padding: 0.4rem 0.9rem; border: none; border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: 500; text-decoration: none; line-height: 1.4; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary { background: #e2e8f0; color: #334155; }
.btn-secondary:hover { background: #cbd5e1; }
.btn-sm { padding: 0.25rem 0.6rem; font-size: 12px; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 0.3rem; color: #334155; }
.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
  width: 100%; padding: 0.5rem 0.6rem;
  border: 1px solid #cbd5e1; border-radius: 4px;
  font-size: 13px; font-family: inherit; background: #fff;
}
.form-group textarea { min-height: 80px; resize: vertical; }
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px #dbeafe; }
.form-hint { font-size: 12px; color: #64748b; margin-top: 0.2rem; }
.form-actions { display: flex; gap: 0.5rem; margin-top: 1.25rem; }

/* Alerts */
.alert { padding: 0.75rem 1rem; border-radius: 4px; margin-bottom: 1rem; font-size: 13px; }
.alert-error { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-info  { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* Status badges */
.badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 9999px; font-size: 11px; font-weight: 600; }
.badge-active, .badge-in_progress  { background: #dcfce7; color: #166534; }
.badge-archived, .badge-done       { background: #f1f5f9; color: #64748b; }
.badge-blocked                     { background: #fee2e2; color: #b91c1c; }
.badge-waiting, .badge-pending     { background: #fef9c3; color: #854d0e; }
.badge-waiting_on_owner            { background: #fde8d8; color: #9a3412; }
.badge-accepted, .badge-completed  { background: #dcfce7; color: #166534; }

/* Log entries */
.log-entry { border-left: 3px solid #e2e8f0; padding: 0.75rem 1rem; margin-bottom: 0.75rem; background: #fff; border-radius: 0 4px 4px 0; }
.log-entry.latest { border-left-color: #2563eb; }
.log-entry .meta { font-size: 11px; color: #64748b; margin-bottom: 0.4rem; }
.log-entry .step { font-weight: 600; margin-bottom: 0.2rem; }
.log-entry .next { color: #2563eb; font-size: 13px; }
.log-entry .note-text { color: #475569; font-size: 12px; margin-top: 0.3rem; }

/* Handoff cards */
.handoff-card { border: 1px solid #e2e8f0; border-radius: 4px; padding: 0.75rem 1rem; margin-bottom: 0.75rem; background: #fff; }
.handoff-card .transfer { font-weight: 600; font-size: 13px; }
.handoff-card .meta { font-size: 11px; color: #64748b; margin-top: 0.25rem; }

/* Links list */
.links-list { list-style: none; margin-top: 0.35rem; }
.links-list a { color: #2563eb; font-size: 12px; word-break: break-all; }

/* Misc */
.empty { color: #94a3b8; font-size: 13px; padding: 0.75rem 0; }
.breadcrumb { font-size: 12px; color: #64748b; margin-bottom: 1rem; }
.breadcrumb a { color: #2563eb; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 0.3rem; }
.section-title { font-size: 12px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.06em; margin: 1.5rem 0 0.75rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.stat-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; padding: 1rem 1.25rem; }
.stat-card .num { font-size: 2rem; font-weight: 700; color: #1e293b; }
.stat-card .label { font-size: 12px; color: #64748b; margin-top: 0.2rem; }
.inline-form { display: inline; }
.flex-row { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; }
