:root {
    --employer-green: #176b42;
    --employer-green-dark: #0e4d30;
    --employer-gold: #c79c47;
}

.employer-login-page {
    min-height: 100vh;
    background: radial-gradient(circle at 15% 15%, rgba(199,156,71,.2), transparent 32%), linear-gradient(135deg, #0b3f29, #176b42 58%, #238052);
}

.employer-login-card { max-width: 460px; border: 0; border-radius: 24px; box-shadow: 0 28px 70px rgba(3,35,21,.3); }
.employer-login-logo { width: 92px; height: 92px; object-fit: contain; }
.employer-login-card .form-control { min-height: 50px; border-radius: 12px; }
.employer-login-card .btn { min-height: 48px; border-radius: 12px; }

.employer-menu { background: linear-gradient(180deg, var(--employer-green-dark), var(--employer-green)) !important; }
.employer-menu .navbar-nav .nav-link { margin: 2px 10px; padding: 10px 12px; color: rgba(255,255,255,.72); border-radius: 10px; }
.employer-menu .navbar-nav .nav-link i { color: rgba(255,255,255,.6); }
.employer-menu .navbar-nav .nav-link:hover,
.employer-menu .navbar-nav .nav-link.active,
.employer-menu .navbar-nav .nav-link[aria-expanded=true] { color: #fff !important; background: rgba(255,255,255,.1); box-shadow: inset 3px 0 0 var(--employer-gold); }
.employer-menu .menu-title span { color: rgba(255,255,255,.42) !important; }
.employer-menu .menu-dropdown { margin: 3px 10px 7px; padding: 3px; background: rgba(0,0,0,.12); border-radius: 10px; }
.employer-menu .menu-dropdown .nav-sm { padding-left: .35rem; }
.employer-menu .menu-dropdown .nav-link { padding-left: 18px !important; white-space: normal; }
.employer-brand-copy { display: inline-flex; flex-direction: column; margin-left: 9px; vertical-align: middle; }
.employer-brand-copy strong { color: #fff; font-size: 15px; }
.employer-brand-copy small { color: rgba(255,255,255,.58); font-size: 9px; }
.employer-stat-card { border: 0; border-radius: 18px; box-shadow: 0 9px 28px rgba(22,64,40,.08); }
.employer-stat-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: rgba(23,107,66,.1); color: var(--employer-green); font-size: 24px; }
.btn-employer { color: #fff; background: var(--employer-green); border-color: var(--employer-green); }
.btn-employer:hover { color: #fff; background: var(--employer-green-dark); border-color: var(--employer-green-dark); }

.declaration-document-page { min-height: 100vh; padding: 28px; background: #eaf0f6 !important; }
.declaration-document-toolbar { display: flex; justify-content: flex-end; gap: 10px; max-width: 1180px; margin: 0 auto 16px; }
.declaration-paper { max-width: 1180px; min-height: 900px; margin: 0 auto; padding: 42px; color: #172b3d; background: #fff; box-shadow: 0 18px 60px rgba(7,31,58,.14); }
.declaration-paper__header { display: flex; justify-content: space-between; gap: 30px; padding-bottom: 22px; border-bottom: 4px solid var(--employer-green); }
.declaration-paper__header > div:first-child { display: grid; grid-template-columns: 74px auto; align-items: center; column-gap: 14px; }
.declaration-paper__header img { grid-row: 1 / 3; width: 70px; max-height: 70px; object-fit: contain; }
.declaration-paper__header strong { font-size: 16px; }
.declaration-paper__header small { color: #6c7d8e; }
.declaration-paper__header span { color: var(--employer-green); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.declaration-paper__header h1 { margin: 3px 0; color: #071f3a; font-size: 24px; }
.declaration-paper__identity { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 24px 0; overflow: hidden; border: 1px solid #d9e4ef; border-radius: 12px; background: #d9e4ef; }
.declaration-paper__identity > div { display: flex; flex-direction: column; padding: 13px 15px; background: #f7f9fc; }
.declaration-paper__identity small, .declaration-paper__totals small, .declaration-recap-grid small, .declaration-paper__grand-total small { color: #6c7d8e; font-size: 10px; text-transform: uppercase; }
.declaration-paper__table { border: 1px solid #d9e4ef; font-size: 11px; }
.declaration-paper__table thead th { color: #fff !important; background: #123f6d !important; white-space: nowrap; }
.declaration-paper__table td, .declaration-paper__table th { padding: 8px; border-color: #d9e4ef; }
.declaration-paper__table tfoot th { background: #e8f1fa !important; }
.declaration-paper__totals { display: grid; grid-template-columns: repeat(3, 1fr); margin: 22px 0; border: 1px solid #d9e4ef; border-radius: 12px; }
.declaration-paper__totals > div { display: flex; flex-direction: column; padding: 16px; }
.declaration-paper__totals .total, .declaration-paper__grand-total .total { color: #fff; background: #123f6d; }
.declaration-paper__totals .total small, .declaration-paper__grand-total .total small { color: rgba(255,255,255,.7); }
.declaration-paper__footer { margin-top: 35px; padding-top: 18px; border-top: 1px solid #d9e4ef; }
.declaration-paper__footer > div { display: flex; justify-content: space-between; min-height: 90px; padding-top: 15px; font-weight: 600; }
.declaration-recap-section { margin: 24px 0; }
.declaration-recap-section__title { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
.declaration-recap-section__title > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: #fff; background: #123f6d; font-weight: 800; }
.declaration-recap-section__title h2 { margin: 0; color: #071f3a; font-size: 17px; }
.declaration-recap-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; border: 1px solid #d9e4ef; border-radius: 12px; background: #d9e4ef; }
.declaration-recap-grid > div { display: flex; flex-direction: column; padding: 18px; background: #f7f9fc; }
.declaration-recap-grid strong { margin-top: 4px; font-size: 17px; }
.declaration-paper__grand-total { display: grid; grid-template-columns: 1fr auto 1fr auto 1.15fr; align-items: stretch; margin-top: 30px; overflow: hidden; border: 1px solid #d9e4ef; border-radius: 12px; }
.declaration-paper__grand-total > div { display: flex; flex-direction: column; justify-content: center; padding: 18px; }
.declaration-paper__grand-total > span { display: grid; place-items: center; color: #6c7d8e; font-size: 20px; }
@media (max-width: 800px) { .declaration-document-page { padding: 8px; } .declaration-paper { padding: 20px; } .declaration-paper__header, .declaration-paper__footer > div { flex-direction: column; } .declaration-paper__identity, .declaration-recap-grid { grid-template-columns: 1fr 1fr; } .declaration-paper__grand-total { grid-template-columns: 1fr; } .declaration-paper__grand-total > span { display: none; } }
@media print { @page { size: A4 landscape; margin: 10mm; } body.declaration-document-page { padding: 0 !important; background: #fff !important; } .declaration-paper { max-width: none; min-height: 0; padding: 0; box-shadow: none; } .declaration-paper__table { font-size: 8px; } .declaration-paper__table td, .declaration-paper__table th { padding: 4px; } .declaration-paper__header h1 { font-size: 18px; } }

.declaration-preview-modal .modal-header { min-height: 66px; padding: 10px 18px; color: #fff; background: #071f3a; border: 0; }
.declaration-preview-modal .modal-title { color: #fff; font-weight: 700; }
.declaration-preview-modal .btn-close { margin-left: 8px; filter: invert(1) grayscale(100%) brightness(200%); }
.declaration-preview-modal .modal-body { overflow: hidden; background: #cfd7e0; }
.declaration-preview-modal iframe { display: block; width: 100%; height: calc(100vh - 66px); border: 0; background: #cfd7e0; }

.declarations-table-container { width: 100%; min-height: max-content; overflow: visible; }
.declarations-table-container .dropdown-menu { z-index: 1000; }
.declaration-actions-floating {
    position: fixed !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 1090 !important;
}

body.legacy-declaration-preview { min-width: 1180px; margin: 0; padding: 18px; color: #111; background: #cfd7e0 !important; font-family: Arial, Helvetica, sans-serif; font-size: 13px; }
.legacy-declaration-sheet { width: 1420px; max-width: calc(100vw - 36px); margin: 0 auto; }
.legacy-declaration-page { min-height: 900px; padding: 22px 26px; background: #fff; box-shadow: 0 10px 35px rgba(7,31,58,.18); }
.legacy-page-break { margin-top: 22px; page-break-before: always; }
.legacy-bordered { border: 1px solid #111; }

.legacy-form-header { display: grid; grid-template-columns: 28% 44% 28%; align-items: start; min-height: 92px; }
.legacy-form-header__side { display: grid; grid-template-columns: 105px 1fr; gap: 8px; align-items: start; font-size: 12px; line-height: 1.35; }
.legacy-form-header__side.text-end { display: flex; flex-direction: column; align-items: flex-end; }
.legacy-form-header__side img { width: 100px; height: 76px; object-fit: contain; }
.legacy-form-header__side strong { grid-column: 1 / -1; font-size: 18px; }
.legacy-form-header__center { display: flex; flex-direction: column; gap: 12px; align-items: center; padding: 5px 14px; text-align: center; }
.legacy-form-header__center strong { font-size: 18px; line-height: 1.3; }
.legacy-form-header__center span { max-width: 520px; font-size: 13px; font-weight: 700; }
.legacy-form-header__side img.legacy-canam-logo { width: 80px; height: 80px; padding: 0; object-fit: contain; }
.legacy-form-title { margin: 5px 0 12px; padding: 6px 8px; border: 2px solid #111; font-size: 20px; font-weight: 900; text-align: center; }

.legacy-employer-block { display: grid; grid-template-columns: minmax(0, 4fr) minmax(260px, 1fr); gap: 8px; margin-bottom: 8px; font-size: 13px; }
.legacy-employer-block__main { display: grid; grid-template-columns: 3fr 2fr; gap: 7px; }
.employer-address { min-height: 91px; padding: 7px 9px; }
.employer-address p { margin: 0 0 4px; }
.legacy-period { display: flex; flex-direction: column; gap: 4px; }
.legacy-period > div { display: flex; flex-direction: column; min-height: 57px; padding: 6px; text-align: center; }
.legacy-period > div span { margin-bottom: 5px; font-weight: 700; text-decoration: underline; }
.legacy-period small { line-height: 1.35; }
.legacy-three-boxes { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr .75fr; gap: 7px; }
.legacy-three-boxes > div { display: flex; flex-direction: column; gap: 3px; padding: 6px 8px; }
.legacy-three-boxes b { margin-bottom: 2px; text-align: center; text-decoration: underline; }
.legacy-payment span { display: flex; align-items: center; gap: 5px; }
.legacy-payment i { display: inline-grid; place-items: center; width: 12px; height: 12px; border: 1px solid #111; font-style: normal; font-size: 9px; }
.legacy-employer-block aside { display: flex; flex-direction: column; gap: 5px; padding: 7px 8px; border: 1px solid #111; }
.legacy-employer-note { margin-top: 4px; padding-top: 5px; border-top: 1px solid #111; text-align: center; }
.legacy-employer-note p { margin: 5px 0 0; font-size: 12px; line-height: 1.3; }

.legacy-form-table { width: 100%; margin: 7px 0; border-collapse: collapse; color: #111; background: #fff; font-size: 15px; }
.legacy-form-table th, .legacy-form-table td { padding: 4px 3px; border: 1px solid #111 !important; text-align: center; vertical-align: middle; }
.legacy-form-table thead th, .legacy-form-table tfoot th { color: #111 !important; background: #ececec !important; font-weight: 800; }
.legacy-nominative-table { font-size: 11px; }
.legacy-nominative-table th, .legacy-nominative-table td { padding: 3px 2px; }
.legacy-nominative-table tbody tr { break-inside: avoid; }
.legacy-total-cell { font-weight: 800; }
.legacy-nominative-footer { display: grid; grid-template-columns: 1fr 1.25fr; gap: 20px; min-height: 110px; padding: 7px 9px; border: 1px solid #111; font-size: 13px; }
.legacy-nominative-footer p { margin: 0 0 5px; }
.legacy-legal-note { margin: 7px 0 0; padding: 5px; border: 1px solid #111; font-size: 12px; line-height: 1.3; }

.legacy-recap-identity { display: grid; grid-template-columns: 1.4fr 1fr .75fr; gap: 8px; margin-bottom: 12px; font-size: 13px; }
.legacy-recap-identity > div { display: flex; flex-direction: column; gap: 5px; min-height: 80px; padding: 7px 9px; }
.legacy-section-title { margin: 16px 0 7px; padding: 6px 9px; border: 1px solid #111; background: #e9e9e9; font-size: 16px; font-weight: 800; }
.legacy-recap-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; font-size: 13px; }
.legacy-recap-facts span { padding: 6px 8px; border: 1px solid #111; }
.legacy-recap-list { display: flex; gap: 50px; margin: 7px 0; padding: 0; list-style: none; font-size: 15px; }
.legacy-grand-total { display: grid; grid-template-columns: 1fr auto; align-items: center; margin-top: 18px; padding: 10px 14px; color: #fff; background: #071f3a; }
.legacy-grand-total > div { display: flex; flex-direction: column; gap: 4px; }
.legacy-grand-total strong { font-size: 18px; }
.legacy-attention { display: grid; grid-template-columns: auto 1fr; gap: 12px; margin-top: 9px; padding: 8px 10px; border: 2px solid #111; font-size: 13px; }
.legacy-attention b { color: #a40000; }
.legacy-certification { min-height: 95px; margin-top: 12px; text-align: right; font-size: 13px; line-height: 1.6; }

@media (max-width: 1250px) {
    body.legacy-declaration-preview { min-width: 1050px; }
    .legacy-declaration-sheet { max-width: none; }
}

@media print {
    @page { size: A4 landscape; margin: 5mm; }
    html, body.legacy-declaration-preview { min-width: 0 !important; margin: 0 !important; padding: 0 !important; background: #fff !important; }
    .legacy-declaration-sheet { width: auto !important; max-width: none !important; margin: 0 !important; }
    .legacy-declaration-page { min-height: 0; padding: 0; box-shadow: none; }
    .legacy-page-break { margin: 0; break-before: page; page-break-before: always; }
    .legacy-form-header { min-height: 72px; }
    .legacy-form-title { font-size: 18px; }
    .legacy-nominative-table { font-size: 11px; }
    .legacy-nominative-table th, .legacy-nominative-table td { padding: 2px 1px; }
    .legacy-form-table thead { display: table-header-group; }
    .legacy-form-table tfoot { display: table-footer-group; }
}
