/* =====================================================================
   SISTEMA — Design system (preto & branco · claro / escuro)
   ===================================================================== */

@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('../vendor/inter/inter-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, 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-style: normal; font-display: swap; font-weight: 100 900;
  src: url('../vendor/inter/inter-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root, [data-bs-theme="light"] {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f5f5f5;
  --surface-3: #ededed;
  --border: #e8e8e8;
  --border-strong: #d4d4d4;
  --text: #0a0a0a;
  --text-2: #404040;
  --muted: #737373;
  --fg-inv: #ffffff;
  --ring: rgba(10, 10, 10, .12);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 48px rgba(0,0,0,.14);
  --overlay: rgba(0,0,0,.35);
  --mark: #ececec;
}
[data-bs-theme="dark"] {
  --bg: #0a0a0a;
  --surface: #121212;
  --surface-2: #1a1a1a;
  --surface-3: #242424;
  --border: #232323;
  --border-strong: #333333;
  --text: #fafafa;
  --text-2: #d4d4d4;
  --muted: #8f8f8f;
  --fg-inv: #0a0a0a;
  --ring: rgba(255, 255, 255, .16);
  --shadow-sm: none;
  --shadow: 0 0 0 1px rgba(255,255,255,.02);
  --shadow-lg: 0 16px 56px rgba(0,0,0,.6);
  --overlay: rgba(0,0,0,.6);
  --mark: #2a2a2a;
}

:root {
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-w: 248px;
  --sidebar-w-min: 72px;
  --topbar-h: 64px;
  /* aliases usados pelas páginas */
  --b-primary: var(--text);
  --b-border: var(--border);
  --b-muted: var(--muted);
  --b-radius: var(--radius);
}

[data-bs-theme] {
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-body-font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-body-font-size: .9rem;
  --bs-border-color: var(--border);
  --bs-secondary-color: var(--muted);
  --bs-tertiary-bg: var(--surface-2);
  --bs-secondary-bg: var(--surface-2);
  --bs-emphasis-color: var(--text);
  --bs-link-color: var(--text);
  --bs-link-color-rgb: var(--link-rgb, 10,10,10);
  --bs-link-hover-color: var(--text);
  --bs-primary: var(--text);
  --bs-heading-color: var(--text);
  --bs-dropdown-bg: var(--surface);
  --bs-card-bg: var(--surface);
}
[data-bs-theme="dark"] { --link-rgb: 250,250,250; }

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { background: var(--bg); color: var(--text); font-feature-settings: 'cv11', 'ss01'; letter-spacing: -.006em; }
a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
::selection { background: var(--text); color: var(--fg-inv); }
.text-muted, .form-text { color: var(--muted) !important; }
code { color: var(--text-2); background: var(--surface-2); padding: .1rem .35rem; border-radius: 6px; font-size: .82em; }
hr { border-color: var(--border); opacity: 1; }

/* Logos claro/escuro */
.logo-on-dark { display: none; }
[data-bs-theme="dark"] .logo-on-light { display: none; }
[data-bs-theme="dark"] .logo-on-dark { display: inline-block; }

/* ---------- Botões ---------- */
.btn { --bs-btn-font-weight: 500; --bs-btn-font-size: .875rem; --bs-btn-padding-y: .5rem; --bs-btn-padding-x: .95rem;
  border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  transition: background-color .15s, border-color .15s, color .15s, transform .05s; }
.btn:active { transform: scale(.98); }
.btn-sm { --bs-btn-padding-y: .3rem; --bs-btn-padding-x: .6rem; --bs-btn-font-size: .8rem; border-radius: 8px; }
.btn-lg { --bs-btn-padding-y: .72rem; --bs-btn-font-size: .95rem; }
.btn-primary {
  --bs-btn-bg: var(--text); --bs-btn-border-color: var(--text); --bs-btn-color: var(--fg-inv);
  --bs-btn-hover-bg: var(--text-2); --bs-btn-hover-border-color: var(--text-2); --bs-btn-hover-color: var(--fg-inv);
  --bs-btn-active-bg: var(--text-2); --bs-btn-active-border-color: var(--text-2); --bs-btn-active-color: var(--fg-inv);
  --bs-btn-disabled-bg: var(--text); --bs-btn-disabled-border-color: var(--text); --bs-btn-disabled-color: var(--fg-inv);
}
.btn-outline-primary, .btn-outline-success, .btn-outline-secondary {
  --bs-btn-color: var(--text); --bs-btn-border-color: var(--border-strong); --bs-btn-bg: var(--surface);
  --bs-btn-hover-bg: var(--surface-2); --bs-btn-hover-border-color: var(--border-strong); --bs-btn-hover-color: var(--text);
  --bs-btn-active-bg: var(--surface-3); --bs-btn-active-border-color: var(--text); --bs-btn-active-color: var(--text);
}
.btn-check:checked + .btn-outline-primary { background: var(--text); color: var(--fg-inv); border-color: var(--text); }
.btn-light, .btn-ghost {
  --bs-btn-bg: transparent; --bs-btn-border-color: transparent; --bs-btn-color: var(--text-2);
  --bs-btn-hover-bg: var(--surface-2); --bs-btn-hover-border-color: transparent; --bs-btn-hover-color: var(--text);
  --bs-btn-active-bg: var(--surface-3); --bs-btn-active-border-color: transparent; --bs-btn-active-color: var(--text);
}
.btn-outline-success { --bs-btn-color: var(--text); }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 10px; font-size: 1.05rem; }
.btn .bi { font-size: 1em; line-height: 1; }
.btn.text-danger:hover { background: rgba(220,38,38,.08); }

/* ---------- Formulários ---------- */
.form-label { font-weight: 500; font-size: .8rem; color: var(--text-2); margin-bottom: .35rem; }
.form-control, .form-select {
  background-color: var(--surface); border-color: var(--border-strong); color: var(--text);
  border-radius: var(--radius-sm); font-size: .9rem; padding: .55rem .8rem; min-height: 40px;
  transition: border-color .15s, box-shadow .15s;
}
.form-control::placeholder { color: var(--muted); opacity: .8; }
.form-control:focus, .form-select:focus { background-color: var(--surface); color: var(--text); border-color: var(--text); box-shadow: 0 0 0 3px var(--ring); }
.form-control:disabled, .form-select:disabled { background-color: var(--surface-2); color: var(--muted); }
.form-control-sm, .form-select-sm { min-height: 32px; padding: .3rem .6rem; font-size: .82rem; border-radius: 8px; }
.form-control-lg { min-height: 48px; font-size: .95rem; }
.input-group-text { background: var(--surface-2); border-color: var(--border-strong); color: var(--muted); border-radius: var(--radius-sm); font-size: .85rem; }
.form-check-input { border-color: var(--border-strong); background-color: var(--surface); }
.form-check-input:checked { background-color: var(--text); border-color: var(--text); }
[data-bs-theme="dark"] .form-check-input:checked[type=checkbox] { --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%230a0a0a' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e"); }
[data-bs-theme="dark"] .form-switch .form-check-input:checked { --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%230a0a0a'/%3e%3c/svg%3e"); }
.form-check-input:focus { box-shadow: 0 0 0 3px var(--ring); border-color: var(--text); }
.form-switch .form-check-input { width: 2.4em; height: 1.3em; }
.form-select { --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6' d='m4 6 4 4 4-4'/%3e%3c/svg%3e"); }
input[type="date"], input[type="time"] { color-scheme: light; }
[data-bs-theme="dark"] input[type="date"], [data-bs-theme="dark"] input[type="time"] { color-scheme: dark; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border);
  position: fixed; inset: 0 auto 0 0; z-index: 1040; display: flex; flex-direction: column;
  transition: width .2s ease, transform .25s ease;
}
.sidebar-brand { height: var(--topbar-h); display: flex; align-items: center; padding: 0 1.25rem; gap: .6rem; flex-shrink: 0; }
.sidebar-brand img.brand-h { height: 30px; width: auto; }
.sidebar-brand img.brand-s { height: 28px; width: auto; display: none; }
.sidebar-brand.brand-quadrada img.brand-h { height: 46px; width: 46px; object-fit: contain; flex: none; }
.sidebar-brand .brand-nome { font-weight: 700; font-size: .92rem; line-height: 1.15; letter-spacing: -.01em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sidebar-brand.brand-quadrada img.brand-s { height: 38px; width: 38px; object-fit: contain; }
.sb-collapsed .sidebar-brand .brand-nome { display: none; }
.sidebar-brand .brand-text { font-weight: 700; letter-spacing: .18em; font-size: .95rem; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .5rem .75rem 1rem; }
.nav-group { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); padding: 1.1rem .75rem .45rem; white-space: nowrap; }
/* grupos do menu recolhíveis: o menu cabe inteiro na tela sem rolar */
.sidebar .nav-group { display: flex; align-items: center; gap: .4rem; width: 100%; border: 0; background: none; text-align: left; cursor: pointer; border-radius: 8px; padding: .8rem .75rem .35rem; }
.sidebar .nav-group:hover { color: var(--text); }
.sidebar .nav-group .bi { margin-left: auto; font-size: .7rem; transition: transform .2s ease; }
.sidebar .nav-g-qtd { display: none; font-weight: 600; font-size: .62rem; letter-spacing: 0; padding: 1px 6px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); }
.sidebar .nav-g-qtd.alerta { background: #ef4444; color: #fff; }
.nav-sec.fechado .nav-itens { display: none; }
.nav-sec.fechado .nav-group .bi { transform: rotate(-90deg); }
.nav-sec.fechado .nav-g-qtd { display: inline-block; }
@media (min-width: 992px) { .sb-collapsed .nav-sec.fechado .nav-itens { display: block; } }
.sidebar .nav-link {
  display: flex; align-items: center; gap: .75rem; padding: .55rem .75rem; margin: 1px 0; border-radius: 10px;
  color: var(--text-2); font-weight: 500; font-size: .875rem; white-space: nowrap; text-decoration: none;
}
.sidebar .nav-link i { font-size: 1.1rem; width: 1.25rem; text-align: center; color: var(--muted); transition: color .15s; }
.sidebar .nav-link:hover { background: var(--surface-2); color: var(--text); }
.sidebar .nav-link:hover i { color: var(--text); }
.sidebar .nav-link.active { background: var(--text); color: var(--fg-inv); }
.sidebar .nav-link.active i { color: var(--fg-inv); }
.sidebar-foot { padding: .75rem; border-top: 1px solid var(--border); }
.sidebar-foot .nav-link { font-size: .8rem; }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; transition: margin .2s ease; }
.topbar {
  position: sticky; top: 0; z-index: 1020; height: var(--topbar-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .5rem; padding: 0 1.75rem;
}
.page-title { font-size: 1.05rem; font-weight: 600; margin: 0; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-trigger {
  display: flex; align-items: center; gap: .5rem; height: 36px; min-width: 260px; padding: 0 .5rem 0 .75rem;
  border: 1px solid var(--border); background: var(--surface); border-radius: 10px; color: var(--muted); font-size: .85rem; cursor: pointer;
  transition: border-color .15s;
}
.search-trigger:hover { border-color: var(--border-strong); color: var(--text-2); }
.search-trigger kbd, .kbd { margin-left: auto; font-family: inherit; font-size: .7rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: .1rem .4rem; box-shadow: none; }
.btn-user { display: flex; align-items: center; gap: .55rem; border: 0; background: transparent; color: var(--text); padding: .25rem .4rem; border-radius: 10px; }
.btn-user:hover { background: var(--surface-2); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--text); color: var(--fg-inv); display: grid; place-items: center; font-weight: 600; font-size: .78rem; flex-shrink: 0; }
.content { padding: 1.75rem; flex: 1; width: 100%; max-width: 1440px; }

/* Sidebar recolhida (desktop) */
@media (min-width: 992px) {
  .sb-collapsed .sidebar { width: var(--sidebar-w-min); }
  .sb-collapsed .main { margin-left: var(--sidebar-w-min); }
  .sb-collapsed .sidebar .nav-link span, .sb-collapsed .nav-group, .sb-collapsed .sidebar-brand img.brand-h, .sb-collapsed .sidebar-brand .brand-text { display: none; }
  .sb-collapsed .sidebar-brand { justify-content: center; padding: 0; }
  .sb-collapsed .sidebar-brand img.brand-s { display: inline-block; }
  .sb-collapsed .sidebar .nav-link { justify-content: center; padding: .6rem; }
  .sb-collapsed .nav-group { height: .75rem; padding: 0; }
}

/* Mobile */
.sidebar-backdrop { display: none; }
.bottom-nav { display: none; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar-brand img.brand-s { display: none !important; }
  .main { margin-left: 0; }
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: var(--overlay); z-index: 1030; }
  .topbar { padding: 0 1rem; }
  .content { padding: 1rem 1rem 5.5rem; }
  .search-trigger { min-width: 0; width: 36px; padding: 0; justify-content: center; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1025; height: 64px; padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--border);
  }
  .bottom-nav a, .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font-size: .68rem; color: var(--muted); background: none; border: 0; text-decoration: none; }
  .bottom-nav i { font-size: 1.25rem; }
  .bottom-nav .active { color: var(--text); font-weight: 600; }
}

/* ---------- Cards ---------- */
.card { --bs-card-bg: var(--surface); --bs-card-border-color: var(--border); --bs-card-border-radius: var(--radius); --bs-card-inner-border-radius: calc(var(--radius) - 1px); background: var(--surface); box-shadow: var(--shadow-sm); }
.card-header { background: transparent; border-bottom: 1px solid var(--border); font-weight: 600; font-size: .9rem; padding: 1rem 1.25rem; }
.card-body { padding: 1.25rem; }
.card-footer { border-top: 1px solid var(--border); padding: .85rem 1.25rem; background: transparent; }
.section-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 600; margin: 1.75rem 0 .9rem; display: flex; align-items: center; gap: .75rem; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.section-title:first-child { margin-top: 0; }

/* KPIs */
a.stat { text-decoration: none; }
.stat { padding: 1.15rem 1.25rem; display: flex; flex-direction: column; gap: .2rem; height: 100%; position: relative; transition: border-color .15s, transform .15s; }
a.stat:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.stat-icon { position: absolute; top: 1.1rem; right: 1.1rem; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 1rem; background: var(--surface-2); color: var(--text-2); }
.stat-label { font-size: .8rem; color: var(--muted); font-weight: 500; order: -1; }
.stat-value { font-size: 1.65rem; font-weight: 650; line-height: 1.15; letter-spacing: -.03em; margin-top: .35rem; }
.stat.accent { background: var(--text); color: var(--fg-inv); border-color: var(--text); }
.stat.accent .stat-label { color: color-mix(in srgb, var(--fg-inv) 65%, transparent); }
.stat.accent .stat-icon { background: color-mix(in srgb, var(--fg-inv) 14%, transparent); color: var(--fg-inv); }

.total-box { background: var(--text); color: var(--fg-inv); border-radius: var(--radius); padding: 1.15rem 1.35rem; }
.total-box .lbl { font-size: .72rem; opacity: .65; text-transform: uppercase; letter-spacing: .09em; font-weight: 600; }
.total-box .val { font-size: 1.85rem; font-weight: 650; letter-spacing: -.03em; line-height: 1.2; margin-top: .2rem; }

/* ---------- Tabelas ---------- */
.table { --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-hover-bg: var(--surface-2); --bs-table-hover-color: var(--text); --bs-table-border-color: var(--border); margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .8rem 1rem; }
.table-sm > :not(caption) > * > * { padding: .5rem .75rem; }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; border-bottom-width: 1px; white-space: nowrap; background: var(--surface); }
.table td { vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td a { color: var(--text); font-weight: 500; }
.card > .table-responsive:first-child .table thead th:first-child { border-top-left-radius: var(--radius); }
.actions { white-space: nowrap; text-align: right; }
.actions .btn { width: 32px; height: 32px; padding: 0; color: var(--muted); }
.actions .btn:hover { color: var(--text); }
.actions form { display: inline; }

/* Status (monocromático) */
.badge-st { display: inline-flex; align-items: center; gap: .35rem; font-weight: 500; font-size: .75rem; padding: .28em .65em; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); }
.badge-st::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-st.st-solid { background: var(--text); color: var(--fg-inv); border-color: var(--text); }
.badge-st.st-muted { color: var(--muted); border-style: dashed; }
.badge-st.st-muted::before { background: transparent; border: 1px solid currentColor; }
.text-bg-light { background: var(--surface-2) !important; color: var(--text-2) !important; border: 1px solid var(--border); font-weight: 500; }
.status-select { border-radius: 999px; min-height: 30px; padding: .2rem 2rem .2rem .75rem; font-size: .78rem; width: auto; font-weight: 500; }

