:root {
  color-scheme: light;
  font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #263048;
  background: #f4f8fc;
  --red: #ed1c24;
  --red-dark: #c9131a;
  --red-soft: #fff0f1;
  --yellow: #fdb831;
  --yellow-soft: #fff7e3;
  --cyan: #49c3f1;
  --cyan-soft: #eaf9ff;
  --blue: #61a2d8;
  --blue-soft: #eef6fc;
  --indigo: #464fa1;
  --indigo-dark: #323a83;
  --indigo-soft: #f0f1ff;
  --ink: #263048;
  --muted: #6f7890;
  --line: #dfe7ef;
  --surface: #ffffff;
  --background: #f4f8fc;
  --success: #16845b;
  --success-soft: #e7f8f0;
  --danger: #b91c1c;
  --danger-soft: #fff0f0;
  --warning: #9a6500;
  --shadow-sm: 0 8px 24px rgba(42, 56, 86, .07);
  --shadow-md: 0 18px 50px rgba(42, 56, 86, .12);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --sidebar-width: 280px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--background); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--background); color: var(--ink); -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }

/* Estrutura principal */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 18px 14px; background: #fff; border-right: 1px solid var(--line); box-shadow: 8px 0 32px rgba(52, 68, 99, .05); z-index: 50; overflow-y: auto; overflow-x: hidden; }
.sidebar::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--red) 0 30%, var(--yellow) 30% 50%, var(--cyan) 50% 70%, var(--indigo) 70%); }
.sidebar-brand { min-height: 82px; display: flex; align-items: center; justify-content: space-between; padding: 8px 7px 10px; }
.brand-link { display: block; text-decoration: none; }
.brand-link img { display: block; width: 215px; max-height: 72px; object-fit: contain; object-position: left center; }
.sidebar-close { display: none; width: 38px; height: 38px; border: 0; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: 28px; line-height: 1; cursor: pointer; }
.sidebar-context { display: flex; align-items: center; gap: 10px; margin: 2px 7px 16px; padding: 12px; border: 1px solid #e7edf4; border-radius: 14px; background: linear-gradient(135deg, #f8fbff, #fff); }
.context-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(22, 132, 91, .12); }
.sidebar-context strong, .sidebar-context small { display: block; }
.sidebar-context strong { font-size: 12.5px; }
.sidebar-context small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.sidebar-nav { display: grid; gap: 5px; }
.sidebar-nav a { position: relative; display: flex; align-items: center; gap: 11px; min-height: 46px; padding: 8px 11px; border-radius: 12px; color: #58627a; text-decoration: none; font-size: 14px; font-weight: 650; transition: background .18s ease, color .18s ease, transform .18s ease; }
.sidebar-nav a:hover { color: var(--indigo); background: var(--indigo-soft); transform: translateX(2px); }
.sidebar-nav a.active { color: #fff; background: linear-gradient(135deg, var(--red), #ff434a); box-shadow: 0 10px 24px rgba(237, 28, 36, .22); }
.sidebar-nav a.active::after { content: ""; position: absolute; right: -14px; width: 4px; height: 26px; border-radius: 8px 0 0 8px; background: var(--yellow); }
.nav-icon { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 9px; background: #f1f5fa; color: var(--indigo); font-size: 14px; font-weight: 900; }
.sidebar-nav a.active .nav-icon { background: rgba(255, 255, 255, .2); color: #fff; }
.sidebar-footer { margin-top: auto; padding-top: 16px; }
.sidebar-mascot { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 10px; border-radius: 14px; background: linear-gradient(135deg, var(--cyan-soft), #fff); border: 1px solid #d9f2fb; }
.sidebar-mascot img { width: 48px; height: 42px; object-fit: contain; }
.sidebar-mascot strong, .sidebar-mascot small { display: block; }
.sidebar-mascot strong { color: var(--indigo); font-size: 12px; }
.sidebar-mascot small { color: var(--muted); font-size: 10.5px; margin-top: 2px; line-height: 1.25; }
.logout { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #e7dfe1; border-radius: 11px; background: #fff; color: #8c4a4e; font-weight: 650; cursor: pointer; transition: .18s ease; }
.logout:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.sidebar-backdrop { display: none; position: fixed; inset: 0; z-index: 40; background: rgba(23, 30, 50, .55); backdrop-filter: blur(2px); }
.main-panel { grid-column: 2; min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 30px; background: rgba(255, 255, 255, .94); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 72px; height: 2px; background: var(--yellow); }
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-title strong, .topbar-title small { display: block; }
.topbar-title strong { font-size: 14px; }
.topbar-title small { color: var(--muted); font-size: 11px; margin-top: 1px; }
.menu-button { display: none; width: 42px; height: 42px; flex: 0 0 auto; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.menu-button span { display: block; width: 100%; height: 2px; margin: 4px 0; border-radius: 3px; background: var(--indigo); }
.user-pill { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.user-avatar { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--indigo), var(--blue)); color: #fff; font-size: 12px; font-weight: 800; }
.user-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #49536a; font-size: 13px; font-weight: 650; }
.content { width: 100%; max-width: 1520px; margin: 0 auto; padding: 28px 30px 44px; flex: 1; }
.app-footer { padding: 14px 30px 24px; color: #8b94a8; text-align: center; font-size: 11px; }

/* Tipografia e cabeçalhos */
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; color: #252d47; font-size: clamp(26px, 2.5vw, 35px); line-height: 1.15; letter-spacing: -.7px; }
h2 { margin: 0; color: #28304a; font-size: 19px; line-height: 1.3; }
h3 { margin: 0; }
p { color: var(--muted); }
.eyebrow { display: inline-block; margin-bottom: 5px; color: var(--red); font-size: 10px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase; }
.eyebrow.light { color: #fff5b6; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.page-header p { margin: 7px 0 0; font-size: 14px; }
.page-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 28px 0 14px; }
.section-heading h2 { font-size: 23px; }
.subtitle { margin: 6px 0 0; color: var(--muted); }

/* Botões */
.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border: 1px solid #d5dde7; border-radius: 11px; background: #fff; color: #4d5870; text-decoration: none; font-weight: 700; font-size: 13px; line-height: 1.1; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease; }
.btn:hover { transform: translateY(-1px); border-color: #bdc9d7; box-shadow: 0 7px 18px rgba(39, 52, 82, .08); }
.btn:active { transform: translateY(0); }
.btn.primary { border-color: var(--red); background: linear-gradient(135deg, var(--red), #ff4148); color: #fff; box-shadow: 0 9px 20px rgba(237, 28, 36, .2); }
.btn.primary:hover { border-color: var(--red-dark); background: linear-gradient(135deg, var(--red-dark), var(--red)); }
.btn.secondary { border-color: #cbd7f1; background: var(--indigo-soft); color: var(--indigo); }
.btn.light-primary { border-color: #fff; background: #fff; color: var(--red); box-shadow: 0 10px 24px rgba(57, 34, 57, .18); }
.btn.ghost-light { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .09); color: #fff; }
.btn.large { min-height: 50px; padding: 13px 20px; font-size: 14px; }
.btn.wide { width: 100%; }
.link-button { padding: 0; border: 0; background: none; color: var(--indigo); font-weight: 750; text-decoration: none; cursor: pointer; }
.link-button:hover, .table-link:hover { color: var(--red); text-decoration: underline; }
.table-link { color: var(--indigo); font-weight: 750; text-decoration: none; }

/* Formulários */
label { display: grid; gap: 7px; color: #5e687e; font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid #ced8e4; border-radius: 10px; outline: 0; background: #fff; color: var(--ink); font-size: 14px; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
input, select { min-height: 43px; }
textarea { resize: vertical; line-height: 1.45; }
input::placeholder, textarea::placeholder { color: #a6afbf; }
input:hover, select:hover, textarea:hover { border-color: #aebdce; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(97, 162, 216, .16); }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: auto; accent-color: var(--red); }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 15px; margin: 17px 0; }
.form-grid-2 { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
.form-grid-1 { grid-template-columns: 1fr; }
.full-field { grid-column: 1 / -1; }
.inline, .filters { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1 1 260px; }
.filters label { min-width: 170px; flex: 1 1 170px; }
.filter-card { margin-bottom: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.search-line { max-width: 780px; }
.child-add-line { margin-top: 18px; padding-top: 18px; border-top: 1px dashed #d7e1eb; }
.form-actions { display: flex; justify-content: flex-end; padding-top: 16px; }
.details-panel { margin: 14px 0 16px; border: 1px solid var(--line); border-radius: 12px; background: #f9fbfd; overflow: hidden; }
.details-panel summary { padding: 13px 15px; color: var(--indigo); font-size: 13px; font-weight: 750; cursor: pointer; }
.details-panel .form-grid { padding: 0 15px 15px; margin-bottom: 0; }

/* Cartões e etapas */
.step-card { position: relative; margin: 16px 0; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
.step-card::before { content: ""; position: absolute; top: 0; left: 0; width: 5px; height: 100%; background: var(--blue); }
.step-accent-red::before { background: var(--red); }
.step-accent-cyan::before { background: var(--cyan); }
.step-accent-yellow::before { background: var(--yellow); }
.step-accent-indigo::before { background: var(--indigo); }
.step-title { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.step-title > span { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 12px; background: var(--indigo-soft); color: var(--indigo); font-size: 15px; font-weight: 850; }
.step-accent-red .step-title > span { background: var(--red-soft); color: var(--red); }
.step-accent-cyan .step-title > span { background: var(--cyan-soft); color: #157caa; }
.step-accent-yellow .step-title > span { background: var(--yellow-soft); color: #a66c00; }
.step-title h2 { margin-top: 1px; }
.step-title p { margin: 4px 0 0; font-size: 12px; }
.chips { display: flex; gap: 9px; flex-wrap: wrap; }
.chip { display: flex; align-items: center; gap: 8px; padding: 10px 13px; border: 1px solid #d7e2ec; border-radius: 999px; background: #f8fbfd; color: #4d5870; cursor: pointer; transition: .16s ease; }
.chip:has(input:checked) { border-color: var(--cyan); background: var(--cyan-soft); color: #176f98; box-shadow: 0 0 0 3px rgba(73, 195, 241, .1); }
.chip input { margin: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(230px, 1fr)); gap: 12px; }
.choice-card { position: relative; min-height: 88px; display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid #d8e1eb; border-radius: 14px; background: #fff; cursor: pointer; transition: .16s ease; }
.choice-card:hover, .choice-card.selected { border-color: var(--yellow); background: var(--yellow-soft); box-shadow: 0 7px 20px rgba(165, 106, 0, .08); }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-radio { width: 22px; height: 22px; flex: 0 0 22px; border: 2px solid #bdc7d4; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 4px #fff; }
.choice-card.selected .choice-radio { border-color: var(--red); background: var(--red); }
.choice-card strong, .choice-card small { display: block; }
.choice-card strong { color: #343e55; font-size: 13px; }
.choice-card small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.authorized-fields { padding: 16px; border-radius: 13px; background: #fffbef; }
.confirmation-list { display: grid; gap: 10px; margin-top: 15px; }
.compact-list { grid-template-columns: repeat(3, minmax(200px, 1fr)); }
.checkbox-card { position: relative; display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 12px 14px; border: 1px solid #dce4ed; border-radius: 13px; background: #f9fbfd; cursor: pointer; }
.checkbox-card input { position: absolute; opacity: 0; pointer-events: none; }
.checkbox-card > span { width: 22px; height: 22px; flex: 0 0 22px; border: 2px solid #b9c5d2; border-radius: 7px; background: #fff; }
.checkbox-card:has(input:checked) { border-color: var(--indigo); background: var(--indigo-soft); }
.checkbox-card:has(input:checked) > span { border-color: var(--indigo); background: var(--indigo); }
.checkbox-card:has(input:checked) > span::after { content: "✓"; display: grid; place-items: center; height: 100%; color: #fff; font-size: 13px; }
.checkbox-card strong, .checkbox-card small { display: block; }
.checkbox-card strong { color: #39435a; font-size: 12px; }
.checkbox-card small { margin-top: 3px; color: var(--muted); font-size: 10.5px; line-height: 1.3; }

/* Dashboard */
.hero-panel { position: relative; min-height: 240px; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 30px 34px; border-radius: var(--radius-lg); background: linear-gradient(125deg, var(--indigo-dark), var(--indigo) 45%, #585fbc); color: #fff; box-shadow: 0 20px 50px rgba(70, 79, 161, .22); overflow: hidden; }
.hero-panel::before, .hero-panel::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.06); }
.hero-panel::before { width: 240px; height: 240px; right: 75px; top: -95px; }
.hero-panel::after { width: 150px; height: 150px; right: -35px; bottom: -65px; }
.hero-panel > div { position: relative; z-index: 2; max-width: 730px; }
.hero-panel h1 { color: #fff; font-size: clamp(25px, 3vw, 39px); }
.hero-panel p { max-width: 660px; margin: 11px 0 18px; color: rgba(255,255,255,.78); font-size: 14px; line-height: 1.5; }
.hero-panel > img { position: relative; z-index: 2; width: 190px; max-height: 175px; object-fit: contain; filter: drop-shadow(0 15px 22px rgba(20, 25, 67, .25)); transform: rotate(2deg); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 13px; margin: 18px 0; }
.kpi { min-height: 130px; display: flex; align-items: flex-start; gap: 12px; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.kpi-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 12px; font-weight: 900; }
.kpi span, .kpi strong, .kpi small { display: block; }
.kpi span { color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.25; }
.kpi strong { margin-top: 7px; color: #2e3850; font-size: 28px; line-height: 1; letter-spacing: -.5px; }
.kpi small { margin-top: 7px; color: #a0a8b7; font-size: 9.5px; }
.kpi .money-value { font-size: 21px; }
.kpi-cyan .kpi-icon { background: var(--cyan-soft); color: #1580ae; }
.kpi-blue .kpi-icon { background: var(--blue-soft); color: #3479b2; }
.kpi-yellow .kpi-icon { background: var(--yellow-soft); color: #a46a00; }
.kpi-indigo .kpi-icon { background: var(--indigo-soft); color: var(--indigo); }
.kpi-red .kpi-icon { background: var(--red-soft); color: var(--red); }
.action-grid { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 13px; }
.action-card { display: flex; align-items: center; gap: 12px; min-height: 96px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); text-decoration: none; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.action-card:hover { transform: translateY(-2px); border-color: #cbd8e5; box-shadow: var(--shadow-md); }
.action-card > div { flex: 1; min-width: 0; }
.action-card strong, .action-card small { display: block; }
.action-card strong { color: #354058; font-size: 13px; }
.action-card small { margin-top: 4px; color: var(--muted); font-size: 10.5px; line-height: 1.35; }
.action-card > b { color: #9ea7b7; }
.action-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 13px; font-weight: 900; }
.action-icon.red { background: var(--red-soft); color: var(--red); }
.action-icon.cyan { background: var(--cyan-soft); color: #137caa; }
.action-icon.yellow { background: var(--yellow-soft); color: #a16a00; }
.action-icon.indigo { background: var(--indigo-soft); color: var(--indigo); }

/* Listas de atendimento */
.attendance-summary { display: inline-flex; align-items: baseline; gap: 8px; margin-bottom: 12px; padding: 9px 13px; border-radius: 999px; background: var(--cyan-soft); color: #217da4; }
.attendance-summary strong { font-size: 19px; }
.attendance-summary span { font-size: 11px; font-weight: 650; }
.cards { display: grid; gap: 11px; }
.attendance-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.attendance-avatar { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(135deg, var(--cyan), var(--blue)); color: #fff; font-size: 16px; font-weight: 850; box-shadow: 0 8px 18px rgba(73, 195, 241, .25); }
.attendance-main { min-width: 0; }
.attendance-main > strong { display: block; color: #303a52; font-size: 14px; }
.attendance-number { display: inline-block; margin-top: 4px; color: var(--red); font-size: 10px; font-weight: 800; }
.attendance-meta { display: grid; grid-template-columns: 1.4fr .8fr .7fr 1.3fr; gap: 12px; margin-top: 10px; }
.attendance-meta span { min-width: 0; color: #5d687d; font-size: 11px; overflow-wrap: anywhere; }
.attendance-meta b { display: block; margin-bottom: 2px; color: #9aa3b2; font-size: 8.5px; letter-spacing: .5px; text-transform: uppercase; }

/* Detalhes */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); gap: 16px; }
.checkout-card { background: linear-gradient(180deg, #fff, #fbfcff); }
.detail-badge { display: inline-flex; margin-bottom: 15px; padding: 6px 10px; border-radius: 999px; background: var(--red-soft); color: var(--red); font-size: 11px; font-weight: 850; }
.detail-list { display: grid; gap: 0; margin: 14px 0 0; }
.detail-list > div { display: grid; grid-template-columns: 145px 1fr; gap: 15px; padding: 11px 0; border-bottom: 1px solid #edf1f5; }
.detail-list dt { color: #8b94a6; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.detail-list dd { margin: 0; color: #414b62; font-size: 12px; font-weight: 650; }
.big-money { display: block; margin-top: 7px; color: var(--red); font-size: clamp(35px, 5vw, 51px); line-height: 1; letter-spacing: -1.5px; }
.calculation-note { margin: 9px 0 17px; padding-bottom: 14px; border-bottom: 1px solid #edf1f5; font-size: 12px; }

/* Tabelas */
.table-wrap { width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 14px; border-bottom: 1px solid #edf1f5; text-align: left; vertical-align: middle; white-space: nowrap; font-size: 12px; }
th { position: sticky; top: 0; z-index: 1; background: #f7f9fc; color: #7b8599; font-size: 9px; font-weight: 850; letter-spacing: .65px; text-transform: uppercase; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #fbfdff; }
tbody tr:last-child td { border-bottom: 0; }
td[data-label="Crianças"], td[data-label="Responsáveis"], td[data-label="Observações"] { white-space: normal; min-width: 190px; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; background: #f0f2f5; color: #626d80; font-size: 9.5px; font-weight: 800; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.sincronizado { background: var(--success-soft); color: var(--success); }
.status.erro { background: var(--danger-soft); color: var(--danger); }
.status.pendente { background: var(--yellow-soft); color: var(--warning); }

/* Configurações */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.settings-grid .step-card { margin: 0; }
.settings-full { grid-column: 1 / -1; }
.settings-title { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.settings-title p { margin: 3px 0 0; font-size: 11px; }
.settings-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 12px; font-weight: 850; }
.settings-icon.red { background: var(--red-soft); color: var(--red); }
.settings-icon.cyan { background: var(--cyan-soft); color: #167ca8; }
.settings-icon.indigo { background: var(--indigo-soft); color: var(--indigo); }

/* Mensagens e estados */
.alert { margin: 12px 0; padding: 13px 15px; border: 1px solid transparent; border-radius: 12px; font-size: 12px; font-weight: 650; }
.alert.error { border-color: #f4c8cb; background: var(--danger-soft); color: var(--danger); }
.alert.success { border-color: #ccebdd; background: var(--success-soft); color: var(--success); }
.loading, .empty { padding: 34px; color: var(--muted); text-align: center; }
.empty.compact { padding: 16px; border-radius: 12px; background: #f8fbfd; font-size: 12px; }
.spinner { display: inline-block; width: 18px; height: 18px; margin-right: 7px; vertical-align: middle; border: 2px solid #d6e2ec; border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { min-height: 360px; display: grid; place-items: center; align-content: center; gap: 9px; padding: 28px; border: 1px dashed #cdd9e4; border-radius: var(--radius-lg); background: linear-gradient(180deg, #fff, #f9fcff); text-align: center; }
.empty-state img { width: 105px; max-height: 90px; object-fit: contain; opacity: .92; }
.empty-state h1, .empty-state h2 { margin: 0; }
.empty-state p { max-width: 420px; margin: 0 0 5px; font-size: 13px; }
.error-state { max-width: 760px; margin: 70px auto; }

/* Login */
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(410px, .85fr); background: #fff; }
.login-showcase { position: relative; min-height: 100vh; display: flex; align-items: center; padding: clamp(35px, 6vw, 85px); background: linear-gradient(135deg, var(--indigo-dark), var(--indigo) 52%, #5962be); color: #fff; overflow: hidden; }
.login-showcase::before { content: ""; position: absolute; width: 520px; height: 520px; right: -185px; top: -150px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 65px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.02); }
.login-showcase::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 7px; background: linear-gradient(90deg, var(--red) 0 30%, var(--yellow) 30% 50%, var(--cyan) 50% 72%, var(--blue) 72% 86%, var(--indigo) 86%); }
.login-showcase-content { position: relative; z-index: 2; width: min(690px, 100%); }
.login-logo-horizontal { width: min(390px, 75%); max-height: 150px; object-fit: contain; object-position: left; margin-bottom: 40px; filter: drop-shadow(0 12px 22px rgba(20, 22, 66, .22)); }
.login-copy h1 { max-width: 660px; color: #fff; font-size: clamp(31px, 4.4vw, 54px); line-height: 1.05; letter-spacing: -1.7px; }
.login-copy p { max-width: 610px; margin: 17px 0; color: rgba(255,255,255,.76); font-size: 15px; line-height: 1.55; }
.login-features { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 25px; }
.login-features span { padding: 8px 11px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.88); font-size: 10px; font-weight: 700; }
.login-planet { position: absolute; right: 4%; bottom: 3%; z-index: 1; width: clamp(130px, 20vw, 260px); opacity: .16; transform: rotate(-8deg); }
.login-form-side { display: grid; place-items: center; padding: 35px; background: linear-gradient(145deg, #fff, #f7fbff); }
.login-card { width: min(430px, 100%); padding: 32px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,255,255,.98); box-shadow: var(--shadow-md); }
.login-mobile-logo { display: none; width: 180px; max-height: 140px; margin: 0 auto 23px; object-fit: contain; }
.login-card h2 { font-size: 27px; letter-spacing: -.5px; }
.login-card > p { margin: 7px 0 20px; font-size: 13px; }
.login-form { display: grid; gap: 15px; }
.login-submit { margin-top: 4px; }
.login-support { display: block; margin-top: 17px; color: #9aa3b2; text-align: center; font-size: 10px; }

/* Recibo */
.receipt-page { min-height: 100vh; padding: 1px 12px 30px; background: #eef3f8; }
.receipt-actions { max-width: 540px; display: flex; justify-content: center; gap: 8px; margin: 17px auto; flex-wrap: wrap; }
.receipt { width: var(--paper); max-width: 100%; margin: 10px auto; padding: 5mm; border-radius: 3px; background: #fff; box-shadow: 0 15px 35px rgba(30, 39, 58, .15); color: #111; text-align: center; font-family: Arial, sans-serif; font-size: 12px; }
.receipt-logo { display: block; width: 66mm; max-width: 90%; max-height: 24mm; margin: 0 auto 2mm; object-fit: contain; }
.receipt h2 { margin: 2px 0; color: #111; font-size: 16px; }
.receipt hr { margin: 10px 0; border: 0; border-top: 1px dashed #111; }
.receipt-row { display: flex; justify-content: space-between; gap: 8px; text-align: left; }
.receipt .total { margin-top: 8px; font-size: 16px; }
.not-fiscal { margin-top: 4px; font-size: 10px; }
.pickup-code { margin-top: 12px; padding: 8px; border: 2px solid #000; font-size: 18px; font-weight: bold; letter-spacing: 1px; }
.receipt-brand { display: block; margin-top: 9px; font-size: 8px; }

@media print {
  @page { margin: 0; }
  body, .receipt-page { background: #fff; }
  .no-print { display: none !important; }
  .receipt { margin: 0 auto; padding: 2mm; box-shadow: none; }
  .receipt-logo { filter: grayscale(1); }
}

/* Responsividade */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, minmax(170px, 1fr)); }
  .action-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .compact-list { grid-template-columns: 1fr; }
  .attendance-meta { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
}

@media (max-width: 1024px) {
  .app-shell { display: block; }
  .main-panel { grid-column: 1; }
  .sidebar { left: calc(-1 * var(--sidebar-width) - 20px); transition: left .22s ease; box-shadow: 18px 0 45px rgba(20, 29, 51, .18); }
  .sidebar.open { left: 0; }
  .sidebar-close { display: grid; place-items: center; }
  .sidebar-backdrop.open { display: block; }
  .menu-button { display: block; }
  .content { padding: 24px 22px 40px; }
  .topbar { padding: 0 22px; }
  .hero-panel { min-height: 220px; }
  .hero-panel > img { width: 155px; }
  .form-grid { grid-template-columns: repeat(2, minmax(200px, 1fr)); }
  .detail-grid, .settings-grid { grid-template-columns: 1fr; }
  .settings-full { grid-column: auto; }
  .login-page { grid-template-columns: 1fr; }
  .login-showcase { display: none; }
  .login-form-side { min-height: 100vh; background: linear-gradient(150deg, var(--indigo-soft), #fff 46%, var(--cyan-soft)); }
  .login-mobile-logo { display: block; }
}

@media (max-width: 760px) {
  .topbar { height: 64px; padding: 0 14px; }
  .topbar-title small, .user-name { display: none; }
  .content { padding: 18px 14px 34px; }
  .app-footer { padding: 10px 14px 20px; }
  .page-header { align-items: stretch; flex-direction: column; margin-bottom: 17px; }
  .page-header .btn, .page-actions .btn { flex: 1; }
  .page-actions { width: 100%; }
  h1 { font-size: 27px; }
  .hero-panel { min-height: auto; padding: 24px 20px; }
  .hero-panel h1 { font-size: 28px; }
  .hero-panel > img { position: absolute; right: -22px; bottom: -25px; width: 135px; opacity: .2; }
  .hero-panel > div { max-width: 100%; }
  .hero-actions { position: relative; z-index: 3; flex-direction: column; align-items: stretch; max-width: 290px; }
  .kpis { grid-template-columns: repeat(2, minmax(135px, 1fr)); gap: 10px; }
  .kpi { min-height: 110px; padding: 13px; gap: 9px; }
  .kpi-icon { width: 32px; height: 32px; flex-basis: 32px; border-radius: 10px; }
  .kpi strong { font-size: 23px; }
  .kpi .money-value { font-size: 16px; }
  .kpi small { display: none; }
  .action-grid { grid-template-columns: 1fr; }
  .section-heading { margin-top: 23px; }
  .form-grid, .form-grid-2 { grid-template-columns: 1fr; gap: 12px; }
  .full-field { grid-column: auto; }
  .inline, .filters { align-items: stretch; flex-direction: column; }
  .inline > .btn, .filters > .btn, .filters > a.btn { width: 100%; }
  .filters label { width: 100%; min-width: 0; }
  .step-card { padding: 17px 15px 17px 19px; }
  .step-title { gap: 10px; }
  .choice-grid { grid-template-columns: 1fr; }
  .child-add-line { align-items: stretch; }
  .form-actions .btn { width: 100%; }
  .attendance-card { grid-template-columns: 42px minmax(0, 1fr); align-items: start; }
  .attendance-avatar { width: 42px; height: 42px; }
  .attendance-card > .btn { grid-column: 1 / -1; width: 100%; }
  .attendance-meta { grid-template-columns: 1fr 1fr; gap: 9px; }
  .detail-list > div { grid-template-columns: 1fr; gap: 4px; }
  .table-wrap { overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  table, thead, tbody, th, td, tr { display: block; width: 100%; }
  thead { display: none; }
  tbody { display: grid; gap: 11px; }
  tbody tr { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); }
  tbody tr:hover { background: #fff; }
  tbody td { min-width: 0 !important; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 8px 0; border-bottom: 1px solid #edf1f5; white-space: normal; text-align: right; overflow-wrap: anywhere; }
  tbody td:last-child { border-bottom: 0; }
  tbody td::before { content: attr(data-label); flex: 0 0 34%; color: #8a94a6; text-align: left; font-size: 9px; font-weight: 850; letter-spacing: .45px; text-transform: uppercase; }
  .login-form-side { padding: 18px; }
  .login-card { padding: 25px 20px; }
  .login-mobile-logo { width: 160px; }
}

@media (max-width: 480px) {
  :root { --sidebar-width: 286px; }
  .topbar-title strong { font-size: 12px; }
  .user-avatar { width: 30px; height: 30px; }
  .user-pill { padding: 4px; border: 0; background: transparent; }
  .hero-panel { border-radius: 18px; }
  .hero-panel p { font-size: 12px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi { display: block; min-height: 112px; }
  .kpi-icon { margin-bottom: 9px; }
  .section-heading h2 { font-size: 20px; }
  .attendance-meta { grid-template-columns: 1fr; }
  .receipt-actions .btn { flex: 1 1 130px; }
}

/* Ajustes do fluxo simplificado: CEP, cobrança automática e checkout */
.input-action {
    display: flex;
    align-items: stretch;
    gap: .5rem;
}

.input-action input {
    min-width: 0;
    flex: 1;
}

.btn.compact {
    min-height: 42px;
    padding: .55rem .8rem;
    white-space: nowrap;
}

.field-help {
    display: block;
    margin-top: .4rem;
    color: var(--muted, #64748b);
    line-height: 1.35;
}

.billing-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .8rem;
    margin-top: .5rem;
}

.billing-preview > div,
.billing-config-preview,
.automatic-charge-note {
    border: 1px solid rgba(70, 79, 161, .15);
    border-radius: 14px;
    background: rgba(73, 195, 241, .08);
    padding: 1rem;
}

.billing-preview span,
.billing-config-preview span,
.billing-config-preview small,
.automatic-charge-note span {
    display: block;
    color: var(--muted, #64748b);
    font-size: .86rem;
}

.billing-preview strong,
.billing-config-preview strong,
.automatic-charge-note strong {
    display: block;
    margin-top: .25rem;
    color: var(--estripulia-dark, #464fa1);
}

.billing-config-preview {
    margin-top: 1rem;
    background: rgba(253, 184, 49, .12);
    border-color: rgba(253, 184, 49, .35);
}

.billing-config-preview small {
    margin-top: .35rem;
}

.automatic-charge-note {
    margin: 1rem 0;
    background: rgba(73, 195, 241, .09);
}

.automatic-charge-note span {
    margin-top: .35rem;
}

.receipt-pending-value {
    margin: .65rem 0;
    padding: .55rem;
    border: 1px dashed #333;
    text-align: center;
    font-size: .85em;
    font-weight: 600;
}

@media (max-width: 760px) {
    .billing-preview {
        grid-template-columns: 1fr;
    }

    .input-action {
        align-items: center;
    }

    .input-action .btn.compact {
        min-height: 44px;
    }
}
