:root {
    --ink: #111c34;
    --muted: #647086;
    --surface: #ffffff;
    --surface-soft: #f4f7fb;
    --line: #e4eaf2;
    --primary: #101e3b;
    --primary-hover: #1c315c;
    --accent: #d6aa49;
    --danger: #a53737;
    --danger-bg: #fff1f1;
    --success: #236a45;
    --success-bg: #edf9f2;
    --shadow: 0 22px 70px rgba(17, 28, 52, .10);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--surface-soft); }
body { margin: 0; min-height: 100vh; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--surface-soft); }
a { color: inherit; }
button, input { font: inherit; }
.container { width: min(1160px, calc(100% - 36px)); margin-inline: auto; }

.topbar { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(228,234,242,.86); background: rgba(255,255,255,.92); backdrop-filter: blur(14px); }
.topbar-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 19px; font-weight: 650; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 800; }
.brand strong { color: var(--accent); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-user { color: var(--muted); font-size: 14px; }
.topbar-actions form { margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: 12px; text-decoration: none; cursor: pointer; font-weight: 700; transition: .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: var(--primary); box-shadow: 0 10px 22px rgba(16,30,59,.13); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { border-color: var(--line); background: #fff; color: var(--ink); }
.btn-ghost { border-color: var(--line); background: transparent; color: var(--ink); }
.btn-small { min-height: 38px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.btn-large { min-height: 52px; padding: 0 22px; }
.btn-block { width: 100%; min-height: 50px; }

.hero { padding: 82px 0 70px; overflow: hidden; background: radial-gradient(circle at 80% 25%, rgba(214,170,73,.16), transparent 22%), linear-gradient(145deg, #fff 0%, #f4f7fb 70%); }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 72px; align-items: center; }
.eyebrow { display: inline-block; margin-bottom: 12px; color: #8d6a20; font-size: 12px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.hero h1 { max-width: 720px; margin: 0; font-size: clamp(40px, 5vw, 68px); line-height: 1.02; letter-spacing: -.045em; }
.hero-copy > p { max-width: 690px; margin: 24px 0 0; color: var(--muted); font-size: 19px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 25px; color: var(--muted); font-size: 13px; }
.hero-panel { position: relative; }
.mock-window { border: 1px solid rgba(228,234,242,.9); border-radius: 26px; overflow: hidden; background: #fff; box-shadow: var(--shadow); transform: rotate(1.2deg); }
.mock-header { display: flex; gap: 7px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.mock-header span { width: 9px; height: 9px; border-radius: 50%; background: #d7dde7; }
.mock-body { padding: 28px; }
.mock-label { margin: 0 0 18px; font-size: 22px; font-weight: 800; }
.mock-option { display: flex; align-items: center; gap: 15px; margin-top: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; }
.mock-option b { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface-soft); font-size: 22px; }
.mock-option span { display: grid; gap: 3px; }
.mock-option small { color: var(--muted); }
.feature-strip { padding: 48px 0 70px; background: #fff; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-grid article { padding: 24px; border: 1px solid var(--line); border-radius: 18px; }
.feature-grid article > span { color: #a17b2b; font-size: 12px; font-weight: 850; }
.feature-grid h2 { margin: 8px 0 6px; font-size: 20px; }
.feature-grid p { margin: 0; color: var(--muted); line-height: 1.55; }

.auth-section { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 55px 18px; background: radial-gradient(circle at 15% 15%, rgba(214,170,73,.12), transparent 22%), var(--surface-soft); }
.auth-card { width: min(480px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.auth-card-wide { width: min(720px, 100%); }
.auth-heading h1 { margin: 0; font-size: 32px; letter-spacing: -.025em; }
.auth-heading p { margin: 8px 0 0; color: var(--muted); line-height: 1.55; }
.form { display: grid; gap: 17px; margin-top: 26px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.field-full { grid-column: 1 / -1; }
.form label { display: grid; gap: 7px; }
.form label > span { font-size: 13px; font-weight: 750; }
.form input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid #d9e0ea; border-radius: 11px; outline: 0; color: var(--ink); background: #fff; }
.form input:focus { border-color: #8190aa; box-shadow: 0 0 0 4px rgba(16,30,59,.06); }
.form-note { margin: -2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.auth-foot { margin: 22px 0 0; color: var(--muted); text-align: center; font-size: 14px; }
.auth-foot a { color: var(--ink); font-weight: 750; }
.alert { padding: 13px 15px; border-radius: 11px; font-size: 14px; line-height: 1.45; }
.auth-card .alert { margin-top: 20px; }
.alert-error { color: var(--danger); background: var(--danger-bg); border: 1px solid #ffd7d7; }
.alert-success { color: var(--success); background: var(--success-bg); border: 1px solid #d3f0df; }

.dashboard-section { min-height: calc(100vh - 140px); padding: 44px 0 70px; }
.dashboard-wrap { display: grid; gap: 24px; }
.dashboard-alert { margin-bottom: -6px; }
.dashboard-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.dashboard-head h1 { margin: 0; font-size: clamp(32px, 4vw, 48px); letter-spacing: -.035em; }
.dashboard-head p { margin: 8px 0 0; color: var(--muted); }
.status-pill { display: inline-flex; align-items: center; min-height: 38px; padding: 0 13px; border-radius: 999px; background: #fff7e5; color: #7a5915; border: 1px solid #f3dfaf; font-size: 13px; font-weight: 750; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-card { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(17,28,52,.04); }
.stat-card > span { display: block; color: var(--muted); font-size: 13px; }
.stat-card strong { display: block; margin-top: 9px; font-size: 34px; }
.stat-card small { display: block; margin-top: 8px; color: var(--muted); }
.next-action-card { padding: 30px; border-radius: 22px; background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.next-action-card .eyebrow { color: #e7c87d; }
.next-action-card h2 { margin: 0; font-size: 30px; }
.next-action-card > div > p { margin: 8px 0 0; color: #b8c2d5; }
.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.action-option { min-height: 94px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 16px; border: 1px solid rgba(255,255,255,.13); border-radius: 15px; color: #fff; background: rgba(255,255,255,.06); text-align: left; opacity: .86; }
.action-option b { font-size: 24px; }
.action-option span { display: grid; gap: 4px; }
.action-option small { color: #bac4d6; }
.action-option em { color: #d9bd75; font-size: 11px; font-style: normal; font-weight: 750; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.info-card { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.info-card h3 { margin: 0 0 15px; }
.info-card dl { margin: 0; }
.info-card dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid #eef1f5; }
.info-card dt { color: var(--muted); }
.info-card dd { margin: 0; font-weight: 650; text-align: right; }

.footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 44px; }
    .hero-panel { max-width: 600px; }
    .feature-grid, .stats-grid, .action-grid { grid-template-columns: 1fr; }
    .account-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .container { width: min(100% - 24px, 1160px); }
    .topbar-inner { min-height: 64px; }
    .topbar-user { display: none; }
    .hero { padding: 55px 0; }
    .hero h1 { font-size: 42px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }
    .form-grid { grid-template-columns: 1fr; }
    .field-full { grid-column: auto; }
    .auth-card { padding: 25px 20px; }
    .dashboard-head { align-items: flex-start; flex-direction: column; }
    .status-pill { align-self: flex-start; }
    .next-action-card { padding: 23px 18px; }
    .footer-inner { padding: 18px 0; align-items: flex-start; flex-direction: column; justify-content: center; }
}

/* Leal Tap V0.3.0 — Painel Master */
.topbar-link { color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; }
.topbar-link:hover { color: var(--ink); }
.master-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 8px; border-radius: 999px; background: #fff5d8; color: #7f5a0b; border: 1px solid #efd994; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.master-section { min-height: calc(100vh - 140px); padding: 30px 0 70px; }
.master-wrap { display: grid; gap: 22px; }
.master-nav { display: flex; align-items: center; gap: 8px; padding: 7px; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow-x: auto; }
.master-nav a, .master-nav-future { flex: 0 0 auto; min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 750; }
.master-nav a:hover { color: var(--ink); background: var(--surface-soft); }
.master-nav a.is-active { color: #fff; background: var(--primary); }
.master-nav-future { opacity: .56; }
.master-nav-future em { font-size: 9px; font-style: normal; color: #98731f; }
.master-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-top: 4px; }
.master-head h1 { margin: 0; font-size: clamp(32px, 4vw, 48px); letter-spacing: -.04em; }
.master-head p { margin: 8px 0 0; color: var(--muted); }
.master-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.master-stat { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(17,28,52,.035); }
.master-stat > span { display: block; color: var(--muted); font-size: 13px; }
.master-stat strong { display: block; margin-top: 6px; font-size: 34px; }
.master-stat small { display: block; margin-top: 6px; color: var(--muted); }
.master-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.master-panel, .master-table-card { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(17,28,52,.035); }
.master-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.master-panel-head .eyebrow { margin-bottom: 5px; }
.master-panel-head h2 { margin: 0; font-size: 21px; }
.master-panel-head p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.master-panel-head > a { color: var(--muted); font-size: 13px; font-weight: 750; text-decoration: none; }
.master-panel-head > a:hover { color: var(--ink); }
.compact-list { display: grid; }
.compact-list > a, .compact-list-static > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 0; border-top: 1px solid #eef1f5; text-decoration: none; }
.compact-list > a:hover strong { text-decoration: underline; }
.compact-list span { display: grid; gap: 3px; min-width: 0; }
.compact-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-list small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-list em { flex: 0 0 auto; color: var(--muted); font-size: 11px; font-style: normal; font-weight: 800; }
.empty-state { margin: 12px 0 0; padding: 22px; border-radius: 12px; color: var(--muted); background: var(--surface-soft); text-align: center; }
.master-roadmap-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 28px; border-radius: 20px; color: #fff; background: var(--primary); }
.master-roadmap-card .eyebrow { color: #e7c87d; }
.master-roadmap-card h2 { margin: 0; font-size: 26px; }
.master-roadmap-card p { max-width: 720px; margin: 7px 0 0; color: #b8c2d5; line-height: 1.55; }
.master-roadmap-badge { flex: 0 0 auto; display: inline-flex; padding: 10px 12px; border: 1px solid rgba(255,255,255,.17); border-radius: 12px; background: rgba(255,255,255,.08); font-size: 12px; font-weight: 850; }
.company-status { display: inline-flex; align-items: center; min-height: 26px; padding: 0 8px; border-radius: 999px; border: 1px solid transparent; font-size: 10px; font-weight: 850; }
.status-trial { color: #7a5915; background: #fff7e5; border-color: #f3dfaf; }
.status-active { color: #206541; background: #edf9f2; border-color: #cfead9; }
.status-suspended { color: #8a3535; background: #fff1f1; border-color: #f0cece; }
.status-cancelled { color: #5f6673; background: #f1f3f6; border-color: #dde1e7; }
.company-status-large { min-height: 38px; padding: 0 13px; font-size: 12px; }
.master-filters { display: grid; grid-template-columns: minmax(260px, 1fr) 220px auto auto; gap: 12px; align-items: end; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.master-filters label { display: grid; gap: 7px; }
.master-filters label > span { color: var(--muted); font-size: 12px; font-weight: 750; }
.master-filters input, .master-filters select { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #d9e0ea; border-radius: 10px; color: var(--ink); background: #fff; outline: none; }
.master-filters input:focus, .master-filters select:focus { border-color: #8190aa; box-shadow: 0 0 0 4px rgba(16,30,59,.06); }
.master-table-card { padding: 0; overflow: hidden; }
.master-table-head { padding: 16px 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.table-scroll { overflow-x: auto; }
.master-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.master-table th { padding: 13px 18px; color: var(--muted); background: #fbfcfe; border-bottom: 1px solid var(--line); text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.master-table td { padding: 15px 18px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
.master-table tr:last-child td { border-bottom: 0; }
.master-table td > strong, .master-table td > span { display: block; }
.master-table td > small { display: block; margin-top: 3px; color: var(--muted); }
.table-action { text-align: right; }
.back-link { display: inline-block; margin-bottom: 12px; color: var(--muted); font-size: 13px; font-weight: 750; text-decoration: none; }
.back-link:hover { color: var(--ink); }
.detail-list { margin: 0; }
.detail-list > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 12px 0; border-top: 1px solid #eef1f5; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; max-width: 65%; font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.status-management { padding-bottom: 28px; }
.status-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.status-actions form { margin: 0; }
.status-action-card { width: 100%; min-height: 132px; display: grid; align-content: center; gap: 5px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: #fff; cursor: pointer; text-align: left; transition: .18s ease; }
.status-action-card:hover:not(:disabled) { transform: translateY(-2px); border-color: #c8d0dd; box-shadow: 0 12px 28px rgba(17,28,52,.07); }
.status-action-card > span { font-size: 23px; }
.status-action-card strong { font-size: 16px; }
.status-action-card small { color: var(--muted); line-height: 1.4; }
.status-action-card.is-current { border-color: #d8bc78; background: #fffaf0; }
.status-action-card:disabled { cursor: default; opacity: .72; }
.status-action-danger:not(.is-current) { border-color: #efdada; }

@media (max-width: 1000px) {
    .master-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .master-grid-2 { grid-template-columns: 1fr; }
    .master-filters { grid-template-columns: 1fr 1fr; }
    .status-actions { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .topbar-link, .master-badge { display: none; }
    .master-section { padding-top: 20px; }
    .master-head { align-items: flex-start; flex-direction: column; }
    .master-head .btn { width: 100%; }
    .master-stats-grid { grid-template-columns: 1fr 1fr; }
    .master-filters { grid-template-columns: 1fr; }
    .master-filters .btn { width: 100%; }
    .master-roadmap-card { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
    .master-stats-grid { grid-template-columns: 1fr; }
    .master-panel { padding: 20px 16px; }
}

/* Leal Tap V1.0.0 — Tap Engine */
.action-option-live { text-decoration: none; cursor: pointer; opacity: 1; transition: .18s ease; }
.action-option-live:hover { transform: translateY(-2px); background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.25); }
.next-action-footer { margin-top: 18px; text-align: right; }
.next-action-footer a { color: #e7c87d; font-size: 13px; font-weight: 800; text-decoration: none; }
.next-action-footer a:hover { text-decoration: underline; }
.tap-empty { display: grid; gap: 24px; padding: 30px; border: 1px solid var(--line); border-radius: 22px; background: #fff; }
.tap-empty > div:first-child { max-width: 760px; }
.tap-empty-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #fff7e5; font-size: 24px; }
.tap-empty h2 { margin: 14px 0 6px; font-size: 27px; }
.tap-empty p { margin: 0; color: var(--muted); line-height: 1.6; }
.tap-type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.tap-type-card { display: grid; grid-template-columns: auto 1fr; gap: 13px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-decoration: none; transition: .18s ease; }
.tap-type-card:hover { transform: translateY(-2px); border-color: #c8d0dd; box-shadow: 0 12px 28px rgba(17,28,52,.07); }
.tap-type-card b { font-size: 25px; }
.tap-type-card span { display: grid; gap: 5px; }
.tap-type-card small { color: var(--muted); line-height: 1.4; }
.tap-type-card em { grid-column: 2; color: #8d6a20; font-size: 12px; font-style: normal; font-weight: 850; }
.tap-list-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tap-card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(17,28,52,.035); }
.tap-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tap-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--surface-soft); font-size: 22px; }
.tap-card h2 { margin: 16px 0 3px; font-size: 19px; }
.tap-card > p { margin: 0; color: var(--muted); font-size: 13px; }
.tap-link-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; padding: 11px 12px; border-radius: 11px; background: var(--surface-soft); }
.tap-link-box code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.tap-link-box a { flex: 0 0 auto; color: #8d6a20; font-size: 12px; font-weight: 800; text-decoration: none; }
.tap-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px; }
.tap-metrics span { display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid #eef1f5; }
.tap-metrics strong { font-size: 20px; }
.tap-metrics small { color: var(--muted); font-size: 11px; }
.tap-create-wrap { display: grid; gap: 22px; }
.tap-create-head h1 { margin: 0; font-size: clamp(32px, 4vw, 48px); letter-spacing: -.035em; }
.tap-create-head p { margin: 8px 0 0; color: var(--muted); }
.tap-create-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 18px; align-items: start; }
.tap-type-selector { display: grid; gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.tap-type-select { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 11px; padding: 13px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.tap-type-select:hover { background: var(--surface-soft); }
.tap-type-select.is-active { color: #fff; background: var(--primary); }
.tap-type-select b { font-size: 21px; }
.tap-type-select span { display: grid; gap: 3px; }
.tap-type-select small { color: var(--muted); font-size: 10px; }
.tap-type-select.is-active small { color: #b8c2d5; }
.tap-form-card { padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 10px 30px rgba(17,28,52,.035); }
.tap-form-title { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.tap-form-title > span { display: grid; place-items: center; flex: 0 0 auto; width: 48px; height: 48px; border-radius: 14px; background: var(--surface-soft); font-size: 25px; }
.tap-form-title h2 { margin: 0; font-size: 25px; }
.tap-form-title p { margin: 5px 0 0; color: var(--muted); line-height: 1.45; }
.tap-form label small { color: var(--muted); font-weight: 400; line-height: 1.4; }
.tap-form textarea, .tap-form select { width: 100%; padding: 13px 14px; border: 1px solid #d9e0ea; border-radius: 11px; outline: 0; color: var(--ink); background: #fff; font: inherit; }
.tap-form select { min-height: 48px; }
.tap-form textarea { resize: vertical; min-height: 110px; }
.tap-form textarea:focus, .tap-form select:focus { border-color: #8190aa; box-shadow: 0 0 0 4px rgba(16,30,59,.06); }
.tap-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 3px; }
.tap-unavailable-card { text-align: center; }
.tap-unavailable-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 20px; border-radius: 17px; background: var(--surface-soft); font-size: 28px; }
.table-action-link { color: #8d6a20; font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.master-roadmap-badge { color: inherit; text-decoration: none; }

@media (max-width: 1000px) {
    .tap-list-grid { grid-template-columns: repeat(2, 1fr); }
    .tap-create-layout { grid-template-columns: 1fr; }
    .tap-type-selector { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
    .tap-type-grid, .tap-list-grid, .tap-type-selector { grid-template-columns: 1fr; }
    .tap-form-card { padding: 22px 17px; }
    .tap-form-actions { align-items: stretch; flex-direction: column-reverse; }
    .tap-form-actions .btn { width: 100%; }
}

/* Leal Tap V1.1.0 — Gestão do ciclo de vida do Tap */
.status-inactive { color: #6a5b3d; background: #fff8e9; border-color: #ead7aa; }
.tap-card-inactive { opacity: .82; background: #fbfbfc; }
.tap-meta-line { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.tap-meta-line span { padding: 5px 8px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: 10px; font-weight: 700; }
.tap-link-actions { display: inline-flex; align-items: center; gap: 9px; }
.tap-copy-btn { appearance: none; padding: 0; border: 0; color: #6b7280; background: transparent; cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; }
.tap-copy-btn:hover { color: var(--ink); }
.tap-card-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid #eef1f5; }
.tap-card-actions form { margin: 0; }
.tap-action-btn { width: 100%; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; cursor: pointer; text-decoration: none; font: inherit; font-size: 11px; font-weight: 800; transition: .15s ease; }
.tap-action-btn:hover { transform: translateY(-1px); border-color: #c7cfdb; background: var(--surface-soft); }
.tap-action-warn { color: #75571b; }
.tap-action-success { color: var(--success); }
.tap-edit-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tap-edit-summary > div { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.tap-edit-summary span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.tap-edit-summary strong { display: block; overflow-wrap: anywhere; font-size: 14px; }
.tap-edit-summary code { font-size: 12px; }
.tap-edit-card { width: min(880px, 100%); }

@media (max-width: 720px) {
    .tap-card-actions, .tap-edit-summary { grid-template-columns: 1fr; }
}


/* Leal Tap V1.2.0 — QR Code */
.tap-card-actions { grid-template-columns: repeat(2, 1fr); }
.tap-action-qr { color: #7b5b16; background: #fffaf0; border-color: #ead7aa; }
.qr-page { padding-bottom: 54px; }
.qr-layout { display: grid; grid-template-columns: minmax(340px, 520px) minmax(0, 1fr); gap: 24px; align-items: start; }
.qr-preview-card { padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: 0 18px 48px rgba(17,28,52,.07); text-align: center; }
.qr-preview-brand { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 22px; color: var(--ink); font-size: 16px; font-weight: 750; }
.qr-preview-brand .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
.qr-preview-brand strong { color: #c49736; }
.qr-code-frame { position: relative; display: grid; place-items: center; width: min(100%, 390px); aspect-ratio: 1; margin: 0 auto; padding: 14px; border: 1px solid #e7ebf1; border-radius: 22px; background: #fff; }
.qr-code-frame canvas { display: block; width: 100%; height: auto; max-width: 360px; image-rendering: pixelated; }
.qr-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; background: rgba(255,255,255,.92); border-radius: inherit; }
.qr-loading[hidden] { display: none; }
.qr-preview-copy { margin-top: 20px; }
.qr-preview-copy > span { color: #9a7422; font-size: 11px; font-weight: 900; letter-spacing: .13em; }
.qr-preview-copy h2 { margin: 8px 0 4px; font-size: 25px; }
.qr-preview-copy p { margin: 0; color: var(--muted); font-size: 13px; }
.qr-preview-copy code { display: inline-block; margin-top: 13px; padding: 7px 10px; border-radius: 9px; color: #3f4b61; background: var(--surface-soft); font-size: 11px; }
.qr-info-panel { padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: #fff; }
.qr-info-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.qr-info-head h2 { margin: 5px 0 0; font-size: 25px; }
.qr-url-box { display: grid; gap: 7px; margin-top: 22px; padding: 16px; border-radius: 14px; background: var(--surface-soft); }
.qr-url-box span { color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.qr-url-box code { overflow-wrap: anywhere; color: var(--ink); font-size: 12px; }
.qr-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.qr-actions .btn { width: 100%; justify-content: center; }
.qr-explain-card { margin-top: 22px; padding: 18px; border: 1px solid #ead7aa; border-radius: 15px; background: #fffaf0; }
.qr-explain-card strong { display: block; color: #684c12; font-size: 14px; }
.qr-explain-card p { margin: 7px 0 0; color: #75633f; font-size: 13px; line-height: 1.55; }
.qr-tech-note { display: grid; gap: 8px; margin-top: 18px; color: var(--muted); font-size: 12px; }

@media (max-width: 900px) {
  .qr-layout { grid-template-columns: 1fr; }
  .qr-preview-card { width: min(520px, 100%); margin: 0 auto; }
}

@media (max-width: 560px) {
  .qr-preview-card, .qr-info-panel { padding: 19px 15px; }
  .qr-actions { grid-template-columns: 1fr; }
  .qr-code-frame { max-width: 330px; }
}

@media print {
  @page { size: auto; margin: 12mm; }
  body { background: #fff !important; }
  .topbar, .footer, .qr-no-print { display: none !important; }
  main, .dashboard-section, .dashboard-wrap, .qr-page { padding: 0 !important; margin: 0 !important; background: #fff !important; }
  .qr-layout { display: block !important; }
  .qr-preview-card { width: 150mm !important; max-width: 100% !important; margin: 0 auto !important; padding: 12mm !important; border: 1px solid #ddd !important; box-shadow: none !important; break-inside: avoid; }
  .qr-code-frame { width: 95mm !important; border: 0 !important; }
  .qr-code-frame canvas { width: 90mm !important; max-width: 90mm !important; }
}

/* Leal Tap V1.3.0 — Studio de Materiais */
.tap-action-material { color: #5f4310; background: #fff9eb; border-color: #ead4a3; }
.material-page { padding-bottom: 58px; }
.material-layout { display: grid; grid-template-columns: minmax(380px, 560px) minmax(0, 1fr); gap: 24px; align-items: start; }
.material-preview-panel { position: sticky; top: 92px; display: grid; gap: 10px; }
.material-canvas-shell { position: relative; display: grid; place-items: center; min-height: 520px; padding: 18px; border: 1px solid var(--line); border-radius: 24px; background: #e9eef5; box-shadow: 0 18px 50px rgba(17,28,52,.08); }
.material-canvas-shell canvas { display: block; width: auto; max-width: 100%; max-height: 720px; border-radius: 12px; background: #fff; box-shadow: 0 12px 35px rgba(17,28,52,.14); }
.material-loading { position: absolute; inset: 18px; display: grid; place-items: center; border-radius: 18px; color: var(--muted); background: rgba(245,247,251,.92); font-size: 13px; }
.material-loading[hidden] { display: none; }
.material-preview-meta { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 11px; }
.material-preview-meta code { overflow-wrap: anywhere; text-align: right; }
.material-builder { padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: #fff; }
.material-builder-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.material-builder-head h2 { margin: 3px 0 0; font-size: 25px; }
.material-type-pill { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; color: #7a5915; background: #fff7e5; border: 1px solid #f0d89e; font-size: 11px; font-weight: 800; }
.material-block { display: grid; gap: 12px; margin-top: 24px; padding-top: 22px; border-top: 1px solid #edf0f4; }
.material-block > strong { font-size: 14px; }
.material-preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.material-preset { min-height: 72px; display: grid; align-content: center; justify-items: center; gap: 4px; padding: 9px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; cursor: pointer; font: inherit; font-size: 20px; }
.material-preset span { color: var(--muted); font-size: 10px; font-weight: 800; }
.material-preset:hover, .material-preset.is-active { border-color: #d8bb77; background: #fffaf0; }
.material-preset.is-active span { color: #765a20; }
.material-segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.material-segmented button { min-height: 40px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: #fff; cursor: pointer; font: inherit; font-size: 11px; font-weight: 800; }
.material-segmented button.is-active { color: #fff; border-color: var(--primary); background: var(--primary); }
.material-field { display: grid; gap: 6px; }
.material-field > span { color: var(--muted); font-size: 11px; font-weight: 750; }
.material-field input, .material-field textarea { width: 100%; padding: 11px 12px; border: 1px solid #d9e0ea; border-radius: 10px; outline: 0; color: var(--ink); background: #fff; font: inherit; }
.material-field textarea { resize: vertical; min-height: 74px; }
.material-field input:focus, .material-field textarea:focus { border-color: #8190aa; box-shadow: 0 0 0 4px rgba(16,30,59,.06); }
.material-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 24px; }
.material-actions .btn { width: 100%; }
.material-note { margin-top: 20px; padding: 16px; border: 1px solid #ead7aa; border-radius: 14px; background: #fffaf0; }
.material-note strong { color: #684c12; font-size: 13px; }
.material-note p { margin: 6px 0 0; color: #75633f; font-size: 12px; line-height: 1.55; }

@media (max-width: 980px) {
  .material-layout { grid-template-columns: 1fr; }
  .material-preview-panel { position: static; }
  .material-canvas-shell canvas { max-height: 620px; }
}

@media (max-width: 620px) {
  .material-builder { padding: 20px 15px; }
  .material-preset-grid { grid-template-columns: repeat(2, 1fr); }
  .material-segmented { grid-template-columns: repeat(2, 1fr); }
  .material-actions { grid-template-columns: 1fr; }
  .material-canvas-shell { min-height: 380px; padding: 10px; }
  .material-canvas-shell canvas { max-height: 540px; }
}

@media print {
  .material-no-print, .topbar, .footer { display: none !important; }
  body, main, .dashboard-section, .dashboard-wrap, .material-page { margin: 0 !important; padding: 0 !important; background: #fff !important; }
  .material-layout { display: block !important; }
  .material-preview-panel { position: static !important; }
  .material-canvas-shell { min-height: 0 !important; padding: 0 !important; border: 0 !important; background: #fff !important; box-shadow: none !important; }
  .material-canvas-shell canvas { width: auto !important; height: auto !important; max-width: 100% !important; max-height: 260mm !important; border-radius: 0 !important; box-shadow: none !important; }
}

/* Leal Tap V1.4.0 — Analytics */
.dashboard-stats-v14 { grid-template-columns: repeat(5, 1fr); }
.tap-action-analytics { color: #174d72; background: #f3f9fd; border-color: #cfe3f0; }
.analytics-page { padding-bottom: 58px; }
.analytics-head { align-items: flex-end; }
.analytics-head code { padding: 4px 7px; border-radius: 7px; background: #eef2f7; font-size: 11px; }
.analytics-head-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.analytics-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.analytics-stat-card strong { font-size: 32px; }
.analytics-panel { margin-top: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 10px 30px rgba(17,28,52,.035); }
.analytics-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 20px; }
.analytics-panel-head h2 { margin: 5px 0 0; font-size: 22px; }
.analytics-help { max-width: 330px; color: var(--muted); font-size: 11px; line-height: 1.45; text-align: right; }
.analytics-chart-scroll { overflow-x: auto; padding-bottom: 5px; }
.analytics-bars { display: grid; grid-template-columns: repeat(30, minmax(20px, 1fr)); align-items: end; gap: 7px; min-width: 820px; height: 265px; padding: 18px 8px 0; border-bottom: 1px solid #e8edf3; }
.analytics-bar-item { display: grid; grid-template-rows: 20px 1fr 18px; align-items: end; height: 100%; min-width: 0; }
.analytics-bar-value { align-self: end; min-height: 16px; color: #5f6b80; font-size: 9px; font-weight: 800; text-align: center; }
.analytics-bar-track { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; border-radius: 8px 8px 0 0; background: linear-gradient(to top, rgba(16,30,59,.035), rgba(16,30,59,0)); }
.analytics-bar-track i { display: block; width: min(16px, 72%); min-height: 2px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #d7af55, #0f1f3c); }
.analytics-bar-item small { padding-top: 5px; color: var(--muted); font-size: 9px; text-align: center; white-space: nowrap; }
.analytics-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.analytics-grid-2 .analytics-panel { margin-top: 18px; }
.analytics-breakdown { display: grid; gap: 16px; }
.analytics-breakdown-row { display: grid; gap: 7px; }
.analytics-breakdown-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 12px; }
.analytics-breakdown-title strong { color: var(--ink); }
.analytics-breakdown-title span { color: var(--muted); font-size: 11px; font-weight: 700; }
.analytics-progress { overflow: hidden; height: 8px; border-radius: 999px; background: #edf1f5; }
.analytics-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #10203f, #d4aa4d); }
.analytics-empty { margin: 0; padding: 20px; border-radius: 14px; color: var(--muted); background: var(--surface-soft); text-align: center; font-size: 13px; }
.analytics-table { min-width: 720px; }
.analytics-note { margin-top: 18px; padding: 17px 18px; border: 1px solid #ead7aa; border-radius: 15px; background: #fffaf0; }
.analytics-note strong { color: #684c12; font-size: 13px; }
.analytics-note p { margin: 6px 0 0; color: #75633f; font-size: 12px; line-height: 1.6; }

@media (max-width: 1180px) {
    .dashboard-stats-v14 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .analytics-summary-grid, .analytics-grid-2 { grid-template-columns: 1fr 1fr; }
    .analytics-head { align-items: flex-start; flex-direction: column; }
    .analytics-head-actions { width: 100%; justify-content: flex-start; }
}

@media (max-width: 720px) {
    .dashboard-stats-v14 { grid-template-columns: 1fr; }
    .analytics-summary-grid, .analytics-grid-2 { grid-template-columns: 1fr; }
    .analytics-panel { padding: 19px 15px; }
    .analytics-panel-head { flex-direction: column; }
    .analytics-help { max-width: none; text-align: left; }
    .analytics-head-actions .btn { width: 100%; justify-content: center; }
}
