/* APROXIMEI — design system (CSS próprio, inspirado no fisiOS/G4 OS) */

/* ---------- Tokens ---------- */
:root {
    --app: #f5f6f8;
    --surface: #ffffff;
    --surface-2: #f1f3f6;
    --line: #e6e8ec;
    --fg: #15161a;
    --muted: #5b6472;
    --faint: #98a1b0;
    --accent: #1a73e8;
    --accent-fg: #ffffff;
    --active: #1a73e8;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
    --radius: 12px;
    --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04);
    --shadow-pop: 0 6px 20px rgba(16, 24, 40, 0.10);
}

.dark {
    --app: #0b0b0d;
    --surface: #151518;
    --surface-2: #1e1e22;
    --line: #2a2a30;
    --fg: #e7e7ea;
    --muted: #9aa0ac;
    --faint: #6b7180;
    --accent: #8ab4f8;
    --accent-fg: #10181a;
    --active: #8ab4f8;
    --danger: #f87171;
    --success: #4ade80;
    --warning: #fbbf24;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--app);
    color: var(--fg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 14px;
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
.tnum { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* Scrollbars */
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
    background: color-mix(in oklab, var(--fg) 18%, transparent);
    border-radius: 9999px; border: 3px solid transparent; background-clip: padding-box;
}

/* ---------- Layout shell ---------- */
.shell { display: flex; min-height: 100vh; }
.rail {
    position: fixed; inset: 0 auto 0 0; z-index: 30;
    display: flex; flex-direction: column;
    width: 240px; padding: 16px 12px;
    background: var(--surface); border-right: 1px solid var(--line);
    transition: width .2s ease;
}
.rail__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 0 4px; }
.rail__logo {
    display: inline-flex; align-items: center; justify-content: center;
    height: 36px; width: 36px; border-radius: 10px;
    background: var(--accent); color: #fff; font-weight: 700; font-size: 14px;
}
.rail__title { font-weight: 600; }
.rail__nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; padding: 8px 0; }
.rail__section { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); padding: 12px 12px 4px; }
.rail__item {
    position: relative; display: flex; align-items: center; gap: 12px;
    height: 40px; padding: 0 12px; border-radius: 10px;
    color: var(--faint); font-weight: 500; transition: background .15s, color .15s;
}
.rail__item:hover { background: var(--surface-2); color: var(--fg); }
.rail__item.is-active { background: var(--surface-2); color: var(--fg); }
.rail__item.is-active::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    height: 20px; width: 3px; border-radius: 9999px; background: var(--active);
}
.rail__item svg { flex-shrink: 0; }
.rail__foot { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }

.main { flex: 1; margin-left: 240px; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 32px; border-bottom: 1px solid var(--line);
    background: color-mix(in oklab, var(--surface) 85%, transparent); backdrop-filter: blur(8px);
}
.topbar h1 { font-size: 18px; }
.topbar__actions { display: flex; align-items: center; gap: 8px; }
.content { padding: 24px 32px; }

@media (max-width: 820px) {
    .rail { width: 64px; padding: 16px 8px; align-items: center; }
    .rail__title, .rail__item span, .rail__section, .rail__brand .rail__title { display: none; }
    .rail__item { justify-content: center; padding: 0; width: 40px; }
    .main { margin-left: 64px; }
    .content, .topbar { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Components ---------- */
.card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow-card);
}
.card__body { padding: 20px; }
.card__head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card__title { font-size: 15px; font-weight: 600; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.stat { display: flex; flex-direction: column; gap: 6px; }
.stat__label { font-size: 12px; color: var(--muted); }
.stat__value { font-size: 26px; font-weight: 700; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
    font-weight: 600; font-size: 14px; cursor: pointer; transition: filter .15s, background .15s, border-color .15s;
    background: var(--accent); color: var(--accent-fg);
}
.btn:hover { filter: brightness(1.05); }
.btn--ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn--block { width: 100%; }
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 38px; width: 38px; border-radius: 10px; border: 1px solid var(--line);
    background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--fg); }

