@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;1,14..32,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ================================================================
   TOKENS
   ================================================================ */
:root {
  --bg:        #08080d;
  --bg-2:      #0e0e15;
  --s1:        #111118;
  --s2:        #17171f;
  --s3:        #1c1c26;
  --s4:        #23232e;
  --bd:        rgba(255,255,255,0.07);
  --bd-2:      rgba(255,255,255,0.11);
  --bd-3:      rgba(255,255,255,0.16);

  --t1:        #eef1f5;
  --t2:        #8c97a8;
  --t3:        #4e5a68;

  --lime:      #c8f03d;
  --lime-dim:  rgba(200,240,61,0.12);
  --lime-bd:   rgba(200,240,61,0.22);
  --lime-text: #0f1500;

  --green:     #4ade80;
  --green-dim: rgba(74,222,128,0.1);
  --green-bd:  rgba(74,222,128,0.2);

  --amber:     #f59e0b;
  --amber-dim: rgba(245,158,11,0.1);
  --amber-bd:  rgba(245,158,11,0.2);

  --red:       #f87171;
  --red-dim:   rgba(248,113,113,0.1);
  --red-bd:    rgba(248,113,113,0.2);

  --r:     8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  20px;

  --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.3);
}

/* ================================================================
   RESET
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
h1,h2,h3,h4,h5,p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }

html { font-size: 15px; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--t1);
  line-height: 1.55;
  overflow-x: hidden;
}

/* ================================================================
   APP HEADER
   ================================================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: rgba(8,8,13,0.92);
  border-bottom: 1px solid var(--bd);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  margin-right: 4px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--lime-dim);
  border: 1px solid var(--lime-bd);
  color: var(--lime);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  flex: none;
}

.brand-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: -0.01em;
}

.hd-sep {
  width: 1px;
  height: 18px;
  background: var(--bd-2);
  flex: none;
}

/* Status chips row in header */
.hd-status {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

.hd-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--bd);
  background: var(--s2);
  flex: none;
  cursor: default;
  transition: border-color 150ms;
}

.hd-chip:hover { border-color: var(--bd-2); }

.hd-chip-name {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--t2);
  white-space: nowrap;
}

/* Relógio */
.hd-clock {
  display: flex;
  align-items: center;
  flex: none;
}

#hd-clock-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--t2);
  letter-spacing: 0.05em;
}

/* No header, o pill vira só o ponto colorido — sem texto */
.hd-chip .status-pill {
  font-size: 0;
  padding: 0;
  gap: 0;
}

.hd-chip .status-pill::before {
  width: 7px;
  height: 7px;
}

.hd-chip-val {
  display: none; /* valor longo oculto no header — JS ainda pode atualizar */
}

/* JS replaces className on these: "status-pill is-live/warm/off" */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex: none;
  background: var(--t3);
}

.status-pill.is-live  { color: var(--green); }
.status-pill.is-live::before  { background: var(--green); box-shadow: 0 0 5px var(--green); }
.status-pill.is-warm  { color: var(--amber); }
.status-pill.is-warm::before  { background: var(--amber); }
.status-pill.is-off   { color: var(--t3); }
.status-pill.is-off::before   { opacity: 0.4; }

/* ================================================================
   LAYOUT
   ================================================================ */
.app-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  min-height: calc(100vh - 52px);
  align-items: start;
}

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar {
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--bd);
  background: var(--s1);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.07) transparent;
  display: flex;
  flex-direction: column;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

/* ── accordion <details> ── */
.sb-section {
  border-bottom: 1px solid var(--bd);
  min-width: 0;
  overflow: hidden;
}

.sb-section:last-child { border-bottom: none; }

/* remove triângulo nativo */
.sb-section > summary           { list-style: none; }
.sb-section > summary::-webkit-details-marker { display: none; }

.sb-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 16px;
  cursor: pointer;
  user-select: none;
  transition: background 100ms;
}

.sb-summary:hover { background: rgba(255,255,255,0.025); }

.sb-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex: 1;
}

/* wrapper direita: botões de ação + seta */
.sb-summary-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

/* seta SVG */
.sb-chevron {
  width: 10px;
  height: 6px;
  color: var(--t3);
  flex: none;
  transition: transform 200ms ease;
}

/* seta vira quando aberto */
.sb-section[open] > .sb-summary .sb-chevron {
  transform: rotate(180deg);
}

/* corpo do accordion */
.sb-body {
  padding: 4px 16px 16px;
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}

