/* Shared visual language for ZANAMBUCO: afrorock, stage light and night. */
:root {
    color-scheme: dark;
    --rock-ink: #090b0c;
    --rock-panel: #111719;
    --rock-panel-soft: #17211f;
    --rock-border: rgba(241, 246, 237, .14);
    --rock-text: #f1f6ed;
    --rock-muted: #9aaba1;
    --rock-green: #b6f36b;
    --rock-turquoise: #39c895;
    --rock-sky: #8bd8c6;
    --rock-blue: #7ea7d8;
    --rock-warm: #f29b52;
}

html, body { background: var(--rock-ink) !important; color: var(--rock-text) !important; }
body { color-scheme: dark; }

/* Keeps the existing Blade utility markup, but gives every screen one dark surface language. */
[class~="bg-[#f5f3ee]"], [class~="bg-white"], [class~="bg-[#FDFDFC]"], [class~="bg-[#ffad8d]"], [class~="bg-[#d8f06b]"], [class~="bg-[#b8a8ff]"] {
    background-color: var(--rock-panel) !important;
    color: var(--rock-text) !important;
}
[class*="bg-white/"] { background-color: rgba(255, 255, 255, .06) !important; }
[class*="bg-black/"] { background-color: rgba(0, 0, 0, .14) !important; }
[class*="bg-[#191919]"] { background-color: #040b0f !important; }
[class*="text-[#171717]"], [class*="text-black"], [class*="text-[#1b1b18]"] { color: var(--rock-text) !important; }
[class*="text-black/"], [class*="text-white/"] { color: var(--rock-muted) !important; }
[class*="border-black"], [class*="border-white"] { border-color: var(--rock-border) !important; }

input, textarea, select {
    background-color: var(--rock-panel-soft) !important;
    border-color: var(--rock-border) !important;
    color: var(--rock-text) !important;
}
input::placeholder, textarea::placeholder { color: #7699a4 !important; }
select option { background: #102832 !important; color: #edfaff !important; }
select:focus, input:focus, textarea:focus { border-color: var(--rock-turquoise) !important; outline: 2px solid rgba(103, 214, 208, .18); }

/* Accent surfaces stay colourful but readable in dark mode. */
[class*="bg-[#d8f06b]"] { background-color: #173d36 !important; }
[class*="bg-[#ffad8d]"] { background-color: #432c20 !important; }
[class*="bg-[#b8a8ff]"] { background-color: #29284b !important; }
[class*="bg-[#d8f06b]"] button, [class*="bg-[#ffad8d]"] button { color: var(--rock-text) !important; }

button, a { transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease; }
button:hover, a:hover { filter: brightness(1.12); }

/* Calendar labels use the event colour but sit on a dark readable tile. */
.event-label { color: #061015 !important; font-weight: 700; }
.calendar-day { border-color: var(--rock-border) !important; }
.calendar-grid { border-color: var(--rock-border) !important; }
.calendar-grid { background: var(--rock-panel) !important; }
.calendar-grid > .calendar-day { background: #0d1414 !important; }
.calendar-grid > .calendar-day[class*="bg-[#d8f06b]"] { background: rgba(57, 200, 149, .2) !important; }
.calendar-grid > .calendar-day > .event-label { background-color: var(--event-color, #39c895); }

/* Dark navigation remains consistent across all modules. */
nav a { color: var(--rock-muted); }
nav a:hover, nav a.bg-\[\#d8f06b\]\/15 { color: var(--rock-green) !important; background: rgba(103, 214, 208, .12) !important; }

.brand-lockup { display: block; max-width: 168px; }
.brand-lockup img { display: block; width: 100%; height: auto; }
.brand-heading { width: min(360px, 48vw); }
.brand-heading img { display: block; width: 100%; height: auto; }
body { font-family: 'Manrope', sans-serif; }
.font-display { font-family: 'Bebas Neue', sans-serif !important; letter-spacing: .04em; }
.font-mono { font-family: 'DM Mono', monospace !important; }
main { background: radial-gradient(circle at 82% 0%, rgba(57, 200, 149, .08), transparent 28rem), var(--rock-ink); }
main .grid > * { min-width: 0; }
header { background: rgba(9, 11, 12, .88); }

.toast-root { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 100; display: grid; gap: .75rem; width: min(22rem, calc(100vw - 2rem)); }
.toast { display: flex; align-items: flex-start; gap: .75rem; padding: .9rem 1rem; border: 1px solid var(--rock-border); border-radius: .85rem; background: #15201e; color: var(--rock-text); box-shadow: 0 16px 40px rgba(0, 0, 0, .35); animation: toast-in 180ms ease-out; }
.toast--error { border-color: rgba(242, 155, 82, .55); }
.toast__close { margin-left: auto; color: var(--rock-muted); }
.confirm-dialog[hidden], .search-panel[hidden] { display: none !important; }
.confirm-dialog { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 1rem; }
.confirm-dialog__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .68); }
.confirm-dialog__panel { position: relative; width: min(28rem, 100%); padding: 1.5rem; border: 1px solid var(--rock-border); border-radius: 1rem; background: var(--rock-panel); color: var(--rock-text); box-shadow: 0 24px 70px rgba(0, 0, 0, .5); }
.search-panel { position: fixed; inset: 0; z-index: 105; display: grid; place-items: start center; padding: 8rem 1rem 1rem; }
.search-panel__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .68); }
.search-panel__box { position: relative; width: min(38rem, 100%); padding: 1.5rem; border: 1px solid var(--rock-border); border-radius: 1rem; background: #f1f6ed; color: #111719; box-shadow: 0 24px 70px rgba(0, 0, 0, .5); }
@keyframes toast-in { from { opacity: 0; transform: translateY(.5rem); } to { opacity: 1; transform: translateY(0); } }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(circle at 50% 0%, rgba(57, 200, 149, .12), transparent 30rem), var(--rock-ink); color: var(--rock-text); }
.auth-card { width: min(27rem, 100%); padding: 2rem; border: 1px solid var(--rock-border); border-radius: 1rem; background: var(--rock-panel); box-shadow: 0 24px 70px rgba(0, 0, 0, .45); }
.auth-card__logo { display: block; width: min(16rem, 80%); margin: 0 auto 1.5rem; }
.auth-card__eyebrow { margin-bottom: .5rem; color: var(--rock-muted); font: 500 .65rem/1 'DM Mono', monospace; letter-spacing: .16em; text-transform: uppercase; }
.auth-card__copy { margin-top: .5rem; color: var(--rock-muted); font-size: .85rem; line-height: 1.5; }
.auth-form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.auth-form label { display: grid; gap: .4rem; color: var(--rock-muted); font-size: .8rem; }
.auth-form input { width: 100%; border: 1px solid var(--rock-border); border-radius: .75rem; padding: .75rem; background: var(--rock-panel-soft); color: var(--rock-text); }
.auth-form button { border: 0; border-radius: .75rem; padding: .8rem; background: var(--rock-green); color: #111719; font-weight: 800; }
.auth-error { margin-top: 1rem; border: 1px solid rgba(242, 155, 82, .5); border-radius: .75rem; padding: .75rem; color: #ffc18b; font-size: .8rem; }

@media (prefers-color-scheme: light) {
    html, body { background: var(--rock-ink) !important; }
}

@media (max-width: 640px) {
    .brand-heading { width: min(250px, 62vw); }
}
