/* WeGoal: segmented buttons + dark mode overrides (loaded after/before Tailwind; selectors are more specific on purpose) */
.seg{padding:.7rem .5rem;border-radius:.75rem;font-weight:700;font-size:.875rem;line-height:1.2;border:1px solid #cbd5e1;background:#fff;color:#334155;cursor:pointer}
.seg.on{background:#2563eb;border-color:#2563eb;color:#fff}
html.dark{background:#0b1220;color-scheme:dark}
html.dark body{background:#0b1220;color:#e2e8f0}
/* surfaces */
html.dark .bg-white{background-color:#111a2e}
html.dark .bg-slate-50{background-color:#0b1220}
html.dark .bg-slate-100{background-color:#1a2640}
html.dark .bg-slate-200{background-color:#25324d}
html.dark .hover\:bg-slate-50:hover{background-color:#1a2640}
html.dark .hover\:bg-slate-200:hover{background-color:#2f3e5e}
html.dark .hover\:bg-white:hover{background-color:#1a2640}
html.dark .disabled\:bg-slate-100:disabled{background-color:#1a2640}
/* borders */
html.dark .border-slate-100,html.dark .divide-slate-100>:not([hidden])~:not([hidden]){border-color:#1e293b}
html.dark .border-slate-200,html.dark [class*="border-slate-200/"]{border-color:#2a3754}
html.dark .border-slate-300{border-color:#3a4a6b}
/* text */
html.dark .text-slate-900,html.dark .text-slate-800{color:#f1f5f9}
html.dark .text-slate-700{color:#e2e8f0}
html.dark .text-slate-600{color:#cbd5e1}
html.dark .text-slate-500{color:#9aa8c1}
html.dark .text-slate-400,html.dark .disabled\:text-slate-400:disabled{color:#7f8da8}
html.dark .hover\:text-slate-600:hover{color:#e2e8f0}
html.dark .text-blue-700,html.dark .text-blue-600{color:#8ec1ff}
html.dark .text-blue-800{color:#bfdbfe}
html.dark .hover\:text-blue-600:hover{color:#bfdbfe}
html.dark .text-rose-600,html.dark .text-rose-700{color:#fda4af}
html.dark .text-emerald-600,html.dark .text-emerald-700,html.dark .text-emerald-800{color:#6ee7b7}
html.dark .text-amber-700,html.dark .text-amber-900{color:#fde68a}
/* tinted surfaces & their borders */
html.dark .bg-blue-50{background-color:rgba(59,130,246,.16)}
html.dark .bg-emerald-50,html.dark .bg-emerald-50\/50{background-color:rgba(16,185,129,.15)}
html.dark .bg-amber-50{background-color:rgba(245,158,11,.14)}
html.dark .bg-rose-50{background-color:rgba(244,63,94,.15)}
html.dark .hover\:bg-blue-50:hover,html.dark .hover\:bg-blue-100:hover{background-color:rgba(59,130,246,.26)}
html.dark .hover\:bg-rose-50:hover,html.dark .hover\:bg-rose-100:hover{background-color:rgba(244,63,94,.26)}
html.dark .border-blue-100,html.dark .border-blue-200,html.dark .hover\:border-blue-300:hover{border-color:rgba(96,165,250,.38)}
html.dark .border-amber-200{border-color:rgba(245,158,11,.38)}
html.dark .border-rose-100,html.dark .border-rose-200,html.dark .border-rose-300{border-color:rgba(251,113,133,.38)}
html.dark .border-emerald-200,html.dark .border-emerald-300{border-color:rgba(52,211,153,.38)}
/* form fields */
html.dark input,html.dark select,html.dark textarea{background-color:#0b1220;color:#f1f5f9;border-color:#3a4a6b}
html.dark input::placeholder,html.dark textarea::placeholder{color:#66758f}
html.dark option{background:#111a2e;color:#f1f5f9}
/* "hollow" secondary buttons: light-filled buttons become outlined with a light label */
html.dark button.bg-white,html.dark button.bg-slate-50,html.dark button.bg-slate-100,html.dark a.bg-white.border,html.dark .seg{background-color:transparent}
html.dark button.bg-white,html.dark button.bg-slate-50,html.dark button.bg-slate-100,html.dark .seg{border-color:#3a4a6b;color:#e2e8f0}
html.dark .seg.on{background-color:#2563eb;border-color:#2563eb;color:#fff}
/* header, primary buttons, toast and the logo tile keep their colors: blue buttons stay solid; the logo keeps its white tile so the rings and arrow stay readable */
html.dark #goalCard{background:#111a2e}
html.dark .shadow-sm,html.dark .shadow-md{--tw-shadow-color:rgba(0,0,0,.4)}
html.dark .tab-active{background-color:#25324d;color:#8ec1ff;box-shadow:none}
html.dark .divide-slate-100>*{border-color:#1e293b}
html.dark h2{color:#f1f5f9;border-top-color:#2a3754}
html.dark #chatView{background:#0b1220}
html.dark #chatBtn{background-color:transparent;border-color:#3a4a6b;color:#e2e8f0}
html.dark #chatDot{border-color:#0b1220}
html.dark .bg-slate-200\/70{background-color:#25324d}
html.dark #emojiTray button:hover{background-color:#1a2640}
/* iOS Safari zooms the page when a focused field has a font size under 16px: keep fields at 16px on iPhone/iPad */
@supports (-webkit-touch-callout: none) {
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px !important; }
}