/* ================================================================
   FORM ELEMENTS
   ================================================================ */
.f-grid { display: grid; gap: 10px; min-width: 0; }
.f-2    { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; min-width: 0; }
.f-2s   { display: grid; grid-template-columns: 96px 1fr; gap: 8px; min-width: 0; }

.field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.field > label,
.field > span,
.f-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--t3);
  letter-spacing: 0.05em;
  user-select: none;
}

.field input,
.field select {
  height: 36px;
  padding: 0 10px;
  border-radius: var(--r);
  border: 1px solid var(--bd-2);
  background: var(--s3);
  color: var(--t1);
  outline: none;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font-size: 0.87rem;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 110ms, box-shadow 110ms;
}

.field input::placeholder { color: var(--t3); font-size: 0.83rem; }

.field input:focus,
.field select:focus {
  border-color: rgba(200,240,61,0.4);
  box-shadow: 0 0 0 3px rgba(200,240,61,0.07);
}

.field input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 5 5-5z' fill='%234e5a68'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border-radius: var(--r);
  border: 1px solid transparent;
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 110ms, transform 90ms, box-shadow 110ms;
  user-select: none;
}

.btn:hover   { opacity: 0.82; transform: translateY(-1px); }
.btn:active  { transform: translateY(0); opacity: 1; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: var(--lime);
  color: var(--lime-text);
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(200,240,61,0.18);
}

.btn-primary:hover { box-shadow: 0 4px 20px rgba(200,240,61,0.28); }

.btn-secondary {
  background: var(--s4);
  color: var(--t1);
  border-color: var(--bd-2);
}

.btn-ghost {
  background: transparent;
  color: var(--t2);
  border-color: var(--bd);
}

.btn-ghost:hover { background: var(--s2); opacity: 1; }

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border-color: var(--red-bd);
}

.btn-sm {
  height: 28px;
  padding: 0 9px;
  font-size: 0.77rem;
  border-radius: 6px;
}

.btn-full { width: 100%; }

.btn-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.btn-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px; }

/* ================================================================
   TOGGLES
   ================================================================ */
.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r);
  border: 1px solid var(--bd);
  background: var(--s2);
  font-size: 0.84rem;
  color: var(--t2);
  cursor: pointer;
  transition: border-color 110ms;
  user-select: none;
}

.toggle:hover { border-color: var(--bd-2); }
.toggle input {
  width: 14px;
  height: 14px;
  accent-color: var(--lime);
  cursor: pointer;
  flex: none;
}

/* ================================================================
   HINT / ALERT
   ================================================================ */
.hint {
  padding: 10px 12px;
  border-radius: var(--r);
  border: 1px solid var(--amber-bd);
  background: var(--amber-dim);
  font-size: 0.82rem;
  color: var(--t2);
  display: grid;
  gap: 4px;
}

.hint-title {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hint-error  { border-color: var(--red-bd); background: var(--red-dim); }
.hint-error  .hint-title { color: var(--red); }
.hint-copy { font-size: 0.82rem; color: var(--t2); }

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8em;
  color: var(--lime);
  background: var(--lime-dim);
  padding: 1px 4px;
  border-radius: 4px;
}

/* ================================================================
   RECIPIENTS
   ================================================================ */
.recipient-list { display: grid; gap: 6px; }

.recipient-empty {
  padding: 12px;
  border-radius: var(--r);
  border: 1px dashed var(--bd-2);
  color: var(--t3);
  font-size: 0.82rem;
  text-align: center;
}

.recipient-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r);
  border: 1px solid var(--bd);
  background: var(--s2);
}

