/* ============================================================
   BE_AEG — BattlEye Exception Generator — stylesheet
   dze.armatools.com/be-aeg
   ============================================================ */
:root {
  --bg:          #0d0d0d;
  --bg-panel:    #111111;
  --bg-card:     #1c1c1c;
  --bg-card2:    #222222;
  --border:      #2a2a2a;
  --border-hi:   #3e5a28;
  --accent:      #4e8a2e;
  --accent-hi:   #62ae3a;
  --accent-dim:  #2e5018;
  --text:        #d0d0d0;
  --text-muted:  #5e5e5e;
  --text-hi:     #eaeaea;
  --danger:      #c0392b;
  --danger-hi:   #e74c3c;
  --success:     #27ae60;
  --success-hi:  #2ecc71;
  --warn-bg:     #1a1400;
  --warn-bd:     #4a3800;
  --warn-txt:    #c8a832;
  --radius:      6px;
  --shadow:      0 2px 12px rgba(0,0,0,.55);
  --font:        'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono:        'Consolas', 'Courier New', monospace;
  --max-w:       min(960px, 96vw);
}

/* ─── Light mode ─── */
[data-theme="light"] {
  --bg:          #f5f5f4;
  --bg-panel:    #ececea;
  --bg-card:     #ffffff;
  --bg-card2:    #f0f0ee;
  --border:      #cccccc;
  --border-hi:   #5a9e30;
  --accent:      #3d7020;
  --accent-hi:   #2e5818;
  --accent-dim:  #cce4b0;
  --text:        #222222;
  --text-muted:  #666666;
  --text-hi:     #111111;
  --warn-bg:     #fdf6e0;
  --warn-bd:     #d4a800;
  --warn-txt:    #7a5800;
  --shadow:      0 2px 12px rgba(0,0,0,.10);
}