.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 9999px; font-size: 12px; font-weight: 600;
    background: var(--surface-2); color: var(--muted);
}
.badge--pro { background: color-mix(in oklab, var(--active) 18%, transparent); color: var(--active); }
.badge--success { background: color-mix(in oklab, var(--success) 15%, transparent); color: var(--success); }
.badge--danger { background: color-mix(in oklab, var(--danger) 15%, transparent); color: var(--danger); }
.badge--warning { background: color-mix(in oklab, var(--warning) 15%, transparent); color: var(--warning); }
.badge--info { background: color-mix(in oklab, var(--accent) 15%, transparent); color: var(--accent); }
.badge--sm { padding: 2px 7px; font-size: 10.5px; }

/* Lista de definições (chave/valor) usada no detalhe do pedido */
.deflist { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.deflist dt { color: var(--muted); font-weight: 500; }
.deflist dd { margin: 0; color: var(--fg); }
.table--tight th, .table--tight td { padding: 8px 0; }
.box { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--surface-2); }
.rule { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
.text-md { font-size: 16px; }

/* Pedidos do cliente */
.ordlist { display: flex; flex-direction: column; gap: 14px; }
.ordcard__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ordcard__badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.ordcard__ship { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 14px 0 12px; font-size: 13.5px; color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ordcard__ship .mono { color: var(--fg); }
.ordcard__addr { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.ordcard__addr .muted { display: inline-flex; align-items: center; gap: 6px; }

/* Indicador de autosave do editor */
.savestate { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; transition: background .15s, color .15s; }
.savestate i { display: none; }
.savestate.is-saved { background: color-mix(in oklab, var(--success) 14%, transparent); color: var(--success); }
.savestate.is-saved i { display: inline-flex; }
.savestate.is-saving, .savestate.is-dirty { background: var(--surface-2); color: var(--muted); }
.savestate.is-error { background: color-mix(in oklab, var(--danger) 14%, transparent); color: var(--danger); }

/* Editor: bloco "Ajustes avançados" (progressive disclosure) */
.adv { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.adv__sum { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; list-style: none; user-select: none; }
.adv__sum::-webkit-details-marker { display: none; }
.adv__sum::before { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
.adv[open] .adv__sum::before { transform: rotate(45deg); }
.adv__body { margin-top: 16px; }
@media (max-width: 560px) { .ordcard__top { flex-direction: column; } .ordcard__badges { justify-content: flex-start; } }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 500; color: var(--muted); }
.input, .select, .textarea {
    width: 100%; height: 40px; padding: 0 12px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-size: 14px;
    font-family: inherit;
}
.textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid color-mix(in oklab, var(--accent) 45%, transparent); outline-offset: -1px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--fg); cursor: pointer; }
.help { font-size: 12px; color: var(--faint); }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 700px) { .form-row { grid-template-columns: 1fr; } }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); font-weight: 600; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-2); }

/* Alerts / flash */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; border: 1px solid; }
.alert--success { color: var(--success); border-color: color-mix(in oklab, var(--success) 35%, transparent); background: color-mix(in oklab, var(--success) 10%, transparent); }
.alert--error { color: var(--danger); border-color: color-mix(in oklab, var(--danger) 35%, transparent); background: color-mix(in oklab, var(--danger) 10%, transparent); }
.alert--info { color: var(--muted); border-color: var(--line); background: var(--surface-2); }

.empty { text-align: center; color: var(--faint); padding: 40px 20px; }

/* Disclosure (recolher/expandir) */
.disc { border-top: 1px solid var(--line); }
.disc > summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
    padding: 14px 20px; font-weight: 600; font-size: 14px; color: var(--accent);
}
.disc > summary::-webkit-details-marker { display: none; }
.disc > summary .plus { transition: transform .15s; }
.disc[open] > summary .plus { transform: rotate(45deg); }
.disc__body { padding: 0 20px 20px; }

/* Grade de dados (definição) */
.dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.dl > div { background: var(--surface); padding: 12px 14px; }
.dl .k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 600; }
.dl .v { font-weight: 700; margin-top: 3px; }
@media (max-width: 640px) { .dl { grid-template-columns: repeat(2, 1fr); } }