.recipient-check {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.recipient-check input {
  accent-color: var(--lime);
  width: 13px;
  height: 13px;
  flex: none;
  cursor: pointer;
}

.recipient-main {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.recipient-main strong {
  font-size: 0.83rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipient-main small {
  font-size: 0.74rem;
  color: var(--t3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipient-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 9px;
  border-radius: 5px;
  border: 1px solid var(--red-bd);
  background: var(--red-dim);
  color: var(--red);
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  flex: none;
  transition: opacity 110ms;
}

.recipient-delete:hover { opacity: 0.75; }

/* ================================================================
   WORKSPACE
   ================================================================ */
.workspace {
  display: grid;
  gap: 14px;
  padding: 16px;
  align-content: start;
  min-height: calc(100vh - 52px);
}

/* ================================================================
   SUMMARY BAR
   ================================================================ */
.sum-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sum-card {
  padding: 14px 15px;
  border-radius: var(--r-md);
  border: 1px solid var(--bd);
  background: var(--s1);
  display: grid;
  gap: 5px;
}

.sum-label {
  font-size: 0.67rem;
  font-weight: 600;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sum-value {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--t1);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.4;
}

/* ================================================================
   TABS CARD
   ================================================================ */
.tabs-wrap {
  border-radius: var(--r-lg);
  border: 1px solid var(--bd);
  background: var(--s1);
  overflow: hidden;
}

.tabs-bar {
  display: flex;
  gap: 2px;
  padding: 10px 10px 0;
  background: var(--s2);
  border-bottom: 1px solid var(--bd);
}

/* JS reads: .tab-btn, .tab-button — both handled */
.tab-button, .tab-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 7px 7px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  color: var(--t3);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 100ms, background 100ms;
}

.tab-button:hover, .tab-btn:hover { color: var(--t2); }

.tab-button.active, .tab-btn.active {
  color: var(--t1);
  background: var(--s1);
  border-color: var(--bd);
  font-weight: 600;
}

/* JS toggles .active on .tab-panel */
.tab-panel { display: none; padding: 16px; }
.tab-panel.active { display: block; }

/* ================================================================
   NOTICE LAYOUT
   ================================================================ */
.notice-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.88fr;
  gap: 14px;
  align-items: start;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.panel-head-copy { display: grid; gap: 1px; }

.panel-head-copy h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--t1);
}

.panel-kicker {
  font-size: 0.67rem;
  font-weight: 600;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.count-badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--s3);
  border: 1px solid var(--bd-2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.67rem;
  font-weight: 500;
  color: var(--t3);
  white-space: nowrap;
  align-self: center;
}

/* ================================================================
   TABLE
   ================================================================ */
.table-wrap {
  border-radius: var(--r);
  border: 1px solid var(--bd);
  background: var(--bg-2);
  overflow: auto;
  max-height: 55vh;
  min-height: 280px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.07) transparent;
}

.table-wrap::-webkit-scrollbar { width: 5px; height: 5px; }
.table-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }

.notice-table {
  width: 100%;
  min-width: 660px;
  border-collapse: separate;
  border-spacing: 0;
}

.notice-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 9px 13px;
  background: rgba(14,14,21,0.98);
  color: var(--t3);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.63rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid var(--bd-2);
  white-space: nowrap;
}

.notice-table td {
  padding: 10px 13px;
  border-bottom: 1px solid rgba(255,255,255,0.035);
  font-size: 0.84rem;
  vertical-align: top;
}

.notice-table tbody tr { cursor: pointer; transition: background 80ms; }
.notice-table tbody tr:hover { background: rgba(255,255,255,0.022); }
.notice-table tbody tr.is-selected {
  background: rgba(200,240,61,0.065);
  box-shadow: inset 3px 0 0 var(--lime);
}

.notice-stack { display: grid; gap: 2px; }
.notice-stack small { font-size: 0.77rem; color: var(--t3); line-height: 1.35; }

.empty-row td {
  padding: 40px 16px;
  color: var(--t3);
  text-align: center;
  font-size: 0.88rem;
}

/* Pills */
.uf-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--s3);
  border: 1px solid var(--bd);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--t2);
}

.fav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fav-pill.yes { color: var(--lime); background: var(--lime-dim); border: 1px solid var(--lime-bd); }
.fav-pill.no  { color: var(--t3); background: var(--s3); border: 1px solid var(--bd); }

/* ================================================================
   DETAIL PANEL
   ================================================================ */
.detail-wrap {
  border-radius: var(--r);
  border: 1px solid var(--bd);
  background: var(--bg-2);
  overflow-y: auto;
  max-height: 55vh;
  min-height: 280px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.07) transparent;
}

.detail-wrap::-webkit-scrollbar { width: 4px; }
.detail-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

/* JS adds/removes .empty-state */
#detail-content {
  padding: 14px;
  display: grid;
  gap: 9px;
  align-content: start;
  min-height: 280px;
}

#detail-content.empty-state {
  display: grid;
  place-items: center;
  color: var(--t3);
  font-size: 0.87rem;
  text-align: center;
  padding: 32px 20px;
}

/* JS generates these inside #detail-content */
.detail-section {
  padding: 12px 13px;
  border-radius: var(--r);
  border: 1px solid var(--bd);
  background: var(--s1);
}

