/* ══════════════════════════════════════════════
   Web Toolbox — Shared Styles
   Lumine Group / ITDS branding
   ══════════════════════════════════════════════ */

/* ── Theme variables (dark = default) ── */
:root {
  --bg:          #000002;
  --bg-panel:    #161a22;
  --bg-header:   #111419;
  --bg-input:    #0d1016;
  --border:      #2a2e38;
  --border-hover:#393B3E;
  --text:        #E2ECF1;
  --text-heading:#FFFFFF;
  --text-muted:  #AAB1B5;
  --text-dim:    #71767A;
  --text-faint:  #555;
  --text-placeholder: #393B3E;
  --text-output: #1CB875;
  --btn-bg:      #1e2230;
  --btn-text:    #AAB1B5;
  --btn-hover:   #282d3a;
  --btn-sm-hover:#2e3442;
  --accent:      #0D549B;
  --accent-hover:#1068b8;
  --warn-bg:     #2d2416;
  --warn-border: #5c4a1e;
  --warn-text:   #F2AD49;
  --copied-bg:   #0e2e24;
  --copied-text: #1CB875;
  --cat-active-mix: #161a22;
  --marker-opacity: 25%;
}

/* ── Light theme ── */
[data-theme="light"] {
  --bg:          #E2ECF1;
  --bg-panel:    #FFFFFF;
  --bg-header:   #f4f7f9;
  --bg-input:    #f8fafb;
  --border:      #d0d8dd;
  --border-hover:#AAB1B5;
  --text:        #162D4F;
  --text-heading:#000002;
  --text-muted:  #393B3E;
  --text-dim:    #71767A;
  --text-faint:  #AAB1B5;
  --text-placeholder: #AAB1B5;
  --text-output: #0E8E7C;
  --btn-bg:      #E2ECF1;
  --btn-text:    #393B3E;
  --btn-hover:   #d4dee4;
  --btn-sm-hover:#c8d4db;
  --accent:      #0D549B;
  --accent-hover:#1068b8;
  --warn-bg:     #fef8e7;
  --warn-border: #F2AD49;
  --warn-text:   #8a6d00;
  --copied-bg:   #e0f5ed;
  --copied-text: #0E8E7C;
  --cat-active-mix: #FFFFFF;
  --marker-opacity: 18%;
}

/* ── Reset & body ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.2s, color 0.2s;
}

/* ── Header ── */
header {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

header h1 { font-size: 20px; font-weight: 600; color: var(--text-heading); }
header .subtitle { font-size: 13px; color: var(--text-dim); }

/* ── Logo (dark/light swap) ── */
.header-logo { height: 32px; flex-shrink: 0; }
.logo-light { display: none; }
.logo-dark { display: block; }
[data-theme="light"] .logo-light { display: block; }
[data-theme="light"] .logo-dark { display: none; }

/* ── Theme toggle button ── */
.theme-toggle {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-input);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: all 0.15s;
}
.theme-toggle:hover { border-color: var(--border-hover); color: var(--text); }

/* ── Back to Toolbox button ── */
.back-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-input);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px; font-weight: 500;
  text-decoration: none;
  line-height: 1;
  transition: all 0.15s;
}
.back-btn:hover { border-color: var(--border-hover); color: var(--text); }

/* ── Panels ── */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column;
}

.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-header);
}

.panel-header h2 {
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}

.panel-header-actions { display: flex; gap: 8px; align-items: center; }
.panel-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }

/* ── Textarea / inputs ── */
textarea {
  width: 100%; min-height: 120px; flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px; color: var(--text);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 14px; padding: 12px;
  resize: vertical; line-height: 1.6;
}

textarea:focus { outline: none; border-color: var(--accent); }
