/* Componentes do CMS (admin) · iOS limpo */
.switch { position: relative; display: inline-block; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: rgba(120, 100, 80, .32); transition: background .25s var(--ease); }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.25); transition: transform .25s var(--ease); }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch.sm { width: 42px; height: 26px; }
.switch.sm i::after { width: 22px; height: 22px; }
.switch.sm input:checked + i::after { transform: translateX(16px); }

/* lista agrupada (inset grouped) */
.lg { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.lg + .lg-title, .lg + .lg { margin-top: 18px; }
.lg-title { font-size: 13px; font-weight: 600; color: var(--ink-3); margin: 0 4px 8px; }
.lr { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 16px; border-bottom: .5px solid var(--sep); min-height: 52px; }
.lr:last-child { border-bottom: 0; }
.lr .tx { min-width: 0; }
.lr .tx b { display: block; font-weight: 500; font-size: 15px; letter-spacing: -0.01em; }
.lr .tx small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 1px; }
.lr .val { color: var(--ink-3); font-size: 15px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.lr .input, .lr .select { width: 180px; padding: 8px 12px; text-align: right; }
.lr .input.sm { width: 90px; }
.lr.stack { flex-direction: column; align-items: stretch; gap: 8px; }
.lr.stack .input, .lr.stack .select, .lr.stack .textarea { width: 100%; text-align: left; }
.lg-foot { font-size: 12.5px; color: var(--ink-3); margin: 8px 4px 0; line-height: 1.4; }
.stepper-num { display: inline-flex; align-items: center; border-radius: 9px; background: var(--fill); overflow: hidden; }
.stepper-num button { width: 36px; height: 30px; border: 0; background: transparent; font-size: 18px; cursor: pointer; color: var(--ink); }
.stepper-num span { min-width: 40px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* avatar / pessoas */
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ambar); color: var(--cafe); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.avatar.c2 { background: var(--urucum); color: #fff; } .avatar.c3 { background: var(--castanha); color: #fff; } .avatar.c4 { background: var(--cafe); color: var(--ambar); } .avatar.c5 { background: var(--areia); color: var(--cafe); }

/* tabela admin */
.tbl-wrap { overflow-x: auto; }
.table.admin td, .table.admin th { white-space: nowrap; }
.table.admin td.wrap-t { white-space: normal; min-width: 220px; }
.table .rc { width: 20px; height: 20px; accent-color: var(--urucum); }
.table .act { text-align: right; }
.icon-btn { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--fill); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: var(--fill-2); }
.icon-btn svg { width: 16px; height: 16px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }
.pager .pg { display: inline-flex; gap: 4px; }
.pager .pg a { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; color: var(--ink-2); }
.pager .pg a.on { background: var(--cafe); color: var(--papel); }
.actionbar { position: sticky; bottom: 76px; z-index: 30; margin: 14px auto 0; width: fit-content; max-width: 100%; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 8px 8px 18px; border-radius: 999px; background: rgba(30, 20, 12, .88); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.28); font-size: 14px; font-weight: 600; }
.actionbar .btn { background: rgba(255,255,255,.14); color: #fff; padding: 8px 14px; font-size: 13px; }
.actionbar .btn:hover { background: rgba(255,255,255,.24); }
.actionbar .btn.danger { background: var(--urucum); }

/* layout com painel lateral (sheet) */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.split.wide-r { grid-template-columns: minmax(0, 1fr) 440px; }
.split.l-list { grid-template-columns: 340px minmax(0, 1fr); }
.sheet { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-md); padding: 20px; position: sticky; top: 16px; }
.sheet .sh-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sheet .sh-head h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; }
.sheet .sh-head small { color: var(--ink-3); font-size: 13px; }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 12px; font-size: 14px; margin: 0; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.sheet .section-t { font-size: 13px; font-weight: 600; color: var(--ink-3); margin: 18px 0 8px; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* lista mestre */
.mlist { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.mlist .mi { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: .5px solid var(--sep); cursor: pointer; }
.mlist .mi:last-child { border-bottom: 0; }
.mlist .mi:hover { background: rgba(120,85,50,.045); }
.mlist .mi.on { background: var(--ambar-bg); }
.mlist .mi .tx { flex: 1; min-width: 0; }
.mlist .mi b { display: block; font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mlist .mi small { color: var(--ink-3); font-size: 12.5px; }
.search-row { position: relative; margin-bottom: 12px; }
.search-row .input { padding-left: 38px; }
.search-row svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink-3); }

/* timeline vertical */
.vt { display: flex; flex-direction: column; }
.vt li { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 12px; padding-bottom: 14px; position: relative; }
.vt li::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--sep); }
.vt li:last-child::before { display: none; }
.vt li i { width: 24px; height: 24px; border-radius: 50%; background: var(--ok); color: #fff; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; font-weight: 700; }
.vt li.now i { background: var(--ambar); color: var(--cafe); }
.vt li.todo i { background: var(--fill-2); color: var(--ink-3); }
.vt li b { display: block; font-size: 14px; font-weight: 600; } .vt li small { color: var(--ink-3); font-size: 12.5px; }

.preview-card { background: var(--bf-0); color: var(--bf-text); border-radius: var(--r-lg); padding: 22px; }
.preview-card h4 { font-family: var(--font-display); font-weight: 800; font-size: 34px; letter-spacing: -0.045em; line-height: .96; }
.preview-card h4 span { color: var(--ambar); }
.preview-card p { color: var(--bf-muted); font-size: 13px; margin-top: 10px; }
.preview-card .pill { display: inline-block; margin-top: 14px; background: var(--ambar); color: var(--cafe); font-weight: 600; font-size: 13px; padding: 8px 16px; border-radius: 999px; }
.dropzone { border: 1.5px dashed var(--sep-strong); border-radius: 14px; padding: 18px; text-align: center; color: var(--ink-3); font-size: 13px; background: var(--papel-2); }
.chipset { display: flex; flex-wrap: wrap; gap: 6px; }
.note-inline { font-size: 12.5px; color: var(--ink-3); }
.grid-admin-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; align-items: start; }
.stack-18 { display: flex; flex-direction: column; gap: 18px; }
.seg-tabs { margin-bottom: 18px; }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 24px; background: var(--papel); }
.login-card { width: min(400px, 100%); background: #fff; border-radius: 28px; padding: 32px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 16px; }
.tabs-line { display: flex; gap: 22px; border-bottom: .5px solid var(--sep-strong); margin: 0 0 16px; }
.tabs-line a { padding: 10px 0; font-size: 14.5px; font-weight: 500; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -.5px; }
.tabs-line a.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--urucum); }
@media (max-width: 1366px) { .split, .split.wide-r, .split.l-list { grid-template-columns: 1fr; } .sheet { position: static; } .grid-admin-2 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; } .lr .input, .lr .select { width: 130px; } .actionbar { bottom: 70px; border-radius: 22px; } }

/* evita que grids estiquem além da tela e deixa tabelas rolarem dentro do contêiner */
.split > *, .grid-admin-2 > *, .main > * { min-width: 0; }
.table-wrap { overflow-x: auto; }