[data-theme="light"] code {
  background: #eef4e8;
  border-color: #b8d898;
  color: #2e6010;
}
[data-theme="light"] .tool-header {
  background: #e8f2de;
  border-bottom-color: #b8d4a0;
}
[data-theme="light"] .privacy-card {
  background: #e8f4de;
  border-color: #a0c880;
  color: #2e6010;
}
[data-theme="light"] .privacy-card strong { color: #1a4a08; }

[data-theme="light"] .drop-zone { border-color: #aaaaaa; background: #f9f9f8; }
[data-theme="light"] .drop-zone:hover,
[data-theme="light"] .drop-zone.drag-over { border-color: var(--accent); background: #edf6e4; }
[data-theme="light"] .drop-zone.has-file { border-color: #5a9e30; background: #edf6e4; }

[data-theme="light"] .stats-bar {
  background: #e8f4de;
  border-color: #a0c880;
}
[data-theme="light"] .stat-value { color: #2a5810; }
[data-theme="light"] .stat-label { color: #4a6a38; }

[data-theme="light"] .log-box {
  background: #f0f4ec;
  border-color: #b0c890;
  color: #2a3820;
}

[data-theme="light"] .info-card {
  background: #fff8e0;
  border-color: var(--warn-bd);
}
[data-theme="light"] .info-card strong { color: var(--warn-txt); }

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ─── Tool Header ─── */
.tool-header {
  background: #0f1a0a;
  border-bottom: 1px solid var(--border-hi);
  padding: 1.25rem 1.25rem;
}
.tool-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.tool-header-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.tool-header-icon { font-size: 2rem; line-height: 1; }
.tool-header-title h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-hi);
  line-height: 1.2;
}
.tool-header-sub {
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: .3rem;
}
.tool-header-sub a { color: inherit; }
.tool-header-link {
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent-hi);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: .35rem .85rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.tool-header-link:hover {
  background: rgba(78,138,46,.15);
  border-color: var(--accent-hi);
}

/* ─── Main ─── */
main {
  max-width: var(--max-w);
  margin: 2rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ─── Cards ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

/* ─── Privacy card ─── */
.privacy-card {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  background: #0e1a09;
  border-color: var(--border-hi);
  font-size: .88rem;
  color: var(--accent-hi);
}
.privacy-icon { font-size: 1.2rem; flex-shrink: 0; }

/* ─── Beta notice card ─── */
.beta-notice-card {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  background: #1a1500;
  border-color: #6b5500;
  font-size: .88rem;
  color: #e8c84a;
}
.beta-notice-card a { color: inherit; font-weight: 600; }
.beta-notice-card a:hover { opacity: .8; }
.beta-notice-icon { font-size: 1.2rem; flex-shrink: 0; }
[data-theme="light"] .beta-notice-card {
  background: #fffbea;
  border-color: #e0c030;
  color: #7a5e00;
}
[data-theme="light"] .beta-notice-card strong { color: #5a4400; }

/* ─── Upload grid ─── */
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.upload-zone { display: flex; flex-direction: column; gap: .5rem; }
.upload-label {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}
.upload-label span { color: var(--text-hi); }
.optional-badge {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--text-muted);
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: .05rem .35rem;
  vertical-align: middle;
  text-transform: none;
}

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: var(--bg-panel);
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(78,138,46,.06);
}
.drop-zone.has-file {
  border-color: var(--accent-hi);
  border-style: solid;
  background: rgba(78,138,46,.08);
}
.drop-zone input[type="file"] { display: none; }

.drop-icon { font-size: 1.8rem; }
.drop-main {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-hi);
}
.drop-sub {
  font-size: .78rem;
  color: var(--text-muted);
}
.drop-filename {
  font-size: .82rem;
  color: var(--accent-hi);
  font-weight: 600;
  word-break: break-all;
}
.drop-clear {
  font-size: .75rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: .15rem .4rem;
  border-radius: 3px;
  transition: color .15s, background .15s;
}
.drop-clear:hover { color: var(--danger-hi); background: rgba(192,57,43,.12); }

/* ─── Actions ─── */
.actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: .65rem 1.5rem;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hi); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }

.btn-download {
  background: #1a3a0a;
  color: var(--accent-hi);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: .65rem 1.5rem;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.btn-download:hover:not(:disabled) {
  background: rgba(78,138,46,.2);
  border-color: var(--accent-hi);
}
.btn-download:disabled { opacity: .4; cursor: not-allowed; }

/* ─── Stats bar ─── */
.stats-bar {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: #0e1a09;
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  padding: .85rem 1.25rem;
}
.stat { display: flex; flex-direction: column; align-items: center; min-width: 70px; }
.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-hi);
  line-height: 1;
}
.stat-label {
  font-size: .72rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: .2rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ─── Info/warning card ─── */
.info-card {
  display: flex;
  gap: .85rem;
  background: var(--warn-bg);
  border: 1px solid var(--warn-bd);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: .88rem;
  color: var(--warn-txt);
}
.info-card-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: .1rem; }
.info-card strong { color: var(--warn-txt); font-weight: 700; }
.info-card a { color: inherit; text-decoration: underline; }
.info-card ul { margin: .4rem 0 0 1.2rem; }
.info-card li { margin-bottom: .2rem; }

code {
  font-family: var(--mono);
  font-size: .85em;
  background: #1a1a0a;
  border: 1px solid #2a2a10;
  border-radius: 3px;
  padding: .05em .35em;
  color: #c8b040;
}

/* ─── Log box (merge mode) ─── */
.log-wrap { display: none; }
.log-wrap.visible { display: block; }
.log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .6rem;
}
.log-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.copy-btn {
  font-size: .75rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 3px;
  padding: .2rem .55rem;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.copy-btn:hover { color: var(--text-hi); border-color: var(--accent); }

.log-box {
  font-family: var(--mono);
  font-size: .78rem;
  background: #0f140c;
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  max-height: 280px;
  overflow-y: auto;
  white-space: pre;
  color: var(--accent-hi);
  line-height: 1.5;
}

/* ─── Restriction table (log-only mode) ─── */
.restriction-table {
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0f140c;
}

.restriction-row {
  display: grid;
  grid-template-columns: 5rem 1fr auto;
  align-items: stretch;
  border-bottom: 1px solid rgba(78,138,46,.18);
}
.restriction-row:last-child { border-bottom: none; }

.r-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: .65rem .4rem;
  border-right: 1px solid rgba(78,138,46,.18);
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
  gap: .15rem;
}
.r-line-num {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-hi);
  line-height: 1;
}