.detail-section h4 {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.detail-item { display: grid; gap: 3px; }
.detail-item > span {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
.detail-item > strong {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--t1);
  word-break: break-word;
  line-height: 1.4;
}

.detail-text {
  font-size: 0.84rem;
  color: var(--t2);
  white-space: pre-wrap;
  line-height: 1.55;
}

.detail-list { display: grid; gap: 6px; }

.detail-list-item {
  padding: 9px 11px;
  border-radius: var(--r);
  border: 1px solid rgba(200,240,61,0.08);
  background: rgba(200,240,61,0.04);
  font-size: 0.83rem;
  color: var(--t2);
  line-height: 1.5;
}

.detail-list-item a { color: var(--lime); word-break: break-all; }
.detail-list-item strong { color: var(--t1); font-weight: 500; }

/* JS toggles .hidden on these */
.detail-link {
  color: var(--lime);
  font-size: 0.76rem;
  font-weight: 500;
  align-self: center;
  white-space: nowrap;
}

.detail-link:hover { text-decoration: underline; }
.detail-link.hidden { display: none; }
.ai-meta.hidden     { display: none; }

/* ================================================================
   AI META
   ================================================================ */
.ai-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

/* JS generates .ai-chip and .ai-chip-wide */
.ai-chip {
  padding: 10px 12px;
  border-radius: var(--r);
  border: 1px solid var(--bd);
  background: var(--s2);
  display: grid;
  gap: 4px;
}

.ai-chip > span {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.ai-chip > strong {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--t1);
  word-break: break-word;
  line-height: 1.4;
}

.ai-chip-wide { grid-column: 1 / -1; }

/* ================================================================
   CODE BLOCKS
   ================================================================ */
.code-block {
  margin: 0;
  padding: 14px;
  border-radius: var(--r);
  border: 1px solid var(--bd);
  background: var(--bg-2);
  color: #9aaebb;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.77rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.07) transparent;
}

.code-block::-webkit-scrollbar { width: 4px; height: 4px; }
.code-block::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

.code-block.lg  { min-height: 400px; }
.code-block.sm  { max-height: 140px; font-size: 0.72rem; }

/* ================================================================
   LOG BAR
   ================================================================ */
.log-bar {
  border-top: 1px solid var(--bd);
  background: var(--s1);
}

.log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--bd);
}

.log-head-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

#log-output {
  border: none;
  border-radius: 0;
  background: var(--bg);
  max-height: 200px;
  min-height: 80px;
}

/* ================================================================
   LOGIN PAGE
   ================================================================ */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 70% 60% at 25% 15%, rgba(200,240,61,0.055) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 75% 80%, rgba(74,100,180,0.06) 0%, transparent 55%),
    var(--bg);
}

.login-box {
  width: 100%;
  max-width: 360px;
  display: grid;
  gap: 24px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--lime-dim);
  border: 1px solid var(--lime-bd);
  color: var(--lime);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  flex: none;
}

.login-brand-text h1 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-brand-text p {
  font-size: 0.78rem;
  color: var(--t3);
  margin-top: 2px;
}

.login-card {
  padding: 24px;
  border-radius: var(--r-xl);
  border: 1px solid var(--bd-2);
  background: var(--s1);
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.login-card h2 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.login-card .field > label {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--t2);
}

.login-card .field input {
  height: 42px;
  font-size: 0.9rem;
  background: var(--s3);
}

.login-card .btn-primary {
  height: 42px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 2px;
}

.login-footer {
  font-size: 0.76rem;
  color: var(--t3);
  text-align: center;
  line-height: 1.5;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1280px) {
  .app-layout { grid-template-columns: 300px 1fr; }
}

@media (max-width: 1024px) {
  .app-layout { grid-template-columns: 1fr; }

  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--bd);
  }

  .notice-layout { grid-template-columns: 1fr; }
  .ai-meta { grid-template-columns: 1fr 1fr; }
  .table-wrap, .detail-wrap { max-height: none; }
}

@media (max-width: 768px) {
  .hd-status { display: none; }
  .sum-bar { grid-template-columns: 1fr; }
  .f-2, .f-2s { grid-template-columns: 1fr; }
  .btn-row, .btn-row-3 { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .ai-meta { grid-template-columns: 1fr; }
  .workspace { padding: 12px; }
  .tab-panel { padding: 12px; }
}

@media (max-width: 480px) {
  .notice-table { min-width: 560px; }
}
