/* Online edition extras (loaded after style.css, which is left unchanged):
   1. Light colour theme (default) - dark text on white, easy to read.
      The Light/Dark switch in the header is remembered on each device.
   2. Small phone-layout fixes. */

.theme-toggle { background: transparent; border: 1px solid var(--border); color: var(--cream);
  border-radius: 20px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.theme-toggle:hover { background: var(--card-hover); }
html[data-theme="light"] .theme-icon-light,
html:not([data-theme="light"]) .theme-icon-dark { display: none; }

/* ---------- Light theme ---------- */
html[data-theme="light"] {
  --bg: #f7f5ee;
  --bg-elev: #ffffff;
  --card: #ffffff;
  --card-hover: #f4f0e1;
  --border: #d8d0b2;
  --gold: #ffd100;          /* yellow buttons / active tab (black text on them) */
  --gold-bright: #7a5c00;   /* headings and highlights: dark gold, readable on white */
  --amber: #f5b800;
  --cream: #1a1a1a;         /* main text */
  --muted: #4a4636;
  --muted-dim: #6b6552;
  --green: #1b7a3a;
  --green-bg: #e6f4ea;
  --red: #b3261e;
  --red-bg: #fdecea;
  --shadow: 0 2px 10px rgba(60, 50, 10, 0.10);
  color-scheme: light;
}
html[data-theme="light"] body {
  background:
    radial-gradient(1200px 600px at 10% -10%, #fff3b0 0%, transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, #fff8d6 0%, transparent 55%),
    var(--bg);
}
html[data-theme="light"] header.top {
  background: linear-gradient(90deg, #ffd100, #f5b800);
  border-radius: 12px; padding: 14px 16px; border-bottom: none; color: #000;
}
html[data-theme="light"] header.top h1,
html[data-theme="light"] header.top .sub,
html[data-theme="light"] header.top .clock,
html[data-theme="light"] header.top #userBox,
html[data-theme="light"] header.top #userBox * { color: #1a1600 !important; }
html[data-theme="light"] header.top .theme-toggle { border-color: rgba(0,0,0,0.35); color: #000; }
html[data-theme="light"] header.top #userBox .btn { background: #ffffff !important; color: #1a1600 !important;
  border: 1px solid rgba(0,0,0,0.35) !important; box-shadow: none !important; }
html[data-theme="light"] header.top .theme-toggle:hover { background: rgba(255,255,255,0.35); }
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea { background: #ffffff; color: #1a1a1a; border-color: #c9c0a0; }
html[data-theme="light"] .upload-zone:hover { background: #fff8d6; }
html[data-theme="light"] .badge-ocr { background: #fff3b0; color: #5c4500; }
html[data-theme="light"] table th { color: #3d3a2e; }
/* Screens that colour text with the bright yellow directly */
html[data-theme="light"] [style*="color:#f2b705"],
html[data-theme="light"] [style*="color: #f2b705"] { color: #7a5c00 !important; }

/* ---------- Phones ---------- */
@media (max-width: 720px) {
  .wrap { padding: 12px 10px 70px; }
  header.top { gap: 8px; }
  header.top .top-right { gap: 10px !important; flex-wrap: wrap; width: 100%; justify-content: space-between; }
  .tk-logo-right { display: none; }
  .ce-logo { width: 48px !important; height: auto !important; }
  header.top h1 { font-size: 18px; }
  nav.tabs { overflow-x: auto; flex-wrap: nowrap !important; -webkit-overflow-scrolling: touch; }
  nav.tabs button { flex: 0 0 auto; }
  table { font-size: 13px; }
  .card { overflow-x: auto; }
}
