:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --text: #172033;
    --muted: #647084;
    --line: #dce2ea;
    --brand: #135e7d;
    --brand-dark: #0d4057;
    --navy: #071a2c;
    --accent: #2f8f6f;
    --danger: #b33a3a;
    --shadow: 0 14px 36px rgba(23, 32, 51, 0.10);
}

/* Layout refinements for the product shell */
.main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 0;
}

.topbar {
    background: var(--navy);
    color: #fff;
    margin-bottom: 0;
    min-height: 82px;
    padding: 16px 28px;
}

.topbar p,
.topbar-user span {
    color: #b8c6d3;
}

.header-logo {
    background: #fff;
    border-radius: 8px;
    display: block;
    height: 46px;
    object-fit: contain;
    padding: 7px 10px;
    width: 215px;
}

.header-logo-link {
    border-radius: 8px;
    display: inline-flex;
    text-decoration: none;
}

.header-logo-link:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.55);
    outline-offset: 3px;
}

.content {
    flex: 1;
    padding: 28px;
}

.footer {
    color: var(--muted);
    font-size: 11px;
    padding: 12px 28px 18px;
    text-align: center;
}

.menu-button {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.menu-button:hover {
    background: rgba(255, 255, 255, 0.18);
}

.auth-shell {
    background: linear-gradient(140deg, #071a2c, #0e3754 58%, #135e7d);
}

.auth-brand {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 24px;
    padding: 12px;
}

.auth-brand img {
    display: block;
    height: auto;
    width: 100%;
}

.auth-footer {
    color: var(--muted);
    font-size: 11px;
    margin: 18px 0 0;
    text-align: center;
}

/* Login final standard */
.auth-shell {
    background: #eef3f7;
}

.auth-card {
    background: #fff;
    border: 1px solid var(--line);
    max-width: 460px;
}

.auth-brand {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 24px;
    padding: 14px;
}

.auth-brand img {
    display: block;
    height: auto;
    width: 100%;
}

@media (max-width: 820px) {
    .content {
        padding: 20px;
    }

    .topbar {
        padding: 14px 20px;
    }

    .header-logo {
        width: 145px;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.45;
}

a {
    color: var(--brand);
    text-decoration: none;
}

input,
select,
button {
    font: inherit;
}

.app-page {
    min-height: 100vh;
}

.sidebar {
    background: #102434;
    color: #fff;
    inset: 0 auto 0 0;
    max-width: calc(100vw - 28px);
    padding: 24px 18px;
    position: fixed;
    transform: translateX(-104%);
    transition: transform 180ms ease;
    width: 290px;
    z-index: 30;
}

.menu-open .sidebar {
    transform: translateX(0);
}

.sidebar-backdrop {
    background: rgba(16, 36, 52, 0.42);
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 180ms ease;
    z-index: 20;
}

.menu-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: #aab8c6;
    margin-top: 2px;
}

.nav {
    display: grid;
    gap: 10px;
    margin-top: 28px;
}

.nav a {
    border-radius: 8px;
    color: #eaf0f4;
    display: block;
    padding: 10px 12px;
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.08);
}

.nav .muted {
    color: #8495a6;
}

.nav-group {
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    overflow: hidden;
}

.nav-group summary {
    cursor: pointer;
    font-weight: 700;
    list-style: none;
    padding: 12px;
}

.nav-group summary::-webkit-details-marker {
    display: none;
}

.nav-group summary::after {
    content: '+';
    float: right;
}

.nav-group[open] summary::after {
    content: '-';
}

.nav-group a {
    border-radius: 0;
    padding-left: 18px;
}

.main {
    min-width: 0;
    padding: 28px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.topbar-title,
.topbar-user {
    align-items: center;
    display: flex;
    gap: 14px;
}

.topbar-user span {
    color: var(--muted);
    font-size: 13px;
}

.topbar h1 {
    font-size: 28px;
    margin: 0;
}

.topbar p {
    color: var(--muted);
    margin: 3px 0 0;
}

.panel,
.metric,
.auth-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.panel {
    padding: 22px;
}

.panel.narrow {
    max-width: 860px;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.panel-header h2 {
    font-size: 20px;
    margin: 0;
}

.panel-header p {
    color: var(--muted);
    margin: 4px 0 0;
}

.grid {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric {
    padding: 22px;
}

.metric-link {
    color: var(--text);
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.metric-link:hover {
    border-color: var(--brand);
    box-shadow: 0 12px 30px rgba(19, 94, 125, 0.14);
    transform: translateY(-2px);
}

.metric span {
    color: var(--muted);
    display: block;
}

.metric strong {
    display: block;
    font-size: 34px;
    margin-top: 8px;
}

.sitemap-grid {
    display: grid;
    gap: 18px;
}

.sitemap-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.sitemap-card h3 {
    font-size: 17px;
    margin: 0 0 12px;
}

.button {
    align-items: center;
    background: var(--brand);
    border: 0;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
}

.button-row {
    display: flex;
    gap: 10px;
}

.icon-button {
    align-items: center;
    background: #edf2f6;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    padding: 0;
    width: 36px;
}

.icon-button:hover {
    background: #dde7ee;
}

.icon-button.danger {
    color: var(--danger);
}

.icon-button.contact-action {
    color: #2f8f6f;
}

.icon-button.whatsapp-action {
    color: #128c4a;
}

.disabled-icon-button {
    color: var(--muted);
    cursor: not-allowed;
    opacity: 0.55;
}

.icon-button svg {
    fill: none;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 18px;
}

.menu-button {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    height: 42px;
    width: 42px;
}

.menu-button:hover {
    background: var(--brand-dark);
}

.button:hover {
    background: var(--brand-dark);
    color: #fff;
}

.button.secondary {
    background: #edf2f6;
    color: var(--text);
}

.button.secondary:hover {
    background: #dde7ee;
}

.alert {
    border-radius: 8px;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.alert.success {
    background: #e7f5ef;
    color: #146046;
}

.alert.error {
    background: #f9e8e8;
    color: var(--danger);
}

.alert.warning {
    background: #fff4df;
    color: #8a560f;
}

.table-wrap {
    overflow-x: auto;
}

.compact-table {
    margin-top: 18px;
}

.list-summary {
    align-items: center;
    background: #f6f9fb;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    display: inline-flex;
    gap: 5px;
    margin-bottom: 14px;
    padding: 9px 12px;
}

.list-summary-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.list-summary-row .list-summary {
    margin-bottom: 0;
}

.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.list-summary strong {
    color: var(--text);
}

.sortable-heading {
    color: inherit;
    text-decoration: none;
}

.sortable-heading:hover {
    color: var(--navy);
    text-decoration: underline;
}

.row-actions {
    align-items: center;
    display: flex;
    gap: 7px;
    justify-content: flex-end;
}

.row-actions form {
    margin: 0;
}

table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 13px 10px;
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.right {
    text-align: right;
}

.empty {
    color: var(--muted);
    text-align: center;
}

.badge {
    background: #edf2f6;
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    padding: 5px 9px;
}

.badge.medium {
    font-size: 13px;
    font-weight: 700;
    padding: 8px 12px;
}

.access-intro {
    color: var(--muted);
    font-weight: 700;
    margin: 0 0 12px;
}

.badge-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.badge-cloud .badge {
    background: var(--navy);
    color: #fff;
}

.bi-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bi-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    padding: 18px;
}

.bi-card > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.bi-card strong {
    font-size: 32px;
}

.bi-card p {
    color: var(--muted);
    margin: 0;
}

.bi-card.attention {
    border-color: #f0c7c7;
}

.mini-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.mini-metrics span {
    background: #f6f8fa;
    border-radius: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    padding: 7px 9px;
}

.stats-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    margin-bottom: 18px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.stat-card span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-card strong {
    font-size: 22px;
}

.form-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.filter-bar {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(260px, 1fr) auto;
    margin-bottom: 18px;
}

label {
    color: var(--muted);
    display: grid;
    font-size: 13px;
    font-weight: 700;
    gap: 7px;
}

.field-hint {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

input,
select,
textarea {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    min-height: 42px;
    padding: 9px 11px;
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand);
    outline: 3px solid rgba(19, 94, 125, 0.14);
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.full-span {
    grid-column: 1 / -1;
}

.section-divider {
    border-top: 1px solid var(--line);
    color: var(--text);
    padding-top: 14px;
}

.token-panel {
    background: #f6f9fb;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.token-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 10px;
}

.token-grid span {
    color: var(--muted);
    font-size: 13px;
}

.token-grid code {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--brand);
    display: inline-block;
    font-size: 12px;
    margin-right: 6px;
    padding: 2px 6px;
}

.form-actions {
    display: flex;
    gap: 10px;
    grid-column: 1 / -1;
    justify-content: flex-end;
}

.panel-header .actions {
    display: flex;
    gap: 10px;
}

.details-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.details-grid div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 13px;
}

.details-grid dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 5px;
}

.details-grid strong {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-bottom: 5px;
}

.details-grid dd {
    margin: 0;
}

.details-grid span {
    display: block;
}

.settings-form {
    display: grid;
    gap: 18px;
}

.settings-section {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.settings-section h3 {
    font-size: 17px;
    margin: 0 0 16px;
}

.settings-actions {
    position: sticky;
    bottom: 0;
    background: var(--panel);
    border-top: 1px solid var(--line);
    padding: 14px 0 0;
}

.settings-logo-preview {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 14px;
    padding: 12px;
}

.settings-logo-preview span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.settings-logo-preview img {
    display: block;
    max-height: 64px;
    max-width: 280px;
    object-fit: contain;
}

.migration-options {
    display: grid;
    gap: 10px;
    margin: 12px 0 16px;
}

.check-row {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 10px;
    padding: 10px 12px;
}

.check-row input {
    min-height: 0;
    width: auto;
}

.check-row small {
    color: var(--muted);
    display: block;
    font-weight: 400;
}

.danger-zone {
    border-color: rgba(179, 58, 58, 0.35);
}

.danger-button {
    background: var(--danger);
}

.danger-button:hover {
    background: #8f2d2d;
}

.migration-log {
    margin-top: 14px;
}

.migration-log ul {
    color: var(--muted);
    margin: 10px 0 0;
    padding-left: 20px;
}

.event-folder {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 18px;
    overflow: hidden;
}

.event-folder img {
    display: block;
    height: auto;
    max-height: 460px;
    object-fit: contain;
    width: 100%;
}

.modal-backdrop {
    align-items: center;
    background: rgba(16, 36, 52, 0.52);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 24px;
    position: fixed;
    z-index: 60;
}

.modal-backdrop[hidden] {
    display: none;
}

.modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 420px;
    padding: 20px;
    width: 100%;
}

.small-modal {
    max-width: 360px;
}

.modal-header {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.modal-header h2 {
    font-size: 20px;
    margin: 0;
}

.modal-header p {
    color: var(--muted);
    margin: 4px 0 0;
}

.qr-box {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    margin: 16px 0;
    padding: 18px;
}

.qr-brand {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-top: 14px;
    padding: 10px 12px;
}

.qr-brand img {
    display: block;
    height: auto;
    margin: 0 auto;
    max-width: 260px;
    width: 100%;
}

.qr-box img {
    height: 260px;
    width: 260px;
}

.modal-actions {
    margin-top: 16px;
}

.public-page {
    background: #eef3f7;
    min-height: 100vh;
}

.public-shell {
    align-items: center;
    display: flex;
    min-height: 100vh;
    padding: 24px;
}

.public-card {
    margin: 0 auto;
    max-width: 460px;
    width: 100%;
}

.landing-page {
    background: #eef3f7;
    color: var(--text);
    min-height: 100vh;
}

.landing-header {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 1180px;
    padding: 22px 28px;
}

.landing-logo {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: inline-flex;
    padding: 10px 12px;
}

.landing-logo img {
    display: block;
    height: 42px;
    object-fit: contain;
    width: 200px;
}

.landing-hero {
    align-items: center;
    background: linear-gradient(135deg, var(--navy), #0d4057 58%, var(--brand));
    color: #fff;
    display: grid;
    gap: 34px;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    margin: 0 auto;
    max-width: 1180px;
    min-height: 560px;
    padding: 56px;
}

.landing-hero h1 {
    font-size: 42px;
    line-height: 1.1;
    margin: 14px 0 18px;
    max-width: 820px;
}

.landing-hero p {
    color: #c9d6df;
    font-size: 18px;
    margin: 0;
    max-width: 720px;
}

.landing-kicker,
.landing-section-title span,
.landing-band span {
    color: #8fd0bd;
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.landing-actions .button.secondary,
.landing-login {
    background: #fff;
}

.landing-snapshot {
    display: grid;
    gap: 14px;
}

.landing-snapshot div {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 18px;
}

.landing-snapshot span,
.landing-snapshot strong {
    display: block;
}

.landing-snapshot span {
    color: #c9d6df;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.landing-snapshot strong {
    font-size: 22px;
}

.landing-section,
.landing-band {
    margin: 0 auto;
    max-width: 1180px;
    padding: 52px 28px;
}

.landing-section-title {
    max-width: 760px;
}

.landing-section-title h2,
.landing-band h2 {
    font-size: 30px;
    line-height: 1.2;
    margin: 10px 0 0;
}

.landing-feature-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 28px;
}

.landing-feature-grid article {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 22px;
}

.landing-feature-grid article span {
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
}

.landing-feature-grid h3 {
    font-size: 19px;
    margin: 12px 0 8px;
}

.landing-feature-grid p {
    color: var(--muted);
    margin: 0;
}

.landing-band {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 22px;
    justify-content: space-between;
    margin-bottom: 42px;
    padding: 28px;
}

.landing-footer {
    color: var(--muted);
    font-size: 12px;
    padding: 0 28px 30px;
    text-align: center;
}

.public-inscription-shell {
    align-items: flex-start;
    display: flex;
    min-height: 100vh;
    padding: 24px;
}

.public-inscription-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin: 0 auto;
    max-width: 980px;
    padding: 24px;
    width: 100%;
}

.public-form-brand {
    margin: 0 auto 20px;
    max-width: 360px;
}

.public-form-header {
    border-bottom: 1px solid var(--line);
    margin-bottom: 18px;
    padding-bottom: 16px;
    text-align: center;
}

.public-badge-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.entry-requirements-badge {
    animation: requirementsPulse 1.8s ease-in-out infinite;
    background: #f59e0b;
    border: 0;
    box-shadow: 0 0 0 rgba(245, 158, 11, 0.55);
    color: #111827;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    transform-origin: center;
}

.entry-requirements-badge:hover,
.entry-requirements-badge:focus {
    animation: none;
    background: #d97706;
    outline: none;
}

@keyframes requirementsPulse {
    0%,
    100% {
        background: #f59e0b;
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55);
        transform: scale(1);
    }

    45% {
        background: #facc15;
        box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
        transform: scale(1.04);
    }
}

.public-form-header h1 {
    font-size: 24px;
    margin: 12px 0 8px;
}

.public-form-header p {
    color: var(--muted);
    margin: 4px 0;
}

.public-form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.public-review-grid {
    margin-top: 16px;
}

.public-form-actions {
    justify-content: flex-end;
    margin-top: 18px;
}

.public-card h1 {
    font-size: 24px;
    margin: 0 0 8px;
}

.public-muted {
    color: var(--muted);
    margin: 4px 0;
}

.confirmation-box {
    background: #f5f7fb;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 16px 0;
    padding: 14px;
}

.confirmation-box span,
.confirmation-box strong {
    display: block;
}

.confirmation-box span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 4px;
}

.public-requirements-backdrop {
    padding: 16px;
}

.public-requirements-modal {
    max-height: min(92vh, 760px);
    max-width: 720px;
    overflow: auto;
}

.public-requirements-content {
    color: var(--text);
    line-height: 1.55;
}

.public-requirements-content h3,
.public-requirements-content h4 {
    color: var(--navy);
    margin: 18px 0 8px;
}

.public-requirements-content h3 {
    font-size: 20px;
    margin-top: 0;
}

.public-requirements-content h4 {
    font-size: 15px;
}

.public-requirements-content p {
    margin: 8px 0;
}

.public-requirements-content ul {
    margin: 8px 0 14px;
    padding-left: 22px;
}

.public-requirements-content li {
    margin: 6px 0;
}

.public-requirements-actions {
    border-top: 1px solid var(--line);
    justify-content: flex-end;
    padding-top: 16px;
}

.steps {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.steps span {
    background: #f0f4f7;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
}

.feature-list {
    display: grid;
    gap: 8px;
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
}

.feature-list li {
    background: #f0f4f7;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
}

.auth-page {
    min-height: 100vh;
}

.auth-shell {
    align-items: center;
    background: linear-gradient(140deg, #102434, #135e7d 58%, #2f8f6f);
    display: flex;
    min-height: 100vh;
    padding: 24px;
}

.auth-card {
    margin: 0 auto;
    max-width: 420px;
    padding: 28px;
    width: 100%;
}

.auth-brand {
    margin-bottom: 24px;
}

.auth-brand small {
    color: var(--muted);
}

.auth-card label {
    margin-bottom: 14px;
}

.auth-card .button {
    width: 100%;
}

.print-body {
    background: #fff;
    color: #111827;
}

.print-report {
    margin: 0 auto;
    max-width: 980px;
    padding: 28px;
}

.print-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.print-header {
    align-items: center;
    border-bottom: 2px solid #172033;
    display: flex;
    gap: 22px;
    padding-bottom: 18px;
}

.print-brand {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    width: 260px;
}

.print-brand img {
    display: block;
    height: auto;
    width: 100%;
}

.print-header h1 {
    font-size: 24px;
    margin: 0 0 8px;
}

.print-header p {
    margin: 2px 0;
}

.print-summary {
    background: #f5f7fb;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: inline-grid;
    margin: 18px 0 6px;
    min-width: 170px;
    padding: 12px 14px;
}

.print-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.print-summary strong {
    font-size: 24px;
}

.print-report-complete {
    max-width: 1320px;
}

.print-report table {
    font-size: 12px;
    margin-top: 14px;
}

.print-report th {
    background: #f5f7fb;
}

.print-report tbody tr:nth-child(even) {
    background: #fafbfd;
}

.period-group {
    break-inside: avoid;
    margin-top: 20px;
}

.period-group h2 {
    border-bottom: 1px solid var(--line);
    font-size: 18px;
    margin: 0 0 8px;
    padding-bottom: 6px;
}

.signature-line {
    min-width: 180px;
}

.print-empty {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-top: 20px;
    padding: 16px;
}

.attendance-sheet-body {
    background: #e8ebef;
    color: #111;
}

.attendance-sheet-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 18px;
}

.attendance-page {
    background: #fff;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.16);
    box-sizing: border-box;
    margin: 0 auto 24px;
    min-height: 297mm;
    padding: 12mm 12mm 10mm;
    position: relative;
    width: 210mm;
}

.attendance-page:last-child {
    margin-bottom: 0;
}

.attendance-brand {
    display: block;
    height: 14mm;
    max-width: 55mm;
    object-fit: contain;
    object-position: left center;
    width: 55mm;
}

.contractor-logo-preview {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 12px;
}

.contractor-logo-preview img {
    display: block;
    max-height: 90px;
    max-width: 320px;
    object-fit: contain;
}

.contractor-logo-preview code {
    overflow-wrap: anywhere;
}

.details-grid .contractor-logo-preview dd {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.attendance-title-row {
    align-items: center;
    display: flex;
    gap: 8mm;
    margin-bottom: 4mm;
}

.attendance-document-title {
    flex: 1;
    font-size: 19pt;
    font-weight: 900;
    letter-spacing: 0.4px;
    text-align: center;
}

.attendance-event-title {
    font-size: 12pt;
    font-weight: 800;
    margin: 0 0 1.5mm;
    text-transform: uppercase;
}

.attendance-event-details {
    font-size: 10pt;
    margin: 0 0 1.5mm;
    text-transform: uppercase;
}

.attendance-table {
    border-collapse: collapse;
    font-size: 8.5pt;
    margin-top: 1mm;
    table-layout: fixed;
    width: 100%;
}

.attendance-table th,
.attendance-table td {
    border: 1px solid #111;
    color: #111;
    padding: 0.6mm 1.2mm;
}

.attendance-table th {
    background: #fffecb;
    font-size: 9pt;
    font-weight: 800;
    text-align: center;
}

.attendance-table td {
    height: 4mm;
}

.attendance-col-id {
    text-align: center;
    width: 8mm;
}

.attendance-col-date {
    text-align: center;
    width: 25mm;
}

.attendance-col-name {
    width: auto;
}

.attendance-col-shift {
    text-align: center;
    width: 34mm;
}

.attendance-write-fields {
    font-size: 9pt;
    font-weight: 800;
    margin-top: 4mm;
    text-transform: uppercase;
}

.attendance-write-box,
.attendance-write-pair > div {
    border: 1px solid #111;
    box-sizing: border-box;
    min-height: 12mm;
    padding: 1mm;
}

.attendance-write-pair {
    display: grid;
    grid-template-columns: 2fr 1fr;
    margin-top: 2.5mm;
}

.attendance-write-pair > div + div {
    border-left: 0;
}

.attendance-write-box + .attendance-write-box {
    margin-top: 2.5mm;
}

.attendance-topics {
    min-height: 28mm;
}

.attendance-topic-lines {
    font-size: 8.5pt;
    font-weight: 400;
    margin-top: 1.5mm;
}

.attendance-page-number {
    bottom: 4mm;
    font-size: 8pt;
    position: absolute;
    right: 12mm;
    text-align: right;
}

@media print {
    @page {
        margin: 12mm;
    }

    .print-actions {
        display: none;
    }

    .print-report {
        max-width: none;
        padding: 0;
    }

    .print-brand {
        width: 220px;
    }

    body {
        background: #fff;
    }

    .attendance-sheet-actions {
        display: none;
    }

    .attendance-page {
        box-shadow: none;
        margin: 0;
        page-break-after: always;
    }

    .attendance-page:last-child {
        page-break-after: auto;
    }

    th,
    td {
        padding: 8px 7px;
    }
}

@media screen and (max-width: 820px) {
    .attendance-page {
        min-height: 0;
        overflow-x: auto;
        padding: 18px;
        width: 100%;
    }
}

@media (max-width: 820px) {
    .main {
        padding: 20px;
    }

    .topbar,
    .panel-header {
        align-items: stretch;
        flex-direction: column;
    }

    .grid.two,
    .grid.three,
    .grid.four,
    .bi-grid,
    .landing-hero,
    .landing-feature-grid,
    .filter-bar,
    .form-grid,
    .public-form-grid,
    .details-grid {
        grid-template-columns: 1fr;
    }

    .landing-header,
    .landing-band {
        align-items: stretch;
        flex-direction: column;
    }

    .landing-hero {
        min-height: auto;
        padding: 34px 24px;
    }

    .landing-hero h1 {
        font-size: 32px;
    }

    .landing-login,
    .landing-actions .button,
    .landing-band .button {
        width: 100%;
    }

    .topbar-user {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Final product shell overrides */
.main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 0;
}

.topbar {
    background: var(--navy);
    color: #fff;
    margin-bottom: 0;
    min-height: 82px;
    padding: 16px 28px;
}

.topbar p,
.topbar-user span {
    color: #b8c6d3;
}

.header-logo {
    display: block;
    height: 42px;
    object-fit: contain;
    width: 190px;
}

.content {
    flex: 1;
    padding: 28px;
}

.footer {
    color: var(--muted);
    font-size: 11px;
    padding: 12px 28px 18px;
    text-align: center;
}

.menu-button {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.menu-button:hover {
    background: rgba(255, 255, 255, 0.18);
}

.auth-shell {
    background: linear-gradient(140deg, #071a2c, #0e3754 58%, #135e7d);
}

.auth-brand {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 24px;
    padding: 12px;
}

.auth-brand img {
    display: block;
    height: auto;
    object-fit: contain;
    width: 100%;
}

.auth-footer {
    color: var(--muted);
    font-size: 11px;
    margin: 18px 0 0;
    text-align: center;
}

.quill-editor {
    background: #fff;
    min-height: 320px;
}

.hidden-file-input {
    display: none;
}

.ql-attachment svg {
    fill: none;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 18px;
}

.ead-attachment {
    align-items: center;
    background: #eef5f9;
    border: 1px solid #c9dbe7;
    border-radius: 8px;
    color: var(--brand);
    display: inline-flex;
    gap: 8px;
    padding: 8px 10px;
    text-decoration: none;
}

.ead-attachment:hover {
    background: #e3eff6;
}

.ead-attachment-icon {
    background: #fff;
    border: 1px solid #c9dbe7;
    border-radius: 999px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    text-transform: uppercase;
}

.course-cover-preview,
.course-cover,
.classroom-course-cover {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.course-cover-preview {
    align-items: flex-start;
    display: grid;
    gap: 8px;
    justify-content: start;
    padding: 12px;
}

.course-cover-preview span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.course-cover-preview img {
    display: block;
    height: auto;
    max-height: 180px;
    max-width: 180px;
    object-fit: contain;
}

.certificate-preview-wrap {
    overflow-x: auto;
}

.certificate-preview {
    aspect-ratio: 1.414 / 1;
    background: #fff;
    background-position: center;
    background-size: cover;
    border: 1px solid var(--line);
    box-shadow: 0 18px 45px rgba(7, 26, 44, 0.14);
    margin: 0 auto;
    max-width: 980px;
    min-width: 720px;
    position: relative;
}

.certificate-preview-content {
    display: grid;
    grid-template-rows: auto auto 1fr auto auto;
    height: 100%;
    padding: 72px 86px 52px;
}

.certificate-preview h1 {
    font-size: 36px;
    margin: 0;
}

.certificate-company {
    color: var(--muted);
    margin: 10px 0 70px;
}

.certificate-body {
    font-size: 18px;
    line-height: 1.8;
    max-width: 760px;
}

.certificate-signature {
    display: grid;
    gap: 4px;
    margin-top: 34px;
}

.certificate-signature strong {
    border-top: 1px solid var(--text);
    display: inline-block;
    padding-top: 10px;
    width: 280px;
}

.certificate-signature span,
.certificate-preview footer {
    color: var(--muted);
    font-size: 12px;
}

.certificate-preview footer {
    display: flex;
    justify-content: space-between;
}

.cards-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.course-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 14px;
    padding: 18px;
}

.course-cover {
    aspect-ratio: 1 / 1;
    justify-self: center;
    max-width: 180px;
    width: 100%;
}

.course-cover img,
.classroom-course-cover img {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.course-card h3 {
    margin: 10px 0 8px;
}

.course-card p {
    color: var(--muted);
    margin: 0;
}

.course-card.locked {
    background: #f3f5f7;
    opacity: 0.72;
}

.requirement-badge {
    border: 1px solid transparent;
}

.requirement-badge.met {
    background: #e7f7ec;
    border-color: #b8e4c4;
    color: #20713a;
}

.requirement-badge.pending {
    background: #fff0dc;
    border-color: #f6bf7b;
    color: #9a570c;
}

.assessment-summary {
    align-items: flex-start;
    background: #f6f9fb;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    margin: 0 0 18px;
    padding: 12px 14px;
}

.assessment-summary span {
    color: var(--muted);
}

.assessment-course-card {
    margin-top: 18px;
}

.assessment-course-card a.course-card {
    color: var(--text);
    text-decoration: none;
}

.disabled-button {
    background: #d8dee5;
    color: #6a7685;
    cursor: not-allowed;
}

.progress-line {
    background: #e6edf2;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.progress-line span {
    background: var(--brand);
    display: block;
    height: 100%;
}

.classroom-layout {
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
}

.classroom-course-cover {
    aspect-ratio: 1 / 1;
    margin: 0 auto 14px;
    max-width: 220px;
    width: 100%;
}

.enrollment-form {
    align-items: end;
}

.enrollment-course-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 16px 0;
    padding: 14px;
}

.enrollment-course-panel h3 {
    font-size: 17px;
    margin: 0 0 12px;
}

.lesson-list {
    border-right: 1px solid var(--line);
    display: grid;
    gap: 8px;
    padding-right: 16px;
}

.lesson-list a {
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    display: grid;
    gap: 4px;
    padding: 12px;
    text-decoration: none;
}

.lesson-list .lesson-locked {
    background: #f3f5f7;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #7b8794;
    cursor: not-allowed;
    display: grid;
    gap: 4px;
    opacity: 0.72;
    padding: 12px;
}

.lesson-list a.active {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(19, 94, 125, 0.12);
}

.lesson-list span,
.lesson-list small {
    color: var(--muted);
    font-size: 12px;
}

.assessment-list {
    display: grid;
    gap: 18px;
}

.assessment-question {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 16px;
}

.assessment-question legend {
    font-weight: 800;
    padding: 0 6px;
}

.assessment-options {
    display: grid;
    gap: 10px;
}

.assessment-option {
    align-items: flex-start;
    background: #fff;
    border: 1px solid #d8e0e8;
    border-radius: 8px;
    cursor: pointer;
    display: grid;
    gap: 12px;
    grid-template-columns: auto 36px minmax(0, 1fr);
    padding: 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.assessment-option:hover {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(19, 94, 125, 0.10);
}

.assessment-option input {
    margin-top: 9px;
}

.assessment-option input:disabled {
    cursor: default;
}

.assessment-option.selected {
    background: #eef7fb;
    border-color: var(--brand);
    box-shadow: inset 4px 0 0 var(--brand);
}

.option-letter {
    align-items: center;
    background: #edf2f7;
    border-radius: 999px;
    color: var(--text);
    display: inline-flex;
    font-weight: 800;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.option-text {
    line-height: 1.45;
    padding-top: 5px;
}

.assessment-question.correct {
    border-color: #b8e4c4;
}

.assessment-question.wrong {
    border-color: #f4b5b5;
}

.assessment-question .correct-option {
    background: #e7f7ec;
    border-color: #b8e4c4;
    box-shadow: inset 4px 0 0 #2e8b47;
}

.assessment-question .correct-option .option-letter {
    background: #2e8b47;
    color: #fff;
}

.assessment-question .wrong-option {
    background: #fdecec;
    border-color: #f4b5b5;
    box-shadow: inset 4px 0 0 #c83d3d;
}

.assessment-question .wrong-option .option-letter {
    background: #c83d3d;
    color: #fff;
}

.lesson-content {
    min-width: 0;
}

.lesson-content h3 {
    font-size: 24px;
    margin: 12px 0 18px;
}

.rich-content {
    line-height: 1.7;
    max-width: 900px;
}

.rich-content img,
.rich-content iframe {
    max-width: 100%;
}

.rich-content .ql-video {
    aspect-ratio: 16 / 9;
    border: 0;
    display: block;
    height: auto;
    margin: 18px 0;
    max-width: 800px;
    min-height: 320px;
    width: 100%;
}

@media (max-width: 820px) {
    .content {
        padding: 20px;
    }

    .topbar {
        padding: 14px 20px;
    }

    .header-logo {
        width: 145px;
    }

    .classroom-layout {
        grid-template-columns: 1fr;
    }

    .lesson-list {
        border-right: 0;
        padding-right: 0;
    }

    .assessment-option {
        grid-template-columns: auto 32px minmax(0, 1fr);
    }
}
