/* ── CSE shared base styles ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface2: #f5f5f5;
  --surface3: #e8f4ff;
  --border: #e2e2e8;
  --accent: #0071bc;
  --accent-hover: #005a96;
  --text: #111827;
  --muted: #6b7280;
  --green: #009245;
  --amber: #fbb03b;
  --red: #ed1c24;
  --orange: #f15a24;
  --violet: #7c4dff;
  --blue: #0071bc;
  --card-shadow: 0 1px 4px rgba(0,0,0,.06);
}

[data-theme="dark"] {
  --bg: #0d0f18;
  --surface: #141720;
  --surface2: #1c2030;
  --surface3: #1a2540;
  --border: #2a2f4a;
  --text: #e2e8f0;
  --muted: #7a84a8;
  --card-shadow: 0 1px 4px rgba(0,0,0,.3);
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* Theme toggle */
.theme-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.theme-btn:hover { background: var(--surface2); }

/* Logos */
.logo-light { display: block; }
.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }
.logo-light img, .logo-dark img { display: block; }

/* Toast */
.cse-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--amber);
  color: var(--amber);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  z-index: 9999;
  transition: opacity .3s;
  max-width: 360px;
}
.cse-toast.green { border-color: var(--green); color: var(--green); }
.cse-toast.red { border-color: var(--red); color: var(--red); }
.cse-toast.blue { border-color: var(--accent); color: var(--accent); }

/* Common buttons */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }

/* Form basics */
.form-field { display: block; margin-bottom: 12px; }
.form-field label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--accent); }
