:root {
    --azul-escuro: #1f3b57;
    --azul: #2b6cb0;
    --azul-claro: #4299e1;
    --cinza-bg: #f4f6f9;
    --cinza-borda: #e2e8f0;
    --cinza-texto: #4a5568;
    --texto: #1a202c;
    --verde: #38a169;
    --amarelo: #d69e2e;
    --vermelho: #e53e3e;
    --branco: #ffffff;
    --sombra: 0 4px 16px rgba(31, 59, 87, 0.08);
    --sombra-hover: 0 10px 28px rgba(31, 59, 87, 0.16);
    --raio: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--cinza-bg);
    color: var(--texto);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--azul); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Topbar ---------- */
.topbar {
    background: var(--azul-escuro);
    color: var(--branco);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 64px;
    box-shadow: var(--sombra);
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.sidebar-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-radius: 8px;
    color: var(--branco);
    background: rgba(255,255,255,0.12);
    cursor: pointer;
    transition: background 0.15s ease;
}
.sidebar-toggle:hover { background: rgba(255,255,255,0.24); }
.sidebar-toggle span { width: 20px; height: 2px; border-radius: 2px; background: currentColor; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--branco); }
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    background: var(--azul-claro);
    border-radius: 10px;
    font-weight: 800; font-size: 20px;
}
.brand-logo { height: 38px; width: auto; display: block; }
.brand-text { font-size: 18px; font-weight: 400; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.user-info { font-size: 14px; opacity: 0.95; }

/* ---------- Menu lateral ---------- */
.portal-layout { flex: 1; min-height: 0; display: flex; position: relative; }
.sidebar {
    flex: 0 0 260px;
    width: 260px;
    overflow: hidden;
    background: var(--branco);
    border-right: 1px solid var(--cinza-borda);
    box-shadow: 4px 0 14px rgba(31, 59, 87, 0.05);
    transition: flex-basis 0.2s ease, width 0.2s ease, transform 0.2s ease;
}
.sidebar-nav { width: 260px; padding: 20px 14px; }
.sidebar-link,
.sidebar-group summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--azul-escuro);
    font-size: 14px;
    font-weight: 600;
}
.sidebar-link:hover,
.sidebar-group summary:hover { background: #ebf3fb; text-decoration: none; }
.sidebar-link svg,
.sidebar-summary-label svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.sidebar-group { margin-top: 4px; }
.sidebar-group summary { justify-content: space-between; cursor: pointer; list-style: none; }
.sidebar-group summary::-webkit-details-marker { display: none; }
.sidebar-summary-label { display: flex; align-items: center; gap: 12px; }
.sidebar-chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.15s ease;
}
.sidebar-group[open] .sidebar-chevron { transform: rotate(225deg); }
.sidebar-submenu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 2px 0 8px 20px;
    padding-left: 21px;
    border-left: 1px solid var(--cinza-borda);
}
.sidebar-submenu a,
.sidebar-sync-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 7px;
    color: var(--cinza-texto);
    font-size: 13px;
}
.sidebar-sync-form { margin: 0; }
.sidebar-sync-button {
    width: 100%;
    border: 0;
    background: transparent;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}
