/* Promoter — visual de salão: champagne, rosé, dourado e espresso */
:root {
  --cream: #FBF7F2; --paper: #FFFDFA; --card: #FFFFFF; --sand: #F3EADF; --champagne: #F8EFDF; --blush: #FBEEE8;
  --border: #EADFCF; --line: #F2E9DB; --text: #3B2F2A; --ink: #241B16; --muted: #8A7A6C;
  --gold: #C0902F; --gold-dark: #A67A22; --gold-light: #E8C468; --rose: #EAC9C0; --sage: #8FA58A;
  --danger: #A24B4B; --ok: #4F7A4A; --espresso: #14100c; --espresso-2: #1e1812;
  --radius: 18px; --side: 268px; --rail: 80px; --sw: var(--side);
  --sombra: 0 1px 2px rgba(60, 40, 10, .04), 0 10px 26px -16px rgba(80, 55, 10, .28);
  --sombra-alta: 0 22px 46px -24px rgba(80, 55, 10, .42);
  --topo: 0px; --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body:has(.suporte) { --topo: 44px; }
body {
  margin: 0; color: var(--text); font: 15px/1.55 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(1100px 520px at 88% -8%, #fbe6d6 0%, transparent 62%), radial-gradient(900px 520px at -8% 108%, #f6e8cc 0%, transparent 58%), var(--cream);
  background-attachment: fixed; min-height: 100vh;
}
a { color: var(--gold-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; color: var(--ink); }
h1 { font: 700 30px/1.15 var(--serif); letter-spacing: -.2px; }
h2 { font-size: 16px; font-weight: 700; }
.sub { color: var(--muted); margin: 6px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.ic { flex: none; display: block; }
::selection { background: #f0d9a0; }

/* ------------------------------------------------------------ estrutura */
.app { display: grid; grid-template-columns: var(--sw) minmax(0, 1fr); min-height: 100vh; }
.side-slot { position: relative; }
.coluna { min-width: 0; display: flex; flex-direction: column; }
.main { width: 100%; max-width: 1320px; padding: 26px 34px 56px; flex: 1; }

/* menu lateral */
.sidebar {
  position: fixed; z-index: 40; top: var(--topo); bottom: 0; left: 0; width: var(--sw); display: flex; flex-direction: column;
  background: linear-gradient(180deg, #1b150f 0%, #110d09 100%); color: #d9d0c1; overflow: hidden; transition: width .22s ease;
  box-shadow: 1px 0 0 rgba(212, 169, 63, .22);
}
.sidebar::before { /* fio dourado na borda */
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 1px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(232, 196, 104, .55) 18%, rgba(232, 196, 104, .08) 60%, rgba(232, 196, 104, .4) 100%);
}
.sidebar::after { /* marca d'água: tesoura de linha */
  content: ""; position: absolute; left: -34px; bottom: -34px; width: 200px; height: 200px; opacity: .06; pointer-events: none; transform: rotate(-24deg);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120' fill='none' stroke='%23E8C468' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='30' cy='86' r='16'/%3E%3Ccircle cx='30' cy='86' r='7'/%3E%3Ccircle cx='64' cy='98' r='16'/%3E%3Ccircle cx='64' cy='98' r='7'/%3E%3Cpath d='M41 74 100 8M55 84 110 30'/%3E%3C/svg%3E") center / contain no-repeat;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 16px; color: #fff; text-decoration: none !important; position: relative; z-index: 1; }
.brand img { width: 42px; height: 42px; object-fit: contain; flex: none; filter: drop-shadow(0 4px 12px rgba(212, 169, 63, .35)); }
.brand b { display: block; font: 700 20px var(--serif); letter-spacing: .4px; line-height: 1.15; }
.brand span { display: block; font-size: 11px; color: var(--gold-light); letter-spacing: 1.4px; text-transform: uppercase; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 12px 12px; position: relative; z-index: 1; scrollbar-width: thin; scrollbar-color: #3a2f20 transparent; }
.nav-sec { color: #8f7d52; font-size: 10.5px; font-weight: 700; letter-spacing: 2.2px; padding: 18px 10px 6px; text-transform: uppercase; white-space: nowrap; }
.nav-linha { display: none; }
.nav a {
  display: flex; align-items: center; gap: 13px; padding: 10px 12px; margin: 2px 0; border-radius: 12px; color: #d9d0c1; font-weight: 500; font-size: 14.5px;
  text-decoration: none; position: relative; white-space: nowrap; transition: background .15s, color .15s;
}
.nav a .ic { color: #a39578; transition: color .15s, transform .2s; }
.nav a:hover { background: rgba(212, 169, 63, .1); color: #fff; text-decoration: none; }
.nav a:hover .ic { color: var(--gold-light); transform: translateX(1px); }
.nav a.on { background: linear-gradient(90deg, rgba(212, 169, 63, .24), rgba(212, 169, 63, .05)); color: #f6d98a; font-weight: 700; }
.nav a.on .ic { color: var(--gold-light); }
.nav a.on::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: linear-gradient(180deg, var(--gold-light), var(--gold)); box-shadow: 0 0 14px rgba(232, 196, 104, .7); }
.nav a.volta { color: var(--gold-light); margin-bottom: 4px; }
.contador, .tabbar em { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: linear-gradient(135deg, #e7a27f, #d9822b); color: #fff; font: 700 11.5px/20px "Segoe UI", sans-serif; font-style: normal; text-align: center; }

.side-foot { position: relative; z-index: 1; padding: 10px 12px 12px; border-top: 1px solid rgba(212, 169, 63, .16); display: flex; flex-direction: column; gap: 6px; }
.recolher { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: #8f8670; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.recolher:hover { color: var(--gold-light); background: rgba(212, 169, 63, .08); }
.usuario-lado { display: flex; align-items: center; gap: 12px; padding: 6px 4px 6px 6px; white-space: nowrap; }
.usuario-lado > div { flex: 1; min-width: 0; }
.usuario-lado b { display: block; color: #fff; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.usuario-lado small { color: #9d927a; font-size: 12px; }
.avatar-mini { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #e8c468, #b5832a); color: #2a1d08; font: 700 13px var(--serif); box-shadow: 0 0 0 2px rgba(255, 255, 255, .08); }
.sair-lado { margin: 0; }
.sair-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(212, 169, 63, .3); background: transparent; color: #f2d078; cursor: pointer; transition: .15s; }
.sair-ic:hover { background: linear-gradient(135deg, #c9a13f, #a67a22); color: #fff; border-color: transparent; }
.sair-gaveta { display: none; margin: 0; }
.btn-sair { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px 12px; background: transparent; color: #f2d078; border: 1px solid rgba(212, 169, 63, .4); border-radius: 11px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: .15s; }
.btn-sair:hover { background: linear-gradient(135deg, #c9a13f, #a67a22); color: #fff; border-color: transparent; }

/* barra de cima */
.barra { position: sticky; top: var(--topo); z-index: 30; display: flex; align-items: center; gap: 16px; padding: 12px 34px; background: rgba(251, 247, 242, .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(234, 223, 207, .8); }
.barra-menu, .barra-marca { display: none; }
.barra-info { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.barra-data { color: var(--muted); font-size: 14px; display: inline-block; }
.barra-data::first-letter { text-transform: uppercase; }
.chip-salao { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 20px; background: var(--champagne); border: 1px solid #ecdcb8; color: #6b4f14; font-size: 13px; font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-salao i { width: 8px; height: 8px; border-radius: 50%; background: #5fae56; box-shadow: 0 0 0 3px rgba(95, 174, 86, .2); flex: none; }
.barra-direita { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.sino { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #fff; border: 1px solid var(--border); color: var(--gold-dark); }
.sino em { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: linear-gradient(135deg, #e7a27f, #d9822b); color: #fff; font: 700 11.5px/20px sans-serif; font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--cream); }
.sino:hover { background: var(--champagne); text-decoration: none; }
.usuario-menu { position: relative; }
.usuario-menu summary { list-style: none; display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px; border-radius: 30px; background: #fff; border: 1px solid var(--border); cursor: pointer; color: var(--ink); }
.usuario-menu summary::-webkit-details-marker { display: none; }
.usuario-menu summary:hover, .usuario-menu[open] summary { background: var(--champagne); }
.usuario-nome { font-weight: 600; font-size: 14px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usuario-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--sombra-alta); padding: 8px; z-index: 50; animation: surge .16s ease; }
.usuario-cab { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.usuario-cab b { display: block; color: var(--ink); }
.usuario-cab small { color: var(--muted); }
.usuario-pop a, .usuario-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; text-decoration: none; }
.usuario-pop a:hover, .usuario-pop button:hover { background: var(--champagne); text-decoration: none; }
.usuario-pop button { color: var(--danger); }
.usuario-pop form { margin: 0; }
@keyframes surge { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* abas de baixo e cortina (celular) */
.tabbar, .cortina { display: none; }

/* modo recolhido (computador): só os ícones; os nomes aparecem ao passar o mouse */
@media (min-width: 801px) {
  html.recolhido { --sw: var(--rail); }
  html.recolhido .sidebar .rotulo, .sidebar .rotulo { transition: opacity .15s; }
  html.recolhido .sidebar:not(:hover) .rotulo { display: none; }
  html.recolhido .sidebar:not(:hover) .nav-sec { display: none; }
  html.recolhido .sidebar:not(:hover) .nav-linha { display: block; height: 1px; margin: 14px 12px 8px; background: rgba(212, 169, 63, .18); }
  html.recolhido .sidebar:not(:hover) .brand, html.recolhido .sidebar:not(:hover) .nav a, html.recolhido .sidebar:not(:hover) .recolher, html.recolhido .sidebar:not(:hover) .usuario-lado { justify-content: center; }
  html.recolhido .sidebar:not(:hover) .nav a { padding: 11px 0; }
  html.recolhido .sidebar:not(:hover) .nav a.on::before { left: -12px; }
  html.recolhido .sidebar:not(:hover) .contador { position: absolute; top: 3px; right: 10px; margin: 0; min-width: 16px; height: 16px; font-size: 10px; line-height: 16px; padding: 0 4px; }
  html.recolhido .sidebar:not(:hover) .recolher .ic { transform: rotate(180deg); }
  html.recolhido .sidebar:not(:hover) .usuario-lado { padding: 6px 0; }
  html.recolhido .sidebar:hover { width: var(--side); box-shadow: 18px 0 50px -20px rgba(0, 0, 0, .55); }
}

/* ------------------------------------------------------------ cabeçalho das páginas */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1::after { content: ""; display: block; width: 46px; height: 3px; margin-top: 10px; border-radius: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
.page-head .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ------------------------------------------------------------ componentes */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--sombra); }
.card + .card, .grid + .card, .card + .grid, .grid + .grid { margin-top: 18px; }
.card h2 { margin-bottom: 12px; font-family: var(--serif); font-size: 18px; }
.card-title { color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 6px; }
.card-value { font-size: 26px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.card-note { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.stat { display: flex; align-items: center; gap: 16px; }
.stat-ic { flex: none; width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; color: var(--gold-dark); background: linear-gradient(135deg, #fff3d6, #f6ddd5); box-shadow: inset 0 0 0 1px rgba(192, 144, 47, .18); }
.grid { display: grid; gap: 18px; }
.grid > .card, .grid > .card + .card { margin-top: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }

.boas-vindas { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; padding: 28px 32px; border-radius: 24px; border: 1px solid #efdcc0;
  background: radial-gradient(500px 200px at 100% 0%, #fde9d8 0%, transparent 70%), linear-gradient(120deg, #fff6e0 0%, #fbeee6 60%, #f6e3dc 100%); box-shadow: var(--sombra); }
.boas-vindas::after { content: ""; position: absolute; right: 26px; top: -14px; width: 190px; height: 190px; opacity: .22; pointer-events: none; transform: rotate(14deg);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120' fill='none' stroke='%23A67A22' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='30' cy='86' r='16'/%3E%3Ccircle cx='30' cy='86' r='7'/%3E%3Ccircle cx='64' cy='98' r='16'/%3E%3Ccircle cx='64' cy='98' r='7'/%3E%3Cpath d='M41 74 100 8M55 84 110 30'/%3E%3C/svg%3E") center / contain no-repeat; }
.boas-vindas > * { position: relative; z-index: 1; }
.boas-vindas .data { display: block; color: var(--gold-dark); font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 6px; }
.boas-vindas h1 { font-size: 32px; }
.boas-vindas .actions { display: flex; gap: 10px; flex-wrap: wrap; }

.hero { background: linear-gradient(135deg, #FFF3D6, #F6DDD5); border: 1px solid #efdcc0; border-radius: 22px; padding: 24px 26px; box-shadow: var(--sombra); }
.hero.elite { background: linear-gradient(135deg, #EFE7FF, #F6DDD5); border-color: #7C5CC4; }
.avatar { width: 66px; height: 66px; border-radius: 50%; background: linear-gradient(135deg, #e8c468, #b5832a); color: #fff; display: grid; place-items: center; font: 700 23px var(--serif); flex: none; box-shadow: 0 8px 18px -8px rgba(166, 122, 34, .8); }
.avatar.elite { background: linear-gradient(135deg, #9b7ee0, #6a49b8); box-shadow: 0 0 0 3px #fff, 0 0 0 5px #7C5CC4; }
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.progress { height: 10px; background: var(--sand); border-radius: 6px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: 12px; padding: 9px 18px; font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; line-height: 1.3; text-align: center; transition: background .15s, box-shadow .15s, transform .1s, border-color .15s; }
.btn:hover { background: var(--champagne); border-color: #e4d2ac; text-decoration: none; box-shadow: 0 8px 18px -12px rgba(120, 85, 15, .5); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(120deg, #cfa741, #a67a22 55%, #d9b04a); background-size: 180% 100%; color: #fff; border-color: transparent; padding: 11px 24px; box-shadow: 0 12px 22px -12px rgba(166, 122, 34, .9); text-shadow: 0 1px 0 rgba(0, 0, 0, .08); }
.btn.primary:hover { background-position: 100% 0; box-shadow: 0 16px 26px -12px rgba(166, 122, 34, .95); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: #fbeded; border-color: #e5c3c3; }
.btn.sm { padding: 5px 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { color: var(--muted); background: var(--sand); cursor: not-allowed; box-shadow: none; }
.inline { display: inline; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 5px; letter-spacing: .3px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%; background: var(--paper); color: var(--text); border: 1px solid var(--border); border-radius: 12px; padding: 10px 13px; font: inherit; min-height: 44px; transition: border-color .15s, box-shadow .15s, background .15s;
}
select { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A67A22' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 17px; }
input:hover, select:hover, textarea:hover { border-color: #dcc9a6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); background: #fff; box-shadow: 0 0 0 4px rgba(192, 144, 47, .16); }
textarea { min-height: 88px; resize: vertical; }
select.sm { width: auto; min-height: 34px; padding: 4px 32px 4px 10px; font-size: 13px; border-radius: 10px; background-position: right 9px center; background-size: 15px; }
.field { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--text); font-size: 15px; letter-spacing: 0; }
.check input { width: 19px; height: 19px; accent-color: var(--gold); flex: none; }
.err { color: var(--danger); font-size: 13px; margin-top: 3px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
code { background: var(--champagne); border-radius: 6px; padding: 1px 6px; font-size: 13px; }

.alert { border-radius: 14px; padding: 12px 16px; margin-bottom: 18px; border: 1px solid; border-left-width: 5px; box-shadow: var(--sombra); }
.alert.ok { background: #F1F8EF; border-color: #CFE2CB; border-left-color: #6fae66; color: #365A31; }
.alert.erro { background: #FDF1F1; border-color: #EBCACA; border-left-color: #c96a6a; color: var(--danger); }
.alert.festa { background: #FFF9EA; border-color: #EBD9A4; border-left-color: var(--gold); color: var(--text); }
.alert ul { margin: 4px 0 0; padding-left: 20px; }

table { width: 100%; border-collapse: collapse; }
.table-wrap { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--sombra); -webkit-overflow-scrolling: touch; }
th { background: linear-gradient(180deg, #fbf3e4, #f6ecd9); color: #7d6a4c; font-size: 11.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: #fffaf0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 34px; text-align: center; color: var(--muted); }

.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 11px; border-radius: 20px; background: var(--sand); color: #7d6e5e; border: 1px solid var(--border); letter-spacing: .2px; white-space: nowrap; }
.badge.ok { background: #EEF7EC; color: var(--ok); border-color: #CBE0C6; }
.badge.warn { background: #FFF3D6; color: var(--gold-dark); border-color: #EBD08E; }
.badge.bad { background: #FBEDED; color: var(--danger); border-color: #E5C3C3; }
.badge.elite { background: #EFE7FF; color: #7C5CC4; border-color: #b9a3ea; }

.preview { text-align: center; }
.preview .card-value { font-size: 24px; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.insignia { background: linear-gradient(160deg, #FFFAEB, #FFF3D6); border: 1px solid #ebd08e; border-radius: 18px; padding: 16px; box-shadow: var(--sombra); }
.insignia.off { background: var(--sand); border: 1px dashed var(--border); color: var(--muted); box-shadow: none; }
.insignia .ic-emoji, .insignia .ic { font-size: 28px; }
.insignia.off .ic { filter: grayscale(1); opacity: .5; }
.insignia b { display: block; margin-top: 4px; color: var(--ink); }
.insignia.off b { color: var(--muted); }
.insignia span { font-size: 12.5px; }
.rank li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); gap: 8px; }
.rank { list-style: none; margin: 0; padding: 0; }
.rank li:last-child { border: none; }
details.card summary { cursor: pointer; font-weight: 700; }
.suporte { position: sticky; top: 0; z-index: 60; height: 44px; flex-wrap: nowrap; overflow: hidden; background: linear-gradient(90deg, #14100c, #2a1f12); color: #fff; padding: 9px 16px; display: flex; gap: 14px; align-items: center; justify-content: center; font-size: 14px; border-bottom: 1px solid rgba(212, 169, 63, .4); }
.suporte span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suporte form { margin: 0; flex: none; }
.suporte button { background: linear-gradient(135deg, #c9a13f, #a67a22); color: #fff; border: 0; border-radius: 9px; padding: 6px 14px; cursor: pointer; font: inherit; font-weight: 600; }

/* telas simples (acesso suspenso) */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(135deg, #FFF3D6, #FBF7F2 55%, #F6DDD5); }
.auth .card { width: 100%; max-width: 440px; padding: 30px; }
.login-form h1 { font-size: 30px; margin-bottom: 4px; }
.login-form .sub { margin-bottom: 24px; }
.login-form .ajuda { margin-top: 22px; text-align: center; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------ agenda */
.agenda-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--sombra); -webkit-overflow-scrolling: touch; }
.agenda { min-width: calc(64px + var(--cols) * 150px); }
.ag-head { display: grid; grid-template-columns: 64px repeat(var(--cols), minmax(150px, 1fr)); background: linear-gradient(180deg, #fbf3e4, #f6ecd9); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 3; }
.ag-title { padding: 12px 8px; font-weight: 700; text-align: center; border-left: 1px solid var(--border); text-transform: capitalize; color: var(--ink); }
.ag-title.hoje { color: var(--gold-dark); }
.ag-body { display: grid; grid-template-columns: 64px repeat(var(--cols), minmax(150px, 1fr)); position: relative; }
.ag-horas { position: sticky; left: 0; z-index: 2; background: var(--card); }
.ag-horas span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11.5px; color: var(--muted); background: var(--card); padding: 0 2px; font-variant-numeric: tabular-nums; }
.ag-horas span:first-child { transform: none; }
.ag-col { position: relative; border-left: 1px solid var(--border); cursor: cell; background-image: linear-gradient(to bottom, #EFE4D2 1px, transparent 1px); background-repeat: repeat-y; }
.ag-col.hoje { background-color: #FFFBF1; }
.ag-item { position: absolute; left: 4px; right: 4px; overflow: hidden; text-align: left; border: 1px solid; border-left-width: 4px; border-radius: 10px; padding: 4px 8px; font: inherit; font-size: 13px; line-height: 1.25; cursor: pointer; z-index: 1; box-shadow: 0 4px 10px -6px rgba(60, 40, 10, .3); }
.ag-item small { display: block; opacity: .75; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-item:hover { filter: brightness(.97); box-shadow: 0 8px 18px -8px rgba(60, 40, 10, .45); }
.st-agendado { background: #FFF3D6; border-color: #E0BD6B; color: #5b4310; }
.st-confirmado { background: #EAF4E6; border-color: #7FAA77; color: #2f4f2a; }
.st-concluido { background: #EFE7FF; border-color: #8D74CF; color: #3f2f73; }
.st-faltou { background: #FBEDED; border-color: #D79A9A; color: #7a3333; }
.st-pendente { background: #FFF; border-color: #D9822B; color: #7a4a10; background-image: repeating-linear-gradient(135deg, rgba(217, 130, 43, .12) 0 6px, transparent 6px 12px); }
.badge.st-agendado, .badge.st-confirmado, .badge.st-concluido, .badge.st-faltou, .badge.st-pendente { border-width: 1px; border-style: solid; }
dialog { border: 1px solid var(--border); border-radius: 22px; padding: 24px; width: min(640px, calc(100vw - 24px)); background: var(--cream); color: var(--text); box-shadow: 0 30px 70px rgba(0, 0, 0, .35); }
dialog::backdrop { background: rgba(20, 14, 8, .6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dlg-acoes { display: flex; gap: 8px; margin-top: 4px; }
.dlg-extra { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }

/* ------------------------------------------------------------ responsivo */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: 1fr; }
}

/* tablet: o menu vira uma coluna de ícones (os nomes aparecem ao passar o dedo ou o mouse) */
@media (min-width: 801px) and (max-width: 1180px) {
  :root { --sw: var(--rail); }
  .sidebar:not(:hover) .rotulo, .sidebar:not(:hover) .nav-sec { display: none; }
  .sidebar:not(:hover) .nav-linha { display: block; height: 1px; margin: 14px 12px 8px; background: rgba(212, 169, 63, .18); }
  .sidebar:not(:hover) .brand, .sidebar:not(:hover) .nav a, .sidebar:not(:hover) .recolher, .sidebar:not(:hover) .usuario-lado { justify-content: center; }
  .sidebar:not(:hover) .nav a { padding: 11px 0; }
  .sidebar:not(:hover) .contador { position: absolute; top: 3px; right: 10px; margin: 0; min-width: 16px; height: 16px; font-size: 10px; line-height: 16px; padding: 0 4px; }
  .sidebar:not(:hover) .recolher { display: none; }
  .sidebar:not(:hover) .usuario-lado { padding: 6px 0; }
  .sidebar:hover { width: var(--side); box-shadow: 18px 0 50px -20px rgba(0, 0, 0, .55); }
  .main { padding: 22px 24px 48px; }
  .barra { padding: 12px 24px; }
}

/* celular: menu gaveta + abas embaixo */
@media (max-width: 800px) {
  :root { --sw: 0px; }
  .app { display: block; }
  .side-slot { display: contents; }
  .sidebar { width: min(86vw, 320px); transform: translateX(-102%); transition: transform .24s ease; box-shadow: none; }
  body.menu-aberto .sidebar { transform: none; box-shadow: 24px 0 60px rgba(0, 0, 0, .5); }
  .recolher { display: none; }
  .sair-gaveta { display: block; }
  .usuario-lado .sair-lado { display: none; }
  .cortina { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(20, 14, 8, .55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.menu-aberto .cortina { opacity: 1; pointer-events: auto; }
  body.menu-aberto { overflow: hidden; }

  .barra { padding: 9px 14px; gap: 10px; background: linear-gradient(180deg, #1b150f, #14100c); border-bottom: 1px solid rgba(212, 169, 63, .3); }
  .barra-menu { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid rgba(212, 169, 63, .35); background: rgba(212, 169, 63, .08); color: var(--gold-light); cursor: pointer; }
  .barra-marca { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none !important; }
  .barra-marca img { width: 30px; height: 30px; object-fit: contain; }
  .barra-marca b { font: 700 18px var(--serif); }
  .barra-info, .usuario-nome, .usuario-menu summary > .ic { display: none; }
  .usuario-menu summary { padding: 3px; background: transparent; border-color: rgba(212, 169, 63, .35); }
  .sino { background: rgba(212, 169, 63, .08); border-color: rgba(212, 169, 63, .35); color: var(--gold-light); width: 40px; height: 40px; }
  .sino em { box-shadow: 0 0 0 2px #14100c; }
  .usuario-pop { right: 0; }

  .main { padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
  h1 { font-size: 25px; }
  .boas-vindas { padding: 22px 20px; border-radius: 20px; }
  .boas-vindas h1 { font-size: 25px; }
  .boas-vindas::after { width: 130px; height: 130px; right: -10px; opacity: .16; }
  .g2, .g3, .form-grid { grid-template-columns: 1fr; }
  .card { padding: 18px; }

  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 253, 250, .94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--border); box-shadow: 0 -10px 30px -18px rgba(80, 55, 10, .5); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 0 3px; border: 0; background: none; color: #9a8b78; font: inherit; font-size: 11px; font-weight: 600; text-decoration: none; cursor: pointer; }
  .tabbar .aba-ic { position: relative; display: grid; place-items: center; width: 44px; height: 30px; border-radius: 15px; transition: background .15s; }
  .tabbar a.on, .tabbar button:active { color: var(--gold-dark); }
  .tabbar a.on .aba-ic { background: linear-gradient(135deg, #fff0cc, #f7dcc9); }
  .tabbar em { position: absolute; top: -4px; right: 0; margin: 0; min-width: 17px; height: 17px; font-size: 10.5px; line-height: 17px; padding: 0 4px; }
  .tabbar a.fab { margin-top: -22px; }
  .tabbar a.fab .aba-ic { width: 58px; height: 58px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #d9b04a, #a67a22); box-shadow: 0 14px 24px -10px rgba(166, 122, 34, .95), 0 0 0 5px rgba(255, 253, 250, .96); }
  .tabbar a.fab.on .aba-ic { background: linear-gradient(135deg, #e8c468, #b5832a); }
  .tabbar a.fab span:last-child { color: var(--gold-dark); }
  .suporte { font-size: 13px; padding: 7px 12px; }
}
@media (max-width: 480px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .g4 > .stat { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; }
  .g4 .card-value { font-size: 20px; }
  .g4 .stat-ic { width: 42px; height: 42px; border-radius: 13px; }
  .page-head .actions { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* mensagens prontas (WhatsApp) */
.abas-msg { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.abas-msg .contagem { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: var(--gold); color: #fff; font-size: 11.5px; font-weight: 700; }
.abas-msg .btn.primary .contagem { background: #fff; color: var(--gold-dark); }
.msg-item + .msg-item { margin-top: 12px; }
.msg-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.msg-texto { min-height: 76px; font-size: 14px; }
code { background: var(--champagne); border-radius: 6px; padding: 1px 6px; font-size: 12.5px; }

/* agenda: modos de visualização, mês, lista e arrastar */
.visoes { display: inline-flex; gap: 0; }
.visoes .btn { border-radius: 0; margin-left: -1px; }
.visoes .btn:first-child { border-radius: 12px 0 0 12px; margin-left: 0; } .visoes .btn:last-child { border-radius: 0 12px 12px 0; }
.ag-item.arrastando { opacity: .45; }
.ag-item[draggable=true] { cursor: grab; } .ag-item[draggable=true]:active { cursor: grabbing; }
.ag-col.alvo { background-color: #FFF7DE; outline: 2px dashed var(--gold); outline-offset: -2px; }
.ag-guia { position: absolute; left: 0; right: 0; height: 2px; background: var(--gold); z-index: 5; pointer-events: none; }
.ag-guia::after { content: attr(data-h); position: absolute; right: 6px; top: -9px; background: var(--gold); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.mes { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--sombra); overflow: hidden; }
.mes-cab, .mes-linha { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mes-cab { background: linear-gradient(180deg, #fbf3e4, #f6ecd9); border-bottom: 1px solid var(--border); }
.mes-cab span { padding: 10px 6px; text-align: center; font-weight: 700; text-transform: capitalize; color: var(--ink); font-size: 13px; }
.mes-dia { min-height: 118px; padding: 6px; border-left: 1px solid var(--line); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.mes-dia:first-child { border-left: 0; }
.mes-dia.fora { background: #FBF8F3; } .mes-dia.fora .mes-num { color: var(--muted); opacity: .6; }
.mes-dia.hoje { background: #FFFBF1; box-shadow: inset 0 0 0 2px var(--gold); }
.mes-topo { display: flex; align-items: center; gap: 6px; }
.mes-num { flex: none; font-weight: 700; color: var(--ink); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; text-decoration: none; }
.mes-num:hover { background: var(--champagne); text-decoration: none; }
.mes-dia.hoje .mes-num { background: var(--gold); color: #fff; }
.mes-conta { display: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--gold); color: #fff; font-size: 11.5px; font-weight: 700; place-items: center; }
.mes-novo { margin-left: auto; width: 24px; height: 24px; border: 1px dashed var(--border); border-radius: 50%; background: #fff; color: var(--gold-dark); cursor: pointer; opacity: 0; transition: opacity .15s; line-height: 1; font-size: 15px; }
.mes-dia:hover .mes-novo, .mes-novo:focus-visible { opacity: 1; }
.mes-chip { display: block; width: 100%; text-align: left; border: 1px solid; border-left-width: 3px; border-radius: 8px; padding: 2px 6px; font: inherit; font-size: 12px; line-height: 1.3; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mes-chip:hover { filter: brightness(.96); }
.mes-mais { font-size: 12px; color: var(--gold-dark); font-weight: 700; padding: 0 4px; }
.lista-dia + .lista-dia { margin-top: 18px; }
.lista-dia h3 { font: 700 16px var(--serif); color: var(--ink); margin: 0 0 8px; } .lista-dia h3.hoje { color: var(--gold-dark); }
.lista-linha { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: 14px; padding: 10px 14px; margin-bottom: 8px; cursor: pointer; box-shadow: var(--sombra); transition: transform .15s, box-shadow .15s; }
.lista-linha:hover, .lista-linha:focus-visible { transform: translateY(-1px); box-shadow: var(--sombra-alta); outline: none; }
.lista-hora b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; } .lista-hora small { color: var(--muted); font-size: 12px; }
.lista-info b { display: block; } .lista-acoes { display: flex; gap: 6px; } .lista-acoes form { margin: 0; }
.st-borda-confirmado { border-left-color: #7FAA77; } .st-borda-concluido { border-left-color: #8D74CF; } .st-borda-faltou { border-left-color: #D79A9A; } .st-borda-pendente { border-left-color: #D9822B; }
@media (max-width: 800px) {
  .mes-dia { min-height: 64px; padding: 4px; } .mes-chip, .mes-mais, .mes-novo { display: none; } .mes-conta { display: inline-grid; margin-left: auto; }
  .mes-cab span { font-size: 11px; padding: 8px 2px; }
  .lista-linha { grid-template-columns: 62px minmax(0, 1fr); } .lista-linha .badge { grid-column: 2; justify-self: start; } .lista-acoes { grid-column: 1 / -1; }
  .visoes { flex-wrap: wrap; }
}
