/* =========================================================================
   Painel administrativo + Área do cliente
   Usa as mesmas variáveis de cor do site (geradas em Aparência).
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.panel {
    margin: 0; font-family: var(--font-body, 'Plus Jakarta Sans', system-ui, sans-serif); font-size: 15px; line-height: 1.55;
    color: var(--text); background: #f5f3f9; -webkit-font-smoothing: antialiased;
}
body.panel-admin { font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; }
a { color: var(--primary); }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .4em; letter-spacing: -0.015em; }
p { margin: 0 0 .8em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--primary-ring); outline-offset: 2px; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.danger { color: #c62f38 !important; }
.success { color: #138a4b !important; }
.block { display: block; }
.small { font-size: .85rem; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- estrutura */
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: 268px; z-index: 300; display: flex; flex-direction: column;
    background: var(--secondary); color: var(--on-secondary); overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 22px 22px 18px; text-decoration: none; color: inherit; }
.sb-mark { width: 40px; height: 40px; border-radius: 11px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; flex-shrink: 0; }
.sidebar-brand strong { display: block; font-size: .98rem; line-height: 1.2; }
.sidebar-brand small { opacity: .65; font-size: .78rem; }
.sb-logo .logo-img { max-height: 40px; max-width: 200px; }
.sb-logo .wordmark { display: inline-flex; align-items: center; gap: 10px; }
.sb-logo .wordmark-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 800; }
.sb-logo .wordmark-text { font-weight: 800; font-size: 1.05rem; }
.sidebar-nav { padding: 4px 12px 24px; flex: 1; }
.sidebar-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sb-label { font-size: .72rem; font-weight: 700; opacity: .5; margin: 18px 12px 6px; letter-spacing: .04em; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: inherit;
    text-decoration: none; font-weight: 600; font-size: .92rem; opacity: .82;
}
.sidebar-nav a .bi { font-size: 1.05rem; width: 20px; text-align: center; }
.sidebar-nav a span { flex: 1; }
.sidebar-nav a:hover { background: rgba(255,255,255,.08); opacity: 1; }
.sidebar-nav a.is-active { background: var(--primary); color: var(--on-primary); opacity: 1; }
.sb-badge { font-style: normal; background: var(--accent); color: var(--on-accent); font-size: .72rem; font-weight: 800; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; }
.sb-company { margin: 0 14px 6px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.07); display: flex; gap: 10px; align-items: center; }
.sb-company strong { display: block; font-size: .88rem; line-height: 1.25; }
.sb-company small { opacity: .7; font-size: .76rem; }
.sb-help { margin: 0 14px 18px; padding: 16px; border-radius: 14px; background: rgba(255,255,255,.07); font-size: .86rem; }
.sb-help p { margin-bottom: 10px; }
.sb-help strong { display: block; }
.sb-phone { display: block; margin-top: 10px; color: inherit; opacity: .85; text-decoration: none; text-align: center; font-weight: 600; }
.sidebar-backdrop { display: none; }

.main { margin-left: 268px; min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    position: sticky; top: 0; z-index: 200; display: flex; align-items: center; gap: 14px; height: 66px; padding: 0 28px;
    background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.topbar-title { font-size: 1.18rem; font-weight: 800; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.sidebar-toggle { display: none; }
.content { padding: 26px 28px 60px; max-width: 1400px; width: 100%; }

.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 5px 10px 5px 5px; border-radius: 999px; font-weight: 600; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--primary-tint); }
.user-menu summary .bi { font-size: .7rem; }
.user-menu-list { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border-radius: 14px; box-shadow: 0 20px 50px -18px rgba(30,10,70,.35), 0 0 0 1px var(--line); padding: 8px; min-width: 240px; }
.user-menu-list p { padding: 8px 10px 10px; margin: 0 0 6px; border-bottom: 1px solid var(--line); }
.user-menu-list p strong { display: block; }
.user-menu-list p small { color: var(--muted); }
.user-menu-list a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 9px; color: var(--text); text-decoration: none; font-weight: 600; }
.user-menu-list a:hover { background: var(--primary-tint); }

