/* Mesmo desenho do painel atual (admin-backoffice), com fontes e ícones servidos por nós (CSP estrita). */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../vendor/inter/inter-latin-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../vendor/inter/inter-latin-500.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../vendor/inter/inter-latin-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../vendor/inter/inter-latin-ext-400.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg-body: #f3f4f6; --bg-sidebar: #1f2937; --text-sidebar: #ffffff; --text-sidebar-muted: #9ca3af;
  --bg-card: #ffffff; --text-main: #111827; --text-muted: #6b7280; --border-color: #e5e7eb;
  --bg-input: #ffffff; --hover-bg: #f9fafb;
  --primary: #4f46e5; --primary-hover: #4338ca; --danger: #ef4444; --success: #10b981; --info: #3b82f6;
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --scrollbar-track: #e5e7eb; --scrollbar-thumb: #d1d5db; --scrollbar-thumb-hover: #9ca3af;
}
[data-theme="dark"] {
  --bg-body: #111827; --bg-sidebar: #0f172a; --text-sidebar: #e2e8f0;
  --bg-card: #1f2937; --text-main: #f3f4f6; --text-muted: #9ca3af; --border-color: #374151;
  --bg-input: #374151; --hover-bg: #2d3748;
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.3); --shadow-md: 0 4px 6px -1px rgba(0,0,0,.4);
  --scrollbar-track: #1f2937; --scrollbar-thumb: #4b5563; --scrollbar-thumb-hover: #6b7280;
}
* { box-sizing: border-box; }
body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; margin: 0; background: var(--bg-body); color: var(--text-main); transition: background-color .4s ease, color .4s ease; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h2, h3 { color: var(--text-main); }
h3 { margin: 0 0 15px; }
.card h2 { margin: 0 0 15px; font-size: 1.15rem; }
.muted { color: var(--text-muted); font-size: .9rem; }
.text-center { text-align: center; }