/* Combobox com busca */
.combo { position: relative; }
.combo__menu {
    position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px);
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
    box-shadow: var(--shadow-pop); max-height: 260px; overflow-y: auto; padding: 4px;
}
.combo__menu[hidden] { display: none; }
.combo__opt {
    display: block; width: 100%; text-align: left; border: none; background: transparent;
    padding: 9px 12px; border-radius: 8px; font: inherit; color: var(--fg); cursor: pointer;
}
.combo__opt:hover, .combo__opt.is-active { background: var(--surface-2); }
.combo__opt small { color: var(--muted); }
.combo__opt[hidden] { display: none; }
.combo__empty { padding: 10px 12px; color: var(--faint); font-size: 13px; }

/* Modal de confirmação */
.modal-overlay {
    position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
    padding: 20px; background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(2px);
    opacity: 0; visibility: hidden; transition: opacity .15s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
    background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
    box-shadow: var(--shadow-pop); width: 100%; max-width: 400px; padding: 24px;
    transform: translateY(8px) scale(.98); transition: transform .15s;
}
.modal-overlay.open .modal { transform: none; }
.modal__title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.modal__msg { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Utilities */
.row { display: flex; align-items: center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.text-sm { font-size: 13px; } .text-lg { font-size: 18px; } .text-xl { font-size: 22px; }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }

/* ---------- Minisite público — premium (link-in-bio) ---------- */
.ms {
    --ms-accent: #0d9488;
    --ms-fg: #f8fafc;
    position: relative; min-height: 100vh; color: var(--ms-fg);
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}
.ms__bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.ms__bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ms__mask { position: fixed; inset: 0; z-index: 1; pointer-events: none;
    backdrop-filter: saturate(1.1); }
.ms__scroll { position: relative; z-index: 2; min-height: 100vh; display: flex; justify-content: center; }
.ms__wrap { width: 100%; max-width: 540px; padding: 0 18px 56px; }

.ms__cover { height: 168px; margin: 0 -18px; border-radius: 0 0 28px 28px; background-size: cover; background-position: center; }
.ms__head { text-align: center; margin-top: 20px; }
.ms__head--cover { margin-top: -56px; }
.ms__avatar {
    width: 108px; height: 108px; border-radius: 28px; object-fit: cover; margin: 0 auto;
    background: linear-gradient(140deg, color-mix(in srgb, var(--ms-accent) 90%, #fff), var(--ms-accent));
    display: flex; align-items: center; justify-content: center; font-size: 42px; font-weight: 800; color: #fff;
    box-shadow: 0 12px 40px rgba(0,0,0,.35); border: 3px solid rgba(255,255,255,.25);
}
.ms__title { font-size: 24px; font-weight: 800; margin-top: 14px; letter-spacing: -.01em; text-shadow: 0 2px 16px rgba(0,0,0,.28); }
.ms__headline { font-weight: 600; opacity: .92; margin-top: 4px; }
.ms__bio { color: color-mix(in srgb, var(--ms-fg) 78%, transparent); font-size: 14px; margin-top: 8px; line-height: 1.55; }

.ms__blocks { display: flex; flex-direction: column; gap: 13px; margin-top: 28px; }

/* Glass base compartilhada por botões e cartões */
.ms__glass {
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 10px 34px rgba(0,0,0,.22);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}

/* Botão */
.ms__btn {
    display: flex; align-items: center; gap: 14px; width: 100%;
    padding: 17px 18px; border-radius: 18px; color: var(--ms-fg);
    font-weight: 700; font-size: 15px; transition: transform .14s ease, box-shadow .14s ease, background .14s;
}
.ms__btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0,0,0,.30); }
.ms__btn i { width: 21px; height: 21px; flex-shrink: 0; }
.ms__btn .chev { margin-left: auto; opacity: .55; }
.ms__btn--accent { background: var(--ms-accent); border: 1px solid transparent; color: #fff;
    box-shadow: 0 12px 34px color-mix(in srgb, var(--ms-accent) 45%, transparent); }
.ms__btn--accent:hover { filter: brightness(1.05); }
.ms__btn--solid { background: color-mix(in srgb, var(--ms-accent) 88%, #000); border: 1px solid transparent; color: #fff; }
.ms__btn--outline { background: transparent; border: 1.5px solid rgba(255,255,255,.35); }

/* Cartão de prévia */
.ms__card { border-radius: 20px; padding: 16px 18px; color: var(--ms-fg); display: block; transition: transform .14s ease, box-shadow .14s ease; }
.ms__card:hover { transform: translateY(-2px); box-shadow: 0 18px 44px rgba(0,0,0,.32); }
.ms__card__top { display: flex; align-items: center; gap: 12px; }
.ms__card__ic { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--ms-accent) 24%, transparent); color: #fff; flex-shrink: 0; }
.ms__card__ic i { width: 20px; height: 20px; }
.ms__card__t { font-weight: 700; font-size: 15px; }
.ms__card__s { font-size: 12.5px; opacity: .74; margin-top: 1px; }
.ms__card__body { margin-top: 12px; }
.ms__stars { color: #fbbf24; letter-spacing: 2px; font-size: 17px; }

/* Conteúdo completo (full) inline */
.ms__full { border-radius: 20px; padding: 18px; color: var(--ms-fg); }
.ms__full__title { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; margin-bottom: 12px; }
.ms__full__title i { width: 19px; height: 19px; color: var(--ms-accent); }
.ms-menu-cat { margin-top: 14px; }
.ms-menu-cat > h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; opacity: .7; margin-bottom: 8px; }
.ms-menu-item { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed rgba(255,255,255,.14); }
.ms-menu-item:last-child { border-bottom: none; }
.ms-menu-item .price { font-weight: 800; color: var(--ms-accent); white-space: nowrap; }
.ms-pix { text-align: center; }
.ms-pix .qrwrap { background: #fff; border-radius: 16px; padding: 14px; display: inline-block; }
.ms-pix .qrwrap svg { width: 180px; height: 180px; display: block; }
.ms-pix .code { word-break: break-all; font-size: 11px; background: rgba(0,0,0,.25); border-radius: 10px; padding: 10px; margin: 12px 0; font-family: ui-monospace, monospace; }
.ms-copy { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; background: var(--ms-accent); color: #fff; font-weight: 700; cursor: pointer; border: none; }
.ms__embed { border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.16); }
.ms__embed iframe { width: 100%; height: 220px; border: 0; display: block; }

.ms__foot { text-align: center; margin-top: 34px; font-size: 12px; opacity: .6; }
.ms__foot a { color: var(--ms-accent); font-weight: 700; }

/* Páginas dedicadas de PIX/cardápio (mantidas) */
.pix-box { background: #fff; color: #0f172a; border-radius: 16px; padding: 22px; text-align: center; }
.pix-box svg { width: 220px; height: 220px; }
.pix-code { word-break: break-all; font-size: 12px; background: #f1f5f9; border-radius: 10px; padding: 12px; margin: 14px 0; font-family: ui-monospace, monospace; }
.menu-cat { margin-top: 24px; }
.menu-cat h3 { font-size: 16px; border-bottom: 1px solid rgba(255,255,255,.12); padding-bottom: 8px; margin-bottom: 12px; }
.menu-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed rgba(255,255,255,.08); }
.menu-item .price { font-weight: 700; color: var(--ms-accent); white-space: nowrap; }

/* ---------- Editor de minisite (painel) ---------- */
.ed { display: grid; grid-template-columns: 1.35fr .95fr; gap: 22px; align-items: start; }
@media (max-width: 1000px) { .ed { grid-template-columns: 1fr; } }
.ed__tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.ed__tab { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.ed__tab.is-active { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
.ed__panel { display: none; }
.ed__panel.is-active { display: block; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg label { padding: 7px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--muted); background: var(--surface); }
.seg label:not(:last-child) { border-right: 1px solid var(--line); }
.seg input { display: none; }
.seg input:checked + span { color: var(--accent-fg); }
.seg label:has(input:checked) { background: var(--accent); color: var(--accent-fg); }

.block-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin-bottom: 10px; box-shadow: var(--shadow-card); }
.block-row.is-off { opacity: .5; }
.block-row__grip { cursor: grab; color: var(--faint); touch-action: none; }
.block-row__type { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 11px; background: color-mix(in oklab, var(--accent) 12%, transparent); color: var(--accent); }
.block-row__info { flex: 1; min-width: 0; }
.block-row__info .t { font-weight: 700; }
.block-row__info .s { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block-row__mode { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 9999px; background: var(--surface-2); color: var(--muted); }
.block-row__actions { display: flex; gap: 6px; }
.block-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.block-picker button { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 15px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; color: var(--fg); font-size: 12px; font-weight: 600; transition: border-color .12s, transform .12s; }
.block-picker button:hover { border-color: var(--accent); transform: translateY(-2px); }
.block-picker button i { color: var(--accent); }

.ms-preview { border: 1px solid var(--line); border-radius: 22px; overflow: hidden; position: sticky; top: 88px; box-shadow: var(--shadow-pop); background: #0f172a; }
.ms-preview__bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.ms-preview__dots { display: flex; gap: 5px; }
.ms-preview__dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.ms-preview iframe { width: 100%; height: 680px; border: 0; display: block; background: #0f172a; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; }
.swatch.is-active { border-color: var(--fg); }

/* Galeria de templates (seleção estilo Linktree) */
.tgal { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.tgal__card { position: relative; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); cursor: pointer; padding: 0; width: 100%; text-align: left; color: var(--fg); transition: transform .12s, border-color .12s, box-shadow .12s; }
.tgal__card:hover { transform: translateY(-2px); border-color: color-mix(in oklab, var(--accent) 50%, var(--line)); }
.tgal__card.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent); }
.tgal__thumb { height: 84px; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 0 22px; }
.tgal__thumb i { height: 13px; border-radius: 5px; display: block; }
.tgal__meta { padding: 8px 10px; }
.tgal__meta .n { font-weight: 700; font-size: 13px; }
.tgal__meta .s { font-size: 11px; color: var(--muted); text-transform: capitalize; }
.tgal__check { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: none; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.tgal__card.is-active .tgal__check { display: inline-flex; }
.tgal__card.is-active .tgal__meta .s::after { content: ' · em uso'; color: var(--accent); font-weight: 700; }

/* ---------- Minisite estilo CLEAN (claro, cartões brancos — vibe iFood) ---------- */
.ms--clean { --ms-muted: color-mix(in srgb, var(--ms-fg) 55%, #ffffff); }
.ms--clean .ms__glass {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,.07);
    box-shadow: 0 3px 14px rgba(0,0,0,.05);
    backdrop-filter: none; -webkit-backdrop-filter: none;
}
.ms--clean .ms__btn { color: var(--ms-fg); font-weight: 600; }
.ms--clean .ms__btn:hover { box-shadow: 0 10px 26px rgba(0,0,0,.10); }
.ms--clean .ms__btn--accent { color: #fff; box-shadow: 0 8px 22px color-mix(in srgb, var(--ms-accent) 30%, transparent); }
.ms--clean .ms__btn--outline { border: 1.5px solid rgba(0,0,0,.14); background: #fff; }
.ms--clean .ms__btn .chev { opacity: .35; }
.ms--clean .ms__title { text-shadow: none; }
.ms--clean .ms__headline { opacity: .85; }
.ms--clean .ms__bio, .ms--clean .ms__card__s { color: var(--ms-muted); }
.ms--clean .ms__avatar { border-color: #fff; box-shadow: 0 8px 26px rgba(0,0,0,.12); }
.ms--clean .ms__card__ic { background: color-mix(in srgb, var(--ms-accent) 14%, #fff); color: var(--ms-accent); }
.ms--clean .ms__full__title i { color: var(--ms-accent); }
.ms--clean .ms__foot { opacity: .5; }
.ms--clean .ms-menu-cat > h4 { color: var(--ms-muted); opacity: 1; }

/* Linhas simples (Wi-Fi rede/senha, serviços do agendamento) no clean */
.ms--clean .ms__full .ms-menu-item { border-bottom: 1px solid rgba(0,0,0,.07); }
.ms--clean .ms__full .ms-menu-item .price { color: #16a34a; font-weight: 800; }
/* Itens com foto (cardápio/catálogo) — cartão com miniatura real à esquerda */
.ms__full .ms-cat-item { padding: 12px 2px; }
.ms--clean .ms__full .ms-cat-item .price { color: #16a34a; }
.ms--clean .ms-pix .code { background: #f1f5f9; color: #0f172a; }

/* Cabeçalho clean: menos sombra no topo, cover mais discreta */
.ms--clean .ms__cover { border-radius: 0 0 22px 22px; }

/* Ações abaixo do avatar (Adicionar contato · Ligar) — pílulas compactas */
.ms__actions { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; }
.ms__act {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 13.5px; font-weight: 700; color: var(--ms-btn, var(--ms-accent));
    padding: 8px 16px; border-radius: 9999px;
    background: color-mix(in srgb, var(--ms-btn, var(--ms-accent)) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--ms-btn, var(--ms-accent)) 32%, transparent);
    transition: background .12s ease, transform .12s ease;
}
.ms__act:hover { background: color-mix(in srgb, var(--ms-btn, var(--ms-accent)) 20%, transparent); transform: translateY(-1px); }
.ms__act i { width: 16px; height: 16px; }
.ms__actsep { opacity: .3; }

/* Lista rolável dentro de blocos "Completo" (cardápio/agendamento) */
.ms__scrolllist { max-height: 340px; overflow-y: auto; overscroll-behavior: contain; margin: 2px -2px; padding: 0 6px; }
.ms__scrolllist::-webkit-scrollbar { width: 6px; }
.ms__scrolllist::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--ms-fg) 25%, transparent); border-radius: 9999px; }
.ms--clean .ms__scrolllist::-webkit-scrollbar-thumb { background: rgba(0,0,0,.18); }

/* Slideshow (carrossel de imagens) */
.ms-slide { border-radius: 16px; overflow: hidden; }
.ms-slide__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
.ms-slide__track::-webkit-scrollbar { display: none; }
.ms-slide__track img { width: 100%; flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 16/10; object-fit: cover; display: block; }

/* YouTube (thumbnail de prévia) */
.ms-yt { position: relative; border-radius: 12px; aspect-ratio: 16/9; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; }
.ms-yt__play { width: 52px; height: 52px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; }
.ms-yt__play i { width: 26px; height: 26px; }

/* Catálogo (estilo WhatsApp) */
.ms-cat-thumb { width: 54px; height: 54px; border-radius: 10px; background: rgba(127,127,127,.18) center/cover no-repeat; flex-shrink: 0; }
.ms-cat-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.ms--clean .ms-cat-item { border-bottom-color: rgba(0,0,0,.07); }
.ms-cat-item:last-child { border-bottom: none; }
.ms-cat-item__img { width: 66px; height: 66px; border-radius: 12px; background: rgba(127,127,127,.18) center/cover no-repeat; flex-shrink: 0; }
.ms-cat-item__info { flex: 1; min-width: 0; }
.ms-cat-item .price { color: var(--ms-accent); font-weight: 800; margin-top: 2px; }
.ms--clean .ms-cat-item .price { color: #16a34a; }

/* Catálogo público (grade estilo WhatsApp) */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.cat-prod { background: #fff; color: #1c1c1e; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.cat-prod__img { aspect-ratio: 1; background: #eee center/cover no-repeat; }
.cat-prod__b { padding: 10px 12px; }
.cat-prod__b .n { font-weight: 700; font-size: 14px; }
.cat-prod__b .p { color: #16a34a; font-weight: 800; margin-top: 3px; }
.cat-prod__b .d { color: #6b7280; font-size: 12px; margin-top: 2px; }

/* ---------- Cardápio público estilo iFood ---------- */
.ifm { background: #fff; color: #3f3f46; min-height: 100vh; font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; }
.ifm__wrap { max-width: 900px; margin: 0 auto; padding: 16px 16px 64px; }
.ifm__top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; position: sticky; top: 0; background: #fff; padding: 8px 0; z-index: 5; }
.ifm__back { width: 40px; height: 40px; border-radius: 50%; background: #f2f2f2; display: inline-flex; align-items: center; justify-content: center; color: #3f3f46; flex-shrink: 0; }
.ifm__search { flex: 1; display: flex; align-items: center; gap: 10px; background: #f2f2f2; border-radius: 12px; padding: 11px 14px; color: #9aa0ac; }
.ifm__search i { width: 18px; height: 18px; }
.ifm__search input { border: none; background: transparent; outline: none; flex: 1; font-size: 15px; color: #3f3f46; }
.ifm__hero { text-align: center; padding: 6px 0 2px; }
.ifm__hero .t { font-size: 20px; font-weight: 800; color: #1f2937; }
.ifm__cat { margin-top: 26px; }
.ifm__cat > h3 { font-size: 20px; font-weight: 800; color: #1f2937; margin-bottom: 14px; }
.ifm__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 640px) { .ifm__grid { grid-template-columns: repeat(2, 1fr); } }
.ifm__card__img { aspect-ratio: 1; border-radius: 14px; background: #eee center/cover no-repeat; }
.ifm__card__p { font-size: 17px; font-weight: 700; color: #1f2937; margin-top: 8px; }
.ifm__card__n { font-size: 14px; color: #3f3f46; margin-top: 2px; }
.ifm__row { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid #eee; }
.ifm__cat .ifm__row:first-of-type { border-top: none; }
.ifm__row__info { flex: 1; min-width: 0; }
.ifm__row__n { font-weight: 700; font-size: 15px; color: #1f2937; }
.ifm__row__d { color: #6b7280; font-size: 13px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ifm__row__p { font-weight: 700; font-size: 15px; color: #1f2937; margin-top: 8px; }
.ifm__row__img { width: 96px; height: 96px; border-radius: 12px; background: #eee center/cover no-repeat; flex-shrink: 0; }
.ifm__empty { text-align: center; color: #9aa0ac; padding: 40px 0; }
.ifm-hide { display: none !important; }

/* iFood: preço "de" riscado + % desconto */
.ifm .old { color: #9aa0ac; text-decoration: line-through; font-weight: 600; font-size: 13px; }
.ifm .disc { background: #eafaf0; color: #16a34a; font-weight: 800; font-size: 12px; padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.ifm__promo { margin-top: 2px; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.ifm__card { cursor: pointer; }
.ifm__row { cursor: pointer; }
.ifm__row__p { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* iFood: modal de detalhes do produto */
.ifm-modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.45); display: none; align-items: flex-end; justify-content: center; }
.ifm-modal.open { display: flex; }
.ifm-modal__box { background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; position: relative; animation: ifmUp .2s ease; }
@keyframes ifmUp { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (min-width: 600px) { .ifm-modal { align-items: center; } .ifm-modal__box { border-radius: 20px; } }
.ifm-modal__x { position: absolute; top: 12px; left: 12px; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; }
.ifm-modal__img { aspect-ratio: 16/10; background: #eee center/cover no-repeat; }
.ifm-modal__body { padding: 20px; }
.ifm-modal__body h2 { font-size: 22px; font-weight: 800; color: #1f2937; }
.ifm-modal__d { color: #6b7280; font-size: 14px; margin-top: 8px; line-height: 1.5; }
.ifm-modal__price { margin-top: 16px; font-size: 20px; font-weight: 800; color: #1f2937; display: flex; align-items: center; gap: 10px; }

/* Header padrão das telas extras do minisite (voltar + barra) */
.ms__hdr { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; }
.ms__hdr__back { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--ms-fg); background: rgba(255,255,255,.16); }
.ms--clean .ms__hdr__back { background: rgba(0,0,0,.06); }
.ms__hdr__back i { width: 20px; height: 20px; }
.ms__hdr__bar { flex: 1; display: flex; align-items: center; gap: 10px; border-radius: 12px; padding: 11px 14px; font-size: 15px; font-weight: 600; background: rgba(255,255,255,.12); color: color-mix(in srgb, var(--ms-fg) 78%, transparent); }
.ms--clean .ms__hdr__bar { background: rgba(0,0,0,.05); }
.ms__hdr__bar i { width: 18px; height: 18px; }
.ms__hdr__bar input { border: none; background: transparent; outline: none; flex: 1; color: var(--ms-fg); font-size: 15px; }
.ms__hdr__bar input::placeholder { color: color-mix(in srgb, var(--ms-fg) 55%, transparent); }

/* Barra de ícones no topo (redes/mapa/whatsapp em formato de ícone) */
.ms__iconbar { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin: 18px 0 4px; }
.ms__iconbtn { width: 54px; height: 54px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--ms-btn, var(--ms-accent)); box-shadow: 0 8px 20px color-mix(in srgb, var(--ms-btn, var(--ms-accent)) 34%, transparent); transition: transform .12s ease; }
.ms__iconbtn:hover { transform: translateY(-2px); }
.ms__iconbtn i { width: 23px; height: 23px; }
/* Estilo contorno: ícones e pílulas vazados (sem preenchimento pesado) */
.ms--icons-outline .ms__iconbtn { background: transparent; color: var(--ms-btn, var(--ms-accent)); border: 1.5px solid color-mix(in srgb, var(--ms-btn, var(--ms-accent)) 45%, transparent); box-shadow: none; }
.ms--icons-outline .ms__iconbtn:hover { background: color-mix(in srgb, var(--ms-btn, var(--ms-accent)) 10%, transparent); }
.ms--icons-outline .ms__act { background: transparent; }

/* Bloco com capa: banner de imagem no lugar do botão */
.ms__banner { display: block; border-radius: 18px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.22); transition: transform .14s ease; }
.ms__banner:hover { transform: translateY(-2px); }
.ms__banner img { width: 100%; display: block; }

/* ---------- Customização extra do minisite (cantos/avatar/alinhamento/animação/sombra) ---------- */
.ms__btn, .ms__iconbtn, .ms__act, .ms__hdr__back { border-radius: var(--ms-radius, 16px); }
.ms__card, .ms__full, .ms__banner { border-radius: var(--ms-card-radius, 18px); }
.ms__avatar { border-radius: var(--ms-avatar-radius, 28px); }

/* Alinhamento do cabeçalho */
.ms--align-left .ms__head { text-align: left; }
.ms--align-left .ms__avatar { margin-left: 0; margin-right: auto; }
.ms--align-left .ms__actions, .ms--align-left .ms__iconbar { justify-content: flex-start; }

/* Sombra dos botões/cartões */
.ms--shadow-none .ms__btn, .ms--shadow-none .ms__card, .ms--shadow-none .ms__banner, .ms--shadow-none .ms__iconbtn { box-shadow: none; }
.ms--shadow-strong .ms__btn, .ms--shadow-strong .ms__card, .ms--shadow-strong .ms__iconbtn { box-shadow: 0 16px 36px rgba(0,0,0,.34); }

/* Animação de entrada dos blocos */
@keyframes msFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes msUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.ms--anim-fade .ms__blocks > * { animation: msFade .5s ease both; }
.ms--anim-up .ms__blocks > * { animation: msUp .45s ease both; }
.ms--anim-fade .ms__blocks > *:nth-child(2), .ms--anim-up .ms__blocks > *:nth-child(2) { animation-delay: .06s; }
.ms--anim-fade .ms__blocks > *:nth-child(3), .ms--anim-up .ms__blocks > *:nth-child(3) { animation-delay: .12s; }
.ms--anim-fade .ms__blocks > *:nth-child(4), .ms--anim-up .ms__blocks > *:nth-child(4) { animation-delay: .18s; }
.ms--anim-fade .ms__blocks > *:nth-child(n+5), .ms--anim-up .ms__blocks > *:nth-child(n+5) { animation-delay: .24s; }

/* ---------- Uploader PRO (auto-aprimora input[type=file]) ---------- */
.uploader { position: relative; display: flex; align-items: center; gap: 11px; width: 100%;
    padding: 10px 12px; border: 1.5px dashed var(--line); border-radius: 12px;
    background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s; }
.uploader:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface-2)); }
.uploader.is-drag { border-color: var(--accent); border-style: solid;
    background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); }
.uploader input[type=file] { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.uploader__ic { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px;
    flex-shrink: 0; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--accent); }
.uploader__ic svg { width: 20px; height: 20px; }
.uploader__thumb { display: none; width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px;
    object-fit: cover; border: 1px solid var(--line); background: var(--surface); }
.uploader__tx { min-width: 0; line-height: 1.3; }
.uploader__t1 { font-weight: 600; font-size: .85rem; color: var(--fg);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uploader__t2 { font-size: .72rem; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uploader__clear { position: relative; z-index: 2; margin-left: auto; flex-shrink: 0;
    display: none; align-items: center; justify-content: center; width: 26px; height: 26px;
    border: none; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.uploader__clear:hover { background: var(--surface); color: var(--danger); }
.uploader__clear svg { width: 15px; height: 15px; }
.uploader.has-thumb .uploader__ic { display: none; }
.uploader.has-thumb .uploader__thumb { display: block; }
.uploader.has-file .uploader__clear { display: flex; }
.uploader.has-file .uploader__t1 { color: var(--accent); }

/* Campos de endereço preenchidos pelo CEP (travados) */
.input.is-locked { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.input.is-loading { opacity: .6; }
