@import url('https://fonts.googleapis.com/css2?family=Doto:wght@500;700;900&family=JetBrains+Mono:wght@400;500;600;700;800&family=Lexend:wght@300;400;500;600&display=swap');

:root {
  --bg: #060C09;
  --card: #0A120D;
  --input-bg: #081109;
  --chip-selected: #0E1812;
  --border: #1A2A20;
  --border-hair: #16241B;
  --border-subtle: #213429;
  --row-div: #0F1A14;
  --row-div-alt: #13201A;
  --accent: #0C7A47;
  --accent-border: #0A6038;
  --accent-light: #45B580;
  --accent-tint-fill: rgba(12,122,71,.12);
  --accent-tint-border: rgba(12,122,71,.45);
  --negative: #C2564E;
  --negative-tint-fill: rgba(194,86,78,.1);
  --negative-tint-border: rgba(194,86,78,.42);
  --text-brightest: #EDF3EF;
  --text-bright: #D7E3DC;
  --text-mid: #CFEAD9;
  --text-body: #9FB4A8;
  --text-muted: #7E9488;
  --text-dim: #5E7368;
  --text-faint: #46584E;
  --text-placeholder: #3A4A40;
  --radius-card: 14px;
  --radius-input: 9px;
  --radius-pill: 999px;
  --radius-chip: 8px;
  --radius-badge: 5px;
  --font-display: 'Doto', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Lexend', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  background-image: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(12,122,71,.10), transparent);
  color: var(--text-body);
  font-family: 'JetBrains Mono', monospace;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Container / Layout ── */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(18px, 3.5vw, 40px) clamp(16px, 4vw, 40px) 80px;
}
.flex-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }

/* ── Card ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: clamp(18px, 3vw, 24px);
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent);
  color: #04140C;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-input);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 14px;
  text-transform: uppercase; letter-spacing: 1.5px;
  padding: 16px 36px;
  min-height: 48px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
  cursor: pointer; transition: filter .15s;
}
.btn-primary:hover { filter: brightness(1.1); }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--chip-selected);
  color: var(--text-body);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-input);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500; font-size: 12px;
  padding: 10px 20px;
  min-height: 38px;
  cursor: pointer; transition: filter .15s;
}
.btn-secondary:hover { filter: brightness(1.15); }

/* ── Chips ── */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500; font-size: 12px;
  min-height: 32px;
  cursor: pointer; transition: all .15s; user-select: none;
}
.chip .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #2E4538; transition: background .15s;
}
.chip.on, .chip-on {
  background: var(--chip-selected);
  border-color: var(--accent-tint-border);
  color: var(--text-mid);
}
.chip.on .dot, .chip-on .dot { background: var(--accent-light); }

/* ── Inputs ── */
.input, input[type="text"], input[type="password"], input[type="number"], input[type="date"], input[type="url"], select {
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--text-body);
  border-radius: var(--radius-input);
  padding: 10px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; font-weight: 400;
  outline: none; transition: border-color .15s;
  width: 100%;
}
.input:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
}
textarea {
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--text-body);
  border-radius: var(--radius-input);
  padding: 10px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; font-weight: 400;
  outline: none; resize: vertical; width: 100%;
  transition: border-color .15s;
}
select { appearance: none; cursor: pointer; }
::placeholder { color: var(--text-placeholder); }

/* ── Micro-label ── */
.micro-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 500;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}

/* ── Badges ── */
.badge-green {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-badge);
  background: var(--accent-tint-fill);
  border: 1px solid var(--accent-tint-border);
  color: var(--accent-light);
  font-family: 'Lexend', sans-serif;
  font-weight: 500; font-size: 12px;
}
.badge-red {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-badge);
  background: var(--negative-tint-fill);
  border: 1px solid var(--negative-tint-border);
  color: var(--negative);
  font-family: 'Lexend', sans-serif;
  font-weight: 500; font-size: 12px;
}

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-family: 'JetBrains Mono', monospace; font-size: 13px; }
th {
  text-align: left; padding: 10px 14px;
  color: var(--text-dim); font-weight: 600;
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
}
td { padding: 10px 14px; border-bottom: 1px solid var(--row-div); color: var(--text-body); }
tr:hover td { background: rgba(12,122,71,.04); }