/* ---------- Toolbar / filtros ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1.25rem; }
.toolbar .search, .search-input { position: relative; max-width: 340px; flex: 1 1 220px; }
.search-input .bi { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-input .form-control { padding-left: 2.2rem; }
.filter-select { max-width: 190px; }

/* Abas (pills) */
.nav-pills { gap: .25rem; background: var(--surface-2); padding: 4px; border-radius: 12px; border: 1px solid var(--border); }
.nav-pills .nav-link { color: var(--muted); font-weight: 500; font-size: .85rem; padding: .4rem .9rem; border-radius: 9px; }
.nav-pills .nav-link:hover { color: var(--text); text-decoration: none; }
.nav-pills .nav-link.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
[data-bs-theme="dark"] .nav-pills .nav-link.active { background: var(--surface-3); }
.nav-tabs { border-color: var(--border); }
.nav-tabs .nav-link { color: var(--muted); border: 0; border-bottom: 2px solid transparent; font-weight: 500; }
.nav-tabs .nav-link.active { color: var(--text); background: transparent; border-bottom-color: var(--text); }

/* Paginação */
.pagination { --bs-pagination-bg: transparent; --bs-pagination-border-color: transparent; --bs-pagination-color: var(--text-2); --bs-pagination-hover-bg: var(--surface-2); --bs-pagination-hover-color: var(--text); --bs-pagination-hover-border-color: transparent; --bs-pagination-active-bg: var(--text); --bs-pagination-active-border-color: var(--text); --bs-pagination-active-color: var(--fg-inv); --bs-pagination-focus-box-shadow: 0 0 0 3px var(--ring); --bs-pagination-disabled-bg: transparent; gap: 2px; }
.pagination .page-link { border-radius: 8px !important; min-width: 32px; text-align: center; }