/* ---- Entrada (login e afins): igual ao login do painel atual ---- */
body.guest-body { background: #f3f4f6; display: flex; align-items: center; justify-content: center; min-height: 100vh; font-family: "Inter", sans-serif; }
[data-theme="dark"] body.guest-body { background: var(--bg-body); }
.login-container { background: #fff; padding: 2.5rem; border-radius: 12px; box-shadow: var(--shadow-md); width: 100%; max-width: 400px; text-align: center; animation: fadeInUp .4s ease-out; }
[data-theme="dark"] .login-container { background: var(--bg-card); }
.login-container h2 { color: #1f2937; margin: 0 0 .5rem; font-weight: 600; font-size: 1.5rem; }
[data-theme="dark"] .login-container h2 { color: var(--text-main); }
.icon-wrapper { background: #e0e7ff; color: #4f46e5; width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; font-size: 1.75rem; }
p.subtitle { color: #6b7280; font-size: .875rem; margin: 0 0 2rem; }
.login-container .form-group { text-align: left; margin-bottom: 1rem; }
.login-container .form-group label { font-weight: 500; font-size: .875rem; color: #374151; }
[data-theme="dark"] .login-container .form-group label { color: var(--text-main); }
.login-container input[type=text], .login-container input[type=email], .login-container input[type=password] { padding: .75rem 1rem; border-radius: 6px; border-color: #d1d5db; }
.login-container input:focus { box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.login-container .btn { width: 100%; padding: .75rem; font-size: 1rem; margin-top: 1rem; }
.login-container .links { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 15px; font-size: .85rem; }
.login-container .check { text-align: left; }
.pass-wrap { position: relative; }
.pass-wrap .toggle-pass { position: absolute; right: 15px; top: 38px; cursor: pointer; color: #aaa; background: none; border: 0; padding: 0; }
.code-input { text-align: center; letter-spacing: 4px; font-size: 1.2rem; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Aplicação: barra lateral e conteúdo ---- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 260px; background: var(--bg-sidebar); color: var(--text-sidebar); display: flex; flex-direction: column; padding: 20px; box-shadow: 2px 0 10px rgba(0,0,0,.1); border-right: 1px solid var(--border-color); z-index: 20; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar h2 { font-size: 1.2rem; margin: 0 0 30px; border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: 15px; color: var(--text-sidebar); display: flex; align-items: center; gap: 10px; }
.sidebar .btn-menu { width: 100%; text-align: left; background: transparent; border: none; color: var(--text-sidebar-muted); padding: 12px 15px; cursor: pointer; border-radius: 8px; font: inherit; font-size: .95rem; margin-bottom: 5px; transition: all .2s ease; display: flex; align-items: center; text-decoration: none; }
.sidebar .btn-menu i { width: 24px; text-align: center; margin-right: 10px; }
.sidebar .btn-menu:hover, .sidebar .btn-menu.active { background: var(--primary); color: #fff; transform: translateX(3px); text-decoration: none; }
.sidebar .group { margin-top: 20px; padding-top: 10px; border-top: 1px solid #374151; }
.sidebar .bottom { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 15px; }
.sidebar .who { padding: 10px; font-size: .85rem; line-height: 1.4; margin-bottom: 10px; color: var(--text-sidebar-muted); }
.sidebar .who strong { color: var(--text-sidebar); display: block; }
.sidebar .who .org { display: block; margin-bottom: 6px; }
.logout-link { color: var(--danger); background: none; border: 0; text-align: left; display: block; width: 100%; padding: 10px; font: inherit; font-size: .9rem; cursor: pointer; transition: opacity .2s; margin-top: 10px; }
.logout-link:hover { opacity: .8; }
.content { flex: 1; padding: 30px; position: relative; min-width: 0; }
h2.page-title { margin: 0 0 20px; font-size: 1.6rem; font-weight: 700; }

/* ---- Componentes ---- */
.card { background: var(--bg-card); border-radius: 12px; box-shadow: var(--shadow-sm); padding: 25px; margin-bottom: 20px; border: 1px solid var(--border-color); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: .9rem; color: var(--text-main); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=tel], input[type=url], input[type=search], select { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px; font-size: .95rem; background: var(--bg-input); color: var(--text-main); transition: border-color .2s, box-shadow .2s; font-family: inherit; }
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.2); }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 1rem; font-size: .9rem; }
.check input { width: auto; }
.btn { padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer; font-weight: 500; font-size: .95rem; font-family: inherit; transition: background .2s; display: inline-block; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-primary { background: #4f46e5; color: #fff; } .btn-primary:hover { background: #4338ca; }
.btn-secondary { background: var(--bg-input); color: var(--text-main); border: 1px solid var(--border-color); } .btn-secondary:hover { background: var(--hover-bg); }
.btn-danger { background: var(--danger); color: #fff; } .btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 5px 10px; font-size: .85rem; }
.btn-block { width: 100%; }
.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; text-align: left; }
.alert.error { background: rgba(239,68,68,.1); color: var(--danger); border: 1px solid var(--danger); }
.alert.ok { background: rgba(16,185,129,.1); color: var(--success); border: 1px solid var(--success); }
.table-responsive { overflow-x: auto; border-radius: 8px; border: 1px solid var(--border-color); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 15px; background: var(--hover-bg); border-bottom: 1px solid var(--border-color); font-weight: 600; color: var(--text-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
td { padding: 15px; border-bottom: 1px solid var(--border-color); font-size: .95rem; vertical-align: middle; color: var(--text-main); }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--hover-bg); }
.action-buttons { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.action-buttons form { display: flex; gap: 6px; align-items: center; margin: 0; }
.action-buttons select { width: auto; padding: 5px 8px; font-size: .85rem; }
.badge { padding: 4px 8px; border-radius: 4px; font-size: .75rem; font-weight: 600; text-transform: uppercase; display: inline-block; text-align: center; }
.badge-admin { background: rgba(79,70,229,.1); color: var(--primary); }
.badge-client { background: rgba(16,185,129,.1); color: var(--success); }
.badge-warning { background: #d97706; color: #fff; }
.qr { background: #fff; display: inline-block; padding: 12px; border-radius: 8px; }
.qr svg { width: 200px; height: 200px; display: block; }
.codes { columns: 2; font-family: monospace; padding-left: 1.2rem; }
.linkbtn { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0; font: inherit; font-size: .85rem; }

.mobile-bar, .sidebar-backdrop { display: none; }
@media (max-width: 900px) {
  .shell { display: block; }
  .mobile-bar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 30; height: 56px; padding: 0 12px; background: var(--bg-sidebar); color: var(--text-sidebar); border-bottom: 1px solid var(--border-color); }
  .menu-toggle { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; color: var(--text-sidebar); font-size: 1.25rem; border-radius: 8px; cursor: pointer; }
  .menu-toggle:hover, .menu-toggle:focus-visible { background: rgba(255,255,255,.1); }
  .mobile-brand { font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: 10px; }
  /* a barra lateral continua a ser uma barra lateral: sai do ecrã e entra por cima como uma gaveta */
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: min(300px, 86vw); height: 100vh; height: 100dvh; z-index: 50; transform: translateX(-105%); transition: transform .25s ease; box-shadow: none; padding-bottom: calc(20px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
  body.menu-open .sidebar { transform: none; box-shadow: 6px 0 30px rgba(0,0,0,.45); }
  body.menu-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 40; }
  body.menu-open { overflow: hidden; }
  .sidebar .btn-menu { min-height: 44px; }
  .sidebar .btn-menu:hover, .sidebar .btn-menu.active { transform: none; }
  .content { padding: 16px; }
  h2.page-title { font-size: 1.35rem; margin-top: 4px; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }
/* Barra de progresso da navegação sem recarregar */
html.loading::before { content: ""; position: fixed; top: 0; left: 0; height: 3px; width: 100%; background: var(--primary); z-index: 9999; transform-origin: left; animation: loadbar 1.2s ease-out forwards; }
html.loading .content { opacity: .6; transition: opacity .2s; }
@keyframes loadbar { from { transform: scaleX(.05); } to { transform: scaleX(.9); } }
/* Cargos: permissões em caixas de seleção */
.section-title { margin: 24px 0 12px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; margin: 12px 0; }
.perm { display: flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }
.perm input { width: auto; margin: 0; }

/* Planos e uso */
.field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 16px; }
.meter { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border: 0; border-radius: 4px; overflow: hidden; background: rgba(127,127,127,.2); }
.meter::-webkit-progress-bar { background: rgba(127,127,127,.2); border-radius: 4px; }
.meter::-webkit-progress-value { background: var(--success); border-radius: 4px; }
.meter::-moz-progress-bar { background: var(--success); border-radius: 4px; }
.meter.warn::-webkit-progress-value { background: #d97706; }
.meter.warn::-moz-progress-bar { background: #d97706; }
.meter.full::-webkit-progress-value { background: #dc2626; }
.meter.full::-moz-progress-bar { background: #dc2626; }

/* Agenda: formulários e cores */
textarea { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px; font-size: .95rem; background: var(--bg-input); color: var(--text-main); font-family: inherit; resize: vertical; }
textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.2); }
input[type=color] { width: 56px; height: 42px; padding: 2px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-input); cursor: pointer; }
.row-form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-color); }
.block-form { padding: 12px 0 16px; border-bottom: 1px solid var(--border-color); }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #999; vertical-align: middle; }
h3 { margin: 18px 0 8px; font-size: 1rem; }

/* Agenda */
.agenda-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.agenda-bar input[type=date], .agenda-bar input[type=text], .agenda-bar select { width: auto; min-width: 150px; padding: 8px 10px; }
.agenda-nav { display: flex; gap: 6px; }

/* Lojas */
.location-head { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.location-head > div:last-child { flex: 1 1 360px; min-width: 0; }
.location-photo img { display: block; max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border-color); }
.photo-empty { width: 240px; height: 160px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--border-color); border-radius: 10px; }
.inline-form { display: inline-flex; align-items: center; gap: 8px; margin-right: 14px; }
.plain-list { list-style: none; padding: 0; margin: 10px 0; }
.plain-list li { padding: 4px 0; }
dialog.modal { max-width: 520px; width: calc(100% - 32px); border: 1px solid var(--border-color); border-radius: 12px; padding: 22px; background: var(--bg-card, #fff); color: var(--text-main); }
dialog.modal::backdrop { background: rgba(15, 23, 42, .55); }

/* Espaços, botões e selects */
.card > .action-buttons, .card > form.action-buttons { margin-bottom: 20px; }
select { -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) calc(50% + 1px), calc(100% - 13px) calc(50% + 1px); background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
select:hover { border-color: var(--text-muted); }
select:disabled { opacity: .6; cursor: not-allowed; }
.action-buttons select, .agenda-bar select { height: 36px; padding: 0 36px 0 12px; font-size: .88rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1.2; font-weight: 600; }
.btn-sm { height: 36px; padding: 0 14px; font-size: .88rem; border-radius: 8px; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(79,70,229,.35); }
.btn:active { transform: translateY(1px); }
.btn-secondary:hover { border-color: var(--text-muted); }
.card form + form { margin-top: 12px; }
.action-buttons form + form { margin-top: 0; }
.perm-grid + .perm, .perm-grid + .check { margin-top: 20px; }
.perm + .btn, .check + .btn, .perm-grid + .btn { margin-top: 20px; }
.field-grid + h3, .field-grid + h2 { margin-top: 28px; }

/* Tabela de cargos */
.matrix-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.matrix-bar p { margin: 0; }
.role-matrix th, .role-matrix td { text-align: center; vertical-align: middle; }
.role-matrix thead th { vertical-align: top; min-width: 160px; }
.role-matrix thead th:first-child, .role-matrix tbody th { text-align: left; }
.role-matrix tbody th { font-weight: 500; font-size: .92rem; text-transform: none; letter-spacing: 0; color: var(--text-main); background: transparent; border-bottom: 1px solid var(--border-color); padding: 12px 15px; }
.role-matrix tbody tr:last-child th { border-bottom: none; }
.role-matrix .role-name { text-align: center; font-weight: 600; padding: 8px 10px; }
.role-meta { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; font-size: .78rem; text-transform: none; letter-spacing: 0; color: var(--text-muted); font-weight: 400; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-input); color: var(--danger); cursor: pointer; }
.icon-btn:hover { background: rgba(239,68,68,.12); border-color: var(--danger); }
.toggle { position: relative; display: inline-flex; cursor: pointer; }
.toggle input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.toggle-box { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-input); color: var(--text-muted); font-weight: 700; transition: background .15s, border-color .15s, color .15s; }
.toggle-box::before { content: "\2715"; }
.toggle input:checked + .toggle-box { background: rgba(16,185,129,.15); border-color: var(--success); color: var(--success); }
.toggle input:checked + .toggle-box::before { content: "\2713"; }
.toggle input:focus-visible + .toggle-box { box-shadow: 0 0 0 3px rgba(79,70,229,.35); }
.toggle input:disabled { cursor: not-allowed; }
.toggle input:disabled + .toggle-box { opacity: .55; }
.toggle.changed .toggle-box { outline: 2px dashed var(--primary); outline-offset: 2px; }
.matrix-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.modal-actions { display: flex; gap: 12px; margin-top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Mudar de empresa */
.switch-company { margin: 8px 0; }
.switch-company select { height: 34px; padding: 0 34px 0 10px; font-size: .85rem; }

/* Avisos globais da SkyHost */
.notice { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 16px; border-radius: 8px; border: 1px solid var(--border-color); font-size: .92rem; text-align: left; }
.notice-info { background: rgba(59,130,246,.12); border-color: var(--info); color: var(--text-main); }
.notice-warning { background: rgba(217,119,6,.14); border-color: #d97706; color: var(--text-main); }
.notice-danger { background: rgba(239,68,68,.12); border-color: var(--danger); color: var(--text-main); }

/* Modo suporte */
.support-banner { flex-wrap: wrap; justify-content: space-between; }
.support-banner .action-buttons { margin-left: auto; }

/* Ficha da empresa */
.details { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
.details dt { color: var(--text-muted); font-size: .88rem; font-weight: 600; }
.details dd { margin: 0; }

/* Campos de data e hora: o seletor do navegador acompanha o tema escuro */
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { color-scheme: dark; }
input[type=date], input[type=time], input[type=datetime-local] { min-height: 44px; }

dialog.modal.modal-wide { max-width: 680px; }

/* Endereços IP (os IPv6 são compridos) */
td.ip { word-break: break-all; font-variant-numeric: tabular-nums; }
td.ip .badge { margin-left: 6px; white-space: nowrap; }

/* Janela de confirmação */
dialog.confirm-modal { max-width: 420px; padding: 24px; box-shadow: var(--shadow-md); }
dialog.confirm-modal p { margin: 0; font-size: 1.02rem; line-height: 1.5; }
dialog.confirm-modal .modal-actions { justify-content: flex-end; margin-top: 22px; }

/* Logs: filtros, cabeçalhos ordenáveis e cronologia */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 16px; align-items: end; margin-bottom: 8px; }
.filters .filter label { display: block; margin-bottom: 6px; font-size: .78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.filters .filter select, .filters .filter input { height: 40px; padding-top: 0; padding-bottom: 0; }
.filters .filter-end { display: flex; gap: 8px; align-items: center; }
.results { margin: 8px 0 14px; font-size: .88rem; }
.log-table .nowrap { white-space: nowrap; }
.log-table th a.sort { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.log-table th a.sort i { opacity: .45; font-size: .8em; }
.log-table th a.sort.is-active, .log-table th a.sort:hover { color: var(--text-main); }
.log-table th a.sort.is-active i, .log-table th a.sort:hover i { opacity: 1; }
.log-table td a { color: inherit; }
.log-table td a:hover { color: var(--primary); }
.log-table tr.is-current td { background: rgba(79,70,229,.10); }
.details .code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; margin-left: 6px; }

/* Faturação: resumo do plano, mosaicos de uso, escolha de plano e tabela de planos */
.eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.plan-summary-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.plan-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; font-size: 1.5rem; font-weight: 700; }
.plan-price { text-align: right; }
.plan-price strong { display: block; font-size: 1.6rem; }
.plan-price span { color: var(--text-muted); font-size: .85rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--border-color); border-radius: 999px; background: var(--hover-bg); font-size: .8rem; color: var(--text-main); }
.chip strong { font-weight: 700; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tile { padding: 14px 16px; border: 1px solid var(--border-color); border-radius: 10px; background: var(--hover-bg); }
.tile.is-over { border-color: #d97706; background: rgba(217,119,6,.10); }
.tile-label { font-size: .82rem; color: var(--text-muted); margin-bottom: 4px; }
.tile-value { font-size: 1.35rem; font-weight: 700; margin-bottom: 8px; }
.tile-value span { font-size: .9rem; font-weight: 500; color: var(--text-muted); }
.tile-note { margin-top: 6px; font-size: .8rem; color: #d97706; font-weight: 600; }
.plan-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 12px; }
.plan-option { display: flex; flex-direction: column; gap: 10px; padding: 18px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-card); }
.plan-option.is-current { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(79,70,229,.18); }
.plan-option-name { font-size: 1.1rem; font-weight: 700; }
.plan-option-price strong { font-size: 1.35rem; }
.plan-option-price span { color: var(--text-muted); font-size: .85rem; }
.plan-option-limits { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .88rem; }
.plan-option-limits li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--border-color); }
.plan-option-limits li span { color: var(--text-muted); }
.plan-option .btn { width: 100%; }
.plan-option-note { margin: 0; font-size: .8rem; }
.notice-action { margin-left: auto; }
.grace-list { margin-top: 6px; font-size: .9rem; }
.plan-table td, .plan-table th { vertical-align: middle; }
.plan-table .code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; }
.form-section { border: 0; padding: 0; margin: 0 0 18px; }
.form-section legend { padding: 0; margin-bottom: 10px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.form-section .form-group { margin-bottom: 14px; }
.switches { display: flex; flex-wrap: wrap; gap: 8px 24px; }
dialog.plan-modal { max-width: 760px; max-height: calc(100vh - 48px); overflow-y: auto; }
.enforcement-actions input[type=number] { width: 90px; height: 36px; padding: 0 10px; }

.danger-zone { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border-color); }
.danger-zone p { margin: 0; font-size: .88rem; }

/* Calendário da agenda (dia, semana, mês). As posições são classes de 5 em 5 minutos: a política de segurança não aceita estilos no HTML. */
.cal-card { padding: 20px; }
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 12px; }
.cal-title { margin: 0; font-size: 1.15rem; flex: 1; min-width: 180px; }
.cal-views { display: inline-flex; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }
.cal-views a { padding: 7px 16px; font-size: .88rem; color: var(--text-main); background: var(--bg-input); border-right: 1px solid var(--border-color); }
.cal-views a:last-child { border-right: 0; }
.cal-views a:hover { background: var(--hover-bg); text-decoration: none; }
.cal-views a.active { background: var(--primary); color: #fff; }
.cal-scroll { overflow: auto; max-height: 72vh; border: 1px solid var(--border-color); border-radius: 10px; background: var(--bg-card); }
.cal-inner { display: flex; min-width: max-content; width: 100%; }
.cal-gutter { width: 58px; flex-shrink: 0; position: sticky; left: 0; z-index: 3; background: var(--bg-card); border-right: 1px solid var(--border-color); }
.cal-hour { height: 60px; position: relative; }
.cal-hour span { position: absolute; top: -8px; right: 8px; font-size: .72rem; color: var(--text-muted); }
.cal-colhead + .cal-hour span { display: none; }
.cal-cols { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(130px, 1fr); }
.cal-col { border-right: 1px solid var(--border-color); min-width: 0; }
.cal-col:last-child { border-right: 0; }
.cal-colhead { height: 48px; position: sticky; top: 0; z-index: 2; background: var(--bg-card); border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; font-size: .88rem; font-weight: 600; box-sizing: border-box; }
.cal-colhead a { display: flex; flex-direction: column; align-items: center; line-height: 1.1; color: var(--text-muted); }
.cal-colhead a:hover { text-decoration: none; }
.cal-colhead small { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; }
.cal-colhead a b { font-size: 1.25rem; color: var(--text-main); width: 34px; height: 34px; line-height: 34px; text-align: center; border-radius: 50%; }
.cal-col.today .cal-colhead a b { background: var(--primary); color: #fff; }
.cal-col.today .cal-colhead a small { color: var(--primary); }
.cal-colbody { position: relative; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 59px, var(--border-color) 59px, var(--border-color) 60px); }
.cal-col.today .cal-colbody { background-color: rgba(79,70,229,.04); }
.cal-ev { position: absolute; box-sizing: border-box; overflow: hidden; border-radius: 6px; padding: 2px 6px 2px 10px; font-size: .78rem; line-height: 1.25; color: var(--text-main); background: color-mix(in srgb, var(--primary) 14%, var(--bg-card)); border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--bg-card)); }
.cal-ev:hover { text-decoration: none; z-index: 4; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.cal-ev b { font-weight: 700; }
.cal-ev small { display: block; color: var(--text-muted); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--primary); }
.ev-pending, .ev-hold { background: var(--bg-card); border-style: dashed; }
.ev-completed { opacity: .7; }
.ev-cancelled { opacity: .55; text-decoration: line-through; }
.ev-no_show { background: color-mix(in srgb, var(--danger) 14%, var(--bg-card)); border-color: color-mix(in srgb, var(--danger) 40%, var(--bg-card)); }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 3; pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.cal-empty { margin: 12px 0 0; }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden; }
.cal-month-head { padding: 8px; text-align: center; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); background: var(--hover-bg); border-bottom: 1px solid var(--border-color); border-right: 1px solid var(--border-color); }
.cal-month-cell { min-height: 118px; padding: 6px; border-right: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-month-cell.outside { background: var(--hover-bg); opacity: .65; }
.cal-month-cell.today { background: rgba(79,70,229,.07); }
.cal-daynum { align-self: flex-start; font-size: .82rem; font-weight: 600; color: var(--text-main); min-width: 26px; height: 26px; line-height: 26px; text-align: center; border-radius: 13px; padding: 0 4px; }
.cal-daynum:hover { background: var(--hover-bg); text-decoration: none; }
.cal-month-cell.today .cal-daynum { background: var(--primary); color: #fff; }
.cal-chip { display: flex; align-items: center; gap: 5px; padding: 2px 6px; border-radius: 5px; font-size: .75rem; color: var(--text-main); background: color-mix(in srgb, var(--primary) 12%, var(--bg-card)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip:hover { text-decoration: none; background: color-mix(in srgb, var(--primary) 24%, var(--bg-card)); }
.cal-chip .swatch { width: 8px; height: 8px; flex-shrink: 0; }
.cal-more { font-size: .75rem; color: var(--text-muted); padding: 0 6px; }
@media (max-width: 700px) { .cal-month { overflow-x: auto; grid-template-columns: repeat(7, minmax(88px, 1fr)); } .cal-month-cell { min-height: 90px; } }
.o-0 { top: 0px; }
.o-1 { top: 5px; }
.o-2 { top: 10px; }
.o-3 { top: 15px; }
.o-4 { top: 20px; }
.o-5 { top: 25px; }
.o-6 { top: 30px; }
.o-7 { top: 35px; }
.o-8 { top: 40px; }
.o-9 { top: 45px; }
.o-10 { top: 50px; }
.o-11 { top: 55px; }
.o-12 { top: 60px; }
.o-13 { top: 65px; }
.o-14 { top: 70px; }
.o-15 { top: 75px; }
.o-16 { top: 80px; }
.o-17 { top: 85px; }
.o-18 { top: 90px; }
.o-19 { top: 95px; }
.o-20 { top: 100px; }
.o-21 { top: 105px; }
.o-22 { top: 110px; }
.o-23 { top: 115px; }
.o-24 { top: 120px; }
.o-25 { top: 125px; }
.o-26 { top: 130px; }
.o-27 { top: 135px; }
.o-28 { top: 140px; }
.o-29 { top: 145px; }
.o-30 { top: 150px; }
.o-31 { top: 155px; }
.o-32 { top: 160px; }
.o-33 { top: 165px; }
.o-34 { top: 170px; }
.o-35 { top: 175px; }
.o-36 { top: 180px; }
.o-37 { top: 185px; }
.o-38 { top: 190px; }
.o-39 { top: 195px; }
.o-40 { top: 200px; }
.o-41 { top: 205px; }
.o-42 { top: 210px; }
.o-43 { top: 215px; }
.o-44 { top: 220px; }
.o-45 { top: 225px; }
.o-46 { top: 230px; }
.o-47 { top: 235px; }
.o-48 { top: 240px; }
.o-49 { top: 245px; }
.o-50 { top: 250px; }
.o-51 { top: 255px; }
.o-52 { top: 260px; }
.o-53 { top: 265px; }
.o-54 { top: 270px; }
.o-55 { top: 275px; }
.o-56 { top: 280px; }
.o-57 { top: 285px; }
.o-58 { top: 290px; }
.o-59 { top: 295px; }
.o-60 { top: 300px; }
.o-61 { top: 305px; }
.o-62 { top: 310px; }
.o-63 { top: 315px; }
.o-64 { top: 320px; }
.o-65 { top: 325px; }
.o-66 { top: 330px; }
.o-67 { top: 335px; }
.o-68 { top: 340px; }
.o-69 { top: 345px; }
.o-70 { top: 350px; }
.o-71 { top: 355px; }
.o-72 { top: 360px; }
.o-73 { top: 365px; }
.o-74 { top: 370px; }
.o-75 { top: 375px; }
.o-76 { top: 380px; }
.o-77 { top: 385px; }
.o-78 { top: 390px; }
.o-79 { top: 395px; }
.o-80 { top: 400px; }
.o-81 { top: 405px; }
.o-82 { top: 410px; }
.o-83 { top: 415px; }
.o-84 { top: 420px; }
.o-85 { top: 425px; }
.o-86 { top: 430px; }
.o-87 { top: 435px; }
.o-88 { top: 440px; }
.o-89 { top: 445px; }
.o-90 { top: 450px; }
.o-91 { top: 455px; }
.o-92 { top: 460px; }
.o-93 { top: 465px; }
.o-94 { top: 470px; }
.o-95 { top: 475px; }
.o-96 { top: 480px; }
.o-97 { top: 485px; }
.o-98 { top: 490px; }
.o-99 { top: 495px; }
.o-100 { top: 500px; }
.o-101 { top: 505px; }
.o-102 { top: 510px; }
.o-103 { top: 515px; }
.o-104 { top: 520px; }
.o-105 { top: 525px; }
.o-106 { top: 530px; }
.o-107 { top: 535px; }
.o-108 { top: 540px; }
.o-109 { top: 545px; }
.o-110 { top: 550px; }
.o-111 { top: 555px; }
.o-112 { top: 560px; }
.o-113 { top: 565px; }
.o-114 { top: 570px; }
.o-115 { top: 575px; }
.o-116 { top: 580px; }
.o-117 { top: 585px; }
.o-118 { top: 590px; }
.o-119 { top: 595px; }
.o-120 { top: 600px; }
.o-121 { top: 605px; }
.o-122 { top: 610px; }
.o-123 { top: 615px; }
.o-124 { top: 620px; }
.o-125 { top: 625px; }
.o-126 { top: 630px; }
.o-127 { top: 635px; }
.o-128 { top: 640px; }
.o-129 { top: 645px; }
.o-130 { top: 650px; }
.o-131 { top: 655px; }
.o-132 { top: 660px; }
.o-133 { top: 665px; }
.o-134 { top: 670px; }
.o-135 { top: 675px; }
.o-136 { top: 680px; }
.o-137 { top: 685px; }
.o-138 { top: 690px; }
.o-139 { top: 695px; }
.o-140 { top: 700px; }
.o-141 { top: 705px; }
.o-142 { top: 710px; }
.o-143 { top: 715px; }
.o-144 { top: 720px; }
.o-145 { top: 725px; }
.o-146 { top: 730px; }
.o-147 { top: 735px; }
.o-148 { top: 740px; }
.o-149 { top: 745px; }
.o-150 { top: 750px; }
.o-151 { top: 755px; }
.o-152 { top: 760px; }
.o-153 { top: 765px; }
.o-154 { top: 770px; }
.o-155 { top: 775px; }
.o-156 { top: 780px; }
.o-157 { top: 785px; }
.o-158 { top: 790px; }
.o-159 { top: 795px; }
.o-160 { top: 800px; }
.o-161 { top: 805px; }
.o-162 { top: 810px; }
.o-163 { top: 815px; }
.o-164 { top: 820px; }
.o-165 { top: 825px; }
.o-166 { top: 830px; }
.o-167 { top: 835px; }
.o-168 { top: 840px; }
.o-169 { top: 845px; }
.o-170 { top: 850px; }
.o-171 { top: 855px; }
.o-172 { top: 860px; }
.o-173 { top: 865px; }
.o-174 { top: 870px; }
.o-175 { top: 875px; }
.o-176 { top: 880px; }
.o-177 { top: 885px; }
.o-178 { top: 890px; }
.o-179 { top: 895px; }
.o-180 { top: 900px; }
.o-181 { top: 905px; }
.o-182 { top: 910px; }
.o-183 { top: 915px; }
.o-184 { top: 920px; }
.o-185 { top: 925px; }
.o-186 { top: 930px; }
.o-187 { top: 935px; }
.o-188 { top: 940px; }
.o-189 { top: 945px; }
.o-190 { top: 950px; }
.o-191 { top: 955px; }
.o-192 { top: 960px; }
.o-193 { top: 965px; }
.o-194 { top: 970px; }
.o-195 { top: 975px; }
.o-196 { top: 980px; }
.o-197 { top: 985px; }
.o-198 { top: 990px; }
.o-199 { top: 995px; }
.o-200 { top: 1000px; }
.o-201 { top: 1005px; }
.o-202 { top: 1010px; }
.o-203 { top: 1015px; }
.o-204 { top: 1020px; }
.o-205 { top: 1025px; }
.o-206 { top: 1030px; }
.o-207 { top: 1035px; }
.o-208 { top: 1040px; }
.o-209 { top: 1045px; }
.o-210 { top: 1050px; }
.o-211 { top: 1055px; }
.o-212 { top: 1060px; }
.o-213 { top: 1065px; }
.o-214 { top: 1070px; }
.o-215 { top: 1075px; }
.o-216 { top: 1080px; }
.o-217 { top: 1085px; }
.o-218 { top: 1090px; }
.o-219 { top: 1095px; }
.o-220 { top: 1100px; }
.o-221 { top: 1105px; }
.o-222 { top: 1110px; }
.o-223 { top: 1115px; }
.o-224 { top: 1120px; }
.o-225 { top: 1125px; }
.o-226 { top: 1130px; }
.o-227 { top: 1135px; }
.o-228 { top: 1140px; }
.o-229 { top: 1145px; }
.o-230 { top: 1150px; }
.o-231 { top: 1155px; }
.o-232 { top: 1160px; }
.o-233 { top: 1165px; }
.o-234 { top: 1170px; }
.o-235 { top: 1175px; }
.o-236 { top: 1180px; }
.o-237 { top: 1185px; }
.o-238 { top: 1190px; }
.o-239 { top: 1195px; }
.o-240 { top: 1200px; }
.o-241 { top: 1205px; }
.o-242 { top: 1210px; }
.o-243 { top: 1215px; }
.o-244 { top: 1220px; }
.o-245 { top: 1225px; }
.o-246 { top: 1230px; }
.o-247 { top: 1235px; }
.o-248 { top: 1240px; }
.o-249 { top: 1245px; }
.o-250 { top: 1250px; }
.o-251 { top: 1255px; }
.o-252 { top: 1260px; }
.o-253 { top: 1265px; }
.o-254 { top: 1270px; }
.o-255 { top: 1275px; }
.o-256 { top: 1280px; }
.o-257 { top: 1285px; }
.o-258 { top: 1290px; }
.o-259 { top: 1295px; }
.o-260 { top: 1300px; }
.o-261 { top: 1305px; }
.o-262 { top: 1310px; }
.o-263 { top: 1315px; }
.o-264 { top: 1320px; }
.o-265 { top: 1325px; }
.o-266 { top: 1330px; }
.o-267 { top: 1335px; }
.o-268 { top: 1340px; }
.o-269 { top: 1345px; }
.o-270 { top: 1350px; }
.o-271 { top: 1355px; }
.o-272 { top: 1360px; }
.o-273 { top: 1365px; }
.o-274 { top: 1370px; }
.o-275 { top: 1375px; }
.o-276 { top: 1380px; }
.o-277 { top: 1385px; }
.o-278 { top: 1390px; }
.o-279 { top: 1395px; }
.o-280 { top: 1400px; }
.o-281 { top: 1405px; }
.o-282 { top: 1410px; }
.o-283 { top: 1415px; }
.o-284 { top: 1420px; }
.o-285 { top: 1425px; }
.o-286 { top: 1430px; }
.o-287 { top: 1435px; }
.d-4 { height: 19px; }
.d-5 { height: 24px; }
.d-6 { height: 29px; }
.d-7 { height: 34px; }
.d-8 { height: 39px; }
.d-9 { height: 44px; }
.d-10 { height: 49px; }
.d-11 { height: 54px; }
.d-12 { height: 59px; }
.d-13 { height: 64px; }
.d-14 { height: 69px; }
.d-15 { height: 74px; }
.d-16 { height: 79px; }
.d-17 { height: 84px; }
.d-18 { height: 89px; }
.d-19 { height: 94px; }
.d-20 { height: 99px; }
.d-21 { height: 104px; }
.d-22 { height: 109px; }
.d-23 { height: 114px; }
.d-24 { height: 119px; }
.d-25 { height: 124px; }
.d-26 { height: 129px; }
.d-27 { height: 134px; }
.d-28 { height: 139px; }
.d-29 { height: 144px; }
.d-30 { height: 149px; }
.d-31 { height: 154px; }
.d-32 { height: 159px; }
.d-33 { height: 164px; }
.d-34 { height: 169px; }
.d-35 { height: 174px; }
.d-36 { height: 179px; }
.d-37 { height: 184px; }
.d-38 { height: 189px; }
.d-39 { height: 194px; }
.d-40 { height: 199px; }
.d-41 { height: 204px; }
.d-42 { height: 209px; }
.d-43 { height: 214px; }
.d-44 { height: 219px; }
.d-45 { height: 224px; }
.d-46 { height: 229px; }
.d-47 { height: 234px; }
.d-48 { height: 239px; }
.d-49 { height: 244px; }
.d-50 { height: 249px; }
.d-51 { height: 254px; }
.d-52 { height: 259px; }
.d-53 { height: 264px; }
.d-54 { height: 269px; }
.d-55 { height: 274px; }
.d-56 { height: 279px; }
.d-57 { height: 284px; }
.d-58 { height: 289px; }
.d-59 { height: 294px; }
.d-60 { height: 299px; }
.d-61 { height: 304px; }
.d-62 { height: 309px; }
.d-63 { height: 314px; }
.d-64 { height: 319px; }
.d-65 { height: 324px; }
.d-66 { height: 329px; }
.d-67 { height: 334px; }
.d-68 { height: 339px; }
.d-69 { height: 344px; }
.d-70 { height: 349px; }
.d-71 { height: 354px; }
.d-72 { height: 359px; }
.d-73 { height: 364px; }
.d-74 { height: 369px; }
.d-75 { height: 374px; }
.d-76 { height: 379px; }
.d-77 { height: 384px; }
.d-78 { height: 389px; }
.d-79 { height: 394px; }
.d-80 { height: 399px; }
.d-81 { height: 404px; }
.d-82 { height: 409px; }
.d-83 { height: 414px; }
.d-84 { height: 419px; }
.d-85 { height: 424px; }
.d-86 { height: 429px; }
.d-87 { height: 434px; }
.d-88 { height: 439px; }
.d-89 { height: 444px; }
.d-90 { height: 449px; }
.d-91 { height: 454px; }
.d-92 { height: 459px; }
.d-93 { height: 464px; }
.d-94 { height: 469px; }
.d-95 { height: 474px; }
.d-96 { height: 479px; }
.d-97 { height: 484px; }
.d-98 { height: 489px; }
.d-99 { height: 494px; }
.d-100 { height: 499px; }
.d-101 { height: 504px; }
.d-102 { height: 509px; }
.d-103 { height: 514px; }
.d-104 { height: 519px; }
.d-105 { height: 524px; }
.d-106 { height: 529px; }
.d-107 { height: 534px; }
.d-108 { height: 539px; }
.d-109 { height: 544px; }
.d-110 { height: 549px; }
.d-111 { height: 554px; }
.d-112 { height: 559px; }
.d-113 { height: 564px; }
.d-114 { height: 569px; }
.d-115 { height: 574px; }
.d-116 { height: 579px; }
.d-117 { height: 584px; }
.d-118 { height: 589px; }
.d-119 { height: 594px; }
.d-120 { height: 599px; }
.d-121 { height: 604px; }
.d-122 { height: 609px; }
.d-123 { height: 614px; }
.d-124 { height: 619px; }
.d-125 { height: 624px; }
.d-126 { height: 629px; }
.d-127 { height: 634px; }
.d-128 { height: 639px; }
.d-129 { height: 644px; }
.d-130 { height: 649px; }
.d-131 { height: 654px; }
.d-132 { height: 659px; }
.d-133 { height: 664px; }
.d-134 { height: 669px; }
.d-135 { height: 674px; }
.d-136 { height: 679px; }
.d-137 { height: 684px; }
.d-138 { height: 689px; }
.d-139 { height: 694px; }
.d-140 { height: 699px; }
.d-141 { height: 704px; }
.d-142 { height: 709px; }
.d-143 { height: 714px; }
.d-144 { height: 719px; }
.d-145 { height: 724px; }
.d-146 { height: 729px; }
.d-147 { height: 734px; }
.d-148 { height: 739px; }
.d-149 { height: 744px; }
.d-150 { height: 749px; }
.d-151 { height: 754px; }
.d-152 { height: 759px; }
.d-153 { height: 764px; }
.d-154 { height: 769px; }
.d-155 { height: 774px; }
.d-156 { height: 779px; }
.d-157 { height: 784px; }
.d-158 { height: 789px; }
.d-159 { height: 794px; }
.d-160 { height: 799px; }
.d-161 { height: 804px; }
.d-162 { height: 809px; }
.d-163 { height: 814px; }
.d-164 { height: 819px; }
.d-165 { height: 824px; }
.d-166 { height: 829px; }
.d-167 { height: 834px; }
.d-168 { height: 839px; }
.d-169 { height: 844px; }
.d-170 { height: 849px; }
.d-171 { height: 854px; }
.d-172 { height: 859px; }
.d-173 { height: 864px; }
.d-174 { height: 869px; }
.d-175 { height: 874px; }
.d-176 { height: 879px; }
.d-177 { height: 884px; }
.d-178 { height: 889px; }
.d-179 { height: 894px; }
.d-180 { height: 899px; }
.d-181 { height: 904px; }
.d-182 { height: 909px; }
.d-183 { height: 914px; }
.d-184 { height: 919px; }
.d-185 { height: 924px; }
.d-186 { height: 929px; }
.d-187 { height: 934px; }
.d-188 { height: 939px; }
.d-189 { height: 944px; }
.d-190 { height: 949px; }
.d-191 { height: 954px; }
.d-192 { height: 959px; }
.d-193 { height: 964px; }
.d-194 { height: 969px; }
.d-195 { height: 974px; }
.d-196 { height: 979px; }
.d-197 { height: 984px; }
.d-198 { height: 989px; }
.d-199 { height: 994px; }
.d-200 { height: 999px; }
.d-201 { height: 1004px; }
.d-202 { height: 1009px; }
.d-203 { height: 1014px; }
.d-204 { height: 1019px; }
.d-205 { height: 1024px; }
.d-206 { height: 1029px; }
.d-207 { height: 1034px; }
.d-208 { height: 1039px; }
.d-209 { height: 1044px; }
.d-210 { height: 1049px; }
.d-211 { height: 1054px; }
.d-212 { height: 1059px; }
.d-213 { height: 1064px; }
.d-214 { height: 1069px; }
.d-215 { height: 1074px; }
.d-216 { height: 1079px; }
.d-217 { height: 1084px; }
.d-218 { height: 1089px; }
.d-219 { height: 1094px; }
.d-220 { height: 1099px; }
.d-221 { height: 1104px; }
.d-222 { height: 1109px; }
.d-223 { height: 1114px; }
.d-224 { height: 1119px; }
.d-225 { height: 1124px; }
.d-226 { height: 1129px; }
.d-227 { height: 1134px; }
.d-228 { height: 1139px; }
.d-229 { height: 1144px; }
.d-230 { height: 1149px; }
.d-231 { height: 1154px; }
.d-232 { height: 1159px; }
.d-233 { height: 1164px; }
.d-234 { height: 1169px; }
.d-235 { height: 1174px; }
.d-236 { height: 1179px; }
.d-237 { height: 1184px; }
.d-238 { height: 1189px; }
.d-239 { height: 1194px; }
.d-240 { height: 1199px; }
.d-241 { height: 1204px; }
.d-242 { height: 1209px; }
.d-243 { height: 1214px; }
.d-244 { height: 1219px; }
.d-245 { height: 1224px; }
.d-246 { height: 1229px; }
.d-247 { height: 1234px; }
.d-248 { height: 1239px; }
.d-249 { height: 1244px; }
.d-250 { height: 1249px; }
.d-251 { height: 1254px; }
.d-252 { height: 1259px; }
.d-253 { height: 1264px; }
.d-254 { height: 1269px; }
.d-255 { height: 1274px; }
.d-256 { height: 1279px; }
.d-257 { height: 1284px; }
.d-258 { height: 1289px; }
.d-259 { height: 1294px; }
.d-260 { height: 1299px; }
.d-261 { height: 1304px; }
.d-262 { height: 1309px; }
.d-263 { height: 1314px; }
.d-264 { height: 1319px; }
.d-265 { height: 1324px; }
.d-266 { height: 1329px; }
.d-267 { height: 1334px; }
.d-268 { height: 1339px; }
.d-269 { height: 1344px; }
.d-270 { height: 1349px; }
.d-271 { height: 1354px; }
.d-272 { height: 1359px; }
.d-273 { height: 1364px; }
.d-274 { height: 1369px; }
.d-275 { height: 1374px; }
.d-276 { height: 1379px; }
.d-277 { height: 1384px; }
.d-278 { height: 1389px; }
.d-279 { height: 1394px; }
.d-280 { height: 1399px; }
.d-281 { height: 1404px; }
.d-282 { height: 1409px; }
.d-283 { height: 1414px; }
.d-284 { height: 1419px; }
.d-285 { height: 1424px; }
.d-286 { height: 1429px; }
.d-287 { height: 1434px; }
.d-288 { height: 1439px; }
.hrs-1 { height: 60px; }
.hrs-2 { height: 120px; }
.hrs-3 { height: 180px; }
.hrs-4 { height: 240px; }
.hrs-5 { height: 300px; }
.hrs-6 { height: 360px; }
.hrs-7 { height: 420px; }
.hrs-8 { height: 480px; }
.hrs-9 { height: 540px; }
.hrs-10 { height: 600px; }
.hrs-11 { height: 660px; }
.hrs-12 { height: 720px; }
.hrs-13 { height: 780px; }
.hrs-14 { height: 840px; }
.hrs-15 { height: 900px; }
.hrs-16 { height: 960px; }
.hrs-17 { height: 1020px; }
.hrs-18 { height: 1080px; }
.hrs-19 { height: 1140px; }
.hrs-20 { height: 1200px; }
.hrs-21 { height: 1260px; }
.hrs-22 { height: 1320px; }
.hrs-23 { height: 1380px; }
.hrs-24 { height: 1440px; }
.l-0-1 { left: calc(0*100%/1 + 1px); width: calc(100%/1 - 3px); }
.l-0-2 { left: calc(0*100%/2 + 1px); width: calc(100%/2 - 3px); }
.l-1-2 { left: calc(1*100%/2 + 1px); width: calc(100%/2 - 3px); }
.l-0-3 { left: calc(0*100%/3 + 1px); width: calc(100%/3 - 3px); }
.l-1-3 { left: calc(1*100%/3 + 1px); width: calc(100%/3 - 3px); }
.l-2-3 { left: calc(2*100%/3 + 1px); width: calc(100%/3 - 3px); }
.l-0-4 { left: calc(0*100%/4 + 1px); width: calc(100%/4 - 3px); }
.l-1-4 { left: calc(1*100%/4 + 1px); width: calc(100%/4 - 3px); }
.l-2-4 { left: calc(2*100%/4 + 1px); width: calc(100%/4 - 3px); }
.l-3-4 { left: calc(3*100%/4 + 1px); width: calc(100%/4 - 3px); }
.l-0-5 { left: calc(0*100%/5 + 1px); width: calc(100%/5 - 3px); }
.l-1-5 { left: calc(1*100%/5 + 1px); width: calc(100%/5 - 3px); }
.l-2-5 { left: calc(2*100%/5 + 1px); width: calc(100%/5 - 3px); }
.l-3-5 { left: calc(3*100%/5 + 1px); width: calc(100%/5 - 3px); }
.l-4-5 { left: calc(4*100%/5 + 1px); width: calc(100%/5 - 3px); }
.l-0-6 { left: calc(0*100%/6 + 1px); width: calc(100%/6 - 3px); }
.l-1-6 { left: calc(1*100%/6 + 1px); width: calc(100%/6 - 3px); }
.l-2-6 { left: calc(2*100%/6 + 1px); width: calc(100%/6 - 3px); }
.l-3-6 { left: calc(3*100%/6 + 1px); width: calc(100%/6 - 3px); }
.l-4-6 { left: calc(4*100%/6 + 1px); width: calc(100%/6 - 3px); }
.l-5-6 { left: calc(5*100%/6 + 1px); width: calc(100%/6 - 3px); }
.l-0-7 { left: calc(0*100%/7 + 1px); width: calc(100%/7 - 3px); }
.l-1-7 { left: calc(1*100%/7 + 1px); width: calc(100%/7 - 3px); }
.l-2-7 { left: calc(2*100%/7 + 1px); width: calc(100%/7 - 3px); }
.l-3-7 { left: calc(3*100%/7 + 1px); width: calc(100%/7 - 3px); }
.l-4-7 { left: calc(4*100%/7 + 1px); width: calc(100%/7 - 3px); }
.l-5-7 { left: calc(5*100%/7 + 1px); width: calc(100%/7 - 3px); }
.l-6-7 { left: calc(6*100%/7 + 1px); width: calc(100%/7 - 3px); }
.l-0-8 { left: calc(0*100%/8 + 1px); width: calc(100%/8 - 3px); }
.l-1-8 { left: calc(1*100%/8 + 1px); width: calc(100%/8 - 3px); }
.l-2-8 { left: calc(2*100%/8 + 1px); width: calc(100%/8 - 3px); }
.l-3-8 { left: calc(3*100%/8 + 1px); width: calc(100%/8 - 3px); }
.l-4-8 { left: calc(4*100%/8 + 1px); width: calc(100%/8 - 3px); }
.l-5-8 { left: calc(5*100%/8 + 1px); width: calc(100%/8 - 3px); }
.l-6-8 { left: calc(6*100%/8 + 1px); width: calc(100%/8 - 3px); }
.l-7-8 { left: calc(7*100%/8 + 1px); width: calc(100%/8 - 3px); }
.l-0-9 { left: calc(0*100%/9 + 1px); width: calc(100%/9 - 3px); }
.l-1-9 { left: calc(1*100%/9 + 1px); width: calc(100%/9 - 3px); }
.l-2-9 { left: calc(2*100%/9 + 1px); width: calc(100%/9 - 3px); }
.l-3-9 { left: calc(3*100%/9 + 1px); width: calc(100%/9 - 3px); }
.l-4-9 { left: calc(4*100%/9 + 1px); width: calc(100%/9 - 3px); }
.l-5-9 { left: calc(5*100%/9 + 1px); width: calc(100%/9 - 3px); }
.l-6-9 { left: calc(6*100%/9 + 1px); width: calc(100%/9 - 3px); }
.l-7-9 { left: calc(7*100%/9 + 1px); width: calc(100%/9 - 3px); }
.l-8-9 { left: calc(8*100%/9 + 1px); width: calc(100%/9 - 3px); }
.l-0-10 { left: calc(0*100%/10 + 1px); width: calc(100%/10 - 3px); }
.l-1-10 { left: calc(1*100%/10 + 1px); width: calc(100%/10 - 3px); }
.l-2-10 { left: calc(2*100%/10 + 1px); width: calc(100%/10 - 3px); }
.l-3-10 { left: calc(3*100%/10 + 1px); width: calc(100%/10 - 3px); }
.l-4-10 { left: calc(4*100%/10 + 1px); width: calc(100%/10 - 3px); }
.l-5-10 { left: calc(5*100%/10 + 1px); width: calc(100%/10 - 3px); }
.l-6-10 { left: calc(6*100%/10 + 1px); width: calc(100%/10 - 3px); }
.l-7-10 { left: calc(7*100%/10 + 1px); width: calc(100%/10 - 3px); }
.l-8-10 { left: calc(8*100%/10 + 1px); width: calc(100%/10 - 3px); }
.l-9-10 { left: calc(9*100%/10 + 1px); width: calc(100%/10 - 3px); }

/* Painel financeiro da SkyHost. As larguras das barras são classes (bw-0 a bw-100, de 2 em 2): a política de segurança não aceita estilos no HTML. */
.fin-tabs { margin-bottom: 16px; }
.fin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 20px; }
.fin-kpi { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.fin-kpi span { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.fin-kpi strong { font-size: 1.6rem; line-height: 1.2; }
.fin-kpi small { color: var(--text-muted); font-size: .8rem; }
.fin-kpi.danger { border-color: color-mix(in srgb, var(--danger) 60%, var(--border-color)); }
.fin-kpi.danger strong { color: var(--danger); }
.fin-small .fin-kpi strong { font-size: 1.25rem; }
.fin-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.fin-row { margin-bottom: 12px; }
.fin-row-head { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; margin-bottom: 4px; flex-wrap: wrap; }
.fin-bar { height: 10px; border-radius: 5px; background: var(--hover-bg); margin-bottom: 3px; overflow: hidden; }
.fin-bar i { display: block; height: 100%; border-radius: 5px; background: var(--primary); }
.fin-bar i.billed { background: color-mix(in srgb, var(--primary) 45%, var(--bg-card)); }
.fin-bar i.collected { background: var(--success); }
.fin-legend { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.fin-legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-left: 10px; }
.fin-legend .dot.billed { background: color-mix(in srgb, var(--primary) 45%, var(--bg-card)); }
.fin-legend .dot.collected { background: var(--success); }
td .action-buttons input[type=number] { width: 72px; height: 36px; padding: 0 8px; }
td .action-buttons { flex-wrap: wrap; align-items: center; }
.bw-0 { width: 0%; }
.bw-2 { width: 2%; }
.bw-4 { width: 4%; }
.bw-6 { width: 6%; }
.bw-8 { width: 8%; }
.bw-10 { width: 10%; }
.bw-12 { width: 12%; }
.bw-14 { width: 14%; }
.bw-16 { width: 16%; }
.bw-18 { width: 18%; }
.bw-20 { width: 20%; }
.bw-22 { width: 22%; }
.bw-24 { width: 24%; }
.bw-26 { width: 26%; }
.bw-28 { width: 28%; }
.bw-30 { width: 30%; }
.bw-32 { width: 32%; }
.bw-34 { width: 34%; }
.bw-36 { width: 36%; }
.bw-38 { width: 38%; }
.bw-40 { width: 40%; }
.bw-42 { width: 42%; }
.bw-44 { width: 44%; }
.bw-46 { width: 46%; }
.bw-48 { width: 48%; }
.bw-50 { width: 50%; }
.bw-52 { width: 52%; }
.bw-54 { width: 54%; }
.bw-56 { width: 56%; }
.bw-58 { width: 58%; }
.bw-60 { width: 60%; }
.bw-62 { width: 62%; }
.bw-64 { width: 64%; }
.bw-66 { width: 66%; }
.bw-68 { width: 68%; }
.bw-70 { width: 70%; }
.bw-72 { width: 72%; }
.bw-74 { width: 74%; }
.bw-76 { width: 76%; }
.bw-78 { width: 78%; }
.bw-80 { width: 80%; }
.bw-82 { width: 82%; }
.bw-84 { width: 84%; }
.bw-86 { width: 86%; }
.bw-88 { width: 88%; }
.bw-90 { width: 90%; }
.bw-92 { width: 92%; }
.bw-94 { width: 94%; }
.bw-96 { width: 96%; }
.bw-98 { width: 98%; }
.bw-100 { width: 100%; }

/* Telemóvel: alvos de toque confortáveis, campos a 16 px (o iPhone amplia o ecrã com letra menor), cartões e calendário compactos */
@media (max-width: 900px) {
  .card { padding: 16px; border-radius: 10px; }
  input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=tel], input[type=url], input[type=search], select, textarea { font-size: 16px; }
  .btn-sm { min-height: 38px; }
  input[type=checkbox], input[type=radio] { width: 22px; height: 22px; flex-shrink: 0; }
  label.perm { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; }
  .pass-wrap .toggle-pass { padding: 12px; right: 3px; top: 26px; font-size: 1rem; }
  .icon-btn { width: 38px; height: 38px; }
  .cal-card { padding: 12px; }
  .cal-toolbar { gap: 10px; }
  .cal-title { order: 2; flex-basis: 100%; min-width: 0; font-size: 1.05rem; }
  .cal-views { order: 3; width: 100%; }
  .cal-views a { flex: 1; text-align: center; padding: 10px 8px; }
  .agenda-bar { gap: 8px; }
  .agenda-bar input[type=date], .agenda-bar select { flex: 1 1 140px; min-width: 0; }
  .fin-two { grid-template-columns: minmax(0, 1fr); }
  .fin-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  dialog { max-width: calc(100vw - 20px); }
  .page-title { word-break: break-word; }
}
.cal-count { display: none; }
@media (max-width: 700px) {
  /* mês compacto: cabe no ecrã, sem deslocar; cada dia mostra só quantas marcações tem e leva ao dia */
  .cal-month { overflow: visible; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .cal-month-head { font-size: .6rem; letter-spacing: 0; padding: 8px 0; overflow: hidden; }
  .cal-month-cell { min-height: 62px; padding: 4px 2px; align-items: center; gap: 2px; }
  .cal-chip, .cal-more { display: none; }
  .cal-daynum { align-self: center; font-size: .8rem; }
  .cal-count { display: inline-block; min-width: 26px; padding: 3px 6px; border-radius: 12px; text-align: center; font-size: .75rem; font-weight: 700; color: var(--text-main); background: color-mix(in srgb, var(--primary) 28%, var(--bg-card)); }
  .cal-count:hover { text-decoration: none; }
}
