/* Condo Reservas — interface */
:root {
	--brand: #4f46e5;
	--brand-2: #7c3aed;
	--ink: #0f172a;
	--ink-2: #334155;
	--muted: #64748b;
	--line: #e2e8f0;
	--bg: #f4f6fb;
	--card: #ffffff;
	--free: #16a34a;
	--free-bg: #ecfdf3;
	--taken: #dc2626;
	--taken-bg: #fef2f2;
	--mine: #2563eb;
	--mine-bg: #eff6ff;
	--lottery: #b45309;
	--lottery-bg: #fff7e6;
	--blocked-bg: #f1f5f9;
	--radius: 16px;
	--shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
	--safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.condo-body {
	font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	background: var(--bg);
	color: var(--ink);
	-webkit-font-smoothing: antialiased;
	font-size: 15px;
	line-height: 1.5;
	min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.boot-loader { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 34px; height: 34px; border: 3px solid rgba(79,70,229,.2); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
.btn .spinner { width: 16px; height: 16px; border-width: 2px; border-color: rgba(255,255,255,.4); border-top-color: #fff; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Botões e formulários ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 700; cursor: pointer;
	background: var(--brand); color: #fff; text-decoration: none; min-height: 46px;
	transition: transform .08s ease, box-shadow .2s ease, background .2s, opacity .2s;
	box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--brand) 70%, transparent);
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; filter: grayscale(.3); }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink-2); box-shadow: none; border: 1px solid var(--line); }
.btn.ghost:hover { background: #f8fafc; }
.btn.danger { background: var(--taken); box-shadow: none; }
.btn.success { background: var(--free); }
.btn.soft { background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand); box-shadow: none; }
.btn.sm { min-height: 36px; padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.icon { padding: 0; width: 40px; min-height: 40px; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.input, .field input, .field select, .field textarea {
	width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: 12px;
	padding: 12px 14px; font-size: 16px; outline: none; transition: border .15s, box-shadow .15s;
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
	border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent);
}
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; padding: 8px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; user-select: none; }
.check input { width: 22px; height: 22px; accent-color: var(--brand); flex: 0 0 auto; margin: 0; }
.check.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, #fff); }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 14px; display: block; line-height: 1.5; }
.alert.error { background: var(--taken-bg); color: #991b1b; }
.alert.info { background: var(--mine-bg); color: #1e40af; }
.alert.warn { background: var(--lottery-bg); color: #92400e; }
.alert.ok { background: var(--free-bg); color: #166534; }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero {
	position: relative; overflow: hidden; color: #fff; padding: 48px;
	background: radial-gradient(1200px 600px at -10% -10%, #a78bfa 0%, transparent 60%),
		radial-gradient(900px 500px at 110% 110%, #22d3ee 0%, transparent 55%),
		linear-gradient(135deg, var(--brand), var(--brand-2));
	display: flex; flex-direction: column; justify-content: space-between;
}
.auth-hero .brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; }
.brand-mark { width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.18); display: grid; place-items: center; backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.3); }
.auth-hero h1 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.1; margin: 0 0 16px; letter-spacing: -.02em; max-width: 520px; }
.auth-hero p { font-size: 17px; opacity: .9; max-width: 460px; margin: 0; }
.hero-cal { margin-top: 36px; display: grid; grid-template-columns: repeat(7, 38px); gap: 6px; opacity: .95; }
.hero-cal i { height: 38px; border-radius: 10px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); }
.hero-cal i.r { background: rgba(255,255,255,.04); }
.hero-cal i.s { background: #fbbf24; border-color: #fbbf24; }
.hero-cal i.m { background: #fff; }
.auth-hero .foot { font-size: 13px; opacity: .75; }
.bubble { position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); }
.auth-side { display: grid; place-items: center; padding: 32px 20px; background: var(--bg); }
.auth-card { width: 100%; max-width: 410px; }
.auth-card h2 { font-size: 28px; margin: 0 0 6px; letter-spacing: -.02em; }
.auth-card .sub { color: var(--muted); margin: 0 0 26px; }
.auth-card .links { display: flex; justify-content: space-between; margin-top: 16px; font-size: 14px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; cursor: pointer; }
.remember { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); margin: 4px 0 18px; }
.remember input { width: 18px; height: 18px; accent-color: var(--brand); }
.pw-meter { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 8px; }
.pw-meter b { display: block; height: 100%; width: 0; transition: width .25s, background .25s; }
.req-list { list-style: none; padding: 0; margin: 4px 0 16px; font-size: 13px; color: var(--muted); }
.req-list li::before { content: "○ "; }
.req-list li.ok { color: var(--free); }
.req-list li.ok::before { content: "✓ "; }

