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

:root {
    --asolinc-navy: #1e3a5f;
    --asolinc-navy-mid: #2d5a8c;
    --asolinc-gold: #d4af37;
    --asolinc-header-h: 0px;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8c 100%);
    min-height: 100vh;
    padding: 0;
    color: #333;
}

.hidden {
    display: none !important;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: linear-gradient(135deg, var(--asolinc-navy) 0%, var(--asolinc-navy-mid) 100%);
    color: white;
    border-bottom: 3px solid var(--asolinc-gold);
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

.app-header-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    max-width: 1100px;
    margin: 0 auto;
}

.app-brand {
    flex: 1;
    min-width: 0;
}

.app-brand-name {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 1px;
    line-height: 1.1;
}

.app-brand-sub {
    font-size: 10px;
    opacity: 0.85;
    margin-top: 2px;
}

.app-user-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-toggle {
    display: none;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.45);
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
}

.app-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 18px 12px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.app-nav.empty {
    display: none;
}

.app-nav-link {
    background: transparent;
    border: 1px solid transparent;
    color: rgba(255,255,255,0.88);
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}

.app-nav-link:hover {
    background: rgba(255,255,255,0.12);
}

.app-nav-link.active {
    background: rgba(212, 175, 55, 0.22);
    border-color: var(--asolinc-gold);
    color: #fff;
}

.app-main {
    flex: 1;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    overflow: hidden;
    padding: 24px 30px 30px;
}

.view-page-title {
    text-align: center;
    color: var(--asolinc-navy);
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 0.5px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--asolinc-gold);
}

.view-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.view-heading {
    color: var(--asolinc-navy);
    font-size: 18px;
    margin: 0;
}

.btn-refresh {
    background: var(--asolinc-navy);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}

.btn-refresh:hover {
    background: var(--asolinc-navy-mid);
}

.success-message .btn-refresh {
    margin-top: 12px;
}

.login-user-info {
    color: white;
    font-size: 11px;
    font-weight: bold;
}

.btn-login-corner,
.btn-panel-corner,
.btn-logout-corner,
.btn-notif-corner {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.5);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
}

.btn-login-corner:hover,
.btn-panel-corner:hover,
.btn-logout-corner:hover,
button.btn-notif-corner:hover {
    background: rgba(255,255,255,0.3);
}

span.btn-notif-corner {
    cursor: default;
    opacity: 0.85;
}

.estado-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    color: white;
}

