/* ============================================================
   Modulo Senhas de Atendimento
   Kiosk publico (/senhas/kiosk) e, mais tarde, monitor publico.
   ============================================================ */

/* K6: em ecrã público não mostrar a caixa "ligação perdida" (recarrega em silêncio) */
body.sen-kiosk-mode #components-reconnect-modal { display: none !important; }

.sen-kiosk-root {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: auto;
    background:
        radial-gradient(1200px 600px at 15% -10%, rgba(23,105,192,.10), transparent 60%),
        radial-gradient(900px 500px at 100% 110%, rgba(11,46,89,.12), transparent 55%),
        linear-gradient(160deg, #eef3f8 0%, #dde7f1 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4vh 4vw;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    color: #1f2c3d;
}

.sen-kiosk {
    width: 100%;
    max-width: 900px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.sen-kiosk-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    justify-content: center;
}

.sen-kiosk-header img { height: 76px; width: auto; background: transparent; }

.sen-kiosk-header h1 {
    font-size: 1.7rem;
    font-weight: 700;
    margin: 0;
    color: #0b2e59;
    letter-spacing: .01em;
    line-height: 1.15;
}
.sen-kiosk-header h1 .sen-bi-en { font-size: .5em; font-weight: 500; opacity: .6; margin-top: 0; }

.sen-kiosk-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 1px 2px rgba(11,46,89,.06), 0 18px 50px rgba(11, 46, 89, 0.14);
    padding: 2.75rem 2.5rem;
    border: 1px solid rgba(11,46,89,.04);
}

.sen-kiosk-step-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 1.75rem;
    text-align: center;
    color: #0b2e59;
}
.sen-kiosk-step-title .sen-bi-en { font-size: .48em; font-weight: 500; opacity: .55; margin-top: .1em; }

.sen-kiosk-step-hint {
    text-align: center;
    color: #5a6b7d;
    margin: -1.1rem 0 1.6rem;
    font-size: 1.05rem;
}
.sen-kiosk-step-hint .sen-bi-en { font-size: .8em; }

.sen-kiosk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    grid-auto-rows: 1fr;   /* todas as linhas com a altura da mais alta → cartões iguais */
    gap: 1.1rem;
}

