@font-face {
    font-family: "Days One";
    src: url("../fonts/DaysOne-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --raiz-blue: #00a9ff;
    --raiz-orange: #ff6600;
    --raiz-yellow: #ffd42a;
    --raiz-green: #3f4f36;
    --bg: #0f1410;
    --bg-elev: #161c14;
    --bg-card: #1c2419;
    --bg-input: #0c100c;
    --bg-soft: #121812;
    --header-bg: rgba(15, 20, 16, 0.9);
    --footer-bg: #0a0e0a;
    --nav-panel: #121812;
    --line: rgba(255, 255, 255, 0.08);
    --text: #f4f7f2;
    --muted: #a8b5a0;
    --gold: #ff6600;
    --gold-2: #00a9ff;
    --gold-dim: rgba(255, 102, 0, 0.16);
    --btn-text: #fff;
    --danger: #f87171;
    --ok: #4ade80;
    --hero-glow: rgba(0, 169, 255, 0.18);
    --hero-base: linear-gradient(135deg, #0f1410 0%, #1a2520 45%, #0f1410 100%);
    --thumb-empty: repeating-linear-gradient(135deg, #1a2418 0 12px, #151d13 12px 24px);
    --slide-dim: brightness(0.38) saturate(0.85);
    --slide-overlay: linear-gradient(
        180deg,
        rgba(15, 20, 16, 0.42) 0%,
        rgba(15, 20, 16, 0.55) 42%,
        rgba(15, 20, 16, 0.9) 100%
    );
    --radius: 14px;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    --header: 80px;
    --font-body: "Outfit", "Nunito", system-ui, -apple-system, sans-serif;
    --font-display: "Days One";
    --slogan-grad: linear-gradient(135deg, #00a9ff 0%, #ffd42a 50%, #ff6600 100%);
    --nav-link-active-bg: color-mix(in srgb, var(--text) 14%, var(--nav-panel));
    --nav-link-active-text: var(--text);
    --nav-link-hover-bg: color-mix(in srgb, var(--text) 7%, var(--nav-panel));
    --nav-link-sub-bg: color-mix(in srgb, var(--text) 5%, var(--nav-panel));
    --nav-link-sub-active-bg: color-mix(in srgb, var(--text) 11%, var(--nav-panel));
    --nav-summary-active-bg: color-mix(in srgb, var(--text) 9%, var(--nav-panel));
    --atl-dock-h: 0px;
    --atl-kb-inset: 0px;
    --atl-kb-lift: 0px;
    --atl-save-dock-gap: 5px;
    --atl-save-float-bottom: 0px;
    /* Standard geral (só altura): botões descem à altura dos campos */
    --control-h: 32px;
    --control-h-dense: 32px;
    /* Campos data: largura mínima dos dígitos (não usar em type=month / AAAA-MM) */
    --atl-date-w: calc(10ch + 2.85rem);
    --atl-date-text-w: calc(10ch + 3.45rem);
    --atl-datetime-w: calc(16ch + 2.85rem);
    --atl-table-row-odd: var(--bg-elev);
    --atl-table-row-even: color-mix(in srgb, var(--footer-bg) 62%, var(--bg-elev));
}

html[data-theme="light"] {
    --bg: #f7faf5;
    --bg-elev: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #f4f7f2;
    --bg-soft: #e8f0e4;
    --header-bg: rgba(247, 250, 245, 0.92);
    --footer-bg: #eef3ea;
    --nav-panel: #ffffff;
    --line: rgba(63, 79, 54, 0.12);
    --text: #3f4f36;
    --muted: #5f6f58;
    --gold: #ff6600;
    --gold-2: #0090d9;
    --gold-dim: rgba(255, 102, 0, 0.12);
    --btn-text: #ffffff;
    --danger: #b91c1c;
    --ok: #15803d;
    --hero-glow: rgba(0, 169, 255, 0.12);
    --hero-base: linear-gradient(135deg, #f7faf5 0%, #e8f4ff 50%, #fff8e8 100%);
    --thumb-empty: repeating-linear-gradient(135deg, #e8f0e4 0 12px, #dde8d8 12px 24px);
    --slide-dim: brightness(0.58) saturate(0.95);
    --slide-overlay: linear-gradient(
        180deg,
        rgba(247, 250, 245, 0.48) 0%,
        rgba(247, 250, 245, 0.62) 42%,
        rgba(247, 250, 245, 0.92) 100%
    );
    --shadow: 0 16px 36px rgba(63, 79, 54, 0.08);
    --slogan-grad: linear-gradient(135deg, #0090d9 0%, #e6b800 55%, #e65c00 100%);
    --nav-link-active-bg: color-mix(in srgb, var(--gold) 14%, var(--bg-soft));
    --nav-link-active-text: var(--raiz-green);
    --nav-link-hover-bg: color-mix(in srgb, var(--text) 6%, var(--bg-soft));
    --nav-link-sub-bg: color-mix(in srgb, var(--text) 4%, var(--bg-soft));
    --nav-link-sub-active-bg: color-mix(in srgb, var(--gold) 11%, var(--bg-soft));
    --nav-summary-active-bg: color-mix(in srgb, var(--text) 5%, var(--bg-soft));
    --atl-table-row-odd: var(--bg-elev);
    --atl-table-row-even: color-mix(in srgb, var(--text) 11%, var(--bg-elev));
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--gold-2);
}

a.btn:hover,
a.btn:focus-visible {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    background: var(--gold);
    color: var(--btn-text);
    padding: 0.5rem 0.8rem;
    z-index: 100;
}

.skip-link:focus {
    top: 0.5rem;
}

.container {
    width: min(1180px, calc(100% - 2rem));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: var(--header);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text);
}

.brand-mark {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    color: var(--gold);
    border-bottom: 3px solid var(--gold);
}

.brand-raiz {
    font-family: var(--font-display);
    font-weight: 400;
}

.brand-logo {
    flex-shrink: 0;
}

.brand-logo-img {
    height: 48px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.brand-logo-footer {
    height: 56px;
    max-width: 200px;
}

.brand-logo-admin {
    height: 40px;
    max-width: 140px;
}

.badge-featured {
    background: var(--gold-dim);
    color: var(--gold-2);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-text strong {
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.brand-text small {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    margin-left: auto;
}

.site-nav a {
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: uppercase;
    color: var(--muted);
}

.site-nav a.is-active,
.site-nav a:hover {
    color: var(--text);
}

.site-nav a.nav-admin {
    color: var(--gold);
}

.site-nav a.nav-admin:hover {
    color: var(--gold-2);
}

.site-nav a.nav-pais {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.15rem;
    padding: 0.28rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--gold);
    background: var(--gold);
    color: #fff;
    text-decoration: none;
    line-height: 1.2;
}

.site-nav a.nav-pais:hover,
.site-nav a.nav-pais:focus-visible,
.site-nav a.nav-pais.is-active {
    background: color-mix(in srgb, var(--gold) 78%, #000);
    border-color: color-mix(in srgb, var(--gold) 78%, #000);
    color: #fff;
}

.header-phone {
    font-weight: 600;
    color: var(--gold);
    white-space: nowrap;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.15;
    gap: 0.12rem;
}

.whatsapp-link {
    color: #25d366;
    font-weight: 600;
}

.whatsapp-link:hover {
    color: #1ebe57;
}

html[data-theme="light"] .whatsapp-link {
    color: #128c7e;
}

html[data-theme="light"] .whatsapp-link:hover {
    color: #075e54;
}

.atl-wa-field {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    max-width: 100%;
}
.atl-wa-field input {
    flex: 1 1 auto;
    min-width: 0;
}
.atl-wa-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    color: #25d366;
    text-decoration: none;
    border-radius: 0.35rem;
}
.atl-wa-link:hover {
    color: #1ebe57;
}
.atl-wa-link[hidden] {
    display: none !important;
}
.atl-wa-icon {
    width: 1.35rem;
    height: 1.35rem;
    display: block;
}
.atl-wa-value {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}
html[data-theme="light"] .atl-wa-link {
    color: #128c7e;
}
html[data-theme="light"] .atl-wa-link:hover {
    color: #075e54;
}

.call-note {
    display: inline;
    font-weight: 400;
    font-size: 0.72rem;
    letter-spacing: 0.01em;
    color: var(--muted);
    white-space: normal;
}

.header-phone .call-note {
    display: block;
    max-width: 14rem;
    text-align: right;
    font-size: 0.62rem;
    text-transform: none;
    letter-spacing: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.admin-side-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.admin-side-top .brand-logo {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
}

.admin-side-top .brand-logo-img {
    height: 84px;
    max-height: 96px;
    max-width: 200px;
    width: auto;
}

.admin-title {
    font-family: var(--font-body);
    font-weight: 600;
    margin: 0 0 1rem;
    letter-spacing: normal;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}
.admin-title--responsive .admin-title-long {
    display: none;
}
@media (min-width: 860px) {
    .admin-title--responsive .admin-title-short {
        display: none;
    }
    .admin-title--responsive .admin-title-long {
        display: inline;
    }
}

.admin-toolbar {
    margin: 0 0 1.2rem;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
}

.admin-inline-form {
    margin: 0;
    display: inline-flex;
}

.filter-search-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.admin-result-count {
    margin: 0 0 0.8rem;
    font-size: 0.9rem;
}

.label-short {
    display: none;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.2rem;
}

/* Pares Guardar/Voltar: mesma largura em desktop (mobile reforça no media query) */
.admin-body .form-actions:has(> :nth-child(2)):not(:has(> .btn-icon)) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    max-width: 100%;
}

.admin-body .form-actions:not(:has(> :nth-child(2))) {
    grid-template-columns: 1fr;
}

.admin-body .form-actions:has(> :nth-child(2)):not(:has(> .btn-icon)) .btn {
    width: 100%;
    min-width: 0;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
}

.admin-body .form-actions:has(> .btn-icon) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.admin-body .form-actions:has(> .btn-icon) .btn-icon {
    flex: 0 0 auto;
    width: 132px;
}

.admin-body .form-actions:has(> .btn-icon) .btn:not(.btn-icon) {
    width: auto;
    flex: 0 1 auto;
}

.admin-form-narrow {
    max-width: 420px;
}

.admin-settings-page {
    max-width: 42rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.admin-settings-page .admin-form,
.admin-settings-page .admin-import-panel {
    max-width: none;
    width: 100%;
}

.admin-settings-page .form-grid-2 {
    display: grid;
    gap: 0.75rem 1rem;
}

@media (min-width: 640px) {
    .admin-settings-page .form-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.admin-form-section {
    margin: 1.4rem 0 0;
}

.admin-help {
    margin: 0.45rem 0 0;
    font-size: 0.88rem;
    line-height: 1.45;
}

.admin-steps {
    margin: 0.75rem 0 0;
    padding-left: 1.2rem;
}

.admin-steps li {
    margin: 0.35rem 0;
}

.atl-email-preview {
    margin: 0.5rem 0 0;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg, #fff);
    font-size: 0.92rem;
    line-height: 1.45;
}

.atl-email-preview p {
    margin: 0.4rem 0;
}

.admin-advanced {
    margin: 1rem 0 0;
    padding: 0.8rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-elev);
}

.admin-advanced summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
}

.admin-subtitle {
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: normal;
    font-size: 1.15rem;
    margin: 0 0 0.5rem;
}

.admin-import-panel {
    margin-top: 1.4rem;
    padding: 1.1rem 1.2rem 1.2rem;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.admin-import-panel .form-actions {
    margin-top: 0.9rem;
}

.url-field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    max-width: 52rem;
}

.url-field-row .url-field {
    flex: 1 1 16rem;
    min-width: 0;
    max-width: none;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.admin-service-row {
    margin: 0 0 1rem;
    padding: 0;
    border: 0;
}

.import-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    place-items: center;
    padding: 1rem;
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: blur(8px);
}

.import-overlay.is-open,
.import-overlay:not([hidden]) {
    display: grid;
}

.import-overlay[hidden] {
    display: none !important;
}

.import-overlay-card {
    width: min(420px, 100%);
    padding: 1.4rem 1.3rem 1.3rem;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.import-overlay-kicker {
    margin: 0.85rem 0 0.35rem;
    color: var(--gold);
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 600;
}

.import-inline-status {
    margin: 0.85rem 0 0;
    font-weight: 600;
    color: var(--gold);
}

.import-spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto;
    border: 3px solid var(--line);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: import-spin 0.8s linear infinite;
}

@keyframes import-spin {
    to {
        transform: rotate(360deg);
    }
}

.status-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg-elev);
    color: var(--muted);
    margin: 0.15rem 0.25rem 0.15rem 0;
}

.status-pill.is-featured {
    color: var(--gold);
    border-color: color-mix(in srgb, var(--gold) 35%, transparent);
    background: var(--gold-dim);
}

.status-pill.is-draft {
    opacity: 0.85;
}

.admin-table td {
    vertical-align: middle;
}

.admin-table td form {
    display: inline;
}

/* Listas/quadros: zebra — 1.ª linha mais clara, seguinte um pouco mais escura */
.admin-table tbody tr:nth-child(odd) {
    background: var(--atl-table-row-odd);
}
.admin-table tbody tr:nth-child(even) {
    background: var(--atl-table-row-even);
}

.admin-table tr.is-unread,
.admin-table tbody tr.is-unread {
    background: var(--gold-dim);
}

.admin-table tbody tr.atl-test-nearest {
    background: color-mix(in srgb, var(--gold) 10%, var(--bg-elev, #fff));
    box-shadow: inset 3px 0 0 var(--gold);
}

.admin-table tbody tr.atl-test-nearest.is-unread {
    background: color-mix(in srgb, var(--gold) 14%, var(--gold-dim));
}

.sort-link {
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.sort-link:hover,
.sort-link.is-active {
    color: var(--gold);
}

.admin-filters {
    display: grid;
    gap: 0.9rem;
    margin: 0 0 1.2rem;
    padding: 1rem;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.filter-search {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.filter-search input[type="search"] {
    flex: 1 1 220px;
    min-width: 0;
}

.filter-search select {
    flex: 0 1 220px;
    min-width: 160px;
}

.login-theme {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--text);
    margin: 6px 0;
}

.hero {
    position: relative;
    min-height: min(68vh, 620px);
    display: grid;
    place-items: center stretch;
    background:
        radial-gradient(ellipse at 20% 0%, var(--hero-glow), transparent 45%),
        var(--hero-base);
    overflow: hidden;
}

.hero-layout {
    width: min(1180px, calc(100% - 2rem));
    margin-inline: auto;
}

/* Destaques: copy e flyer em zonas separadas ÃÂ¢ÃÂÃÂ sem texto sobre tipografia do cartaz */
.hero.has-slides {
    min-height: 0;
    padding: 2.4rem 0 2.6rem;
    place-items: center stretch;
}

.hero.has-slides .hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 1.75rem 2.25rem;
    align-items: center;
    min-height: min(46vh, 440px);
}

.hero.has-slides .hero-copy {
    width: auto;
    max-width: 36rem;
    margin: 0;
    padding: 0.4rem 0 0.6rem;
}

.hero-media {
    position: relative;
    min-height: min(42vh, 400px);
    height: min(42vh, 400px);
    border-radius: calc(var(--radius) + 2px);
    overflow: hidden;
    background: var(--bg-elev);
    box-shadow: var(--shadow);
    isolation: isolate;
}

.hero.has-slides .slides {
    position: absolute;
    inset: 0;
}

.hero.has-slides .slides::after {
    content: none;
}

.hero.has-slides .slide img {
    object-fit: contain;
    object-position: center;
    filter: none;
    background: var(--bg-soft);
}

.slides {
    position: absolute;
    inset: 0;
}

.slides::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--slide-overlay);
    pointer-events: none;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
}

.slide.is-on {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 28%;
    filter: var(--slide-dim);
}

.hero-copy {
    position: relative;
    z-index: 2;
    padding: 5rem 0 4rem;
    width: min(1180px, calc(100% - 2rem));
    margin-inline: auto;
}

.hero:not(.has-slides) .hero-copy {
    width: min(1180px, calc(100% - 2rem));
}

.kicker {
    font-family: var(--font-body);
    color: var(--gold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.78rem;
    font-weight: 600;
    margin: 0 0 0.8rem;
}

/* Eyebrow "RAIZ" no hero ÃÂ¢ÃÂÃÂ maior, ainda abaixo do slogan */
.hero .hero-copy > .kicker {
    font-size: clamp(1.25rem, 3.2vw, 1.9rem);
}

.page-hero h1,
.section-head h2 {
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: normal;
    line-height: 1.1;
    margin: 0 0 1rem;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6.4rem);
    max-width: 14ch;
}

.hero h1.slogan,
.slogan-footer {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.15;
    max-width: 16ch;
    background: var(--slogan-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero h1.slogan {
    font-size: clamp(2.1rem, 6vw, 4.4rem);
    margin-bottom: 1.1rem;
}

.slogan-line {
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: normal;
    color: var(--muted);
    font-size: clamp(1.1rem, 3vw, 1.35rem);
}

.slogan-footer {
    font-size: 1.05rem;
    max-width: none;
    margin: 0.35rem 0 0.6rem;
}

.lead {
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 38rem;
}

.hero-actions,
.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.8rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    height: var(--control-h);
    min-height: var(--control-h);
    padding: 0 1.05rem;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-sm {
    height: var(--control-h);
    min-height: var(--control-h);
    padding: 0 0.85rem;
    font-size: 0.86rem;
}

.btn-icon {
    min-width: 8.25rem;
    min-height: var(--control-h);
    width: 132px;
    height: var(--control-h);
    padding: 0;
    gap: 0;
}

.btn-icon.btn-sm {
    min-width: 6.75rem;
    min-height: var(--control-h);
    width: 108px;
    height: var(--control-h);
}

.btn-icon-compact {
    min-width: var(--control-h);
    width: var(--control-h);
    height: var(--control-h);
    min-height: var(--control-h);
}

.btn-icon-svg {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
    flex-shrink: 0;
}

.btn-icon-euro {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

.btn-icon.btn-sm .btn-icon-svg {
    width: 1.1rem;
    height: 1.1rem;
}

/* Botões: fundo claro, contorno e texto laranja (como «Sair») */
.btn-gold,
.btn-ghost {
    background: var(--bg-elev);
    border-color: var(--gold);
    color: var(--gold);
}

.btn-gold:hover,
.btn-gold:focus-visible,
.btn-ghost:hover,
.btn-ghost:focus-visible {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--btn-text, #fff);
}

a.btn-gold,
a.btn-ghost,
.prose a.btn-gold,
.prose a.btn-ghost {
    background: var(--bg-elev);
    border-color: var(--gold);
    color: var(--gold);
    text-decoration: none;
}

a.btn-gold:hover,
a.btn-gold:focus-visible,
.prose a.btn-gold:hover,
.prose a.btn-gold:focus-visible,
a.btn-ghost:hover,
a.btn-ghost:focus-visible,
.prose a.btn-ghost:hover,
.prose a.btn-ghost:focus-visible {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--btn-text, #fff);
    text-decoration: none;
}

html[data-theme="light"] .btn-gold,
html[data-theme="light"] a.btn-gold,
html[data-theme="light"] .prose a.btn-gold,
html[data-theme="light"] .btn-ghost,
html[data-theme="light"] a.btn-ghost,
html[data-theme="light"] .prose a.btn-ghost {
    background: #fff;
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: none;
}

html[data-theme="light"] .btn-gold:hover,
html[data-theme="light"] .btn-gold:focus-visible,
html[data-theme="light"] a.btn-gold:hover,
html[data-theme="light"] a.btn-gold:focus-visible,
html[data-theme="light"] .prose a.btn-gold:hover,
html[data-theme="light"] .prose a.btn-gold:focus-visible,
html[data-theme="light"] .btn-ghost:hover,
html[data-theme="light"] .btn-ghost:focus-visible,
html[data-theme="light"] a.btn-ghost:hover,
html[data-theme="light"] a.btn-ghost:focus-visible,
html[data-theme="light"] .prose a.btn-ghost:hover,
html[data-theme="light"] .prose a.btn-ghost:focus-visible {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
}

.btn-danger {
    border-color: var(--danger);
    background: #fff;
    color: var(--danger);
}

.btn-danger:hover,
.btn-danger:focus-visible {
    border-color: var(--danger);
    background: var(--danger);
    color: #fff;
}

html[data-theme="light"] .btn-danger,
html[data-theme="light"] a.btn-danger {
    background: #fff;
    color: var(--danger);
    border-color: var(--danger);
}

.pagination {
    margin: 1.4rem 0 0.4rem;
}

.pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
    align-items: center;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.4rem;
    min-height: 2.4rem;
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--bg-elev);
    color: var(--text);
    text-decoration: none;
    font-size: 0.92rem;
}

.pagination-link:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.pagination-link.is-active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--btn-text);
}

.pagination-link.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.pagination-ellipsis {
    padding: 0 0.2rem;
    color: var(--muted);
}

html[data-theme="light"] .pagination-link {
    border-color: color-mix(in srgb, var(--text) 22%, transparent);
    color: var(--text);
}

.img-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg-elev);
    color: var(--text);
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

html:not([data-theme="light"]) .theme-toggle .icon-sun,
html[data-theme="light"] .theme-toggle .icon-moon {
    display: block;
}

.slide-nav {
    position: absolute;
    left: 50%;
    bottom: 0.85rem;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: rgba(15, 20, 16, 0.42);
    backdrop-filter: blur(6px);
}

html[data-theme="light"] .slide-nav {
    background: rgba(255, 255, 255, 0.72);
}

/* Pintas do hero: classes dedicadas ÃÂ¢ÃÂÃÂ activo sempre sÃÂÃÂ³lido (nÃÂÃÂ£o sÃÂÃÂ³ outline) */
.hero-split .slide-dot,
.hero-media .slide-nav .slide-dot {
    box-sizing: border-box;
    width: 11px;
    height: 11px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.72);
    background-color: rgba(255, 255, 255, 0.22);
    background-image: none;
    box-shadow: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

html[data-theme="light"] .hero-split .slide-dot,
html[data-theme="light"] .hero-media .slide-nav .slide-dot {
    border-color: rgba(63, 79, 54, 0.45);
    background-color: rgba(63, 79, 54, 0.18);
}

.hero-split .slide-dot.is-on,
.hero-media .slide-nav .slide-dot.is-on,
html[data-theme="light"] .hero-split .slide-dot.is-on,
html[data-theme="light"] .hero-media .slide-nav .slide-dot.is-on {
    border-color: #ff6600;
    background-color: #ff6600;
    background-image: none;
    box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.35);
}

.hero-split .slide-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: rgba(15, 20, 16, 0.55);
    color: #fff;
    font-size: 1.65rem;
    line-height: 1;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.hero-split .slide-arrow:hover,
.hero-split .slide-arrow:focus-visible {
    background-color: #ff6600;
    outline: none;
}

.hero-split .slide-arrow:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.45);
}

.hero-split .slide-prev {
    left: 0.65rem;
}

.hero-split .slide-next {
    right: 0.65rem;
}

html[data-theme="light"] .hero-split .slide-arrow {
    background-color: rgba(255, 255, 255, 0.82);
    color: #1a2218;
    box-shadow: 0 1px 6px rgba(15, 20, 16, 0.12);
}

html[data-theme="light"] .hero-split .slide-arrow:hover,
html[data-theme="light"] .hero-split .slide-arrow:focus-visible {
    background-color: #ff6600;
    color: #fff;
}

.section {
    padding: 4.5rem 0;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-head h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.section-head p {
    color: var(--muted);
    margin: 0;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

.work-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.work-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 160, 23, 0.4);
    color: inherit;
}

.work-card .thumb {
    aspect-ratio: 4 / 3;
    background: var(--bg-soft);
    overflow: hidden;
}

.work-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-empty {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: var(--thumb-empty);
}

.work-card .body,
.service-card {
    padding: 1rem 1.1rem 1.2rem;
}

.badge {
    display: inline-block;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    background: var(--gold-dim);
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
}

.work-card h3 {
    margin: 0.45rem 0 0.2rem;
    font-size: 1.15rem;
}

.social-feed-card .social-feed-excerpt {
    margin: 0.35rem 0 0.15rem;
    font-size: 0.92rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-hero {
    padding: 4rem 0 2rem;
    background:
        radial-gradient(ellipse at 80% 0%, var(--hero-glow), transparent 40%);
    border-bottom: 1px solid var(--line);
}

.page-hero h1 {
    font-size: clamp(2.6rem, 6vw, 4.6rem);
}

.split {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    align-items: start;
}

.prose a:not(.btn) {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.prose a:not(.btn):hover {
    color: var(--gold-2);
}

.prose h2 {
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: normal;
    font-size: 1.45rem;
    margin: 2rem 0 0.7rem;
}

.prose ul {
    color: var(--muted);
    padding-left: 1.2rem;
}

.facts {
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem;
}

.facts dt {
    color: var(--gold);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 1rem;
}

.facts dt:first-child {
    margin-top: 0;
}

.facts dd {
    margin: 0.25rem 0 0;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.social-links-inline {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.social-icon {
    width: 1.15rem;
    height: 1.15rem;
    flex-shrink: 0;
}

.social-link-facebook:hover,
.social-link-facebook:focus-visible {
    color: var(--gold);
}

.social-link-instagram:hover,
.social-link-instagram:focus-visible {
    color: #e1306c;
}

.social-sep {
    color: var(--muted);
    user-select: none;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    min-height: 100%;
    display: block;
    color: inherit;
}

.service-card:hover {
    border-color: var(--gold);
    color: inherit;
}

.service-card h3 {
    margin: 0.2rem 0 0.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.7rem;
    letter-spacing: normal;
}

.service-items {
    list-style: none;
    margin: 0.6rem 0 0;
    padding: 0;
    color: var(--muted);
}

.service-items li {
    position: relative;
    padding: 0.22rem 0 0.22rem 1rem;
}

.service-items li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.75em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
}

.icon-dot {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--gold-dim);
    color: var(--gold);
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
    font-weight: 700;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.8rem;
}

.filter {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
}

.filter.is-active,
.filter:hover {
    border-color: var(--gold);
    color: var(--gold-2);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form,
.panel {
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem;
}

label {
    display: block;
    font-size: 0.86rem;
    margin: 0.9rem 0 0.35rem;
    color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="month"],
input[type="file"],
input[type="search"],
select {
    width: 100%;
    height: var(--control-h);
    min-height: var(--control-h);
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 0.8rem;
    box-sizing: border-box;
    line-height: 1.2;
}

/*
 * STANDARD — campos de data (site-wide)
 * Largura mínima para mostrar todos os dígitos:
 *   type=date / .atl-date → yyyy-mm-dd (nativo) ou dd-MM-yyyy (texto + calendário)
 *   type=datetime-local → yyyy-mm-ddThh:mm (mesmo desperdício, mesma norma)
 * Não aplicar a input[type=month] nem a selects de mês (AAAA-MM).
 * Altura: --control-h (32px). Cores: tema (--bg-input, --text, --line).
 * Em móvel: compactos na linha, sem ocupar a largura do ecrã.
 */
input[type="date"]:not(.atl-date-native),
input[type="datetime-local"],
.atl-date:not(.atl-date-field) {
    width: var(--atl-date-w);
    max-width: 100%;
    height: var(--control-h);
    min-height: var(--control-h);
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 0.45rem;
    box-sizing: border-box;
    line-height: 1.2;
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
}

input[type="datetime-local"] {
    width: var(--atl-datetime-w);
}

textarea {
    width: 100%;
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.7rem 0.8rem;
    box-sizing: border-box;
}

input[type="search"] {
    appearance: none;
    -webkit-appearance: none;
}

textarea {
    min-height: 140px;
    resize: vertical;
}

.check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: var(--muted);
}

.map-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    min-height: 240px;
}

.map-wrap iframe {
    width: 100%;
    height: 280px;
    border: 0;
    filter: grayscale(0.4) contrast(1.05);
}

.alert {
    padding: 0.8rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.alert-ok {
    background: rgba(74, 222, 128, 0.12);
    color: var(--ok);
}

.alert-error {
    background: rgba(248, 113, 113, 0.12);
    color: var(--danger);
}

.alert-warn {
    border: 1px solid #c05600;
    background: #fff3e0;
    color: #c05600;
}

.gallery {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 0.7rem;
}

.gallery-main,
.gallery-thumbs img,
.gallery-main img {
    border-radius: 12px;
    width: 100%;
    object-fit: cover;
}

.gallery-main {
    min-height: 420px;
    background: var(--bg-soft);
    overflow: hidden;
}

.gallery-main img {
    height: 100%;
    min-height: 420px;
}

.gallery-thumbs {
    display: grid;
    gap: 0.7rem;
}

.gallery-thumbs button {
    padding: 0;
    border: 1px solid transparent;
    background: none;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-thumbs button.is-on {
    border-color: var(--gold);
}

.gallery-thumbs img {
    height: 120px;
}

.work-meta {
    margin-top: 1.6rem;
}

.empty {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 2.4rem 0 1rem;
    background: var(--footer-bg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 1.4rem 2rem;
    margin-bottom: 1.1rem;
}

.footer-grid p {
    margin: 0.25rem 0;
}

.brand-footer {
    margin: 0 0 0.35rem;
}

.slogan-footer {
    margin: 0 0 0.35rem;
}

.footer-title {
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
}

.footer-bottom {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    border-top: 1px solid var(--line);
    padding-top: 0.75rem;
}

.footer-copy {
    margin: 0;
    text-align: center;
    line-height: 1.45;
}

.footer-sep {
    margin: 0 0.35rem;
    opacity: 0.7;
}

.footer-copy a {
    color: var(--muted);
}

.footer-copy a:hover {
    color: var(--gold);
}

.footer-copy a[href^="mailto:"] {
    color: var(--gold);
    font-weight: 600;
}

.muted {
    color: var(--muted);
}

.cookie-bar {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 50;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}

.cookie-bar[hidden] {
    display: none !important;
}

.cookie-bar p {
    margin: 0;
    color: var(--text);
    max-width: 52rem;
}

.cookie-bar .cookie-link {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.cookie-bar .cookie-link:hover {
    color: var(--gold-2);
}

body.modal-open {
    overflow: hidden;
}

.site-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.site-modal[hidden] {
    display: none !important;
}

.site-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 9, 11, 0.72);
    backdrop-filter: blur(4px);
}

html[data-theme="light"] .site-modal-backdrop {
    background: rgba(28, 32, 40, 0.45);
}

.site-modal-dialog {
    position: relative;
    width: min(420px, 100%);
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.35rem 1.3rem 1.2rem;
}

.site-modal-kicker {
    margin: 0 0 0.35rem;
    color: var(--gold);
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 600;
}

.site-modal-title {
    margin: 0 0 0.7rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.7rem;
    letter-spacing: normal;
}

.site-modal-text {
    margin: 0 0 1.3rem;
    color: var(--muted);
    line-height: 1.5;
}

.site-modal-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.atl-cleanup-dialog {
    width: min(520px, 100%);
}

.atl-reminder-dialog {
    width: min(720px, 100%);
    max-height: calc(100vh - 2rem);
    overflow: auto;
}

.atl-reminder-dialog .site-modal-title {
    margin-bottom: 0.4rem;
}

.atl-reminder-actions {
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.atl-reminder-actions-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.atl-cleanup-copy p {
    margin: 0 0 0.75rem;
}

.atl-cleanup-copy ul {
    margin: 0 0 0.85rem;
    padding-left: 1.15rem;
}

.atl-cleanup-copy li {
    margin: 0 0 0.3rem;
}

.admin-body {
    overflow-x: hidden;
    max-width: 100%;
}

.admin-shell {
    --admin-side-w: 260px;
    display: grid;
    grid-template-columns: var(--admin-side-w) minmax(0, 1fr);
    min-height: 100vh;
    max-width: 100%;
    overflow-x: hidden;
}

.admin-side {
    background: var(--nav-panel);
    border-right: 1px solid var(--line);
    padding: 1.4rem 1rem;
}

.admin-side nav,
.admin-side-nav {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin-top: 1.5rem;
}

.admin-nav-separator {
    border: 0;
    height: 1px;
    margin: 0.55rem 0.45rem;
    background: var(--line);
    opacity: 0.85;
}

.admin-side a,
.admin-side-nav a {
    padding: 0.37rem 0.75rem;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.admin-side-nav > a:not(.is-active):not([aria-current="page"]):not(.nav-logout):not(:hover) {
    opacity: 0.78;
}

.admin-side-nav a.is-active,
.admin-side-nav a[aria-current="page"],
.admin-side-nav > a.admin-nav-account.is-active,
.admin-side-nav > a.admin-nav-account[aria-current="page"] {
    background: var(--nav-link-active-bg);
    color: var(--nav-link-active-text);
    font-weight: 600;
    box-shadow: none;
}

.admin-side-nav a:not(.is-active):not([aria-current="page"]):not(.nav-logout):hover {
    background: var(--nav-link-hover-bg);
    color: var(--text);
}

.admin-side-nav a.admin-nav-account {
    font-weight: 500;
}

.admin-side a.nav-logout,
.admin-side-nav a.nav-logout {
    margin-top: 0.8rem;
    border: 1px solid var(--gold);
    color: var(--gold);
    font-weight: 600;
    justify-content: center;
    text-align: center;
}

.admin-side a.nav-logout:hover,
.admin-side-nav a.nav-logout:hover {
    background: var(--gold);
    color: var(--btn-text);
    border-color: var(--gold);
}

.admin-nav-group {
    margin: 0;
    border: 0;
}

.admin-nav-group-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.37rem 0.7rem;
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    font-weight: 600;
    user-select: none;
}

.admin-nav-group-summary::-webkit-details-marker {
    display: none;
}

.admin-nav-group-summary::after {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.15s ease;
    flex-shrink: 0;
    opacity: 0.7;
}

.admin-nav-group[open] > .admin-nav-group-summary::after {
    transform: rotate(-135deg);
    margin-top: 0.25rem;
}

.admin-nav-group:not([open]) > .admin-nav-group-summary:not(.is-active):not(:hover) {
    color: var(--muted);
    font-weight: 500;
    opacity: 0.82;
}

.admin-nav-group-summary:hover,
.admin-nav-group[open] > .admin-nav-group-summary {
    background: var(--nav-link-hover-bg);
    color: var(--text);
}

.admin-nav-group-summary.is-active {
    background: var(--nav-summary-active-bg);
    color: var(--text);
    font-weight: 600;
}

.admin-nav-sub {
    display: flex;
    flex-direction: column;
    gap: 0.23rem;
    margin: 0.23rem 0 0.17rem;
    padding: 0.1rem 0 0.1rem 0.55rem;
    border-left: 2px solid var(--line);
    margin-left: 0.85rem;
}

.admin-nav-sub a {
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    color: var(--muted);
    background: var(--nav-link-sub-bg);
    border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
    opacity: 1;
}

.admin-nav-sub a.is-active,
.admin-nav-sub a[aria-current="page"] {
    color: var(--nav-link-active-text);
    font-weight: 600;
    background: var(--nav-link-sub-active-bg);
    border-color: color-mix(in srgb, var(--gold) 30%, var(--line));
    box-shadow: none;
}

.admin-nav-sub a:not(.is-active):not([aria-current="page"]):hover {
    background: var(--nav-link-hover-bg);
    border-color: color-mix(in srgb, var(--line) 100%, transparent);
    color: var(--text);
}

.mobile-more-sheet .admin-nav-group {
    margin: 0.05rem 0;
}

.mobile-more-sheet .admin-nav-group-summary {
    padding: 0.28rem 0.45rem;
    border-radius: 8px;
    min-height: 2.25rem;
    box-sizing: border-box;
}

.mobile-more-sheet .admin-nav-sub {
    margin: 0.15rem 0 0.1rem;
    margin-left: 0.35rem;
    padding: 0.1rem 0 0.1rem 0.55rem;
    gap: 0.18rem;
}

.mobile-more-sheet .admin-nav-separator {
    margin: 0.35rem 0.2rem;
}

.mobile-more-sheet .admin-nav-account {
    display: block;
    padding: 0.3rem 0.7rem;
    border-radius: 10px;
    font-weight: 500;
    min-height: 2.25rem;
    box-sizing: border-box;
}

.mobile-more-sheet .admin-nav-sub a {
    padding: 0.25rem 0.65rem;
    min-height: 2.25rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
    background: var(--nav-link-sub-bg);
    opacity: 1;
}

.mobile-more-sheet .admin-nav-sub a.is-active,
.mobile-more-sheet .admin-nav-sub a[aria-current="page"] {
    border-color: color-mix(in srgb, var(--gold) 35%, var(--line));
    background: var(--nav-link-sub-active-bg);
    color: var(--nav-link-active-text);
    font-weight: 600;
}

.mobile-more-sheet .admin-nav-sub a:not(.is-active):not([aria-current="page"]):hover {
    background: var(--nav-link-hover-bg);
    border-color: color-mix(in srgb, var(--line) 100%, transparent);
    color: var(--text);
}

.mobile-more-sheet .admin-nav-group-summary.is-active {
    background: var(--nav-summary-active-bg);
    border-radius: 10px;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.admin-side-meta {
    margin-top: 2rem;
}
.admin-side-name {
    margin: 0 0 0.15rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
}
.admin-side-email {
    margin: 0;
    font-size: 0.85rem;
}
.admin-side-version {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    opacity: 0.85;
}

/* —— Menu lateral admin: colapso desktop (≥901px); expandido = aspecto original —— */
.admin-nav-item-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.admin-nav-label {
    min-width: 0;
    overflow-wrap: break-word;
}

.admin-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: inherit;
}

.admin-nav-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

/* Recolher menu: toggle visível iff .admin-side está visível (≥901px; oculto no dock móvel ≤900px). */
.admin-side-collapse-toggle {
    display: none;
}

@media (min-width: 901px) {
    .admin-shell {
        transition: grid-template-columns 0.22s ease;
    }

    .admin-shell.is-admin-nav-collapsed {
        --admin-side-w: 72px;
    }

    .admin-side {
        position: sticky;
        top: 0;
        align-self: stretch;
        display: flex;
        flex-direction: row;
        align-items: stretch;
        min-height: 100vh;
        max-height: 100vh;
        padding: 0;
        overflow-x: hidden;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .admin-side-panel {
        flex: 1 1 auto;
        min-width: 0;
        min-height: 100%;
        display: flex;
        flex-direction: column;
        padding: 1.4rem 0.35rem 1.4rem 1rem;
    }

    .admin-side-nav {
        flex: 1 1 auto;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-side-meta {
        flex-shrink: 0;
    }

    .admin-side-collapse-toggle {
        display: flex;
        flex-shrink: 0;
        align-self: stretch;
        align-items: center;
        justify-content: center;
        width: 13px;
        min-width: 13px;
        margin: 0;
        padding: 0;
        border: none;
        border-left: 1px solid var(--line);
        border-radius: 0 7px 7px 0;
        background: color-mix(in srgb, var(--gold) 14%, var(--nav-panel));
        color: color-mix(in srgb, var(--gold) 72%, var(--text));
        cursor: pointer;
        font-family: inherit;
        z-index: 3;
        transition: background 0.15s ease, color 0.15s ease;
    }

    .admin-side-collapse-chevron {
        flex-shrink: 0;
        width: 10px;
        height: 10px;
        transition: transform 0.22s ease;
    }

    .admin-side-collapse-toggle:hover,
    .admin-side-collapse-toggle:focus-visible {
        background: color-mix(in srgb, var(--gold) 22%, var(--nav-panel));
        color: var(--text);
        outline: none;
    }

    .admin-shell.is-admin-nav-collapsed .admin-side-collapse-chevron {
        transform: rotate(180deg);
    }

    .admin-shell.is-admin-nav-collapsed .admin-side-panel {
        padding: 1.1rem 0.2rem 1.1rem 0.55rem;
    }

    .admin-shell.is-admin-nav-collapsed .admin-side-top {
        flex-direction: column;
        align-items: center;
        gap: 0.45rem;
    }

    .admin-shell.is-admin-nav-collapsed .admin-side-top .brand-logo {
        align-items: center;
    }

    .admin-shell.is-admin-nav-collapsed .admin-side-top .brand-logo-img {
        height: 36px;
        max-height: 40px;
        max-width: 40px;
        object-fit: contain;
    }

    .admin-shell.is-admin-nav-collapsed .admin-side-top .brand-text {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .admin-shell.is-admin-nav-collapsed .admin-side-nav > a,
    .admin-shell.is-admin-nav-collapsed .admin-side-nav .admin-nav-group-summary,
    .admin-shell.is-admin-nav-collapsed .admin-side-nav .atl-pwa-install-menu {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        text-align: center;
    }

    .admin-shell.is-admin-nav-collapsed .admin-nav-item-inner {
        justify-content: center;
    }

    .admin-shell.is-admin-nav-collapsed .admin-nav-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .admin-shell.is-admin-nav-collapsed .admin-nav-group-summary::after {
        display: none;
    }

    .admin-shell.is-admin-nav-collapsed .admin-nav-separator {
        margin-left: auto;
        margin-right: auto;
        width: calc(100% - 0.5rem);
    }

    .admin-shell.is-admin-nav-collapsed .admin-side-meta {
        opacity: 0;
        height: 0;
        margin: 0;
        overflow: hidden;
        pointer-events: none;
    }

    .admin-shell.is-admin-nav-collapsed .admin-side-nav .admin-nav-sub {
        display: none;
    }

    .admin-shell.is-admin-nav-collapsed .admin-nav-group.is-flyout-open > .admin-nav-sub {
        display: flex;
        position: fixed;
        left: calc(var(--admin-side-w) + 6px);
        z-index: 120;
        min-width: 13rem;
        max-width: min(18rem, calc(100vw - var(--admin-side-w) - 16px));
        margin: 0;
        padding: 0.35rem 0.5rem 0.35rem 0.65rem;
        border-left: 2px solid var(--line);
        margin-left: 0;
        border-radius: var(--radius);
        border: 1px solid var(--line);
        background: var(--nav-panel);
        box-shadow: var(--shadow);
        flex-direction: column;
        gap: 0.23rem;
    }

    .admin-shell.is-admin-nav-collapsed [data-nav-tooltip]:hover::after,
    .admin-shell.is-admin-nav-collapsed [data-nav-tooltip]:focus-visible::after {
        content: attr(data-nav-tooltip);
        position: absolute;
        left: calc(100% + 10px);
        top: 50%;
        transform: translateY(-50%);
        z-index: 130;
        padding: 0.28rem 0.55rem;
        border-radius: 8px;
        background: var(--nav-panel);
        border: 1px solid var(--line);
        color: var(--text);
        font-size: 0.78rem;
        font-weight: 600;
        white-space: nowrap;
        box-shadow: var(--shadow);
        pointer-events: none;
    }

    .admin-shell.is-admin-nav-collapsed .admin-nav-group.is-flyout-open [data-nav-tooltip]:hover::after {
        display: none;
    }
}

.atl-user-row .atl-user-field {
    display: none;
    min-width: 8rem;
    max-width: 14rem;
    width: 100%;
    margin: 0;
}
.atl-user-row.is-editing .atl-user-display {
    display: none;
}
.atl-user-row.is-editing .atl-user-field {
    display: block;
}
.atl-user-row.is-editing .atl-user-field[type="text"],
.atl-user-row.is-editing .atl-user-field[type="email"] {
    min-width: 8rem;
    max-width: 14rem;
}
.atl-user-edit-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.admin-mobile-top {
    display: none;
}

.mobile-dock,
.mobile-more {
    display: none;
}

.admin-main {
    padding: 1.6rem;
    min-width: 0;
    max-width: 100%;
}

.table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.table-wrap > .admin-table {
    width: 100%;
    min-width: 100%;
}

.table-wrap > .admin-table th.atl-th-actions,
.table-wrap > .admin-table td.row-actions,
.table-wrap > .admin-table td.atl-col-actions,
.table-wrap > .admin-table td.cell-actions,
.table-wrap > .admin-table .atl-col-actions-sticky {
    width: 1%;
    white-space: nowrap;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 0.5rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    line-height: 1.3;
}

.admin-table:not(.atl-attendance-table) tbody td,
.atl-mini-table tbody td,
.atl-children-table tbody td {
    height: 2.25rem;
    padding-top: 0.12rem;
    padding-bottom: 0.12rem;
}

th {
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mini {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--bg-soft);
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.admin-table td .row-actions {
    align-items: center;
}

.admin-table td .row-actions form {
    display: inline-flex;
    margin: 0;
    align-items: center;
}

.row-actions .admin-inline-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.row-actions .btn-sm {
    min-height: 32px;
    height: 32px;
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
}

.row-actions .admin-advanced {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
}

.row-actions .admin-advanced summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    margin: 0;
    font-weight: inherit;
}

.row-actions .admin-advanced summary::-webkit-details-marker {
    display: none;
}

.row-actions .admin-advanced[open] summary {
    display: none;
}

.row-actions .admin-advanced:not([open]) .password-reset-form {
    display: none;
}

.row-actions .admin-advanced[open] .password-reset-form {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin: 0;
}

.row-actions .password-reset-form input[type="password"] {
    width: auto;
    min-width: 11rem;
    max-width: 16rem;
    min-height: 36px;
    padding: 0.35rem 0.65rem;
    font-size: 0.86rem;
    margin: 0;
    box-sizing: border-box;
}

.login-wrap {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    font-family: var(--font-body);
}

.login-wrap-pais {
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 169, 255, 0.14), transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(255, 102, 0, 0.1), transparent 50%),
        var(--bg);
}

.login-wrap .login-card,
form.login-card {
    width: min(100%, 26rem);
    max-width: 26rem;
    margin: 0 auto;
    padding: 1.5rem 1.6rem 1.75rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--bg-card);
    box-shadow: 0 18px 50px rgba(15, 20, 16, 0.12);
    box-sizing: border-box;
}

.login-wrap .form-actions {
    display: flex;
    margin-top: 1.25rem;
}

.login-wrap .form-actions .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
}

.login-switch {
    margin: 1.15rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    text-align: center;
}

.login-switch-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.88rem;
    color: var(--muted);
}

.login-switch a {
    display: inline-block;
    font-weight: 600;
    font-size: 1rem;
    color: var(--gold-2);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.login-switch a:hover,
.login-switch a:focus-visible {
    color: var(--ink);
}

.login-card.login-card-wide {
    width: min(100%, 44rem);
    max-width: 44rem;
}

.pais-invite-email {
    margin: 0 0 1rem;
    font-weight: 600;
    word-break: break-word;
}

.pais-registo-grid {
    display: grid;
    gap: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 720px) {
    .pais-registo-grid {
        grid-template-columns: 1fr 1fr;
    }
    .pais-registo-span {
        grid-column: 1 / -1;
    }
}

.pais-consent-list {
    display: grid;
    gap: 0.75rem;
    margin: 0.5rem 0 1rem;
}

.pais-consent-list .checkbox-row {
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg-soft);
}

.pais-consent-list .checkbox-row span {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text);
}
.field-hint {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
}
.pais-form-errors {
  margin: 0 0 1rem;
  outline: none;
}
.pais-form-errors .alert {
  margin-bottom: 0.5rem;
}
.pais-form-errors:not([hidden]) {
  scroll-margin-top: 1rem;
}
.field-block {
  scroll-margin-top: 1.25rem;
}
.field-error {
  margin: 0.35rem 0 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: #b42318;
  line-height: 1.35;
}
.field-block.has-error input:not([type="checkbox"]),
.field-block.has-error .password-field input {
  border-color: #f04438;
  box-shadow: 0 0 0 1px rgba(240, 68, 56, 0.25);
}
.field-block.has-error .pais-consent-list {
  outline: 1px solid rgba(240, 68, 56, 0.45);
  outline-offset: 4px;
  border-radius: 0.5rem;
}
.password-field {
  position: relative;
  display: flex;
  align-items: stretch;
}
.password-field input {
  flex: 1;
  padding-right: 2.75rem;
  width: 100%;
}
.password-toggle {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  cursor: pointer;
  border-radius: 0.35rem;
  line-height: 0;
}
.password-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
  pointer-events: none;
}
.password-toggle .icon-eye-off {
  display: none;
}
.password-toggle[aria-pressed="true"] .icon-eye {
  display: none;
}
.password-toggle[aria-pressed="true"] .icon-eye-off {
  display: block;
}
.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--gold-2);
  outline: none;
}
.password-toggle:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold-2) 45%, transparent);
}