.estado-badge.pendiente { background: #ffa000; }
.estado-badge.aprobado { background: #4caf50; }
.estado-badge.rechazado { background: #d32f2f; }

.solicitud-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: left;
}

.solicitud-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.solicitud-card-meta {
    font-size: 11px;
    color: #666;
    margin-bottom: 8px;
}

.solicitud-card-firmas {
    font-size: 11px;
    margin-bottom: 10px;
}

.solicitud-card-rechazado {
    color: #d32f2f;
}

.solicitud-card-acciones {
    display: flex;
    gap: 10px;
}

.btn-aprobar {
    background: #4caf50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
}

.btn-rechazar {
    background: #d32f2f;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
}

.btn-aprobar:disabled,
.btn-rechazar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.solicitud-card-extra {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.btn-detalle,
.btn-pdf-link {
    background: #f0f0f0;
    color: #1e3a5f;
    border: 1px solid #ccc;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-detalle:hover,
.btn-pdf-link:hover {
    background: #e0e0e0;
}

.solicitud-detalle-body {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 10px;
}

.detalle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 20px;
    font-size: 11px;
    color: #333;
}

.content {
    padding: 0;
}

.form-section {
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

.form-section:last-child {
    border-bottom: none;
}

.section-header {
    background: linear-gradient(90deg, #1e3a5f 0%, #2d5a8c 100%);
    color: white;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 13px;
    text-transform: uppercase;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.form-row.full {
    grid-template-columns: 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.modal .form-group {
    margin-bottom: 15px;
}

label {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
    color: #1e3a5f;
}

.label-red {
    color: #d32f2f;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="date"],
select {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    background: white;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
select:focus {
    outline: none;
    border-color: #2d5a8c;
    box-shadow: 0 0 0 2px rgba(45, 90, 140, 0.1);
    background: #f9fbff;
}

input[readonly] {
    background: #f0f0f0;
    color: #555;
    cursor: not-allowed;
}

input[type="text"]:disabled,
input[type="number"]:disabled {
    background: #f5f5f5;
    color: #666;
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.currency {
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 12px;
    color: #555;
    font-weight: bold;
    background: #eef2f7;
    border: 1px solid #ccc;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.search-results {
    background: #e8f5e9;
    border: 1px solid #4caf50;
    border-left: 4px solid #4caf50;
    padding: 12px;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 12px;
    color: #2e7d32;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.search-results.visible {
    display: block;
}

.search-result-item {
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 5px;
}

.search-result-item:hover {
    background: rgba(76, 175, 80, 0.2);
}

.info-box {
    background: #e3f2fd;
    border: 1px solid #2196F3;
    border-left: 4px solid #2196F3;
    padding: 12px;
    border-radius: 4px;
    margin: 15px 0;
    font-size: 12px;
    color: #0d47a1;
    line-height: 1.5;
}

.info-box.success {
    background: #c8e6c9;
    border-color: #4caf50;
    border-left-color: #4caf50;
    color: #1b5e20;
    font-weight: bold;
}

.info-box.error {
    background: #fdecea;
    border-color: #d32f2f;
    border-left-color: #d32f2f;
    color: #c62828;
    font-weight: bold;
}

.tasa-display {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8c 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
    display: none;
}

.tasa-display.visible {
    display: block;
}

.tasa-label {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.tasa-value {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 5px;
}

.calculo-section {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    border: 1px solid #eee;
    display: none;
}

.calculo-section.visible {
    display: block;
}

.calculo-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 12px;
}

.calculo-item {
    padding: 12px;
    background: white;
    border-radius: 4px;
    border: 1px solid #eee;
}

.calculo-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 5px;
}

.calculo-value {
    font-size: 18px;
    font-weight: bold;
    color: #1e3a5f;
}

.calculo-value.highlight {
    color: #d32f2f;
    font-size: 22px;
}

.tabla-cuotas {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 11px;
    display: none;
}

.tabla-cuotas.visible {
    display: table;
}

.tabla-cuotas th {
    background: #1e3a5f;
    color: white;
    padding: 10px 8px;
    text-align: left;
    font-weight: bold;
}

.tabla-cuotas td {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.tabla-cuotas tr:hover {
    background: #f9f9f9;
}

.resumen-box {
    background: linear-gradient(135deg, #f5f8fc 0%, #e3f2fd 100%);
    border: 2px solid #1e3a5f;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
    display: none;
}

.resumen-box.visible {
    display: block;
}

.resumen-title {
    color: #1e3a5f;
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.resumen-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
    font-size: 12px;
}

.resumen-item:last-child {
    border-bottom: none;
}

.resumen-item-cuota {
    border-top: 2px solid #1e3a5f;
    border-bottom: none;
    margin-top: 10px;
    padding-top: 10px;
    font-size: 13px;
}

.resumen-value {
    font-weight: bold;
    color: #1e3a5f;
}

.resumen-value-cuota {
    color: #d32f2f;
    font-size: 16px;
}

.autorizacion {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
    font-size: 11px;
    line-height: 1.6;
}

.autorizacion h3 {
    color: #1e3a5f;
    font-size: 12px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.autorizacion p {
    margin-bottom: 12px;
}

.autorizacion ul {
    margin-left: 20px;
    margin-bottom: 12px;
}

.autorizacion li {
    margin-bottom: 6px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 10px 0;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 3px;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: 400;
    font-size: 12px;
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-top: 25px;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.btn-submit {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8c 100%);
    color: white;
    grid-column: 1 / 3;
}

.btn-submit:hover {
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-pdf {
    background: #d32f2f;
    color: white;
}

.btn-pdf:hover {
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.4);
}

.btn-pdf:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-reset {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    grid-column: 3;
}

.btn-reset:hover {
    background: #e0e0e0;
}

.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
    display: none;
    font-size: 12px;
}

.success-message.show {
    display: block;
}

.btn-descargar-pdf {
    display: inline-block;
    margin-top: 10px;
    background: #1976d2;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
}

.btn-descargar-pdf:hover {
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.4);
}

.footer-note {
    font-size: 10px;
    color: #999;
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* MODAL PDF */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    width: 90%;
    max-width: 900px;
    height: 90vh;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8c 100%);
    color: white;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

.modal-header h2 {
    font-size: 16px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
}

.modal-body {
    flex: 1;
    overflow: auto;
    padding: 20px;
    background: white;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: #f5f5f5;
}

.btn-print {
    background: #1976d2;
    color: white;
    padding: 10px 20px;
    font-size: 11px;
}

.btn-print:hover {
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.4);
}

.btn-navy {
    background: #1e3a5f;
}

.btn-navy:hover {
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.4);
}

.modal-content-compact {
    max-width: 380px;
    height: auto;
}

.modal-content-form {
    max-width: 420px;
    height: auto;
}

.msg-muted {
    text-align: center;
    color: #999;
    padding: 30px;
}

.msg-muted-sm {
    text-align: center;
    color: #999;
}

.msg-error {
    text-align: center;
    color: #d32f2f;
    padding: 30px;
}

.msg-error-sm {
    color: #d32f2f;
}

.btn-close-modal {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    padding: 10px 20px;
    font-size: 11px;
}

.btn-close-modal:hover {
    background: #e0e0e0;
}

.login-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    border-bottom: 1px solid #ddd;
}

.login-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 8px 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #777;
    cursor: pointer;
}

.login-tab.active {
    color: #1e3a5f;
    border-bottom-color: #1e3a5f;
}

.auth-gate {
    margin: 20px 0 28px;
}

.auth-gate-card {
    background: #f4f7fb;
    border: 1px solid #d5deea;
    border-radius: 8px;
    padding: 28px 24px;
    text-align: center;
}

.auth-gate-card h2 {
    margin: 0 0 10px;
    color: #1e3a5f;
    font-size: 1.25rem;
}

.auth-gate-card p {
    margin: 0 0 18px;
    color: #445;
}

.admin-help {
    margin: 0 0 16px;
    color: #555;
    font-size: 0.95rem;
}

.admin-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.admin-search,
.admin-filter-rol {
    flex: 1;
    min-width: 180px;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
}

.admin-user-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4px;
    border-bottom: 1px solid #e6e6e6;
}

.admin-user-row.is-inactive {
    opacity: 0.65;
    background: #fafafa;
}

.admin-user-meta {
    min-width: 220px;
    flex: 1;
}

.admin-user-meta strong {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #1e3a5f;
}

.admin-user-meta span {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-top: 4px;
}

.admin-inactive-tag {
    color: #b71c1c !important;
    font-size: 11px !important;
    font-weight: bold;
}

.admin-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.admin-role-select {
    min-width: 160px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.btn-admin-secondary {
    background: #f5f7fa;
    border: 1px solid #c5ced8;
    color: #1e3a5f;
    padding: 7px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
}

.btn-admin-secondary:hover {
    background: #e8eef5;
}

.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    color: white;
    background: #607d8b;
}

.role-badge.role-socio { background: #78909c; }
.role-badge.role-presidente { background: #1e3a5f; }
.role-badge.role-vicepresidente { background: #2d5a8c; }
.role-badge.role-vocal { background: #6a1b9a; }
.role-badge.role-tesoreria { background: #2e7d32; }
.role-badge.role-auditoria { background: #546e7a; }
.role-badge.role-administrador { background: #c62828; }

.pdf-content {
    background: white;
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid #ddd;
    line-height: 1.6;
    font-size: 12px;
}

.pdf-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #1e3a5f;
    padding-bottom: 15px;
}

.pdf-header h1 {
    color: #1e3a5f;
    font-size: 16px;
    margin-bottom: 5px;
}

.pdf-header p {
    font-size: 11px;
    color: #666;
    margin: 2px 0;
}

.pdf-section {
    margin-bottom: 20px;
}

.pdf-section-title {
    background: #1e3a5f;
    color: white;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 12px;
}

.pdf-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.pdf-item-label {
    font-weight: bold;
    color: #333;
}

.pdf-item-value {
    color: #1e3a5f;
    font-weight: bold;
}

.pdf-header-note {
    font-size: 10px;
    margin-top: 8px;
    color: #1e3a5f;
    font-weight: bold;
}

.pdf-value-alert {
    font-weight: bold;
    color: #d32f2f;
}

.pdf-value-cuota {
    color: #d32f2f;
    font-weight: bold;
    font-size: 11px;
}

.pdf-value-total {
    color: #1e3a5f;
    font-weight: bold;
    font-size: 11px;
}

.pdf-notice {
    background-color: #f0f0f0;
    border-left: 4px solid #ffc107;
    padding: 8px;
}

.pdf-notice p {
    font-size: 10px;
    margin: 0;
    line-height: 1.5;
    color: #333;
}

.pdf-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 10px;
}

.pdf-table th {
    background: #1e3a5f;
    color: white;
    padding: 8px;
    text-align: left;
    font-weight: bold;
}

.pdf-table td {
    border: 1px solid #ddd;
    padding: 6px 8px;
}

.pdf-table tr:nth-child(even) {
    background: #f9f9f9;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .app-nav {
        display: none;
        flex-direction: column;
        padding-bottom: 14px;
    }

    .app-header.nav-open .app-nav:not(.empty) {
        display: flex;
    }

    .app-main {
        padding: 12px;
    }

    .container {
        padding: 16px;
    }

    .form-row,
    .button-group,
    .calculo-row {
        grid-template-columns: 1fr;
    }

    .btn-submit,
    .btn-pdf,
    .btn-reset {
        grid-column: 1;
    }

    .admin-user-actions {
        width: 100%;
    }

    .admin-role-select {
        flex: 1;
    }

    .modal-content {
        width: 95%;
        height: 95vh;
    }
}

@media print {
    body {
        background: white;
    }
    .app-header {
        display: none !important;
    }
    /* The form (and any other modal not currently open) stays in the DOM
       behind the print preview modal — hide it so only the modal's own
       content ends up in the printed/saved PDF. */
    .container {
        display: none;
    }
    .modal-header,
    .modal-footer,
    .btn-print,
    .btn-close-modal {
        display: none;
    }
    /* Only the currently-open modal (.show) should print — the others sit
       hidden in the DOM and must stay display:none, not just unmatched by
       the .show rule below. */
    .modal:not(.show) {
        display: none;
    }
    .modal.show {
        /* position: fixed makes Chrome repeat this entire element on every
           printed page once content overflows one page — switching to
           static lets the content flow/paginate normally instead. */
        position: static;
        display: block;
        background: white;
    }
    .modal-content {
        box-shadow: none;
        width: 100%;
        height: auto;
        max-width: 100%;
        display: block;
    }
    .modal-body {
        overflow: visible;
        height: auto;
    }
}
