/* Brascast Central - foundation: fonts, tokens, reset, buttons */

@font-face {
  font-family: 'Red Hat Display';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/redhatdisplay-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Red Hat Display';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/redhatdisplay-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green: #00b894; /* teste verde da logo; original: #178d72 */
  --green-dark: #0f6b55;
  --green-light: #e8f5f1;
  --green-mid: #2aad8e;
  --text: #0f1e1b;
  --text-muted: #5a7069;
  --bg: #ffffff;
  --bg-soft: #f5faf8;
  --border: #d8eae5;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --font: 'Red Hat Display', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --shadow-sm: 0 1px 3px rgba(15,30,27,.06), 0 4px 16px rgba(15,30,27,.06);
  --shadow-md: 0 2px 8px rgba(15,30,27,.08), 0 12px 40px rgba(15,30,27,.10);
}

html[data-theme="dark"] {
  --bg: #0a1410;
  --bg-soft: #0f1e1a;
  --text: #e8f5f1;
  --text-muted: #94a3a0;
  --border: #1f2f2a;
  --green-light: #143028;
}

html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body { font-family: var(--font); color: var(--text); background: var(--bg); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }

.container { max-width: 1600px; margin: 0 auto; padding: 0 80px; }
@media (max-width: 980px) { .container { padding: 0 16px; } }

.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font); font-weight: 600; font-size: 15px; border-radius: 10px; padding: 13px 24px; transition: all .18s; cursor: pointer; border: none; }
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-dark); transform: translateY(-1px); }
.btn--outline { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn--outline:hover { border-color: var(--green); color: var(--green); background: var(--green-light); }
.btn--white { background: #fff; color: var(--green); }
.btn--white:hover { background: rgba(255,255,255,.92); }
.btn--lg { font-size: 17px; padding: 15px 30px; border-radius: 12px; }
.btn--sm { font-size: 13px; padding: 9px 18px; border-radius: 8px; }
.btn--full { width: 100%; justify-content: center; }
.btn:disabled, .btn.is-disabled { opacity: .65; cursor: not-allowed; pointer-events: none; }

/* Shared form field component */
.cl-field { display: flex; flex-direction: column; gap: 6px; }
.cl-field label { font-size: 13px; font-weight: 700; color: var(--text); }
.cl-field input, .cl-field select, .cl-field textarea { width: 100%; padding: 11px 14px; font-family: inherit; font-size: 14.5px; color: var(--text); background: #fff; border: 1.5px solid var(--border); border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
.cl-field input:focus, .cl-field select:focus, .cl-field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,141,114,.12); }
.cl-field--icon { position: relative; }
.cl-field--icon input { padding-right: 44px; }
.cl-field-icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; display: flex; align-items: center; justify-content: center; }
.cl-field-icon svg { width: 18px; height: 18px; display: block; }

/* Per-card status notes */
.cl-card-note { margin: -8px 0 18px; padding: 11px 16px; font-size: 15.5px; line-height: 1.45; border-radius: 10px; }
.cl-card-note a { font-weight: 700; text-decoration: underline; }
.cl-card-note h6 { font-size: 1em; font-weight: 800; margin: 0 0 2px; line-height: 1.35; }
.cl-card-note span { font-size: .92em; }
.cl-card-note--danger { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.cl-card-note--danger a { color: #991b1b; }
.cl-card-note--warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.cl-card-note--warn a { color: #92400e; }
.cl-card-note--info { background: var(--green-light); border: 1px solid var(--green-mid); color: var(--green-dark); }
.cl-card-note--info a { color: var(--green-dark); }

html[data-theme="dark"] .cl-card-note--warn { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.30); color: #fcd34d; }
html[data-theme="dark"] .cl-card-note--warn a { color: #fde68a; }
html[data-theme="dark"] .cl-card-note--danger { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.32); color: #fca5a5; }
html[data-theme="dark"] .cl-card-note--danger a { color: #fecaca; }

/* Aviso colado ao card de serviço, como footer (só quando segue um .cl-radio-card;
   os usos avulsos de .cl-card-note como caixa de erro ficam intactos). */
.cl-radio-card + .cl-card-note { margin: -12px 0 0; padding: 10px 18px; font-size: 15px; font-weight: 600; border-top: 0; border-radius: 0 0 12px 12px; display: flex; align-items: center; gap: 5px; }
.cl-radio-card:has(+ .cl-card-note) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

/* Dashboard inline alerts (informatives, pending fields, recurrence) */
.cl-dash-note { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; margin-bottom: 16px; border-radius: 12px; font-size: 14.5px; line-height: 1.5; }
.cl-dash-note a { font-weight: 700; text-decoration: underline; color: inherit; }
.cl-dash-note--warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.cl-dash-note--danger { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.cl-dash-note--success { background: var(--green-light); border: 1px solid var(--green-mid); color: var(--green-dark); }
.cl-dash-note--info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.cl-dash-note.is-clickable { cursor: pointer; }

.cl-rec-banner { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin-bottom: 16px; border-radius: 14px; background: linear-gradient(120deg, #f0fbf6 0%, #e7f8f0 100%); border: 1px solid var(--green-mid); position: relative; overflow: hidden; }
.cl-rec-banner::before { content: ''; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(0,184,148,.13), transparent 70%); pointer-events: none; }
.cl-rec-banner-icon { flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(135deg, var(--green) 0%, var(--green-mid) 100%); color: #fff; display: flex; align-items: center; justify-content: center; }
.cl-rec-banner-icon svg { width: 24px; height: 24px; }
.cl-rec-banner-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; position: relative; }
.cl-rec-banner-body strong { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -.01em; }
.cl-rec-banner-body span { font-size: 13.5px; color: var(--text-muted); line-height: 1.5; }
.cl-rec-banner-btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; padding: 11px 20px; background: var(--green); color: #fff; border-radius: 10px; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background .15s, transform .15s; }
.cl-rec-banner-btn:hover { background: var(--green-dark); transform: translateY(-1px); }
.cl-rec-banner-btn svg { width: 15px; height: 15px; }
@media (max-width: 640px) {
  .cl-rec-banner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .cl-rec-banner-icon { display: none; }
  .cl-rec-banner-btn { width: 100%; justify-content: center; }
}

/* Empty notifications state */
.cl-notif-empty { padding: 28px 16px; text-align: center; color: var(--text-muted); font-size: 13.5px; }

/* Dark-mode fixes for hardcoded light surfaces */
html[data-theme="dark"] .cl-empty-state-icon { background: rgba(255,255,255,.05); border-color: var(--border); }
html[data-theme="dark"] .cl-rec-banner { background: linear-gradient(120deg, #0f1e18 0%, #11221c 100%); border-color: #1f3a30; }

/* "Save to apply" hint for the theme switch */
.cl-theme-toggle-info strong label { cursor: pointer; }
.cl-theme-hint { display: none; margin: 8px 0 0; font-size: 13px; font-weight: 600; color: #b45309; }
html[data-theme="dark"] .cl-theme-hint { color: #fbbf24; }