/* Alertas / toasts */
.alert { border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: .875rem; display: flex; align-items: center; gap: .6rem; box-shadow: var(--shadow); padding: .8rem 1rem; }
.alert .btn-close { margin-left: auto; position: static; padding: .5rem; }
.alert::before { font-family: 'bootstrap-icons'; font-size: 1.05rem; }
.alert-success::before { content: '\F26A'; }
.alert-danger { border-color: #dc2626; }
.alert-danger::before { content: '\F33A'; color: #dc2626; }
.alert-warning::before { content: '\F431'; }
.alert-info::before, .alert-light::before { content: '\F431'; }
.alert-light { background: var(--surface-2); box-shadow: none; }
.flash-stack { position: fixed; top: calc(var(--topbar-h) + .75rem); right: 1.25rem; z-index: 1080; width: min(420px, calc(100vw - 2rem)); display: grid; gap: .5rem; }
.flash-stack .alert { margin: 0; animation: slideIn .25s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Dropdown / modal */
.dropdown-menu { --bs-dropdown-bg: var(--surface); --bs-dropdown-border-color: var(--border); --bs-dropdown-link-color: var(--text-2); --bs-dropdown-link-hover-bg: var(--surface-2); --bs-dropdown-link-hover-color: var(--text); --bs-dropdown-link-active-bg: var(--surface-3); --bs-dropdown-link-active-color: var(--text); --bs-dropdown-divider-bg: var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: .35rem; font-size: .875rem; min-width: 220px; }
.dropdown-item { border-radius: 8px; padding: .45rem .7rem; display: flex; align-items: center; gap: .55rem; }
.dropdown-header { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.modal-content { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); }
.modal-header, .modal-footer { border-color: var(--border); }
.modal-backdrop { --bs-backdrop-bg: #000; --bs-backdrop-opacity: .45; }
.btn-close { filter: none; }
[data-bs-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

/* Alternador de tema */
.theme-switch { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.theme-switch button { border: 0; background: transparent; color: var(--muted); width: 30px; height: 28px; border-radius: 7px; display: grid; place-items: center; font-size: .9rem; }
.theme-switch button:hover { color: var(--text); }
.theme-switch button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
[data-bs-theme="dark"] .theme-switch button.on { background: var(--surface-3); }

/* ---------- Paleta de comandos (Ctrl/⌘ K) ---------- */
.cmdk .modal-dialog { max-width: 620px; margin-top: 12vh; }
.cmdk .modal-content { overflow: hidden; }
.cmdk-input { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; font-size: 1rem; padding: 1.1rem 1.25rem 1.1rem 3rem; min-height: 58px; box-shadow: none !important; }
.cmdk-input:focus { border-color: var(--border); }
.cmdk-ico { position: absolute; left: 1.2rem; top: 1.15rem; color: var(--muted); font-size: 1.05rem; }
.cmdk-list { max-height: 420px; overflow-y: auto; padding: .4rem; }
.cmdk-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: .7rem .75rem .35rem; font-weight: 600; }
.cmdk-item { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border-radius: 10px; color: var(--text); cursor: pointer; text-decoration: none !important; }
.cmdk-item i { color: var(--muted); font-size: 1rem; width: 1.2rem; text-align: center; }
.cmdk-item small { color: var(--muted); margin-left: auto; font-size: .75rem; }
.cmdk-item.sel { background: var(--surface-2); }
.cmdk-foot { display: flex; gap: 1rem; padding: .6rem 1rem; border-top: 1px solid var(--border); font-size: .72rem; color: var(--muted); }

/* ---------- Dropzone e documentos ---------- */
.dropzone {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2);
  padding: 1.75rem 1rem; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; position: relative;
}
.dropzone:hover, .dropzone.over { border-color: var(--text); background: var(--surface-3); }
.dropzone .dz-icon { width: 44px; height: 44px; border-radius: 12px; display: inline-grid; place-items: center; background: var(--surface); border: 1px solid var(--border); font-size: 1.25rem; margin-bottom: .6rem; }
.dropzone .dz-title { font-weight: 600; font-size: .9rem; }
.dropzone .dz-sub { color: var(--muted); font-size: .8rem; }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-queue { display: grid; gap: .4rem; margin-top: .75rem; text-align: left; }
.dz-queue:empty { display: none; }
.dz-file { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: .82rem; }
.dz-file .bi { font-size: 1.1rem; }
.dz-file .dz-size { color: var(--muted); margin-left: auto; }
.dz-file.err { border-color: #dc2626; color: #dc2626; }

.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.doc-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); transition: border-color .15s, transform .15s; position: relative; }
.doc-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.doc-thumb { aspect-ratio: 4 / 3; background: var(--surface-2); display: grid; place-items: center; cursor: zoom-in; overflow: hidden; border-bottom: 1px solid var(--border); }
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.doc-thumb .bi { font-size: 2rem; color: var(--muted); }
.doc-meta { padding: .55rem .7rem; }
.doc-name { font-size: .8rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-info { font-size: .7rem; color: var(--muted); }
.doc-tag { position: absolute; top: .5rem; left: .5rem; font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; background: var(--surface); border: 1px solid var(--border); padding: .15rem .45rem; border-radius: 6px; }
.doc-actions { position: absolute; top: .4rem; right: .4rem; display: flex; gap: .25rem; opacity: 0; transition: opacity .15s; }
.doc-card:hover .doc-actions { opacity: 1; }
@media (hover: none) { .doc-actions { opacity: 1; } }
.doc-actions .btn { width: 28px; height: 28px; padding: 0; background: var(--surface); border: 1px solid var(--border); }
.viewer .modal-dialog { max-width: min(1100px, 94vw); }
.viewer .modal-body { padding: 0; background: var(--surface-2); height: min(80vh, 900px); display: grid; place-items: center; }
.viewer iframe { width: 100%; height: 100%; border: 0; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.doc-filter { display: flex; gap: .35rem; flex-wrap: wrap; }
.doc-filter button { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; font-size: .78rem; padding: .25rem .75rem; }
.doc-filter button.on { background: var(--text); color: var(--fg-inv); border-color: var(--text); }

/* ---------- Componentes de páginas ---------- */
.servico-row { border: 1px solid var(--border); border-radius: 12px; padding: .65rem .8rem; margin-bottom: .5rem; background: var(--surface); transition: border-color .15s, background .15s; }
.servico-row.ativo { border-color: var(--text); background: var(--surface-2); }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid var(--border); font-size: .85rem; }
.timeline li:last-child { border-bottom: 0; }
.timeline .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text) !important; margin-top: .4rem; flex-shrink: 0; }

.placeholder-chip { display: inline-block; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .74rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; padding: .15rem .45rem; margin: .15rem; cursor: pointer; color: var(--text-2); }
.placeholder-chip:hover { border-color: var(--text); color: var(--text); }
.contrato-editor { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .84rem; min-height: 440px; line-height: 1.6; }
.contrato-preview { background: #fff; color: #111; border: 1px solid var(--border); border-radius: 12px; padding: 2.25rem; max-height: 72vh; overflow: auto; font-family: Georgia, 'Times New Roman', serif; line-height: 1.65; font-size: .95rem; }
.contrato-preview mark { background: #ececec; color: #111; border-radius: 4px; padding: 0 .2rem; font-family: ui-monospace, monospace; font-size: .8em; }
.contrato-preview mark.mark-calc { background: #f4f4f4; border: 1px dashed #bbb; }

.empty { text-align: center; padding: 3.5rem 1rem !important; color: var(--muted); }
.empty i { font-size: 1.6rem; display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto .75rem; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }

.list-group { --bs-list-group-bg: transparent; --bs-list-group-border-color: var(--border); --bs-list-group-color: var(--text); }
dl dt { font-weight: 500; }

/* Bar chart (painel) */
.bars { display: flex; align-items: flex-end; gap: .9rem; height: 190px; }
.bars .bar-col { flex: 1; text-align: center; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.bars .bar { background: var(--text); border-radius: 8px 8px 3px 3px; min-height: 3px; transition: opacity .15s; }
.bars .bar.zero { background: var(--surface-3); }
.bars .bar-col:hover .bar { opacity: .8; }
.bars .bar-v { font-size: .72rem; font-weight: 600; margin-bottom: .3rem; }
.bars .bar-l { font-size: .74rem; color: var(--muted); margin-top: .45rem; }

/* Configurações */
.settings-nav { position: sticky; top: calc(var(--topbar-h) + 1.75rem); }
.settings-nav .nav-link { display: flex; align-items: center; gap: .6rem; color: var(--text-2); font-weight: 500; font-size: .875rem; padding: .55rem .75rem; border-radius: 10px; }
.settings-nav .nav-link i { color: var(--muted); }
.settings-nav .nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.settings-nav .nav-link.active { background: var(--surface-2); color: var(--text); font-weight: 600; }
.settings-nav .nav-link.active i { color: var(--text); }
.setting-row { display: grid; grid-template-columns: minmax(180px, 1fr) 2fr; gap: 1rem 2rem; padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.setting-row:last-child { border-bottom: 0; padding-bottom: 0; }
.setting-row:first-child { padding-top: 0; }
.setting-row h6 { font-size: .875rem; font-weight: 600; margin: 0 0 .2rem; }
.setting-row p { font-size: .8rem; color: var(--muted); margin: 0; }
@media (max-width: 767.98px) { .setting-row { grid-template-columns: 1fr; gap: .6rem; } }
.brand-slot { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: .75rem; }
.brand-slot > div { height: 120px; display: grid; place-items: center; padding: 1rem; }
.brand-slot img { max-height: 72px; max-width: 90%; object-fit: contain; }
.brand-slot .on-white { background: #fff; }
.brand-slot .on-black { background: #0a0a0a; }
.brand-slot small { position: absolute; }
.theme-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.theme-card { border: 1.5px solid var(--border); border-radius: 12px; padding: .5rem; cursor: pointer; text-align: center; font-size: .82rem; font-weight: 500; }
.theme-card .tc-prev { height: 70px; border-radius: 8px; margin-bottom: .45rem; border: 1px solid var(--border); display: flex; overflow: hidden; }
.theme-card .tc-prev i { flex: 1; }
.btn-check:checked + .theme-card { border-color: var(--text); box-shadow: 0 0 0 3px var(--ring); }

/* ---------- Login ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--surface); }
.auth-side { background: #0a0a0a; color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: ''; position: absolute; inset: auto -20% -40% auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.08), transparent); }
.auth-side .auth-logo { width: min(260px, 60%); height: auto; }
.auth-side h2 { color: #fff; font-weight: 600; font-size: clamp(1.6rem, 2.4vw, 2.2rem); letter-spacing: -.03em; max-width: 24rem; line-height: 1.2; }
.auth-side p { color: #a3a3a3; max-width: 26rem; }
.auth-form { display: grid; place-items: center; padding: 2rem; position: relative; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 1.6rem; font-weight: 650; letter-spacing: -.03em; }
.auth-theme { position: absolute; top: 1.25rem; right: 1.25rem; }
.auth-mobile-logo { display: none; }
.auth-mobile-logo img { height: 72px; width: auto; }
@media (max-width: 767.98px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-mobile-logo { display: block; margin-bottom: 2rem; }
}

/* Utilidades */
.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600 !important; }
.font-monospace { font-family: ui-monospace, 'SF Mono', Menlo, monospace !important; font-size: .85em; }
.tabular { font-variant-numeric: tabular-nums; }
.text-success { color: var(--text) !important; }
.text-danger { color: #dc2626 !important; }
[data-bs-theme="dark"] .text-danger { color: #f87171 !important; }
mark { background: var(--mark); color: var(--text); }
@media print { .sidebar, .topbar, .bottom-nav { display: none !important; } .main { margin: 0; } }
.min-w-0 { min-width: 0; }

/* Listas em cartões no celular */
@media (max-width: 767.98px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { padding: .85rem 1rem; border-bottom: 1px solid var(--border); position: relative; width: auto; box-sizing: border-box; }
  .table-cards tbody tr:last-child { border-bottom: 0; }
  .table-cards > :not(caption) > * > * { padding: .12rem 0; border: 0; }
  .table-cards td[data-label]:not(:first-child):not(.actions) { display: flex; justify-content: space-between; gap: 1rem; font-size: .82rem; color: var(--text-2); }
  .table-cards td[data-label]:not(:first-child):not(.actions)::before { content: attr(data-label); color: var(--muted); font-size: .75rem; text-transform: none; }
  .table-cards td:empty { display: none; }
  .table-cards td:first-child { font-weight: 600; font-size: .95rem; padding-right: 6rem; margin-bottom: .25rem; }
  .table-cards td.actions { position: absolute; top: .55rem; right: .5rem; width: auto; }
  .table-cards td.empty { padding: 2.5rem 1rem !important; }
  .table-cards td.empty::before { display: none; }
  .table-cards .status-select { max-width: 150px; }
}

/* ---------- v3: companhias, aeroportos, milheiro ---------- */
.cia-logo { display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--border); border-radius: 7px; padding: 4px 8px; flex: none; }
.cia-logo img { width: auto; max-width: 110px; object-fit: contain; display: block; }
.tbl-cias .cia-logo { width: 128px; height: 30px; }
.tbl-cias .cia-logo img { height: 20px; }
.aero-hint { min-height: 1.2em; }
.qr-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: .9rem; display: flex; gap: 1rem; align-items: center; }
.qr-box .qr { width: 80px; height: 80px; flex: none; background: #fff; padding: 4px; border-radius: 8px; }
.qr-box .qr svg { width: 100%; height: 100%; display: block; }
.table td.tabular, .table td.text-end { white-space: nowrap; }

/* ---------- contratos: linhas repetíveis (parcelas) ---------- */
.grupo-linha { border: 1px solid var(--bs-border-color); border-radius: 12px; padding: .6rem .75rem .75rem; margin-bottom: .6rem; }
.grupo-topo { display: flex; align-items: center; margin-bottom: .35rem; }
.grupo-tag { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color); }
.contrato-preview table { width: 100%; border-collapse: collapse; margin: .6rem 0 1rem; }
.contrato-preview td, .contrato-preview th { border: 1px solid #999; padding: .3rem .5rem; vertical-align: top; }

/* ---------- viagens: selos de status ---------- */
.vchips { display: inline-flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
.vchip { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 600; padding: .18rem .5rem; border-radius: 999px; border: 1px solid var(--bs-border-color); white-space: nowrap; }
.vchip.ok { background: var(--bs-emphasis-color); color: var(--bs-body-bg); border-color: var(--bs-emphasis-color); }
.vchip.pend { border-style: dashed; color: var(--bs-emphasis-color); }
.vchip.na { opacity: .4; text-decoration: line-through; }
.vchip i { font-size: .8rem; }

/* ---------- viagens: formulário ---------- */
.seg { display: inline-flex; border: 1px solid var(--bs-border-color); border-radius: 999px; padding: 2px; gap: 2px; flex-wrap: wrap; }
.seg .btn { border: 0; border-radius: 999px; font-size: .78rem; padding: .22rem .7rem; color: var(--bs-secondary-color); }
.seg .btn-check:checked + .btn { background: var(--bs-emphasis-color); color: var(--bs-body-bg); }
.via-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.via-head > div:first-child { display: flex; align-items: center; gap: .5rem; font-size: .98rem; }
.via-head i { font-size: 1.1rem; }
.via-bloco .via-campos { transition: opacity .15s; }
.via-bloco.na .via-campos { opacity: .35; pointer-events: none; }
.via-linha { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--bs-border-color); font-size: .9rem; }
.via-linha:last-child { border-bottom: 0; }
.via-linha b { margin-left: auto; font-weight: 600; }
.via-linha.pend b { border-bottom: 1.5px dashed currentColor; }
.via-linha.na { opacity: .45; }
.stat-on { outline: 2px solid var(--bs-emphasis-color); outline-offset: -2px; }

/* ---------- agenda ---------- */
.ag-filtros { display: flex; flex-wrap: wrap; gap: .35rem; }
.ag-tipo { border: 1px solid var(--bs-border-color); border-radius: 999px; font-size: .76rem; padding: .25rem .65rem; color: var(--bs-secondary-color); display: inline-flex; gap: .3rem; align-items: center; }
.btn-check:checked + .ag-tipo { background: var(--bs-emphasis-color); color: var(--bs-body-bg); border-color: var(--bs-emphasis-color); }
.ag-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ag-dow { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--bs-secondary-color); padding: .6rem .5rem; border-bottom: 1px solid var(--bs-border-color); }
.ag-dia { min-height: 104px; padding: .35rem; border-right: 1px solid var(--bs-border-color); border-bottom: 1px solid var(--bs-border-color); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ag-dia:nth-child(7n) { border-right: 0; }
.ag-dia.fora { background: var(--bs-tertiary-bg); }
.ag-dia.passado .ag-num { opacity: .45; }
.ag-num { font-size: .78rem; font-weight: 600; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; }
.ag-dia.hoje .ag-num { background: var(--bs-emphasis-color); color: var(--bs-body-bg); }
.ag-ev { display: flex; align-items: center; gap: .25rem; font-size: .72rem; padding: .12rem .4rem; border-radius: 6px; background: var(--bs-tertiary-bg); color: var(--bs-emphasis-color); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-ev:hover { background: var(--bs-emphasis-color); color: var(--bs-body-bg); }
.ag-ev.ag-ida { background: var(--bs-emphasis-color); color: var(--bs-body-bg); }
.ag-ev { border: 1px solid transparent; }
.ag-ev.alerta { background: transparent; color: var(--bs-emphasis-color); border: 1px dashed var(--bs-emphasis-color); }
.ag-ev.ag-ida.alerta { background: transparent; }
.ag-mais { font-size: .7rem; color: var(--bs-secondary-color); padding-left: .4rem; }
.ag-lista { max-height: 70vh; overflow: auto; }
.ag-data { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--bs-secondary-color); margin: .9rem 0 .35rem; display: flex; align-items: center; gap: .5rem; }
.ag-data span { font-size: 1.05rem; font-weight: 700; color: var(--bs-emphasis-color); letter-spacing: 0; }
.ag-data.hoje span { background: var(--bs-emphasis-color); color: var(--bs-body-bg); border-radius: 6px; padding: 0 .35rem; }
.ag-item { display: flex; gap: .7rem; align-items: flex-start; padding: .5rem .55rem; border-radius: 10px; text-decoration: none; color: inherit; }
.ag-item:hover { background: var(--bs-tertiary-bg); }
.ag-item.alerta { box-shadow: inset 2px 0 0 var(--bs-emphasis-color); }
.ag-ico { font-size: 1rem; width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: 8px; background: var(--bs-tertiary-bg); flex: none; }
.ag-ico.ag-ida { background: var(--bs-emphasis-color); color: var(--bs-body-bg); }

/* =====================================================================
   REFINO v7 — interface leve, moderna e responsiva (celular → monitor grande)
   ===================================================================== */
:root { --radius: 16px; --radius-sm: 11px; --ease: cubic-bezier(.2, .7, .2, 1); }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: 'cv11', 'ss01'; }
::selection { background: var(--text); color: var(--fg-inv); }
* { -webkit-tap-highlight-color: transparent; }

/* superfícies mais leves */
.card { border-color: var(--border); box-shadow: 0 1px 0 rgba(0,0,0,.02); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
[data-bs-theme="light"] .card:hover { border-color: var(--border-strong); }
.card-header { background: transparent; font-weight: 600; letter-spacing: -.01em; padding: 1rem 1.25rem; }
.stat { transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease); }
a.stat:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.btn { transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease); }
.btn:active { transform: scale(.98); }
.form-control, .form-select { transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background-color .15s; }
.form-control:focus, .form-select:focus { box-shadow: 0 0 0 4px var(--ring); }
.btn-success { --bs-btn-bg: #1f9d55; --bs-btn-border-color: #1f9d55; --bs-btn-hover-bg: #198a49; --bs-btn-hover-border-color: #198a49; --bs-btn-active-bg: #157a40; --bs-btn-color: #fff; --bs-btn-hover-color: #fff; }
.text-whats { color: #1f9d55 !important; }
.modal-content { border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); }
.modal-header, .modal-footer { border-color: var(--border); }
.dropdown-menu { border-radius: 14px; box-shadow: var(--shadow-lg); border-color: var(--border); padding: .35rem; }
.dropdown-item { border-radius: 9px; }
.page-title { letter-spacing: -.02em; }
.content { margin-inline: auto; }

/* animação de entrada suave */
@media (prefers-reduced-motion: no-preference) {
  .content > * { animation: bl-in .28s var(--ease) both; }
  @keyframes bl-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}

/* tabelas: números alinhados e nada de texto quebrando no meio */
.table { --bs-table-bg: transparent; }
.table > thead th { white-space: nowrap; }
.tabular, .table td.text-end { font-variant-numeric: tabular-nums; }

/* ---------- listas em cartões (celular e tablet) ---------- */
@media (max-width: 991.98px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tbody { display: grid; grid-template-columns: 1fr; }
  .table-cards tr { padding: .95rem 1.1rem; border-bottom: 1px solid var(--border); position: relative; width: auto; box-sizing: border-box; }
  .table-cards tbody tr:last-child { border-bottom: 0; }
  .table-cards > :not(caption) > * > * { padding: .16rem 0; border: 0; background: transparent; box-shadow: none; }
  /* rótulo à esquerda, valor alinhado à direita (inclusive valores em duas linhas) */
  .table-cards td[data-label]:not(:first-child):not(.actions) { display: block; text-align: right; font-size: .84rem; color: var(--text-2); overflow: hidden; }
  .table-cards td[data-label]:not(:first-child):not(.actions)::before { content: attr(data-label); float: left; color: var(--muted); font-size: .76rem; padding-right: 1rem; line-height: 1.6; }
  .table-cards td[data-label] .d-flex { justify-content: flex-end; }
  .table-cards td[data-label] .small { font-size: .76rem; }
  .table-cards td:empty { display: none; }
  .table-cards td:first-child { font-weight: 600; font-size: .95rem; padding-right: 7.5rem; margin-bottom: .3rem; text-align: left; }
  .table-cards td.actions { position: absolute; top: .6rem; right: .6rem; width: auto; display: flex; gap: .1rem; }
  .table-cards td.empty { padding: 2.5rem 1rem !important; text-align: center !important; }
  .table-cards td.empty::before { display: none; }
  .table-cards .status-select { max-width: 150px; margin-left: auto; }
  .table-cards .vchips { justify-content: flex-end; }
}
@media (min-width: 640px) and (max-width: 991.98px) {
  .table-cards tbody { grid-template-columns: 1fr 1fr; }
  .table-cards tbody tr { border-right: 1px solid var(--border); }
  .table-cards tbody tr:nth-child(2n) { border-right: 0; }
  .table-cards tbody tr:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
  .table-cards td.empty { grid-column: 1 / -1; }
}

/* ---------- celular ---------- */
@media (max-width: 767.98px) {
  .content { padding: 1rem 1rem calc(88px + env(safe-area-inset-bottom)); }
  .form-control, .form-select { font-size: 16px; }          /* evita zoom automático no iPhone */
  .btn { --bs-btn-padding-y: .6rem; }
  .actions .btn { width: 38px; height: 38px; }
  .toolbar { gap: .5rem; }
  .toolbar .search-input { flex: 1 1 100%; max-width: none; }
  .toolbar > .btn, .toolbar > a.btn { flex: 1 1 auto; justify-content: center; }
  .toolbar > .ms-auto { margin-left: 0 !important; }
  .card-header { padding: .9rem 1rem; }
  .card-body { padding: 1rem; }
  .stat { padding: 1rem; }
  .stat-value { font-size: 1.45rem; }
  .section-title { margin-top: 1.4rem; }
  /* janelas viram "bottom sheet" */
  .modal-dialog { margin: 0; max-width: none; min-height: 100%; display: flex; align-items: flex-end; }
  .modal.fade .modal-dialog { transform: translateY(24px); }
  .modal.show .modal-dialog { transform: none; }
  .modal-content { border-radius: 22px 22px 0 0; max-height: 92dvh; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
  .modal-dialog-scrollable .modal-content { max-height: 92dvh; }
  .modal-footer { position: sticky; bottom: 0; background: var(--surface); }
  .modal-footer .btn { flex: 1; }
  .dash-acoes { width: 100%; display: grid !important; grid-template-columns: 1fr 1fr; }
  .dash-acoes .btn { justify-content: center; }
  .dash-acoes .btn-primary { grid-column: 1 / -1; order: -1; }
}
.bottom-nav { padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 1800px) { .content { max-width: 1600px; } }

/* ---------- lista compacta (painel: últimos orçamentos) ---------- */
.lista-linhas { list-style: none; margin: 0; padding: 0; }
.lista-linhas li { border-bottom: 1px solid var(--border); }
.lista-linhas li:last-child { border-bottom: 0; }
.lista-linhas a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem 1rem; align-items: center; padding: .8rem 1.25rem; color: inherit; text-decoration: none; transition: background-color .15s; }
.lista-linhas a:hover { background: var(--surface-2); }
.lista-linhas .ll-t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lista-linhas .ll-s { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; grid-column: 1; }
.lista-linhas .ll-v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; grid-row: 1; grid-column: 2; }
.lista-linhas .ll-b { grid-column: 2; text-align: right; }
@media (max-width: 767.98px) { .lista-linhas a { padding: .75rem 1rem; } }

/* ---------- vouchers: bilhetes ---------- */
.tabs-seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs-seg::-webkit-scrollbar { display: none; }
.tabs-seg > * { flex: none; }
.tabs-seg a, .tabs-seg button, .tabs-seg label { border: 0; background: transparent; border-radius: 999px; padding: .38rem .9rem; font-size: .82rem; font-weight: 500; color: var(--muted); text-decoration: none; white-space: nowrap; }
.tabs-seg .on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.tabs-seg .n { opacity: .55; margin-left: .25rem; font-variant-numeric: tabular-nums; }
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1rem; }
@media (max-width: 400px) { .tickets { grid-template-columns: 1fr; } }
.ticket { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.ticket:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,.07); border-color: var(--border-strong); }
.ticket.passado { opacity: .62; }
.ticket.passado:hover { opacity: 1; }
.tk-top { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.15rem .2rem; min-height: 52px; }
.tk-top .cia-logo { margin: 0; }
.tk-voo { font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.tk-cia { font-size: .75rem; color: var(--muted); line-height: 1.2; }
.tk-cod { margin-left: auto; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .72rem; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: .2rem .5rem; white-space: nowrap; }
.tk-rota { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem; padding: .7rem 1.15rem .2rem; }
.tk-iata { font-size: 1.9rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.tk-linha { position: relative; height: 1px; border-top: 1.5px dashed var(--border-strong); }
.tk-linha i { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -55%) rotate(90deg); background: var(--surface); padding: 0 .4rem; font-size: 1rem; color: var(--text); }
.tk-cidades { display: grid; grid-template-columns: 1fr auto 1fr; gap: .5rem; padding: .3rem 1.15rem .9rem; font-size: .76rem; color: var(--muted); }
.tk-cidades span:last-child { text-align: right; }
.tk-quando { text-align: center; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tk-quando small { font-weight: 400; color: var(--muted); margin-left: .3rem; }
.tk-corte { position: relative; height: 0; border-top: 1.5px dashed var(--border); margin: 0 1.15rem; }
.tk-corte::before, .tk-corte::after { content: ''; position: absolute; top: -10px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border); }
.tk-corte::before { left: calc(-1.15rem - 11px); clip-path: inset(0 0 0 50%); }
.tk-corte::after { right: calc(-1.15rem - 11px); clip-path: inset(0 50% 0 0); }
.tk-pax { display: flex; align-items: center; gap: .75rem; padding: .85rem 1.15rem .35rem; min-width: 0; }
.tk-pax .lbl { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.tk-pax .nome { font-weight: 600; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-pax .info { min-width: 0; flex: 1; }
.tk-serv { font-size: .72rem; color: var(--text-2); background: var(--surface-2); border-radius: 999px; padding: .2rem .55rem; white-space: nowrap; }
.tk-acoes { display: flex; gap: .4rem; padding: .55rem 1.15rem 1rem; margin-top: auto; }
.tk-acoes .btn { height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; font-size: .8rem; }
.tk-acoes .btn-ghost { width: 36px; padding: 0; color: var(--muted); }
.tk-acoes .btn-whats { flex: 1; background: rgba(31,157,85,.1); color: #1f9d55; border: 0; font-weight: 600; }
.tk-acoes .btn-whats:hover { background: #1f9d55; color: #fff; }
[data-bs-theme="dark"] .tk-acoes .btn-whats { background: rgba(31,157,85,.18); color: #46c47e; }
.tk-tag { position: absolute; top: .9rem; right: 1.15rem; }
.tickets-vazio { grid-column: 1 / -1; }

/* ---------- logos de companhias: chip uniforme ---------- */
.cia-logo { display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #e6e6e6; border-radius: 8px; padding: 3px 8px; line-height: 0; flex: none; }
.cia-logo img { display: block; width: auto; max-width: 110px; object-fit: contain; }
.wa-link { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: .4rem .5rem .4rem .7rem; }

@media (max-width: 991.98px) { .table-cards td[data-label]:empty { display: none !important; } }
.modal-footer .btn, .wa-link .btn { white-space: nowrap; }
@media (max-width: 767.98px) { .modal-footer { flex-wrap: nowrap; gap: .5rem; } .modal-footer > * { margin: 0; } #waMsg { min-height: 220px; } }
/* ---------- envio de PDF pelo WhatsApp ---------- */
.wa-anexo { display: flex; align-items: center; gap: .75rem; padding: .7rem .75rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.wa-anexo .wa-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); font-size: 1.2rem; flex: none; }
.wa-anexo.ok .wa-ico { background: #1f9d55; color: #fff; border-color: #1f9d55; }
.wa-anexo.erro .wa-ico { color: #c0392b; }
.wa-dica { display: flex; gap: .6rem; align-items: flex-start; font-size: .84rem; padding: .7rem .8rem; border-radius: 12px; background: rgba(31,157,85,.1); color: var(--text); }
.wa-dica i { color: #1f9d55; font-size: 1.05rem; }
.wa-dica.ok { background: rgba(31,157,85,.12); }
.wa-dica.erro { background: rgba(192,57,43,.1); }
.wa-dica.erro i { color: #c0392b; }
@media (max-width: 767.98px) { #mdWhats .modal-footer .btn { padding-inline: .6rem; font-size: .85rem; } }
/* tabelas no computador: ações sempre alinhadas à direita, numa linha só */
@media (min-width: 992px) {
  .table-cards td.actions { white-space: nowrap; width: 1%; text-align: right; padding-right: 1rem; }
  .table-cards td.actions > * { vertical-align: middle; }
  .table-cards td.actions form { display: inline-block; }
  .table-cards td { vertical-align: middle; }
}

/* ---------- trechos de voo (ida e volta) ---------- */
.trechos-lista { display: flex; flex-direction: column; gap: .5rem; }
.trechos-lista:not(:empty) { margin-bottom: .6rem; }
.trecho { display: grid; gap: .45rem; align-items: center;
  padding: .5rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.trecho .form-control, .trecho .form-select { height: 38px; padding-block: .35rem; font-size: .88rem; }
.tr-rota { display: flex; align-items: center; gap: .35rem; }
.tr-rota i { color: var(--muted); }
.tr-iata { text-transform: uppercase; font-weight: 600; letter-spacing: .04em; text-align: center; min-width: 0; }
.tr-voo { text-transform: uppercase; }
.tr-del { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; }
.btn-add-trecho { display: inline-flex; align-items: center; gap: .4rem; border: 1.5px dashed var(--border-strong); background: transparent; color: var(--text);
  border-radius: 10px; padding: .45rem .9rem; font-size: .85rem; font-weight: 500; transition: background-color .15s, border-color .15s; }
.btn-add-trecho:hover { background: var(--surface-2); border-color: var(--text); }
fieldset[data-readonly] .btn-add-trecho, fieldset[data-readonly] .tr-del { display: none; }
@media (max-width: 767.98px) {
  .trecho .form-control, .trecho .form-select { font-size: 16px; }
}
/* itinerário no voucher (lista) */
.tk-trechos { display: flex; flex-wrap: wrap; gap: .3rem; padding: 0 1.15rem .6rem; }
.tk-trechos span { font-size: .7rem; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: .12rem .5rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tk-trechos span.volta { border-style: dashed; }

/* layout da linha de trecho por áreas: computador grande → 1 linha; médio → 2 linhas; celular → empilhado */
.trecho > .tr-rota { grid-area: rota; } .trecho > [type=date] { grid-area: data; } .trecho > [type=time] { grid-area: hora; }
.trecho > select { grid-area: cia; } .trecho > .tr-voo { grid-area: voo; } .trecho > .tr-del { grid-area: del; }
.trecho { grid-template-areas: "rota data hora cia voo del"; grid-template-columns: minmax(170px, 1.2fr) minmax(140px, 1fr) 118px minmax(140px, 1.2fr) 100px 34px; }
/* adapta à largura do cartão (container query), não da tela */
.trechos { container-type: inline-size; }
@container (max-width: 820px) {
  .trecho { grid-template-areas: "rota data hora del" "cia cia voo del"; grid-template-columns: minmax(150px, 1.3fr) minmax(130px, 1fr) 112px 34px; }
}
@container (max-width: 520px) {
  .trecho { grid-template-areas: "rota rota" "data hora" "cia voo"; grid-template-columns: 1fr 1fr; position: relative; padding-right: 2.6rem; }
  .trecho > .tr-del { position: absolute; top: .5rem; right: .4rem; grid-area: auto; }
}
.trecho > * { min-width: 0; }
.tr-rota .tr-iata { flex: 1 1 0; width: auto; }
/* ---------- conexões no desenho do bilhete ---------- */
.tk-linha .tk-esc { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; padding: .12rem .55rem .12rem .45rem; font-size: .72rem; font-weight: 600; letter-spacing: .03em; color: var(--text); }
.tk-linha .tk-esc i { position: static; transform: rotate(90deg); padding: 0; font-size: .85rem; background: transparent; }
.tk-linha .tk-esc b { background: var(--text); color: var(--surface); border-radius: 999px; padding: 0 .38rem; font-size: .68rem; line-height: 1.5; }
.tk-mais { font-size: .68rem; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: .05rem .4rem; vertical-align: middle; letter-spacing: 0; }

/* ===== Check-in (faixa no card, janela de leitura, cartões) ===== */
.tk-ck { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 12px; padding: 8px 11px; border-radius: 12px; font-size: .78rem; line-height: 1.35; background: var(--bs-tertiary-bg, #f5f5f5); color: var(--bs-secondary-color, #666); }
.tk-ck > i { font-size: .95rem; }
.tk-ck .txt { flex: 1 1 180px; min-width: 0; }
.tk-ck .txt small { display: block; font-size: .7rem; opacity: .75; }
.tk-ck.feito { color: var(--bs-body-color); }
.tk-ck.feito > i { color: #16a34a; }
.tk-ck.aberto { background: var(--bs-body-color, #111); color: var(--bs-body-bg, #fff); font-weight: 600; }
.tk-ck.aberto .txt small { font-weight: 400; }
.tk-ck .pulso { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: ckPulso 1.8s infinite; flex: none; }
@keyframes ckPulso { 70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.tk-ck-acoes { display: flex; gap: 6px; flex-wrap: wrap; }
.tk-ck-acoes .btn { --bs-btn-padding-y: .22rem; --bs-btn-padding-x: .6rem; --bs-btn-font-size: .74rem; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.tk-ck.aberto .btn-dark { background: var(--bs-body-bg, #fff); color: var(--bs-body-color, #111); border-color: transparent; }
.tk-ck.aberto .btn-light { background: rgba(255,255,255,.14); color: inherit; border-color: transparent; }
[data-bs-theme=dark] .tk-ck.aberto .btn-light { background: rgba(0,0,0,.08); }
.tabs-seg a.alerta .n { background: var(--bs-body-color, #111); color: var(--bs-body-bg, #fff); }

.ck-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 26px 18px; border: 1.5px dashed var(--bs-border-color, #d4d4d4); border-radius: 16px; cursor: pointer; transition: border-color .15s, background .15s; }
.ck-drop:hover, .ck-drop.on { border-color: var(--bs-body-color, #111); background: var(--bs-tertiary-bg, #f7f7f7); }
.ck-drop > i { font-size: 1.8rem; }
.ck-status.erro { color: #dc2626; }
.ck-status.ok { color: #16a34a; }
.ck-lista { display: flex; flex-direction: column; gap: 10px; }
.ck-item { display: flex; gap: 14px; align-items: flex-start; padding: 12px; border: 1px solid var(--bs-border-color, #e5e5e5); border-radius: 14px; }
.ck-cod { flex: none; width: 92px; height: 92px; border-radius: 10px; background: #fff; border: 1px solid #eee; display: grid; place-items: center; padding: 6px; }
.ck-cod.largo { width: 150px; }
.ck-cod img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.ck-cod > i { font-size: 2rem; color: #16a34a; }
.ck-info { flex: 1; min-width: 0; }
.ck-tag { font-size: .68rem; padding: 1px 8px; border-radius: 999px; background: var(--bs-tertiary-bg, #f2f2f2); color: var(--bs-secondary-color, #666); font-weight: 600; }
.ck-campos { display: grid; grid-template-columns: minmax(0, 1fr) 84px 76px; gap: 6px; margin-top: 8px; }
.ck-alerta { margin-top: 6px; font-size: .76rem; color: #b45309; display: flex; gap: 6px; }
@media (max-width: 575.98px) {
  .ck-item { flex-wrap: wrap; }
  .ck-cod, .ck-cod.largo { width: 100%; height: 110px; }
  .ck-campos { grid-template-columns: 1fr 1fr; }
  .ck-campos select { grid-column: 1 / -1; }
}
.ck-card .tk-ck { margin-top: 0; }
.ck-cartoes { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ck-cartao { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--bs-border-color, #eee); border-radius: 12px; }
.ck-cartao img { width: 54px; height: 54px; object-fit: contain; background: #fff; border-radius: 6px; image-rendering: pixelated; flex: none; }
.ck-cartao img.largo { width: 92px; }
.ck-semcod { width: 54px; height: 54px; display: grid; place-items: center; font-size: 1.5rem; color: #16a34a; flex: none; }
.dash-ck li { align-items: center; }
.tk-ck .btn-whats { background: #1f9d55; color: #fff; border-color: transparent; }
.tk-ck .btn-whats:hover { background: #17834a; color: #fff; }
.ck-cartao img.largo { width: 120px; height: 44px; }
.tabs-seg .alerta .n { opacity: 1; display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; text-align: center; font-size: .72rem; line-height: 1.45; }
.ticket > .tk-ck { margin: 0 1.15rem .8rem; }
.ticket > .tk-ck + .tk-ck { margin-top: -.35rem; }
.tk-ck.voo .txt small { margin-top: 1px; }
.cartao-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.cartao-grade .input-group-text:first-child { min-width: 42px; justify-content: center; font-weight: 600; }
.cartao-sim { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 14px; }
.cartao-sim i { color: var(--muted, #888); font-style: normal; }
.parc-box { font-size: .82rem; }
.parc-box .parc-pix { display: flex; justify-content: space-between; padding: .55rem .7rem; border-radius: 10px; background: var(--surface-2, #f4f4f4); margin-bottom: .6rem; }
.parc-box table { width: 100%; font-variant-numeric: tabular-nums; }
.parc-box td { padding: .28rem .25rem; border-bottom: 1px dashed var(--border, #eee); }
.parc-box tr:last-child td { border-bottom: 0; }
.parc-box td:first-child { font-weight: 600; width: 2.6rem; }
.parc-box td.tot { text-align: right; color: var(--muted, #888); font-size: .76rem; }
.section-title .form-check-label { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: .8rem; color: var(--text-2, #555); }
.section-title .form-switch { padding-left: 2.6em; margin-left: auto !important; }

/* ===== Celular: tela travada (sem zoom), sem rolagem lateral, app instalado ===== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }
html, body { max-width: 100%; overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }   /* corta sem virar área de rolagem: mantém as barras presas no topo */
img, svg, video, canvas { max-width: 100%; }
@media (max-width: 991.98px) {
  /* iPhone dá zoom em campos com fonte menor que 16px */
  input.form-control, select.form-select, textarea.form-control, .input-group .form-control, .form-control-sm, .form-select-sm { font-size: 16px !important; }
}
.instalar-app { display: none; }
@media (max-width: 991.98px), (pointer: coarse) { .instalar-app { display: block; } }
.instalar-app[data-estado="instalado"] .btn { display: none; }
.instalar-icone { width: 48px; height: 48px; border-radius: 12px; flex: none; }
/* app aberto pela tela inicial: respeita o entalhe e a barra do iPhone */
@media (display-mode: standalone) {
  body { padding-bottom: env(safe-area-inset-bottom); }
  .topbar { padding-top: env(safe-area-inset-top); }
}
/* trechos no celular: data com largura total, hora e companhia lado a lado */
@container (max-width: 380px) {
  .trecho { grid-template-areas: "rota rota" "data data" "hora voo" "cia cia"; }
}
.trecho input[type=date], .trecho input[type=time] { padding-inline: .55rem .3rem; }
/* card do voucher: "+1 voo" não quebra */
.tk-mais { white-space: nowrap; }
@media (max-width: 575.98px) { .tk-voo { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; } .tk-mais { font-size: .66rem; padding: 0 5px; } }
/* barras de ações no celular: botões numa linha, sem quebrar o texto */
.toolbar-acoes .btn { white-space: nowrap; }
@media (max-width: 575.98px) {
  .toolbar { flex-wrap: wrap; row-gap: .5rem; }
  .toolbar-acoes { width: 100%; margin-left: 0 !important; }
  .toolbar-acoes .btn { flex: 1 1 auto; font-size: .82rem; padding-inline: .55rem; justify-content: center; }
  .toolbar-acoes .btn:has(> i:only-child) { flex: 0 0 auto; }
}
@media (max-width: 575.98px) {
  .toolbar > .btn-light:first-child + .toolbar-acoes { flex: 1 1 0; width: auto; min-width: 0; }
  .stat-label { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; }
  .toolbar .filter-select { flex: 1 1 100%; max-width: none; }
}
@media (max-width: 991.98px) {
  .table-cards { min-width: 0 !important; max-width: 100%; }
  .table-cards td { overflow-wrap: anywhere; }
  .tbl-cias .cia-logo { width: auto; max-width: 128px; }
}
.tabs-seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs-seg::-webkit-scrollbar { display: none; }
.stat-label { padding-right: 40px; }
@media (max-width: 575.98px) {
  .toolbar > .btn-light:first-child { display: none; }
  .toolbar > .btn-light:first-child + .toolbar-acoes { display: grid !important; grid-template-columns: auto 1fr 1fr 1fr; width: 100%; flex: 1 1 100%; }
}
@media (max-width: 575.98px) {
  .toolbar > .btn-light:first-child { display: inline-flex; }
  .toolbar:has(> .btn-light:first-child + .toolbar-acoes) { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .toolbar > .btn-light:first-child + .toolbar-acoes { display: flex !important; width: auto; gap: .4rem !important; }
  .toolbar > .btn-light:first-child + .toolbar-acoes .btn { padding-inline: .5rem; }
}
@media (max-width: 991.98px) {
  .table-cards td { overflow-wrap: break-word; }
  .tbl-cias .cia-logo { max-width: 104px; }
  .tbl-cias td:first-child .fw-semibold { padding-right: 4.6rem; }
}

/* ===== Barra inferior (celular): colunas iguais e área segura do iPhone ===== */
@media (max-width: 991.98px) {
  .bottom-nav {
    display: grid !important; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: stretch;
    height: calc(62px + env(safe-area-inset-bottom)); padding: 0 max(4px, env(safe-area-inset-left)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-right));
    box-sizing: border-box;
  }
  .bottom-nav a, .bottom-nav button {
    min-width: 0; width: 100%; height: 62px; padding: 6px 2px 4px; margin: 0; gap: 3px;
    font: inherit; font-size: .66rem; line-height: 1.1; letter-spacing: 0; color: var(--muted);
    -webkit-appearance: none; appearance: none; border-radius: 0;
  }
  .bottom-nav a > i, .bottom-nav button > i { font-size: 1.22rem; line-height: 1; height: 1.3rem; display: grid; place-items: center; }
  .bottom-nav a, .bottom-nav button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bottom-nav .active { color: var(--text); }
  .bottom-nav .active > i { transform: translateY(-1px); }
  .content { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
  .sidebar { padding-bottom: env(safe-area-inset-bottom); }
}
@media (display-mode: standalone) { body { padding-bottom: 0 !important; } }

/* ===== Tela de abertura ===== */
#splash { display: none; }
html.splash-on #splash {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 3000;
  background: var(--bg); color: var(--text);
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  transition: opacity .42s ease, visibility .42s ease;
}
html.splash-on body { overflow: hidden; }
#splash.saindo { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-in { display: flex; flex-direction: column; align-items: center; gap: 34px; animation: splashEntra .7s cubic-bezier(.2,.7,.2,1) both; }
.splash-in .splash-logo { height: clamp(88px, 16vw, 120px); width: auto; }
.splash-in .splash-icone { border-radius: 24%; }
.splash-bar { width: min(200px, 52vw); height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--text) 12%, transparent); overflow: hidden; }
.splash-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--text); transition: width .05s linear; }
@keyframes splashEntra { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .splash-in { animation: none; } .splash-bar span { transition: none; } }

/* ===== Login: claro/escuro automático ===== */
.auth-body { background: var(--surface); }
.auth-wrap { min-height: 100vh; min-height: 100dvh; }
.auth-form { padding: max(2rem, env(safe-area-inset-top)) 1.5rem max(2rem, env(safe-area-inset-bottom)); }
[data-bs-theme="dark"] .auth-wrap { background: var(--bg); }
[data-bs-theme="dark"] .auth-side { background: #000; border-right: 1px solid var(--border); }
[data-bs-theme="dark"] .auth-form .form-control { background: var(--surface); }
[data-bs-theme="dark"] .auth-form .input-group-text,
[data-bs-theme="dark"] .auth-form .btn-olho { background: var(--surface); }
.auth-wrap, .auth-form, .auth-form .form-control { transition: background-color .25s ease, border-color .25s ease, color .25s ease; }

/* ===== Modo privado: borrar valores ===== */
.v-priv { transition: filter .2s ease; }
html.privado .v-priv:not(.ver),
html.privado [data-money]:not(:focus),
html.privado .priv-blur,
html.privado .bar-v { filter: blur(7px); -webkit-user-select: none; user-select: none; }
html.privado .v-priv:not(.ver) { cursor: pointer; }
html.privado .v-priv { display: inline-block; }
html.privado text.v-priv:not(.ver) { filter: blur(4px); }
[data-privado].on { background: var(--text); color: var(--surface); }
[data-privado].on:hover { background: var(--text-2); color: var(--surface); }
@media print { html.privado .v-priv, html.privado [data-money] { filter: none !important; } }
.tk-ck.voo.alerta { background: rgba(217,119,6,.1); color: var(--bs-body-color); }
.tk-ck.voo.alerta > i { color: #d97706; }

/* ===== Importar voucher do PDF ===== */
.imp-card { border-style: dashed; }
.imp-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); font-size: 1.3rem; flex: none; }
.imp-drop.on { outline: 3px solid rgba(10,132,255,.35); }
.imp-status { font-size: .86rem; margin-top: .75rem; }
.imp-status:empty { display: none; }
.imp-status.ok { color: #15803d; } .imp-status.erro { color: #dc2626; }
[data-bs-theme="dark"] .imp-status.ok { color: #4ade80; } [data-bs-theme="dark"] .imp-status.erro { color: #f87171; }
.imp-dados { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; margin-top: .9rem; font-size: .88rem; }
.imp-dados span { display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.imp-legs { list-style: none; padding: 0; margin: .9rem 0 0; display: grid; gap: .4rem; font-size: .9rem; }
.imp-legs li { padding: .55rem .75rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.imp-tag { display: inline-block; min-width: 92px; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* ===== Vincular voucher a cliente ===== */
.vinc-sugestao { padding: .85rem 1rem; background: rgba(217,119,6,.08); border-bottom: 1px solid var(--border); }
.vinc-item { display: flex; align-items: center; gap: .75rem; justify-content: space-between; padding: .5rem 0; border-top: 1px dashed var(--border); font-size: .88rem; }
.vinc-item:first-of-type { border-top: 0; }
#vcSel option { padding: .35rem .5rem; }

/* ===== Configurações → Módulos ===== */
.mod-grupo { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1.25rem 0 .6rem; }
.mod-grupo:first-child { margin-top: 0; }
.mod-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .6rem; }
.mod-card { display: flex; align-items: flex-start; gap: .8rem; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s, opacity .15s; opacity: .62; }
.mod-card.on { opacity: 1; border-color: var(--border-strong); }
.mod-card:hover { border-color: var(--text-2); }
.mod-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); font-size: 1.05rem; flex: none; }
.mod-card.on .mod-ico { background: var(--text); color: var(--surface); }
.mod-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mod-txt small { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.mod-txt em { font-style: normal; color: var(--text-2); }

/* ---------- trechos com partida, chegada e tempo de voo ---------- */
.trecho > .tr-hora { grid-area: hora; } .trecho > .tr-cheg { grid-area: cheg; } .trecho > .tr-dur { grid-area: dur; }
.tr-dur { text-align: center; font-variant-numeric: tabular-nums; }
.tr-dur.auto { color: var(--text-2); font-style: italic; }
.trecho { grid-template-areas: "rota data hora cheg dur cia voo del";
  grid-template-columns: minmax(150px, 1.2fr) minmax(128px, 1fr) 96px 96px 70px minmax(120px, 1.1fr) 84px 34px; }
@container (max-width: 1060px) {
  .trecho { grid-template-areas: "rota data hora cheg del" "cia cia voo dur del"; grid-template-columns: minmax(150px, 1.3fr) minmax(128px, 1fr) 100px 100px 34px; }
}
@container (max-width: 520px) {
  .trecho { grid-template-areas: "rota rota" "data data" "hora cheg" "voo dur" "cia cia"; grid-template-columns: 1fr 1fr; }
}
.trecho-legenda { display: flex; gap: .4rem; font-size: .7rem; color: var(--muted); margin: 0 0 .3rem .2rem; }

/* ===== Orçamento: serviços inclusos ===== */
.orc-extras { display: grid; gap: .5rem; }
.orc-extra { border: 1px solid var(--border); border-radius: 12px; padding: .6rem .8rem; background: var(--surface); transition: border-color .15s, background .15s; }
.orc-extra.on { border-color: var(--border-strong); background: var(--surface-2); }
.orc-extra-top { display: flex; align-items: center; gap: .55rem; cursor: pointer; margin: 0; font-size: .92rem; }
.orc-extra-top i { color: var(--text-2); }
.orc-extra-campos { margin-top: .5rem; }
.orc-extra:not(.on) .orc-extra-campos { display: none; }

/* ===== Mapa do voo ao vivo ===== */
.voo-mapa { margin: 0 1.15rem .75rem; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.voo-mapa:empty { min-height: 44px; }
.vm-bar { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem .8rem; border: 0; background: var(--surface); color: var(--text-2); font: inherit; font-size: .78rem; text-align: left; cursor: pointer; border-bottom: 1px solid var(--border); }
.vm-fechado .vm-bar { border-bottom: 0; }
.vm-bar-ico { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #0a84ff; color: #fff; display: grid; place-items: center; }
.vm-bar-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; } .vm-bar-txt b { color: var(--text); } .vm-bar-txt small { font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vm-bar .vm-pct { flex: none; width: 70px; }
.vm-bar-acao { flex: none; display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; color: var(--text); }
.vm-seta { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-135deg) translate(-1px, -1px); transition: transform .2s; }
.vm-fechado .vm-seta { transform: rotate(45deg) translate(-2px, -2px); }
.vm-ab { display: none; } .vm-fechado .vm-ab { display: inline; } .vm-fechado .vm-fe { display: none; }
.vm-fechado .vm-corpo { display: none; }
@media (max-width: 575.98px) { .vm-bar .vm-pct { display: none; } }
.vm-svg { display: block; width: 100%; height: auto; }
.vm-mar { fill: #eef2f6; }
.vm-terra { fill: #d9dee5; stroke: #c8ced6; stroke-width: .6; }
[data-bs-theme="dark"] .vm-mar { fill: #121417; }
[data-bs-theme="dark"] .vm-terra { fill: #262a30; stroke: #30353c; }
.vm-rota { fill: none; stroke: var(--text-2); stroke-width: 1.6; stroke-dasharray: 5 6; opacity: .55; }
.vm-voado { fill: none; stroke: #0a84ff; stroke-width: 2.6; stroke-linecap: round; }
.vm-halo { fill: rgba(10,132,255,.16); } .vm-halo.d { fill: rgba(17,17,17,.1); }
[data-bs-theme="dark"] .vm-halo.d { fill: rgba(255,255,255,.12); }
.vm-ponto { fill: #0a84ff; stroke: #fff; stroke-width: 1.5; } .vm-ponto.d { fill: var(--text); }
.vm-iata { font: 700 12px Inter, system-ui, sans-serif; fill: var(--text); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; letter-spacing: .04em; }
.vm-aviao-fundo { fill: #0a84ff; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.vm-aviao-ico { fill: #fff; }
.vm-info { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .75rem; padding: .55rem .8rem; font-size: .74rem; color: var(--text-2); background: var(--surface); border-top: 1px solid var(--border); }
.vm-info span:last-child { text-align: right; }
.vm-info b { color: var(--text); }
.vm-pct { width: 90px; height: 4px; border-radius: 4px; background: var(--border); overflow: hidden; }
.vm-pct i { display: block; height: 100%; background: #0a84ff; border-radius: inherit; transition: width .6s ease; }
@media (max-width: 575.98px) { .vm-info { grid-template-columns: 1fr; gap: .25rem; } .vm-info span:last-child { text-align: left; } .vm-pct { width: 100%; } }

/* ===== Hotéis, Seguro viagem e Vistos (lista e formulário) ===== */
.crud-lista { display: grid; gap: .5rem; }
.crud-item { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; color: inherit; text-decoration: none; transition: border-color .15s; }
.crud-item:hover { border-color: var(--border-strong); color: inherit; }
.crud-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); font-size: 1.1rem; flex: none; }
.crud-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.crud-txt b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crud-txt small { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crud-txt .crud-meta { color: var(--text-2); }
.crud-lado { display: flex; align-items: center; gap: .6rem; flex: none; }
.crud-dias { background: var(--surface-2); color: var(--text-2); font-variant-numeric: tabular-nums; }
.crud-anexo { display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem; border: 1px solid var(--border); border-radius: 10px; margin-bottom: .5rem; font-size: .88rem; background: var(--surface-2); }
.crud-check { display: grid; gap: .35rem; }
.crud-check-item { display: flex; align-items: center; gap: .55rem; }
.crud-check-item .form-check-input { width: 1.25rem; height: 1.25rem; margin: 0; flex: none; }
.crud-check-item .form-control { flex: 1; }
.crud-form .section-title { margin-top: .5rem; }
@media (max-width: 575.98px) { .crud-item { align-items: flex-start; } .crud-lado { flex-direction: column; align-items: flex-end; } }
.crud-lista > * { min-width: 0; }
.crud-item { min-width: 0; overflow: hidden; }
.crud-anexo { flex-wrap: wrap; }
.crud-anexo a:first-of-type { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
@media (max-width: 575.98px) { .crud-lado .badge-st { white-space: nowrap; } .crud-lado { max-width: 42%; } .crud-anexo label { margin-left: 0 !important; } }

/* ===== Vistos: painel (ficha e arquivos do cliente) ===== */
.vf-anel { flex: none; --p: 0; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--text) calc(var(--p) * 1%), var(--surface-2) 0); }
.vf-anel span { width: 42px; height: 42px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: .78rem; font-weight: 700; }
.vf-obs-painel { padding: .65rem .85rem; border-radius: 10px; background: var(--surface-2); font-size: .86rem; color: var(--text-2); }
.vd-grupo { border-top: 1px solid var(--border); padding: .7rem 0; } .vd-grupo:first-of-type { border-top: 0; }
.vd-item { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .9rem; }
.vd-arq { display: flex; align-items: center; gap: .5rem; margin: .35rem 0 0 1.5rem; font-size: .86rem; min-width: 0; flex-wrap: wrap; }
.vd-arq > a:first-of-type { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.cat-editor { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; line-height: 1.5; min-height: 420px; }
[name=hora_chegada].auto, [name$="[chegada]"].auto, [name=duracao].auto { color: var(--text-2); font-style: italic; }
.imp-bts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: .9rem; }
.imp-bt { display: flex; align-items: center; gap: .7rem; padding: .75rem .85rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; margin: 0; transition: border-color .15s, background .15s; }
.imp-bt:hover { border-color: var(--border-strong); } .imp-bt.on { outline: 3px solid rgba(10,132,255,.35); }
.imp-bt > .bi { font-size: 1.25rem; flex: none; } .imp-bt span { display: flex; flex-direction: column; min-width: 0; } .imp-bt b { font-weight: 600; font-size: .9rem; } .imp-bt small { color: var(--muted); font-size: .76rem; }
@media (max-width: 767.98px) { .imp-bts { grid-template-columns: 1fr; } }
.imp-bt-unico.on { outline: 3px solid rgba(10,132,255,.35); }

/* ===== Contratos: assinatura digital (Autentique) ===== */
.ass-lista { display: grid; gap: .5rem; }
.ass-item { display: flex; align-items: center; gap: .75rem; padding: .7rem .85rem; border: 1px solid var(--border); border-radius: 12px; flex-wrap: wrap; }
.ass-item > .bi { font-size: 1.15rem; color: var(--muted); } .ass-item.ok > .bi { color: #1f9d55; } .ass-item.visto > .bi { color: #2563eb; } .ass-item.recusado > .bi { color: #dc2626; }
.ass-txt { flex: 1; min-width: 180px; display: flex; flex-direction: column; } .ass-txt small { color: var(--muted); font-size: .8rem; }
.ass-bts { display: flex; gap: .4rem; }
.ass-sig { border: 1px solid var(--border); border-radius: 12px; padding: .7rem .85rem; margin-bottom: .5rem; }
.ass-sig.off .ass-sig-campos { display: none; } .ass-sig.off { background: var(--surface-2); }
.ass-sig-top { display: flex; align-items: center; gap: .55rem; margin-bottom: .55rem; cursor: pointer; } .ass-sig.off .ass-sig-top { margin-bottom: 0; }
.ass-sig-top .form-check-input { margin: 0; }

/* ===== Contratos: importação em massa ===== */
.ic-drop { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 2rem 1rem; border: 2px dashed var(--border-strong); border-radius: 16px; cursor: pointer; text-align: center; margin: 0; }
.ic-drop.on, .ic-drop:hover { border-color: var(--text); background: var(--surface-2); }
.ic-drop > .bi { font-size: 2rem; } .ic-drop span { color: var(--muted); font-size: .85rem; }
.ic-opcoes { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; font-size: .9rem; }
.ic-linha { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; } .ic-linha .form-select { width: auto; }
.ic-cot { display: inline-flex; align-items: center; gap: .35rem; } .ic-cot input { width: 90px; }
.ic-card { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: .85rem 1rem; margin-bottom: .6rem; }
.ic-card.feito { background: rgba(31,157,85,.06); border-color: rgba(31,157,85,.35); } .ic-card.erro { border-color: rgba(220,38,38,.45); }
.ic-top { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; min-width: 0; } .ic-top > b { min-width: 0; max-width: 45%; }
.ic-ok { color: #15803d; font-size: .85rem; } .ic-ok i { margin-right: .3rem; } .ic-ok a { color: inherit; font-weight: 600; }
[data-bs-theme="dark"] .ic-ok { color: #4ade80; }
.ic-av { color: #b45309; font-size: .85rem; } .ic-av i { margin-right: .3rem; } .ic-err { color: #dc2626; font-size: .85rem; }
.ic-avisos { margin: .5rem 0 .6rem; padding-left: 1.2rem; font-size: .82rem; color: #b45309; }
.ic-card .row { margin-top: .4rem; }
.ic-parc { margin-top: .7rem; border-top: 1px solid var(--border); padding-top: .55rem; }
.ic-parc-tit { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.ic-parc-tit span { background: var(--surface-2); border-radius: 99px; padding: 0 .45rem; color: var(--text); }
.ic-p { display: grid; grid-template-columns: 1.6rem minmax(90px, 140px) minmax(120px, 160px) minmax(120px, 190px) auto auto; gap: .4rem; align-items: center; margin-top: .35rem; }
.ic-n { font-size: .8rem; color: var(--muted); text-align: right; }
.ic-rodape { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; margin-top: .5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 -4px 18px rgba(0,0,0,.06); z-index: 5; }
@media (max-width: 767.98px) { .ic-p { grid-template-columns: 1.4rem 1fr 1fr; } .ic-p select { grid-column: 2 / 4; } .ic-top > b { max-width: 100%; } }
.ic-aut .ic-ad-bar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1rem 0 .5rem; font-size: .88rem; }
.ic-ad-lista { max-height: 360px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
.ic-ad { display: grid; grid-template-columns: auto 1fr auto auto; gap: .75rem; align-items: center; padding: .55rem .8rem; border-bottom: 1px solid var(--border); cursor: pointer; margin: 0; }
.ic-ad:last-child { border-bottom: 0; } .ic-ad:hover { background: var(--surface-2); } .ic-ad.off { opacity: .55; cursor: default; }
.ic-ad-n { min-width: 0; display: flex; flex-direction: column; } .ic-ad-n b, .ic-ad-n small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ic-ad-n small { color: var(--muted); }
.ic-ad-d { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.ic-selo { font-size: .75rem; border: 1px solid var(--border-strong); border-radius: 99px; padding: .05rem .5rem; white-space: nowrap; } .ic-selo i { margin-right: .25rem; }
@media (max-width: 575.98px) { .ic-ad { grid-template-columns: auto 1fr; } .ic-ad-d, .ic-ad .badge-st { grid-column: 2; justify-self: start; } }

/* ===== E-mails: prévia ===== */
.em-prev { width: 100%; height: 640px; border: 0; display: block; background: #f2f2f0; border-radius: 0 0 14px 14px; }

/* =====================================================================
   v1.3 — Pílulas flutuantes (celular até 860 px), painel da conta, Voltar,
   visualizador de documentos, tela de notificações, avisos e comunicados
   ===================================================================== */
:root { --pill-bg: rgba(255,255,255,.82); --pill-bd: rgba(0,0,0,.06); --pill-sh: 0 10px 34px rgba(0,0,0,.16); --pill-on: rgba(0,0,0,.08); --pill-ring: #fff; --pill-av-ring: rgba(0,0,0,.25); --vermelho: #ff2d3b; }
[data-bs-theme="dark"] { --pill-bg: rgba(28,30,32,.84); --pill-bd: rgba(255,255,255,.08); --pill-sh: 0 12px 36px rgba(0,0,0,.5); --pill-on: rgba(255,255,255,.16); --pill-ring: #1c1e20; --pill-av-ring: rgba(255,255,255,.3); }

.tb-ico { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; border: 0; background: transparent; color: var(--text); font-size: 19px; position: relative; padding: 0; text-decoration: none; transition: background .15s; }
.tb-ico:hover, .tb-ico:focus-visible { background: var(--pill-on); color: var(--text); }
.tb-ico .dot { position: absolute; top: 6px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--vermelho); box-shadow: 0 0 0 2px var(--bg); }
.tb-voltar-d { display: inline-flex; align-items: center; gap: .4rem; flex: none; height: 36px; padding: 0 .8rem; }
.tb-voltar-m, .tb-logo, .tb-busca, .tb-lupa, .bn-avatar, .tb-res { display: none; }
.badge-n { display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .35rem; border-radius: 99px; background: var(--vermelho); color: #fff; font-size: .72rem; font-weight: 700; margin-left: .3rem; line-height: 1; }
.btn-light .badge-n, .btn-outline-secondary .badge-n { box-shadow: 0 0 0 2px var(--surface); }
.bn-rot-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 860px) {
  .sidebar, .sidebar-backdrop, #btnMenu, .bn-mais, .tb-voltar-d, .topbar .search-trigger, .topbar [data-privado], .topbar [data-theme-toggle], .topbar .dropdown { display: none !important; }
  .main { margin-left: 0 !important; }
  /* pílula de cima */
  .topbar {
    position: sticky; top: calc(8px + env(safe-area-inset-top)); margin: calc(8px + env(safe-area-inset-top)) 10px 0; height: 54px; padding: 0 7px; gap: 2px;
    border-radius: 999px; background: var(--pill-bg); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
    border: 1px solid var(--pill-bd); box-shadow: var(--pill-sh); z-index: 1030;
  }
  .tb-voltar-m { display: inline-grid; width: 40px; height: 40px; font-size: 20px; }
  .tb-logo { display: flex; align-items: center; flex: none; padding: 0 2px 0 9px; height: 40px; }
  .tb-voltar-m + .tb-logo { padding-left: 1px; }
  .tb-logo img { height: 16.5px; width: auto; max-width: 112px; object-fit: contain; }
  .tb-logo.brand-quadrada img { height: 32px; }
  .topbar .page-title { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; border-left: 1px solid var(--border-strong); margin-left: 8px; padding-left: 10px; line-height: 20px; min-width: 0; flex: 0 1 auto; }
  .tb-dir { gap: 0 !important; flex: none; }
  .tb-lupa { display: inline-grid; }
  .tb-ico .dot { box-shadow: 0 0 0 2px var(--pill-ring); }
  /* busca recolhível */
  .tb-busca { align-items: center; flex: 1; min-width: 0; height: 42px; border-radius: 999px; background: var(--pill-on); padding: 0 2px 0 14px; gap: 8px; color: var(--muted); }
  .tb-busca input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; box-shadow: none; background: transparent; color: var(--text); font-size: 16px; -webkit-appearance: none; appearance: none; }
  .tb-busca input:focus, .tb-busca input:focus-visible { outline: 0; box-shadow: none; }
  .tb-busca input::-webkit-search-cancel-button { display: none; }
  .tb-busca .tb-ico { width: 38px; height: 38px; font-size: 16px; }
  .topbar.buscando { padding-left: 7px; }
  .topbar.buscando > :not(.tb-busca):not(.tb-dir), .topbar.buscando .tb-lupa { display: none !important; }
  .topbar.buscando .tb-busca { display: flex; }
  .tb-res { display: block; position: fixed; top: calc(70px + env(safe-area-inset-top)); left: 10px; right: 10px; max-height: min(62vh, 520px); overflow: auto; z-index: 1029; padding: 6px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--pill-sh); }
  .tb-res[hidden] { display: none; }
  /* pílula de baixo */
  .bottom-nav {
    left: 12px !important; right: 12px !important; bottom: calc(10px + env(safe-area-inset-bottom)) !important; height: auto !important; padding: 6px !important; gap: 2px;
    border-radius: 999px; background: var(--pill-bg) !important; -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
    border: 1px solid var(--pill-bd) !important; box-shadow: var(--pill-sh); z-index: 1030;
  }
  .bottom-nav a, .bottom-nav button { min-height: 52px; height: auto !important; padding: 0 !important; border-radius: 999px !important; color: var(--text) !important; display: grid !important; place-items: center; position: relative; transition: background .2s ease; }
  .bottom-nav a > i { font-size: 25px !important; height: auto !important; transform: none !important; }
  .bottom-nav .bn-rot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .bottom-nav .active { background: var(--pill-on); }
  .bottom-nav .bn-dot { position: absolute; top: 11px; left: calc(50% + 6px); width: 9px; height: 9px; border-radius: 50%; background: var(--vermelho); box-shadow: 0 0 0 2px var(--pill-ring); }
  .bn-avatar { display: grid !important; border: 0; background: transparent; }
  .bn-av { width: 31px; height: 31px; border-radius: 50%; background: var(--text); color: var(--fg-inv); display: grid; place-items: center; font-weight: 700; font-size: 13px; overflow: hidden;
    box-shadow: 0 0 0 2px var(--pill-ring), 0 0 0 3.5px var(--pill-av-ring); }
  .bn-av img { width: 100%; height: 100%; object-fit: cover; }
  /* espaço para a pílula de baixo */
  .content { padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important; }
  .flash-stack { top: auto; bottom: calc(92px + env(safe-area-inset-bottom)); left: 12px; right: 12px; width: auto; }
  .ic-rodape, .modal-footer { scroll-margin-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .ic-rodape { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) { .topbar .page-title { display: none; } }

/* ---------- painel que sobe de baixo (bottom sheet) ---------- */
.sheet { position: fixed; inset: 0; z-index: 1090; }
.sheet[hidden] { display: none; }
.sheet-fundo { position: absolute; inset: 0; background: rgba(0,0,0,.42); opacity: 0; transition: opacity .22s ease; }
.sheet.on .sheet-fundo { opacity: 1; }
.sheet-caixa { position: absolute; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); margin-inline: auto; max-width: 520px;
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); color: var(--text); border-radius: 24px; box-shadow: 0 -8px 44px rgba(0,0,0,.28); border: 1px solid var(--border);
  transform: translateY(24px); opacity: 0; transition: transform .26s cubic-bezier(.2,.8,.2,1), opacity .2s ease; }
.sheet.on .sheet-caixa { transform: none; opacity: 1; }
.sheet-topo { display: flex; align-items: center; gap: 12px; padding: 14px 10px 12px 16px; border-bottom: 1px solid var(--border); }
.sheet-av { width: 44px; height: 44px; border-radius: 50%; background: var(--text); color: var(--fg-inv); display: grid; place-items: center; font-weight: 700; font-size: 17px; flex: none; overflow: hidden; border: 0; padding: 0; position: relative; }
.sheet-av img { width: 100%; height: 100%; object-fit: cover; }
.sheet-nome { font-weight: 600; font-size: 16px; line-height: 1.25; }
.sheet-mail { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-corpo { overflow: auto; overscroll-behavior: contain; padding: 4px 8px 10px; }
.sheet-grupo { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 14px 10px 6px; }
button.sheet-grupo { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; text-align: left; cursor: pointer; }
button.sheet-grupo .bi { margin-left: auto; font-size: 11px; transition: transform .2s ease; }
.sheet-corpo .nav-g-qtd { display: none; font-weight: 600; font-size: 10px; letter-spacing: 0; padding: 1px 6px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); }
.sheet-corpo .nav-g-qtd.alerta { background: #ef4444; color: #fff; }
.sheet-corpo .nav-sec.fechado .nav-g-qtd { display: inline-block; }
.sheet-corpo .nav-sec.fechado .nav-itens { display: none; }
.sheet-corpo .nav-sec.fechado .sheet-grupo .bi { transform: rotate(-90deg); }
.sheet-mods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.sheet-mods a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; background: var(--surface-2); color: var(--text); font-size: 12.5px; line-height: 1.2; text-align: center; text-decoration: none; }
.sheet-mods a i { font-size: 21px; }
.sheet-mods a.on { background: var(--text); color: var(--fg-inv); }
.sheet-l { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 48px; padding: 0 10px; border: 0; background: transparent; color: var(--text); font-size: 15px; border-radius: 12px; text-decoration: none; text-align: left; position: relative; }
.sheet-l > i { font-size: 19px; width: 22px; text-align: center; flex: none; }
.sheet-l:hover, .sheet-l:focus-visible { background: var(--surface-2); color: var(--text); }
.sheet-l.sair, .sheet-l.sair:hover { color: #e5484d; }
.sheet-l .sheet-val { margin-left: auto; font-size: 13px; color: var(--muted); }
.sheet-l select.sheet-sel { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
html.sheet-aberta, html.vw-aberto, html.bp-aberta { overflow: hidden; }

/* ---------- visualizador de documentos ---------- */
.vw { position: fixed; inset: 0; z-index: 1095; display: flex; flex-direction: column; background: var(--surface-3); opacity: 0; transform: translateY(14px); transition: opacity .2s ease, transform .2s ease; }
.vw.on { opacity: 1; transform: none; }
.vw-top { display: flex; align-items: center; gap: 6px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; background: var(--surface); border-bottom: 1px solid var(--border); flex: none; }
.vw-bt { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 0; background: transparent; color: var(--text); font-size: 20px; flex: none; text-decoration: none; }
.vw-bt:hover { background: var(--surface-2); color: var(--text); }
.vw-nome { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vw-corpo { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 12px calc(16px + env(safe-area-inset-bottom)); outline: 0; }
.vw-pag { position: relative; flex: none; max-width: 100%; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.14); border-radius: 2px; }
.vw-pag canvas { display: block; width: 100%; height: 100%; }
.vw-num { position: absolute; right: 8px; bottom: 8px; font-size: 11px; background: rgba(0,0,0,.55); color: #fff; padding: 1px 7px; border-radius: 99px; }
.vw-img { max-width: 100%; height: auto; margin: auto; display: block; box-shadow: 0 2px 12px rgba(0,0,0,.14); }
.vw-iframe { width: 100%; flex: 1; min-height: 78vh; border: 0; background: #fff; }
.vw-carregando, .vw-erro { margin: auto; color: var(--muted); }

/* ---------- tela "Ative as notificações" ---------- */
.bp-tela { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; overflow: auto; padding: calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom)); background: var(--bg); opacity: 0; transition: opacity .25s ease; }
.bp-tela.on { opacity: 1; }
.bp-caixa { width: 100%; max-width: 400px; text-align: center; }
.bp-ico { width: 76px; height: 76px; border-radius: 24px; background: var(--surface-2); display: grid; place-items: center; font-size: 34px; margin: 0 auto 20px; color: var(--text); }
.bp-ico.ok { background: #1f9d55; color: #fff; }
.bp-tela h2 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 10px; }
.bp-tela p { color: var(--text-2); margin-bottom: 22px; }
.bp-passos { text-align: left; margin: 0 0 22px; padding-left: 1.3rem; color: var(--text-2); }
.bp-passos li { margin-bottom: 8px; }
.bp-pular { border: 0; background: transparent; color: var(--muted); font-size: 14px; margin-top: 18px; text-decoration: underline; text-underline-offset: 3px; }
.bp-nota { font-size: 12px; color: var(--muted); margin-top: 12px; }
.bp-erro { color: #e5484d; font-size: 14px; margin-top: 10px; }
.bp-erro:empty { display: none; }

/* ---------- avisos de arquivos ---------- */
.av-sec { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 18px 0 8px; }
.av-sec:first-child { margin-top: 0; }
.av-pasta { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; overflow: hidden; }
.av-ptit { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 12px; background: var(--surface-2); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.av-ptit span { margin-left: auto; color: var(--muted); }
.av-it { display: flex; align-items: center; gap: 10px; margin: 0; padding: 9px 12px; border-top: 1px solid var(--border); font-size: 14px; cursor: pointer; }
.av-dest { display: flex; align-items: center; gap: 12px; }

/* ---------- comunicados ---------- */
.co-lista { max-height: 440px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
.co-grupo[hidden], .co-p[hidden] { display: none !important; }
.co-gtit { display: flex; align-items: center; gap: 10px; margin: 0; padding: 9px 12px; background: var(--surface-2); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; position: sticky; top: 0; z-index: 1; cursor: pointer; }
.co-gtit small { margin-left: auto; color: var(--muted); }
.co-p { display: flex; align-items: center; gap: 10px; margin: 0; padding: 9px 12px; border-top: 1px solid var(--border); cursor: pointer; }
.co-pn { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.co-pn b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-pn small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-pp { font-size: 12px; color: var(--muted); white-space: nowrap; }
.co-pp.on { color: var(--text); }
.co-sticky { position: sticky; top: calc(var(--topbar-h) + 16px); }
.co-notif { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.co-notif img { width: 38px; height: 38px; border-radius: 9px; flex: none; }
.co-notif > div { min-width: 0; flex: 1; }
.co-nt { display: flex; gap: 8px; align-items: baseline; }
.co-nt b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-nt span { margin-left: auto; font-size: 11px; color: var(--muted); white-space: nowrap; }
.co-nm { font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }
.co-email { width: 100%; height: 520px; border: 1px solid var(--border); border-radius: 14px; background: #f2f2f0; display: block; }
@media (max-width: 991.98px) { .co-sticky { position: static; } }
@media (max-width: 860px) { .bottom-nav .bn-mais { display: none !important; } }
@media (min-width: 861px) { .bottom-nav .bn-avatar { display: none !important; } }
/* o Voltar agora fica no cabeçalho: some a seta repetida no começo das barras de ações */
body:has(.tb-voltar-d) .content > .toolbar > a.btn-light:first-child:has(> i.bi-arrow-left:only-child) { display: none !important; }
body:has(.tb-voltar-d) .content > .toolbar:has(> a.btn-light:first-child > i.bi-arrow-left:only-child) { display: flex !important; }
body:has(.tb-voltar-d) .content > .toolbar:has(> a.btn-light:first-child > i.bi-arrow-left:only-child) > .toolbar-acoes { margin-left: auto !important; }
@media (max-width: 575.98px) { body:has(.tb-voltar-d) .content > .toolbar:has(> a.btn-light:first-child > i.bi-arrow-left:only-child) > .toolbar-acoes { width: 100%; } }

/* camadas: janelas modais sempre acima das pílulas, barras, folha inferior e visualizador */
.modal-backdrop { z-index: 1105; }
.modal { z-index: 1110; }
#mdReauth.modal { z-index: 1120; }
/* aviso de mensalidade em aberto (licença) */
.lic-faixa { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: .75rem 1.75rem 0; padding: .7rem 1rem; border-radius: 12px; background: #fff7e6; color: #8a5300; border: 1px solid #f5d9a8; font-size: .9rem; }
.lic-faixa .btn { margin-left: auto; }
[data-bs-theme="dark"] .lic-faixa { background: #2a1f0c; color: #f6c76b; border-color: #4a3712; }
.lic-faixa.lic-teste { background: #eef2ff; color: #2f3fb8; border-color: #c9d2fb; }
[data-bs-theme="dark"] .lic-faixa.lic-teste { background: #161d3d; color: #aab8ff; border-color: #2a3570; }
@media (max-width: 860px) { .lic-faixa { margin: .75rem 10px 0; } }
.mod-card.bloq { opacity: .55; cursor: not-allowed; }
.mod-card.bloq > .bi-lock { margin-left: auto; color: var(--muted); }

/* ===== Site da agência (painel) ===== */
.sp-abas { display: flex; gap: .25rem; background: var(--surface-2); padding: .25rem; border-radius: 12px; }
.sp-abas a { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border-radius: 9px; font-size: .88rem; color: var(--text-2); text-decoration: none; white-space: nowrap; }
.sp-abas a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 600; }
.tabs-seg label { margin: 0; } .tabs-seg label span { display: inline-block; padding: .4rem .9rem; border-radius: 9px; cursor: pointer; font-size: .88rem; }
.tabs-seg label input:checked + span { background: var(--text); color: var(--fg-inv); }
.sp-modelos { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.sp-modelo { position: relative; display: flex; flex-direction: column; gap: .7rem; padding: .6rem .6rem .8rem; border: 1.5px solid var(--border); border-radius: 18px; cursor: pointer; background: var(--surface); margin: 0; transition: border-color .15s, box-shadow .2s, transform .2s; }
.sp-modelo:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -16px rgba(0,0,0,.35); }
.sp-modelo input { position: absolute; opacity: 0; }
.sp-modelo.on { border-color: var(--text); box-shadow: 0 0 0 3px var(--ring); }
.sp-m-img { position: relative; display: block; aspect-ratio: 1440 / 1000; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.sp-m-img iframe { position: absolute; left: 0; top: 0; width: 1440px; height: 1000px; border: 0; pointer-events: none; transform-origin: 0 0; transform: scale(var(--k, .18)); }
.sp-m-cores { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 3px; padding: 3px; border-radius: 99px; background: rgba(255,255,255,.9); }
.sp-m-cores i { width: 14px; height: 14px; border-radius: 50%; display: block; }
.sp-m-check { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--surface); opacity: 0; transform: scale(.6); transition: .2s; }
.sp-modelo.on .sp-m-check { opacity: 1; transform: none; }
.sp-m-nome { padding: 0 .3rem; } .sp-m-nome b { display: block; font-size: 1.02rem; } .sp-m-nome em { display: block; font-style: normal; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .25rem; }
.sp-m-nome small { display: block; font-size: .76rem; color: var(--muted); line-height: 1.4; }
.sp-m-acoes { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 .3rem; margin-top: auto; }
.sp-m-esc { flex: 1 1 7.5rem; min-width: 0; display: flex; align-items: center; justify-content: center; gap: .3rem; padding: 0 .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 34px; border-radius: 99px; font-size: .78rem; font-weight: 600; background: var(--surface-2); }
.sp-modelo.on .sp-m-esc { background: var(--text); color: var(--surface); }
.sp-m-ver { flex: 1 1 auto; justify-content: center; white-space: nowrap; display: inline-flex; align-items: center; gap: .35rem; min-height: 34px; padding: 0 .8rem; border-radius: 99px; font-size: .78rem; font-weight: 600; border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.sp-m-ver:hover { background: var(--surface-2); color: var(--text); }
.sp-previa { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; }
.sp-prev-bar { display: flex; align-items: center; gap: 6px; width: 100%; padding: .55rem .8rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.sp-prev-bar > span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); } .sp-prev-bar > div:not(.sp-prev-tam) { flex: 1; margin: 0 .6rem; background: var(--surface-2); border-radius: 8px; font-size: .78rem; color: var(--muted); padding: .2rem .7rem; }
.sp-prev-tam button { border: 0; background: transparent; padding: .2rem .45rem; border-radius: 6px; color: var(--muted); } .sp-prev-tam button.on { background: var(--surface-2); color: var(--text); }
#spFrame { width: 100%; height: 640px; border: 0; background: #fff; transition: width .25s; }
.sp-inc { display: flex; flex-wrap: wrap; gap: .4rem; }
.sp-inc input { position: absolute; opacity: 0; } .sp-inc label { margin: 0; }
.sp-inc span { display: inline-flex; gap: .35rem; align-items: center; padding: .4rem .75rem; border-radius: 99px; border: 1px solid var(--border); font-size: .86rem; cursor: pointer; }
.sp-inc input:checked + span { background: var(--text); border-color: var(--text); color: var(--fg-inv); }
.sp-rot { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: .7rem; }
.sp-rot-n { flex: none; width: 48px; font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--muted); padding-top: .55rem; }
.sp-fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sp-foto { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; }
.sp-foto img { width: 100%; height: 100%; object-fit: cover; }
.sp-foto:first-child { outline: 3px solid var(--text); outline-offset: -3px; }
.sp-foto button { position: absolute; bottom: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: .75rem; display: grid; place-items: center; }
.sp-foto [data-capa] { left: 4px; } .sp-foto [data-tirar] { right: 4px; }
.sp-thumb { width: 52px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; }
.sp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.sp-tile { position: relative; aspect-ratio: 4/3; border-radius: 14px; overflow: hidden; display: block; color: #fff; text-decoration: none; border: 2px solid transparent; }
.sp-tile img { width: 100%; height: 100%; object-fit: cover; }
.sp-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.65)); }
.sp-tile span { position: absolute; z-index: 1; left: .7rem; bottom: .6rem; right: .7rem; } .sp-tile b { display: block; font-size: .92rem; } .sp-tile small { font-size: .74rem; opacity: .85; }
.sp-tile.on { border-color: var(--text); }
.sp-tile-novo { border: 2px dashed var(--border-strong); color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; }
.sp-tile-novo::after { display: none; } .sp-tile-novo span { position: static; } .sp-tile-novo i { font-size: 1.4rem; }
.sp-foto-g { width: 100%; max-height: 180px; object-fit: cover; border-radius: 12px; display: block; }
tr.sp-novo td:first-child { box-shadow: inset 3px 0 0 var(--text); }
@media (max-width: 860px) { .sp-abas { overflow-x: auto; max-width: 100%; } #spFrame { height: 520px; } }
.demo-login { background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 14px; padding: .9rem 1rem; margin: .8rem 0 1.2rem; font-size: .88rem; display: flex; flex-direction: column; }
.demo-faixa { display: flex; gap: .6rem; align-items: center; margin: .75rem 1.75rem 0; padding: .6rem 1rem; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--border-strong); font-size: .85rem; color: var(--text-2); }
@media (max-width: 860px) { .demo-faixa { margin: .75rem 10px 0; font-size: .8rem; } }
.demo-faixa .demo-cta { flex: none; white-space: nowrap; }
@media (max-width: 860px) { .demo-faixa .demo-cta span { display: none; } }
.nov-faixa { display: flex; gap: .6rem; align-items: center; margin: .75rem 1.75rem 0; padding: .6rem .8rem .6rem 1rem; border-radius: 12px; background: var(--text); color: var(--surface); font-size: .85rem; }
.nov-faixa .btn-close { filter: invert(1); opacity: .7; } .nov-faixa .btn-light { flex: none; }
@media (max-width: 860px) { .nov-faixa { margin: .75rem 10px 0; font-size: .8rem; } }
[data-bs-theme="dark"] .nov-faixa .btn-close { filter: none; }

/* Plano e pagamentos */
.cc-mini { width: 52px; height: 36px; border-radius: 8px; border: 1px solid var(--border-strong); display: grid; place-items: center; font-size: 1.15rem; background: var(--surface-2, var(--surface)); }
.plano-op { height: 100%; display: flex; flex-direction: column; border: 1px solid var(--border-strong); border-radius: 14px; padding: 16px; }
.plano-op.on { border-color: var(--text); box-shadow: 0 0 0 1px var(--text) inset; }
.table a.btn-primary, .table a.btn-primary:hover { color: var(--fg-inv); }
.pl-off { display: inline-block; font-size: .7rem; font-weight: 650; padding: .05em .45em; border-radius: 99px; background: var(--text); color: var(--fg-inv); vertical-align: 1px; }
.pl-precos { display: grid; gap: .35rem; }
.pl-precos > div { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.pl-forma { font-size: .8rem; color: var(--muted); }
.pl-v { font-size: 1.45rem; font-weight: 650; letter-spacing: -.02em; }
.pl-v2 { font-weight: 600; }
.pl-v small, .pl-v2 small { font-size: .75rem; font-weight: 400; color: var(--muted); }
.pl-dica { color: var(--text-2); }
.atu-faixa .btn .spinner-border { width: .85rem; height: .85rem; border-width: 2px; }
.nov-faixa .btn-light { background: var(--surface); color: var(--text); border-color: var(--surface); font-weight: 600; }
.nov-faixa .btn-light:hover { opacity: .9; background: var(--surface); color: var(--text); }
.nov-faixa .btn-light:disabled { opacity: .7; }

/* Títulos de seção com chave (Hotel, Seguro, Bagagem…): chave não quebra e não encosta no bloco anterior */
[data-so-tur] > .section-title:first-child, [data-so-imig] > .section-title:first-child { margin-top: 1.75rem; }
.section-title .form-switch { flex: none; display: flex; align-items: center; }
.section-title .form-switch .form-check-label { white-space: nowrap; text-transform: none; letter-spacing: 0; font-size: .82rem; }
@media (max-width: 575.98px) { .section-title:has(.form-switch)::after { display: none; } .section-title:has(.form-switch) { gap: .5rem; } }

/* listas em cartões no celular: nada passa da largura do cartão */
@media (max-width: 767.98px) { .table-cards, .table-cards tbody { width: 100% !important; min-width: 0 !important; } .table-cards tr, .table-cards td { width: auto !important; min-width: 0 !important; max-width: 100%; } .table-cards td { overflow-wrap: anywhere; } }

/* ===== Layout 2: menu no topo (escolha do usuário no menu da conta) ===== */
.theme-switch a { color: var(--muted); width: 30px; height: 28px; border-radius: 7px; display: grid; place-items: center; font-size: .9rem; text-decoration: none; }
.theme-switch a:hover { color: var(--text); }
.theme-switch a.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.topnav, .tn-marca { display: none; }
@media (min-width: 992px) {
  body.lay-topo .sidebar, body.lay-topo .sidebar-backdrop { display: none !important; }
  body.lay-topo .main, body.lay-topo.sb-collapsed .main { margin-left: 0 !important; }
  body.lay-topo .tn-marca { display: flex; align-items: center; margin-right: 1.25rem; padding-right: 1.25rem; border-right: 1px solid var(--border); height: 28px; text-decoration: none; color: var(--text); }
  body.lay-topo .tn-marca-img { height: 26px; width: auto; }
  body.lay-topo .tn-marca.brand-quadrada .tn-marca-img { height: 40px; }
  body.lay-topo .tn-marca span { font-weight: 700; letter-spacing: .18em; font-size: .9rem; white-space: nowrap; }
  body.lay-topo .topbar { border-bottom: 0; }
  body.lay-topo .topnav { display: flex; align-items: center; gap: .25rem; padding: .45rem 1.75rem .55rem; position: sticky; top: var(--topbar-h); z-index: 1019;
    background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
  body.lay-topo .tn-item { display: inline-flex; align-items: center; gap: .45rem; height: 34px; padding: 0 .85rem; border-radius: 999px; border: 0; background: transparent;
    color: var(--text-2); font-weight: 500; font-size: .86rem; text-decoration: none; white-space: nowrap; }
  body.lay-topo .tn-item:hover, body.lay-topo .tn-item[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
  body.lay-topo .tn-item.on { background: var(--text); color: var(--fg-inv); }
  body.lay-topo .tn-item i { font-size: 1rem; }
  body.lay-topo .tn-seta { font-size: .65rem !important; opacity: .7; }
  body.lay-topo .tn-menu { min-width: 220px; padding: .4rem; border-radius: 14px; }
  body.lay-topo .tn-menu .dropdown-item { display: flex; align-items: center; gap: .6rem; border-radius: 9px; padding: .5rem .65rem; font-size: .88rem; }
  body.lay-topo .tn-menu .dropdown-item i { color: var(--muted); width: 1.1rem; text-align: center; }
  body.lay-topo .tn-menu .dropdown-item.active { background: var(--text); color: var(--fg-inv); }
  body.lay-topo .tn-menu .dropdown-item.active i { color: var(--fg-inv); }
  body.lay-topo .content { max-width: 1520px; margin: 0 auto; }
  body.lay-topo #btnCollapse { display: none; }
}
/* Modelos de site limitados pelo plano */
.sp-plano-sites { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; padding: .75rem 1rem; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); font-size: .88rem; margin-bottom: 1rem; }
.sp-plano-sites > i { font-size: 1.15rem; }
.sp-modelo.bloq { cursor: default; }
.sp-modelo.bloq .sp-m-img { filter: grayscale(.85) opacity(.55); }
.sp-modelo.bloq .sp-m-esc { background: transparent; border: 1px dashed var(--border-strong); color: var(--muted); }
.sp-modelo.bloq:hover { transform: none; box-shadow: none; }
.sp-m-tag { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: .3rem; font-size: .7rem; font-weight: 700; padding: .25rem .55rem; border-radius: 999px; background: rgba(0,0,0,.75); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
/* Planos: setup, modelos de site e destaque do plano do meio */
.plano-op { position: relative; }
.plano-op.dest { border-color: var(--text); box-shadow: 0 0 0 1px var(--text) inset, 0 18px 40px -24px rgba(0,0,0,.45); }
.plano-fita { position: absolute; top: -11px; left: 14px; display: inline-flex; align-items: center; gap: .3rem; font-size: .7rem; font-weight: 700; padding: .22rem .6rem; border-radius: 999px; background: var(--text); color: var(--fg-inv); }
.pl-setup { display: flex; gap: .5rem; align-items: baseline; font-size: .82rem; padding: .5rem .65rem; border-radius: 10px; background: var(--surface-2); margin-bottom: .6rem; }
.pl-setup.zero { background: color-mix(in srgb, #16a34a 12%, var(--surface)); }
.pl-setup s { font-size: .78rem; }
.pl-itens { list-style: none; padding: 0; margin: 0 0 .9rem; display: grid; gap: .3rem; font-size: .84rem; }
.pl-itens i { color: var(--muted); margin-right: .4rem; }
.pl-compara { font-size: .78rem; color: var(--text-2); border-top: 1px dashed var(--border-strong); padding-top: .55rem; margin-bottom: .7rem; }
.table-cards td.actions .btn-sm { padding: .3rem .85rem; min-width: 70px; } @media (min-width: 768px) { .table-cards td.actions { min-width: 96px; } }
.pl-1mes { font-size: .8rem; font-weight: 600; color: #0a8f6e; margin: .35rem 0 .2rem; }
.sp-m-tag.sp-m-novo { background: linear-gradient(100deg, #5b2bff, #ff4f8b); color: #fff; }
.guarda-faixa { background: #fdecec; color: #9b1c1c; border-color: #f5c2c2; } .guarda-faixa i { color: #c81e1e; }
/* painel: âncoras abaixo da barra fixa, acima da barra de baixo do celular; sem rolagem lateral */
html { scroll-padding-top: calc(76px + env(safe-area-inset-top)); scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
html, body { overflow-x: clip; }

/* botão de atualização do sistema (barra do topo) */
.tb-atu-f { display: contents; }
.tb-ico .dot-atu { background: #16a34a; }
.tb-atu.rodando i { animation: tbAtuGira .9s linear infinite; }
@keyframes tbAtuGira { to { transform: rotate(360deg); } }

/* fluxo da venda: trilha de etapas e próximos passos */
.fx-trilha { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0 0 14px; }
.fx-et { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: var(--text); min-width: 0; position: relative; }
.fx-et i { font-size: 1rem; flex: none; color: var(--muted); }
.fx-et span { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.fx-et small { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.fx-et b { font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-et.ok i { color: var(--bs-success, #16a34a); }
.fx-et.atual { border-color: var(--adm-ac, var(--text)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--adm-ac, var(--text)) 14%, transparent); } .fx-et.atual i { color: var(--adm-ac, var(--text)); }
.fx-et.vazio { opacity: .5; pointer-events: none; background: transparent; border-style: dashed; }
a.fx-et:not(.vazio):hover { border-color: var(--text); }
@media (max-width: 767.98px) { .fx-trilha { display: flex; overflow-x: auto; scrollbar-width: none; } .fx-trilha::-webkit-scrollbar { display: none; } .fx-et { flex: none; min-width: 132px; } }
.fx-card .card-header { font-weight: 600; }
.fx-pulso { width: 8px; height: 8px; border-radius: 50%; background: var(--bs-success, #16a34a); box-shadow: 0 0 0 0 rgba(22,163,74,.5); animation: fxPulso 2s infinite; }
@keyframes fxPulso { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.45); } 70% { box-shadow: 0 0 0 9px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
.fx-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.fx-item:last-child { border-bottom: 0; }
.fx-ico { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 1.05rem; background: var(--surface-2); }
.fx-ico.fx-iniciar { color: var(--bs-success, #16a34a); background: color-mix(in srgb, var(--bs-success, #16a34a) 12%, transparent); }
.fx-ico.fx-repasse { color: #b45309; background: rgba(245,158,11,.14); }
.fx-ico.fx-emitir { color: var(--adm-ac, var(--text)); background: color-mix(in srgb, var(--adm-ac, var(--text)) 12%, transparent); }
.fx-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.fx-txt b { font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-txt small { color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-val { font-weight: 600; font-size: .88rem; white-space: nowrap; }
.fx-acoes { display: flex; gap: 6px; flex: none; }
@media (max-width: 575.98px) {
  .fx-card .card-header > span:last-child { display: none; }
  .fx-item { flex-wrap: wrap; row-gap: 8px; }
  .fx-txt { flex: 1 1 calc(100% - 52px); }
  .fx-acoes { width: 100%; padding-left: 50px; }
  .fx-acoes .btn-primary { flex: 1; }
}
/* orçamento sem cliente cadastrado */
.badge-st.st-alerta { white-space: nowrap; color: #b45309; border-color: rgba(217,119,6,.45); background: rgba(245,158,11,.08); }
[data-bs-theme="dark"] .badge-st.st-alerta { color: #fbbf24; border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.08); }
.alert.orc-semcli { border-color: rgba(217,119,6,.5); }
.alert.orc-semcli::before { color: #d97706; }
/* barra de etapas da venda: fica presa no topo e parada ao trocar de etapa */
.fx-trilha { position: sticky; top: var(--topbar-h); z-index: 1015; padding: 10px 0; margin-top: -10px; background: var(--bg); view-transition-name: fx-trilha; }
.fx-et.aqui { background: var(--surface-2, var(--surface)); }
.fx-et.aqui b { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
@media (max-width: 860px) {
  .fx-trilha { top: calc(70px + env(safe-area-inset-top)); padding: 8px 0; margin-inline: -2px; background: linear-gradient(var(--bg) 82%, transparent); scroll-padding-inline: 12px; }
}
/* aviso de orçamento sem cliente no celular: texto em cima, botões embaixo */
@media (max-width: 767.98px) {
  .alert.orc-semcli { flex-wrap: wrap; align-items: flex-start; }
  .alert.orc-semcli > div:first-of-type { flex: 1 1 calc(100% - 2rem); }
  .alert.orc-semcli > .d-flex, .alert.orc-semcli > .btn { margin-left: 0 !important; width: 100%; }
  .alert.orc-semcli > .d-flex > .btn { flex: 1; }
}

/* ramos: ordem com cadastro do cliente incompleto */
.at-aviso.at-incompleto { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: #b45309; background: rgba(245,158,11,.08); border: 1px solid rgba(217,119,6,.35); }
.at-aviso.at-incompleto span { flex: 1 1 140px; }
.at-aviso.at-incompleto .btn { padding: 2px 10px; }
[data-bs-theme="dark"] .at-aviso.at-incompleto { color: #fbbf24; border-color: rgba(251,191,36,.35); }

/* assinatura "by NOME" (Desenvolvido por, da matriz) */
.by-credito { letter-spacing: .02em; } .by-credito b { font-weight: 600; letter-spacing: .06em; } .by-credito a { color: inherit; text-decoration: none; } .by-credito a:hover b { text-decoration: underline; }
.sb-by-linha { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 10px 12px 2px; font-size: .68rem; color: var(--muted); opacity: .8; white-space: nowrap; }
.sb-by-linha .modra-assina { max-width: 100%; }
.sb-collapsed .sb-by-linha { display: none; }
.auth-by { text-align: center; margin-top: 28px; font-size: .75rem; color: var(--muted); }
/* contador no menu (ex.: resposta nova do suporte) */
.sidebar .nav-link .nav-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #ef4444; color: #fff; font-size: .68rem; font-weight: 700; display: inline-grid; place-items: center; line-height: 1; }
.sb-collapsed .sidebar .nav-link .nav-badge { position: absolute; top: 4px; right: 6px; margin: 0; }
/* cotação online no orçamento */
.cot-ico { background: rgba(14,165,233,.12); color: #0284c7; }
.cot-tabs label { display: inline-flex; gap: 6px; align-items: center; }
.cot-res:empty { display: none; } .cot-res { margin-top: 14px; }
.cot-aviso { padding: 14px; border: 1px dashed var(--border); border-radius: 12px; font-size: .9rem; }
.cot-lista { display: flex; flex-direction: column; gap: 8px; max-height: 520px; overflow-y: auto; padding-right: 2px; }
.cot-it { display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.cot-cia { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; } .cot-cia img { width: 34px; height: 34px; object-fit: contain; } .cot-cia small { font-size: .7rem; color: var(--muted); line-height: 1.2; }
.cot-foto { width: 84px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--surface-2, rgba(0,0,0,.04)); display: grid; place-items: center; } .cot-foto img { width: 100%; height: 100%; object-fit: cover; }
.cot-lin { font-size: .92rem; } .cot-lin span { display: block; font-size: .76rem; color: var(--muted); margin-bottom: 4px; }
.cot-tags { display: flex; flex-wrap: wrap; gap: 5px; } .cot-tags span { font-size: .7rem; padding: 2px 8px; border-radius: 99px; background: var(--surface-2, rgba(0,0,0,.05)); color: var(--muted); }
.cot-preco { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; } .cot-preco b { font-size: 1.1rem; } .cot-preco small { font-size: .72rem; color: var(--muted); line-height: 1.3; }
.cot-est { color: #f59e0b; font-size: .8rem; letter-spacing: 1px; }
@media (max-width: 640px) { .cot-it { grid-template-columns: 56px 1fr; } .cot-preco { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; text-align: left; } .cot-cia img { width: 28px; height: 28px; } .cot-foto { width: 56px; height: 56px; } }
/* compromissos vindos do Google Agenda */
.ag-ev.ag-google { background: rgba(66,133,244,.12); color: #1a56c4; } [data-bs-theme="dark"] .ag-ev.ag-google { color: #8ab4f8; }
.ag-ico.ag-google { background: rgba(66,133,244,.12); color: #4285f4; }
/* menu lateral mais compacto em telas baixas */
@media (max-height: 860px) { .sidebar .nav-link { padding-top: .42rem; padding-bottom: .42rem; } .sidebar .nav-group { padding-top: .6rem; } }
@media (max-height: 700px) { .sidebar .nav-link { padding-top: .34rem; padding-bottom: .34rem; } .sidebar .nav-group { padding-top: .45rem; padding-bottom: .25rem; } .sidebar-foot { padding: .4rem .75rem; } }

/* ===== Galerias de anexos (fotos, vídeos, antes e depois) ===== */
.anx-gal { display: grid; gap: 1rem; }
.anx-grupo-t { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: .2rem 0 .5rem; display: flex; align-items: center; gap: .4rem; }
.anx-grupo-t span { font-weight: 600; letter-spacing: 0; background: var(--surface-2); color: var(--text-2); border-radius: 99px; padding: 0 .45rem; }
.anx-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .6rem; }
.anx-bloco + .anx-bloco { margin-top: .9rem; }
.anx-it { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.anx-thumb { position: relative; display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.anx-thumb img, .anx-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.anx-play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2rem; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.45); pointer-events: none; }
.anx-doc { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.2rem; color: var(--text-2); }
.anx-cap { font-size: .75rem; color: var(--muted); line-height: 1.25; }
.anx-acoes { display: flex; gap: .25rem; align-items: center; }
.anx-acoes .form-select { flex: 1; min-width: 0; font-size: .75rem; padding-top: .2rem; padding-bottom: .2rem; }
.anx-leg { font-size: .78rem; }
.anx-add { aspect-ratio: 1; border: 1.5px dashed var(--border-strong); border-radius: 12px; display: grid; place-items: center; align-content: center; gap: .25rem; text-align: center; cursor: pointer; color: var(--text-2); font-size: .82rem; font-weight: 600; margin: 0; transition: background .15s; }
.anx-add i { font-size: 1.4rem; }
.anx-add small { font-weight: 400; color: var(--muted); }
.anx-add:hover, .anx-sobre .anx-add { background: var(--surface-2); }
.anx-enviando .anx-thumb { display: grid; place-items: center; align-content: center; gap: .4rem; padding: .6rem; text-align: center; }
.anx-enviando small { font-size: .7rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.anx-prog { width: 80%; height: 6px; border-radius: 9px; background: var(--surface-3); overflow: hidden; }
.anx-prog i { display: block; height: 100%; width: 0; background: var(--text); transition: width .2s; }
.anx-status { font-size: .8rem; margin-top: .4rem; min-height: 1em; }
.crud-anx { display: inline-flex; align-items: center; gap: .2rem; font-size: .75rem; color: var(--muted); margin-right: .35rem; }
/* comparação antes e depois */
.anx-comps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.anx-comp { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #111; --pos: 50%; user-select: none; }
.anx-comp > img, .anx-comp-antes img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.anx-comp-antes { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.anx-comp-linha { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); pointer-events: none; }
.anx-comp-linha::after { content: ''; position: absolute; top: 50%; left: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.anx-comp-sl { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.anx-comp-r { position: absolute; top: .6rem; padding: .15rem .55rem; border-radius: 99px; font-size: .7rem; font-weight: 600; background: rgba(0,0,0,.55); color: #fff; pointer-events: none; }
.anx-comp-r.a { left: .6rem; } .anx-comp-r.d { right: .6rem; }
.anx-comp figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: .9rem .7rem .5rem; font-size: .78rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); pointer-events: none; }

/* ===== Meus arquivos (contratos, vistorias e documentos por imóvel ou cliente) ===== */
.arq-lista { display: grid; gap: .75rem; }
.arq-grupo { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.arq-grupo > summary { list-style: none; display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; cursor: pointer; }
.arq-grupo > summary::-webkit-details-marker { display: none; }
.arq-gico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--text); color: var(--fg-inv); font-size: 1.1rem; flex: none; }
.arq-gtit { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.arq-gtit b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arq-gtit small { color: var(--muted); font-size: .8rem; }
.arq-gn { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.arq-gseta { color: var(--muted); transition: transform .2s; }
.arq-grupo:not([open]) .arq-gseta { transform: rotate(-90deg); }
.arq-itens { border-top: 1px solid var(--border); }
.arq-it { padding: .7rem 1rem; }
.arq-it + .arq-it { border-top: 1px solid var(--border); }
.arq-linha { display: flex; align-items: center; gap: .75rem; }
.arq-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.arq-assinado .arq-ico { background: #dcfce7; color: #15803d; }
[data-bs-theme="dark"] .arq-assinado .arq-ico { background: rgba(34,197,94,.16); color: #4ade80; }
.arq-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.arq-txt b { font-weight: 600; font-size: .92rem; }
.arq-txt small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arq-bts { display: flex; gap: .35rem; flex: none; }
.arq-anx { margin: .7rem 0 .2rem 46px; }
@media (max-width: 575px) { .arq-anx { margin-left: 0; } .arq-grupo > summary { padding: .75rem .8rem; } .arq-gn { display: none; } }
.anx-edit { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* ===== Mensagens com os clientes ===== */
.msg-app { display: grid; grid-template-columns: 320px 1fr; gap: 1rem; height: calc(100vh - var(--topbar-h) - 3.5rem); min-height: 480px; }
.msg-lista { display: flex; flex-direction: column; overflow: hidden; margin: 0; }
.msg-busca { padding: .75rem .75rem .4rem; } .msg-nova { padding: 0 .75rem .6rem; border-bottom: 1px solid var(--border); }
.msg-convs { overflow-y: auto; flex: 1; }
.msg-conv { display: flex; align-items: center; gap: .7rem; padding: .7rem .85rem; color: inherit; text-decoration: none; border-bottom: 1px solid var(--border); }
.msg-conv:hover { background: var(--surface-2); } .msg-conv.on { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--text); }
.msg-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-weight: 700; flex: none; }
.msg-conv-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.msg-conv-t b { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-conv-t small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-conv.nova .msg-conv-t b, .msg-conv.nova .msg-conv-t small { color: var(--text); font-weight: 650; }
.msg-conv-l { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; flex: none; }
.msg-conv-l small { color: var(--muted); font-size: .72rem; }
.msg-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: #22c55e; color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.msg-painel { display: flex; flex-direction: column; overflow: hidden; margin: 0; }
.msg-topo { display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem; border-bottom: 1px solid var(--border); }
.msg-topo b { display: block; font-weight: 600; } .msg-topo small { color: var(--muted); font-size: .78rem; }
.msg-corpo { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .35rem; background: var(--bg); }
.msg-vazio { margin: auto; display: grid; justify-items: center; gap: .35rem; text-align: center; color: var(--muted); padding: 2rem; max-width: 360px; }
.msg-vazio i { font-size: 2.2rem; } .msg-vazio b { color: var(--text); font-weight: 600; }
.msg-vazio.pequeno { font-size: .88rem; }
.msg-dia { text-align: center; margin: .6rem 0 .3rem; } .msg-dia span { font-size: .72rem; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: .15rem .6rem; border-radius: 99px; }
.msg { display: flex; flex-direction: column; max-width: min(78%, 560px); }
.msg-eu { align-self: flex-end; align-items: flex-end; } .msg-ele { align-self: flex-start; }
.msg-quem { font-size: .72rem; color: var(--muted); margin: .25rem .6rem .1rem; }
.msg-bolha { position: relative; padding: .5rem .75rem .35rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); word-wrap: break-word; overflow-wrap: anywhere; }
.msg-eu .msg-bolha { background: var(--text); color: var(--fg-inv); border-color: var(--text); border-bottom-right-radius: 6px; }
.msg-ele .msg-bolha { border-bottom-left-radius: 6px; }
.msg-eu .msg-bolha a { color: inherit; }
.msg-txt { font-size: .92rem; line-height: 1.4; }
.msg-hora { display: block; text-align: right; font-size: .68rem; opacity: .6; margin-top: .15rem; }
.msg-lido { color: #38bdf8; opacity: 1; }
.msg-eu .msg-lido { color: #7dd3fc; }
.msg-img { display: block; margin: -.2rem -.45rem .35rem; } .msg-img img { display: block; max-width: 260px; max-height: 260px; border-radius: 12px; object-fit: cover; }
.msg-arq { display: flex; align-items: center; gap: .45rem; padding: .45rem .6rem; border-radius: 10px; background: rgba(127,127,127,.14); text-decoration: none; margin-bottom: .3rem; font-size: .85rem; }
.msg-form { display: flex; align-items: flex-end; gap: .5rem; padding: .65rem .75rem; border-top: 1px solid var(--border); background: var(--surface); }
.msg-campo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.msg-campo textarea { resize: none; max-height: 160px; border-radius: 20px; padding: .55rem .9rem; }
.msg-anexo-nome { font-size: .78rem; color: var(--text-2); display: inline-flex; align-items: center; gap: .3rem; }
.msg-anexo-nome button { border: 0; background: none; color: var(--muted); font-size: 1rem; line-height: 1; }
.msg-form .btn-icon { width: 42px; height: 42px; border-radius: 50%; flex: none; }
@media (max-width: 991px) {
  .msg-app { grid-template-columns: 1fr; height: calc(100dvh - var(--topbar-h) - 6.5rem); }
  .msg-com-conversa .msg-lista { display: none; }
  .msg-app:not(.msg-com-conversa) .msg-painel { display: none; }
}