/* ── Doto display ── */
.doto { font-family: 'Doto', sans-serif; }
.doto-num { font-family: 'Doto', sans-serif; font-weight: 700; color: var(--accent-light); }

/* ── Nav (app chrome) ── */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--border-hair);
  flex-wrap: wrap; gap: 12px;
}

.app-brand {
  display: flex; align-items: center; gap: 10px;
}
.app-brand-tile {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 0 0 3px rgba(12,122,71,.18);
  position: relative;
}
.app-brand-tile .letter {
  font-family: 'Doto', sans-serif;
  font-weight: 900; font-size: 22px;
  color: #04140C; line-height: 1;
}
.app-brand-tile .orbit {
  position: absolute;
  width: 21px; height: 21px;
  border: 2px solid var(--accent-light);
  border-top-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(-38deg);
}
.app-wordmark {
  font-family: 'Doto', sans-serif;
  font-weight: 700; font-size: 22px;
}
.app-wordmark .w1 { color: var(--text-bright); }
.app-wordmark .w2 { color: var(--accent-light); }

.app-nav {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  justify-content: center;
  flex: 1 1 320px;
  min-width: 0;
}
.nav-pill {
  font-family: 'Doto', sans-serif;
  font-weight: 700; font-size: 16px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer; transition: all .15s;
}
.nav-pill:hover { border-color: var(--border); color: var(--text-body); }
.nav-pill.active {
  color: var(--text-brightest);
  background: var(--accent-tint-fill);
  border-color: var(--accent-tint-border);
}
.nav-pill.logout { color: var(--text-dim); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-subtle); }

/* ── Links ── */
a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === INFO BUTTON COMPONENT === */
.info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 50%;
  border: 1px solid #213429;
  background: transparent;
  color: #5E7368;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  cursor: pointer;
  margin-left: 8px;
  vertical-align: middle;
  padding: 0;
  transition: all 0.15s ease;
}
.info-btn:hover, .info-btn:focus {
  border-color: #45B580;
  color: #45B580;
  outline: none;
}
.info-tooltip {
  position: absolute;
  background: #0A120D;
  border: 1px solid #1A2A20;
  border-radius: 8px;
  padding: 12px 16px;
  font-family: 'Lexend', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #9FB4A8;
  max-width: 320px;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  pointer-events: auto;
}


/* === SECTION TITLE (big version) === */
.card-title-big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2.5vw, 28px);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #D7E3DC;
  text-align: center;
  margin: 0 0 24px 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* === NAV USER PILL (smaller, dim) === */
.nav-pill.user {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  color: #5E7368;
  padding: 6px 12px;
  border: 1px solid #16241B;
  text-transform: lowercase;
  letter-spacing: 0;
}

/* === BUTTON ROW (centered actions) === */
.action-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 16px 0;
}

/* === SEGMENTED CONTROL (Topic/Name) === */
.seg {
  display: inline-flex;
  background: #081109;
  border: 1px solid #1A2A20;
  border-radius: 9px;
  padding: 3px;
  height: 44px;
  align-items: stretch;
}
.seg-pill {
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 7px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #7E9488;
  cursor: pointer;
  transition: all 0.15s;
}
.seg-pill-on {
  background: #0C7A47;
  color: #04140C;
}

/* === CHIP ACTIONS (Select all / Clear below chips) === */
.chip-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 12px;
}
.text-action {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  color: #9FB4A8;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s;
}
.text-action:hover { color: #45B580; }

/* === GHOST CHIP (Advanced options toggle) === */
.ghost-chip {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  color: #7E9488;
  background: transparent;
  border: 1px solid #1A2A20;
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.ghost-chip:hover { border-color: #2E4538; color: #9FB4A8; }
.advanced-toggle { margin-top: 12px; }

/* === USER ACTIONS (right side of header) === */
.user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.user-indicator {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 400;
  color: #5E7368;
  padding: 6px 12px;
  border: 1px solid #16241B;
  border-radius: 999px;
  letter-spacing: 0;
}
.nav-pill-logout {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: #5E7368;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #16241B;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.nav-pill-logout:hover {
  border-color: var(--negative-tint-border);
  color: var(--negative);
}