/* ---------------------------------------------------------------- botões */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 18px; border-radius: 10px;
    border: 1.5px solid transparent; font-weight: 700; font-size: .9rem; line-height: 1.2; text-decoration: none; cursor: pointer;
    background: transparent; color: var(--text); transition: background-color .15s, border-color .15s, color .15s; white-space: nowrap;
}
.btn-sm { padding: 7px 12px; font-size: .83rem; border-radius: 8px; }
.btn-lg { padding: 14px 26px; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-dark); }
.btn-light { background: #fff; border-color: var(--line); color: var(--text); }
.btn-light:hover { border-color: var(--primary); color: var(--primary); }
.btn-link { padding-left: 6px; padding-right: 6px; color: var(--muted); }
.btn-link:hover { color: var(--primary); }
.btn-link.danger, .btn.danger { color: #c62f38; }
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover { background: #1fb956; }
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 38px; height: 38px; padding: 0 10px;
    border-radius: 10px; border: 0; background: transparent; color: var(--text); text-decoration: none; cursor: pointer; font-weight: 600; font-size: .88rem;
}
.icon-btn:hover { background: var(--primary-tint); color: var(--primary); }
.icon-btn .bi { font-size: 1.05rem; }
.icon-btn.sm { min-width: 32px; height: 32px; padding: 0 7px; border-radius: 8px; }
.icon-btn.sm .bi { font-size: .95rem; }
.icon-btn.danger:hover { background: #fdecee; color: #c62f38; }
.bell { position: relative; }
.bell em { position: absolute; top: 3px; right: 2px; font-style: normal; background: #e5484d; color: #fff; font-size: .66rem; font-weight: 800; min-width: 17px; height: 17px; border-radius: 999px; display: grid; place-items: center; padding: 0 4px; }
.inline-form { display: inline; margin: 0; }
.pill { border-radius: 999px; padding: 4px 11px; font-size: .78rem; font-weight: 700; border: 0; cursor: pointer; }
.pill-on { background: #e3f6ec; color: #11613a; }
.pill-off { background: #efedf3; color: #7a7390; }
.pill:hover { filter: brightness(.95); }

/* ---------------------------------------------------------------- alertas e badges */
.alert { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 600; font-size: .92rem; flex-wrap: wrap; }
.alert > span { flex: 1; min-width: 200px; }
.alert .bi { font-size: 1.15rem; }
.alert-success { background: #e3f6ec; color: #11613a; }
.alert-error { background: #fdecee; color: #9b1c24; }
.alert-warning { background: #fff4d6; color: #7a5600; }
.alert-info { background: var(--primary-tint); color: var(--primary-dark); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; text-decoration: none; }
.badge-success { background: #e3f6ec; color: #11613a; }
.badge-warning { background: #fff2d1; color: #8a5a00; }
.badge-danger { background: #fde3e5; color: #a8202a; }
.badge-primary { background: var(--primary-soft); color: var(--primary-dark); }
.badge-muted { background: #eeecf2; color: #6f6984; }

/* ---------------------------------------------------------------- cards */
.card { background: #fff; border-radius: 16px; box-shadow: 0 1px 2px rgba(30,10,70,.04), 0 0 0 1px var(--line); margin-bottom: 22px; min-width: 0; }
.card-muted { background: #fbfaff; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 0; }
.card-head h3 { font-size: 1.02rem; font-weight: 800; margin: 0; }
.card-head a { font-size: .86rem; font-weight: 700; text-decoration: none; }
.card > .form-fields, .card > form.form-fields { padding: 18px 22px 22px; }
.card-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-toolbar.wrap { flex-wrap: wrap; }
.toolbar-title { font-size: 1rem; font-weight: 800; margin: 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-bottom: 18px; }
.page-desc { color: var(--muted); margin: -4px 0 18px; max-width: 80ch; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips a { padding: 7px 13px; border-radius: 999px; text-decoration: none; color: var(--text); font-weight: 600; font-size: .86rem; background: #f3f1f8; }
.chips a:hover { background: var(--primary-tint); color: var(--primary); }
.chips a.is-active { background: var(--primary); color: var(--on-primary); }
.chips em { font-style: normal; opacity: .65; margin-left: 3px; font-size: .8rem; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; min-width: 240px; }
.search .bi { color: var(--muted); }
.search input { border: 0; outline: 0; padding: 9px 0; background: transparent; width: 100%; }
.search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters select, .filters input[type=month] { padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; max-width: 260px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: .9rem; border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a.is-active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------------------------------------------------------------- tabelas */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .76rem; font-weight: 700; color: var(--muted); padding: 12px 16px; background: #fbfaff; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: #fcfbff; }
.table tr:last-child td { border-bottom: 0; }
.table tfoot td { background: #fbfaff; border-top: 1px solid var(--line); border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table tr.is-off td { opacity: .55; }
.col-actions { text-align: right; white-space: nowrap; width: 1%; }
.col-actions > * { vertical-align: middle; }
.col-order { width: 1%; white-space: nowrap; }
.cell-main { font-weight: 700; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.cell-main:hover { color: var(--primary); }
.cell-main.is-child::before { content: "↳"; color: var(--muted); font-weight: 400; margin-left: 10px; }
.thumb { width: 64px; height: 44px; object-fit: cover; border-radius: 8px; display: block; background: var(--primary-tint); }
.thumb-empty { display: grid; place-items: center; color: var(--primary); }
.icon-cell { width: 38px; height: 38px; border-radius: 10px; background: var(--primary-tint); color: var(--primary); display: grid; place-items: center; font-size: 1.15rem; }
.pagination { display: flex; justify-content: center; gap: 5px; padding: 16px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 36px; height: 36px; padding: 0 10px; border-radius: 9px; display: grid; place-items: center; text-decoration: none; font-weight: 700; color: var(--text); border: 1px solid var(--line); font-size: .86rem; }
.pagination .current { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

/* ---------------------------------------------------------------- formulários */
.form-fields { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 18px; }
.form-field { grid-column: span 12; display: flex; flex-direction: column; min-width: 0; }
.form-field.w-half { grid-column: span 6; }
.form-field.w-third { grid-column: span 4; }
.form-field.w-two-thirds { grid-column: span 8; }
.form-field.w-quarter { grid-column: span 3; }
.form-field > label { font-size: .84rem; font-weight: 700; margin-bottom: 6px; }
.req { color: #c62f38; }
.form-field input[type=text], .form-field input[type=email], .form-field input[type=url], .form-field input[type=number],
.form-field input[type=date], .form-field input[type=month], .form-field input[type=password], .form-field input[type=tel],
.form-field input[type=search], .form-field select, .form-field textarea, .items-table input {
    width: 100%; padding: 10px 13px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: .93rem;
    transition: border-color .15s, box-shadow .15s;
}
.form-field textarea { resize: vertical; min-height: 80px; }
.form-field textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; background: #fbfaff; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus, .items-table input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.help { color: var(--muted); font-size: .8rem; margin-top: 5px; line-height: 1.45; }
.readonly { padding: 10px 13px; border-radius: 10px; background: #f6f4fb; font-weight: 600; }
.sub-title { font-size: .95rem; font-weight: 800; margin: 8px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.form-card .form-fields { padding: 18px 22px 6px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 16px 22px 20px; border-top: 1px solid var(--line); margin-top: 16px; }
.sticky-actions { position: sticky; bottom: 0; z-index: 50; display: flex; gap: 10px; align-items: center; padding: 14px 18px; margin: 0 -4px; background: rgba(245,243,249,.92); backdrop-filter: blur(6px); border-top: 1px solid var(--line); border-radius: 14px 14px 0 0; }
.form-stack { display: block; }
.narrow-card { max-width: 860px; }
.row-actions { flex-direction: row; gap: 10px; }

.switch { display: inline-flex; align-items: center; gap: 11px; cursor: pointer; font-weight: 600; font-size: .9rem; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { width: 42px; height: 24px; border-radius: 999px; background: #d9d5e4; position: relative; flex-shrink: 0; transition: background-color .2s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + .switch-ui { background: var(--primary); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--primary-ring); outline-offset: 2px; }
.check-inline { display: inline-flex; align-items: flex-start; gap: 8px; font-size: .88rem; font-weight: 600; cursor: pointer; }
.check-inline input { margin-top: 3px; accent-color: var(--primary); width: 16px; height: 16px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; font-size: .9rem; background: #fff; }
.seg label:has(input:checked) { border-color: var(--primary); background: var(--primary-tint); color: var(--primary-dark); }
.seg input { accent-color: var(--primary); }
.seg-col { flex-direction: column; }
.input-prefix { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.input-prefix > span { padding: 0 11px; display: grid; place-items: center; background: #f6f4fb; color: var(--muted); font-weight: 700; font-size: .85rem; border-right: 1px solid var(--line); }
.input-prefix input { border: 0 !important; box-shadow: none !important; border-radius: 0 !important; flex: 1; min-width: 0; padding: 10px 12px; outline: none; }
.input-prefix:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.input-prefix.sm input { padding: 7px 10px; max-width: 120px; text-align: right; }
.input-action { display: flex; gap: 8px; }
.input-action input { flex: 1; min-width: 0; }
.color-field { display: flex; gap: 8px; align-items: center; }
.color-field input[type=color], .color-row input[type=color] { width: 46px; height: 42px; padding: 3px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.color-field input[type=text] { max-width: 120px; font-family: ui-monospace, monospace; }
.icon-field { display: flex; gap: 10px; align-items: center; }
.icon-preview { width: 44px; height: 44px; border-radius: 11px; background: var(--primary-tint); color: var(--primary); display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.icon-field input { flex: 1; }
.icon-grid { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; max-height: 128px; overflow-y: auto; padding: 8px; border-radius: 10px; background: #fbfaff; border: 1px solid var(--line); }
.icon-grid button { width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; font-size: 1.05rem; color: var(--text); }
.icon-grid button:hover, .icon-grid button.is-active { background: var(--primary); color: var(--on-primary); }
.image-field { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.image-preview { width: 150px; height: 100px; border-radius: 12px; border: 1.5px dashed var(--line); background: #fbfaff center/contain no-repeat; display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.image-preview img { width: 100%; height: 100%; object-fit: contain; }
.image-preview.is-empty { color: var(--muted); font-size: 1.6rem; }
.image-inputs { display: flex; flex-direction: column; gap: 8px; }
.image-inputs input[type=file] { font-size: .85rem; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px; border: 2px dashed var(--primary-soft); border-radius: 14px; background: var(--primary-tint); text-align: center; cursor: pointer; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .bi { font-size: 2rem; color: var(--primary); }
.dropzone span { font-weight: 700; }
.dropzone small { color: var(--muted); }
.dropzone.is-over { border-color: var(--primary); background: var(--primary-soft); }
.rte { background: #fff; border-radius: 0 0 10px 10px; }
.rte .ql-editor { min-height: 180px; font-size: .95rem; line-height: 1.6; font-family: inherit; }
.ql-toolbar.ql-snow { border-radius: 10px 10px 0 0; border-color: var(--line) !important; background: #fbfaff; }
.ql-container.ql-snow { border-color: var(--line) !important; border-radius: 0 0 10px 10px; font-family: inherit; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px !important; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: transparent; cursor: pointer; color: var(--muted); border-radius: 8px; }
.pw-toggle:hover { color: var(--primary); }

/* tabela de itens da fatura */
.items-table td { padding: 8px 10px; }
.items-table .w-qty { width: 90px; }
.items-table .w-price { width: 180px; }
.items-table .w-total { width: 130px; }
.items-table .w-del { width: 44px; }
.items-table tfoot td { background: #fff; font-weight: 600; }
.items-table .total-row td { font-size: 1.05rem; font-weight: 800; background: #fbfaff; }

/* ---------------------------------------------------------------- painel inicial */
.welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.welcome h2 { font-size: 1.55rem; font-weight: 800; margin: 0 0 2px; }
.welcome p { margin: 0; }
.welcome-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 16px; margin-bottom: 22px; }
.kpi { position: relative; display: block; background: #fff; border-radius: 16px; padding: 18px 20px; text-decoration: none; color: var(--text); box-shadow: 0 0 0 1px var(--line); }
a.kpi:hover { box-shadow: 0 0 0 1.5px var(--primary); }
.kpi-ic { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-tint); color: var(--primary); font-size: 1.1rem; }
.kpi-label { display: block; color: var(--muted); font-weight: 700; font-size: .82rem; margin-bottom: 8px; }
.kpi strong { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.kpi small { display: block; color: var(--muted); margin-top: 4px; font-size: .8rem; }
.kpi-danger .kpi-ic { background: #fde3e5; color: #c62f38; }
.kpi-danger strong { color: #c62f38; }
.kpi-success .kpi-ic { background: #e3f6ec; color: #138a4b; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.grid-2 > .card { margin-bottom: 22px; }
.grid-wide { grid-template-columns: 1.4fr 1fr; }
.grid-side { grid-template-columns: 380px 1fr; }
.grid-detail { grid-template-columns: 1fr 420px; }
.routine { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; flex-wrap: wrap; }
.routine h3 { font-size: 1rem; font-weight: 800; }
.routine p { margin: 0; max-width: 72ch; font-size: .88rem; }

.list { list-style: none; margin: 0; padding: 8px 0; }
.list li > a, .list li > div, .list.compact li { display: flex; align-items: center; gap: 12px; padding: 11px 22px; text-decoration: none; color: var(--text); }
.list li > a:hover { background: #fbfaff; }
.list li + li { border-top: 1px solid var(--line); }
.list li.is-selected > a { background: var(--primary-tint); }
.list li.is-new .list-main strong::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-right: 7px; vertical-align: middle; }
.list-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-main strong { font-weight: 700; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-main small, .list-side small { color: var(--muted); font-size: .8rem; }
.list-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.list.compact { border-top: 1px solid var(--line); }
.notif-msg { color: var(--muted); font-size: .86rem; white-space: normal; }
.notif-list .list-main strong { white-space: normal; }
.link-hint { color: var(--primary) !important; font-weight: 700; }
.avatar-sm, .avatar-lg { border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.avatar-sm { width: 36px; height: 36px; font-size: .8rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.file-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--primary-tint); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; font-size: 1.05rem; }
.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-state .bi { font-size: 2.4rem; color: var(--primary); opacity: .55; display: block; margin-bottom: 10px; }
.empty-state p { max-width: 46ch; margin: 0 auto 16px; }
.empty-state.small { padding: 28px 20px; }
.empty-state.small .bi { font-size: 1.8rem; }
.card.empty-state { padding: 60px 24px; }

/* ficha do cliente */
.profile { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.profile-main { padding: 24px; }
.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.profile-head h2 { font-size: 1.3rem; font-weight: 800; margin: 0 0 2px; }
.profile-head p { margin: 0 0 6px; font-size: .88rem; }
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 24px; margin: 0; padding: 0 22px; }
.profile-main .dl { padding: 0; }
.dl div { min-width: 0; }
.dl dt { font-size: .76rem; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.dl dd { margin: 0; font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
.note { margin: 18px 22px; padding: 12px 14px; border-radius: 10px; background: #fff8e1; color: #6b5200; font-size: .88rem; }
.profile-main .note { margin: 18px 0 0; }
.mini-kpis { display: grid; grid-template-columns: repeat(3, 1fr); }
.mini-kpis div { padding: 16px 12px; text-align: center; }
.mini-kpis div + div { border-left: 1px solid var(--line); }
.mini-kpis small { display: block; color: var(--muted); font-size: .76rem; font-weight: 700; }
.mini-kpis strong { font-size: .98rem; }
.mini-kpis .is-danger strong { color: #c62f38; }
.action-list { display: grid; gap: 8px; padding: 16px 22px 20px; }
.action-list .inline-form { display: block; }
.action-list .btn { justify-content: flex-start; }
.timeline { list-style: none; margin: 0; padding: 14px 22px 20px; display: grid; gap: 12px; }
.timeline li { position: relative; padding-left: 20px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); }
.timeline strong { display: block; font-size: .88rem; }
.timeline small { color: var(--muted); }
.info-box { margin: 0 22px 18px; padding: 16px 18px; border-radius: 12px; background: var(--primary-tint); font-size: .88rem; }
.grid-2 > div > .info-box { margin: 0; }
.info-box h4 { font-size: .92rem; font-weight: 800; display: flex; gap: 8px; align-items: center; }
.info-box p { margin: 6px 0; }
code.copy { display: block; padding: 10px 12px; margin: 6px 0 10px; background: #fff; border-radius: 8px; font-size: .8rem; word-break: break-all; cursor: pointer; border: 1px solid var(--line); }
code.copy:hover { border-color: var(--primary); }
.bars { list-style: none; margin: 0; padding: 18px 22px 22px; display: grid; gap: 14px; }
.bars span { display: flex; justify-content: space-between; font-size: .86rem; font-weight: 600; margin-bottom: 5px; }
.bars i { display: block; height: 8px; border-radius: 99px; background: var(--primary); }
.month-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.month-nav input { padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; }
.month-nav strong { font-size: 1.1rem; margin-left: 8px; }
.chart-box { padding: 16px 20px 20px; height: 300px; position: relative; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 22px 4px; }
.lead-detail .dl { padding-top: 14px; }
.lead-detail > .inline-form { display: block; padding: 0 22px 18px; }
.vars { font-size: .84rem; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.var { border: 1px solid var(--line); background: #fbfaff; border-radius: 7px; padding: 3px 8px; font-family: ui-monospace, monospace; font-size: .78rem; cursor: pointer; }
.var:hover { border-color: var(--primary); color: var(--primary); }

/* ---------------------------------------------------------------- aparência */
.appearance { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.appearance-preview { position: sticky; top: 86px; }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 16px 22px 6px; }
.preset { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 700; font-size: .85rem; text-align: left; }
.preset:hover { border-color: var(--primary); }
.preset-sw { display: flex; }
.preset-sw i { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; margin-right: -6px; box-shadow: 0 0 0 1px rgba(0,0,0,.06); }
.appearance .card > .help { padding: 0 22px 16px; display: block; }
.color-list { padding: 8px 22px 16px; }
.color-row { display: grid; grid-template-columns: 50px 1fr 110px; gap: 12px; align-items: center; padding: 10px 0; }
.color-row + .color-row { border-top: 1px solid var(--line); }
.color-row strong { display: block; font-size: .9rem; }
.color-row small { color: var(--muted); font-size: .8rem; }
.color-row input[type=text] { padding: 9px 10px; border: 1.5px solid var(--line); border-radius: 10px; font-family: ui-monospace, monospace; font-size: .85rem; width: 100%; }
.radius-options { display: flex; gap: 10px; flex-wrap: wrap; }
.radius-opt input { position: absolute; opacity: 0; }
.radius-opt span { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; font-size: .88rem; }
.radius-opt span i { width: 26px; height: 20px; background: var(--primary-soft); border: 2px solid var(--primary); }
.radius-opt input:checked + span { border-color: var(--primary); background: var(--primary-tint); }
.radius-opt input:focus-visible + span { outline: 3px solid var(--primary-ring); }
.pv {
    --pv-primary: #7b3fe4; --pv-secondary: #2a1055; --pv-accent: #ffc83d; --pv-text: #1d1630; --pv-light: #f5f1fd; --pv-header: #fff; --pv-footer: #1c0b38;
    --pv-on-primary: #fff; --pv-on-accent: #1d1630; --pv-on-header: #1d1630; --pv-on-footer: #fff; --pv-r: 18px; --pv-btn: 999px;
    border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 20px 40px -24px rgba(30,10,70,.35); background: #fff; color: var(--pv-text);
    font-family: var(--pv-body, inherit); font-size: 12px;
}
.pv h4 { font-family: var(--pv-heading, inherit); }
.pv-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--pv-header); color: var(--pv-on-header); }
.pv-logo { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 12px; font-family: var(--pv-heading, inherit); }
.pv-logo i { width: 18px; height: 18px; border-radius: 5px; background: var(--pv-primary); }
.pv-nav { display: flex; gap: 6px; flex: 1; justify-content: center; }
.pv-nav b { width: 26px; height: 6px; border-radius: 4px; background: currentColor; opacity: .25; }
.pv-btn { display: inline-block; padding: 7px 12px; border-radius: var(--pv-btn); font-weight: 700; font-size: 11px; }
.pv-btn.sm { padding: 5px 10px; }
.pv-btn-primary { background: var(--pv-primary); color: var(--pv-on-primary); }
.pv-btn-accent { background: var(--pv-accent); color: var(--pv-on-accent); }
.pv-hero { padding: 22px 18px 26px; background: linear-gradient(140deg, var(--pv-primary), var(--pv-secondary)); color: var(--pv-on-primary); }
.pv-badge { display: inline-block; border: 1px solid currentColor; border-radius: 999px; padding: 3px 9px; font-size: 10px; font-weight: 700; opacity: .9; margin-bottom: 10px; }
.pv-hero h4 { font-size: 19px; font-weight: 800; line-height: 1.1; margin: 0 0 8px; max-width: 14ch; letter-spacing: -0.02em; }
.pv-hero p { opacity: .85; margin: 0 0 12px; }
.pv-body { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; background: var(--pv-light); }
.pv-card { background: #fff; border-radius: var(--pv-r); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.pv-card small { opacity: .6; }
.pv-ic { width: 26px; height: 26px; border-radius: calc(var(--pv-r) / 2); background: color-mix(in srgb, var(--pv-primary) 12%, white); color: var(--pv-primary); display: grid; place-items: center; margin-bottom: 4px; }
.pv-card-dark { background: var(--pv-secondary); color: #fff; }
.pv-price { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.pv-footer { padding: 14px; background: var(--pv-footer); color: var(--pv-on-footer); font-weight: 600; }
.appearance-preview .help { display: block; margin-top: 10px; }

/* ---------------------------------------------------------------- fatura */
.invoice-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.invoice-paper { background: #fff; border-radius: 16px; box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.invoice-paper.single { max-width: 900px; margin: 0 auto; }
.invoice-doc { padding: clamp(22px, 4vw, 40px); color: var(--text); font-size: .92rem; }
.inv-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 2px solid var(--line); }
.inv-brand .logo-img { max-height: 46px; }
.inv-brand .wordmark { display: inline-flex; align-items: center; gap: 10px; }
.inv-brand .wordmark-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 800; }
.inv-brand .wordmark-text { font-weight: 800; font-size: 1.1rem; }
.inv-brand p { margin: 10px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.inv-meta { text-align: right; }
.inv-meta h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 6px; }
.inv-meta dl { margin: 12px 0 0; display: grid; gap: 3px; }
.inv-meta dl div { display: flex; justify-content: flex-end; gap: 10px; font-size: .86rem; }
.inv-meta dt { color: var(--muted); }
.inv-meta dd { margin: 0; min-width: 90px; }
.inv-client { padding: 20px 0; }
.inv-client h3, .inv-pay h3, .inv-notes h3, .inv-bank h3 { font-size: .78rem; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.inv-client p { margin: 0; line-height: 1.6; }
.inv-items { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.inv-items th { text-align: left; font-size: .76rem; color: var(--muted); font-weight: 700; padding: 10px 8px; border-bottom: 1.5px solid var(--line); }
.inv-items td { padding: 11px 8px; border-bottom: 1px solid var(--line); }
.inv-items .num { text-align: right; white-space: nowrap; }
.inv-items tfoot td { border-bottom: 0; padding: 6px 8px; color: var(--muted); }
.inv-items tfoot .inv-total td { color: var(--text); font-weight: 800; font-size: 1.08rem; padding-top: 12px; }
.inv-items tfoot .inv-total.danger td { color: #c62f38; }
.inv-items tfoot .inv-total.success td { color: #138a4b; }
.inv-pay { margin-top: 18px; padding: 20px; border-radius: 14px; background: #fbfaff; border: 1px solid var(--line); display: grid; gap: 14px; }
.inv-pix { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.qr { width: 180px; height: 180px; padding: 10px; background: #fff; border-radius: 12px; border: 1px solid var(--line); flex-shrink: 0; }
.qr img, .qr canvas { width: 100% !important; height: auto !important; }
.inv-pix-info { flex: 1; min-width: 240px; }
.inv-pix-info h3 { font-size: 1rem !important; color: var(--text) !important; display: flex; align-items: center; gap: 8px; }
.inv-pix-info p { font-size: .86rem; color: var(--muted); }
.copy-box { display: flex; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 12px; margin-bottom: 6px; }
.copy-box code { flex: 1; font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.inv-pix-info small { color: var(--muted); }
.inv-bank p, .inv-notes p { margin: 0; }
.inv-notes { margin-top: 18px; }
.inv-foot { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .76rem; color: var(--muted); }
.status-pago .inv-head { border-bottom-color: #bfe6cf; }
.status-vencido .inv-head { border-bottom-color: #f3c0c4; }
.invoice-side .card { margin-bottom: 18px; }
.print-page { background: #eceaf1; padding: 24px 12px; }
.print-page .invoice-doc { max-width: 860px; margin: 0 auto; background: #fff; border-radius: 12px; box-shadow: 0 10px 40px -20px rgba(0,0,0,.3); }
.print-bar { max-width: 860px; margin: 0 auto 14px; display: flex; justify-content: flex-end; }
@media print {
    @page { margin: 12mm; }
    body.print-page { background: #fff; padding: 0; }
    .print-bar, .copy-box button { display: none !important; }
    .print-page .invoice-doc { box-shadow: none; padding: 0; max-width: none; }
    .inv-pay { break-inside: avoid; }
}

/* ---------------------------------------------------------------- documentos do cliente */
.doc-grid { list-style: none; margin: 0; padding: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.doc { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.doc.is-new { border-color: var(--primary-soft); background: var(--primary-tint); }
.doc-ext { width: 46px; height: 54px; border-radius: 8px; display: grid; place-items: center; font-size: .66rem; font-weight: 800; background: #eceaf2; color: #5f5875; flex-shrink: 0; }
.ext-pdf { background: #fde3e5; color: #b4232c; }
.ext-xml { background: #e2f0ff; color: #1d5fbf; }
.ext-xls, .ext-xlsx, .ext-csv, .ext-ods { background: #e3f6ec; color: #11613a; }
.ext-doc, .ext-docx, .ext-odt { background: #e4ecff; color: #2849a8; }
.ext-zip, .ext-rar, .ext-7z { background: #fff2d1; color: #8a5a00; }
.doc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.doc-info strong { font-size: .92rem; overflow-wrap: anywhere; }
.doc-info small { color: var(--muted); font-size: .78rem; }

/* tabela que vira cartões no celular */
@media (max-width: 640px) {
    .table-cards thead { display: none; }
    .table-cards tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
    .table-cards td { padding: 0; border: 0; }
    .table-cards td[data-label="Fatura"] { grid-column: 1 / -1; }
    .table-cards td[data-label="Vencimento"]::before { content: "Vence "; color: var(--muted); }
    .table-cards .num { text-align: left; font-weight: 800; }
    .table-cards .col-actions { grid-column: 1 / -1; text-align: left; margin-top: 6px; }
}

/* ---------------------------------------------------------------- login do painel */
.auth-admin { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(800px 500px at 80% 0%, var(--primary-soft), transparent 60%), #f5f3f9; }
.auth-box { width: min(420px, 100%); background: #fff; border-radius: 22px; padding: 36px 32px; box-shadow: 0 30px 70px -40px rgba(30,10,70,.5), 0 0 0 1px var(--line); }
.auth-logo { display: inline-flex; margin-bottom: 26px; text-decoration: none; color: var(--text); }
.auth-logo .logo-img { max-height: 46px; }
.auth-logo .wordmark, .ca-logo .wordmark { display: inline-flex; align-items: center; gap: 10px; }
.auth-logo .wordmark-mark, .ca-logo .wordmark-mark { width: 40px; height: 40px; border-radius: 11px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; }
.auth-logo .wordmark-text, .ca-logo .wordmark-text { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.auth-box h1 { font-size: 1.45rem; font-weight: 800; }
.auth-sub { color: var(--muted); margin-bottom: 20px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form > * { min-width: 0; }
.auth-form > .check-inline { align-self: flex-start; }
.auth-form .form-field > label { margin-bottom: 7px; }
.auth-form input[type=text], .auth-form input[type=email], .auth-form input[type=password], .auth-form input[type=tel] {
    width: 100%; padding: 12px 14px; border: 1.5px solid #d9d5e3; border-radius: 10px; background: #fff; font-size: .96rem;
}
.auth-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.auth-links { text-align: center; margin: 4px 0 0; font-size: .9rem; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-row a { font-size: .92rem; font-weight: 600; }
.auth-row .btn { padding: 12px 26px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------------------------------------------------------------- login do cliente (tela dividida) */
body.client-auth { background: #fff; }
.ca-wrap { display: grid; grid-template-columns: clamp(400px, 36vw, 560px) minmax(0, 1fr); min-height: 100vh; }
.ca-form { display: flex; flex-direction: column; padding: 40px clamp(24px, 4vw, 64px) 30px; min-width: 0; }
.ca-logo { align-self: center; text-decoration: none; color: var(--text); margin-bottom: 40px; }
.ca-logo .logo-img { max-height: 48px; }
.ca-inner { flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 340px; margin: 0 auto; }
.ca-title { font-size: 1.5rem; font-weight: 800; }
.ca-sub { color: var(--muted); }
.ca-inner .auth-row a { color: var(--primary); text-decoration: none; }
.ca-inner .auth-row a:hover { text-decoration: underline; }
.ca-bottom { text-align: center; color: var(--muted); margin: 30px 0 0; font-size: .94rem; }
.ca-bottom a { font-weight: 600; text-decoration: none; }
.ca-promo {
    position: relative; overflow: hidden; color: #fff; padding: clamp(40px, 7vw, 100px) clamp(30px, 6vw, 110px) 110px;
    background: radial-gradient(700px 500px at 30% 0%, var(--secondary-2), transparent 60%), linear-gradient(150deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex; flex-direction: column;
}
.ca-promo::before { content: ""; position: absolute; right: -120px; top: 30%; width: 520px; height: 520px; border-radius: 50%; border: 70px solid rgba(255,255,255,.05); }
.ca-promo-copy { position: relative; z-index: 2; max-width: 460px; }
.ca-promo h2 { font-family: var(--font-heading); font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 22px; }
.ca-promo p { font-size: 1.1rem; opacity: .92; max-width: 40ch; margin-bottom: 30px; }
.ca-badge { position: absolute; top: 0; right: clamp(24px, 6vw, 100px); z-index: 3; width: 120px; padding: 20px 12px 18px; background: #f2f6e8; color: #183b1f; border-radius: 0 0 60px 60px; text-align: center; font-weight: 800; font-size: .82rem; line-height: 1.2; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ca-badge .bi { font-size: 1.5rem; }
.ca-img { position: absolute; right: 0; bottom: 0; max-height: 78%; max-width: 62%; object-fit: contain; object-position: bottom right; z-index: 1; }
.ca-promo.has-image .ca-promo-copy { max-width: 46%; }
.ca-art { position: relative; flex: 1; min-height: 240px; margin-top: 30px; z-index: 1; }
.ca-card { position: absolute; display: flex; align-items: center; gap: 12px; background: #fff; color: var(--text); padding: 14px 18px 14px 14px; border-radius: 16px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.55); min-width: 250px; }
.ca-card .bi { width: 42px; height: 42px; border-radius: 50%; background: var(--primary-tint); color: var(--primary); display: grid; place-items: center; font-size: 1.15rem; flex-shrink: 0; }
.ca-card b { display: block; font-size: .95rem; }
.ca-card small { color: var(--muted); }
.ca-card-1 { right: 12%; top: 0; }
.ca-card-2 { right: 34%; top: 38%; }
.ca-card-3 { right: 6%; top: 68%; }
.ca-social { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); display: flex; gap: 10px; z-index: 3; }
.ca-social a { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--primary); display: grid; place-items: center; text-decoration: none; font-size: 1.1rem; box-shadow: 0 10px 20px -10px rgba(0,0,0,.4); }
.ca-social a.ca-pill { width: auto; padding: 0 18px; border-radius: 999px; font-weight: 800; font-size: .92rem; }
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 50; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; font-size: 1.75rem; text-decoration: none; box-shadow: 0 16px 36px -12px rgba(18,140,70,.7); }

/* ---------------------------------------------------------------- responsivo */
@media (max-width: 1180px) {
    .appearance, .invoice-layout, .profile, .grid-detail { grid-template-columns: 1fr; }
    .appearance-preview { position: static; order: -1; max-width: 480px; }
}
@media (max-width: 980px) {
    .sidebar { transform: translateX(-100%); transition: transform .25s; box-shadow: 20px 0 60px -20px rgba(0,0,0,.4); }
    body.sidebar-open .sidebar { transform: none; }
    body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 250; background: rgba(15,6,35,.45); }
    .main { margin-left: 0; }
    .sidebar-toggle { display: inline-flex; }
    .topbar { padding: 0 14px; }
    .content { padding: 18px 14px 50px; }
    .grid-2, .grid-wide, .grid-side { grid-template-columns: 1fr; }
    .ca-wrap { grid-template-columns: 1fr; }
    .ca-promo { min-height: 420px; padding-bottom: 110px; }
    .ca-art { display: none; }
    .ca-promo.has-image .ca-promo-copy { max-width: 100%; }
    .ca-img { position: relative; max-width: 80%; margin: 20px auto -110px; }
}
@media (max-width: 640px) {
    .form-field.w-half, .form-field.w-third, .form-field.w-two-thirds, .form-field.w-quarter { grid-column: span 12; }
    .hide-sm { display: none; }
    .search { min-width: 0; width: 100%; }
    .card-toolbar { flex-direction: column; align-items: stretch; }
    .filters select, .filters input { max-width: none; flex: 1; }
    .inv-meta { text-align: left; }
    .inv-meta dl div { justify-content: flex-start; }
    .qr { width: 150px; height: 150px; }
    .page-actions { justify-content: stretch; }
    .page-actions .btn { flex: 1; }
    .form-row-2 { grid-template-columns: 1fr; }
    .ca-form { padding-top: 28px; }
    .ca-logo { margin-bottom: 24px; }
    .kpi strong { font-size: 1.3rem; }
    .doc-grid { grid-template-columns: 1fr; }
    .color-row { grid-template-columns: 46px 1fr; }
    .color-row input[type=text] { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