.sen-kiosk-btn {
    appearance: none;
    border: 1.5px solid #d3deeb;
    background: linear-gradient(180deg, #ffffff 0%, #f5f9fd 100%);
    border-radius: 18px;
    padding: 1.15rem 1.15rem;
    color: #16324f;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 132px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;      /* só nome → centrado vertical */
    gap: .35rem;
    text-align: center;
    box-shadow: 0 2px 6px rgba(11,46,89,.05);
    transition: transform .12s ease, border-color .15s ease, box-shadow .15s ease;
}

.sen-kiosk-btn:hover {
    border-color: #2f7fd1;
    box-shadow: 0 10px 26px rgba(23,105,192,.18);
    transform: translateY(-3px);
}
.sen-kiosk-btn:active { transform: translateY(-1px) scale(.99); }
.sen-kiosk-btn small { display: block; font-size: .85rem; font-weight: 400; color: #6a7b8c; margin-top: .35rem; }

/* Nome do serviço — sempre a negrito (PT e EN) e maior que a descrição */
.sen-kiosk-btn-nome {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.22;
}
.sen-kiosk-btn-nome .sen-bi-en {
    font-size: .82em;         /* ~1.07rem — maior que a descrição (.78rem) */
    font-weight: 700;
    font-style: italic;
    opacity: .72;
    display: block;
    margin-top: .1em;
}

.sen-kiosk-btn-desc {
    display: block;
    font-size: .78rem;
    font-weight: 400;
    color: #7c8da0;
    margin-top: .35rem;
    line-height: 1.35;
}
.sen-kiosk-btn-desc .sen-bi-en { font-size: .92em; }

/* Badge no fundo do botão de serviço: "Fechado / Closed" (cinza) ou "Por marcação" (azul) */
.sen-kiosk-btn-closed,
.sen-kiosk-btn-marcacao {
    margin-top: auto;
    align-self: center;
    padding: .22rem .75rem;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #fff;
    border-radius: 999px;
}
.sen-kiosk-btn-closed { background: #8b98a5; }
.sen-kiosk-btn-marcacao { background: #1769c0; }

.sen-kiosk-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.sen-kiosk-choice .sen-kiosk-btn {
    min-height: 150px;
    justify-content: center;
    padding: 1.4rem 1.25rem;
    font-size: 1.5rem;
    font-weight: 700;
}
.sen-kiosk-choice .sen-kiosk-btn small { display: block; font-size: .9rem; font-weight: 400; color: #6a7b8c; margin-top: .45rem; }

.sen-kiosk-btn--priority { border-color: #e6c168; background: linear-gradient(180deg,#fffdf6,#fdf4e0); }
.sen-kiosk-btn--priority:hover { border-color: #d29a1f; box-shadow: 0 10px 26px rgba(210,154,31,.22); }

/* K4: serviço fechado — a cinzento, ainda clicável para ver o horário */
.sen-kiosk-btn--closed {
    background: #eef1f4;
    border-color: #d4dbe3;
    color: #7a8899;
    box-shadow: none;
}
.sen-kiosk-btn--closed .sen-kiosk-btn-nome { color: #7a8899; }
.sen-kiosk-btn--closed:hover { border-color: #aebccb; box-shadow: 0 8px 20px rgba(11,46,89,.10); transform: translateY(-2px); }

/* K13/K14: serviço só por marcação */
.sen-kiosk-btn--agenda { border-color: #aecdec; background: linear-gradient(180deg,#fbfdff,#eaf3fd); }
.sen-kiosk-btn--agenda:hover { border-color: #1769c0; }

.sen-kiosk-subhead {
    margin: 2rem 0 1rem;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #7c8da0;
    border-top: 1px solid #e7edf3;
    padding-top: 1.1rem;
}
.sen-kiosk-subhead .sen-bi-en { font-size: .78em; text-transform: none; letter-spacing: 0; }

.sen-kiosk-grid--horas { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.sen-kiosk-grid--horas .sen-kiosk-btn { min-height: 68px; justify-content: center; font-size: 1.5rem; font-weight: 700; padding: 1rem; }

.sen-kiosk-horario {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 1.05rem;
}
.sen-kiosk-horario th {
    text-align: left;
    padding: .5rem .75rem;
    width: 8rem;
    color: #33475b;
    border-bottom: 1px solid #e7edf3;
}
.sen-kiosk-horario td { padding: .5rem .75rem; border-bottom: 1px solid #e7edf3; }
.sen-kiosk-horario tr.vazio { color: #9db0c1; }

.sen-kiosk-field { margin-bottom: 1.25rem; }
.sen-kiosk-field label { display: block; font-weight: 600; margin-bottom: .4rem; font-size: 1.05rem; }

.sen-kiosk-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 1.4rem;
    padding: .85rem 1rem;
    border: 2px solid #cdd9e6;
    border-radius: 12px;
    outline: none;
}

.sen-kiosk-input:focus { border-color: #2f7fd1; }

.sen-kiosk-actions {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.sen-kiosk-primary {
    appearance: none;
    border: none;
    background: #1769c0;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 600;
    padding: 1rem 2.25rem;
    border-radius: 14px;
    cursor: pointer;
    min-height: 64px;
}

.sen-kiosk-primary:disabled { opacity: .55; cursor: default; }
.sen-kiosk-primary:hover:not(:disabled) { background: #12579f; }

.sen-kiosk-secondary {
    appearance: none;
    border: 2px solid #cdd9e6;
    background: #fff;
    color: #33475b;
    font-size: 1.2rem;
    padding: .9rem 1.75rem;
    border-radius: 14px;
    cursor: pointer;
    min-height: 64px;
}

.sen-kiosk-secondary:hover { border-color: #9db4c9; }

.sen-kiosk-error {
    background: #fdecec;
    border: 1px solid #f2b5b5;
    color: #9b1c1c;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
}

.sen-kiosk-info {
    background: #eaf4ec;
    border: 1px solid #b6ddc0;
    color: #1d6b34;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
}

/* ── Conteúdo bilingue (K2/K10): PT + EN, mais pequeno e discreto por baixo ── */
.sen-bi-en {
    display: block;
    font-style: italic;
    font-weight: 400;
    opacity: .62;
    font-size: .72em;
    line-height: 1.2;
    margin-top: .1em;
}

.sen-mon-en {
    display: block;
    font-style: italic;
    opacity: .7;
    font-size: .62em;
    font-weight: 500;
    margin-top: .1em;
}

/* ── Rodapé com data/hora (K5) ── */
.sen-kiosk-footer {
    margin-top: .5rem;
    width: 100%;
    color: #5a6b7d;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
}

.sen-kiosk-footer-data { font-size: 1rem; text-align: left; }
.sen-kiosk-footer-data::first-letter { text-transform: uppercase; }

.sen-kiosk-footer-hora {
    font-size: 1rem;
    font-weight: 400;
    color: #0b2e59;
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
    text-align: right;
}

/* ── Switches agrupados na edição de serviço (G4) ── */
.sen-switch-stack {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    align-items: flex-start;
    margin: .25rem 0;
}

/* ── Diálogo "Nova marcação" (A9) ── */
.sen-marc-dialog {
    min-width: min(520px, 88vw);
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    padding: .5rem .25rem;
}

.sen-marc-dialog .rz-form-field,
.sen-marc-dialog .rz-dropdown { width: 100%; max-width: 100%; }

/* ── Bilhete emitido ── */
.sen-ticket {
    text-align: center;
    padding: .25rem 0 0;
}

.sen-ticket-label { font-size: 1.2rem; color: #5a6b7d; }
.sen-ticket-servico { font-size: 1.6rem; font-weight: 600; margin: .15rem 0 .4rem; }

.sen-ticket-num {
    font-size: clamp(2.4rem, 9vw, 5rem); /* reduzido — o talão estava demasiado alto */
    font-weight: 800;
    letter-spacing: .04em;
    color: #0b2e59;
    line-height: 1;
    margin: .25rem 0;
}

.sen-ticket-num--priority { color: #b9860b; }

.sen-ticket-mail {
    margin-top: .4rem;
    color: #5a6b7d;
    font-size: 1.05rem;
}

.sen-qr {
    margin-top: .6rem;
    text-align: center;
}

.sen-qr-img {
    display: inline-block;
    background: #fff;
    padding: 10px;              /* K9: quiet-zone visível, o scanner precisa de margem branca */
    border-radius: 12px;
    line-height: 0;
}

.sen-qr-img svg {
    width: 180px;
    height: 180px;
    max-width: 50vw;
    display: block;
}

.sen-qr-legenda {
    margin-top: .3rem;
    font-size: .95rem;
    color: #5a6b7d;
}

/* Passo final (senha emitida / marcação confirmada): espaçamento mais apertado até ao botão */
.sen-kiosk-actions--ticket { margin-top: .75rem; }

/* ── Pagina de acompanhamento (/senhas/acompanhar) ── */
.sen-acomp-estado { text-align: center; margin-top: .5rem; }
.sen-acomp-destaque { font-size: 1.6rem; font-weight: 700; color: #0b2e59; margin-bottom: .5rem; }
.sen-acomp-vez .sen-acomp-destaque { color: #1d6b34; }
.sen-acomp-linha { font-size: 1.15rem; margin: .3rem 0; }
.sen-acomp-muted { color: #7a8a99; font-size: 1rem; }

.sen-kiosk-spinner {
    display: inline-block;
    width: 22px; height: 22px;
    border: 3px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sen-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: .5rem;
}

@keyframes sen-spin { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
    .sen-kiosk-card { padding: 1.5rem; }
    .sen-kiosk-choice { grid-template-columns: 1fr; }
    .sen-kiosk-step-title { font-size: 1.4rem; }
}

/* ============================================================
   Monitor publico (/senhas/monitor)
   ============================================================ */

.sen-mon {
    width: 100%;
    max-width: 1400px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sen-mon-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    position: relative;
}

.sen-mon-header img { height: 58px; width: auto; background: transparent; }
.sen-mon-header h1 { margin: 0; font-size: 1.8rem; font-weight: 700; color: #0b2e59; }

.sen-mon-sound-btn {
    position: absolute;
    right: 0;
    appearance: none;
    border: 2px solid #cdd9e6;
    background: #fff;
    color: #33475b;
    border-radius: 12px;
    padding: .5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
}

.sen-mon-empty {
    text-align: center;
    font-size: 2rem;
    color: #6a7b8c;
    padding: 4rem 0;
}

.sen-mon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.sen-mon-panel {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 10px 40px rgba(11, 46, 89, 0.12);
    padding: 2rem 1.5rem 1.75rem;
    text-align: center;
    transition: box-shadow .25s ease, transform .25s ease;
    min-width: 0;
}

/* Senha chamada: o cartão pisca entre fundo vermelho / letras brancas e
   fundo branco / letras vermelhas, sem popup. Pisca a cada .6s enquanto a classe
   estiver presente; a duração total é controlada pelo code-behind
   (config monitor.flash_seg), que remove a classe ao fim de N s. */
.sen-mon-flash {
    animation: sen-mon-call .6s linear infinite;
}
.sen-mon-flash .sen-mon-servico,
.sen-mon-flash .sen-mon-en,
.sen-mon-flash .sen-mon-num,
.sen-mon-flash .sen-mon-num--priority,
.sen-mon-flash .sen-mon-num--idle,
.sen-mon-flash .sen-mon-prev,
.sen-mon-flash .sen-mon-prev span {
    color: inherit;
}
.sen-mon-flash .sen-mon-prev {
    border-top-color: currentColor;
}

@keyframes sen-mon-call {
    0%, 49%, 100% { background: #c81414; color: #ffffff; }
    50%, 99%      { background: #ffffff; color: #c81414; }
}
@media (prefers-reduced-motion: reduce) {
    .sen-mon-flash { animation: none; background: #c81414; color: #ffffff; }
}

.sen-mon-servico {
    font-size: 1.30rem;
    font-weight: 600;
    color: #33475b;
    margin-bottom: .5rem;
}

.sen-mon-num {
    font-size: clamp(1.8rem, 5vw, 3.2rem); /* M3: cabe com 3-4 painéis lado a lado */
    font-weight: 800;
    letter-spacing: .02em;
    color: #0b2e59;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.sen-mon-num--priority { color: #b9860b; }
.sen-mon-num--idle { color: #c3cedb; }

.sen-mon-atendente {
    font-size: 1.2rem;
    color: #5a6b7d;
    margin-top: .35rem;
}

.sen-mon-prev {
    margin-top: 1.1rem;
    padding-top: .9rem;
    border-top: 1px solid #e7edf3;
    color: #7a8a99;
    font-size: 1.05rem;
}

.sen-mon-prev span { font-weight: 600; margin-right: .4rem; }

/* ============================================================
   Painel do atendente (/senhas/atendimento) — dentro do MainLayout
   ============================================================ */

/* Cartão do estudante no diálogo de registo de atendimento */
.sen-estudante-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    max-width: 100%;
    background: var(--rz-base-100, #f1f5f9);
    border: 1px solid var(--rz-border-color, #e2e8f0);
    border-radius: 10px;
    padding: .75rem .85rem;
}
.sen-estudante-foto {
    flex: 0 0 120px;
    width: 120px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    background: #dfe3e8;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sen-estudante-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sen-estudante-foto-vazia { font-size: .72rem; color: #7a8a99; text-align: center; }
.sen-estudante-cursos {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .6rem;
    padding-top: .5rem;
    border-top: 1px dashed var(--rz-border-color, #e2e8f0);
}
.sen-estudante-info { flex: 1; min-width: 0; }
.sen-estudante-topo {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem .6rem;
    margin-bottom: .5rem;
    font-size: .95rem;
}
.sen-estudante-muted { color: var(--rz-text-secondary-color, #64748b); font-style: italic; }
.sen-estudante-linha { font-size: .88rem; }
.sen-estudante-dados {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: .28rem .9rem;
}
.sen-estudante-dados > div { display: flex; gap: .55rem; font-size: .86rem; line-height: 1.35; }
.sen-estudante-dados dt {
    flex: 0 0 100px;
    color: var(--rz-text-secondary-color, #64748b);
    text-transform: uppercase;
    letter-spacing: .03em;
    font-size: .72rem;
    white-space: nowrap;
    padding-top: .12rem;
}
.sen-estudante-dados dd { margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sen-estudante-divida { color: #c81414; font-weight: 700; }

@media (max-width: 560px) {
    .sen-estudante-card { flex-direction: column; }
    .sen-estudante-dados > div { flex-direction: column; gap: .05rem; }
    .sen-estudante-dados dt { flex-basis: auto; }
}

.sen-fila { display: flex; flex-direction: column; gap: .5rem; }

.sen-fila-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--rz-base-background-color, #fff);
    border: 1px solid var(--rz-border-color, #e2e8f0);
    border-radius: 10px;
    padding: .6rem .9rem;
}

.sen-fila-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0b2e59;
    min-width: 90px;
    text-align: center;
    letter-spacing: .03em;
}

.sen-fila-num.prio { color: #b9860b; }

.sen-fila-info { flex: 1; min-width: 0; }
.sen-fila-servico { font-weight: 600; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.sen-fila-pessoa { font-size: .85rem; color: var(--rz-text-secondary-color, #64748b); display: flex; gap: .75rem; flex-wrap: wrap; }
.sen-fila-pessoa .muted { font-style: italic; }

.sen-fila-acoes { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 640px) {
    .sen-fila-row { flex-wrap: wrap; }
    .sen-fila-acoes { width: 100%; justify-content: flex-start; }
}

/* ============================================================
   Admin (GestaoServicos / GestaoContas)
   ============================================================ */

.sen-inline-switch {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 500;
}

.sen-chips { display: flex; flex-wrap: wrap; gap: .5rem; }

.sen-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: var(--rz-base-200, #eef2f7);
    border: 1px solid var(--rz-border-color, #dbe2ea);
    border-radius: 999px;
    padding: .2rem .35rem .2rem .75rem;
    font-size: .88rem;
}

.sen-servico-block {
    border: 1px solid var(--rz-border-color, #e2e8f0);
    border-radius: 10px;
    padding: .8rem 1rem;
    margin-top: .75rem;
}

.sen-servico-block-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .5rem;
}

.sen-servico-tag {
    font-size: .72rem;
    background: var(--rz-base-200, #eef2f7);
    border-radius: 999px;
    padding: 2px 8px;
    color: var(--rz-text-secondary-color, #64748b);
}

.sen-servico-empty { color: var(--rz-text-secondary-color, #94a3b8); font-size: .88rem; }

/* Histórico de atendimentos (A7) */
.sen-hist-registo {
    margin-top: .4rem;
    padding: .5rem .7rem;
    background: var(--rz-base-100, #f7f9fc);
    border: 1px solid var(--rz-border-color, #e2e8f0);
    border-radius: 8px;
    font-size: .85rem;
    line-height: 1.45;
}

.sen-hist-registo > div { margin: .1rem 0; }

/* Ditado por voz no registo de atendimento (A5) */
.sen-ditado-conversa {
    border: 1px dashed var(--rz-border-color, #cbd5e1);
    border-radius: 8px;
    padding: .6rem .7rem;
    background: var(--rz-base-50, #fbfcfe);
}

.sen-ditado-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .4rem;
    flex-wrap: wrap;
}

.sen-ditado-head > span { display: flex; gap: .4rem; flex-wrap: wrap; }

/* Contadores de hoje no painel do atendente */
.sen-contadores { display: flex; flex-direction: column; gap: .3rem; }

.sen-contador-item {
    display: flex;
    gap: .75rem;
    align-items: baseline;
    flex-wrap: wrap;
    font-size: .9rem;
}

.sen-contador-nome { font-weight: 600; min-width: 180px; }
.sen-contador-vals { color: var(--rz-text-secondary-color, #475569); }
.sen-contador-sep { margin: 0 .4rem; color: var(--rz-border-color, #cbd5e1); }

/* ============================================================
   Monitor "site" (/senhas/monitor-site) — aspeto institucional:
   fundo branco, logótipo, faixa de notícias, senhas em baixo.
   Isolado do monitor atual (.sen-mon-*), que não é alterado.
   ============================================================ */
/* O monitor "site" ocupa o ecrã todo — sem o enquadramento centrado do kiosk. */
.sen-kiosk-root:has(> .sen-monsite) {
    padding: 0;
    display: block;
    background: #ffffff;
    overflow: hidden;
}

.sen-monsite {
    width: 100%;
    height: 100dvh;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    background: #ffffff;
    color: #15161a;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

/* Fonte de marca — só nas telas públicas pedidas: kiosk, acompanhar, monitor "site".
   O /senhas/monitor e o /senhas/marcar mantêm a fonte por omissão (Segoe UI). */
.sen-kiosk.sen-font-brand,
.sen-monsite.sen-font-brand,
.sen-monfooter.sen-font-brand {
    font-family: Gotham, Montserrat, Arial, sans-serif;
}

/* cabeçalho */
.sen-monsite-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem 1.6rem;
    border-bottom: 1px solid #e4e0d8;
}
.sen-monsite-top img { height: 96px; width: auto; background: transparent; }
.sen-monsite-clock { text-align: right; font-variant-numeric: tabular-nums; }
.sen-monsite-clock .t { font-size: 1.9rem; font-weight: 800; letter-spacing: .02em; line-height: 1; color: #0b2e59; }
.sen-monsite-clock .d { font-size: .95rem; color: #5c6167; text-transform: capitalize; margin-top: .2rem; }
.sen-monsite-clock .d::first-letter { text-transform: uppercase; }

/* faixa de notícias */
.sen-monsite-news {
    position: relative;
    background: #f6f4f0;
    border-bottom: 1px solid #e4e0d8;
    padding: 1.5rem 2.4rem;
    display: grid;
    grid-template-columns: minmax(0, 34%) 1fr;
    gap: 1.9rem;
    align-items: stretch;
    min-height: 26vh;
    max-height: 32vh;
    overflow: hidden;
}
.sen-monsite-news-eyebrow {
    position: absolute;
    top: 1.5rem;
    right: 2.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: .74rem;
    color: #5c6167;
}
.sen-monsite-news-eyebrow b { color: #8a0413; }

.sen-monsite-thumb {
    border-radius: 14px;
    background: #d6001c;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sen-monsite-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sen-monsite-thumb .ph {
    color: #fff;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: .8rem;
    opacity: .9;
    text-align: center;
    padding: 1rem;
}

.sen-monsite-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .55rem;
    padding-right: 2rem;
}
.sen-monsite-copy .headline {
    margin: 0;
    font-size: clamp(1.4rem, 2.5vw, 2.3rem);
    font-weight: 800;
    line-height: 1.14;
    color: #15161a;
    max-width: 30ch;
}
.sen-monsite-copy .resumo {
    font-size: 1rem;
    color: #5c6167;
    line-height: 1.4;
    max-width: 60ch;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sen-monsite-copy .meta { font-size: .95rem; color: #8a0413; font-weight: 600; }

.sen-monsite-dots { position: absolute; right: 2.4rem; bottom: 1.2rem; display: flex; gap: .45rem; }
.sen-monsite-dots i { width: 9px; height: 9px; border-radius: 50%; background: #e4e0d8; display: block; transition: background .2s; }
.sen-monsite-dots i.on { background: #d6001c; }

/* zona das senhas */
.sen-monsite-tickets {
    padding: 1rem 1.2rem .8rem;
    display: flex;
    flex-direction: column;
    gap: .8rem;
    min-height: 0;
    overflow: hidden;
}
.sen-monsite-zone {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .2em;
    font-size: .82rem;
    color: #5c6167;
    display: flex;
    align-items: center;
    gap: .8rem;
}
.sen-monsite-zone::after { content: ""; flex: 1; height: 1px; background: #e4e0d8; }
.sen-monsite-zone em { font-style: italic; font-weight: 500; opacity: .7; letter-spacing: .08em; }

.sen-monsite-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #8b98a5;
    gap: .3rem;
}
.sen-monsite-empty span { font-size: 1.2rem; font-style: italic; opacity: .8; }

.sen-monsite-grid {
    display: grid;
    /* fullscreen 1080p → 4 cartões lado a lado, a ocupar toda a largura */
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: min-content;
    gap: 1rem;
    align-content: start;
    overflow-y: auto;
    min-height: 0;
}
@media (max-width: 1400px) { .sen-monsite-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .sen-monsite-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .sen-monsite-grid { grid-template-columns: 1fr; } }

.sen-monsite-panel {
    border: 1px solid #e4e0d8;
    border-radius: 14px;
    background: #ffffff;
    padding: 1.3rem 1.1rem 1.1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-width: 0;
    min-height: 280px;
}
.sen-monsite-panel .svc {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: 1.35rem;
    color: #5c6167;
}
.sen-monsite-panel .svc em {
    display: block;
    font-style: italic;
    font-weight: 500;
    font-size: 1.2rem;
    opacity: .72;
    letter-spacing: .06em;
}
.sen-monsite-panel .num {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    font-size: clamp(2.3rem, 4.1vw, 4.1rem);
    line-height: 1.02;
    letter-spacing: .02em;
    color: #0b2e59;
    overflow-wrap: anywhere;
}
.sen-monsite-panel .num.prio { color: #b9860b; }
.sen-monsite-panel .num.idle { color: #dfe3e8; }
.sen-monsite-panel .estado {
    margin-top: .15rem;
    padding: .25rem .85rem;
    border: 1.5px solid #0b2e59;
    border-radius: 999px;
    background: transparent;
    color: #0b2e59;
    font-size: .86rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    line-height: 1.35;
}
.sen-monsite-panel .estado em {
    font-style: italic;
    font-weight: 500;
    text-transform: none;
    letter-spacing: .04em;
    opacity: .7;
    margin-left: .4rem;
}
.sen-monsite-panel .prev {
    margin-top: .45rem;
    padding-top: .5rem;
    border-top: 1px solid #e4e0d8;
    width: 100%;
    font-size: 1rem;
    color: #5c6167;
}
.sen-monsite-panel .prev b {
    display: block;
    font-weight: 700;
    letter-spacing: .06em;
    font-size: .88rem;
    text-transform: uppercase;
    margin-bottom: .2rem;
    opacity: .85;
}

.sen-monsite-panel.is-calling { animation: sen-mon-call .6s linear infinite; }
.sen-monsite-panel.is-calling .svc,
.sen-monsite-panel.is-calling .svc em,
.sen-monsite-panel.is-calling .num,
.sen-monsite-panel.is-calling .num.prio,
.sen-monsite-panel.is-calling .num.idle,
.sen-monsite-panel.is-calling .estado,
.sen-monsite-panel.is-calling .estado em,
.sen-monsite-panel.is-calling .prev,
.sen-monsite-panel.is-calling .prev b { color: inherit; }
.sen-monsite-panel.is-calling .estado { border-color: currentColor; }
.sen-monsite-panel.is-calling .prev { border-top-color: currentColor; }

/* rodapé */
.sen-monsite-foot {
    padding: .65rem 2.4rem;
    border-top: 1px solid #e4e0d8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .82rem;
    color: #5c6167;
}
.sen-monsite-foot .wm { font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.sen-monsite-foot .legend { display: flex; gap: 1.4rem; }
.sen-monsite-foot .legend span { display: flex; align-items: center; gap: .4rem; }
.sen-monsite-foot .sw { width: 12px; height: 12px; border-radius: 3px; background: #0b2e59; display: inline-block; }
.sen-monsite-foot .sw.prio { background: #b9860b; }

@media (prefers-reduced-motion: reduce) {
    .sen-monsite-panel.is-calling {
        animation: none;
        background: #c81414;
        border-color: #c81414;
        color: #ffffff;
    }
    .sen-monsite-panel.is-calling .svc,
    .sen-monsite-panel.is-calling .svc em,
    .sen-monsite-panel.is-calling .num,
    .sen-monsite-panel.is-calling .num.prio,
    .sen-monsite-panel.is-calling .prev,
    .sen-monsite-panel.is-calling .prev b { color: #ffffff; }
    .sen-monsite-panel.is-calling .estado { border-color: #ffffff; color: #ffffff; }
}

/* Monitor "site" — carrossel de notícias incorporado (iframe do site da faculdade) */
.sen-monsite-embed {
    position: relative;
    background: #ffffff;
    border-bottom: 1px solid #e4e0d8;
    overflow: hidden;
}
.sen-monsite-embed iframe {
    position: absolute;
    left: 0;
    border: 0;
    height: 1400px;
    transform-origin: top left;
    pointer-events: none;
}

/* ============================================================
   Monitor "footer" (/senhas/monitor-footer) — faixa mínima só com
   a área das senhas/tickets, para compor por baixo de outro ecrã:
   sem logótipo, relógio, notícias nem rodapé. Fundo preto, texto
   branco por omissão; a piscar, só o texto alterna branco/vermelho
   (o fundo mantém-se preto). Duas constantes distintas para a cor
   de fundo da página e a da área das senhas (mesmo valor hoje, mas
   ajustáveis em separado).
   ============================================================ */
:root {
    --mf-bg-page: #000000;
    --mf-bg-ticket: #000000;
}

.sen-kiosk-root:has(> .sen-monfooter) {
    padding: 0;
    display: block;
    background: var(--mf-bg-page);
    overflow: hidden;
}

.sen-monfooter {
    width: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;   /* área das senhas encostada ao topo */
    background: var(--mf-bg-page);
    color: #ffffff;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    box-sizing: border-box;
}

.sen-monfooter-tickets {
    background: var(--mf-bg-ticket);
    padding: 1.5rem 1.5rem 1.25rem;
    box-sizing: border-box;
}

.sen-monfooter-zone {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .2em;
    font-size: .82rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: 1rem;
}
.sen-monfooter-zone::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.3); }

.sen-monfooter-empty {
    text-align: center;
    font-size: 1.6rem;
    color: #9aa4ad;
    padding: 2rem 0;
}
.sen-monfooter-empty span { display: block; font-size: 1.1rem; font-style: italic; opacity: .7; margin-top: .2rem; }

.sen-monfooter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: min-content;
    gap: 1rem;
    align-content: start;
}
@media (max-width: 1400px) { .sen-monfooter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .sen-monfooter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .sen-monfooter-grid { grid-template-columns: 1fr; } }

.sen-monfooter-panel {
    background: var(--mf-bg-ticket);
    border: 3px solid rgba(255,255,255,.55);
    border-radius: 14px;
    padding: 1rem .9rem .9rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    min-width: 0;
    color: #ffffff;
}
.sen-monfooter-panel .svc {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: .82rem;
    color: #ffffff;
    opacity: .85;
}
.sen-monfooter-panel .svc em {
    display: block;
    font-style: italic;
    font-weight: 500;
    font-size: .76rem;
    opacity: .6;
    letter-spacing: .06em;
}
.sen-monfooter-panel .num {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    font-size: clamp(1.9rem, 3.4vw, 3.4rem);
    line-height: 1.02;
    letter-spacing: .02em;
    color: #ffffff;
    overflow-wrap: anywhere;
}
.sen-monfooter-panel .num.prio { color: #d4a72c; }
.sen-monfooter-panel .num.idle { color: rgba(255,255,255,.25); }
.sen-monfooter-panel .estado {
    margin-top: .15rem;
    padding: .15rem .65rem;
    border: 1.5px solid rgba(255,255,255,.6);
    border-radius: 999px;
    background: transparent;
    color: #ffffff;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    line-height: 1.35;
}
.sen-monfooter-panel .estado em {
    font-style: italic;
    font-weight: 500;
    text-transform: none;
    letter-spacing: .04em;
    opacity: .7;
    margin-left: .4rem;
}
.sen-monfooter-panel .prev {
    margin-top: .35rem;
    padding-top: .4rem;
    border-top: 1px solid rgba(255,255,255,.14);
    width: 100%;
    font-size: .82rem;
    color: rgba(255,255,255,.7);
}
.sen-monfooter-panel .prev b {
    display: block;
    font-weight: 700;
    letter-spacing: .06em;
    font-size: .74rem;
    text-transform: uppercase;
    margin-bottom: .15rem;
    opacity: .85;
}

/* Piscar: o bilhete alterna fundo branco/texto preto ↔ fundo vermelho/texto branco;
   ao terminar (classe removida), volta ao normal (--mf-bg-ticket / texto branco). */
.sen-monfooter-panel.is-calling { animation: sen-monfooter-call .6s linear infinite; }
.sen-monfooter-panel.is-calling .svc,
.sen-monfooter-panel.is-calling .svc em,
.sen-monfooter-panel.is-calling .num,
.sen-monfooter-panel.is-calling .num.prio,
.sen-monfooter-panel.is-calling .num.idle,
.sen-monfooter-panel.is-calling .estado,
.sen-monfooter-panel.is-calling .estado em,
.sen-monfooter-panel.is-calling .prev,
.sen-monfooter-panel.is-calling .prev b { color: inherit; opacity: 1; }
.sen-monfooter-panel.is-calling .estado { border-color: currentColor; }
.sen-monfooter-panel.is-calling .prev { border-top-color: currentColor; }

@keyframes sen-monfooter-call {
    0%, 49%, 100% { background: #ffffff; color: #000000; }
    50%, 99%      { background: #c81414; color: #ffffff; }
}
@media (prefers-reduced-motion: reduce) {
    .sen-monfooter-panel.is-calling { animation: none; background: #c81414; color: #ffffff; }
}