@media (max-width: 900px) {
	.auth { grid-template-columns: 1fr; }
	.auth-hero { padding: 28px 22px 34px; min-height: auto; }
	.auth-hero h1 { font-size: 28px; margin-top: 26px; }
	.auth-hero p { font-size: 15px; }
	.hero-cal, .auth-hero .foot { display: none; }
	.auth-side { place-items: start center; padding: 0 16px 32px; }
	.auth-card { background: #fff; border-radius: 22px; padding: 26px 20px; margin-top: -18px; box-shadow: var(--shadow); position: relative; }
}

/* ---------- Estrutura do app ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.88); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1120px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 14px; }
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; min-width: 0; }
.topbar .brand-mark { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border: 0; width: 38px; height: 38px; border-radius: 12px; flex: 0 0 auto; }
.topbar .brand small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.topbar .brand > div { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tab { background: none; border: 0; padding: 9px 14px; border-radius: 10px; font-weight: 600; color: var(--muted); cursor: pointer; display: flex; gap: 8px; align-items: center; }
.tab:hover { background: #f1f5f9; color: var(--ink); }
.tab.active { background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand); }
.user-btn { display: flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px 4px 4px; cursor: pointer; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #f59e0b, #ec4899); color: #fff; font-weight: 800; font-size: 13px; flex: 0 0 auto; }
.user-btn .nm { font-weight: 600; font-size: 14px; max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-wrap { position: relative; flex: 0 0 auto; }
.menu { position: absolute; right: 0; top: calc(100% + 10px); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); min-width: 240px; padding: 6px; z-index: 30; }
.menu .who { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 13px; color: var(--muted); }
.menu .who b { display: block; color: var(--ink); font-size: 14px; }
.menu button, .menu a { display: flex; gap: 10px; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 10px; cursor: pointer; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.menu button:hover, .menu a:hover { background: #f1f5f9; }
.main { max-width: 1120px; margin: 0 auto; padding: 24px 20px 40px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(226,232,240,.7); }
.card.pad { padding: 20px; }
.bottom-nav { display: none; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; }
.icon.sm { width: 16px; height: 16px; }

/* ---------- Calendário ---------- */
.cal-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cal-head h2 { margin: 0; font-size: 20px; text-transform: capitalize; }
.cal-nav { display: flex; gap: 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; padding: 14px 16px 18px; }
.cal-dow { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 4px 0; }
.day {
	position: relative; aspect-ratio: 1 / .92; border-radius: 14px; border: 1.5px solid transparent;
	background: #fff; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between;
	align-items: flex-start; padding: 8px 9px; text-align: left; transition: transform .1s, box-shadow .15s, border-color .15s;
	min-width: 0;
}
.day .n { font-weight: 800; font-size: 16px; }
.day .t { font-size: 11px; font-weight: 600; line-height: 1.15; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day.empty { background: transparent; cursor: default; }
.day.free { background: var(--free-bg); border-color: #bbf7d0; color: #14532d; }
.day.free:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -8px rgba(22,163,74,.5); border-color: var(--free); }
.day.reserved { background: var(--taken-bg); border-color: #fecaca; color: #991b1b; }
.day.reserved .n { text-decoration: line-through; text-decoration-thickness: 2px; opacity: .8; }
.day.mine { background: var(--mine); border-color: var(--mine); color: #fff; }
.day.lottery { background: var(--lottery-bg); border-color: #fcd34d; color: #92400e; }
.day.lottery.joined { background: #fde68a; border-color: #f59e0b; }
.day.lottery:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -8px rgba(245,158,11,.6); }
.day.blocked { background: var(--blocked-bg); border-color: #cbd5e1; color: #475569; background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(100,116,139,.09) 6px 12px); }
.day.past, .day.unavailable { background: #fafbfc; color: #b6c0cd; }
.day.past { cursor: default; }
.day.today { box-shadow: inset 0 0 0 2px var(--ink); }
.day .dot { position: absolute; top: 8px; right: 8px; font-size: 13px; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.legend li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.legend i { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid; flex: 0 0 auto; }
.lg-free { background: var(--free-bg); border-color: #86efac !important; }
.lg-res { background: var(--taken-bg); border-color: #fca5a5 !important; }
.lg-mine { background: var(--mine); border-color: var(--mine) !important; }
.lg-lot { background: var(--lottery-bg); border-color: #fcd34d !important; }
.lg-blk { background: var(--blocked-bg); border-color: #cbd5e1 !important; }
.lg-off { background: #fafbfc; border-color: var(--line) !important; }
.side-stack { display: grid; gap: 16px; }
.side-stack h3 { margin: 0 0 12px; font-size: 15px; }
.price-tag { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Listas ---------- */
.list { display: grid; gap: 12px; }
.item { display: flex; align-items: center; gap: 14px; padding: 16px; }
.date-badge { width: 58px; flex: 0 0 auto; text-align: center; border-radius: 14px; padding: 8px 0; background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand); }
.date-badge b { display: block; font-size: 22px; line-height: 1; }
.date-badge span { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.item .info { flex: 1; min-width: 0; }
.item .info b { display: block; }
.item .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #f1f5f9; color: var(--ink-2); white-space: nowrap; }
.pill.green { background: var(--free-bg); color: #166534; }
.pill.red { background: var(--taken-bg); color: #991b1b; }
.pill.amber { background: var(--lottery-bg); color: #92400e; }
.pill.blue { background: var(--mine-bg); color: #1e40af; }
.pill.violet { background: #f3e8ff; color: #6b21a8; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state .big { font-size: 42px; margin-bottom: 6px; }
.section-title { font-size: 16px; margin: 26px 0 12px; }

/* ---------- Gestão ---------- */
.subtabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtab { white-space: nowrap; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.subtab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { padding: 16px 18px; }
.stat b { display: block; font-size: 26px; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 13px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { flex: 1; min-width: 200px; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .act { white-space: nowrap; text-align: right; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.settings-grid .card h3 { margin: 0 0 14px; font-size: 16px; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(3px); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fade .18s ease; }
.modal { background: #fff; border-radius: 22px; width: 100%; max-width: 520px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 30px 60px -20px rgba(15,23,42,.45); animation: pop .22s cubic-bezier(.2,.9,.3,1.2); }
.modal.wide { max-width: 720px; }
.modal-head { padding: 22px 24px 10px; display: flex; gap: 14px; align-items: flex-start; }
.modal-head h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.modal-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; flex: 0 0 auto; background: color-mix(in srgb, var(--brand) 12%, #fff); }
.modal-close { margin-left: auto; background: #f1f5f9; border: 0; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 18px; color: var(--muted); flex: 0 0 auto; }
.modal-body { padding: 8px 24px 8px; overflow-y: auto; }
.modal-foot { padding: 16px 24px 22px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid #f1f5f9; margin-top: 8px; }
.summary { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 16px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; font-size: 14px; }
.summary div + div { border-top: 1px solid var(--line); }
.summary span { color: var(--muted); }
.summary b { text-align: right; }
.rules { background: #f8fafc; border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.rules h4 { margin: 0 0 8px; font-size: 14px; }
.rules ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); }
.rules li { margin-bottom: 5px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* ---------- Toast ---------- */
#condo-toast-root { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); animation: pop .2s ease; }
.toast.error { background: #b91c1c; }
.toast.ok { background: #15803d; }

/* ---------- Sorteio ---------- */
.draw-stage { text-align: center; padding: 10px 0 6px; }
.draw-screen { margin: 10px auto 16px; max-width: 420px; border-radius: 18px; padding: 26px 16px; background: linear-gradient(135deg, #1e1b4b, #4c1d95); color: #fff; min-height: 120px; display: grid; place-items: center; position: relative; overflow: hidden; }
.draw-name { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.draw-unit { font-size: 14px; opacity: .8; margin-top: 4px; }
.draw-screen.rolling .draw-name { animation: blink .09s linear infinite; }
.draw-screen.done { background: linear-gradient(135deg, #15803d, #22c55e); }
@keyframes blink { 50% { opacity: .55; } }
.confetti { position: absolute; width: 8px; height: 14px; top: -20px; animation: fall 1.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(220px) rotate(540deg); opacity: 0; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #f1f5f9; }
.chip.win { background: var(--free); color: #fff; font-weight: 700; }

/* ---------- Suporte ---------- */
.support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.support-card { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.support-card .ic { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; }
.support-card h3 { margin: 0; }
.faq details { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin: 8px 0 0; color: var(--ink-2); }
.fab-support { position: fixed; right: 20px; bottom: 24px; z-index: 15; width: 56px; height: 56px; border-radius: 50%; background: #22c55e; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px -6px rgba(34,197,94,.7); border: 0; cursor: pointer; }

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
	.cal-wrap { grid-template-columns: 1fr; }
	.settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
	body.condo-body { font-size: 14.5px; }
	.tabs { display: none; }
	.user-wrap { margin-left: auto; }
	.menu { min-width: 230px; max-width: calc(100vw - 32px); }
	.user-btn .nm { display: none; }
	.topbar-in { padding: 10px 16px; }
	.main { padding: 18px 12px calc(96px + var(--safe-b)); }
	.page-head h1 { font-size: 22px; }
	.bottom-nav {
		display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
		background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
		padding: 6px 6px calc(6px + var(--safe-b));
	}
	.bottom-nav button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--muted); padding: 6px 2px; border-radius: 12px; cursor: pointer; }
	.bottom-nav button.active { color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, #fff); }
	.cal-grid { gap: 4px; padding: 10px 8px 14px; }
	.cal-head { padding: 12px 12px; }
	.cal-head h2 { font-size: 17px; }
	.day { border-radius: 10px; padding: 5px 4px; aspect-ratio: 1 / 1.08; align-items: center; justify-content: center; gap: 2px; }
	.day .n { font-size: 15px; }
	.day .t { display: none; }
	.day .dot { position: static; font-size: 10px; line-height: 1; }
	.cal-dow { font-size: 10.5px; }
	.legend { grid-template-columns: 1fr 1fr; }
	.grid-2 { grid-template-columns: 1fr; }
	.item { flex-wrap: wrap; }
	.item .actions { width: 100%; justify-content: stretch; }
	.item .actions .btn { flex: 1; }
	.modal-back { place-items: end center; padding: 0; }
	.modal { max-width: none; border-radius: 22px 22px 0 0; max-height: 92vh; animation: sheet .26s cubic-bezier(.2,.9,.3,1); }
	.modal-foot { padding-bottom: calc(18px + var(--safe-b)); }
	.modal-foot .btn { flex: 1; }
	.fab-support { bottom: calc(84px + var(--safe-b)); right: 14px; width: 50px; height: 50px; }
	.tbl.responsive thead { display: none; }
	.tbl.responsive tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line); }
	.tbl.responsive td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
	.tbl.responsive td::before { content: attr(data-l); color: var(--muted); font-size: 12px; text-align: left; }
	.tbl.responsive td.act { justify-content: flex-end; padding-top: 10px; flex-wrap: wrap; }
	.tbl.responsive td.act::before { display: none; }
	#condo-toast-root { bottom: calc(90px + var(--safe-b)); }
}
@keyframes sheet { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print {
	.topbar, .bottom-nav, .fab-support, .modal-foot, .modal-close, #condo-app { display: none !important; }
	.modal-back { position: static; background: none; display: block; }
	.modal { box-shadow: none; max-height: none; }
}

/* ---------- Caixas de aviso (confirmação, data especial) ---------- */
.notice-card { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border-radius: 16px; margin-bottom: 16px; border: 1px solid transparent; }
.notice-card.ok { background: linear-gradient(135deg, #ecfdf3, #f0fdf4); border-color: #bbf7d0; color: #14532d; }
.notice-card.warn { background: linear-gradient(135deg, #fff7e6, #fffbeb); border-color: #fde68a; color: #78350f; }
.notice-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; }
.notice-card.ok .notice-ic { background: var(--free); box-shadow: 0 6px 14px -6px rgba(22,163,74,.7); }
.notice-card.warn .notice-ic { background: #f59e0b; box-shadow: 0 6px 14px -6px rgba(245,158,11,.7); }
.notice-tx { flex: 1; min-width: 0; font-size: 14px; line-height: 1.5; }
.notice-tx > b { display: block; font-size: 15px; margin: 2px 0 6px; }
.notice-tx p { margin: 0; }
.notice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.notice-list li { display: flex; gap: 8px; align-items: flex-start; }
.notice-list li .icon { margin-top: 2px; color: var(--free); }
.notice-list li span { min-width: 0; overflow-wrap: anywhere; }
.steps { background: #f8fafc; border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; font-size: 13.5px; color: var(--ink-2); }
.steps b { display: block; margin-bottom: 6px; color: var(--ink); font-size: 14px; }
.steps ol { margin: 0; padding-left: 20px; }
.steps li { margin-bottom: 4px; }

/* ---------- Texto formatado das regras ---------- */
.rich { font-size: 14px; line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere; }
.rich > :first-child { margin-top: 0; }
.rich > :last-child { margin-bottom: 0; }
.rich p { margin: 0 0 10px; }
.rich h3, .rich h4 { margin: 14px 0 6px; font-size: 15px; color: var(--ink); }
.rich ul, .rich ol { margin: 0 0 10px; padding-left: 22px; }
.rich li { margin-bottom: 6px; }
.rich li::marker { color: var(--brand); }
.rich mark { padding: 0 2px; border-radius: 3px; }
.rules .rich { font-size: 13.5px; }

/* ---------- Editor ---------- */
.rte { border: 1.5px solid var(--line); border-radius: 14px; background: #fff; overflow: visible; }
.rte:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: #f8fafc; border-radius: 14px 14px 0 0; position: sticky; top: 62px; z-index: 5; }
.rt-btn { min-width: 34px; height: 34px; border: 0; background: none; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--ink-2); display: inline-grid; place-items: center; padding: 0 6px; }
.rt-btn:hover { background: #e2e8f0; }
.rt-btn.on { background: color-mix(in srgb, var(--brand) 14%, #fff); color: var(--brand); }
.rt-sep { width: 1px; background: var(--line); margin: 6px 4px; }
.rt-a { font-weight: 800; border-bottom: 3px solid #dc2626; line-height: 1; padding: 0 2px; }
.rt-hl { background: #fef08a; padding: 0 3px; border-radius: 3px; font-weight: 700; }
.rt-pop { position: relative; }
.rt-menu { display: none; position: absolute; top: 40px; left: 0; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; grid-template-columns: repeat(5, 28px); gap: 6px; }
.rt-menu.open { display: grid; }
.rt-sw { width: 28px; height: 28px; border-radius: 8px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.rt-sw.none { background: #fff; color: var(--muted); font-size: 12px; }
.rt-custom { width: 28px; height: 28px; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; cursor: pointer; position: relative; overflow: hidden; font-weight: 700; color: var(--muted); background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); color: #fff; text-shadow: 0 0 2px #000; }
.rt-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.rte-area { min-height: 260px; max-height: 520px; overflow-y: auto; padding: 14px 16px; outline: none; }
@media (max-width: 760px) {
	.rte-bar { top: 58px; }
	.notice-card { padding: 14px; gap: 12px; }
	.notice-ic { width: 38px; height: 38px; }
}
#rules-title { scroll-margin-top: 84px; }

/* ---------- Espaços ---------- */
.space-picker { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 14px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.space-picker::-webkit-scrollbar { display: none; }
.space-opt { --sp: var(--brand); display: flex; align-items: center; gap: 10px; flex: 0 0 auto; scroll-snap-align: start; text-align: left; padding: 10px 16px 10px 10px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .1s; }
.space-opt:hover { border-color: color-mix(in srgb, var(--sp) 50%, #fff); }
.space-opt.active { border-color: var(--sp); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sp) 18%, transparent); }
.so-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; background: color-mix(in srgb, var(--sp) 14%, #fff); flex: 0 0 auto; }
.so-tx b { display: block; font-size: 14px; white-space: nowrap; }
.so-tx small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.space-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.space-tag i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: 0 0 auto; }
.cal-sub { margin-top: 2px; }
.space-card { --sp: var(--brand); border-top: 4px solid var(--sp); }
.space-facts { list-style: none; margin: 10px 0 14px; padding: 0; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.space-row { --sp: var(--brand); border-left: 4px solid var(--sp); }
.space-row.off { opacity: .6; }
.sp-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: color-mix(in srgb, var(--sp) 14%, #fff); flex: 0 0 auto; }
.dot-c { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 6px; }
.subtab .dot-c { vertical-align: 1px; }

/* ---------- FAQ ---------- */
.faq-a { margin-top: 8px; }
.faq-row { align-items: flex-start; }
.faq-n { width: 32px; height: 32px; border-radius: 10px; background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand); font-weight: 800; display: grid; place-items: center; flex: 0 0 auto; }
.faq-prev { margin-top: 4px; max-height: 66px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.faq-prev p, .faq-prev ul, .faq-prev ol { margin: 0; }
.version-foot { text-align: center; color: var(--muted); font-size: 12px; margin: 30px 0 0; }
.modal .rte-bar { top: -8px; }
.modal .rte-area { max-height: 320px; }
@media (max-width: 760px) {
	.space-opt { padding: 8px 12px 8px 8px; }
	.so-ic { width: 34px; height: 34px; font-size: 17px; }
	.cal-head { align-items: flex-start; }
}
.btn.icon { flex: 0 0 auto; width: 38px; min-width: 38px; padding: 0; }
.btn.sm.icon { width: 36px; min-width: 36px; min-height: 36px; }
@media (max-width: 760px) { .item .actions .btn.icon { flex: 0 0 auto; } }

/* ---------- Aviso de fim de sessão ---------- */
.session-bar { position: fixed; left: 50%; top: 74px; transform: translateX(-50%); z-index: 150; width: min(94vw, 560px); display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; border-radius: 14px; background: #fffbeb; border: 1px solid #fde68a; color: #78350f; box-shadow: var(--shadow); font-size: 14px; animation: pop .2s ease; }
.session-bar span { flex: 1; }
.menu-note { padding: 8px 12px 4px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 760px) { .session-bar { top: 66px; flex-wrap: wrap; } .session-bar .btn { width: 100%; } }