.login-back {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
}

.login-back:hover,
.login-back:focus-visible {
    color: var(--gold-2);
}

a.login-brand,
a.login-brand:hover,
a.login-brand:focus-visible {
    text-decoration: none;
    color: inherit;
}

.img-list {
    display: grid;
    gap: 0.7rem;
    margin: 1rem 0;
}

.img-item {
    display: grid;
    grid-template-columns: 88px 1fr auto;
    gap: 0.8rem;
    align-items: center;
    background: var(--bg-input);
    padding: 0.5rem;
    border-radius: 10px;
    border: 1px solid var(--line);
}

.img-item img {
    width: 88px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
}

@media (max-width: 900px) {
    /*
     * NORMA — usabilidade móvel (UI primária, max-width 900px)
     * - Conteúdo à largura do viewport: cartões / linhas empilhadas.
     * - Acções e botões inteiros e tocáveis; sem clip que os esconda.
     * - Sem espaço vazio enorme; o dock não tapa Guardar / Filtrar.
     * - Grelhas desktop (.atl-pay-row colunas, .atl-act-row alinhada) só ≥901px.
     * - Campos data (.atl-date, type=date / datetime-local): largura compacta
     *   (só os dígitos); type=month (AAAA-MM) não encolher por esta norma.
     */
    .work-grid,
    .service-grid,
    .split,
    .contact-grid,
    .footer-grid,
    .gallery,
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .has-mobile-dock {
        --atl-dock-h: calc(45px + env(safe-area-inset-bottom, 0px));
        padding-bottom: var(--atl-dock-h);
    }

    .admin-body.has-mobile-dock {
        padding-bottom: calc(var(--atl-dock-h) + 8px);
    }

    .site-header .site-nav,
    .nav-toggle {
        display: none !important;
    }

    .header-phone {
        display: inline-flex;
        font-size: 0.86rem;
    }

    .header-actions {
        margin-left: auto;
        gap: 0.45rem;
    }

    .header-actions .theme-toggle {
        display: inline-grid;
        width: 38px;
        height: 38px;
    }

    .mobile-dock {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 60;
        min-height: 45px;
        padding: 0.18rem 0.25rem calc(0.18rem + env(safe-area-inset-bottom, 0px));
        background: var(--header-bg);
        backdrop-filter: blur(16px);
        border-top: 1px solid var(--line);
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.18);
    }

    /* Admin: 4 slots iguais (~360px); auto-fit cobre ops com 3 itens. */
    .mobile-dock.admin-dock {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding: 0.1rem 0.12rem calc(0.1rem + env(safe-area-inset-bottom, 0px));
        column-gap: 0;
    }

    .mobile-dock.admin-dock:has(> :nth-child(3):last-child) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .mobile-dock.admin-dock .dock-item {
        font-size: 0.46rem;
        padding: 0.08rem 0.02rem;
        gap: 0.04rem;
        min-height: 36px;
        letter-spacing: -0.02em;
        border-radius: 8px;
        min-width: 0;
    }

    .mobile-dock.admin-dock .dock-icon {
        font-size: 0.66rem;
    }

    .mobile-dock.admin-dock .dock-bars {
        width: 11px;
        height: 8px;
    }

    .mobile-dock.admin-dock .dock-item > span:last-child {
        max-width: 100%;
        text-align: center;
        line-height: 1.1;
        overflow-wrap: break-word;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .mobile-dock.pais-dock {
        grid-template-columns: repeat(5, 1fr);
    }

    .mobile-dock.pais-dock.pais-dock-wide {
        grid-template-columns: repeat(6, 1fr);
    }

    .mobile-dock.pais-dock .dock-item {
        font-size: 0.52rem;
        padding: 0.12rem 0.08rem;
    }

    .dock-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.08rem;
        min-height: 38px;
        border: 0;
        background: transparent;
        color: var(--muted);
        font-family: var(--font-body);
        font-size: 0.58rem;
        font-weight: 600;
        letter-spacing: normal;
        text-transform: uppercase;
        text-decoration: none;
        cursor: pointer;
        border-radius: 10px;
        padding: 0.25rem 0.2rem;
        position: relative;
    }

    .dock-item.is-active,
    .dock-item[aria-current="page"] {
        color: var(--gold);
        background: var(--nav-link-active-bg);
    }

    html.atl-kb-open .mobile-dock {
        display: none !important;
        visibility: hidden;
        pointer-events: none;
    }

    .dock-item:not(.is-active):not([aria-current="page"]):not(.dock-more):hover {
        color: var(--text);
        background: var(--nav-link-hover-bg);
    }

    .dock-icon {
        font-size: 0.74rem;
        line-height: 1;
    }

    .dock-bars {
        width: 13px;
        height: 9px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .dock-bars span {
        display: block;
        height: 2px;
        background: currentColor;
        border-radius: 2px;
    }

    .mobile-more {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 70;
    }

    .mobile-more[hidden] {
        display: none !important;
    }

    .mobile-more-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(9, 9, 11, 0.55);
    }

    html[data-theme="light"] .mobile-more-backdrop {
        background: rgba(28, 32, 40, 0.35);
    }

    .mobile-more-sheet {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0.15rem;
        min-height: 0;
        max-height: calc(100% - env(safe-area-inset-top, 0px));
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: 0.5rem 0.9rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
        background: var(--bg-card);
        border-top: 1px solid var(--line);
        border-radius: 18px 18px 0 0;
        box-shadow: var(--shadow);
    }

    .mobile-more-sheet > * {
        flex-shrink: 0;
        min-height: 0;
    }

    .mobile-more-handle {
        position: sticky;
        top: 0;
        z-index: 1;
        width: 42px;
        height: 4px;
        margin: 0.05rem auto 0.3rem;
        border-radius: 999px;
        background: var(--line);
        flex-shrink: 0;
    }

    .mobile-more-sheet > a {
        display: flex;
        align-items: center;
        padding: 0.32rem 0.7rem;
        min-height: 2.25rem;
        box-sizing: border-box;
        border-radius: 10px;
        border: 1px solid var(--line);
        background: var(--bg-elev);
        color: var(--text);
        text-decoration: none;
        flex-shrink: 0;
    }

    .mobile-more-sheet > a.is-active,
    .mobile-more-sheet > a[aria-current="page"] {
        border-color: color-mix(in srgb, var(--gold) 45%, var(--line));
        background: var(--nav-link-active-bg);
        color: var(--nav-link-active-text);
        font-weight: 600;
    }

    .mobile-more-sheet > a:not(.is-active):not([aria-current="page"]):not(.nav-logout):hover {
        border-color: color-mix(in srgb, var(--gold) 25%, var(--line));
        background: var(--nav-link-hover-bg);
        color: var(--text);
    }

    .mobile-more-sheet .admin-nav-account.is-active,
    .mobile-more-sheet .admin-nav-account[aria-current="page"] {
        border-color: color-mix(in srgb, var(--gold) 45%, var(--line));
        background: var(--nav-link-active-bg);
        color: var(--nav-link-active-text);
        font-weight: 600;
    }

    .mobile-more-sheet > a.nav-pais {
        border-color: var(--gold);
        background: var(--gold);
        color: #fff;
        font-weight: 700;
        text-align: center;
        border-radius: 999px;
    }

    .mobile-more-sheet > a.nav-pais:hover,
    .mobile-more-sheet > a.nav-pais:focus-visible {
        background: color-mix(in srgb, var(--gold) 78%, #000);
        border-color: color-mix(in srgb, var(--gold) 78%, #000);
        color: #fff;
    }

    .mobile-more-sheet > a.nav-logout {
        border-color: var(--gold);
        color: var(--gold);
        font-weight: 600;
        text-align: center;
        justify-content: center;
    }

    .mobile-more-sheet > a.nav-logout .admin-nav-item-inner {
        justify-content: center;
    }

    .admin-side {
        display: none;
    }

    .admin-mobile-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.8rem;
        margin: -0.4rem 0 0.85rem;
        padding-bottom: 0.65rem;
        border-bottom: 1px solid var(--line);
    }

    .admin-mobile-top .brand-logo-img {
        height: 36px;
        max-height: 40px;
        max-width: 104px;
    }

    .admin-main {
        padding: 0.85rem 0.85rem 1.2rem;
    }

    .admin-body .admin-title {
        font-size: 1.25rem;
        letter-spacing: 0.03em;
        margin: 0 0 0.65rem;
    }

    .admin-toolbar {
        flex-direction: column;
        flex-wrap: wrap;
        align-items: stretch;
        gap: 0.45rem;
        margin-bottom: 0.9rem;
    }

    .admin-toolbar.atl-toolbar {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        width: 100%;
    }

    .admin-toolbar .admin-inline-form {
        display: block;
        width: 100%;
    }

    .admin-toolbar .btn {
        width: 100%;
        justify-content: center;
        white-space: normal;
        text-align: center;
        min-height: 44px;
    }

    .admin-toolbar.atl-toolbar .admin-inline-form {
        display: inline-flex;
        width: auto;
    }

    .admin-toolbar.atl-toolbar .btn {
        flex: 0 1 auto;
        width: auto;
        max-width: none;
        min-width: 0;
        white-space: nowrap;
    }

    .admin-filters {
        padding: 0.7rem;
        gap: 0.65rem;
        margin-bottom: 0.85rem;
        max-width: 100%;
        min-width: 0;
        overflow: visible;
        box-sizing: border-box;
    }

    .admin-body .filter-tabs {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.25rem;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .admin-body .filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .admin-body .filter {
        flex: 1 1 0;
        min-width: 0;
        font-size: clamp(0.62rem, 2.6vw, 0.72rem);
        padding: 0.35rem 0.35rem;
        white-space: nowrap;
        text-align: center;
        line-height: 1.25;
    }

    .admin-body .filter-search {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.45rem;
        max-width: 100%;
    }

    .admin-body .filter-search.atl-filter-search {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.4rem;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .admin-body .filter-search.atl-filter-search input[type="search"],
    .admin-body .filter-search.atl-filter-search select {
        flex: 1 1 0;
        width: 0;
        min-width: 0;
        max-width: 100%;
    }

    .admin-body .filter-search.atl-filter-search .btn {
        flex: 0 0 auto;
        width: auto;
        max-width: 100%;
        justify-content: center;
        white-space: nowrap;
    }

    .admin-body .filter-search select,
    .admin-body .filter-search input[type="search"] {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        flex: none;
    }

    .admin-body .filter-search.atl-filter-search select,
    .admin-body .filter-search.atl-filter-search input[type="search"] {
        flex: 1 1 0;
        width: 0;
        min-width: 0;
        max-width: 100%;
    }

    /* Pesquisa / filtro alinhados com pills de estado */
    .admin-body .filter-search input[type="search"],
    .admin-body .filter-search .btn,
    .admin-body .filter-search select,
    .admin-toolbar .filter-search input[type="search"],
    .admin-toolbar .filter-search .btn,
    .admin-toolbar .filter-search select {
        min-height: 0;
        height: auto;
        padding: 0.35rem 0.55rem;
        font-size: clamp(0.62rem, 2.6vw, 0.72rem);
        line-height: 1.25;
        box-sizing: border-box;
    }

    .admin-body .filter-search .btn,
    .admin-toolbar .filter-search .btn {
        min-width: 0;
    }

    .admin-body .filter-search-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.45rem;
    }

    .admin-body .filter-search-actions:not(:has(> :nth-child(2))) {
        grid-template-columns: 1fr;
    }

    .admin-body .filter-search-actions .btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    .admin-result-count {
        font-size: 0.8rem;
        margin-bottom: 0.55rem;
    }

    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    .admin-table.atl-sibling-preview-table,
    .admin-table.atl-fees-matrix {
        min-width: 680px;
    }

    .admin-works-wrap,
    .admin-users-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .admin-works-table,
    .admin-users-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

    .admin-works-table thead,
    .admin-users-table thead {
        display: none;
    }

    .admin-works-table,
    .admin-works-table tbody,
    .admin-users-table,
    .admin-users-table tbody {
        display: block;
        width: 100%;
    }

    .admin-works-table tbody tr {
        display: grid;
        grid-template-columns: 56px minmax(0, 1fr);
        grid-template-areas:
            "cover title"
            "cover service"
            "cover date"
            "status status"
            "featured featured"
            "actions actions";
        gap: 0.28rem 0.65rem;
        align-items: start;
        margin: 0 0 0.65rem;
        padding: 0.7rem;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--atl-table-row-odd);
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        overflow: hidden;
    }
    .admin-works-table tbody tr:nth-child(even) {
        background: var(--atl-table-row-even);
    }

    .admin-works-table td {
        padding: 0;
        border: 0;
        vertical-align: top;
        font-size: 0.82rem;
    }

    .admin-works-table .cell-cover {
        grid-area: cover;
        align-self: center;
    }

    .admin-works-table .cell-title {
        grid-area: title;
        min-width: 0;
        overflow-wrap: break-word;
        word-break: normal;
        hyphens: manual;
    }

    .admin-works-table .cell-title strong {
        display: block;
        font-size: 0.9rem;
        font-weight: 650;
        line-height: 1.35;
        letter-spacing: 0;
        text-transform: none;
        overflow-wrap: break-word;
        word-break: normal;
    }

    .admin-works-table .cell-service {
        grid-area: service;
        color: var(--muted);
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .admin-works-table .cell-status {
        grid-area: status;
        justify-self: start;
        min-width: 0;
        margin-top: 0.15rem;
    }

    .admin-works-table .cell-date {
        grid-area: date;
        font-size: 0.72rem;
    }

    .admin-works-table .cell-featured {
        grid-area: featured;
        justify-self: start;
        min-width: 0;
        margin-top: 0.15rem;
    }

    .admin-works-table .cell-featured-no {
        display: none;
    }

    .admin-works-table .cell-featured:has(.cell-featured-no) {
        display: none;
    }

    .admin-works-table .cell-actions {
        grid-area: actions;
        grid-column: 1 / -1;
        margin-top: 0.45rem;
        padding-top: 0.55rem;
        border-top: 1px solid var(--line);
        min-width: 0;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .admin-works-table .mini {
        width: 56px;
        height: 56px;
        border-radius: 8px;
    }

    .admin-works-table .status-pill {
        font-size: 0.65rem;
        padding: 0.18rem 0.45rem;
        margin: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .admin-works-table .row-actions:not(:has(.atl-act-row)) {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
        align-items: stretch;
    }

    .admin-works-table .atl-act-row,
    .admin-works-table .atl-act-row--text-3 {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        max-width: 100%;
        justify-content: stretch;
        gap: 0.4rem;
        column-gap: 0.4rem;
    }

    .admin-works-table .atl-act-slot {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 0;
        max-width: 100%;
    }

    .admin-works-table .atl-act-slot:first-child {
        flex: 0 0 32px;
        max-width: 32px;
    }

    .admin-works-table .atl-act-slot .btn,
    .admin-works-table .atl-act-slot form,
    .admin-works-table .atl-act-slot form .btn {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .admin-works-table .row-actions > .btn,
    .admin-works-table .row-actions > form {
        flex: 1 1 calc(50% - 0.2rem);
        min-width: min(100%, 6.75rem);
        width: auto;
        margin: 0;
    }

    .admin-works-table .row-actions .btn {
        width: 100%;
        justify-content: center;
        font-size: 0.78rem;
        padding: 0.35rem 0.45rem;
        white-space: normal;
        min-height: 36px;
        height: auto;
        box-sizing: border-box;
    }

    .admin-works-table .label-full {
        display: none;
    }

    .admin-works-table .label-short {
        display: inline;
    }

    .admin-users-table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.35rem;
        margin: 0 0 0.65rem;
        padding: 0.75rem;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--atl-table-row-odd);
        max-width: 100%;
        box-sizing: border-box;
    }
    .admin-users-table tbody tr:nth-child(even) {
        background: var(--atl-table-row-even);
    }

    .admin-users-table td {
        padding: 0;
        border: 0;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .admin-users-table td:nth-child(1) {
        font-weight: 600;
    }

    .admin-users-table td:nth-child(2),
    .admin-users-table td:nth-child(3) {
        color: var(--muted);
        font-size: 0.85rem;
    }

    .admin-users-table td:nth-child(4) {
        margin-top: 0.35rem;
        padding-top: 0.55rem;
        border-top: 1px solid var(--line);
    }

    .admin-users-table .row-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
    }

    .admin-users-table .row-actions .btn,
    .admin-users-table .row-actions form,
    .admin-users-table .row-actions .admin-advanced {
        width: 100%;
    }

    .admin-users-table .row-actions .btn {
        width: 100%;
        justify-content: center;
        min-height: 36px;
        height: auto;
    }

    .admin-users-table .row-actions .admin-advanced {
        display: block;
    }

    .admin-users-table .row-actions .admin-advanced summary {
        width: 100%;
        justify-content: center;
    }

    .admin-users-table .row-actions .password-reset-form,
    .admin-body .row-actions .password-reset-form {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.4rem;
    }

    .admin-users-table .row-actions .password-reset-form input[type="password"],
    .admin-body .row-actions .password-reset-form input[type="password"] {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .admin-form {
        padding: 1rem;
        max-width: 100%;
        box-sizing: border-box;
    }

    .admin-form-narrow {
        max-width: none;
    }

    .admin-import-panel {
        padding: 0.9rem;
        max-width: 100%;
        box-sizing: border-box;
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .url-field-row {
        flex-direction: column;
        align-items: stretch;
        max-width: 100%;
    }

    .url-field-row .url-field,
    .url-field-row .btn {
        width: 100%;
        flex: none;
        min-width: 0;
    }

    .admin-body .form-actions {
        gap: 0.5rem;
        position: sticky;
        bottom: var(--atl-save-float-bottom, calc(45px + env(safe-area-inset-bottom, 0px) + var(--atl-save-dock-gap, 5px)));
        z-index: 5;
        margin: 1rem 0 0;
        padding: 0.55rem 0;
        background: linear-gradient(to top, var(--bg) 70%, transparent);
        max-width: 100%;
    }

    .admin-body .form-actions.admin-save:not(.atl-child-form-actions) {
        position: fixed;
        left: 0.5rem;
        right: 0.5rem;
        bottom: var(--atl-save-float-bottom, 0px);
        z-index: 70;
        margin: 0;
        padding: 0.2rem 0.4rem;
        max-width: none;
        box-sizing: border-box;
        overflow: hidden;
        transform: translate3d(0, var(--atl-kb-lift, 0px), 0);
        background: color-mix(in srgb, var(--bg-elev, #fff) 94%, var(--gold) 6%);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.12);
    }

    .admin-body .form-actions.admin-save .btn,
    .admin-body .form-actions.admin-save .btn:not(.btn-icon),
    .admin-body .form-actions.admin-save .btn-icon {
        width: 100%;
        min-width: 0;
        flex: 1 1 0;
        height: 38px;
        min-height: 38px;
        max-height: 38px;
        padding: 0 0.7rem;
        box-sizing: border-box;
        overflow: hidden;
        justify-content: center;
        align-items: center;
        font-size: 0.9rem;
        line-height: 1;
    }

    .admin-body .form-actions.admin-save .btn-icon .btn-icon-svg {
        display: none;
    }

    .admin-body .form-actions.admin-save .btn-icon::after {
        content: attr(title);
    }

    .admin-body .form-actions.admin-save:has(> :nth-child(2)) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.4rem;
    }

    .admin-body .form-actions:has(> :nth-child(2)):not(:has(> .btn-icon)) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-body .form-actions .btn:not(.btn-icon) {
        width: 100%;
        min-width: 0;
        min-height: 44px;
    }

    .admin-body .form-actions:has(> .btn-icon) {
        display: flex;
        flex-wrap: wrap;
    }

    .admin-body .form-actions .btn-icon {
        width: 132px;
        flex: 0 0 auto;
    }

    .admin-body .form-actions:has(> .btn-icon) .btn:not(.btn-icon) {
        width: auto;
        flex: 1 1 auto;
    }

    .admin-body .pagination {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-body input[type="text"],
    .admin-body input[type="email"],
    .admin-body input[type="password"],
    .admin-body input[type="tel"],
    .admin-body input[type="url"],
    .admin-body input[type="number"],
    .admin-body input[type="file"],
    .admin-body input[type="search"],
    .admin-body select,
    .admin-body textarea {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .img-item {
        grid-template-columns: 72px minmax(0, 1fr);
        grid-template-rows: auto auto;
        max-width: 100%;
    }

    .img-item img {
        width: 72px;
        height: 72px;
        grid-row: 1 / 3;
    }

    .img-item .check {
        grid-column: 2;
        margin-top: 0.35rem;
    }

    /* Site pÃÂÃÂºblico ÃÂ¢ÃÂÃÂ mobile */
    .header-phone {
        font-size: 0.78rem;
        max-width: 42vw;
        text-align: right;
        line-height: 1.15;
    }

    .header-phone .call-note {
        font-size: 0.58rem;
        letter-spacing: 0;
        white-space: normal;
    }

    .page-hero {
        padding: 2rem 0 1.1rem;
    }

    .page-hero h1 {
        font-size: clamp(1.85rem, 8vw, 2.6rem);
    }

    .lead {
        font-size: 0.98rem;
        margin-bottom: 0;
    }

    .section {
        padding: 2.2rem 0;
    }

    .section-head h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .section-head p {
        font-size: 0.95rem;
    }

    .form,
    .panel,
    .facts {
        padding: 1rem;
    }

    .filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0.35rem;
        margin-bottom: 1.2rem;
        padding-bottom: 0.15rem;
    }

    .filters::-webkit-scrollbar {
        display: none;
    }

    .filters .filter {
        flex: 0 0 auto;
        font-size: 0.75rem;
        padding: 0.35rem 0.7rem;
        white-space: nowrap;
    }

    .work-card h3 {
        font-size: 1rem;
    }

    .service-card {
        padding: 0.9rem 1rem 1rem;
    }

    .service-card h3 {
        font-size: 1.35rem;
    }

    .cta-row .btn {
        flex: 1 1 auto;
        min-width: min(100%, 160px);
    }

    .map-wrap iframe {
        height: 220px;
    }

    .prose {
        font-size: 0.95rem;
    }

    .prose h2 {
        font-size: 1.2rem;
    }

    .cookie-bar {
        flex-direction: column;
        align-items: stretch;
        bottom: var(--atl-save-float-bottom, calc(45px + env(safe-area-inset-bottom, 0px)));
        left: 0.7rem;
        right: 0.7rem;
    }

    .gallery-main,
    .gallery-main img {
        min-height: 220px;
    }

    .gallery-thumbs {
        gap: 0.4rem;
    }

    .gallery-thumbs img {
        width: 64px;
        height: 48px;
    }

    .hero {
        min-height: min(58vh, 480px);
    }

    .hero.has-slides {
        min-height: 0;
        padding: 1.6rem 0 1.8rem;
    }

    .hero.has-slides .hero-layout {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        min-height: 0;
    }

    .hero-media {
        min-height: min(38vh, 320px);
        height: min(38vh, 320px);
        order: 2;
    }

    .hero.has-slides .hero-copy {
        order: 1;
        padding: 0;
    }

    .site-footer {
        padding: 1.4rem 0 0.6rem;
    }

    .footer-grid {
        gap: 0.85rem;
        margin-bottom: 0.7rem;
    }

    .footer-bottom {
        padding-top: 0.5rem;
    }

    .footer-copy {
        font-size: 0.72rem;
    }

    .login-wrap {
        padding: 1rem;
        align-items: start;
        padding-top: max(2rem, env(safe-area-inset-top, 0px));
    }

    .login-back {
        top: max(1rem, env(safe-area-inset-top, 0px));
        left: max(1rem, env(safe-area-inset-left, 0px));
    }

    .login-card {
        padding: 1.1rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .login-wrap .form-actions .btn {
        width: 100%;
        min-height: 44px;
    }

    .login-brand .brand-logo-img {
        height: 80px;
        max-height: 100px;
        max-width: 240px;
    }
}

@media (max-width: 640px) {
    .work-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        padding-top: 2.2rem;
        padding-bottom: 2.4rem;
    }

    .hero.has-slides .hero-copy {
        padding: 0;
    }

    .hero-media {
        min-height: 240px;
        height: 240px;
    }

    .hero .hero-copy > .kicker {
        font-size: clamp(1.15rem, 4.5vw, 1.4rem);
    }

    .hero h1.slogan {
        font-size: clamp(1.65rem, 7.5vw, 2.35rem);
        max-width: 12ch;
    }

    .hero-actions {
        margin-top: 1.2rem;
        gap: 0.55rem;
    }

    .hero-actions .btn {
        flex: 1 1 calc(50% - 0.3rem);
        min-height: 44px;
        font-size: 0.88rem;
    }

    .page-hero {
        padding: 1.7rem 0 1rem;
    }

    .container {
        width: min(1180px, calc(100% - 1.4rem));
    }

    .row-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .row-actions:not(:has(.atl-act-row)) .btn,
    .row-actions:not(:has(.atl-act-row)) form {
        width: 100%;
    }

    .row-actions:not(:has(.atl-act-row)) .btn {
        width: 100%;
    }

    /* Mini-tabelas (ficha): ícones na mesma linha. Listas-cartão: ver bloco atl-list. */
    .atl-mini-table td.row-actions,
    .atl-fees-year-table td.row-actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        width: auto;
        min-width: 0;
        max-width: 100%;
    }

    .admin-table td.row-actions > .btn,
    .admin-table td.row-actions > form,
    .admin-table td.atl-col-actions > .btn,
    .admin-table td.atl-col-actions > form,
    .atl-fees-year-table td.row-actions > .btn,
    .atl-fees-year-table td.row-actions > form,
    .atl-mini-table td.row-actions > .btn,
    .atl-mini-table td.row-actions > form {
        width: auto;
        flex: 0 0 auto;
    }

    .admin-works-table .row-actions {
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;
        align-items: stretch;
    }

    .filter-tabs {
        gap: 0.35rem;
    }

    .filter {
        font-size: 0.8rem;
        padding: 0.4rem 0.7rem;
    }

    .admin-body .filter {
        font-size: 0.72rem;
        padding: 0.4rem 0.7rem;
    }

    .brand-text small {
        font-size: 0.65rem;
    }

    .header-actions {
        gap: 0.3rem;
    }

    .header-actions .theme-toggle {
        width: 36px;
        height: 36px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    input[type="file"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px; /* evita zoom automÃÂÃÂ¡tico no iOS */
        padding: 0.65rem 0.75rem;
    }

    textarea {
        min-height: 120px;
    }

    .site-modal-dialog {
        margin: 0.75rem;
        max-width: calc(100% - 1.5rem);
        width: 100%;
    }

    /* Listas admin/pais: cartões à largura do ecrã (norma móvel) */
    .admin-body .table-wrap:not(.atl-fees-table-wrap):not(.atl-attendance-table-wrap):not(.atl-mini-table-wrap) {
        overflow: visible;
        max-width: 100%;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .admin-body .admin-table:not(.atl-attendance-table):not(.atl-payments-table):not(.atl-children-table):not(.atl-pickup-auth-table):not(.atl-fees-year-table):not(.atl-fees-matrix):not(.atl-sibling-preview-table) {
        min-width: 0;
        width: 100%;
        max-width: 100%;
        border-collapse: separate;
        border-spacing: 0;
    }

    .admin-body .admin-table:not(.atl-attendance-table):not(.atl-payments-table):not(.atl-children-table):not(.atl-pickup-auth-table):not(.atl-fees-year-table):not(.atl-fees-matrix):not(.atl-sibling-preview-table):not(.admin-works-table):not(.admin-users-table) thead {
        display: none;
    }

    .admin-body .admin-table:not(.atl-attendance-table):not(.atl-payments-table):not(.atl-children-table):not(.atl-pickup-auth-table):not(.atl-fees-year-table):not(.atl-fees-matrix):not(.atl-sibling-preview-table):not(.admin-works-table):not(.admin-users-table),
    .admin-body .admin-table:not(.atl-attendance-table):not(.atl-payments-table):not(.atl-children-table):not(.atl-pickup-auth-table):not(.atl-fees-year-table):not(.atl-fees-matrix):not(.atl-sibling-preview-table):not(.admin-works-table):not(.admin-users-table) tbody,
    .admin-body .admin-table:not(.atl-attendance-table):not(.atl-payments-table):not(.atl-children-table):not(.atl-pickup-auth-table):not(.atl-fees-year-table):not(.atl-fees-matrix):not(.atl-sibling-preview-table):not(.admin-works-table):not(.admin-users-table) tfoot {
        display: block;
        width: 100%;
        max-width: 100%;
    }

    .admin-body .admin-table:not(.atl-attendance-table):not(.atl-payments-table):not(.atl-children-table):not(.atl-pickup-auth-table):not(.atl-fees-year-table):not(.atl-fees-matrix):not(.atl-sibling-preview-table):not(.admin-works-table):not(.admin-users-table) tbody tr {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.22rem;
        margin: 0 0 0.65rem;
        padding: 0.7rem 0.8rem;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--atl-table-row-odd);
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .admin-body .admin-table:not(.atl-attendance-table):not(.atl-payments-table):not(.atl-children-table):not(.atl-pickup-auth-table):not(.atl-fees-year-table):not(.atl-fees-matrix):not(.atl-sibling-preview-table):not(.admin-works-table):not(.admin-users-table) tbody tr:nth-child(even) {
        background: var(--atl-table-row-even);
    }

    .admin-body .admin-table:not(.atl-attendance-table):not(.atl-payments-table):not(.atl-children-table):not(.atl-pickup-auth-table):not(.atl-fees-year-table):not(.atl-fees-matrix):not(.atl-sibling-preview-table):not(.admin-works-table):not(.admin-users-table) tbody td {
        display: block;
        width: 100%;
        max-width: 100%;
        padding: 0.12rem 0;
        border: 0;
        white-space: normal;
        overflow-wrap: break-word;
        word-break: normal;
        box-sizing: border-box;
    }

    .admin-body .admin-table:not(.atl-payments-table):not(.atl-children-table) tbody td[data-label]:not([data-label=""])::before {
        content: attr(data-label);
        display: block;
        font-size: 0.68rem;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        color: var(--muted);
        font-weight: 600;
        margin-bottom: 0.08rem;
    }

    .admin-body .admin-works-table tbody td::before,
    .admin-body .admin-users-table tbody td::before,
    .admin-body .atl-attendance-table tbody td::before,
    .admin-body .atl-payments-table tbody td::before,
    .admin-body .atl-children-table tbody td.atl-child-td-photo::before,
    .admin-body .atl-children-table tbody td.atl-child-td-name::before,
    .admin-body .atl-children-table tbody td.atl-child-td-code::before {
        display: none;
    }

    .admin-body .admin-table td.row-actions,
    .admin-body .admin-table td.atl-col-actions,
    .admin-body .admin-table td.cell-actions,
    .admin-body .table-wrap > .admin-table td.row-actions,
    .admin-body .table-wrap > .admin-table td.atl-col-actions,
    .admin-body .table-wrap > .admin-table td.cell-actions {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-top: 0.4rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--line);
        text-align: left;
        white-space: normal;
    }

    .admin-body .atl-act-row,
    .admin-body .atl-act-row--text-3,
    .admin-body .atl-act-row--extra-2,
    .admin-body .atl-act-row--extra-3,
    .admin-body .atl-act-row--child-actions,
    .admin-body .atl-act-row--docs-3 {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        width: 100%;
        max-width: 100%;
        gap: 0.35rem;
        margin-left: 0;
    }

    .admin-body .atl-act-slot {
        min-width: 0;
    }

    .admin-body .atl-act-row--text-3 .atl-act-slot,
    .admin-body .atl-act-row--extra-2 .atl-act-slot,
    .admin-body .atl-act-row--extra-3 .atl-act-slot {
        flex: 1 1 calc(50% - 0.2rem);
    }

    .admin-body .atl-act-row--text-3 .atl-act-slot:first-child {
        flex: 0 0 32px;
    }

    .admin-body .atl-act-slot .btn:not(.btn-icon):not(.btn-icon-compact),
    .admin-body .atl-act-slot form {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .admin-body .atl-ym-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.4rem 0.55rem;
        width: 100%;
        max-width: 100%;
    }

    .admin-body .atl-ym-row label {
        display: inline-flex;
        align-items: center;
        margin: 0;
        width: auto;
    }

    .admin-body .atl-ym-row .atl-ym-input,
    .admin-body .atl-generate-box .atl-ym-row .atl-ym-input,
    .admin-body .admin-filters .atl-ym-row .atl-ym-input,
    .admin-body .admin-filters .atl-ym-row .atl-status-input,
    .admin-body .atl-status-input {
        flex: 0 0 auto;
        min-width: 0;
        max-width: 100%;
    }

    .admin-body .atl-ym-row .btn {
        width: auto;
        flex: 0 0 auto;
        justify-content: center;
    }

    .admin-body .filter-search {
        width: 100%;
        max-width: 100%;
    }

    .admin-body .filter-search select,
    .admin-body .filter-search input[type="search"] {
        flex: 1 1 100%;
        min-width: 0;
        max-width: 100%;
    }

    .admin-body .filter-search-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
        width: 100%;
    }

    .admin-body .atl-pay-batch-bar {
        justify-content: space-between;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        bottom: calc(var(--atl-dock-h, 0px) + 8px);
    }

    .admin-body .atl-payments-table tfoot .atl-pay-total-row {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        justify-content: space-between;
        gap: 0.5rem;
        background: color-mix(in srgb, var(--gold) 8%, var(--bg-elev));
    }

    .admin-body .atl-payments-table tfoot .atl-pay-total-row th,
    .admin-body .atl-payments-table tfoot .atl-pay-total-row td {
        width: auto;
        flex: 0 1 auto;
    }

    .admin-body .atl-payments-table tfoot td:empty,
    .admin-body .atl-payments-table tfoot td[colspan]:empty {
        display: none;
    }

    .admin-body .atl-children-table .atl-col-photo {
        width: auto;
    }

    .admin-body .admin-card-title {
        overflow-wrap: break-word;
        word-break: normal;
    }

    .admin-body .admin-card-actions {
        max-width: 100%;
        box-sizing: border-box;
    }

    .admin-body .admin-card-actions .btn {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Days One ÃÂ¢ÃÂÃÂ apenas marca RAIZ e slogan principal */
.font-days,
.brand-mark,
.brand-raiz,
.hero h1.slogan,
.slogan-footer {
    font-family: var(--font-display);
}

.brand-logo {
    gap: 0.65rem;
}

.brand-logo-img {
    width: auto;
    height: 42px;
    max-width: 120px;
    object-fit: contain;
}

.site-header .brand.brand-logo {
    align-items: flex-end;
}

.site-header .brand-logo-img {
    height: 50px;
    max-width: 140px;
}

@media (min-width: 768px) {
    .site-header .brand-logo-img {
        height: 58px;
        max-width: 160px;
    }
}

.brand-logo-sm {
    height: 34px;
    max-width: 96px;
}

.login-brand-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-brand {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.85rem;
    margin-bottom: 0.65rem;
}

.login-brand .brand-logo-img {
    height: 92px;
    max-height: 100px;
    max-width: 260px;
    width: auto;
}

.login-brand .brand-text {
    align-items: center;
}

.login-brand .brand-raiz {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.login-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.05;
    margin: 0;
    gap: 0.15rem;
}

.login-heading strong {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.login-heading small {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 500;
}

.login-wrap .login-heading strong,
.login-wrap .login-heading small,
.login-wrap label,
.login-wrap input,
.login-wrap .btn,
.login-wrap .muted,
.login-wrap .alert {
    font-family: var(--font-body);
}

.login-wrap .login-heading strong {
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

@media (min-width: 900px) {
    .login-brand {
        flex-direction: row;
        align-items: flex-end;
        gap: 1.15rem;
        text-align: left;
    }

    .login-brand .brand-text {
        align-items: flex-start;
    }

    .login-brand .brand-logo-img {
        height: 150px;
        max-height: 160px;
        max-width: 380px;
    }

    .login-brand .brand-raiz {
        font-size: 1.65rem;
    }
}

.hero-raiz .hero-copy {
    max-width: 38rem;
}

.hero.has-slides.hero-raiz .hero-copy {
    max-width: 36rem;
}

.hero-social {
    margin-top: 1rem;
    font-size: 0.92rem;
}

.service-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    display: block;
}

.service-grid-large .service-card h2 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.35rem;
    margin: 0 0 0.5rem;
}

.badge-featured {
    background: var(--gold-dim);
    color: var(--gold);
}

.checkbox-row {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    font-size: 0.92rem;
}

.checkbox-row input {
    margin-top: 0.25rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1.2rem;
}

.admin-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
}

.admin-stat-label {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.admin-stat-value {
    margin: 0.35rem 0 0.75rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.8rem;
    line-height: 1.1;
}

.msg-list {
    display: grid;
    gap: 1rem;
}

.msg-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
}

.msg-card.is-unread {
    border-color: rgba(0, 169, 255, 0.35);
    box-shadow: 0 0 0 1px rgba(0, 169, 255, 0.12);
}

.msg-card-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: baseline;
}

.msg-reply {
    margin-top: 0.8rem;
    padding: 0.75rem;
    background: var(--bg-soft);
    border-radius: calc(var(--radius) - 4px);
}

/* — SGR module — */
.atl-child-page {
  max-width: 56rem;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
}
.atl-child-form > .atl-child-form-actions {
  position: fixed;
  z-index: 70;
  left: 50%;
  transform: translateX(-50%) translate3d(0, var(--atl-kb-lift, 0px), 0);
  bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
  width: min(56rem, calc(100vw - 1.5rem));
  max-width: calc(100vw - 1.5rem);
  margin: 0;
  padding: 0.2rem 0.4rem;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
  box-sizing: border-box;
  background: color-mix(in srgb, var(--bg-elev, #fff) 92%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.14);
}
.atl-child-form > .atl-child-form-actions .btn,
.atl-child-form > .atl-child-form-actions .btn-icon {
  flex: 0 0 auto;
  width: 132px;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  padding: 0 0.7rem;
  justify-content: center;
}
.atl-child-form > .atl-child-form-actions .btn-icon .btn-icon-svg {
  display: none;
}
.atl-child-form > .atl-child-form-actions .btn-icon::after {
  content: attr(title);
}
@media (max-width: 859px) {
  .atl-child-page {
    padding-bottom: calc(3.4rem + var(--atl-dock-h, 45px) + var(--atl-save-dock-gap, 5px));
  }
  /* Um só Guardar, acima do dock; o Voltar já está no cabeçalho */
  .atl-child-form > .atl-child-form-actions {
    bottom: var(--atl-save-float-bottom, calc(var(--atl-dock-h, 45px) + var(--atl-save-dock-gap, 5px)));
    width: calc(100vw - 1rem);
    max-width: none;
    justify-content: center;
  }
  .atl-child-form > .atl-child-form-actions a.btn,
  .atl-child-form > .atl-child-form-actions a.btn-icon {
    display: none;
  }
  .atl-child-form > .atl-child-form-actions .btn,
  .atl-child-form > .atl-child-form-actions .btn-icon {
    width: min(16rem, 100%);
    max-width: 100%;
    height: 38px;
    min-height: 38px;
    max-height: 38px;
  }
}
@media (min-width: 860px) {
  .admin-body .atl-child-form > .atl-child-form-actions {
    left: calc(240px + 50%);
    transform: translateX(calc(-50% - 120px)) translate3d(0, var(--atl-kb-lift, 0px), 0);
    width: min(56rem, calc(100vw - 240px - 2rem));
    max-width: min(72rem, calc(100vw - 240px - 2rem));
  }
}
@media (min-width: 1100px) {
  .admin-body .atl-child-form > .atl-child-form-actions {
    width: min(72rem, calc(100vw - 240px - 2rem));
    max-width: min(72rem, calc(100vw - 240px - 2rem));
  }
}
.atl-child-form {
  width: 100%;
  max-width: none;
}
@media (min-width: 1100px) {
  .atl-child-page {
    max-width: 72rem;
  }
  .atl-child-page[data-atl-ficha] {
    max-width: none;
  }
  .atl-child-form > textarea,
  .atl-child-form textarea#health_problems,
  .atl-child-form textarea#allergies,
  .atl-child-form textarea#notes {
    min-height: 10rem;
  }
}
.atl-child-top {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1rem;
}
.atl-child-top-fields {
  min-width: 0;
  flex: 1;
}
.atl-child-top-fields > label:first-of-type {
  margin-top: 0;
}
.atl-birth-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}
.atl-birth-row input[type="date"] {
  width: var(--atl-date-w);
  max-width: 100%;
  flex: 0 0 auto;
}
.atl-start-date-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
}
.atl-start-date-row input[type="date"] {
  width: var(--atl-date-w);
  max-width: 100%;
  flex: 0 0 auto;
}
.atl-fee-cohort-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  line-height: 1.25;
}
.atl-fee-cohort-badge.is-legacy {
  background: #fff3e0;
  color: #c05600;
}
.atl-fee-cohort-badge.is-standard {
  background: var(--gold-dim, rgba(212, 175, 55, 0.18));
  color: var(--gold, #a8841a);
}
.atl-registration-fee-flags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.25rem;
  margin-top: 0.4rem;
}
.atl-registration-fee-flags .checkbox-row {
  margin-top: 0;
}
.atl-registration-sibling-pick {
  margin-top: 0.75rem;
  max-width: 36rem;
}
.atl-registration-sibling-pick .atl-combo {
  width: 100%;
  max-width: 36rem;
}
.atl-registration-sibling-pick .atl-combo-query {
  width: 100%;
}
tr[data-pickup-pending="1"] input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.atl-registration-reason-wrap {
  margin-top: 0.65rem;
  max-width: 36rem;
}
.atl-registration-reason-wrap textarea {
  width: 100%;
  min-height: 4.5rem;
  resize: vertical;
}
.atl-registration-fee-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.atl-registration-fee-amount-edit {
  margin-top: 0.55rem;
  max-width: 22rem;
}
.atl-registration-fee-amount-edit label {
  display: block;
  margin-bottom: 0.25rem;
}
.atl-registration-fee-amount-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.6rem;
}
.atl-registration-fee-amount-edit input[type="number"] {
  width: 7.5rem;
  max-width: 100%;
  min-height: var(--control-h, 32px);
  height: var(--control-h, 32px);
  box-sizing: border-box;
}
.atl-registration-fee-amount-edit input[type="number"]:disabled {
  opacity: 0.65;
}
.atl-registration-fee-badge.is-waived {
  background: #e8f5e9;
  color: #2e7d32;
}
.atl-registration-fee-generate {
  margin: 0;
}
.atl-sibling-discount-badge {
  margin-left: 0.35rem;
  vertical-align: middle;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.7rem;
}
.atl-age-live {
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text, #1a1a1a);
  min-height: 1.2em;
}
/* Nome: largura da coluna. Telemóvel = NIF. */
.atl-child-form .atl-field-name {
  width: 100%;
  max-width: 100%;
}
.atl-child-form .atl-field-compact {
  width: 100%;
  max-width: 12rem;
}
.atl-child-form > textarea,
.atl-child-form textarea#health_problems,
.atl-child-form textarea#allergies,
.atl-child-form textarea#notes {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 7rem;
}
.atl-child-inline-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1rem;
}
.atl-child-inline-2 label {
  margin-top: 0.9rem;
}
.atl-child-top-photo {
  min-width: 0;
  order: -1;
  text-align: center;
}
.atl-child-top-photo .atl-photo-field {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.atl-child-top-photo .atl-photo-preview {
  margin: 0 0 0.55rem;
}
.atl-child-top-photo .atl-photo-preview img {
  width: 120px;
  height: 160px;
  display: block;
  margin: 0 auto;
}
.atl-child-top-photo label[for="photo"] {
  font-size: 0.88rem;
  margin-top: 0.35rem;
  text-align: center;
}
.atl-child-top-photo .atl-photo-file {
  align-items: center;
  width: 100%;
}
@media (max-width: 900px) {
  .atl-child-top-photo .atl-photo-file-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
  }
  .atl-child-top-photo .atl-photo-file-btn {
    min-height: var(--control-h, 44px);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    font-size: 0.88rem;
  }
}
.atl-child-top-photo .atl-photo-file-name,
.atl-child-top-photo .atl-photo-field > .muted {
  text-align: center;
}
.atl-child-top-photo .muted {
  font-size: 0.78rem;
  line-height: 1.35;
}
.atl-child-top-photo .checkbox-row {
  justify-content: center;
}
.atl-ficha-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.35rem;
}
.atl-ficha-heading-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1rem;
  min-width: 0;
}
.atl-ficha-heading .admin-title {
  margin-bottom: 0;
}
.atl-ficha-heading-center {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.atl-ficha-heading:has(.atl-ficha-heading-center) {
  --atl-att-heading-size: 2.75rem;
  --atl-att-stat-num-size: 1.2rem;
}
.atl-ficha-heading:has(.atl-ficha-heading-center) .atl-ficha-heading-actions {
  margin-left: 0;
}
.atl-ficha-heading-center .atl-attendance-stats {
  margin: 0;
  width: 100%;
  justify-content: center;
}
.atl-ficha-heading-center .atl-attendance-movements {
  justify-content: center;
}
.atl-ficha-heading-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
  flex: 0 0 auto;
}
.atl-ficha-heading-actions .atl-sgr-heading-qr {
  margin-right: 1.25rem;
}
.atl-ficha-heading .btn-icon-compact {
  flex: 0 0 auto;
  margin-left: 0;
}
.atl-ficha-code {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text, #1a1a1a);
}
.atl-child-code-badge {
  font-weight: 600;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 860px) {
  .atl-child-top {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.75rem;
  }
  .atl-child-top-photo {
    order: 0;
    flex: 0 0 15rem;
    width: 15rem;
    position: sticky;
    top: 1rem;
  }
  .atl-child-top-photo .atl-photo-preview img {
    width: 150px;
    height: 200px;
    margin: 0 auto;
  }
  .atl-child-inline-2 {
    grid-template-columns: 8.5rem minmax(0, 1fr);
  }
}