.r-exceptions {
  padding: .6rem .85rem;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--accent-hi);
  line-height: 1.65;
  word-break: break-all;
  align-self: center;
}

.r-copy-btn {
  align-self: center;
  margin: .4rem .6rem;
  font-size: .72rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 3px;
  padding: .25rem .55rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
  font-family: inherit;
}
.r-copy-btn:hover { color: var(--text-hi); border-color: var(--accent); background: rgba(78,138,46,.08); }
.r-copy-btn.copied { color: var(--success-hi); border-color: var(--success); }

[data-theme="light"] .restriction-table { background: #f0f4ec; }
[data-theme="light"] .restriction-row { border-bottom-color: #cde0b8; }
[data-theme="light"] .r-line { border-right-color: #cde0b8; color: #5a7a4a; }
[data-theme="light"] .r-line-num { color: #2a5810; }
[data-theme="light"] .r-exceptions { color: #2a5810; }
[data-theme="light"] .r-copy-btn { border-color: #aaaaaa; color: #666; }
[data-theme="light"] .r-copy-btn:hover { color: #2a5810; border-color: #5a9e30; background: rgba(78,138,46,.08); }
[data-theme="light"] .r-copy-btn.copied { color: #2e8050; border-color: #2e8050; }

/* ─── Hidden ─── */
.hidden { display: none !important; }

/* ─── Mode tabs ─── */
.mode-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  gap: 0;
}
.mode-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: .65rem 1.4rem;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
  font-family: inherit;
}
.mode-tab:hover { color: var(--text-hi); }
.mode-tab.active { color: var(--accent-hi); border-bottom-color: var(--accent-hi); }

/* ─── Single/batch mode wrappers ─── */
#single-mode, #batch-mode {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ─── Single mode type badge ─── */
.single-type-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .74rem;
  font-weight: 600;
  color: var(--accent-hi);
  background: rgba(78,138,46,.12);
  border: 1px solid var(--accent-dim);
  border-radius: 3px;
  padding: .05rem .45rem;
  margin-left: .35rem;
  vertical-align: middle;
  text-transform: none;
  letter-spacing: 0;
}

/* ─── Batch privacy note ─── */
.be-cfg-note {
  margin-top: .55rem;
  font-size: .82rem;
  opacity: .85;
  line-height: 1.5;
}

/* ─── File type reference table ─── */
.filetype-details summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  transition: color .15s;
}
.filetype-details summary::-webkit-details-marker { display: none; }
.filetype-details[open] summary { color: var(--text-hi); }

.filetype-table-wrap { margin-top: .9rem; }
.filetype-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.filetype-table th {
  text-align: left;
  padding: .35rem .75rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.filetype-table td {
  padding: .4rem .75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  line-height: 1.4;
}
.filetype-table tr:last-child td { border-bottom: none; }
.ft-yes  { color: var(--success-hi); font-weight: 700; }
.ft-arma3 { color: var(--text-muted); font-size: .8em; }
.ft-shared {
  display: inline-block;
  font-size: .68rem;
  font-weight: 600;
  color: var(--accent-hi);
  background: rgba(78,138,46,.15);
  border: 1px solid var(--accent-dim);
  border-radius: 3px;
  padding: .02rem .3rem;
  margin-left: .3rem;
  vertical-align: middle;
}

.regex-note {
  margin-top: .85rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ─── Batch drop zone ─── */
.batch-drop-card { display: flex; flex-direction: column; gap: .5rem; }
.batch-drop { min-height: 150px; }

/* ─── Batch pairs table ─── */
.batch-pairs-title {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: .85rem;
}

.batch-pair-row {
  display: grid;
  grid-template-columns: 9rem 1fr 1fr auto;
  gap: .5rem;
  align-items: center;
  padding: .5rem .6rem;
  border-bottom: 1px solid var(--border);
  font-size: .84rem;
}
.batch-pair-row:last-child { border-bottom: none; }

.bp-type { font-weight: 600; color: var(--text-hi); }
.bp-file { font-family: var(--mono); font-size: .78rem; color: var(--text-muted); }
.bp-found   { color: var(--success-hi); }
.bp-missing { color: var(--danger-hi); }
.bp-optional { color: var(--text-muted); font-style: italic; }
.bp-status  { font-size: .78rem; text-align: right; white-space: nowrap; }
.bp-pending    { color: var(--text-muted); }
.bp-processing { color: var(--warn-txt); }
.bp-done       { color: var(--success-hi); font-weight: 600; }
.bp-nodiff     { color: var(--text-muted); }
.bp-logonly    { color: var(--accent-hi); }
.bp-skip       { color: var(--text-muted); font-style: italic; }
.bp-error      { color: var(--danger-hi); }

/* ─── Batch review accordions ─── */
.br-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .5rem;
  gap: .5rem;
  flex-wrap: wrap;
}
.br-hint {
  font-size: .78rem;
  color: var(--text-muted);
  margin: 0 0 .85rem;
}
.br-bulk-actions { display: flex; gap: .4rem; }

.br-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .45rem;
  overflow: hidden;
  transition: border-color .15s, opacity .15s;
}
.br-item.approved { border-color: #2d4a18; }
.br-item.declined { opacity: .45; }

.br-item-header {
  display: flex;
  align-items: stretch;
  background: var(--bg-card2);
}

.br-check-label {
  display: flex;
  align-items: center;
  padding: .6rem .75rem;
  cursor: pointer;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}
.br-chk {
  width: 1rem;
  height: 1rem;
  accent-color: var(--success-hi);
  cursor: pointer;
}

.br-expand-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem .75rem;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-size: .875rem;
}
.br-expand-btn:hover { background: rgba(255,255,255,.025); }

.br-title-part { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.br-icon { flex-shrink: 0; }
.br-name {
  font-weight: 600;
  color: var(--text-hi);
  font-family: var(--mono);
  font-size: .84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.br-badge-part { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.br-badge {
  font-size: .7rem;
  font-weight: 700;
  padding: .18rem .5rem;
  border-radius: 99px;
  white-space: nowrap;
}
.br-badge-new    { background: #1c2e0e; color: var(--success-hi); }
.br-badge-nodiff { background: var(--bg-card); color: var(--text-muted); }
.br-badge-warn   { background: #2e1a00; color: #ffb347; }
.br-badge-edited { background: #1a2a3e; color: #88aadd; }

.br-chevron {
  font-size: .72em;
  color: var(--text-muted);
  transition: transform .18s;
  flex-shrink: 0;
}
.br-expand-btn[aria-expanded="true"] .br-chevron { transform: rotate(180deg); }

.br-body {
  display: none;
  border-top: 1px solid var(--border);
}
.br-body.open { display: block; }

/* ── Per-exception list ── */
.br-exc-list { padding: .4rem 0 .2rem; }
.br-exc-comment {
  font-family: var(--mono);
  font-size: .71rem;
  color: var(--text-muted);
  padding: .5rem 1rem .15rem;
  line-height: 1.3;
  user-select: text;
}
.br-exc-item {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  padding: .1rem 1rem;
  cursor: pointer;
  transition: background .1s;
}
.br-exc-item:hover { background: rgba(255,255,255,.03); }
.br-exc-chk {
  width: .8rem;
  height: .8rem;
  accent-color: var(--success-hi);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: .15rem;
}
.br-exc-text {
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--accent-hi);
  line-height: 1.55;
  word-break: break-all;
}
.br-exc-item.unchecked .br-exc-text { color: var(--text-muted); text-decoration: line-through; }

/* ── Edit mode textarea ── */
.br-edit-area {
  display: block;
  width: 100%;
  min-height: 180px;
  max-height: 420px;
  resize: vertical;
  font-family: var(--mono);
  font-size: .75rem;
  line-height: 1.55;
  background: var(--bg-base, #0d0d0d);
  color: var(--text);
  border: none;
  border-top: 1px solid var(--border);
  padding: .7rem 1rem;
  box-sizing: border-box;
  outline: none;
}
.br-edit-area:focus { border-top-color: var(--border-hi); }

/* ── Action buttons (copy / edit / save / cancel) ── */
.br-action-btn {
  font-size: .72rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 3px;
  padding: .22rem .6rem;
  cursor: pointer;
  font-family: inherit;
  transition: color .15s, border-color .15s, background .15s;
}
.br-action-btn:hover { color: var(--text-hi); border-color: var(--border-hi); }
.br-action-edit:hover { border-color: #667799; color: #99bbdd; }
.br-action-save { border-color: #2d4a18; color: var(--success-hi); }
.br-action-save:hover { background: rgba(78,138,46,.12); border-color: var(--success-hi); }
.br-action-btn.copied { color: var(--success-hi); border-color: var(--success); }

.br-body-footer {
  display: flex;
  gap: .5rem;
  padding: .35rem .65rem;
  border-top: 1px solid var(--border);
  background: var(--bg-card2);
}

/* ── Bulk action buttons (Approve all / Decline all) ── */
.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-sm { font-size: .78rem; font-weight: 600; padding: .3rem .7rem; }
.btn-ghost:hover { background: rgba(255,255,255,.04); color: var(--text); border-color: var(--border-hi); }
#br-approve-all { border-color: #2d4a18; color: var(--success-hi); }
#br-approve-all:hover { background: rgba(78,138,46,.12); border-color: var(--success-hi); }
#br-decline-all:hover { background: rgba(255,70,70,.07); border-color: #a04444; color: #f07070; }

.batch-actions {
  display: flex;
  gap: .75rem;
  margin-top: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ─── Upgraded comparison card ─── */
.upgraded-details summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: color .15s;
}
.upgraded-details summary::-webkit-details-marker { display: none; }
.upgraded-details[open] summary { color: var(--accent-hi); }
.upgraded-chevron { font-size: .8em; transition: transform .2s; }
.upgraded-details[open] .upgraded-chevron { transform: rotate(180deg); }

.upgraded-body {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.upgraded-body p { font-size: .88rem; line-height: 1.6; }
.upgraded-body a { color: var(--accent-hi); }

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .84rem;
}
.comparison-table th {
  text-align: left;
  padding: .4rem .8rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  background: var(--bg-card2);
  border-bottom: 1px solid var(--border);
}
.comparison-table td {
  padding: .4rem .8rem;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
}
.comparison-table tr:last-child td { border-bottom: none; }
.cmp-old { color: var(--text-muted); }
.cmp-new { color: var(--accent-hi); font-weight: 600; }

.upgraded-footer {
  font-size: .78rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ─── Light mode additions ─── */
[data-theme="light"] .mode-tab.active { color: #2a5810; border-bottom-color: #2a5810; }
[data-theme="light"] .single-type-badge { color: #2a5810; background: #dff0c8; border-color: #a8d080; }
[data-theme="light"] .filetype-table th { color: #5a7a4a; }
[data-theme="light"] .filetype-table td { color: #333; border-bottom-color: #ddd; }
[data-theme="light"] .comparison-table th { background: #eef4e8; }
[data-theme="light"] .comparison-table td { border-bottom-color: #ddd; }
[data-theme="light"] .cmp-new { color: #2a5810; }
[data-theme="light"] .batch-pair-row { border-bottom-color: #ddd; }
[data-theme="light"] .ft-yes { color: #2e8050; }

/* ─── Responsive ─── */
@media (max-width: 700px) {
  .batch-pair-row { grid-template-columns: 7rem 1fr auto; }
  .batch-pair-row .bp-file:first-of-type { display: none; } /* hide log col on small screens */
}
@media (max-width: 600px) {
  .upload-grid { grid-template-columns: 1fr; }
  .stats-bar { gap: 1rem; justify-content: center; }
  .tool-header-title h1 { font-size: 1.2rem; }
  .actions { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-download { text-align: center; justify-content: center; }
  .comparison-table th:nth-child(2), .comparison-table td:nth-child(2) { display: none; }
}
