/* SmartBiz Angola — ajustes mínimos sobre o AdminLTE 4 */
:root { --sb-primary: #1A56DB; --bs-primary: #1A56DB; --bs-primary-rgb: 26, 86, 219; --bs-link-color: #1A56DB; --bs-link-color-rgb: 26, 86, 219; }
[data-bs-theme="dark"] { --bs-link-color: #6ea8fe; --bs-link-color-rgb: 110, 168, 254; }
.btn-primary { --bs-btn-bg: #1A56DB; --bs-btn-border-color: #1A56DB; --bs-btn-hover-bg: #1646b4; --bs-btn-hover-border-color: #1646b4; --bs-btn-active-bg: #133d9c; }
.btn-outline-primary { --bs-btn-color: #1A56DB; --bs-btn-border-color: #1A56DB; --bs-btn-hover-bg: #1A56DB; --bs-btn-hover-border-color: #1A56DB; }
.text-bg-primary { background-color: #1A56DB !important; }
.nav-pills .nav-link.active { background-color: #1A56DB; }
body { font-family: 'Source Sans 3', system-ui, sans-serif; }

/* Ecrãs de arranque e autenticação */
.ecra-loading { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bs-body-bg); z-index: 3000; }
.ecra-auth { min-height: 100vh; background: var(--bs-tertiary-bg); }
.auth-wrap { display: flex; min-height: 100vh; }
.auth-lado { flex: 1; background: linear-gradient(150deg, #0F2473 0%, #1A56DB 70%, #3B82F6 100%); color: #fff; padding: 4rem; align-items: center; }
.auth-lado > div { max-width: 520px; }
.auth-lista li { padding: .3rem 0; font-size: 1rem; display: flex; }
.auth-modulos { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.auth-modulos > div { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); border-radius: .5rem; padding: .45rem .6rem; display: grid; grid-template-columns: 1.6rem 1fr; line-height: 1.2; }
.auth-modulos i { grid-row: span 2; font-size: 1.1rem; align-self: center; opacity: .9; }
.auth-modulos b { font-size: .9rem; }
.auth-modulos span { font-size: .75rem; opacity: .75; }
.auth-lado { overflow-y: auto; }
@media (max-height: 820px) { .auth-lado { padding: 2rem 4rem; } .auth-lado h1 { font-size: 1.8rem; } }
.auth-lista i { width: 1.8rem; flex: 0 0 1.8rem; display: inline-block; opacity: .85; }
.auth-form { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }

/* Cabeçalho */
.avatar-iniciais { width: 32px; height: 32px; border-radius: 50%; background: #1A56DB; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; flex-shrink: 0; }
.avatar-iniciais.avatar-lg { width: 72px; height: 72px; font-size: 1.5rem; display: flex; background: rgba(255,255,255,.2); }
.user-menu .user-header small { display: block; opacity: .8; }
.lic-chip { font-size: .78rem; font-weight: 600; padding: .3rem .65rem; border-radius: 999px; white-space: nowrap; }

/* Small boxes com ícones Bootstrap */
.small-box .small-box-icon { font-size: 70px; position: absolute; right: 15px; top: 10px; opacity: .25; line-height: 1; transition: transform .3s; }
.small-box:hover .small-box-icon { transform: scale(1.08); }
.small-box .inner h3 { font-size: 1.6rem; white-space: nowrap; }
@media (max-width: 575.98px) { .small-box .inner h3 { font-size: 1.15rem; } .small-box .small-box-icon { font-size: 44px; } }

/* Tabelas */
.table-acoes { white-space: nowrap; text-align: end; width: 1%; }
.table td, .table th { vertical-align: middle; }
.tbl-scroll { max-height: 62vh; overflow: auto; }

/* Ponto de venda */
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.pos-prod { border: 1px solid var(--bs-border-color); border-radius: .5rem; padding: .7rem; background: var(--bs-body-bg); cursor: pointer; text-align: start; transition: border-color .15s, transform .1s; min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; }
.pos-prod:hover { border-color: #1A56DB; }
.pos-prod:active { transform: scale(.98); }
.pos-prod .nm { font-weight: 600; font-size: .9rem; line-height: 1.2; }
.pos-prod .pr { color: #1A56DB; font-weight: 700; }
[data-bs-theme="dark"] .pos-prod .pr { color: #6ea8fe; }
.pos-prod.sem-stock { opacity: .5; }
.pos-carrinho { position: sticky; top: 1rem; }
.pos-linha .form-control { width: 64px; }
.pos-total { font-size: 1.8rem; font-weight: 800; }

/* Editor de documento */
.doc-linhas td { padding: .35rem; }
.doc-linhas .form-control, .doc-linhas .form-select { font-size: .9rem; }

/* Pré-visualização do documento A4 */
.doc-preview-wrap { display: flex; flex-direction: column; align-items: center; }
.doc-a4 { background: #fff; color: #111; width: 210mm; max-width: 100%; min-height: 260mm; padding: 14mm 14mm 10mm; box-shadow: 0 2px 12px rgba(0,0,0,.12); font-size: 10.5pt; }

/* Licença */
.plano-card { border: 2px solid var(--bs-border-color); border-radius: .75rem; transition: border-color .15s, box-shadow .15s; height: 100%; }
.plano-card.destaque { border-color: #1A56DB; box-shadow: 0 6px 24px rgba(26,86,219,.15); }
.plano-card .preco { font-size: 2rem; font-weight: 800; line-height: 1; }
.plano-opcao { cursor: pointer; }
.plano-opcao input:checked + .plano-card { border-color: #1A56DB; background: rgba(26,86,219,.06); }
.passos { display: flex; gap: .5rem; margin-bottom: 1.25rem; }
.passos .p { flex: 1; height: 4px; border-radius: 2px; background: var(--bs-border-color); }
.passos .p.on { background: #1A56DB; }
.copiar { cursor: pointer; }
.chave-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; text-align: center; font-size: 1.1rem; }
.lic-progress { height: 8px; }

/* Licença expirada: acções de escrita ficam visualmente bloqueadas */
body.lic-expirada [data-escrita] { opacity: .55; }

@media print { .no-print { display: none !important; } }
.callout .btn-primary, .callout .btn-danger, .callout .btn-success { color: #fff !important; }
.callout .btn-warning { color: #000 !important; }
.zona-lic { border: 2px dashed var(--bs-border-color); cursor: pointer; transition: border-color .15s, background .15s; }
.zona-lic:hover, .zona-lic.ativa { border-color: #1A56DB; background: rgba(26,86,219,.05); }

/* ── Gestão Escolar ── */
.sb-ord { cursor: pointer; user-select: none; white-space: nowrap; }
.grelha-notas input { min-width: 64px; }
.grelha-notas td, .pauta td { vertical-align: middle; }
.grelha-horario td { min-width: 110px; height: 56px; vertical-align: middle; }
.hr-cel { cursor: pointer; }
.hr-cel:hover, .hr-cel:focus { background: rgba(26, 86, 219, .08); outline: none; }
.box-profile .avatar-iniciais { font-size: 2rem; }
.card-tabs .nav-tabs .nav-link { white-space: nowrap; }
/* confirmação por cima de outro modal aberto */
#m-confirm { z-index: 1070; }
.modal-backdrop ~ .modal-backdrop { z-index: 1065; }

/* Hotelaria: calendário de reservas */
.hotel-cal td, .hotel-cal th { min-width: 34px; height: 34px; vertical-align: middle; }
.hotel-cal td[data-livre]:hover { background: rgba(26,86,219,.12); }
.hotel-cal .sticky-col { position: sticky; left: 0; z-index: 2; background: var(--bs-body-bg); min-width: 110px; }
.hotel-cal a { line-height: 30px; border-radius: 4px; margin: 1px; }
/* Restauração */
.rest-mesa { transition: transform .1s; } .rest-mesa:active { transform: scale(.97); }

.menu-oculto { display: none !important; }
