/* Modo servidor: login e escolha do restaurante (telas do design), senha do cliente, estado da conexão e publicação. */
html.bk-auth-mode aside,html.bk-auth-mode .shell>header{display:none}
html.bk-auth-mode .shell{margin-left:0}
html.bk-auth-mode main{padding:0;max-width:none}
html.bk-auth-mode body{background:#F6F4EF}
.bk-wordmark{font:800 26px/1 'Bricolage Grotesque',var(--font-display),sans-serif;letter-spacing:-.03em;color:inherit}
.bk-wordmark span{color:#C8431F;font-weight:700}
.bk-muted{margin:0;font-size:15px;line-height:1.55;color:#5E6660}
.bk-error{min-height:1em;margin:0;font-size:14px;color:#9b2c1f}
.bk-btn{display:flex;align-items:center;justify-content:center;gap:8px;min-height:50px;padding:0 18px;border-radius:12px;font:600 15px Inter,var(--font-body),sans-serif;text-decoration:none;cursor:pointer;box-sizing:border-box}
.bk-btn-primary{border:0;background:#C8431F;color:#fff}.bk-btn-primary:disabled{opacity:.6;cursor:wait}
.bk-btn-ghost{border:1.5px solid #D8D4C9;background:#fff;color:#1B1F1D}
.bk-btn-dark{border:0;background:#1B1F1D;color:#fff}
.bk-btn:focus-visible{outline:2px solid #1B1F1D;outline-offset:2px}
/* Login */
.bk-auth{min-height:100vh;display:flex;flex-wrap:wrap;font-family:Inter,var(--font-body),sans-serif;color:#1B1F1D}
.bk-auth-brand{flex:1 1 480px;min-width:0;box-sizing:border-box;padding:56px 64px;background:#1B1F1D;color:#F6F4EF;display:flex;flex-direction:column;justify-content:space-between;gap:40px}
.bk-auth-brand .bk-wordmark span{color:#F08A6C}
.bk-auth-pitch{display:flex;flex-direction:column;gap:26px;max-width:520px}
.bk-auth-pitch h1{margin:0;font:800 clamp(34px,4vw,52px)/1.03 'Bricolage Grotesque',var(--font-display),sans-serif;letter-spacing:-.035em;color:#F6F4EF}
.bk-auth-pitch ul{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:14px;font-size:16px;line-height:1.5;color:#D9D6CD}
.bk-auth-pitch li{display:flex;gap:12px;align-items:flex-start}.bk-auth-pitch svg{flex-shrink:0;margin-top:2px;color:#F08A6C}
.bk-auth-note{margin:0;font-size:13px;color:#A9A69C}
.bk-auth-form-wrap,.bk-center{flex:1 1 480px;min-width:0;box-sizing:border-box;padding:56px 32px;display:flex;align-items:center;justify-content:center}
.bk-center{min-height:100vh}
.bk-auth-form{width:100%;max-width:420px;display:flex;flex-direction:column;gap:20px}
.bk-auth-form h2{margin:0 0 6px;font:800 32px 'Bricolage Grotesque',var(--font-display),sans-serif;letter-spacing:-.03em}
.bk-auth-form label{display:flex;flex-direction:column;gap:8px;margin:0;font-size:14px;font-weight:600}
.bk-auth-form input{height:52px;box-sizing:border-box;padding:0 16px;border:1.5px solid #D8D4C9;border-radius:12px;background:#fff;font:400 16px Inter,var(--font-body),sans-serif;color:#1B1F1D}
.bk-auth-form input:focus{outline:2px solid #1B1F1D;outline-offset:1px}
.bk-or{display:flex;align-items:center;gap:12px;font-size:13px;color:#5E6660}.bk-or span{flex:1;height:1px;background:#E2DED4}
.bk-auth-foot{padding-top:8px;border-top:1px solid #E2DED4;font-size:14px;line-height:1.5;color:#5E6660}
@media(max-width:700px){.bk-auth-brand{padding:44px 24px 30px;gap:22px}.bk-auth-pitch ul,.bk-auth-note{display:none}.bk-auth-pitch h1{font-size:32px}.bk-auth-form-wrap{padding:28px 24px}}
/* Escolher restaurante */
.bk-chooser{min-height:100vh;font-family:Inter,var(--font-body),sans-serif;color:#1B1F1D}
.bk-top{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 40px;border-bottom:1px solid #E2DED4;background:#fff}
.bk-account{display:flex;align-items:center;gap:10px;height:44px;padding:0 14px;border:1px solid #E2DED4;border-radius:999px;background:#fff;font:500 14px Inter,sans-serif;color:#1B1F1D;cursor:pointer}
.bk-account span{color:#C8431F;font-weight:600}
.bk-chooser-main{max-width:1120px;margin:0 auto;padding:48px 40px 64px;display:flex;flex-direction:column;gap:34px}
.bk-chooser-head h1{margin:0 0 8px;font:800 clamp(28px,3.4vw,40px) 'Bricolage Grotesque',var(--font-display),sans-serif;letter-spacing:-.03em}
.bk-group{display:flex;flex-direction:column;gap:16px}
.bk-group-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.bk-group-head h2{margin:0;font-size:13px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#5E6660}
.bk-badge{padding:5px 10px;border-radius:8px;background:#EFEDE6;font-size:12px;font-weight:600;white-space:nowrap}.bk-badge.is-dark{border-radius:999px;background:#1B1F1D;color:#F6F4EF}
.bk-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:20px}
.bk-card{display:flex;flex-direction:column;border:1px solid #E2DED4;border-radius:18px;background:#fff;overflow:hidden}
.bk-plate{height:118px;display:flex;align-items:center;justify-content:center;padding:12px;box-sizing:border-box}
.bk-plate img{max-width:100%;max-height:100%;object-fit:contain}.bk-plate b{font:800 26px 'Bricolage Grotesque',var(--font-display),sans-serif;text-align:center}
.bk-card-body{padding:20px 22px 22px;display:flex;flex-direction:column;gap:14px}
.bk-card-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.bk-card-title h3{margin:0;font-size:19px}.bk-card-title span{font-size:13px;color:#5E6660}
.bk-chips{display:flex;gap:8px;flex-wrap:wrap;font-size:13px}.bk-chip{padding:6px 10px;border-radius:8px;background:#F6F4EF}.bk-chip.is-warm{background:#FBE7E0;color:#8E2F14;font-weight:600}
.bk-remember{display:flex;align-items:center;gap:10px;font-size:14px;color:#5E6660}.bk-remember input{width:18px;height:18px;accent-color:#1B1F1D}
@media(max-width:650px){.bk-top{padding:14px 18px}.bk-account{font-size:0;gap:0}.bk-account span{font-size:14px}.bk-chooser-main{padding:24px 18px 40px}}
/* Estado da conexão */
.bk-status{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:#4f574f}
.bk-status i{width:8px;height:8px;border-radius:50%;background:#a3a69f}
.bk-status.is-live{color:#1e6b4a}.bk-status.is-live i{background:#2e8b5e}
.bk-status.is-syncing,.bk-status.is-connecting{color:#6e4e10}.bk-status.is-syncing i,.bk-status.is-connecting i{background:#d39b2a;animation:bk-pulse 1s infinite alternate}
.bk-status.is-offline,.bk-status.is-error{color:#9b2c1f}.bk-status.is-offline i,.bk-status.is-error i{background:#c0392b}
.bk-status.is-polling{color:#1f4566}.bk-status.is-polling i{background:#3d6f9a}
@keyframes bk-pulse{to{opacity:.35}}
@media(prefers-reduced-motion:reduce){.bk-status i{animation:none}}
/* Publicação do cardápio */
.bk-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:0 0 18px;padding:12px 16px;border:1px solid #cfe0cc;border-radius:12px;background:#eef5ec;font-size:13px;line-height:1.5}
.bk-bar.is-warn{border-color:#efd3a5;background:#fbefd9;color:#6e4e10}
.bk-bar .button{flex-shrink:0}
/* Senha do cliente */
.bk-ticket{min-height:100vh;box-sizing:border-box;padding:28px 18px 40px;display:flex;flex-direction:column;align-items:center;gap:18px;background:var(--brand-surface);font-family:var(--font-body),sans-serif}
.bk-ticket-brand{width:150px;border-radius:12px;overflow:hidden;line-height:0}.bk-ticket-brand img{width:100%}
.bk-ticket-card{width:100%;max-width:440px;box-sizing:border-box;padding:28px 24px;border-radius:22px;background:var(--brand-primary);color:var(--brand-on-primary);display:flex;flex-direction:column;gap:14px}
.bk-ticket-card .eyebrow{color:var(--brand-accent-soft);letter-spacing:.18em;font-weight:700}
.bk-ticket-card h1{margin:0;font:800 clamp(28px,8vw,38px)/1.08 var(--font-display),sans-serif;color:var(--brand-on-primary)}
.bk-ticket-card .bk-muted{color:var(--brand-on-primary-muted)}
.bk-ticket-lead{margin:0;font-size:18px;line-height:1.5}
.bk-ticket-card .bk-btn-ghost{margin-top:8px;background:transparent;color:var(--brand-on-primary);border-color:color-mix(in srgb,var(--brand-on-primary) 50%,transparent)}
.bk-ticket-card .bk-error{color:#ffd4c7}
.bk-ticket-menu{font-size:14px;font-weight:600;color:var(--brand-primary)}
.sl-row-links{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
/* Equipe e Convidar (telas do design; no celular a tabela vira cartões) */
.tm-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.tm-page{display:flex;flex-direction:column;gap:22px;color:#1B1F1D}
.tm-page .heading{align-items:flex-end;flex-wrap:wrap}.tm-page p.sub{margin-bottom:0;font-size:14px}
.tm-invite{display:inline-flex;align-items:center;gap:8px;height:48px;padding:0 20px;border:0;border-radius:12px;background:#C8431F;color:#fff;font-weight:600;font-size:15px}
.tm-tabs{display:flex;gap:4px;padding:4px;width:fit-content;max-width:100%;border-radius:12px;background:#EAE7DF}
.tm-tabs button{height:40px;padding:0 16px;border:0;border-radius:9px;background:transparent;font-weight:600;font-size:14px;color:#4A524C}
.tm-tabs button[aria-selected=true]{background:#fff;color:#1B1F1D;box-shadow:0 1px 3px #1B1F1D1F}
.tm-table-wrap{border:1px solid #E2DED4;border-radius:16px;background:#fff;overflow-x:auto}
.tm-table{width:100%;border-collapse:collapse;font-size:14px}
.tm-table th{padding:14px 12px;text-align:left;font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#5E6660}
.tm-table td{padding:14px 12px;border-top:1px solid #EFEDE6;color:#4A524C}
.tm-table th:first-child,.tm-table td:first-child{padding-left:20px}
.tm-person{display:flex;align-items:center;gap:12px}.tm-person>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.tm-person b{color:#1B1F1D}.tm-person b small{font-weight:500;color:#5E6660}.tm-person span{font-size:12px;color:#5E6660;overflow-wrap:anywhere}
.tm-avatar{flex-shrink:0;width:36px;height:36px;border-radius:50%;background:#EFEDE6;display:grid;place-items:center;font-size:13px;font-weight:700;color:#1B1F1D}.tm-avatar.is-pending{background:#FBE7E0;color:#8E2F14}
.tm-role{display:inline-block;padding:5px 10px;border-radius:8px;background:#F6F4EF;font-size:13px;font-weight:600;white-space:nowrap;color:#1B1F1D}
.tm-role.is-owner{background:#1B1F1D;color:#F6F4EF}
.tm-actions{text-align:right;width:56px}
.tm-more{width:40px;height:40px;border:0;border-radius:10px;background:transparent;font-size:20px;color:#5E6660}.tm-more:hover{background:#F6F4EF}
.tm-expired{color:#9b2c1f!important;font-weight:600}
.tm-empty{margin:0;padding:22px;border:1px dashed #D8D4C9;border-radius:16px;background:#fff;font-size:14px;color:#5E6660}
.tm-matrix{display:flex;flex-direction:column;gap:14px}.tm-matrix h2{font:800 22px 'Bricolage Grotesque',var(--font-display),sans-serif;letter-spacing:-.02em}.tm-matrix p{margin:4px 0 0;font-size:14px;color:#5E6660}
.tm-grid{min-width:680px}.tm-grid th{text-transform:none;letter-spacing:0;font-size:13px;color:#1B1F1D;font-weight:700}.tm-grid th:first-child{color:#5E6660;font-weight:600}.tm-grid td:first-child{color:#1B1F1D}
.tm-yes{color:#1E6B4A!important;font-weight:700}.tm-no{color:#8A908A!important}.tm-view{color:#8A5A12!important;font-weight:600}
dialog:has(.tm-dialog){width:min(640px,94vw);padding:28px;border-radius:22px}
.tm-dialog{display:flex;flex-direction:column;gap:18px;font-size:14px;color:#1B1F1D}
.tm-dialog p{margin:0;line-height:1.5}.tm-warn{padding:12px 14px;border-radius:12px;background:#FBEFD9;color:#6e4e10}
.tm-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.tm-dialog-head h2{margin:0 0 6px;font:800 26px 'Bricolage Grotesque',var(--font-display),sans-serif;letter-spacing:-.02em}.tm-dialog-head p{color:#5E6660}
.tm-close{flex-shrink:0;width:44px;height:44px;border:1px solid #E2DED4;border-radius:12px;background:#fff;font-size:16px}
.tm-field{margin:0;display:flex;flex-direction:column;gap:8px;font-size:14px;font-weight:600}.tm-field small{font-weight:400;color:#5E6660}
.tm-field input{margin:0;height:50px;padding:0 16px;border:1.5px solid #D8D4C9;border-radius:12px;font-size:16px}.tm-field input:focus{outline:2px solid #1B1F1D;outline-offset:1px}
.tm-roles,.tm-places{margin:0;padding:0;border:0;display:flex;flex-direction:column;gap:8px}.tm-roles legend,.tm-places legend{margin-bottom:10px;font-weight:600}
.tm-roles>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.tm-role-card{margin:0;display:flex;gap:12px;padding:14px;border:1.5px solid #E2DED4;border-radius:14px;cursor:pointer;font-size:14px}
.tm-role-card input,.tm-places input{display:inline-block;width:18px;height:18px;margin:2px 0 0;flex-shrink:0;accent-color:#C8431F}
.tm-role-card>span{display:flex;flex-direction:column;gap:4px}.tm-role-card>span>span{font-size:13px;line-height:1.45;color:#5E6660}
.tm-role-card:has(input:checked){border:2px solid #C8431F;background:#FDF3EF}
.tm-role-card.is-disabled{border-style:dashed;color:#5E6660;cursor:not-allowed}
.tm-places label{margin:0;display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid #E2DED4;border-radius:12px;font-size:15px}
.tm-dialog-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.tm-dialog-actions.is-split{justify-content:space-between}.tm-dialog-actions span{display:flex;gap:10px;flex-wrap:wrap}
.tm-stack{display:flex;flex-direction:column;gap:10px}
.tm-btn-primary,.tm-btn-ghost,.tm-btn-danger{min-height:48px;padding:0 18px;border-radius:12px;font-weight:600;font-size:15px}
.tm-btn-primary{border:0;background:#C8431F;color:#fff}.tm-btn-ghost{border:1.5px solid #D8D4C9;background:#fff;color:#1B1F1D}.tm-btn-danger{border:1.5px solid #E7B8AD;background:#fff;color:#9b2c1f}
.tm-btn-primary:disabled,.tm-btn-ghost:disabled,.tm-btn-danger:disabled{opacity:.6;cursor:wait}
@media(max-width:700px){
  .tm-invite{width:100%;justify-content:center}.tm-tabs{width:100%}.tm-tabs button{flex:1;padding:0 8px;font-size:13px}
  .tm-table-wrap:not(:has(.tm-grid)){border:0;background:transparent;overflow:visible}
  .tm-table:not(.tm-grid) thead{display:none}.tm-table:not(.tm-grid),.tm-table:not(.tm-grid) tbody{display:block}
  .tm-table:not(.tm-grid) tr{display:grid;grid-template-columns:1fr auto;gap:6px 12px;margin-bottom:10px;padding:12px;border:1px solid #E2DED4;border-radius:14px;background:#fff}
  .tm-table:not(.tm-grid) td{display:block;padding:0!important;border:0;font-size:13px}
  .tm-table:not(.tm-grid) td:first-child{grid-column:1}.tm-table:not(.tm-grid) td.tm-actions{grid-column:2;grid-row:1;width:auto}
  .tm-table:not(.tm-grid) td:nth-child(n+2):not(.tm-actions){grid-column:1/-1;padding-left:48px!important}
  .tm-roles>div{grid-template-columns:1fr}
}
/* Plataforma: módulos dos restaurantes (só o dono da plataforma vê, no /painel) */
.bk-platform{margin-top:28px}.bk-platform .bk-muted{margin:8px 0 14px}
.bk-platform-list{display:flex;flex-direction:column;border:1px solid #E2E0D8;border-radius:14px;background:#fff}
.bk-platform-row{display:flex;align-items:center;justify-content:space-between;gap:12px 20px;flex-wrap:wrap;padding:14px 16px;border-top:1px solid #EFEDE6}.bk-platform-row:first-child{border-top:0}
.bk-platform-row b{display:block;font-size:15px}.bk-platform-row small{font-size:12px;color:#7B857E}
.bk-platform-mods{display:flex;flex-wrap:wrap;gap:8px}.bk-mod{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid #E2E0D8;border-radius:999px;font-size:13px;cursor:pointer}
.bk-mod input{accent-color:#1B1F1D}
/* Editor do cardápio: histórico de alterações e o que ele não vê */
.bk-bar-actions{display:flex;flex-wrap:wrap;gap:8px}
.bk-history{max-width:640px}.bk-history h2{margin:0 0 6px}
.bk-history-list{display:flex;flex-direction:column;gap:12px;max-height:60vh;overflow:auto;margin:14px 0;padding:0;list-style:none}
.bk-history-list>li{padding:12px 14px;border:1px solid #E2E0D8;border-radius:12px;background:#fff}.bk-history-list>li>div{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
.bk-history-list small{font-size:12px;color:#7B857E}.bk-history-list ul{margin:8px 0 0;padding-left:18px;font-size:14px;line-height:1.5}
.tm-history{margin:22px 0;padding:16px 18px;border:1px solid #E2E0D8;border-radius:14px;background:#fff}
.tm-history-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.tm-history-head h2{margin:0;font-size:16px}
.tm-history ul{margin:10px 0 0;padding:0;list-style:none}.tm-history li{display:flex;gap:8px;flex-wrap:wrap;align-items:baseline;padding:8px 0;border-top:1px solid #EFEDE6;font-size:14px}.tm-history li:first-child{border-top:0}
.tm-history li span{color:#3E4540}.tm-history li small{margin-left:auto;font-size:12px;color:#7B857E}
.bk-menu-editor #edit-house-identity{display:none}
