/* Shared theme for application templates, including standalone entry pages.
   Legacy declarations retain their original dark color as a var() fallback. */
:root[data-theme="light"], body.light-theme {
  color-scheme: light;
  --ink-primary: #0F172A;
  --ink-secondary: #475569;
  --ink-blue: #1E40AF;
  --ink-green: #065F46;
  --ink-amber: #854D0E;
  --ink-red: #991B1B;
  --ink-purple: #6B21A8;
  --surface-panel: #FFFFFF;
  --line-subtle: #CBD5E1;
  --fill-blue: #1D4ED8;
  --fill-green: #047857;
  --fill-red: #B91C1C;
  --fill-purple: #6D28D9;
  --fill-amber: #92400E;
  /* Aliases used by independent modules. */
  --card-bg: #FFFFFF;
  --card-border: #CBD5E1;
  --border-color: #CBD5E1;
  --surface: #FFFFFF;
  --bg: #F1F5F9;
  --card: #FFFFFF;
  --text: #0F172A;
  --muted: #475569;
}
:root[data-theme="light"] body.light-theme { --text-muted: #475569 !important; }
:root[data-theme="light"] :is(input, select, textarea) { color-scheme: light !important; }
:root[data-theme="light"] :is(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid #1D4ED8;
  outline-offset: 3px;
}
:root[data-theme="light"] .gm-ui-hover-effect { filter: none; }
/* Neutral text in document dialogs and list headings. */
:root[data-theme="light"] .comment-history-entry {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
}
:root[data-theme="light"] .comment-history-meta { color: #475569; }
:root[data-theme="light"] .comment-history-author { color: #0F172A; }
:root[data-theme="light"] .comment-history-link { color: #1E40AF; }
/* The login uses its own layout and does not inherit design.css. */
:root[data-theme="light"] .bg-animated {
  background: radial-gradient(ellipse at 15% 5%, #DBEAFE, transparent 65%), #F1F5F9;
}
:root[data-theme="light"] .orb { opacity: .07; }
:root[data-theme="light"] .login-card {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  box-shadow: 0 16px 48px rgba(15,23,42,.12);
}
:root[data-theme="light"] .brand-name {
  background: none;
  color: #1E3A8A;
  -webkit-text-fill-color: #1E3A8A;
}
:root[data-theme="light"] .login-page .form-control {
  background: #FFFFFF;
  border: 1px solid #64748B;
  color: #0F172A;
}
:root[data-theme="light"] .login-page .form-control:focus { border-color: #1D4ED8; }
:root[data-theme="light"] .login-page .btn-login { background: #1D4ED8; }
:root[data-theme="light"] .login-page .btn-login:hover { background: #1E40AF; }
:root[data-theme="light"] .login-footer { border-color: #CBD5E1; }
:root[data-theme="light"] .btn-close-modal { background: #1D4ED8; }
@media (prefers-reduced-motion: reduce) {
  .orb { animation: none; }
}
:root[data-theme="light"], body.light-theme {
  --primary: #1D4ED8;
  --primary-color: #1D4ED8;
  --success-bg: #ECFDF5;
  --warning-bg: #FFFBEB;
  --danger-bg: #FEF2F2;
}
:root[data-theme="light"] :is(input, select, textarea):disabled {
  color: #475569;
  background-color: #F1F5F9;
  opacity: 1;
}
:root[data-theme="light"] { --history-bg: #F1F5F9; }
:root[data-theme="light"], body.light-theme {
  --accent: #1D4ED8;
  --accent-dark: #1E40AF;
}
:root[data-theme="light"] .selection-ribbon { color: #854D0E; }
:root[data-theme="light"] .highlighted,
:root[data-theme="light"] .index-page li a { background-color: #1D4ED8; color: #FFFFFF; }
