/* ═══════════════════════════════════════════════════════════════════════
   TSG Board Pack — Cortado Design System
   Pure white (#fff) · Black type · Pill inputs · Minimal
═══════════════════════════════════════════════════════════════════════ */

/* ── Reset + base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #ffffff;
  --bg-card:    #f2f2f2;
  --bg-input:   #f2f2f2;
  --bg-hover:   #eeeeee;
  --bg-sidebar: #f9f9f9;
  --border:     #e3e3e3;
  --border-mid: #d5d5d5;
  --border-focus:#c5c5c5;
  --text-white:  #111111;
  --text-grey:   #777777;
  --text-mid:    #aaaaaa;
  --text-dark:   #cccccc;
  --green:       #2f6b47;
  --green-bg:    #e8f5ee;
  --amber:       #96660f;
  --amber-bg:    #fbf1de;
  --red:         #a8281a;
  --red-bg:      #fbe9e7;
  --blue:        #3f5f8c;
  --blue-bg:     #e8eef7;
  --accent:      #9c7d3f;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-pill: 50px;
  --font:        'Inter', 'Helvetica Neue', Arial, sans-serif;
}

html, body {
  background: var(--bg);
  color: var(--text-white);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font); }

/* ── Auth pages (login, invite) ───────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 24px 40px;
}

.auth-container {
  width: 100%;
  max-width: 420px;
}

/* Wordmark */
.wordmark { margin-bottom: 48px; }
.wm-the   { display: block; font-size: 40px; font-weight: 300; letter-spacing: -0.01em; line-height: 1.05; color: var(--text-white); }
.wm-silo  { display: block; font-size: 40px; font-weight: 900; letter-spacing: -0.02em; line-height: 1.05; color: var(--text-white); }
.wm-group { display: block; font-size: 40px; font-weight: 300; letter-spacing: -0.01em; line-height: 1.05; color: var(--text-white); }
.wm-sub   { font-size: 11px; font-weight: 400; letter-spacing: 0.22em; color: var(--text-mid); margin-top: 14px; text-transform: uppercase; }