.sidebar-submenu a svg,
.sidebar-sync-button svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.sidebar-submenu a:hover,
.sidebar-sync-button:hover { color: var(--azul); background: #f4f8fc; text-decoration: none; }
.sidebar-sync-button:disabled { cursor: wait; opacity: 0.6; }
.sidebar-overlay { display: none; }
.sidebar-collapsed .sidebar { width: 0; flex-basis: 0; border-right: 0; }

/* ---------- Aguarde da sincronizacao ---------- */
.sync-loading[hidden] { display: none; }
.sync-loading {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 30, 45, 0.68);
    backdrop-filter: blur(2px);
}
.sync-loading-card {
    width: min(420px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 32px 24px;
    border-radius: var(--raio);
    background: var(--branco);
    box-shadow: var(--sombra-hover);
    color: var(--azul-escuro);
    text-align: center;
}
.sync-loading-card strong { font-size: 18px; }
.sync-loading-card span:last-child { color: var(--cinza-texto); font-size: 14px; }
.sync-loading-spinner {
    width: 42px;
    height: 42px;
    margin-bottom: 4px;
    border: 4px solid var(--cinza-borda);
    border-top-color: var(--azul);
    border-radius: 50%;
    animation: sync-spin 0.8s linear infinite;
}
@keyframes sync-spin {
    to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    .sync-loading-spinner { animation-duration: 1.8s; }
}

/* ---------- Botoes ---------- */
.btn {
    display: inline-block;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--branco);
    background: var(--azul);
}
.btn:hover { background: var(--azul-claro); text-decoration: none; }
.btn-primary { background: var(--azul); }
.btn-secondary { background: #718096; }
.btn-success { background: var(--verde); }
.btn-logout { background: rgba(255,255,255,0.15); }
.btn-logout:hover { background: rgba(255,255,255,0.28); }
.btn-outline {
    background: transparent;
    border: 1px solid var(--azul);
    color: var(--azul);
}
.btn-outline:hover { background: var(--azul); color: var(--branco); }
.btn-small { padding: 7px 11px; font-size: 12px; white-space: nowrap; }

/* ---------- Conteudo ---------- */
.main-content { flex: 1; width: 100%; min-width: 0; max-width: 1600px; margin: 0 auto; padding: 28px 24px; }
.footer {
    padding: 14px 24px;
    color: var(--cinza-texto);
    background: var(--branco);
    border-top: 1px solid var(--cinza-borda);
    text-align: center;
    font-size: 13px;
}

.messages { margin-bottom: 18px; }
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    border-left: 4px solid;
}
.alert-error { background: #fff5f5; border-color: var(--vermelho); color: #9b2c2c; }
.alert-warning { background: #fffaf0; border-color: var(--amarelo); color: #975a16; }
.alert-success { background: #f0fff4; border-color: var(--verde); color: #276749; }
.alert-info { background: #ebf8ff; border-color: var(--azul-claro); color: #2c5282; }

/* ---------- Home ---------- */
.welcome {
    background: linear-gradient(135deg, var(--azul-escuro), var(--azul));
    color: var(--branco);
    border-radius: var(--raio);
    padding: 36px 32px;
    margin-bottom: 28px;
    box-shadow: var(--sombra);
}
.welcome h1 { font-size: 28px; margin-bottom: 8px; font-weight: 700; }
.welcome p { font-size: 16px; opacity: 0.92; max-width: 640px; }

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.card-feature {
    background: var(--branco);
    border: 1px solid var(--cinza-borda);
    border-radius: var(--raio);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--sombra);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card-feature:hover { transform: translateY(-4px); box-shadow: var(--sombra-hover); text-decoration: none; }
.card-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: grid; place-items: center;
    background: #ebf3fb;
    color: var(--azul);
}
.card-icon svg { width: 26px; height: 26px; }
.card-feature h3 { color: var(--texto); font-size: 18px; }
.card-feature p { color: var(--cinza-texto); font-size: 14px; line-height: 1.5; }
.card-feature .card-link { margin-top: auto; color: var(--azul); font-weight: 600; font-size: 14px; }

/* ---------- Paginas internas ---------- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.page-header h1 { font-size: 24px; color: var(--azul-escuro); }
.page-header .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.page-description { margin-top: 5px; color: var(--cinza-texto); font-size: 14px; }
.breadcrumb { font-size: 13px; color: var(--cinza-texto); margin-bottom: 10px; }

.panel {
    background: var(--branco);
    border: 1px solid var(--cinza-borda);
    border-radius: var(--raio);
    padding: 20px;
    box-shadow: var(--sombra);
    margin-bottom: 20px;
}

/* ---------- Modal de detalhes da agenda ---------- */
.agenda-detail-modal {
    inset: 0;
    width: min(1000px, calc(100% - 32px));
    max-height: 90vh;
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: var(--raio);
    color: var(--texto);
    background: var(--branco);
    box-shadow: 0 24px 70px rgba(15, 31, 47, 0.3);
}
.agenda-detail-modal[open] { display: flex; flex-direction: column; }
.agenda-detail-modal::backdrop { background: rgba(15, 31, 47, 0.62); }
.modal-header,
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    background: var(--branco);
}
.modal-header { border-bottom: 1px solid var(--cinza-borda); }
.modal-footer { justify-content: flex-end; border-top: 1px solid var(--cinza-borda); }
.modal-header h2 { margin-top: 2px; color: var(--azul-escuro); font-size: 22px; }
.modal-eyebrow {
    color: var(--cinza-texto);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.modal-close-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 8px;
    color: var(--cinza-texto);
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}
.modal-close-icon:hover { color: var(--azul-escuro); background: var(--cinza-bg); }
.modal-body { min-height: 0; overflow-y: auto; padding: 22px; }
.modal-body h3 { margin: 22px 0 12px; color: var(--azul-escuro); font-size: 17px; }
.detail-section + .detail-section { margin-top: 24px; }
.detail-section h3 { margin-top: 0; }
.agenda-detail-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.agenda-detail-summary div {
    padding: 12px;
    border: 1px solid var(--cinza-borda);
    border-radius: 9px;
    background: #fafbfc;
}
.agenda-detail-summary dt {
    margin-bottom: 4px;
    color: var(--cinza-texto);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.agenda-detail-summary dd { font-size: 14px; font-weight: 600; }
.agenda-detail-summary .summary-wide { grid-column: 1 / -1; }
.hours-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.hours-summary div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 9px;
    color: var(--azul-escuro);
    background: #ebf3fb;
}
.hours-summary span { font-size: 13px; font-weight: 600; }
.hours-summary strong { font-size: 20px; }
.detail-items-table { min-width: 760px; }
.detail-description { min-width: 240px; white-space: normal; line-height: 1.45; }

.filtros { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group-grow { flex: 1; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--cinza-texto); }
.form-group input,
.form-group select {
    padding: 9px 12px;
    border: 1px solid var(--cinza-borda);
    border-radius: 8px;
    font-size: 14px;
    min-width: 170px;
    background: var(--branco);
}
.form-group input:focus,
.form-group select:focus { outline: none; border-color: var(--azul-claro); box-shadow: 0 0 0 3px rgba(66,153,225,0.15); }
.date-shortcuts { display: flex; gap: 8px; }
.search-wait {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--azul-escuro);
    font-size: 13px;
    font-weight: 600;
}
.search-wait[hidden] { display: none; }
.loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--cinza-borda);
    border-top-color: var(--azul);
    border-radius: 50%;
    animation: spinner-rotate 0.7s linear infinite;
}
@keyframes spinner-rotate {
    to { transform: rotate(360deg); }
}