.atl-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}
.atl-kpi {
  background: var(--card, #fff);
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s ease, border-color 0.12s ease;
}
a.atl-kpi:hover,
a.atl-kpi:focus-visible {
  background: color-mix(in srgb, var(--gold) 10%, var(--bg-elev, #fff));
  border-color: color-mix(in srgb, var(--gold) 40%, var(--line, #ddd));
  outline: none;
}
.atl-kpi-n { font-size: 1.45rem; font-weight: 600; color: var(--ink, #2c3a1f); }
.atl-kpi-l { font-size: 0.85rem; color: var(--muted, #6b7280); }
.atl-simple-list { list-style: none; padding: 0; margin: 0.4rem 0 0; }
/* Ícone bolo: não encolher em flex; emoji isolado da cor do pai (Android) */
.atl-birthday-cake {
  display: inline-block;
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "EmojiOne Color", sans-serif;
  color: initial;
  -webkit-text-fill-color: initial;
  speak: never;
}
.atl-birthday-today-badge {
  display: inline-block;
  flex-shrink: 0;
  margin-left: 0.25rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.2;
  vertical-align: middle;
  background: var(--gold, #ff6600);
  color: #fff;
  -webkit-text-fill-color: #fff;
}
.atl-birthdays-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}
.atl-birthdays-list .atl-birthday-name {
  font-weight: 500;
}
.atl-birthdays-list .atl-birthday-sep {
  color: var(--muted);
}
.atl-birthdays-list .atl-birthday-today {
  margin: 0 -0.35rem;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius);
  background: rgba(255, 102, 0, 0.16);
  background: color-mix(in srgb, var(--gold) 16%, var(--bg-elev, #fff));
  border: 1px solid rgba(255, 102, 0, 0.5);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line, #ddd));
  font-weight: 600;
  box-sizing: border-box;
}
.atl-birthdays-list .atl-birthday-today .atl-birthday-name,
.atl-birthdays-list .atl-birthday-today .atl-birthday-date {
  color: var(--gold);
  font-weight: 700;
}
.atl-birthdays-list .atl-birthday-today .atl-birthday-sep {
  color: rgba(255, 102, 0, 0.75);
  color: color-mix(in srgb, var(--gold) 70%, var(--muted));
}
.atl-birthdays-list .atl-birthday-cake {
  font-size: 1.2rem;
}
.atl-birthdays-list .atl-birthday-today-label {
  display: inline-block;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-left: auto;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--gold, #ff6600);
  color: #fff;
  -webkit-text-fill-color: #fff;
}
.atl-birthdays-list .atl-birthday-recent {
  color: var(--muted, #6b7280);
}
.atl-birthdays-list .atl-birthday-recent .atl-birthday-name {
  font-weight: 500;
  color: var(--ink, #2c3a1f);
}
.atl-birthdays-list .atl-birthday-recent-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted, #6b7280);
  margin-left: auto;
}
@media (max-width: 900px) {
  .atl-birthdays-list .atl-birthday-today {
    width: 100%;
    margin: 0.1rem 0;
    padding: 0.55rem 0.65rem;
  }
  .atl-birthdays-list .atl-birthday-cake {
    font-size: 1.35rem;
  }
  .atl-birthdays-list .atl-birthday-today-label {
    margin-left: 0;
  }
}
.atl-simple-list li {
  padding: 0.37rem 0;
  min-height: 2.25rem;
  border-bottom: 1px solid var(--border, #eee);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.atl-health-section .admin-subtitle {
  margin-bottom: 0.75rem;
  color: var(--gold);
}
.atl-health-cards {
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.atl-health-card {
  margin-top: 0;
  padding: 0.85rem 0.95rem;
  background: color-mix(in srgb, var(--gold) 6%, var(--bg-elev, #fff));
  border-color: color-mix(in srgb, var(--gold) 22%, var(--line, #ddd));
  min-width: 0;
}
.atl-health-card.atl-row-clickable:hover,
.atl-health-card.atl-row-clickable:focus-visible {
  background: color-mix(in srgb, var(--gold) 11%, var(--bg-elev, #fff));
  border-color: color-mix(in srgb, var(--gold) 45%, var(--line, #ddd));
}
.atl-health-alert-list > li {
  display: block;
  align-items: stretch;
  padding: 0.85rem 0;
}
.atl-health-alert-list > li:last-child {
  border-bottom: 0;
}
.atl-health-alert-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.75rem;
  margin-bottom: 0;
  padding-bottom: 0.55rem;
  border-bottom: 2px dashed color-mix(in srgb, var(--gold) 50%, var(--line, #ddd));
}
.atl-health-alert-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: inherit;
  text-decoration: none;
}
a.atl-health-alert-name:hover,
a.atl-health-alert-name:focus-visible {
  color: var(--gold, #ff6600);
}
.atl-health-alert-details {
  margin: 0;
  display: grid;
  gap: 0.55rem;
  padding-top: 0.55rem;
}
.atl-health-card .atl-health-detail--allergies dt,
.atl-health-card .atl-health-detail--conditions dt {
  padding-bottom: 0.3rem;
  margin-bottom: 0.2rem;
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 18%, var(--line, #ddd));
}
.atl-health-card .atl-health-detail {
  grid-template-columns: 1fr;
  gap: 0.15rem;
}
.atl-health-detail {
  display: grid;
  grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr);
  gap: 0.35rem 0.85rem;
  align-items: start;
}
.atl-health-detail dt {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.atl-health-detail dd {
  margin: 0;
  color: var(--text);
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}
.atl-health-meds {
  list-style: disc;
  margin: 0;
  padding-left: 1.15rem;
}
.atl-health-meds li {
  display: list-item;
  border: 0;
  padding: 0.15rem 0;
}
@media (max-width: 640px) {
  .atl-health-cards {
    grid-template-columns: 1fr;
  }
  .atl-health-detail {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}
.atl-mini-table-wrap {
  margin: 0.5rem 0 0.75rem;
}
.atl-mini-table th,
.atl-mini-table td {
  padding: 0.37rem 0.7rem;
  font-size: 0.92rem;
  vertical-align: middle;
}
.atl-mini-table .row-actions {
  white-space: nowrap;
  text-align: right;
}
.atl-mini-table .row-actions .btn {
  min-height: 32px;
  height: 32px;
  padding: 0 0.55rem;
}
.atl-mini-table .row-actions .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
#atl-autorizacoes .atl-mini-table-wrap {
  max-width: 100%;
  min-width: 0;
}
#atl-autorizacoes .atl-pickup-auth-wrap--consult {
  overflow-x: hidden;
}
#atl-autorizacoes .atl-pickup-auth-table,
#atl-autorizacoes .table-wrap > .atl-pickup-auth-table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
#atl-autorizacoes .atl-pickup-auth-table tbody td {
  height: auto;
  min-height: 2.25rem;
  overflow: visible;
}
#atl-autorizacoes .atl-pickup-auth-table th,
#atl-autorizacoes .atl-pickup-auth-table td {
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}
#atl-autorizacoes .atl-pickup-auth-table .atl-pickup-col-name {
  width: 44%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
#atl-autorizacoes .atl-pickup-auth-table .atl-pickup-col-rel {
  width: 22%;
  white-space: normal;
  overflow-wrap: anywhere;
}
#atl-autorizacoes .atl-pickup-auth-table th.atl-pickup-col-rel {
  white-space: nowrap;
}
#atl-autorizacoes .atl-pickup-auth-table .atl-pickup-col-doc {
  width: 28%;
  white-space: nowrap;
  overflow: visible;
}
#atl-autorizacoes .atl-pickup-auth-table.atl-pickup-auth-table--consult .atl-pickup-col-name {
  width: 46%;
}
#atl-autorizacoes .atl-pickup-auth-table.atl-pickup-auth-table--consult .atl-pickup-col-rel {
  width: 22%;
}
#atl-autorizacoes .atl-pickup-auth-table.atl-pickup-auth-table--consult .atl-pickup-col-doc {
  width: 32%;
}
#atl-autorizacoes .atl-pickup-auth-table.atl-pickup-auth-table--actions .atl-pickup-col-name {
  width: 36%;
}
#atl-autorizacoes .atl-pickup-auth-table.atl-pickup-auth-table--actions .atl-pickup-col-rel {
  width: 22%;
}
#atl-autorizacoes .atl-pickup-auth-table.atl-pickup-auth-table--actions .atl-pickup-col-doc {
  width: 24%;
}
#atl-autorizacoes .atl-pickup-auth-table .atl-pickup-col-actions {
  width: 18%;
  white-space: nowrap;
  text-align: right;
}
@media (max-width: 859px) {
  #atl-autorizacoes .atl-pickup-auth-table th,
  #atl-autorizacoes .atl-pickup-auth-table td {
    padding-left: 0.28rem;
    padding-right: 0.28rem;
    font-size: 0.82rem;
  }
  #atl-autorizacoes .atl-pickup-auth-table.atl-pickup-auth-table--consult .atl-pickup-col-name {
    width: 44%;
  }
  #atl-autorizacoes .atl-pickup-auth-table.atl-pickup-auth-table--consult .atl-pickup-col-rel {
    width: 22%;
  }
  #atl-autorizacoes .atl-pickup-auth-table.atl-pickup-auth-table--consult .atl-pickup-col-doc {
    width: 34%;
  }
  #atl-autorizacoes .atl-pickup-auth-table.atl-pickup-auth-table--actions .atl-pickup-col-actions {
    display: table-cell;
    width: 14%;
  }
  #atl-autorizacoes .atl-pickup-auth-table.atl-pickup-auth-table--actions tr[data-pickup-id]:not(.atl-pickup-row--editing) {
    cursor: pointer;
  }
  #atl-autorizacoes .atl-pickup-auth-table.atl-pickup-auth-table--actions .atl-pickup-col-name {
    width: 42%;
  }
  #atl-autorizacoes .atl-pickup-auth-table.atl-pickup-auth-table--actions .atl-pickup-col-rel {
    width: 26%;
  }
  #atl-autorizacoes .atl-pickup-auth-table.atl-pickup-auth-table--actions .atl-pickup-col-doc {
    width: 32%;
  }
}
.atl-invite-accepted {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
  color: #1b7a3d;
}
.atl-compact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1rem;
}
.atl-compact-grid > div > label {
  margin-top: 0.75rem;
}
.atl-compact-grid input,
.atl-compact-grid select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.atl-compact-grid .atl-wa-field input {
  width: auto;
  flex: 1 1 auto;
}
.atl-compact-grid [data-atl-field="full_name"],
.atl-compact-grid [data-atl-field="email"] {
  width: 100%;
  max-width: 100%;
}
@media (min-width: 700px) {
  .atl-compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .atl-compact-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.atl-guardian-slots {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.atl-guardian-slot {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem 1rem;
  background: var(--bg, #fff);
}
.atl-guardian-slot.is-primary {
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
  box-shadow: inset 3px 0 0 var(--gold);
}
.atl-guardian-slot-header,
.atl-guardian-slot-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.atl-guardian-slot-summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}
.atl-guardian-slot-summary::-webkit-details-marker {
  display: none;
}
.atl-guardian-slot-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.atl-primary-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-weight: 500;
  font-size: 0.85rem;
  line-height: 1.25;
  cursor: pointer;
  user-select: none;
  max-width: 100%;
}
.atl-primary-view-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-ink, #8a6d1a);
}
.atl-primary-check input {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.atl-primary-check-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border: 1.5px solid var(--line);
  border-radius: 0.25rem;
  background: var(--bg, #fff);
  flex-shrink: 0;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.atl-primary-check-box::after {
  content: "";
  width: 0.35rem;
  height: 0.65rem;
  border: solid transparent;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}
.atl-primary-check input:checked + .atl-primary-check-box {
  border-color: var(--gold, #c9a227);
  background: color-mix(in srgb, var(--gold, #c9a227) 18%, #fff);
}
.atl-primary-check input:checked + .atl-primary-check-box::after {
  border-color: var(--gold, #a8860f);
}
.atl-primary-check input:focus-visible + .atl-primary-check-box {
  outline: 2px solid var(--gold, #c9a227);
  outline-offset: 2px;
}
.atl-guardian-existing {
  margin: 0.75rem 0 0.25rem;
}
.atl-combo {
  position: relative;
}
.atl-field-combo {
  width: 100%;
  max-width: 100%;
}
.atl-compact-grid,
.atl-compact-grid > div,
.atl-guardian-slot {
  overflow: visible;
}
.atl-wa-field .atl-field-combo {
  flex: 1 1 auto;
  min-width: 0;
}
.atl-compact-grid .atl-field-combo input {
  width: 100%;
  max-width: 100%;
}
.atl-combo-row {
  position: relative;
}
.atl-combo-query {
  width: 100%;
  max-width: 100%;
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 2.2rem 0.7rem 0.8rem;
  box-sizing: border-box;
  font: inherit;
  font-size: 1rem;
  appearance: none;
  -webkit-appearance: none;
}
.atl-combo-query::-webkit-search-cancel-button {
  display: none;
}
.atl-combo-clear {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.atl-combo-clear:hover,
.atl-combo-clear:focus-visible {
  color: var(--text);
  background: color-mix(in srgb, var(--gold, #c9a227) 16%, transparent);
}
.atl-combo-list {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  max-height: min(16.5rem, 50vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg, #fff);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}
.atl-combo-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  margin: 0;
  padding: 0.7rem 0.8rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  border-radius: 0;
}
.atl-combo-option:last-of-type {
  border-bottom: 0;
}
.atl-combo-option:hover,
.atl-combo-option.is-active {
  background: color-mix(in srgb, var(--gold, #c9a227) 16%, var(--bg, #fff));
}
.atl-combo-option-name {
  font-weight: 600;
}
.atl-combo-option-meta {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
  word-break: break-word;
}
.atl-combo-empty {
  padding: 0.7rem 0.8rem;
  color: var(--muted);
  font-size: 0.86rem;
}
.atl-slot-invite {
  display: inline-flex;
  align-items: center;
}
.atl-guardian-slots--view {
  gap: 0.65rem;
}
.atl-guardian-slots--view .atl-guardian-slot {
  padding: 0.55rem 0.75rem 0.65rem;
}
.atl-guardian-slots--view .atl-view-dl,
.atl-guardian-slots--view .atl-view-dl-compact {
  margin-top: 0.35rem;
  gap: 0.2rem 1.25rem;
}
.atl-guardian-slots--view .atl-view-row-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.4rem;
  min-width: 0;
}
.atl-guardian-slots--view .atl-view-row-wide {
  grid-column: 1 / -1;
}
.atl-guardian-slots--view .atl-view-label {
  text-transform: none;
  letter-spacing: 0;
  font-size: inherit;
}
.atl-guardian-slots--view .atl-view-label::after {
  content: ":";
}
.atl-guardian-slots--view .atl-view-value {
  min-width: 0;
  word-break: break-word;
}
@media (min-width: 860px) {
  .atl-guardian-slots--view .atl-view-dl-compact {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
.atl-inline-alert {
  margin: 0.75rem 0 0.5rem;
}
.atl-sort-link {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
button.atl-sort-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
  text-align: inherit;
}
.atl-sort-link:hover,
.atl-sort-link.is-active {
  color: var(--gold, #ff6600);
}
.atl-sort-ind {
  font-weight: 700;
}
/* Ordenação em cartões móveis (thead escondido) */
.atl-mobile-sort {
  display: none;
}
@media (max-width: 900px) {
  .admin-body .atl-mobile-sort {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.35rem 0 0;
    max-width: 100%;
    min-width: 0;
  }
  .admin-body .atl-mobile-sort .atl-list-sort-select {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: var(--control-h, 32px);
    box-sizing: border-box;
  }
}
.atl-fees-year-table td.row-actions,
.atl-fees-year-table .atl-col-actions-sticky.row-actions {
  display: table-cell;
  text-align: right;
  width: auto;
  min-width: max-content;
  white-space: nowrap;
  vertical-align: middle;
}
.atl-fees-year-table td.row-actions > .btn,
.atl-fees-year-table td.row-actions > form,
.atl-fees-year-table td.row-actions .btn-icon-compact {
  flex: 0 0 auto;
  width: auto;
  display: inline-flex;
}
.atl-fees-year-table td.row-actions form {
  margin: 0;
}
.atl-fees-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  overscroll-behavior-x: contain;
}
.atl-fees-table-wrap.is-scrollable {
  cursor: grab;
}
.atl-fees-table-wrap.is-scrollable.is-dragging {
  cursor: grabbing;
  user-select: none;
}
.atl-fees-year-table,
.atl-fees-matrix {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}
.atl-fees-year-table th,
.atl-fees-year-table td,
.atl-fees-matrix th,
.atl-fees-matrix td {
  white-space: nowrap;
  vertical-align: middle;
}
/* Colunas de dados ocupam o espaço livre; Acções fica compacta à direita */
.atl-fees-year-table th:not(.atl-col-actions-sticky),
.atl-fees-year-table td:not(.atl-col-actions-sticky) {
  width: auto;
}
.atl-fees-year-table .atl-col-actions-sticky {
  position: sticky;
  right: 0;
  z-index: 3;
  width: 1%;
  background: var(--bg-elev, #fff);
  text-align: right;
  padding-left: 0.85rem;
}
.atl-fees-year-table tbody tr:nth-child(odd) .atl-col-actions-sticky,
.atl-fees-matrix tbody tr:nth-child(odd) .atl-fees-sticky-start {
  background: var(--atl-table-row-odd);
}
.atl-fees-year-table tbody tr:nth-child(even) .atl-col-actions-sticky,
.atl-fees-matrix tbody tr:nth-child(even) .atl-fees-sticky-start {
  background: var(--atl-table-row-even);
}
.atl-fees-table-wrap.is-scrollable .atl-fees-year-table .atl-col-actions-sticky {
  box-shadow: -8px 0 10px -6px rgba(15, 20, 16, 0.18);
}
.atl-fees-year-table thead .atl-col-actions-sticky {
  z-index: 4;
}
.atl-fees-matrix .atl-fees-sticky-start {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--bg-elev, #fff);
}
.atl-fees-table-wrap.is-scrollable .atl-fees-matrix .atl-fees-sticky-start {
  box-shadow: 8px 0 10px -6px rgba(15, 20, 16, 0.18);
}
.atl-fees-matrix thead .atl-fees-sticky-start {
  z-index: 4;
}
@media (min-width: 860px) {
  .atl-fees-year-table tbody tr:hover .atl-col-actions-sticky,
  .atl-fees-year-table tbody tr.atl-row-clickable:hover .atl-col-actions-sticky {
    background: color-mix(in srgb, var(--gold) 12%, var(--bg-elev, #fff));
  }
}
.atl-fees-matrix-form {
  max-width: 100%;
}
.atl-fees-matrix input[type="text"] {
  min-width: 5.5rem;
  width: 100%;
  max-width: 8rem;
  padding: 0.45rem 0.55rem;
}
.atl-th-actions {
  white-space: nowrap;
  text-align: right !important;
}
.atl-th-actions-label {
  margin-right: 0.45rem;
  vertical-align: middle;
}
.atl-th-actions .btn-icon-compact {
  vertical-align: middle;
}
/* Listagens: grelha de acções (padrão site — colunas reservadas, 32px) */
.atl-act-row {
  display: inline-grid;
  column-gap: 0.3rem;
  align-items: center;
  justify-content: end;
  width: max-content;
  max-width: 100%;
  margin-left: auto;
  vertical-align: middle;
}
.atl-act-row--1 { grid-template-columns: 32px; }
.atl-act-row--2 { grid-template-columns: 32px 32px; }
.atl-act-row--3 { grid-template-columns: 32px 32px 32px; }
.atl-act-row--extra-2,
.atl-act-row--extra-3,
.atl-act-row--child-actions,
.atl-act-row--text-3,
.atl-act-row--docs-3 {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  width: 100%;
  max-width: 100%;
  gap: 0.35rem;
}
.atl-act-icons-left {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.3rem;
}
@media (min-width: 901px) {
  .atl-act-row--extra-2 { display: inline-grid; grid-template-columns: 7.6rem 32px; width: max-content; gap: 0; column-gap: 0.3rem; }
  .atl-act-row--extra-3 { display: inline-grid; grid-template-columns: 32px 6.8rem 32px; width: max-content; gap: 0; column-gap: 0.3rem; }
  .atl-act-row--child-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    width: max-content;
    gap: 0.55rem;
    column-gap: 0.55rem;
  }
  .atl-act-row--text-3 { display: inline-grid; grid-template-columns: 32px 8.2rem 6.8rem; width: max-content; gap: 0; column-gap: 0.3rem; }
  .atl-act-row--docs-3 { display: inline-grid; grid-template-columns: 4.6rem 7.2rem 32px; width: max-content; gap: 0; column-gap: 0.3rem; }
}
.atl-act-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 32px;
  box-sizing: border-box;
}
.atl-act-slot form,
.atl-act-slot .admin-inline-form,
.atl-act-slot .admin-advanced {
  display: inline-flex;
  margin: 0;
  align-items: center;
  justify-content: center;
}
.atl-act-slot > .btn,
.atl-act-slot form > .btn {
  margin: 0;
}
.atl-act-row .btn-icon,
.atl-act-row .btn-icon-compact {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  box-sizing: border-box;
}
.atl-act-row .btn-sm:not(.btn-icon):not(.btn-icon-compact),
.atl-act-row .btn:not(.btn-icon):not(.btn-icon-compact) {
  height: 32px;
  min-height: 32px;
  box-sizing: border-box;
}
.admin-table:not(.atl-payments-table):not(.atl-attendance-table) td.row-actions > .atl-act-row:not(.atl-act-row--child-actions),
.admin-table td.cell-actions > .atl-act-row:not(.atl-act-row--child-actions),
.atl-fees-year-table td.row-actions > .atl-act-row,
.atl-mini-table td.row-actions > .atl-act-row {
  display: inline-grid;
}
.admin-table:not(.atl-payments-table):not(.atl-attendance-table) td.row-actions > .atl-act-row--child-actions,
.admin-table td.cell-actions > .atl-act-row--child-actions {
  display: inline-flex;
}
.admin-table:not(.atl-payments-table):not(.atl-attendance-table) td.row-actions:has(.atl-act-row),
.admin-table td.atl-col-actions:has(.atl-act-row),
.admin-table td.cell-actions:has(.atl-act-row) {
  display: table-cell;
  text-align: right;
  vertical-align: middle;
}
/* Listas: coluna Acções alinhada à direita */
.admin-table th:last-child,
.admin-table td.row-actions,
.admin-table td.atl-col-actions,
.admin-table td.cell-actions {
  text-align: right;
}
.admin-table td.row-actions,
.admin-table td.atl-col-actions,
.admin-table td.cell-actions {
  white-space: nowrap;
}
.admin-table td.row-actions,
.admin-table td.atl-col-actions {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-end;
  width: 1%;
  min-width: max-content;
  white-space: nowrap;
  vertical-align: middle;
}
.admin-table td.row-actions > .btn,
.admin-table td.row-actions > form,
.admin-table td.atl-col-actions > .btn,
.admin-table td.atl-col-actions > form {
  flex: 0 0 auto;
  width: auto;
  display: inline-flex;
  margin: 0;
}
.admin-table td.cell-actions .row-actions {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  min-width: max-content;
}
.atl-pickup-add-row > td {
  background: color-mix(in srgb, var(--bg-soft, #f3f4f6) 70%, transparent);
  border-bottom: 0;
  padding: 0.44rem 0.7rem;
}
.atl-pickup-add-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  align-items: center;
}
.atl-pickup-add-fields input {
  width: 100%;
  margin: 0;
}
.atl-pickup-add-fields .btn:not(.btn-icon) {
  width: 100%;
  justify-content: center;
}
.atl-pickup-add-fields .btn-icon {
  justify-self: start;
}
.atl-pickup-add-form .atl-inline-alert {
  margin: 0.55rem 0 0;
}
.atl-pickup-row--editing > td {
  background: color-mix(in srgb, var(--bg-soft, #f3f4f6) 70%, transparent);
  padding: 0.44rem 0.7rem;
}
.atl-pickup-edit-fields .btn-ghost:not(.btn-icon) {
  width: 100%;
  justify-content: center;
}
@media (min-width: 700px) {
  .atl-pickup-add-fields {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  }
  .atl-pickup-add-fields .btn:not(.btn-icon) {
    width: auto;
    white-space: nowrap;
  }
  .atl-pickup-edit-fields {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto auto;
  }
  .atl-pickup-edit-fields .btn-ghost:not(.btn-icon) {
    width: auto;
  }
}
@media (min-width: 860px) {
  #atl-autorizacoes .atl-pickup-auth-table.atl-pickup-auth-table--actions tr[data-pickup-id]:not(.atl-pickup-row--editing) {
    cursor: default;
  }
  #atl-autorizacoes .atl-pickup-auth-table.atl-pickup-auth-table--actions tbody tr[data-pickup-id]:not(.atl-pickup-row--editing):hover {
    background: color-mix(in srgb, var(--gold, #c9a227) 8%, transparent);
  }
}
.atl-toolbar {
  flex-wrap: wrap;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}
.atl-toolbar .btn {
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}
.atl-toolbar .admin-inline-form {
  flex: 0 1 auto;
  width: auto;
}
.atl-photo-field {
  margin: 0.35rem 0 1rem;
}
.atl-photo-file {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0.15rem 0 0.45rem;
  max-width: 100%;
}
.atl-photo-source-label {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}
.atl-photo-file-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.45rem;
  width: 100%;
  max-width: 100%;
}
.atl-photo-file input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.atl-photo-file-actions input[type="file"] {
  left: 0;
  top: 0;
}
.atl-photo-file-btn {
  flex: 1 1 auto;
  width: auto;
  max-width: 100%;
  min-height: 44px;
}
.atl-photo-file-name {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  word-break: break-word;
  max-width: 100%;
}
.atl-photo-crop {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 12px;
  background: #fafafa;
}
.atl-photo-crop-hint {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  color: var(--muted, #6b7280);
}
.atl-photo-crop-stage {
  max-width: 100%;
  max-height: 360px;
  margin: 0 auto;
  overflow: hidden;
  background: #111;
}
.atl-photo-crop-stage img {
  display: block;
  max-width: 100%;
}
.atl-photo-crop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.atl-photo-preview {
  margin: 0.35rem 0 0.6rem;
}
.atl-photo-preview img {
  width: 90px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border, #e5e5e5);
  display: block;
  background: #f5f5f5;
}
.atl-photo-preview img.is-placeholder {
  object-fit: contain;
  background: #e8ecef;
  padding: 0;
}
.atl-card-photo {
  width: 45px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid var(--border, #e5e5e5);
  background: #f5f5f5;
}
.atl-card-with-photo {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.atl-med-row {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed var(--border, #ddd);
}
.badge-warn {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #fff3e0;
  color: #c05600;
}
.pais-body .admin-main { padding-bottom: 5.5rem; }

.pais-shell .admin-side-top .brand-text strong {
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    overflow-wrap: break-word;
}

@media (max-width: 900px) {
    .pais-shell .admin-mobile-top .brand-text strong {
        font-size: 0.72rem;
        letter-spacing: 0.015em;
        line-height: 1.12;
    }
}
.atl-pwa-install-banner {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 9998;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, rgba(0,0,0,.08));
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
}
.atl-pwa-install-banner p { margin: 0 0 0.65rem; font-size: 0.92rem; }
.atl-pwa-install-hint { margin: 0 0 0.65rem; font-size: 0.85rem; line-height: 1.4; }
.atl-pwa-install-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.atl-pwa-install-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}
.atl-pwa-install-modal[hidden] {
  display: none !important;
}
body.atl-pwa-install-open {
  overflow: hidden;
}
.atl-pwa-install-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 9, 11, 0.72);
  backdrop-filter: blur(4px);
}
html[data-theme="light"] .atl-pwa-install-modal-backdrop {
  background: rgba(28, 32, 40, 0.45);
}
.atl-pwa-install-modal-dialog {
  position: relative;
  width: min(420px, 100%);
  max-height: min(90vh, 640px);
  overflow: auto;
  background: var(--bg-card, #fff);
  border: 1px solid var(--line, rgba(0,0,0,.08));
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,.22);
  padding: 1.25rem 1.2rem 1.1rem;
}
.atl-pwa-install-modal-title {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
  line-height: 1.25;
}
.atl-pwa-install-modal-intro {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text, inherit);
}
.atl-pwa-install-modal-steps {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.5;
}
.atl-pwa-install-modal-steps li + li {
  margin-top: 0.45rem;
}
.atl-pwa-install-modal-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.admin-side-nav .atl-pwa-install-menu,
.mobile-more-sheet > .atl-pwa-install-menu {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0.37rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elev);
  color: var(--gold);
  font-family: var(--font-body);
  font-size: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.admin-side-nav .atl-pwa-install-menu {
  border-color: color-mix(in srgb, var(--gold) 35%, var(--line));
  background: transparent;
  color: var(--gold);
}
.admin-side-nav .atl-pwa-install-menu:hover,
.mobile-more-sheet > .atl-pwa-install-menu:hover {
  background: var(--nav-link-hover-bg);
  color: var(--text);
  border-color: color-mix(in srgb, var(--gold) 25%, var(--line));
}
.admin-side-nav .atl-pwa-install-menu[hidden],
.mobile-more-sheet > .atl-pwa-install-menu[hidden] {
  display: none !important;
}
.mobile-more-sheet > .atl-pwa-install-menu {
  padding: 0.32rem 0.7rem;
  min-height: 2.25rem;
  box-sizing: border-box;
  flex-shrink: 0;
}
@media (max-width: 700px) {
  .atl-toolbar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    gap: 0.45rem;
  }
  .atl-toolbar .btn {
    flex: 0 1 auto;
    width: auto;
    max-width: none;
    min-height: 44px;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    font-size: 0.9rem;
  }
  .atl-med-row input { width: 100%; }
}

/* Lista crianças SGR — tabela paginada */
.atl-children-table-wrap {
  overflow-x: auto;
}
.atl-children-table {
  width: 100%;
  border-collapse: collapse;
}
.atl-children-table th,
.atl-children-table td {
  padding: 0.37rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.atl-children-table th {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.atl-children-table .atl-col-code {
  width: 1%;
  min-width: 5.5rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.atl-children-table .atl-col-photo {
  width: 52px;
}
.atl-children-table .atl-col-actions {
  width: 1%;
  white-space: nowrap;
}
.atl-table-photo {
  display: block;
  width: 36px;
  height: 48px;
  object-fit: cover;
  border-radius: 2px;
  background: var(--bg-elev);
}
.atl-child-photo-wrap {
  position: relative;
  display: inline-block;
  line-height: 0;
}
.atl-birthday-cake--photo {
  position: absolute;
  right: -0.2rem;
  bottom: -0.15rem;
  z-index: 1;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.08rem;
  border-radius: 999px;
  background: var(--bg-elev, #fff);
  box-shadow: 0 0 0 1px rgba(255, 102, 0, 0.55);
}
.atl-child-td-name--birthday,
.atl-child-td-name--birthday strong {
  color: var(--gold, #ff6600);
  font-weight: 700;
}
.atl-child-td-birth--birthday {
  color: var(--gold, #ff6600);
  font-weight: 600;
}
.admin-table tbody tr.atl-child-row--birthday {
  background: rgba(255, 102, 0, 0.1);
  background: color-mix(in srgb, var(--gold) 12%, var(--bg-elev, #fff));
}
.admin-table tbody tr.atl-child-row--birthday.is-unread {
  background: rgba(255, 102, 0, 0.14);
  background: color-mix(in srgb, var(--gold) 16%, #fff8e8);
}
.atl-row-clickable {
  cursor: pointer;
  transition: background 0.12s ease;
}
.atl-row-clickable:hover,
.atl-row-clickable:focus-visible {
  background: color-mix(in srgb, var(--gold) 14%, var(--bg-elev, #fff));
  outline: none;
}
.admin-table tbody tr.atl-row-clickable:hover,
.admin-table tbody tr.atl-row-clickable:focus-visible {
  background: color-mix(in srgb, var(--gold) 14%, var(--bg-elev, #fff));
}
.atl-row-clickable.atl-test-nearest:hover,
.atl-row-clickable.atl-test-nearest:focus-visible {
  background: color-mix(in srgb, var(--gold) 18%, var(--bg-elev, #fff));
}
/* Listas/quadros: hover visível em ecrãs maiores (facilita leitura linha a linha) */
@media (min-width: 860px) {
  .admin-table tbody tr {
    transition: background 0.12s ease;
  }
  .admin-table tbody tr:hover {
    background: color-mix(in srgb, var(--gold) 12%, var(--bg-elev, #fff));
  }
  .admin-table tbody tr.is-unread:hover {
    background: color-mix(in srgb, var(--gold) 16%, #fff8e8);
  }
  .admin-table tbody tr.atl-test-nearest:hover,
  .admin-table tbody tr.atl-test-nearest.atl-row-clickable:hover {
    background: color-mix(in srgb, var(--gold) 18%, var(--bg-elev, #fff));
  }
}
.atl-cell-clamp {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Ficha só leitura */
.atl-view-section {
  margin-top: 1rem;
}
.atl-view-dl {
  display: grid;
  gap: 0.65rem;
}
.atl-view-row {
  display: grid;
  gap: 0.15rem;
}
.atl-view-label {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.atl-view-value {
  color: var(--ink);
}
.atl-view-row-block .atl-view-value {
  white-space: pre-wrap;
}
.atl-view-row--multiline .atl-view-value {
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.atl-view-notes {
  margin: 0;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  /*
   * Lista crianças (móvel): cartão flex — dados à esquerda, foto colada à direita.
   * Evita grid de 3 colunas com min-width:0 (nome a partir letra a letra).
   * Desktop (≥901px) mantém a tabela.
   */
  .admin-body .atl-children-table-wrap {
    overflow: visible;
    max-width: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .admin-body .atl-children-table {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
  }
  .admin-body .atl-children-table thead {
    display: none;
  }
  .admin-body .atl-children-table tbody {
    display: block;
    width: 100%;
    max-width: 100%;
  }
  .admin-body .atl-children-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.2rem 0.55rem;
    position: relative;
    margin: 0 0 0.5rem;
    padding: 0.55rem 4.5rem 0.6rem 0.65rem; /* espaço à dir. para a foto */
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--atl-table-row-odd);
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .admin-body .atl-children-table tbody tr:nth-child(even) {
    background: var(--atl-table-row-even);
  }
  .admin-body .atl-children-table tbody td {
    display: block;
    flex: 1 1 calc(50% - 0.3rem);
    width: auto;
    max-width: 100%;
    height: auto !important;
    min-height: 0;
    min-width: 0;
    padding: 0 !important;
    border: 0;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed;
    box-sizing: border-box;
  }
  .admin-body .atl-children-table tbody td[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    display: block;
    font-size: 0.62rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 0.02rem;
  }
  /* Identidade: nome → código → nascimento (largura total da zona texto) */
  .admin-body .atl-children-table .atl-child-td-name {
    flex: 1 1 100%;
    order: 1;
    width: 100%;
    max-width: 100%;
    min-width: 12ch;
    font-size: 1.05rem;
    line-height: 1.3;
    font-weight: 700;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.4rem;
  }
  .admin-body .atl-children-table .atl-child-td-name .atl-birthday-cake {
    font-size: 1.3rem;
  }
  .admin-body .atl-children-table .atl-child-td-name .atl-birthday-today-badge {
    font-size: 0.72rem;
    padding: 0.18rem 0.5rem;
  }
  .admin-body .atl-children-table tbody tr.atl-child-row--birthday,
  .admin-body .atl-children-table tbody tr.atl-child-row--birthday:nth-child(even) {
    background: rgba(255, 102, 0, 0.12);
    background: color-mix(in srgb, var(--gold) 14%, var(--bg-elev, #fff));
    border-color: rgba(255, 102, 0, 0.55);
    border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
    box-shadow: 0 0 0 1px rgba(255, 102, 0, 0.22);
  }
  .admin-body .atl-children-table .atl-birthday-cake--photo {
    font-size: 1.15rem;
    right: -0.25rem;
    bottom: -0.2rem;
    padding: 0.12rem;
  }
  .admin-body .atl-children-table .atl-child-td-name::before {
    content: none !important;
    display: none !important;
  }
  .admin-body .atl-children-table .atl-child-td-name strong {
    display: inline;
    font-weight: 700;
    font-style: normal;
    writing-mode: horizontal-tb !important;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
  }
  .admin-body .atl-children-table .atl-col-code,
  .admin-body .atl-children-table .atl-child-td-code {
    flex: 1 1 100%;
    order: 2;
    width: auto !important;
    min-width: 0 !important;
    font-size: 0.875rem;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
    line-height: 1.3;
  }
  .admin-body .atl-children-table .atl-child-td-code::before {
    content: none !important;
    display: none !important;
  }
  .admin-body .atl-children-table .atl-child-td-birth {
    flex: 1 1 100%;
    order: 3;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.3;
  }
  .admin-body .atl-children-table .atl-child-td-birth::before {
    content: none !important;
    display: none !important;
  }
  /* Foto colada ao canto superior direito do cartão */
  .admin-body .atl-children-table .atl-col-photo,
  .admin-body .atl-children-table .atl-child-td-photo {
    position: absolute;
    top: 0.55rem;
    right: 0.65rem;
    flex: none;
    order: 0;
    width: auto !important;
    min-width: 0 !important;
    margin: 0;
    padding: 0 !important;
  }
  .admin-body .atl-children-table .atl-child-td-photo::before {
    content: none !important;
    display: none !important;
  }
  .admin-body .atl-children-table .atl-table-photo {
    width: 56px;
    height: 72px;
  }
  /* Restantes campos sob a identidade */
  .admin-body .atl-children-table .atl-child-td-phone {
    order: 4;
    font-size: 0.875rem;
    line-height: 1.3;
  }
  .admin-body .atl-children-table .atl-child-td-modality {
    order: 5;
    font-size: 0.875rem;
    line-height: 1.3;
  }
  .admin-body .atl-children-table .atl-child-td-status {
    order: 6;
    font-size: 0.875rem;
    line-height: 1.3;
  }
  .admin-body .atl-children-table .atl-child-td-health {
    order: 7;
    font-size: 0.8125rem;
    line-height: 1.3;
    color: var(--muted);
  }
  .admin-body .atl-children-table .atl-child-td-notes {
    flex: 1 1 100%;
    order: 8;
    font-size: 0.8125rem;
    line-height: 1.3;
    color: var(--muted);
  }
  .atl-children-table .atl-cell-clamp {
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    overflow-wrap: break-word;
  }
  .admin-body .atl-children-table td.row-actions,
  .admin-body .atl-children-table td.atl-col-actions,
  .admin-body .atl-children-table .atl-child-td-actions,
  .admin-body .table-wrap > .atl-children-table td.row-actions,
  .admin-body .table-wrap > .atl-children-table td.atl-col-actions {
    flex: 1 1 100%;
    order: 9;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 0.25rem;
    padding-top: 0.4rem;
    border-top: 1px solid var(--line);
    text-align: right;
    white-space: normal;
  }
  .admin-body .atl-children-table td.row-actions > .atl-act-row,
  .admin-body .atl-children-table td.atl-col-actions > .atl-act-row,
  .admin-body .atl-children-table .atl-act-row,
  .admin-body .atl-children-table .atl-act-row--extra-2,
  .admin-body .atl-children-table .atl-act-row--child-actions {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }
  .admin-body .atl-children-table .atl-act-row--extra-2 .atl-act-slot,
  .admin-body .atl-children-table .atl-act-row--child-actions .atl-act-slot,
  .admin-body .atl-children-table .atl-act-slot {
    flex: 0 0 auto !important;
    width: auto;
    min-width: 0;
  }
  .admin-body .atl-children-table .atl-act-row--child-actions .atl-act-slot:first-child {
    justify-content: flex-start;
    margin-right: 0;
  }
  .admin-body .atl-children-table .atl-act-row--child-actions .atl-act-slot:nth-child(2):not([aria-hidden="true"]) {
    flex: 1 1 auto !important;
    justify-content: center;
    min-width: 0;
  }
  .admin-body .atl-children-table .atl-act-row--child-actions .atl-act-slot:last-child {
    justify-content: flex-end;
    margin-left: 0;
  }
  .admin-body .atl-children-table .atl-act-icons-left {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.3rem;
  }
  .admin-body .atl-children-table .atl-act-slot[aria-hidden="true"] {
    display: none !important;
  }
  .admin-body .atl-children-table .atl-act-slot .btn:not(.btn-icon):not(.btn-icon-compact),
  .admin-body .atl-children-table .atl-act-slot form {
    width: auto !important;
    max-width: none;
    flex: 0 0 auto;
  }
  .admin-body .atl-children-table .atl-act-slot .btn {
    white-space: nowrap;
  }
}

.atl-generate-preview {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.atl-sibling-group {
  margin: 0.85rem 0 1rem;
}
.atl-sibling-group-title {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
}
.atl-sibling-preview-table th,
.atl-sibling-preview-table td {
  vertical-align: middle;
}
.atl-sibling-preview-table th.atl-sib-preview-rule,
.atl-sibling-preview-table td.atl-sib-preview-rule {
  text-align: right;
}
.atl-sibling-preview-table tfoot th,
.atl-sibling-preview-table tfoot td {
  border-top: 1px solid var(--line);
  padding-top: 0.55rem;
  font-weight: 700;
}
.atl-sibling-preview-table .atl-sib-preview-sum {
  white-space: nowrap;
}
.atl-generate-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.atl-preview-scope {
  margin: 0.75rem 0 1rem;
  padding: 0.55rem 0.9rem 0.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}
.atl-preview-scope legend {
  font-weight: 600;
  padding: 0 0.3rem;
}
.atl-preview-scope .atl-inline-check {
  display: inline-flex;
  margin: 0.2rem 1.1rem 0.5rem 0;
}
.atl-preview-scope .field-hint {
  margin: 0 0 0.5rem;
}
.atl-inline-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.4rem 0 0.85rem;
  font-weight: 500;
}
.atl-inline-check input {
  width: auto;
  margin: 0;
}

/* Pagamentos SGR — acções à esquerda, compactas */
.admin-table.atl-payments-table tfoot .atl-pay-total-row {
  background: color-mix(in srgb, var(--gold) 8%, var(--bg-elev));
}
.admin-table.atl-payments-table tfoot .atl-pay-total-row th,
.admin-table.atl-payments-table tfoot .atl-pay-total-row td {
  border-top: 1px solid var(--line);
  font-weight: 600;
  background: inherit;
}
.admin-table.atl-payments-table tfoot .atl-pay-total-row .atl-pay-amount-cell {
  font-weight: 700;
  white-space: nowrap;
}
.admin-table.atl-payments-table th.atl-col-actions,
.admin-table.atl-payments-table th:last-child {
  text-align: left;
}
@media (min-width: 901px) {
  .admin-table.atl-payments-table td.atl-col-actions,
  .admin-table.atl-payments-table td.row-actions {
    display: table-cell;
    text-align: left;
    width: 1%;
    min-width: 0;
    max-width: none;
    white-space: nowrap;
    vertical-align: middle;
    justify-content: flex-start;
  }
}
.atl-payments-table .atl-pay-row,
.atl-payments-table .atl-pay-form,
.atl-payments-table .atl-pay-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.6rem 32px;
  grid-template-areas:
    "method amount check"
    "undo del hist"
    "notes notes notes";
  column-gap: 0.35rem;
  row-gap: 0.35rem;
  align-items: center;
  justify-content: stretch;
  width: 100%;
  max-width: 100%;
}
@media (min-width: 901px) {
  .atl-payments-table .atl-pay-row,
  .atl-payments-table .atl-pay-form,
  .atl-payments-table .atl-pay-fields {
    grid-template-columns: 8.4rem 4.4rem 32px 32px 32px 32px minmax(0, auto);
    grid-template-areas: "method amount check undo del hist notes";
    column-gap: 0.3rem;
    row-gap: 0;
    justify-content: start;
    width: max-content;
  }
}
.atl-payments-table .atl-pay-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 32px;
  box-sizing: border-box;
}
.atl-payments-table .atl-pay-cell-method {
  grid-area: method;
  justify-content: flex-start;
}
.atl-payments-table .atl-pay-cell-amount {
  grid-area: amount;
  justify-content: flex-end;
}
.atl-payments-table .atl-pay-cell-check {
  grid-area: check;
  justify-content: center;
  width: 32px;
}
.atl-payments-table .atl-pay-cell-undo {
  grid-area: undo;
  justify-content: center;
  width: 32px;
}
.atl-payments-table .atl-pay-cell-del {
  grid-area: del;
  justify-content: center;
  width: 32px;
}
.atl-payments-table .atl-pay-cell-hist {
  grid-area: hist;
  justify-content: center;
  width: 32px;
  overflow: visible;
}
.atl-payments-table .atl-pay-cell-notes {
  grid-area: notes;
  justify-content: flex-start;
}
.atl-ym-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.75rem;
}
.atl-ym-row label {
  display: inline-flex;
  align-items: center;
  margin: 0;
  width: auto;
  white-space: nowrap;
}
.atl-generate-box .atl-ym-row .atl-ym-input,
.admin-filters .atl-ym-row .atl-ym-input,
.atl-ym-input {
  width: calc(6.4rem - 5px + 20px);
  max-width: calc(6.4rem - 5px + 20px);
  min-width: 0;
  flex: 0 0 calc(6.4rem - 5px + 20px);
}
.admin-filters select.atl-ym-input {
  width: calc(7.2rem - 5px + 20px);
  max-width: calc(7.2rem - 5px + 20px);
  flex: 0 0 calc(7.2rem - 5px + 20px);
}
.admin-filters .atl-ym-row .atl-status-input,
.atl-status-input {
  width: 9.2rem;
  max-width: 9.2rem;
  min-width: 0;
  flex: 0 0 9.2rem;
}
.atl-ym-row .btn {
  flex: 0 0 auto;
  width: auto;
}
.atl-annual-pay-box .atl-annual-pay-select select,
.atl-financas-filters select {
  min-height: var(--control-h, 32px);
  max-width: 100%;
  flex: 1 1 12rem;
}
.atl-annual-pay-box .atl-annual-pay-select select#annual_child_id {
  flex: 1 1 14rem;
  min-width: 0;
}
@media (max-width: 900px) {
  .atl-annual-pay-box .atl-annual-pay-select,
  .atl-financas-filters {
    align-items: stretch;
  }
  .atl-annual-pay-box .atl-annual-pay-select select,
  .atl-financas-filters select {
    flex: 1 1 100%;
    width: 100%;
  }
}
.atl-pay-batch-bar {
  position: sticky;
  bottom: calc(var(--atl-dock-h, 0px) + 8px);
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.55rem 0.8rem;
  background: var(--bg, #fff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.atl-pay-batch-bar .btn {
  min-height: 32px;
  height: 32px;
}
.atl-payments-table .atl-pay-method,
.atl-payments-table .atl-pay-now {
  height: 32px;
  min-height: 32px;
  box-sizing: border-box;
  line-height: 1;
}
.atl-payments-table .atl-pay-method {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0 0.35rem;
  font-size: 0.82rem;
}
.atl-payments-table .atl-pay-now {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0 0.3rem;
  font-size: 0.82rem;
  text-align: right;
}
.atl-payments-table .atl-pay-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  margin: 0;
  cursor: pointer;
}
.atl-payments-table .atl-pay-check-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.atl-payments-table .atl-pay-check-box {
  display: block;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--gold, #c4a35a);
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
}
.atl-payments-table .atl-pay-check-input:checked + .atl-pay-check-box,
.atl-payments-table .atl-pay-check-input:disabled:checked + .atl-pay-check-box {
  background: var(--gold, #c4a35a);
  box-shadow: inset 0 0 0 3px #fff;
}
.atl-payments-table .atl-pay-check-input:focus-visible + .atl-pay-check-box {
  outline: 2px solid var(--gold, #c4a35a);
  outline-offset: 2px;
}
.atl-payments-table .atl-pay-row > .btn-icon-compact,
.atl-payments-table .atl-pay-row .btn-icon-compact {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  box-sizing: border-box;
}
.atl-payments-table .atl-pay-row > .btn-icon-compact .btn-icon-svg,
.atl-payments-table .atl-pay-row .btn-icon-compact .btn-icon-svg {
  width: 1rem;
  height: 1rem;
}
.atl-payments-table .atl-pay-audit-wrap {
  position: relative;
  display: inline-flex;
  width: auto;
  max-width: none;
  vertical-align: middle;
}
.atl-payments-table .atl-pay-audit-btn.atl-att-audit-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: var(--bg-elev, #fff);
  color: var(--gold);
  text-decoration: none;
  box-sizing: border-box;
}
.atl-payments-table .atl-pay-audit-btn.atl-att-audit-trigger:hover,
.atl-payments-table .atl-pay-audit-btn.atl-att-audit-trigger:focus-visible {
  text-decoration: none;
  color: var(--gold);
}
.atl-payments-table .atl-pay-sheet-icon {
  display: block;
  width: 16px;
  height: 16px;
}
@media (min-width: 860px) {
  .atl-payments-table .atl-pay-audit-wrap:hover .atl-att-audit-popover,
  .atl-payments-table .atl-pay-audit-wrap:focus-within .atl-att-audit-popover {
    display: none;
  }
  .atl-payments-table .atl-pay-audit-wrap.is-open .atl-att-audit-popover {
    display: block;
  }
}
.atl-payments-table .atl-pay-notes-wrap {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}
.atl-payments-table .atl-pay-notes-wrap[hidden] {
  display: none !important;
}
.atl-payments-table .atl-pay-notes {
  width: 100%;
  max-width: 14rem;
  min-width: 8rem;
}
.atl-payments-table .atl-pay-paid-meta {
  font-size: 0.85rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.atl-payments-table .atl-pay-td-meta {
  display: none;
}
@media (max-width: 900px) {
  /*
   * Pagamentos móvel: cartão compacto (nome + valor + estado + controlos).
   * Proibido empilhar Criança/Mês/Descrição/Valor/Estado/Venc. como lista
   * de definição — isso esconde método, valor, checkbox e Guardar sob o dock.
   */
  .admin-body .atl-pay-table-wrap {
    overflow: visible;
    max-width: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .admin-body .atl-payments-table {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
  }
  .admin-body .atl-payments-table thead {
    display: none;
  }
  .admin-body .atl-payments-table tbody,
  .admin-body .atl-payments-table tfoot {
    display: block;
    width: 100%;
    max-width: 100%;
  }
  .admin-body .atl-payments-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.15rem 0.55rem;
    margin: 0 0 0.5rem;
    padding: 0.55rem 0.65rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--atl-table-row-odd);
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: visible;
  }
  .admin-body .atl-payments-table tbody tr:nth-child(even) {
    background: var(--atl-table-row-even);
  }
    .admin-body .atl-payments-table tbody td {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto !important;
    min-height: 0;
    padding: 0;
    border: 0;
    white-space: normal;
    overflow: visible;
    overflow-wrap: break-word;
    box-sizing: border-box;
  }
  .admin-body .atl-payments-table tbody td::before,
  .admin-body .atl-payments-table tbody td[data-label]::before {
    content: none !important;
    display: none !important;
  }
  .admin-body .atl-payments-table .atl-pay-td-child {
    order: 1;
    flex: 1 1 0;
    min-width: 0;
    font-size: 0.95rem;
    line-height: 1.3;
  }
  .admin-body .atl-payments-table .atl-pay-td-amount {
    order: 2;
    flex: 0 1 auto;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    white-space: nowrap;
  }
  .admin-body .atl-payments-table .atl-pay-td-status {
    order: 3;
    flex: 0 0 auto;
    font-weight: 650;
    text-align: right;
  }
  .admin-body .atl-payments-table .atl-pay-td-month,
  .admin-body .atl-payments-table .atl-pay-td-desc,
  .admin-body .atl-payments-table .atl-pay-td-due {
    display: none !important;
  }
  .admin-body .atl-payments-table .atl-pay-td-meta {
    display: block;
    order: 4;
    flex: 1 1 100%;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.3;
  }
  .admin-table.atl-payments-table td.atl-col-actions,
  .admin-table.atl-payments-table td.row-actions,
  .admin-body .atl-payments-table td.row-actions,
  .admin-body .atl-payments-table td.atl-col-actions {
    display: block;
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 0.3rem;
    padding-top: 0.4rem;
    border-top: 1px solid var(--line);
    text-align: left;
    white-space: normal;
    overflow: visible;
    order: 5;
  }
  .admin-body .atl-payments-table .atl-pay-row,
  .admin-body .atl-payments-table .atl-pay-fields {
    display: grid;
    grid-template-columns: minmax(5.2rem, 1fr) 4.4rem 32px 32px 32px 32px;
    grid-template-areas:
      "method amount check undo del hist"
      "notes notes notes notes notes notes";
    column-gap: 0.28rem;
    row-gap: 0.3rem;
    align-items: center;
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }
  .admin-body .atl-payments-table .atl-pay-cell-method {
    grid-area: method;
    min-width: 0;
    max-width: 100%;
  }
  .admin-body .atl-payments-table .atl-pay-cell-amount {
    grid-area: amount;
    width: 4.6rem;
  }
  .admin-body .atl-payments-table .atl-pay-cell-check { grid-area: check; }
  .admin-body .atl-payments-table .atl-pay-cell-undo { grid-area: undo; }
  .admin-body .atl-payments-table .atl-pay-cell-del { grid-area: del; }
  .admin-body .atl-payments-table .atl-pay-cell-hist { grid-area: hist; }
  .admin-body .atl-payments-table .atl-pay-cell-notes { grid-area: notes; }
  .admin-body .atl-pay-batch {
    padding-bottom: calc(var(--atl-dock-h, 45px) + 3.5rem);
  }
  .admin-body .atl-pay-batch-bar {
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    bottom: calc(var(--atl-dock-h, 0px) + 8px);
    overflow: visible;
  }
  .admin-body .atl-payments-table tfoot .atl-pay-total-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0 0 0.5rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--gold) 8%, var(--bg-elev));
  }
  .admin-body .atl-payments-table tfoot .atl-pay-total-row th,
  .admin-body .atl-payments-table tfoot .atl-pay-total-row td {
    display: block;
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    flex: 0 1 auto;
  }
  .admin-body .atl-payments-table tfoot td:empty,
  .admin-body .atl-payments-table tfoot td[colspan]:empty {
    display: none;
  }
}

/* Campo data dd-MM-yyyy (+ calendário nativo) — STANDARD largura mínima */
.atl-date-field {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  width: var(--atl-date-text-w);
  max-width: 100%;
  vertical-align: middle;
  flex: 0 0 auto;
}
.atl-date-field .atl-date-text {
  width: 100%;
  max-width: 100%;
  padding-right: 2.35rem;
  font-variant-numeric: tabular-nums;
}
.atl-date-field .atl-date-picker-btn {
  position: absolute;
  right: 0.2rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.atl-date-field .atl-date-picker-btn:hover,
.atl-date-field .atl-date-picker-btn:focus-visible {
  color: var(--gold);
  outline: none;
}
.atl-date-field .atl-date-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  border: 0;
  padding: 0;
  margin: 0;
}
/* Controlo E/Saídas — folha diária (tabela) */
.atl-attendance-date-block {
  margin-bottom: 0.35rem;
}
/* Role user: sem navegação de data — maximizar altura útil */
.admin-main:has(.atl-attendance-page--ops) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  box-sizing: border-box;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.atl-attendance-page--ops {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.admin-main:has(.atl-attendance-page--ops) .atl-ficha-heading {
  margin-bottom: 0.2rem;
}
.atl-attendance-page--ops .atl-attendance-date-block {
  margin-bottom: 0.15rem;
}
.atl-attendance-page--ops .atl-attendance-board {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
@media (min-width: 860px) {
  .atl-attendance-page--ops .atl-attendance-table-wrap {
    flex: 1 1 auto;
    min-height: 10rem;
    max-height: calc(100vh - 10.5rem);
    overflow: auto;
  }
}
.atl-attendance-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
}
.atl-attendance-toolbar-nav {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  flex: 0 1 auto;
  min-width: 0;
}
.atl-attendance-date-form {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0;
  flex: 0 0 auto;
}
.atl-attendance-stats {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 0 0 0 auto;
  flex: 0 0 auto;
}
.atl-attendance-movements {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem 0.85rem;
}
.atl-attendance-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.atl-attendance-stat .atl-att-door-icon {
  width: auto;
  height: var(--atl-att-heading-size, 2.75rem);
  flex-shrink: 0;
}
.atl-attendance-stat-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: var(--atl-att-heading-size, 2.75rem);
  min-height: var(--atl-att-heading-size, 2.75rem);
  padding: 0 0.35rem;
  border: 2px solid #2a2a2a;
  border-radius: 4px;
  background: linear-gradient(180deg, #fff 0%, #f3f3f3 100%);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: var(--atl-att-stat-num-size, 1.2rem);
  line-height: 1;
  color: var(--text);
}
.atl-attendance-stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.atl-attendance-house-stat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-left: 0;
}
.atl-attendance-house-wrap {
  position: relative;
  display: block;
  width: calc(var(--atl-att-heading-size, 2.75rem) * 72 / 40);
  height: var(--atl-att-heading-size, 2.75rem);
  flex-shrink: 0;
}
.atl-attendance-house-icon {
  display: block;
  width: 100%;
  height: 100%;
}
.atl-attendance-house-count {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: var(--atl-att-stat-num-size, 1.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #1b5e20;
  pointer-events: none;
}
.atl-attendance-date-label {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
}
.atl-attendance-toolbar .btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}
.atl-attendance-day-label {
  margin: 0.4rem 0 1rem;
}
.atl-attendance-readonly-note {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--gold) 10%, var(--bg-elev, #fff));
  color: var(--text);
}
.atl-attendance-board.is-readonly .atl-att-time-native,
.atl-attendance-board.is-readonly .atl-att-time-pick select,
.atl-attendance-board.is-readonly .atl-att-delivered,
.atl-attendance-board.is-readonly .atl-att-notes {
  opacity: 0.92;
  cursor: default;
  background: color-mix(in srgb, var(--line) 18%, var(--bg-elev, #fff));
}
.atl-attendance-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.atl-attendance-table {
  min-width: 980px;
  width: 100%;
}
.atl-att-entry-readonly {
  display: flex;
  align-items: center;
  min-height: 2.5rem;
}
.atl-att-block--entry.is-empty {
  display: none;
}
td.atl-att-col--entry.is-entry-empty {
  color: transparent;
}
td.atl-att-col--entry.is-entry-empty::before {
  content: none !important;
}
.atl-att-entry-notice {
  display: none;
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  line-height: 1.35;
}
.atl-att-entry-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  background: color-mix(in srgb, #2e7d32 14%, var(--bg-elev, #fff));
  color: #1b5e20;
  border: 1px solid color-mix(in srgb, #2e7d32 35%, var(--line, #ddd));
}
.atl-att-entry-badge--empty {
  background: transparent;
  border-color: transparent;
  font-weight: 500;
}
.atl-attendance-table th.atl-att-col--entry,
.atl-attendance-table td.atl-att-col--entry {
  min-width: 5.5rem;
  max-width: 7rem;
}
.atl-attendance-table thead th {
  white-space: nowrap;
  vertical-align: middle;
}
.atl-attendance-table td {
  vertical-align: middle;
}
.atl-attendance-table tbody tr[data-has-entry="0"] {
  display: none;
}
.atl-attendance-table tbody tr[hidden],
.atl-attendance-table tbody tr.is-exit-filter-hidden {
  display: none !important;
}
.atl-attendance-empty-exits {
  margin: 0.35rem 0;
}
.atl-attendance-table .atl-att-name {
  min-width: 8.5rem;
  white-space: nowrap;
}
.atl-att-name-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  min-width: 0;
}
.atl-att-name-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.08rem;
  min-width: 0;
}
.atl-att-name-text {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.atl-att-phone {
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--muted, #6b6b6b);
  text-decoration: none;
  white-space: nowrap;
}
a.atl-att-phone:hover,
a.atl-att-phone:focus {
  text-decoration: underline;
}
.atl-att-name-text .atl-birthday-cake {
  font-size: 1.15rem;
}
.atl-att-name--birthday .atl-att-name-text strong {
  color: var(--gold);
  font-weight: 700;
}
.atl-attendance-table tbody tr:has(.atl-att-name--birthday) td.atl-att-name,
.atl-quick-row:has(.atl-birthday-cake) {
  background: rgba(255, 102, 0, 0.1);
  background: color-mix(in srgb, var(--gold) 12%, var(--bg-elev, #fff));
}
.atl-quick-name-wrap .atl-birthday-cake {
  font-size: 1.2rem;
}
.atl-att-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  overflow: visible;
}
.atl-att-door-icon {
  display: block;
  flex-shrink: 0;
  height: auto;
  overflow: visible;
}
.atl-att-status .atl-att-door-icon {
  width: 1.375rem;
}
.atl-attendance-table .atl-att-name .atl-child-code-badge {
  margin-left: 0;
}
.atl-attendance-table th.atl-att-group {
  text-align: center;
}
.atl-attendance-table th.atl-att-group--morning,
.atl-attendance-table th.atl-att-col--morning,
.atl-attendance-table td.atl-att-col--morning {
  background: color-mix(in srgb, var(--gold) 14%, var(--bg-elev, #fff));
}
.atl-attendance-table th.atl-att-group--morning,
.atl-attendance-table th.atl-att-col--morning {
  color: var(--gold);
  border-bottom-color: color-mix(in srgb, var(--gold) 35%, var(--line, #ddd));
}
.atl-attendance-table th.atl-att-group--afternoon,
.atl-attendance-table th.atl-att-col--afternoon,
.atl-attendance-table td.atl-att-col--afternoon {
  background: color-mix(in srgb, var(--gold-2) 14%, var(--bg-elev, #fff));
}
.atl-attendance-table th.atl-att-group--afternoon,
.atl-attendance-table th.atl-att-col--afternoon {
  color: var(--gold-2);
  border-bottom-color: color-mix(in srgb, var(--gold-2) 35%, var(--line, #ddd));
}
.atl-attendance-table tbody tr:nth-child(even) td.atl-att-col--morning {
  background: color-mix(in srgb, var(--gold) 14%, var(--atl-table-row-even));
}
.atl-attendance-table tbody tr:nth-child(even) td.atl-att-col--afternoon {
  background: color-mix(in srgb, var(--gold-2) 14%, var(--atl-table-row-even));
}
@media (min-width: 860px) {
  .atl-attendance-table tbody tr.atl-row-clickable:hover td.atl-att-col--morning {
    background: color-mix(in srgb, var(--gold) 22%, var(--bg-elev, #fff));
  }
  .atl-attendance-table tbody tr.atl-row-clickable:hover td.atl-att-col--afternoon {
    background: color-mix(in srgb, var(--gold-2) 22%, var(--bg-elev, #fff));
  }
  .atl-attendance-table thead th,
  .atl-attendance-table tbody td {
    padding: 0.12rem 0.4rem;
  }
  .atl-attendance-table tbody tr[data-has-entry="0"] {
    display: none;
  }
  .atl-att-entry-readonly {
    min-height: 1.65rem;
  }
  .atl-att-entry-badge {
    padding: 0.08rem 0.4rem;
    font-size: 0.75rem;
  }
  .atl-attendance-table .atl-att-time-native,
  .atl-attendance-table .atl-att-delivered,
  .atl-attendance-table .atl-att-notes {
    min-height: 1.65rem;
    padding: 0.1rem 0.3rem;
    font-size: 0.86rem;
    line-height: 1.2;
  }
  .atl-att-time-pick select,
  .atl-att-time-now {
    min-height: 1.65rem;
    padding: 0.1rem 0.3rem;
    font-size: 0.86rem;
  }
  .atl-attendance-table .atl-att-name-text strong {
    font-size: 0.92rem;
  }
  .atl-att-name-meta {
    flex-direction: row;
    align-items: baseline;
    gap: 0.5rem;
  }
  .atl-att-phone {
    font-size: 0.78rem;
  }
  .atl-attendance-table td.row-actions .btn-icon-compact {
    min-width: 1.85rem;
    width: 1.85rem;
    height: 1.85rem;
  }
  .atl-attendance-table td.row-actions .btn-icon-compact .btn-icon-svg {
    width: 1.05rem;
    height: 1.05rem;
  }
}
.atl-attendance-table .atl-att-time-native {
  width: 6.5rem;
  max-width: 100%;
  padding: 0.35rem 0.4rem;
  min-height: 2.5rem;
}
.atl-att-time-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.atl-att-time-wrap .atl-att-time-native {
  flex: 1 1 6.5rem;
  min-width: 0;
}
.atl-att-time-row {
  display: contents;
}
.atl-att-time-pick {
  display: none;
  align-items: center;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
}
.atl-att-time-pick select {
  flex: 1 1 4rem;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.4rem 0.35rem;
  font-size: 1rem;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev, #fff);
  color: var(--text);
}
.atl-att-time-sep {
  flex: 0 0 auto;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1;
}
.atl-att-time-now {
  display: none;
  flex: 0 0 auto;
  min-height: 2.5rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
}
.atl-attendance-table .atl-att-time-native::-webkit-calendar-picker-indicator {
  opacity: 1;
  cursor: pointer;
  width: 1.25rem;
  height: 1.25rem;
}
.atl-attendance-table .atl-att-delivered {
  width: 7.5rem;
  min-width: 6rem;
  max-width: 10rem;
  padding: 0.35rem 0.4rem;
}
.atl-att-delivered-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  min-width: 0;
}
.atl-att-delivered-wrap .atl-att-delivered {
  width: 100%;
  max-width: 10rem;
}
.atl-att-delivered.is-pickup-ok {
  border-color: #2e7d32;
  background: color-mix(in srgb, #2e7d32 12%, var(--bg-elev, #fff));
}
.atl-att-delivered.is-pickup-warn {
  border-color: #ef6c00;
  background: color-mix(in srgb, #ef6c00 14%, var(--bg-elev, #fff));
}
.atl-att-pickup-hint {
  display: block;
  font-size: 0.72rem;
  line-height: 1.25;
  max-width: 10rem;
}
.atl-att-pickup-hint.is-ok {
  color: #2e7d32;
}
.atl-att-pickup-hint.is-warn {
  color: #e65100;
}
.atl-att-notes.is-required-for-pickup {
  border-color: #ef6c00;
}
.atl-attendance-table .atl-att-notes {
  width: 8rem;
  min-width: 6rem;
  max-width: 12rem;
  padding: 0.35rem 0.4rem;
}
.atl-attendance-table .atl-att-audit {
  font-size: 0.78rem;
  max-width: 11rem;
  line-height: 1.25;
  white-space: normal;
  position: relative;
  vertical-align: top;
  overflow: visible;
}
.atl-att-row-msg {
  display: none;
  width: 100%;
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  line-height: 1.3;
  text-align: right;
}
.atl-att-row-msg.is-visible {
  display: block;
}
.atl-att-row-msg.is-error {
  color: #b71c1c;
}
.atl-att-row-msg.is-ok {
  color: #2e7d32;
}
.atl-att-audit-wrap {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}
.atl-att-audit-trigger {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  line-height: 1.25;
}
.atl-att-audit-trigger:hover,
.atl-att-audit-trigger:focus-visible {
  color: var(--text);
  text-decoration: underline;
  outline: none;
}
.atl-att-audit-summary {
  display: block;
  width: 100%;
  max-width: 100%;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}
.atl-att-audit-popover {
  display: none;
  position: fixed;
  z-index: 200;
  min-width: 14rem;
  max-width: min(22rem, calc(100vw - 1rem));
  max-height: min(22rem, 60vh);
  overflow-y: auto;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev, #fff);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  color: var(--text);
  text-align: left;
  white-space: normal;
}
.atl-att-audit-wrap.is-open .atl-att-audit-popover {
  display: block;
}
@media (min-width: 860px) {
  .atl-att-audit-wrap:hover .atl-att-audit-popover,
  .atl-att-audit-wrap:focus-within .atl-att-audit-popover {
    display: block;
  }
}
.atl-att-audit-pop-title {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.atl-att-audit-pop-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.atl-att-audit-pop-list li {
  margin: 0 0 0.4rem;
  padding: 0 0 0.35rem;
  border-bottom: 1px solid var(--line);
}
.atl-att-audit-pop-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.atl-att-audit-pop-label {
  display: block;
  font-weight: 700;
  font-size: 0.8rem;
}
.atl-att-audit-pop-meta {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
}
.atl-att-detail-actions {
  display: contents;
}
.atl-att-back-detail {
  display: none;
}
.atl-attendance-row-form {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.atl-attendance-table td.row-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.2rem;
}
.atl-att-save-label {
  display: none;
}
.atl-attendance-back-list {
  display: none;
  margin: 0 0 0.75rem;
}
@media (max-width: 859px) {
  .atl-attendance-table-wrap {
    overflow: visible;
  }
  .atl-attendance-table {
    min-width: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
  }
  .atl-attendance-table thead {
    display: none;
  }
  .atl-attendance-table,
  .atl-attendance-table tbody {
    display: block;
  }
  .atl-attendance-table tbody tr {
    display: block;
    margin: 0 0 0.65rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--atl-table-row-odd);
    cursor: pointer;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
  }
  .atl-attendance-table tbody tr:nth-child(even) {
    background: var(--atl-table-row-even);
  }
  .atl-attendance-table tbody tr[hidden],
  .atl-attendance-table tbody tr.is-exit-filter-hidden {
    display: none !important;
  }
  .atl-attendance-table tbody tr.is-save-flash {
    border-color: #2e7d32;
    background: color-mix(in srgb, #2e7d32 10%, var(--bg-elev, #fff));
    box-shadow: 0 0 0 2px color-mix(in srgb, #2e7d32 28%, transparent);
  }
  .atl-attendance-table .atl-att-name {
    white-space: normal;
    font-size: 1.05rem;
  }
  .atl-att-status .atl-att-door-icon {
    width: 1.85rem;
  }
  .atl-ficha-heading-center .atl-attendance-stat .atl-att-door-icon {
    width: auto;
    height: var(--atl-att-heading-size, 1.4rem);
    flex-shrink: 0;
  }
  .atl-attendance-toolbar-nav {
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }
  .atl-ficha-heading:has(.atl-ficha-heading-center) {
    --atl-att-heading-size: 1.4rem;
    --atl-att-stat-num-size: clamp(0.72rem, 2.6vw, 0.85rem);
    flex-wrap: nowrap;
    gap: 0.25rem 0.35rem;
  }
  .atl-ficha-heading:has(.atl-ficha-heading-center) .btn-icon-compact {
    min-width: 2.25rem;
    width: 2.25rem;
    height: 2.25rem;
  }
  .atl-ficha-heading:has(.atl-ficha-heading-center) .admin-title {
    font-size: clamp(0.88rem, 3.2vw, 1.35rem);
    white-space: nowrap;
  }
  .atl-ficha-heading:has(.atl-ficha-heading-center) .atl-ficha-heading-main {
    flex: 0 1 auto;
    min-width: 0;
  }
  .atl-ficha-heading-center .atl-attendance-stats {
    width: auto;
  }
  .atl-ficha-heading-center .atl-attendance-movements {
    flex-wrap: nowrap;
    gap: 0.3rem 0.45rem;
  }
  .atl-ficha-heading-center .atl-attendance-stat-num {
    min-width: var(--atl-att-heading-size);
    min-height: var(--atl-att-heading-size);
    font-size: var(--atl-att-stat-num-size, 1.2rem);
    padding: 0 0.2rem;
  }
  .atl-ficha-heading-center .atl-attendance-stat-label {
    display: none;
  }
  .atl-ficha-heading-center .atl-attendance-house-count {
    font-size: var(--atl-att-stat-num-size, 1.2rem);
  }
  .atl-attendance-stats {
    align-items: center;
    width: auto;
    margin-top: 0;
    margin-left: auto;
  }
  .atl-attendance-movements {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.4rem 0.65rem;
  }
  .atl-attendance-house-count {
    font-size: var(--atl-att-stat-num-size, 1.2rem);
  }
  .atl-attendance-table td:not(.atl-att-name) {
    display: none;
  }
  .atl-attendance-table tbody tr.atl-att-empty-exits-row td {
    display: block;
  }
  .atl-attendance-board.is-detail .atl-attendance-back-list {
    display: block;
  }
  .atl-attendance-board.is-detail .pagination {
    display: none;
  }
  .atl-attendance-board.is-detail tbody tr:not(.is-selected) {
    display: none;
  }
  .atl-attendance-board.is-detail tbody tr.is-selected {
    cursor: default;
    padding: 1rem;
  }
  .atl-attendance-board.is-detail tbody tr.is-selected td {
    display: block;
    width: 100%;
    padding: 0.45rem 0;
    border: 0;
    background: transparent;
  }
  .atl-attendance-board.is-detail tbody tr.is-selected td[data-label]:not(.row-actions) {
    display: grid;
    grid-template-columns: 6.75rem minmax(0, 1fr);
    column-gap: 0.5rem;
    align-items: center;
    padding: 0.28rem 0;
  }
  .atl-attendance-board.is-detail tbody tr.is-selected td[data-label]:not(.row-actions) > * {
    grid-column: 2;
    min-width: 0;
    width: 100%;
  }
  /* Bloco manhã — fundo laranja contínuo (entrada + saída + entregue) */
  .atl-attendance-board.is-detail tbody tr.is-selected td[data-label].atl-att-col--morning {
    margin: 0 -0.35rem;
    padding: 0.32rem 0.5rem;
    border-radius: 0;
    background: color-mix(in srgb, var(--gold) 32%, var(--bg-elev, #fff));
    border-left: 1px solid color-mix(in srgb, var(--gold) 42%, var(--line));
    border-right: 1px solid color-mix(in srgb, var(--gold) 42%, var(--line));
  }
  .atl-attendance-board.is-detail tbody tr.is-selected td[data-label].atl-att-col--morning.atl-att-col--entry {
    margin-top: 0.35rem;
    padding-top: 0.45rem;
    border-radius: var(--radius) var(--radius) 0 0;
    border-top: 1px solid color-mix(in srgb, var(--gold) 42%, var(--line));
  }
  .atl-attendance-board.is-detail tbody tr.is-selected td[data-label].atl-att-col--morning:has(+ td.atl-att-col--afternoon) {
    margin-bottom: 0.35rem;
    padding-bottom: 0.45rem;
    border-radius: 0 0 var(--radius) var(--radius);
    border-bottom: 1px solid color-mix(in srgb, var(--gold) 42%, var(--line));
  }
  .atl-attendance-board.is-detail tbody tr.is-selected td[data-label].atl-att-col--morning + td.atl-att-col--morning {
    padding-top: 0.15rem;
  }
  /* Bloco tarde — fundo azul contínuo (entrada + saída + entregue) */
  .atl-attendance-board.is-detail tbody tr.is-selected td[data-label].atl-att-col--afternoon {
    margin: 0 -0.35rem;
    padding: 0.32rem 0.5rem;
    border-radius: 0;
    background: color-mix(in srgb, var(--gold-2) 14%, var(--bg-elev, #fff));
  }
  .atl-attendance-board.is-detail tbody tr.is-selected td[data-label].atl-att-col--afternoon.atl-att-col--entry {
    margin-top: 0.15rem;
    padding-top: 0.45rem;
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .atl-attendance-board.is-detail tbody tr.is-selected td[data-label].atl-att-col--afternoon:not(:has(+ td.atl-att-col--afternoon)) {
    margin-bottom: 0.35rem;
    padding-bottom: 0.45rem;
    border-radius: 0 0 var(--radius) var(--radius);
  }
  .atl-attendance-board.is-detail tbody tr.is-selected td[data-label].atl-att-col--afternoon + td.atl-att-col--afternoon {
    padding-top: 0.15rem;
  }
  .atl-attendance-board.is-detail tbody tr.is-selected td.atl-att-year {
    font-weight: 600;
  }
  .atl-attendance-board.is-detail tbody tr.is-selected td[data-label]::before {
    content: attr(data-label) ":";
    display: block;
    grid-column: 1;
    grid-row: 1;
    width: auto;
    max-width: none;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.15;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0;
    white-space: normal;
  }
  .atl-attendance-board.is-detail tbody tr.is-selected td.atl-att-col--morning[data-label]::before {
    color: var(--gold);
  }
  .atl-attendance-board.is-detail tbody tr.is-selected td.atl-att-col--afternoon[data-label]::before {
    color: var(--gold-2);
  }
  .atl-attendance-board.is-detail tbody tr.is-selected td.row-actions[data-label]::before {
    display: none;
  }
  .atl-attendance-board.is-detail .atl-attendance-table .atl-att-time-native,
  .atl-attendance-board.is-detail .atl-attendance-table .atl-att-delivered,
  .atl-attendance-board.is-detail .atl-attendance-table .atl-att-notes {
    width: 100%;
    max-width: none;
  }
  .atl-attendance-board.is-detail .atl-att-time-wrap {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
  }
  .atl-attendance-board.is-detail .atl-att-delivered-wrap {
    flex: 1 1 auto;
    min-width: 0;
  }
  .atl-attendance-board.is-detail .atl-att-entry-readonly {
    display: flex;
    align-items: center;
    min-height: 0;
    width: 100%;
    justify-content: flex-start;
  }
  .atl-attendance-board.is-detail .atl-att-time-native {
    display: none;
  }
  .atl-attendance-board.is-detail .atl-att-time-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
    width: 100%;
  }
  .atl-attendance-board.is-detail .atl-att-time-pick {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    width: auto;
    flex: 0 0 auto;
    min-width: 0;
  }
  .atl-attendance-board.is-detail .atl-att-time-pick select {
    width: auto;
    min-width: 3.25rem;
    flex: 0 0 auto;
    min-height: 3rem;
    padding: 0.4rem 0.25rem;
    font-size: 1.05rem;
  }
  .atl-attendance-board.is-detail .atl-att-time-now {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 3rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.86rem;
  }
  body.picker-open .mobile-dock,
  html.atl-kb-open .mobile-dock {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
  }
  .atl-attendance-board.is-detail {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }
  .admin-body.has-mobile-dock .atl-attendance-board.is-detail {
    padding-bottom: calc(9rem + env(safe-area-inset-bottom, 0px));
  }
  .atl-attendance-board.is-detail tbody tr.is-selected td.row-actions {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0.35rem;
    right: 0.35rem;
    bottom: var(--atl-save-float-bottom, 0px);
    z-index: 70;
    width: auto;
    min-width: 0;
    max-height: none;
    margin: 0;
    padding: 0.2rem 0.35rem;
    text-align: center;
    justify-content: center;
    align-items: stretch;
    overflow: hidden;
    box-sizing: border-box;
    transform: translate3d(0, var(--atl-kb-lift, 0px), 0);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--bg-elev, #fff) 94%, var(--gold) 6%);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.12);
  }
  .admin-body:not(.has-mobile-dock) .atl-attendance-board.is-detail tbody tr.is-selected td.row-actions {
    bottom: 0;
    padding-bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
  }
  .atl-attendance-board.is-detail .atl-att-row-msg {
    text-align: center;
    margin-bottom: 0;
  }
  .atl-attendance-board.is-detail .atl-att-save-label {
    display: inline;
    margin-left: 0;
  }
  .atl-attendance-board.is-detail .atl-att-detail-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
    align-items: stretch;
    gap: 0.4rem;
  }
  .atl-attendance-board.is-detail .atl-attendance-row-form {
    grid-column: 1;
    width: auto;
    min-width: 0;
    justify-content: stretch;
  }
  .atl-attendance-board.is-detail .atl-attendance-row-form .btn,
  .atl-attendance-board.is-detail .atl-att-save-btn,
  .admin-body .atl-attendance-board.is-detail td.row-actions .btn,
  .admin-body .atl-attendance-board.is-detail td.row-actions .btn-icon-compact,
  .admin-body .atl-attendance-board.is-detail td.row-actions .atl-att-save-btn {
    width: 100%;
    min-width: 0;
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    padding: 0 0.7rem;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    line-height: 1;
    box-sizing: border-box;
    overflow: hidden;
  }
  .atl-attendance-board.is-detail .atl-attendance-row-form .btn .btn-icon-svg,
  .atl-attendance-board.is-detail .atl-att-save-btn .btn-icon-svg {
    display: none;
  }
  .atl-attendance-board.is-detail .atl-att-back-detail {
    display: inline-flex;
    grid-column: 2;
    width: 100%;
    min-width: 0;
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    padding: 0 0.7rem;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    line-height: 1;
    box-sizing: border-box;
    overflow: hidden;
    pointer-events: auto;
    position: relative;
    z-index: 2;
    text-decoration: none;
  }
  .atl-attendance-board.is-detail td.atl-att-col--entry .atl-att-entry-badge {
    font-size: 0.95rem;
    padding: 0.35rem 0.75rem;
    margin-left: 0;
    flex: 0 0 auto;
  }
  .atl-attendance-board.is-detail td.atl-att-col--morning .atl-att-entry-badge {
    background: color-mix(in srgb, var(--gold) 22%, var(--bg-elev, #fff));
    color: color-mix(in srgb, var(--gold) 88%, #1a1208);
    border-color: color-mix(in srgb, var(--gold) 40%, var(--line, #ddd));
  }
  .atl-attendance-board.is-detail td.atl-att-col--afternoon .atl-att-entry-badge {
    background: color-mix(in srgb, var(--gold-2) 22%, var(--bg-elev, #fff));
    color: color-mix(in srgb, var(--gold-2) 88%, #081018);
    border-color: color-mix(in srgb, var(--gold-2) 40%, var(--line, #ddd));
  }
  .atl-attendance-board.is-detail tbody tr.is-selected td.atl-att-col--entry.is-entry-empty {
    display: none !important;
  }
  .atl-attendance-board.is-detail tbody tr.is-selected .atl-att-entry-notice {
    display: block;
  }
  .atl-attendance-board.is-detail tbody tr.is-selected .atl-att-ops-lock-notice {
    display: block;
  }
  /* Registo — label em cima, conteúdo em largura total */
  .atl-attendance-board.is-detail tbody tr.is-selected td.atl-att-audit[data-label] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.2rem;
    align-items: start;
    padding-top: 0.45rem;
    max-width: none;
    overflow: visible;
  }
  .atl-attendance-board.is-detail tbody tr.is-selected td.atl-att-audit[data-label]::before {
    grid-column: 1;
    grid-row: 1;
  }
  .atl-attendance-board.is-detail tbody tr.is-selected td.atl-att-audit[data-label] > * {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    width: 100%;
    max-width: none;
  }
  .atl-attendance-board.is-detail .atl-att-audit-wrap {
    display: block;
    width: 100%;
    max-width: none;
  }
  .atl-attendance-board.is-detail .atl-att-audit-trigger,
  .atl-attendance-board.is-detail .atl-att-audit-summary {
    width: 100%;
    max-width: none;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .atl-attendance-board.is-detail .atl-att-audit-popover {
    min-width: 0;
    max-width: calc(100vw - 1rem);
  }
  /* Mobile: histórico só por toque (is-open), não hover */
  .atl-att-audit-wrap:hover .atl-att-audit-popover,
  .atl-att-audit-wrap:focus-within .atl-att-audit-popover {
    display: none;
  }
  .atl-att-audit-wrap.is-open .atl-att-audit-popover {
    display: block;
  }
}

.atl-att-ops-lock-notice {
  display: none;
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.35;
}
@media (min-width: 860px) {
  .atl-att-ops-lock-notice {
    display: none !important;
  }
}
tr.is-ops-afternoon-locked .atl-att-time-native,
tr.is-ops-afternoon-locked .atl-att-time-pick select,
tr.is-ops-afternoon-locked td.atl-att-col--morning .atl-att-delivered {
  opacity: 0.72;
  cursor: not-allowed;
}
tr.is-ops-afternoon-locked td.atl-att-col--morning .atl-att-time-now {
  display: none;
}

/* Toast — guardar saída/entrada sem recarregar */
.atl-attendance-toast {
  position: sticky;
  top: 0.35rem;
  z-index: 30;
  margin: 0 0 0.5rem;
  padding: 0.55rem 0.75rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
@media (max-width: 900px) {
  .atl-attendance-toast {
    position: fixed;
    left: 0.65rem;
    right: 0.65rem;
    bottom: calc(var(--dock-h, 56px) + 0.65rem);
    top: auto;
    margin: 0;
  }
}

/* Modo Entrada Rápida — controlo E/Saídas */
.atl-quick-entry-bar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0 0 0.35rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-elev, #fff) 92%, var(--gold) 8%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.atl-quick-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.25rem 0.35rem 0.25rem 0.25rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  line-height: 1.2;
}
.atl-quick-mode-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.atl-quick-mode-toggle-track {
  position: relative;
  display: inline-block;
  width: 2.5rem;
  height: 1.35rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 55%, var(--bg-elev, #fff));
  transition: background 0.15s ease;
}
.atl-quick-mode-toggle-thumb {
  position: absolute;
  top: 0.12rem;
  left: 0.12rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: transform 0.15s ease;
}
.atl-quick-mode-toggle.is-on .atl-quick-mode-toggle-track {
  background: #2e7d32;
}
.atl-quick-mode-toggle.is-on .atl-quick-mode-toggle-thumb {
  transform: translateX(1.15rem);
}
.atl-quick-entry-controls {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  min-width: 0;
}
.atl-quick-period,
.atl-quick-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elev, #fff);
}
.atl-quick-period-btn,
.atl-quick-filter-btn {
  margin: 0;
  padding: 0.28rem 0.65rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
}
.atl-quick-period-btn.is-active,
.atl-quick-filter-btn.is-active {
  background: var(--gold);
  color: #fff;
}
.atl-quick-period-btn:focus-visible,
.atl-quick-filter-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
.atl-attendance-page.is-quick-entry-mode .atl-attendance-day-label,
.atl-attendance-page.is-quick-entry-mode .atl-attendance-readonly-note,
.atl-attendance-page.is-quick-entry-mode .alert {
  display: none;
}
.atl-attendance-page.is-quick-entry-mode .atl-attendance-board,
.atl-attendance-page.is-quick-entry-mode #atl-attendance-board,
#atl-attendance-board[hidden] {
  display: none !important;
}
.atl-attendance-page:not(.is-quick-entry-mode) .atl-quick-entry,
#atl-quick-entry[hidden] {
  display: none !important;
}
.atl-attendance-page.is-quick-entry-mode .atl-quick-entry-bar {
  margin-bottom: 0.2rem;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}
.atl-quick-entry {
  display: none;
  flex: 1 1 auto;
  flex-direction: row;
  align-items: stretch;
  min-height: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev, #fff);
  overflow: hidden;
}
.atl-attendance-page.is-quick-entry-mode .atl-quick-entry {
  display: flex;
}
.atl-attendance-page--ops.is-quick-entry-mode .atl-quick-entry {
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
}
.atl-quick-index {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.05rem;
  width: 1.65rem;
  padding: 0.35rem 0.1rem;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--line) 12%, var(--bg-elev, #fff));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  user-select: none;
}
.atl-quick-index-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  min-height: 1.15rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.atl-quick-index-letter:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
.atl-quick-index-letter.is-flash {
  color: var(--gold);
  background: color-mix(in srgb, var(--gold) 22%, transparent);
}
.atl-quick-list-wrap {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.atl-attendance-page--ops.is-quick-entry-mode .atl-quick-list-wrap {
  max-height: none;
}
@media (min-width: 860px) {
  .atl-attendance-page--ops.is-quick-entry-mode .atl-quick-list-wrap {
    max-height: calc(100vh - 8.5rem);
  }
}
.atl-quick-empty {
  margin: 0;
  padding: 1.25rem 1rem;
  text-align: center;
}
.atl-quick-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.atl-quick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-height: 2.25rem;
  padding: 0.3rem 0.65rem 0.3rem 0.55rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev, #fff);
  cursor: pointer;
  transition: background 0.12s ease;
  touch-action: manipulation;
}
.atl-quick-row:last-child {
  border-bottom: 0;
}
.atl-quick-row:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
  z-index: 1;
}
.atl-quick-row.is-registered {
  background: color-mix(in srgb, #2e7d32 14%, var(--bg-elev, #fff));
}
.atl-quick-row.is-saving {
  opacity: 0.65;
  pointer-events: none;
}
.atl-quick-row.is-error-flash {
  background: color-mix(in srgb, #b71c1c 16%, var(--bg-elev, #fff));
}
.atl-quick-row.is-entry-locked {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  background: color-mix(in srgb, var(--line) 18%, var(--bg-elev, #fff));
}
.atl-quick-row.is-entry-locked .atl-quick-name::after {
  content: ' · bloqueado';
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--muted);
}
.atl-quick-row-main {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}
.atl-quick-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  flex: 1 1 auto;
}
.atl-quick-name {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.atl-quick-entry-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.92rem;
  color: #2e7d32;
}
.atl-quick-time[hidden] {
  display: none;
}
.atl-quick-check {
  font-size: 1rem;
  line-height: 1;
  color: #2e7d32;
}
.atl-quick-photo {
  flex: 0 0 auto;
  display: block;
  width: 40px;
  height: 52px;
  object-fit: cover;
  border-radius: 3px;
  background: var(--bg-elev);
}
.atl-docs-section {
  margin-top: 1.25rem;
}
.atl-docs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 640px) {
  .atl-docs-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.atl-doc-card + .atl-doc-card {
  margin-top: 0.75rem;
}
.atl-docs-grid .atl-doc-card + .atl-doc-card {
  margin-top: 0;
}
.atl-doc-card {
  margin: 0;
  padding: 0.85rem 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg, #fff);
  min-width: 0;
}
.atl-doc-card-title {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  font-weight: 600;
}
.atl-doc-card-meta {
  margin: 0.5rem 0 0;
  word-break: break-word;
}
.atl-doc-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-height: 10rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev, #fff);
  text-decoration: none;
  color: inherit;
}
.atl-doc-thumb:hover,
.atl-doc-thumb:focus {
  border-color: var(--gold, #c4a035);
  outline: none;
}
.atl-doc-thumb-img {
  display: block;
  width: 100%;
  max-height: 12rem;
  height: auto;
  object-fit: contain;
}
.atl-doc-thumb-pdf {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: var(--text);
}
.atl-doc-thumb-pdf-word {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}
.atl-doc-thumb-caption {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.atl-doc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}
.atl-doc-lightbox[hidden] {
  display: none;
}
.atl-doc-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
}
.atl-doc-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 56rem);
  max-height: calc(100vh - 1.5rem);
  display: flex;
  flex-direction: column;
  background: var(--bg-elev, #fff);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}
.atl-doc-lightbox-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--line);
}
.atl-doc-lightbox-bar h2 {
  flex: 1;
  margin: 0;
  font-size: 1rem;
  min-width: 0;
}
.atl-doc-lightbox-bar a {
  font-size: 0.85rem;
  white-space: nowrap;
}
.atl-doc-lightbox-body {
  overflow: auto;
  padding: 0.75rem;
  text-align: center;
}
.atl-doc-lightbox-body img {
  max-width: 100%;
  max-height: calc(100vh - 7rem);
  height: auto;
  object-fit: contain;
}
.atl-doc-lightbox-body iframe {
  display: block;
  width: 100%;
  height: min(78vh, 40rem);
  border: 0;
  background: var(--bg);
}
.atl-horario-current {
  margin: 0.75rem 0 1rem;
}
.atl-horario-label {
  margin: 0 0 0.4rem;
}
.atl-horario-preview-link {
  display: inline-block;
  max-width: 100%;
}
.atl-horario-preview {
  display: block;
  max-width: min(100%, 40rem);
  max-height: min(70vh, 32rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev, #fff);
}
.atl-horario-pdf {
  display: block;
  width: 100%;
  max-width: 40rem;
  height: min(70vh, 32rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev, #fff);
}
.atl-horario-current--print .atl-horario-preview {
  max-width: 100%;
  max-height: 16cm;
}
.atl-horario-upload {
  margin-top: 0.75rem;
}
.atl-horario-field input[type="file"]:not(.atl-file-pick-input) {
  max-width: 100%;
}
.atl-child-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}
.atl-ficha-index {
  display: none;
}
.atl-child-jump a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}
.atl-child-jump a:hover,
.atl-child-jump a:focus {
  border-color: var(--gold, #c4a035);
  outline: none;
}
.atl-child-jump a:focus-visible,
.atl-ficha-section-toggle:focus-visible {
  outline: 2px solid var(--gold, #c4a035);
  outline-offset: 2px;
}
.atl-child-jump a.is-active {
  border-color: var(--gold, #c4a035);
  background: color-mix(in srgb, var(--gold, #c4a035) 16%, var(--bg-elev));
}
.atl-child-page[data-atl-ficha] {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.7rem;
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "content rail";
  grid-auto-rows: 0;
  grid-auto-columns: 0;
  width: 100%;
  max-width: none;
  margin-right: 0;
}
.atl-ficha-tabs {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.22rem;
  z-index: 16;
  grid-area: rail;
  align-self: stretch;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: calc(1.7rem + 5px);
  height: auto;
  max-height: none;
  margin-left: 0;
  transform: translateX(-1px);
  padding: 0.05rem 0 0.2rem 5px;
  box-sizing: border-box;
  overflow-x: visible;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.atl-ficha-tab {
  --tab-ink: var(--gold);
  --tab-fill: color-mix(in srgb, var(--tab-ink) 12%, var(--bg-elev));
  --tab-fill-on: color-mix(in srgb, var(--tab-ink) 32%, var(--bg-elev));
  --tab-label: color-mix(in srgb, var(--tab-ink) 42%, var(--raiz-green, #3f4f36));
  --tab-label-on: color-mix(in srgb, var(--tab-ink) 52%, var(--raiz-green, #3f4f36));
  box-sizing: border-box;
  display: flex;
  position: relative;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 3.45rem;
  padding: 0.38rem 0.14rem;
  border: 1px solid color-mix(in srgb, var(--tab-ink) 28%, var(--line));
  border-left: 0;
  border-radius: 0 0.72rem 0.72rem 0;
  background: var(--tab-fill);
  color: var(--tab-label);
  text-decoration: none;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.15;
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--tab-ink) 12%, transparent);
}
.atl-ficha-tab-label {
  display: inline-block;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  text-transform: uppercase;
  overflow: hidden;
}
.atl-ficha-tab:hover,
.atl-ficha-tab:focus {
  outline: none;
  background: color-mix(in srgb, var(--tab-ink) 22%, var(--bg-elev));
  color: var(--tab-label-on);
}
.atl-ficha-tab:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--tab-ink) 55%, var(--line));
  outline-offset: 2px;
}
.atl-ficha-tab.is-active {
  background: var(--tab-fill-on);
  color: var(--tab-label-on);
  border-color: color-mix(in srgb, var(--tab-ink) 40%, var(--line));
  font-weight: 800;
  font-size: 0.7rem;
  box-shadow: -5px 0 0 color-mix(in srgb, var(--tab-ink) 28%, var(--bg-elev)), 2px 2px 0 color-mix(in srgb, var(--tab-ink) 14%, transparent);
  transform: translateX(-6px);
  z-index: 2;
}
.atl-ficha-section {
  --tab-ink: var(--gold);
  margin-top: 0;
  scroll-margin-top: 0.65rem;
}
.atl-child-page[data-atl-ficha] [data-atl-ficha-section][hidden],
.atl-child-page[data-atl-ficha] [data-atl-ficha-section].is-inactive {
  display: none !important;
}
.atl-ficha-tone-1 { --tab-ink: var(--gold); }
.atl-ficha-tone-2 { --tab-ink: var(--gold-2); }
.atl-ficha-tone-3 { --tab-ink: var(--raiz-yellow, #ffd42a); }
.atl-ficha-tone-4 { --tab-ink: var(--raiz-green, #3f4f36); }
.atl-ficha-tab.atl-ficha-tone-1,
.atl-ficha-section.atl-ficha-tone-1 { --tab-ink: var(--gold); }
.atl-ficha-tab.atl-ficha-tone-2,
.atl-ficha-section.atl-ficha-tone-2 { --tab-ink: var(--gold-2); }
.atl-ficha-tab.atl-ficha-tone-3,
.atl-ficha-section.atl-ficha-tone-3 { --tab-ink: var(--raiz-yellow, #ffd42a); }
.atl-ficha-tab.atl-ficha-tone-4,
.atl-ficha-section.atl-ficha-tone-4 { --tab-ink: var(--raiz-green, #3f4f36); }
.atl-ficha-section.is-focused {
  border-color: color-mix(in srgb, var(--tab-ink) 40%, var(--line));
  background: color-mix(in srgb, var(--tab-ink) 28%, var(--bg-elev));
  box-shadow: none;
}
.atl-ficha-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.85rem;
  margin: 0;
  padding: 0;
  font-size: inherit;
}
.atl-ficha-section-head .atl-ficha-section-toggle {
  flex: 1 1 auto;
  min-width: 0;
}
.atl-ficha-section-head .atl-ficha-code {
  flex: 0 0 auto;
  font-size: 1.05rem;
}
.atl-ficha-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 2.4rem;
  margin: 0;
  padding: 0.35rem 0.15rem 0.35rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: default;
  pointer-events: none;
  font: inherit;
}
.atl-ficha-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
}
.atl-ficha-section-chevron {
  display: none;
}
.atl-ficha-section-body {
  padding: 0;
  padding-bottom: 0;
  min-height: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.atl-ficha-section-actions {
  display: none;
}
.admin-import-panel.atl-ficha-section > .atl-ficha-section-head + .atl-ficha-section-body > .admin-subtitle {
  margin-top: 0.35rem;
}
.atl-file-pick-heading {
  display: block;
  font-size: 0.86rem;
  margin: 0.9rem 0 0.35rem;
  color: var(--muted);
}
.atl-file-pick {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  margin: 0.15rem 0 0.55rem;
  max-width: 100%;
}
.atl-file-pick-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.atl-file-pick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 28rem;
  min-height: 48px;
  cursor: pointer;
  box-sizing: border-box;
}
.atl-file-pick-name {
  margin: 0;
  font-size: 0.86rem;
  word-break: break-word;
}
#atl-horario,
#atl-regulamento-papel,
#atl-familia,
#atl-testes,
#atl-identificacao,
#atl-escola,
#atl-saude,
#atl-observacoes,
#atl-autorizacoes,
#atl-documentos {
  scroll-margin-top: 0.65rem;
}
.atl-tests-form-grid {
  display: grid;
  grid-template-columns: minmax(12rem, 2fr) minmax(10rem, 1fr) 6.5rem 6.5rem;
  gap: 0.65rem 0.85rem;
  align-items: end;
}
.atl-tests-form-title {
  min-width: 0;
}
.atl-tests-form-notes {
  grid-column: 1 / -1;
}
.atl-tests-table th.atl-col-actions,
.atl-tests-table td.atl-col-actions {
  text-align: right;
}
@media (max-width: 859px) {
  .atl-tests-form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .atl-tests-form-title {
    grid-column: 1 / -1;
  }
  .atl-file-pick-btn {
    max-width: none;
    min-height: 52px;
    font-size: 1rem;
  }
}

/* Ficha: gutters ~3px, cartão à altura do ecrã, dois scrolls independentes */
html:has([data-atl-ficha]),
body:has([data-atl-ficha]) {
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
}
.admin-shell:has([data-atl-ficha]) {
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
.admin-shell:has([data-atl-ficha]) .admin-side {
  max-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.has-mobile-dock:has([data-atl-ficha]),
.admin-body.has-mobile-dock:has([data-atl-ficha]) {
  padding-bottom: 0;
}
.admin-main:has(.atl-child-page[data-atl-ficha]) {
  --atl-ficha-bottom-chrome: 3px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: 3px;
  padding-bottom: var(--atl-ficha-bottom-chrome);
}
.admin-main:has(.atl-child-page[data-atl-ficha] .atl-child-form-actions) {
  --atl-ficha-bottom-chrome: calc(3.35rem + env(safe-area-inset-bottom, 0px) + 3px);
}
.pais-body .admin-main:has(.atl-child-page[data-atl-ficha]) {
  padding: 3px;
  padding-bottom: var(--atl-ficha-bottom-chrome);
}
.admin-main:has(.atl-child-page[data-atl-ficha]) > .atl-ficha-heading,
.admin-main:has(.atl-child-page[data-atl-ficha]) > .alert,
.admin-main:has(.atl-child-page[data-atl-ficha]) > .admin-mobile-top {
  flex: 0 0 auto;
}
@media (max-width: 900px) {
  .admin-main:has(.atl-child-page[data-atl-ficha]) > .admin-mobile-top {
    margin: 0 0 3px;
    padding-bottom: 3px;
  }
}
.atl-child-page[data-atl-ficha] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.7rem;
  grid-template-areas: "content rail";
  grid-template-rows: minmax(0, 1fr);
  grid-auto-rows: 0;
  grid-auto-columns: 0;
  flex: 1 1 auto;
  min-height: 0;
  max-width: none;
  height: var(--atl-ficha-card-h, 100%);
  max-height: var(--atl-ficha-card-h, 100%);
  padding-bottom: 0;
  overflow: hidden;
}
/* O form é só agrupador: os filhos entram na grelha da ficha (secções fora do </form> partilham a mesma célula). */
.atl-child-page[data-atl-ficha] > .atl-child-form.form,
.atl-child-page[data-atl-ficha] > .atl-child-form.admin-form,
.atl-child-page[data-atl-ficha] > .atl-child-form {
  display: contents;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.atl-child-page[data-atl-ficha] > .atl-child-form > input,
.atl-child-page[data-atl-ficha] > .atl-child-form > script {
  display: none !important;
}
.atl-child-page[data-atl-ficha] [data-atl-ficha-section]:not([hidden]):not(.is-inactive),
.atl-child-page[data-atl-ficha] > .atl-ficha-section:not([hidden]):not(.is-inactive),
.atl-child-page[data-atl-ficha] .atl-child-form > .atl-ficha-section:not([hidden]):not(.is-inactive) {
  grid-area: content;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  justify-self: stretch;
  min-width: 0;
  min-height: 0;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  z-index: 1;
}
.atl-child-page[data-atl-ficha] .atl-ficha-heading {
  margin-bottom: 3px;
  gap: 0.25rem 0.65rem;
}
.atl-child-page[data-atl-ficha] .admin-title {
  margin-bottom: 0;
}
.atl-child-page[data-atl-ficha] .admin-import-panel.atl-ficha-section {
  margin-top: 0;
  padding: 6px 8px 8px;
  box-sizing: border-box;
  background: color-mix(in srgb, var(--tab-ink) 28%, var(--bg-elev));
  border-color: color-mix(in srgb, var(--tab-ink) 40%, var(--line));
  box-shadow: none;
}
.atl-child-page[data-atl-ficha] .atl-ficha-section-head {
  flex: 0 0 auto;
}
.atl-child-page[data-atl-ficha] .atl-ficha-section-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.atl-child-page[data-atl-ficha] .atl-ficha-section-head + .atl-ficha-section-body > .admin-subtitle,
.atl-child-page[data-atl-ficha] .atl-ficha-section-body > .admin-subtitle:first-child {
  margin-top: 0.15rem;
  margin-bottom: 0.25rem;
}
.atl-child-page[data-atl-ficha] .atl-child-top {
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  margin-bottom: 3px;
}
.atl-child-page[data-atl-ficha] .atl-child-top-photo {
  position: static;
  order: -1;
  flex: none;
  width: auto;
}
.atl-child-page[data-atl-ficha] .atl-child-top-photo .atl-photo-preview img {
  width: 120px;
  height: 160px;
}
.atl-child-page[data-atl-ficha] .atl-child-inline-2 {
  grid-template-columns: 1fr;
}
.atl-child-page[data-atl-ficha] label {
  margin: 0.4rem 0 0.12rem;
}
.atl-child-page[data-atl-ficha] .atl-ficha-section-body > label:first-child,
.atl-child-page[data-atl-ficha] .atl-ficha-section-body > .atl-child-top:first-child label:first-of-type,
.atl-child-page[data-atl-ficha] .atl-child-top-fields > label:first-of-type {
  margin-top: 0.1rem;
}
.atl-child-page[data-atl-ficha] .atl-child-inline-2 label,
.atl-child-page[data-atl-ficha] .atl-compact-grid > div > label {
  margin-top: 0.4rem;
}
.atl-child-page[data-atl-ficha] .field-hint,
.atl-child-page[data-atl-ficha] .muted.field-hint {
  margin: 0.15rem 0 0.3rem;
}
.atl-child-page[data-atl-ficha] .check,
.atl-child-page[data-atl-ficha] .checkbox-row {
  margin-top: 0.4rem;
}
.atl-child-page[data-atl-ficha] .atl-file-pick-heading {
  margin: 0.4rem 0 0.15rem;
}
.atl-child-page[data-atl-ficha] .atl-file-pick {
  margin: 0.1rem 0 0.25rem;
}
.atl-child-page[data-atl-ficha] .atl-med-row {
  margin-bottom: 0.4rem;
  padding-bottom: 0.4rem;
}
.atl-child-page[data-atl-ficha] .atl-view-section {
  margin-top: 0;
}
.atl-child-page[data-atl-ficha] .atl-view-dl {
  gap: 0.4rem;
}
.atl-child-page[data-atl-ficha] .atl-child-form > .atl-child-form-actions {
  grid-area: content;
  left: 50%;
  transform: translateX(-50%) translate3d(0, var(--atl-kb-lift, 0px), 0);
  bottom: calc(3px + env(safe-area-inset-bottom, 0px));
  width: calc(100vw - 6px);
  max-width: none;
  padding: 0.2rem 0.32rem;
  gap: 0.4rem;
  justify-content: center;
  z-index: 70;
}
.atl-child-page[data-atl-ficha] .atl-child-form > .atl-child-form-actions a.btn,
.atl-child-page[data-atl-ficha] .atl-child-form > .atl-child-form-actions a.btn-icon {
  display: none;
}
.atl-child-page[data-atl-ficha] .atl-child-form > .atl-child-form-actions .btn,
.atl-child-page[data-atl-ficha] .atl-child-form > .atl-child-form-actions .btn-icon {
  width: min(16rem, 100%);
  max-width: 100%;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
}
@media (max-width: 859px) {
  .admin-main:has(.atl-child-page[data-atl-ficha]) {
    --atl-ficha-bottom-chrome: calc(var(--atl-dock-h, 45px) + var(--atl-save-dock-gap, 5px));
  }
  .admin-main:has(.atl-child-page[data-atl-ficha] .atl-child-form-actions) {
    --atl-ficha-bottom-chrome: calc(3.05rem + var(--atl-dock-h, 45px) + var(--atl-save-dock-gap, 5px));
  }
  .atl-child-page[data-atl-ficha] {
    flex: 1 1 0;
    height: auto;
    max-height: none;
    padding-bottom: 0;
  }
  .atl-child-page[data-atl-ficha] [data-atl-ficha-section]:not([hidden]):not(.is-inactive),
  .atl-child-page[data-atl-ficha] > .atl-ficha-section:not([hidden]):not(.is-inactive),
  .atl-child-page[data-atl-ficha] .atl-child-form > .atl-ficha-section:not([hidden]):not(.is-inactive) {
    height: 100%;
  }
  .atl-child-page[data-atl-ficha] .atl-child-form > .atl-child-form-actions {
    bottom: var(--atl-save-float-bottom, calc(var(--atl-dock-h, 45px) + var(--atl-save-dock-gap, 5px)));
  }
}
@media (min-width: 860px) {
  .admin-body .atl-child-page[data-atl-ficha] .atl-child-form > .atl-child-form-actions {
    left: calc(240px + 50%);
    transform: translateX(calc(-50% - 120px)) translate3d(0, var(--atl-kb-lift, 0px), 0);
    width: min(100%, calc(100vw - 240px - 6px));
    max-width: calc(100vw - 240px - 6px);
  }
}
@supports not (display: contents) {
  .atl-child-page[data-atl-ficha] > .atl-child-form.form,
  .atl-child-page[data-atl-ficha] > .atl-child-form.admin-form,
  .atl-child-page[data-atl-ficha] > .atl-child-form {
    display: none;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
  .atl-child-page[data-atl-ficha] > .atl-child-form:has([data-atl-ficha-section]:not([hidden]):not(.is-inactive)) {
    display: flex;
    grid-area: content;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
  .atl-child-page[data-atl-ficha] > .atl-ficha-section:not([hidden]):not(.is-inactive) {
    grid-area: content;
  }
}
@media print {
  html:has([data-atl-ficha]),
  body:has([data-atl-ficha]),
  .admin-shell:has([data-atl-ficha]),
  .admin-main:has(.atl-child-page[data-atl-ficha]),
  .atl-child-page[data-atl-ficha],
  .atl-child-page[data-atl-ficha] > .atl-child-form,
  .atl-child-page[data-atl-ficha] .atl-ficha-section,
  .atl-ficha-section-body {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

body.raiz-image-crop-open {
  overflow: hidden;
}
.raiz-image-crop-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: max(0.5rem, env(safe-area-inset-top, 0px)) 0.65rem max(0.65rem, env(safe-area-inset-bottom, 0px));
  background: rgba(10, 12, 8, 0.78);
  box-sizing: border-box;
}
.raiz-image-crop-modal[hidden] {
  display: none !important;
}
.raiz-image-crop-dialog {
  display: flex;
  flex-direction: column;
  width: min(52rem, 100%);
  max-height: 100%;
  box-sizing: border-box;
  padding: 0.75rem 0.85rem 0.9rem;
  background: var(--bg-elev, #fff);
  border-radius: var(--radius, 12px);
  border: 1px solid var(--line, #d5d5d5);
}
.raiz-image-crop-hint {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
}
.raiz-image-crop-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: min(58vh, 28rem);
  max-height: calc(100dvh - 11rem);
  overflow: hidden;
  background: #111;
}
.raiz-image-crop-stage img {
  display: block;
  max-width: 100%;
}
.raiz-image-crop-box {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid #f4d35e;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
  touch-action: none;
}
.raiz-image-crop-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.65rem;
  margin-top: 0.75rem;
}
.raiz-image-crop-actions .btn {
  flex: 1 1 0;
  min-height: 48px;
}
@media (max-width: 859px) {
  .raiz-image-crop-dialog {
    width: 100%;
    border-radius: 10px;
  }
  .raiz-image-crop-stage {
    min-height: calc(100dvh - 13.5rem);
  }
}
.atl-regulation-text {
  max-height: 22rem;
  overflow: auto;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line, #ddd);
  border-radius: var(--radius, 8px);
  background: var(--bg-elev, #fff);
  line-height: 1.55;
  white-space: normal;
}
.atl-reg-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin: 0.85rem 0 1rem;
}
.atl-reg-banner p { margin: 0; }
@media (max-width: 859px) {
  .atl-quick-entry-bar {
    top: 0;
    margin-left: -0.65rem;
    margin-right: -0.65rem;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .atl-quick-row {
    min-height: 3.5rem;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }
  .atl-quick-row:has(.atl-birthday-cake) {
    border-left: 3px solid var(--gold, #ff6600);
  }
  .atl-quick-name-wrap .atl-birthday-cake {
    font-size: 1.35rem;
  }
  .atl-quick-name {
    font-size: 1.02rem;
  }
  .atl-attendance-table tbody tr:has(.atl-att-name--birthday) {
    border-color: rgba(255, 102, 0, 0.55);
    border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
    box-shadow: 0 0 0 1px rgba(255, 102, 0, 0.22);
  }
  .atl-att-name-text .atl-birthday-cake {
    font-size: 1.3rem;
  }
  .atl-attendance-page.is-quick-entry-mode .atl-attendance-date-block {
    margin-bottom: 0;
  }
}

.atl-qr-posto {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: 0.5rem 0 1.5rem;
}
.atl-qr-posto-lead {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 600;
}
.atl-qr-posto-frame {
  background: #fff;
  padding: 1.1rem;
  border-radius: 1.1rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.atl-qr-posto-box {
  width: min(72vw, 420px);
  height: min(72vw, 420px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.atl-qr-posto-box img,
.atl-qr-posto-box canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  object-fit: contain;
}
.atl-qr-posto-meta,
.atl-qr-posto-hint {
  max-width: 36rem;
  margin: 0;
}
.atl-qr-posto:fullscreen,
.atl-qr-posto:-webkit-full-screen {
  background: var(--bg, #0f1410);
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}
.atl-qr-result {
  margin: 1rem auto;
  max-width: 28rem;
  padding: 1.5rem 1.2rem;
  border-radius: 1rem;
  text-align: center;
}
.atl-qr-result-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 0.6rem;
}
.atl-qr-result-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  font-size: 0.85rem;
}
.atl-qr-result-title {
  margin: 0.35rem 0 0.2rem;
  font-size: 1.45rem;
  font-weight: 600;
}
.atl-qr-result-time {
  margin: 0 0 1rem;
  font-size: 2rem;
  font-weight: 600;
}
.atl-qr-result--entry {
  background: rgba(67, 160, 71, 0.16);
  border: 1px solid rgba(67, 160, 71, 0.45);
}
.atl-qr-result--exit {
  background: rgba(229, 57, 53, 0.14);
  border: 1px solid rgba(229, 57, 53, 0.4);
}
.atl-qr-result--error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
}
.atl-qr-child-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.atl-qr-child-form {
  margin: 0;
}
.atl-qr-child-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: inherit;
  cursor: pointer;
}
.atl-qr-child-card strong,
.atl-qr-child-card span {
  display: block;
}
.atl-qr-child-card--entry {
  border-color: rgba(67, 160, 71, 0.45);
}
.atl-qr-child-card--exit {
  border-color: rgba(229, 57, 53, 0.4);
}
.atl-qr-child-card.is-locked {
  cursor: default;
  opacity: 0.85;
}
.atl-qr-info-lead {
  margin: 0 0 1rem;
}
.atl-qr-info-card {
  margin-bottom: 1rem;
}
.atl-qr-info-steps {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
}
.atl-qr-info-steps li + li {
  margin-top: 0.45rem;
}
.atl-qr-info-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.atl-qr-hoje-card {
  margin: 0 0 1rem;
}
.atl-hoje-testes {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.25rem;
}
@media (min-width: 860px) {
  .atl-hoje-testes {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}
.atl-hoje-testes .admin-card {
  margin: 0;
}
.atl-hoje-testes-list a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.45rem;
  color: inherit;
  text-decoration: none;
}
.atl-hoje-testes-list a:hover strong,
.atl-hoje-testes-list a:focus-visible strong {
  color: var(--gold);
}
.atl-hoje-testes-date {
  font-variant-numeric: tabular-nums;
  min-width: 4.6rem;
  color: var(--muted, #6b7280);
  font-size: 0.9rem;
}
.atl-hoje-testes-score {
  font-weight: 600;
}
.atl-hoje-testes-note {
  flex: 1 1 100%;
  font-size: 0.86rem;
  margin: 0;
}
.atl-testes-page-grid {
  margin-bottom: 1.25rem;
}
.atl-hoje-testes .admin-card-title a,
.admin-subtitle a {
  color: inherit;
  text-decoration: none;
}
.atl-hoje-testes .admin-card-title a:hover,
.atl-hoje-testes .admin-card-title a:focus-visible,
.admin-subtitle a:hover,
.admin-subtitle a:focus-visible {
  color: var(--gold);
}
.atl-qr-scan-stage {
  position: relative;
  margin: 0.75rem 0 1rem;
  border-radius: 0.9rem;
  overflow: hidden;
  background: #111;
  aspect-ratio: 3 / 4;
  max-height: 58vh;
}
.atl-qr-scan-stage video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.atl-qr-scan-frame {
  position: absolute;
  inset: 18%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 0.7rem;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}
.atl-qr-scan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.atl-qr-scan-file {
  cursor: pointer;
}

.atl-qr-kiosk-card {
  margin-bottom: 1.5rem;
}
.atl-qr-kiosk-label {
  display: block;
  margin: 0.8rem 0 0.35rem;
  font-weight: 600;
}
.atl-qr-kiosk-input {
  display: block;
  width: 100%;
  max-width: 46rem;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.82rem;
}
.atl-qr-kiosk-logout,
.atl-qr-kiosk-rotate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.atl-qr-ecra-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg, #f4f1ea);
  color: var(--text, #111);
}
.atl-qr-ecra {
  width: min(100%, 40rem);
  padding: 1.5rem 1rem 2rem;
  box-sizing: border-box;
}
.atl-qr-ecra-logo {
  display: block;
  width: min(42vw, 160px);
  height: auto;
  margin: 0 auto 0.4rem;
}
.atl-qr-ecra-deny {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg, #f4f1ea);
}
.atl-qr-ecra-deny-box {
  max-width: 28rem;
  text-align: center;
}
.atl-qr-ecra-deny-box h1 {
  margin-top: 0;
}

/* Telemóvel deitado: overlay a pedir portrait (não aplica em desktop / tablet largo). */
.atl-portrait-lock {
  display: none;
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  z-index: 10050;
  padding: 1.25rem;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg, #0f1410);
  color: var(--text, #f4f1ea);
  pointer-events: auto;
}
.atl-portrait-lock p {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
  max-width: 22rem;
}
@media (orientation: landscape) and (max-width: 859px),
       (orientation: landscape) and (max-height: 500px) and (hover: none) {
  .atl-portrait-lock {
    display: flex;
  }
  html, body {
    overflow: hidden;
  }
}
html.atl-allow-landscape .atl-portrait-lock,
body.atl-allow-landscape .atl-portrait-lock {
  display: none !important;
}
html.atl-allow-landscape,
html.atl-allow-landscape body {
  overflow: auto;
}

/* Listagens: botões de acção à altura da linha (~36px), sem esticar a linha */
.admin-table td.row-actions > .btn,
.admin-table td.row-actions > form > .btn,
.admin-table td.atl-col-actions > .btn,
.admin-table td.atl-col-actions > form > .btn,
.admin-table td.cell-actions .btn,
.atl-mini-table td.row-actions .btn,
.atl-fees-year-table td.row-actions .btn,
.atl-fees-year-table .atl-col-actions-sticky .btn,
.atl-children-table td.row-actions .btn,
.atl-children-table td.atl-col-actions .btn,
.atl-th-actions .btn-icon-compact {
    min-height: 32px;
    height: 32px;
    padding: 0 0.5rem;
    font-size: 0.8rem;
    line-height: 1;
    box-sizing: border-box;
    align-items: center;
}

.admin-table td.row-actions .btn-icon,
.admin-table td.row-actions .btn-icon-compact,
.admin-table td.atl-col-actions .btn-icon,
.admin-table td.atl-col-actions .btn-icon-compact,
.admin-table td.cell-actions .btn-icon,
.admin-table td.cell-actions .btn-icon-compact,
.atl-mini-table td.row-actions .btn-icon,
.atl-mini-table td.row-actions .btn-icon-compact,
.atl-fees-year-table td.row-actions .btn-icon,
.atl-fees-year-table td.row-actions .btn-icon-compact,
.atl-children-table td.row-actions .btn-icon,
.atl-children-table td.atl-col-actions .btn-icon,
.atl-th-actions .btn-icon-compact {
    width: 32px;
    min-width: 32px;
    padding: 0;
}

.admin-table td .btn-icon-svg,
.atl-mini-table td .btn-icon-svg,
.atl-fees-year-table td .btn-icon-svg,
.atl-children-table td .btn-icon-svg,
.atl-th-actions .btn-icon-svg {
    width: 1rem;
    height: 1rem;
}

.admin-table td .btn-icon-euro,
.atl-children-table td .btn-icon-euro {
    width: 1rem;
    height: 1rem;
    font-size: 0.95rem;
}

.admin-card-list {
    display: grid;
    gap: 0.75rem;
}

.admin-card {
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.admin-card-list > .admin-card:nth-child(odd) {
    background: var(--atl-table-row-odd);
}

.admin-card-list > .admin-card:nth-child(even) {
    background: var(--atl-table-row-even);
}

.admin-card-body {
    padding: 0.85rem 1rem;
}

.admin-card-title {
    margin: 0 0 0.45rem;
    font-size: 1.12rem;
    font-weight: 650;
    line-height: 1.3;
}

.admin-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0 1rem 0.85rem;
}

/* Densidade móvel (admin + pais): mais informação visível, texto ≥14/13px */
@media (max-width: 859px) {
    .admin-body {
        font-size: 0.875rem;
        line-height: 1.45;
    }

    .admin-body .muted,
    .admin-body .field-hint,
    .admin-body .admin-help,
    .admin-body .admin-result-count,
    .admin-body .admin-side-email,
    .admin-body th,
    .admin-body .sort-link {
        font-size: 0.8125rem;
    }

    .admin-body .admin-main {
        padding: 0.5rem 0.55rem 1rem;
    }

    .admin-body .admin-title {
        font-size: 1.12rem;
        letter-spacing: 0.02em;
        margin: 0 0 0.4rem;
    }

    .admin-body .admin-mobile-top {
        margin: -0.15rem 0 0.5rem;
        padding-bottom: 0.4rem;
        gap: 0.5rem;
    }

    .admin-body .admin-mobile-top .brand-logo-img {
        height: 30px;
        max-height: 32px;
        max-width: 92px;
    }

    .admin-body .admin-toolbar {
        gap: 0.35rem;
        margin-bottom: 0.55rem;
    }

    .admin-body .admin-toolbar .btn,
    .admin-body .atl-toolbar .btn,
    .admin-body .filter-search-actions .btn {
        min-height: 36px;
        padding: 0.3rem 0.7rem;
        font-size: 0.875rem;
    }

    .admin-body .atl-ficha-heading .btn-icon-compact,
    .admin-body .atl-ficha-heading-actions .btn-icon-compact {
        width: 36px;
        min-width: 36px;
        height: 36px;
        min-height: 36px;
    }

    .admin-body .admin-filters {
        padding: 0.45rem 0.5rem;
        gap: 0.4rem;
        margin-bottom: 0.5rem;
    }

    .admin-body .admin-form,
    .admin-body .admin-import-panel {
        padding: 0.6rem 0.65rem;
    }

    .admin-body .admin-card-list {
        gap: 0.5rem;
    }

    .admin-body .admin-card-body {
        padding: 0.55rem 0.65rem;
    }

    .admin-body .admin-card-title {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }

    .admin-body .admin-card-actions {
        padding: 0 0.65rem 0.55rem;
    }

    .admin-body .admin-card-actions .btn {
        min-height: 36px;
        padding: 0.3rem 0.75rem;
        font-size: 0.875rem;
    }

    .admin-body .atl-hoje-testes,
    .admin-body .atl-testes-page-grid {
        gap: 0.55rem;
        margin-bottom: 0.75rem;
    }

    .admin-body .pagination {
        margin-top: 0.75rem;
    }

    .admin-body .pagination-link {
        min-width: 2rem;
        min-height: 2rem;
        padding: 0.2rem 0.45rem;
        font-size: 0.8125rem;
    }

    .admin-body .admin-table:not(.atl-attendance-table):not(.atl-children-table) tbody td,
    .admin-body .atl-mini-table tbody td {
        padding-top: 0.1rem;
        padding-bottom: 0.1rem;
        padding-left: 0.55rem;
        padding-right: 0.55rem;
        font-size: 0.875rem;
    }

    .admin-body .atl-children-table tbody td {
        font-size: 0.875rem;
    }

    .admin-body .admin-table td.row-actions > .btn,
    .admin-body .admin-table td.row-actions > form > .btn,
    .admin-body .admin-table td.atl-col-actions > .btn,
    .admin-body .admin-table td.atl-col-actions > form > .btn,
    .admin-body .admin-table td.cell-actions .btn,
    .admin-body .atl-mini-table td.row-actions .btn,
    .admin-body .atl-fees-year-table td.row-actions .btn,
    .admin-body .atl-children-table td.row-actions .btn,
    .admin-body .atl-children-table td.atl-col-actions .btn,
    .admin-body .row-actions .btn {
        min-height: 34px;
        height: 34px;
        font-size: 0.8125rem;
    }

    .admin-body .admin-table td.row-actions .btn-icon,
    .admin-body .admin-table td.row-actions .btn-icon-compact,
    .admin-body .admin-table td.atl-col-actions .btn-icon,
    .admin-body .admin-table td.atl-col-actions .btn-icon-compact,
    .admin-body .admin-table td.cell-actions .btn-icon,
    .admin-body .admin-table td.cell-actions .btn-icon-compact,
    .admin-body .atl-mini-table td.row-actions .btn-icon,
    .admin-body .atl-mini-table td.row-actions .btn-icon-compact,
    .admin-body .atl-fees-year-table td.row-actions .btn-icon,
    .admin-body .atl-fees-year-table td.row-actions .btn-icon-compact,
    .admin-body .atl-children-table td .btn-icon,
    .admin-body .atl-th-actions .btn-icon-compact,
    .admin-body .atl-attendance-table td.row-actions .btn-icon-compact:not(.atl-att-save-btn),
    .admin-body .atl-attendance-board:not(.is-detail) td.row-actions .atl-att-save-btn.btn-icon-compact {
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;
        padding: 0;
    }
    .admin-body .atl-payments-table .atl-pay-row > .btn-icon-compact,
    .admin-body .atl-payments-table .atl-pay-row .btn-icon-compact {
        width: 32px;
        min-width: 32px;
        height: 32px;
        min-height: 32px;
        padding: 0;
    }

    .admin-body .atl-attendance-table tbody tr {
        margin-bottom: 0.45rem;
        padding: 0.55rem 0.65rem;
    }

    .admin-body .atl-attendance-table .atl-att-name {
        font-size: 0.95rem;
    }

    .admin-body .admin-users-table tbody tr,
    .admin-body .admin-works-table tbody tr {
        padding: 0.55rem 0.65rem;
        margin-bottom: 0.45rem;
    }

    .admin-body .atl-card-with-photo {
        gap: 0.5rem;
    }

    .admin-body label {
        margin-top: 0.55rem;
    }

    .admin-body .atl-ym-row label {
        margin-top: 0;
    }

    .admin-body .admin-table.atl-payments-table tbody td {
        padding: 0;
    }
}

/* Standard geral: botões e campos de introdução — mesma altura em toda a app */
html body input:not([type]),
html body input[type="text"],
html body input[type="email"],
html body input[type="password"],
html body input[type="tel"],
html body input[type="url"],
html body input[type="number"],
html body input[type="date"],
html body input[type="month"],
html body input[type="datetime-local"],
html body input[type="time"],
html body input[type="search"],
html body input[type="file"],
html body select {
    height: var(--control-h);
    min-height: var(--control-h);
    max-height: var(--control-h);
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
}

html body .btn,
html body a.btn,
html body button.btn,
html body input[type="submit"].btn,
html body input[type="button"].btn,
html body .admin-filters .btn,
html body .admin-toolbar .btn,
html body .atl-toolbar .btn,
html body .atl-ym-row .btn,
html body .atl-generate-box .btn,
html body .filter-search .btn,
html body .filter-search-actions .btn,
html body .form-actions .btn,
html body .login-wrap .btn {
    height: var(--control-h);
    min-height: var(--control-h);
    max-height: var(--control-h);
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
    line-height: 1;
}

html body .btn-icon-compact {
    width: var(--control-h);
    min-width: var(--control-h);
}

html body .admin-table input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
html body .admin-table select,
html body .admin-table .btn,
html body .admin-table .btn-icon-compact,
html body .atl-payments-table .atl-pay-method,
html body .atl-payments-table .atl-pay-now,
html body .atl-payments-table .atl-pay-check,
html body .atl-payments-table .atl-pay-audit-btn {
    height: var(--control-h-dense);
    min-height: var(--control-h-dense);
    max-height: var(--control-h-dense);
}

html body .admin-table .btn-icon-compact,
html body .atl-payments-table .atl-pay-audit-btn {
    width: var(--control-h-dense);
    min-width: var(--control-h-dense);
}

/* — Chat SGR (mobile-first) — */
.dock-badge[hidden],
.admin-side-nav .dock-badge[hidden],
.atl-chat-float-fab .dock-badge[hidden] {
    display: none !important;
}
.dock-badge,
.admin-side-nav .dock-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.15rem;
    margin-left: 0.35rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--gold, #c9a227);
    color: #1a1a1a;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1;
    vertical-align: middle;
}
.dock-item {
    position: relative;
}
.dock-item > .dock-badge {
    position: absolute;
    top: 0.15rem;
    right: 0.35rem;
    margin: 0;
    pointer-events: none;
}
.atl-chat-shell {
    max-width: 56rem;
    margin: 0 auto;
    padding-bottom: calc(var(--atl-dock-h, 45px) + 0.5rem);
}
.atl-chat-layout {
    display: grid;
    gap: 0.75rem;
    min-height: 12rem;
}
.atl-chat-list-panel {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.atl-chat-channel-tabs-hint {
    margin: 0 0 -0.25rem;
    font-size: 0.82rem;
}
.atl-chat-channel-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    width: 100%;
    margin: 0;
}
.atl-chat-channel-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.3rem;
    min-height: var(--control-h, 36px);
    padding: 0.35rem 0.45rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm, 6px);
    background: var(--bg-soft);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.atl-chat-channel-tab:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--gold, #c4782a) 55%, transparent);
    outline-offset: 2px;
}
.atl-chat-channel-tab.is-active {
    background: color-mix(in srgb, var(--gold, #c4782a) 16%, var(--bg-elev));
    border-color: color-mix(in srgb, var(--gold, #c4782a) 65%, var(--line));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold, #c4782a) 25%, transparent);
}
.atl-chat-channel-tab-label {
    overflow-wrap: break-word;
    word-break: normal;
}
.atl-chat-channel-tab-badge {
    position: static;
    flex-shrink: 0;
    min-width: 1.15rem;
    margin: 0;
    pointer-events: none;
}
.atl-chat-channel-tab-badge[hidden] {
    display: none;
}
.atl-chat-float-compose .atl-chat-channel-tabs {
    margin-bottom: 0.15rem;
}
.atl-chat-dnd-row {
    margin: 0;
    font-size: 0.92rem;
}
.atl-chat-dnd-hint {
    margin: -0.35rem 0 0;
    font-size: 0.78rem;
    line-height: 1.35;
}
.atl-chat-float-compose .atl-chat-dnd-hint {
    margin-bottom: 0.35rem;
}
.atl-chat-float-success {
    margin: 0.5rem 0 0;
    padding: 0.55rem 0.65rem;
    border-radius: var(--radius-sm, 6px);
    background: color-mix(in srgb, var(--gold, #c4782a) 12%, var(--bg-soft));
    border: 1px solid color-mix(in srgb, var(--gold, #c4782a) 35%, var(--line));
    font-size: 0.92rem;
}
.atl-chat-float-success a {
    font-weight: 700;
    text-decoration: underline;
}
.atl-chat-thread-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.atl-chat-section-label {
    margin: 0.5rem 0 0.15rem;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.atl-chat-thread-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.15rem 0.5rem;
    align-items: start;
    width: 100%;
    text-align: left;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    cursor: pointer;
    font: inherit;
    color: inherit;
}
.atl-chat-thread-item.is-unread {
    border-color: rgba(0, 169, 255, 0.35);
    box-shadow: 0 0 0 1px rgba(0, 169, 255, 0.1);
}
.atl-chat-thread-item.is-active {
    border-color: var(--gold, #c9a227);
}
.atl-chat-thread-item-title {
    font-weight: 600;
    grid-column: 1 / 2;
}
.atl-chat-thread-item-preview {
    grid-column: 1 / 2;
    font-size: 0.88rem;
    overflow-wrap: break-word;
}
.atl-chat-thread-badge {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    align-self: center;
    min-width: 1.4rem;
    padding: 0.15rem 0.4rem;
    border-radius: 999px;
    background: var(--gold, #c9a227);
    color: #1a1a1a;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}
.atl-chat-thread-panel {
    display: flex;
    flex-direction: column;
    min-height: min(72vh, 36rem);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    overflow: hidden;
}
.atl-chat-thread-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--line);
}
.atl-chat-thread-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    flex: 1;
    overflow-wrap: break-word;
}
.atl-chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0.65rem 0.55rem 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    background: color-mix(in srgb, var(--bg-soft, #f4f0ea) 55%, var(--bg-card));
}
.atl-chat-load-older {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.15rem 0.35rem 0.45rem;
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(
        to bottom,
        color-mix(in srgb, var(--bg-soft, #f4f0ea) 55%, var(--bg-card)) 70%,
        transparent
    );
}
.atl-chat-load-older-btn {
    min-height: var(--control-h, 32px);
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    max-width: 100%;
    overflow-wrap: break-word;
    text-align: center;
}
.atl-chat-load-older-status {
    margin: 0;
    font-size: 0.82rem;
    text-align: center;
}
.atl-chat-day-sep {
    display: flex;
    justify-content: center;
    margin: 0.55rem 0 0.35rem;
    flex-shrink: 0;
}
.atl-chat-day-sep span {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--muted);
    background: color-mix(in srgb, var(--bg-elev, #fff) 88%, var(--line));
    border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.atl-chat-scroll-anchor {
    flex-shrink: 0;
    height: 1px;
    width: 100%;
    pointer-events: none;
}
.atl-chat-bubble {
    max-width: min(88%, 22rem);
    padding: 0.4rem 0.55rem 0.28rem;
    border-radius: 0.65rem;
    background: var(--bg-elev, #fff);
    border: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    align-self: flex-start;
}
.atl-chat-bubble--mine {
    align-self: flex-end;
    background: color-mix(in srgb, var(--gold, #c4782a) 22%, var(--bg-elev, #fff));
    border-color: color-mix(in srgb, var(--gold, #c4782a) 38%, var(--line));
    border-top-right-radius: 0.2rem;
}
.atl-chat-bubble--theirs {
    align-self: flex-start;
    border-top-left-radius: 0.2rem;
}
.atl-chat-bubble-sender {
    margin: 0 0 0.15rem;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
    color: color-mix(in srgb, var(--gold, #c4782a) 75%, var(--text, #1a1a1a));
    overflow-wrap: break-word;
}
.atl-chat-bubble-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.25rem 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
}
.atl-chat-bubble-head time {
    color: var(--muted);
    white-space: nowrap;
}
.atl-chat-bubble-body {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.4;
    overflow-wrap: break-word;
    word-break: break-word;
}
.atl-chat-bubble-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.2rem 0.35rem;
    margin: 0.12rem 0 0;
    padding: 0;
    font-size: 0.68rem;
    line-height: 1;
    color: var(--muted);
    opacity: 0.92;
}
.atl-chat-bubble-meta time {
    white-space: nowrap;
}
.atl-chat-bubble--mine .atl-chat-bubble-meta {
    color: color-mix(in srgb, var(--text, #1a1a1a) 55%, var(--gold, #c4782a));
}
.atl-chat-read-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.atl-chat-read-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    margin: -0.35rem -0.25rem -0.35rem 0;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    border-radius: var(--radius, 6px);
    opacity: 0.85;
}
.atl-chat-read-btn:hover,
.atl-chat-read-btn:focus-visible {
    opacity: 1;
    outline: 2px solid color-mix(in srgb, var(--gold, #c4782a) 55%, transparent);
    outline-offset: 1px;
}
.atl-chat-read-popover {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.35rem);
    z-index: 40;
    min-width: 11.5rem;
    max-width: min(18rem, 88vw);
    padding: 0.45rem 0.55rem;
    font-size: 0.72rem;
    line-height: 1.35;
    text-align: left;
    color: var(--text, #1a1a1a);
    background: var(--bg-elev, #fff);
    border: 1px solid var(--line, #ddd);
    border-radius: calc(var(--radius, 8px) - 2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.atl-chat-read-wrap.is-open .atl-chat-read-popover {
    display: block;
}
.atl-chat-read-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.atl-chat-read-list li + li {
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px solid var(--line, #eee);
}
.atl-chat-read-name {
    font-weight: 600;
}
.atl-chat-read-role {
    font-size: 0.65rem;
}
.atl-chat-read-pending {
    font-style: italic;
    color: var(--muted);
}
.atl-chat-read-loading,
.atl-chat-read-empty,
.atl-chat-read-error {
    margin: 0;
}
.atl-chat-attach img {
    max-width: 100%;
    height: auto;
    border-radius: calc(var(--radius) - 4px);
}
.atl-chat-composer {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 0.45rem;
    padding: 0.55rem;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-elev, #fff) 94%, transparent);
    position: sticky;
    bottom: 0;
}
.atl-chat-compose-row {
    display: flex;
    flex: 1 1 auto;
    align-items: flex-end;
    gap: 0.45rem;
    min-width: 0;
}
.atl-chat-body-input {
    --atl-chat-body-line: 1.35;
    flex: 1 1 auto;
    min-width: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: calc(var(--radius-sm, 6px) + 2px);
    background: var(--bg-elev, #fff);
    color: inherit;
    font: inherit;
    line-height: var(--atl-chat-body-line);
    resize: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: calc(2 * var(--atl-chat-body-line) * 1em + 0.8rem);
    max-height: calc(2 * var(--atl-chat-body-line) * 1em + 0.8rem);
    vertical-align: top;
}
.atl-chat-compose-row .atl-chat-send-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 50%;
    color: #fff;
}
.atl-chat-send-icon {
    display: block;
    width: 1.2rem;
    height: 1.2rem;
    margin-left: 0.05rem;
}
.atl-chat-compose-actions {
    margin-top: 0.75rem;
}
.atl-chat-compose-actions .btn {
    flex: 1 1 auto;
    min-height: var(--control-h, 32px);
}
.atl-chat-dialog .atl-chat-compose-row {
    margin-top: 0.35rem;
}
.atl-chat-attach-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 2.5rem;
    min-height: var(--control-h, 32px);
    cursor: pointer;
    font-size: 1.15rem;
}
@media (max-width: 900px) {
    .atl-chat-compose-row .atl-chat-send-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
    .atl-chat-attach-btn {
        min-height: 44px;
        height: 44px;
    }
    .atl-chat-body-input {
        min-height: calc(2 * var(--atl-chat-body-line, 1.35) * 1em + 0.8rem);
        max-height: calc(2 * var(--atl-chat-body-line, 1.35) * 1em + 0.8rem);
    }
}
.atl-chat-dialog {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    max-width: min(28rem, calc(100vw - 1.5rem));
    background: var(--bg-elev, #fff);
    color: inherit;
}
.atl-chat-float-inbox {
    margin: 0.5rem 0 0.75rem;
}
.atl-chat-float-inbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: min(42vh, 280px);
    overflow-y: auto;
    margin: 0.35rem 0 0;
}
.atl-chat-float-inbox .atl-chat-thread-item {
    width: 100%;
    text-align: left;
}
.atl-chat-compose-preview {
    margin: 0.35rem 0 0.65rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm, 6px);
    background: var(--bg-soft);
}
.atl-chat-compose-preview-link-wrap {
    margin: 0 0 0.4rem;
    font-size: 0.9rem;
}
.atl-chat-compose-preview-link {
    font-weight: 600;
}
.atl-chat-compose-preview-loading,
.atl-chat-compose-preview-empty,
.atl-chat-compose-preview-no-thread {
    margin: 0;
    font-size: 0.85rem;
}
.atl-chat-compose-preview-thread {
    max-height: min(40vh, 16rem);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.45rem 0.35rem 0.3rem;
    margin: 0;
    border-radius: calc(var(--radius-sm, 6px) - 2px);
    background: color-mix(in srgb, var(--bg-soft, #f4f0ea) 55%, var(--bg-card));
}
.atl-chat-compose-preview-thread .atl-chat-bubble {
    max-width: min(92%, 20rem);
    padding: 0.32rem 0.45rem 0.22rem;
}
.atl-chat-compose-preview-thread .atl-chat-bubble-body {
    font-size: 0.86rem;
    line-height: 1.35;
}
.atl-chat-compose-preview-thread .atl-chat-bubble-sender {
    font-size: 0.68rem;
}
.atl-chat-compose-preview-thread .atl-chat-bubble-meta {
    font-size: 0.62rem;
}
.atl-chat-compose-preview-thread .atl-chat-day-sep {
    margin: 0.35rem 0 0.2rem;
    font-size: 0.72rem;
}
.atl-chat-guardian-search-wrap {
    position: relative;
    z-index: 25;
    margin-bottom: 0.15rem;
}
.atl-chat-float-compose-fields .atl-chat-guardian-search-wrap {
    z-index: 35;
}
.atl-chat-guardian-suggest-list:not(:empty) {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.2rem);
    margin: 0;
    max-height: min(14rem, 42vh);
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm, 6px);
    background: var(--bg-elev, #fff);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
    z-index: 50;
}
.atl-chat-guardian-suggest-list:empty {
    display: none;
}
.atl-chat-guardian-search-hint {
    margin: 0.35rem 0 0.15rem;
    font-size: 0.85rem;
    line-height: 1.35;
}
.atl-chat-email-copy-row {
    margin: 0.5rem 0 0.15rem;
}
.atl-chat-email-copy-hint {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    line-height: 1.35;
}
.atl-chat-guardian-chip {
    display: inline-block;
    margin: 0.2rem 0.25rem 0.2rem 0;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    font: inherit;
    cursor: pointer;
}
.atl-chat-guardian-suggest {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.55rem 0.65rem;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
    text-align: left;
    overflow-wrap: break-word;
    min-height: var(--control-h, 32px);
}
.atl-chat-guardian-suggest-list .atl-chat-guardian-suggest:last-child {
    border-bottom: 0;
}
.atl-chat-guardian-suggest:hover,
.atl-chat-guardian-suggest:focus-visible,
.atl-chat-guardian-suggest.is-active {
    background: var(--bg-soft);
}
.atl-chat-guardian-suggest.is-active {
    box-shadow: inset 3px 0 0 var(--gold, #b8860b);
}
.atl-chat-guardian-suggest-name {
    font-weight: 600;
    line-height: 1.35;
}
.atl-chat-guardian-suggest-sub {
    margin-top: 0.12rem;
    font-size: 0.82em;
    font-weight: 400;
    line-height: 1.3;
    color: var(--muted, #64748b);
    overflow-wrap: break-word;
}
@media (max-width: 859px) {
    .atl-chat-shell.is-thread-open {
        display: flex;
        flex-direction: column;
        min-height: calc(100dvh - var(--atl-admin-head, 3.5rem) - var(--atl-dock-h, 45px) - 2rem);
        max-width: none;
        margin-left: -0.35rem;
        margin-right: -0.35rem;
        padding-bottom: 0;
    }
    .atl-chat-shell.is-thread-open .atl-chat-layout {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }
    .atl-chat-shell.is-thread-open .atl-chat-thread-panel {
        flex: 1;
        min-height: 0;
        border-radius: var(--radius-sm, 6px);
    }
    .atl-chat-shell.is-thread-open .atl-chat-messages {
        max-height: none;
    }
    .atl-chat-shell.is-thread-open .atl-chat-list-panel {
        display: none;
    }
    .atl-chat-shell:not(.is-thread-open) .atl-chat-thread-panel {
        display: none !important;
    }
    .atl-chat-back {
        display: inline-flex;
    }
    .atl-chat-composer {
        flex-shrink: 0;
        padding-bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
    }
}
@media (min-width: 860px) {
    .atl-chat-layout {
        grid-template-columns: minmax(14rem, 34%) 1fr;
        align-items: stretch;
    }
    .atl-chat-shell.is-thread-open .atl-chat-thread-panel {
        min-height: min(78vh, 40rem);
    }
    .atl-chat-back {
        display: none;
    }
    .atl-chat-empty {
        grid-column: 1 / -1;
    }
    .atl-chat-shell.is-thread-open .atl-chat-empty {
        display: none;
    }
}

/* Chat flutuante (FAB circular → mensagens; móvel e desktop) */
.atl-chat-float {
    --atl-chat-fab-size: 54px;
    --atl-chat-fab-ring: rgba(196, 120, 42, 0.35);
    position: fixed;
    inset: 0;
    z-index: 70;
    pointer-events: none;
    overflow: visible;
}
.atl-chat-float.is-dismissed .atl-chat-float-launcher {
    display: none;
}
.atl-chat-float-launcher {
    position: fixed;
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    z-index: 2;
    width: var(--atl-chat-fab-size);
    height: var(--atl-chat-fab-size);
    padding-top: 0.35rem;
    pointer-events: auto;
}
.atl-chat-float-fab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--atl-chat-fab-size);
    height: var(--atl-chat-fab-size);
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0;
    font: inherit;
    cursor: pointer;
    border: 1px solid var(--atl-chat-fab-ring);
    border-radius: 50%;
    background: #fff;
    color: inherit;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
}
.atl-chat-float-fab:focus-visible {
    outline: 2px solid var(--gold, #c4782a);
    outline-offset: 2px;
}
.atl-chat-float-fab-logo {
    display: block;
    width: 2rem;
    height: 2rem;
    max-width: 72%;
    max-height: 72%;
    object-fit: contain;
    pointer-events: none;
}
.atl-chat-float-online-dot {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: #5dd65d;
    box-shadow: 0 0 0 2px #fff;
    pointer-events: none;
}
.atl-chat-float-fab:has(.dock-badge:not([hidden])) .atl-chat-float-online-dot {
    display: none;
}
.atl-chat-float-fab .dock-badge {
    position: absolute;
    top: auto;
    right: 2px;
    bottom: 2px;
    left: auto;
    z-index: 2;
    margin: 0;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.2rem;
    font-size: 0.62rem;
    line-height: 1.15rem;
    box-shadow: 0 0 0 2px #fff;
    pointer-events: none;
}
.atl-chat-float-dismiss {
    position: absolute;
    top: -0.2rem;
    right: -0.2rem;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--bg-elev, #fff);
    color: var(--text-muted, #666);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    -webkit-tap-highlight-color: transparent;
}
@media (max-width: 900px) {
    .atl-chat-float-launcher {
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }
    .has-mobile-dock .atl-chat-float-launcher {
        bottom: calc(var(--atl-dock-h, 0px) + 12px);
    }
}
@media (min-width: 901px) {
    .atl-chat-float-launcher {
        right: max(20px, env(safe-area-inset-right, 0px));
        bottom: max(20px, env(safe-area-inset-bottom, 0px));
    }
}

.atl-chat-float-compose {
    z-index: 80;
    pointer-events: auto;
    position: fixed;
    margin: 0;
    width: min(28rem, calc(100vw - 1.25rem));
    max-width: calc(100vw - 1.25rem);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    background: var(--bg-elev, #fff);
    color: inherit;
    box-sizing: border-box;
}
.atl-chat-float-compose.is-thread-open {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0.75rem 0.85rem 0.85rem;
}
.atl-chat-float-compose.is-thread-open .atl-chat-float-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.atl-chat-float-compose.is-thread-open .atl-chat-float-compose-fields {
    display: none;
}
.atl-chat-float-compose.is-thread-open .atl-chat-float-thread {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: 0.35rem;
}
.atl-chat-float-thread-head {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    margin-bottom: 0.35rem;
}
.atl-chat-float-thread-back {
    flex-shrink: 0;
    min-width: var(--control-h, 32px);
    padding-left: 0.45rem;
    padding-right: 0.45rem;
}
.atl-chat-float-thread-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    flex: 1 1 auto;
    overflow-wrap: break-word;
}
.atl-chat-float-messages {
    flex: 1 1 auto;
    min-height: min(12rem, 38vh);
    max-height: min(52vh, 28rem);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm, 6px);
}
@media (max-width: 900px) {
    .atl-chat-float-compose.is-thread-open {
        max-height: calc(
            100dvh - 1.3rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)
        );
    }
    .atl-chat-float-messages {
        max-height: none;
        min-height: 10rem;
    }
}
.atl-chat-float-compose.is-thread-open #atl-chat-float-body-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
@media (max-width: 900px) {
    .atl-chat-float-compose {
        top: calc(0.65rem + env(safe-area-inset-top, 0px));
        left: max(0.625rem, env(safe-area-inset-left, 0px));
        right: max(0.625rem, env(safe-area-inset-right, 0px));
        bottom: auto;
        width: auto;
        max-width: none;
        max-height: calc(
            100dvh - 1.3rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)
        );
        transform: none;
    }
}
@media (min-width: 901px) {
    .atl-chat-float-compose {
        --atl-chat-compose-gap: 10px;
        --atl-chat-compose-launcher-bottom: max(20px, env(safe-area-inset-bottom, 0px));
        --atl-chat-compose-launcher-right: max(20px, env(safe-area-inset-right, 0px));
        top: auto;
        left: auto;
        right: var(--atl-chat-compose-launcher-right);
        bottom: calc(
            var(--atl-chat-compose-launcher-bottom) + var(--atl-chat-fab-size, 54px) +
                var(--atl-chat-compose-gap)
        );
        max-height: calc(
            100vh - var(--atl-chat-compose-launcher-bottom) - var(--atl-chat-fab-size, 54px) -
                var(--atl-chat-compose-gap) - 1rem
        );
        transform: none;
    }
}
.atl-chat-float-compose::backdrop {
    background: rgba(0, 0, 0, 0.45);
}
.atl-chat-float-form label {
    display: block;
    margin-top: 0.65rem;
}
.atl-chat-float-form .form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
.atl-chat-float-form .form-actions .btn {
    flex: 1 1 0;
    min-height: var(--control-h, 32px);
}
.atl-chat-float-form .atl-chat-compose-row .atl-chat-body-input {
    width: auto;
}
.atl-chat-float-compose-hint {
    font-size: 0.9rem;
    margin: 0.25rem 0 0;
}
.atl-chat-float-full-link-wrap {
    margin: 0.75rem 0 0;
    text-align: center;
    font-size: 0.9rem;
}
.atl-chat-float-success {
    margin: 0.5rem 0 0;
}

/* Admin — enviar lembretes (EE) */
.atl-lembretes-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}
.atl-lembretes-filter-row input[type="search"] {
    flex: 1 1 12rem;
    min-width: 0;
    max-width: 100%;
}
.atl-lembretes-template {
    margin-bottom: 1rem;
}
.atl-lembretes-list-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.35rem 1rem;
    margin-bottom: 0.5rem;
}
.atl-lembretes-select-all {
    margin-bottom: 0.65rem;
}
.atl-lembretes-select-all label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: var(--control-h, 32px);
}
.atl-lemb-col-check {
    width: 2.5rem;
    text-align: center;
}
.atl-lembretes-row.is-no-email {
    opacity: 0.85;
}
.atl-lemb-warn {
    color: var(--danger, #b42318);
    font-weight: 500;
}
.atl-lembretes-actions {
    margin-top: 1rem;
    padding-bottom: calc(var(--mobile-dock-h, 56px) + 0.5rem);
}
.atl-check-inline {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.45rem;
}
.atl-reminder-banner p {
    margin: 0 0 0.5rem;
}
.atl-hoje-pay-reminders {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin: 0 0 0.85rem;
}
.atl-hoje-pay-reminder {
    border-color: var(--gold, #c4a035);
    background: color-mix(in srgb, var(--gold, #c4a035) 8%, var(--surface, #fff));
}
.atl-hoje-pay-reminder-label {
    margin: 0 0 0.25rem;
    font-size: 0.82rem;
}
.atl-hoje-pay-reminder-subject {
    margin: 0 0 0.55rem;
    overflow-wrap: break-word;
}
.atl-hoje-pay-reminder-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0;
    align-items: center;
}
@media (max-width: 900px) {
    .atl-lembretes-table thead {
        display: none;
    }
    .atl-lembretes-table tbody tr {
        display: block;
        border: 1px solid var(--line);
        border-radius: 8px;
        margin-bottom: 0.55rem;
        padding: 0.55rem 0.65rem;
    }
    .atl-lembretes-table tbody td {
        display: flex;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.25rem 0;
        border: 0;
        overflow-wrap: break-word;
    }
    .atl-lembretes-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        flex: 0 0 auto;
        max-width: 42%;
    }
    .atl-lembretes-table .atl-lemb-col-check {
        width: auto;
        justify-content: flex-start;
    }
    .atl-lembretes-table .atl-lemb-col-check::before {
        content: 'Seleccionar';
    }
}