/* Auth card */
.auth-card { width: 100%; }
.auth-title { font-size: 18px; font-weight: 700; color: var(--text-white); margin-bottom: 6px; }
.auth-subtitle { font-size: 13px; color: var(--text-grey); margin-bottom: 28px; line-height: 1.6; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-footnote { font-size: 11px; color: var(--text-dark); text-align: center; margin-top: 20px; }
.auth-footnote a { color: var(--text-mid); }

/* ── Pill inputs ──────────────────────────────────────────────────── */
.input-pill {
  width: 100%;
  background: #f0f0f0;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-pill);
  padding: 14px 20px;
  font-size: 14px;
  color: var(--text-grey);
  outline: none;
  transition: border-color 0.2s, color 0.2s;
  font-family: var(--font);
}
.input-pill::placeholder { color: #aaa; }
.input-pill:focus { border-color: var(--border-focus); color: var(--text-white); }

/* Standard input (form fields) */
.input-field {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 13px;
  color: var(--text-grey);
  outline: none;
  transition: border-color 0.2s, color 0.2s;
  font-family: var(--font);
}
.input-field::placeholder { color: #bbb; }
.input-field:focus { border-color: var(--border-focus); color: var(--text-white); }
.input-field:disabled { opacity: 0.5; cursor: not-allowed; }

/* Select */
.input-select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 13px;
  color: var(--text-grey);
  outline: none;
  font-family: var(--font);
  cursor: pointer;
  min-width: 180px;
}
.input-select:focus { border-color: var(--border-focus); }
.input-select:disabled { opacity: 0.5; }

/* Textarea */
.input-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-grey);
  outline: none;
  resize: vertical;
  min-height: 90px;
  line-height: 1.7;
  font-family: var(--font);
  transition: border-color 0.2s;
}
.input-textarea::placeholder { color: #bbb; }
.input-textarea:focus { border-color: var(--border-focus); color: var(--text-white); }
.input-textarea:disabled { opacity: 0.5; }
.input-textarea--notes { background: #f7f7f7; border-color: #e5e5e5; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--text-white);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.btn-primary:hover { opacity: 0.88; }
.btn-full { width: 100%; }

.btn-secondary {
  background: transparent;
  color: var(--text-grey);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn-secondary:hover { border-color: #999; color: var(--text-white); }

.btn-ghost {
  background: transparent;
  color: var(--text-grey);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-size: 12px;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--border-focus); color: var(--text-white); }

.btn-sm { padding: 5px 12px; font-size: 11px; }
.btn-danger-sm {
  background: transparent;
  color: var(--red);
  border: 1px solid #e8c6c2;
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 11px;
  transition: background 0.2s;
}
.btn-danger-sm:hover { background: var(--red-bg); }

/* ── App layout ───────────────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* Sidebar */
.sidebar {
  width: 220px;
  min-height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 28px 0;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 0 20px 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.sidebar-logo .wm-the,
.sidebar-logo .wm-silo,
.sidebar-logo .wm-group { font-size: 22px; line-height: 1.1; }
.sidebar-logo .wm-sub { font-size: 9px; letter-spacing: 0.18em; margin-top: 8px; }

.sidebar-nav { flex: 1; padding: 0 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-mid);
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.01em;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-white); }
.nav-item.active { background: #e9e9e9; color: var(--text-white); }
.nav-logout { color: #999; margin-top: 4px; }
.nav-logout:hover { color: var(--red); background: var(--red-bg); }

.sidebar-footer {
  padding: 20px 20px 0;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.sidebar-user { display: block; font-size: 11px; color: #999; margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Main content */
.main-content {
  flex: 1;
  padding: 32px 36px;
  overflow-y: auto;
  max-width: 1100px;
}

/* ── Page header ──────────────────────────────────────────────────── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-mid);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.page-title { font-size: 22px; font-weight: 700; color: var(--text-white); }
.header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.breadcrumb { font-size: 11px; color: var(--text-mid); letter-spacing: 0.05em; display: block; margin-bottom: 6px; }
.breadcrumb:hover { color: var(--text-grey); }

/* Progress pill */
.progress-pill {
  background: #f0f0f0;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-pill);
  padding: 7px 16px;
  font-size: 12px;
  color: var(--text-grey);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ── Section grid (admin dashboard) ──────────────────────────────── */
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  border-left: 3px solid var(--border);
  transition: border-color 0.2s;
}
.section-card--green  { border-left-color: var(--green); }
.section-card--amber  { border-left-color: var(--amber); }
.section-card--red    { border-left-color: var(--red); }
.section-card--grey   { border-left-color: var(--border-mid); }
.section-card--empty  { border-left-color: var(--border); opacity: 0.7; }
.section-card:hover   { border-color: var(--border-mid); }

.sc-header  { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; gap: 8px; }
.sc-title   { font-size: 13px; font-weight: 600; color: var(--text-white); }
.sc-person  { font-size: 11px; color: var(--text-mid); margin-top: 2px; }
.sc-slides  { font-size: 10px; color: #aaa; letter-spacing: 0.04em; margin-bottom: 4px; }
.sc-time    { font-size: 10px; color: #aaa; margin-bottom: 10px; }
.sc-actions { display: flex; gap: 6px; margin-top: 10px; }

/* Status badges */
.status-badge {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}
.status-green  { background: var(--green-bg); color: var(--green); }
.status-amber  { background: var(--amber-bg); color: var(--amber); }
.status-red    { background: var(--red-bg);   color: var(--red); }
.status-grey   { background: #e5e5e5;         color: #888; }
.status-blue   { background: var(--blue-bg);  color: var(--blue); }
.status-empty  { background: #efefef;         color: #ccc; }

/* Status dot */
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.status-dot--green { background: var(--green); }
.status-dot--red   { background: var(--red); }

/* Notes bar */
.notes-bar {
  background: #f7f7f7;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}
.notes-label { font-size: 9px; letter-spacing: 0.2em; color: #aaa; text-transform: uppercase; white-space: nowrap; }
.notes-preview { font-size: 12px; color: #999; flex: 1; }

/* ── Cards ────────────────────────────────────────────────────────── */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; margin-bottom: 16px; }
.card-title { font-size: 13px; font-weight: 600; color: var(--text-white); margin-bottom: 18px; }

/* ── Form layout ──────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group--full { grid-column: 1 / -1; }

.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row .field-group { flex: 1; min-width: 160px; }
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group--action { justify-content: flex-end; }

.field-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #999;
}

.form-section-heading {
  grid-column: 1 / -1;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #aaa;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* ── RAG selector ─────────────────────────────────────────────────── */
.rag-row { display: flex; gap: 8px; }
.rag-option {
  flex: 1;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
  font-size: 12px;
  cursor: pointer;
  color: #999;
  transition: all 0.15s;
  user-select: none;
}
.rag-option input[type=radio] { display: none; }
.rag-option:hover { border-color: var(--border-mid); color: var(--text-grey); }
.rag-option.rag-green.selected,
.rag-option.rag-green:has(input:checked) { background: var(--green-bg); border-color: var(--green); color: var(--green); }
.rag-option.rag-amber.selected,
.rag-option.rag-amber:has(input:checked) { background: var(--amber-bg); border-color: var(--amber); color: var(--amber); }
.rag-option.rag-red.selected,
.rag-option.rag-red:has(input:checked)   { background: var(--red-bg);   border-color: var(--red);   color: var(--red); }

/* RAG pills (data view) */
.rag-pill { font-size: 12px; padding: 3px 10px; border-radius: var(--radius-pill); }
.rag-pill.rag-green { background: var(--green-bg); color: var(--green); }
.rag-pill.rag-amber { background: var(--amber-bg); color: var(--amber); }
.rag-pill.rag-red   { background: var(--red-bg);   color: var(--red); }

/* ── Notes field ──────────────────────────────────────────────────── */
.notes-field { background: #fafafa; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; }
.notes-badge {
  font-size: 8px;
  letter-spacing: 0.08em;
  background: #e5e5e5;
  color: #999;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-left: 8px;
  vertical-align: middle;
}

/* ── Data view (admin submission view) ───────────────────────────── */
.data-view { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.data-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.data-row:last-child { border-bottom: none; }
.data-label { font-size: 11px; color: var(--text-mid); flex-shrink: 0; width: 260px; }
.data-value { font-size: 13px; color: var(--text-white); text-align: right; }
.data-text  { font-size: 12px; color: var(--text-grey); text-align: right; line-height: 1.6; }

.notes-section-view { padding: 16px 20px; background: #fafafa; border-top: 1px solid var(--border); }
.notes-section-title { font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: #aaa; margin-bottom: 10px; }

/* ── Tables ───────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #aaa;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.data-table td {
  padding: 12px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  color: var(--text-white);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f5f5f5; }
.row-muted td { opacity: 0.4; }

/* ── Tags ─────────────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  background: #f0f0f0;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-size: 11px;
  color: var(--text-grey);
}
.tag-admin { background: var(--blue-bg); border-color: var(--blue); color: var(--blue); }

/* ── Alerts ───────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 20px;
}
.alert-success { background: var(--green-bg); border: 1px solid var(--green); color: var(--green); }
.alert-error   { background: var(--red-bg);   border: 1px solid var(--red);   color: var(--red); }
.alert-info    { background: var(--blue-bg);  border: 1px solid var(--blue);  color: var(--blue); }
.alert-amber   { background: var(--amber-bg); border: 1px solid var(--amber); color: var(--amber); }
.alert-link    { color: inherit; font-weight: 700; text-decoration: underline; }
.alert-link-btn { background: none; border: none; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; font-family: var(--font); font-size: inherit; padding: 0; }

/* ── Notes list ───────────────────────────────────────────────────── */
.notes-list { display: flex; flex-direction: column; gap: 10px; }
.note-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px 20px; }
.note-header { display: flex; justify-content: space-between; margin-bottom: 10px; }
.note-section { font-size: 11px; color: var(--text-grey); font-weight: 600; }
.note-time    { font-size: 10px; color: #aaa; }
.note-content { font-size: 13px; color: var(--text-grey); line-height: 1.7; }

/* ── Invite form ──────────────────────────────────────────────────── */
.invite-form .form-row { align-items: flex-end; }

/* ── Empty state ──────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #ccc;
  font-size: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

/* ── Utility ──────────────────────────────────────────────────────── */
.text-muted  { color: var(--text-mid); }
.text-accent { color: var(--accent); }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .app-layout   { flex-direction: column; }
  .sidebar      { width: 100%; min-height: auto; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--border); }
  .main-content { padding: 20px 16px; }
  .section-grid { grid-template-columns: 1fr; }
  .form-grid    { grid-template-columns: 1fr; }
  .form-group--full { grid-column: 1; }
  .page-header  { flex-direction: column; align-items: flex-start; }
  .data-row     { flex-direction: column; }
  .data-label   { width: auto; }
  .data-value   { text-align: left; }
}