.link-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}
.link-editor-header h2 { color: var(--azul-escuro); font-size: 20px; }
.link-editor-header p { margin-top: 3px; color: var(--cinza-texto); font-size: 13px; }
.client-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 18px;
}
.client-filter input { width: 100%; }
.client-filter-linked {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid var(--cinza-borda);
    border-radius: 8px;
    color: var(--cinza-texto);
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.client-filter-linked:hover { border-color: var(--azul-claro); background: #f4f8fc; }
.client-filter-linked input { width: 16px; height: 16px; accent-color: var(--azul); }
.client-filter-count {
    flex: 0 0 auto;
    padding-bottom: 10px;
    color: var(--cinza-texto);
    font-size: 13px;
}
.client-filter-empty {
    padding: 24px 20px 8px;
}
.client-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--cinza-borda);
    border-radius: 10px;
}
.client-checklist legend {
    padding: 0 7px;
    color: var(--azul-escuro);
    font-size: 14px;
    font-weight: 700;
}
.client-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--cinza-borda);
    border-radius: 8px;
    color: var(--cinza-texto);
    cursor: pointer;
}
.client-check-item:hover { border-color: var(--azul-claro); background: #f4f8fc; }
.client-check-item[hidden] { display: none; }
.client-check-item input { width: 17px; height: 17px; accent-color: var(--azul); }
.client-check-item strong { color: var(--texto); font-size: 13px; }

.user-registration-form { max-width: 760px; }
.user-registration-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.user-registration-grid input { width: 100%; min-width: 0; }
.field-error { color: var(--vermelho); font-size: 12px; }
.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 22px;
}
.user-list-header { margin-top: 30px; }
.user-list-header h2 { color: var(--azul-escuro); font-size: 21px; }
.user-list { min-width: 1050px; }
.user-list td:first-child .badge { margin-left: 6px; }
.user-edit-input {
    width: 100%;
    min-width: 150px;
    padding: 7px 10px;
    border: 1px solid var(--cinza-borda);
    border-radius: 7px;
    font-size: 13px;
}
.user-edit-input:focus {
    outline: none;
    border-color: var(--azul-claro);
    box-shadow: 0 0 0 3px rgba(66,153,225,0.15);
}
.password-input { min-width: 170px; }
.user-active-toggle { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.user-active-toggle input { width: 16px; height: 16px; accent-color: var(--azul); }
.user-active-toggle span { color: var(--cinza-texto); font-size: 13px; }
.password-blocked { color: var(--cinza-texto); font-size: 12px; }
.user-edit-error { display: block; max-width: 220px; margin-top: 5px; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Tabela ---------- */
.table-wrapper { overflow-x: auto; }
table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
table.data thead th {
    background: var(--azul-escuro);
    color: var(--branco);
    text-align: left;
    padding: 12px 14px;
    font-weight: 600;
    white-space: nowrap;
}
table.data tbody td { padding: 11px 14px; border-bottom: 1px solid var(--cinza-borda); }
table.data tbody tr:nth-child(even) { background: #fafbfc; }
table.data tbody tr:hover { background: #eef5fb; }
table.data tfoot td { padding: 12px 14px; font-weight: 700; background: #f1f5f9; }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.badge-realizado, .badge-concluida { background: #f0fff4; color: #276749; }
.badge-agendado { background: #ebf8ff; color: #2c5282; }
.badge-os-lancada { background: #fffaf0; color: #975a16; }
.badge-glosada { background: #fff5f5; color: #9b2c2c; }
.badge-faturada { background: #f0fff4; color: #276749; }
.badge-default { background: #edf2f7; color: #4a5568; }
.badge-sync-pending { background: #edf2f7; color: #4a5568; }
.badge-sync-running { background: #ebf8ff; color: #2c5282; }
.badge-sync-success { background: #f0fff4; color: #276749; }
.badge-sync-failed { background: #fff5f5; color: #9b2c2c; }
.sync-log-table { min-width: 1050px; }
.sync-log-table td { vertical-align: top; }
.sync-log-table td:first-child small {
    display: block;
    margin-top: 3px;
    color: var(--cinza-texto);
}
.sync-log-error {
    max-width: 480px;
    margin: 0;
    color: #9b2c2c;
    font: inherit;
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.sync-log-no-error { color: var(--cinza-texto); font-size: 13px; }

/* ---------- Relatório de projetos ---------- */
.report-results { display: grid; gap: 20px; }
.report-analyst { padding: 0; overflow: hidden; }
.report-analyst-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--cinza-borda);
}
.report-analyst-header h2 { margin-top: 3px; color: var(--azul-escuro); font-size: 19px; }
.report-eyebrow {
    color: var(--cinza-texto);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.results-count {
    padding: 4px 10px;
    border-radius: 999px;
    background: #edf2f7;
    color: var(--cinza-texto);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.report-table { min-width: 1320px; }
.report-table tbody td { vertical-align: top; }
.report-client { min-width: 220px; }
.report-description { min-width: 220px; white-space: normal; }
.report-tasks { min-width: 280px; line-height: 1.45; white-space: normal; }
.report-hours { white-space: nowrap; text-align: right; }
.project-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    background: #ebf8ff;
    color: #2c5282;
    font-weight: 700;
}
.report-totals {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 22px;
    border-top: 1px solid var(--cinza-borda);
    background: #f8fafc;
}
.report-totals > div {
    min-width: 150px;
    padding: 10px 14px;
    border: 1px solid var(--cinza-borda);
    border-radius: 6px;
    background: var(--branco);
}
.report-totals span {
    display: block;
    margin-bottom: 4px;
    color: var(--cinza-texto);
    font-size: 12px;
}
.report-totals strong { color: var(--azul-escuro); font-size: 18px; }
.report-totals .report-total-highlight {
    border-color: var(--azul);
    background: #ebf8ff;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--cinza-texto);
}

/* ---------- Login ---------- */
.login-page {
    background: linear-gradient(135deg, var(--azul-escuro), var(--azul));
    align-items: center;
    justify-content: center;
    display: flex;
}
.login-page .main-content { display: flex; align-items: center; justify-content: center; }
.login-wrapper { width: 100%; max-width: 400px; }
.login-brand { text-align: center; margin-bottom: 22px; color: var(--branco); }
.login-logo {
    height: 200px; width: auto; max-width: 100%; margin: 0 auto 18px; display: block;
}
.login-brand h1 { font-size: 20px; font-weight: 600; }
.card-login {
    background: var(--branco);
    border-radius: var(--raio);
    padding: 32px 28px;
    box-shadow: var(--sombra-hover);
}
.card-login h2 { font-size: 20px; margin-bottom: 20px; color: var(--azul-escuro); text-align: center; }
.login-form .form-group { margin-bottom: 16px; }
.login-form input { width: 100%; }
.login-form .btn { width: 100%; margin-top: 6px; padding: 12px; }
.login-hint { text-align: center; font-size: 13px; color: var(--cinza-texto); margin-top: 16px; }

@media (max-width: 800px) {
    .sidebar {
        position: absolute;
        z-index: 20;
        top: 0;
        bottom: 0;
        left: 0;
        width: 260px;
        flex-basis: 260px;
    }
    .sidebar-collapsed .sidebar { transform: translateX(-100%); width: 260px; flex-basis: 260px; }
    .sidebar-overlay {
        position: absolute;
        z-index: 10;
        inset: 0;
        display: block;
        border: 0;
        background: rgba(15, 31, 47, 0.42);
        cursor: pointer;
    }
    .sidebar-collapsed .sidebar-overlay { display: none; }
}

@media (max-width: 600px) {
    .topbar { padding: 0 14px; }
    .brand-text { display: none; }
    .user-info { display: none; }
    .topbar-right { gap: 8px; }
    .main-content { padding: 20px 16px; }
    .welcome h1 { font-size: 22px; }
    .page-header { align-items: flex-start; }
    .agenda-detail-modal { width: calc(100% - 16px); max-height: 95vh; }
    .modal-header, .modal-footer, .modal-body { padding: 16px; }
    .hours-summary { grid-template-columns: 1fr; }
    .user-registration-grid { grid-template-columns: 1fr; }
    .report-analyst-header { align-items: flex-start; }
    .report-totals { flex-direction: column; }
    .report-totals > div { min-width: 0; }
}

@media print {
    @page { size: A4 landscape; margin: 12mm; }

    .report-results .report-analyst { break-inside: avoid; }
    .report-totals { break-inside: avoid; }
    .report-table { min-width: 0; font-size: 9px; }

    body.printing-agenda-detail,
    body.printing-agenda-detail .agenda-detail-modal.is-printing {
        background: #fff;
    }
    body.printing-agenda-detail * { visibility: hidden !important; }
    body.printing-agenda-detail .agenda-detail-modal.is-printing,
    body.printing-agenda-detail .agenda-detail-modal.is-printing * {
        visibility: visible !important;
    }
    body.printing-agenda-detail .agenda-detail-modal.is-printing {
        display: block !important;
        position: absolute;
        inset: 0;
        width: 100%;
        max-width: none;
        max-height: none;
        margin: 0;
        overflow: visible;
        border-radius: 0;
        box-shadow: none;
    }
    body.printing-agenda-detail .agenda-detail-modal.is-printing::backdrop {
        background: transparent;
    }
    body.printing-agenda-detail .modal-header,
    body.printing-agenda-detail .modal-body {
        padding: 10px 0;
    }
    body.printing-agenda-detail .modal-body { overflow: visible; }
    body.printing-agenda-detail .modal-footer,
    body.printing-agenda-detail .modal-close-icon {
        display: none !important;
    }
    body.printing-agenda-detail .agenda-detail-summary div,
    body.printing-agenda-detail .hours-summary div {
        break-inside: avoid;
    }
    body.printing-agenda-detail table.data {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}
