﻿/* Ingeniería RM · Estilos corporativos compartidos · 30/09/2026
   Cargar después de Bootstrap y Site.css. Requiere Bootstrap 5 para el menú.
   Las páginas con Site.Master lo heredan; no deben cargarlo de nuevo.
   Prefijo rm- para componentes propios; variables para ajustes de identidad. */
:root {
    --rm-navy: #102165;
    --rm-blue: #006eae;
    --rm-cyan: #009fe3;
    --rm-ink: #21324b;
    --rm-muted: #586a81;
    --rm-background: #f5f8fc;
    --rm-surface: #ffffff;
    --rm-border: #dce5ef;
    --rm-radius: 16px;
    --rm-shadow: 0 12px 32px rgba(16, 33, 101, .06);
    --rm-gradient: linear-gradient(120deg, var(--rm-navy), var(--rm-blue) 70%, var(--rm-cyan));
}

/* Estructura y tipografía */
body.rm-site {
    margin: 0;
    padding: 0;
    color: var(--rm-ink);
    background: var(--rm-background);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.65;
    --bs-primary: var(--rm-blue);
    --bs-link-color: var(--rm-blue);
    --bs-link-hover-color: var(--rm-navy);
}
.rm-layout { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.rm-site h1, .rm-site h2, .rm-site h3, .rm-site h4, .rm-site h5, .rm-site h6 {
    color: var(--rm-navy); font-weight: 650; line-height: 1.2; letter-spacing: -.025em;
}
.rm-site h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
.rm-site a { color: var(--rm-blue); text-underline-offset: .2em; }
.rm-site a:hover { color: var(--rm-navy); }
.rm-site :focus-visible { outline: 3px solid var(--rm-blue); outline-offset: 4px; }
.rm-site .rm-container { width: 100%; max-width: 1280px; padding-left: 24px; padding-right: 24px; margin-inline: auto; }
.rm-site .rm-main { flex: 1; margin-top: 0; padding-top: 48px; padding-bottom: 64px; }
.rm-skip-link { position: absolute; left: 16px; top: -100px; z-index: 1100; padding: 12px 20px; background: white; border-radius: 8px; }
.rm-skip-link:focus { top: 16px; }

/* Cabecera común */
.rm-topbar { color: #fff; background: var(--rm-navy); font-size: .8rem; }
.rm-topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; }
.rm-topbar-name { font-weight: 600; }
.rm-topbar-role { margin-left: 12px; color: #dbe9ff; }
.rm-topbar-contact { display: flex; flex-wrap: wrap; gap: 24px; }
.rm-site .rm-topbar a { color: #fff; text-decoration: none; }
.rm-site .rm-topbar a:hover { text-decoration: underline; }
.rm-header { background: #fff; border-bottom: 1px solid var(--rm-border); }
.rm-header::after { content: ""; display: block; height: 3px; background: var(--rm-gradient); }
.rm-navbar { padding-block: 14px; }
.rm-site .rm-brand { display: inline-flex; align-items: center; gap: 12px; margin-right: 32px; color: var(--rm-navy); text-decoration: none; white-space: normal; }
.rm-brand-logo { width: 110px; height: 88px; object-fit: contain; flex-shrink: 0; }
.rm-brand-copy { display: flex; flex-direction: column; gap: 3px; }
.rm-brand-name { font-size: 1.3rem; font-weight: 700; line-height: 1.2; letter-spacing: -.035em; }
.rm-brand-tagline { max-width: 220px; color: var(--rm-muted); font-size: .75rem; line-height: 1.45; }
.rm-navbar .navbar-collapse { gap: 20px; }
.rm-navbar .navbar-nav { gap: 4px; }
.rm-site .rm-navbar .nav-link { color: var(--rm-ink); padding: 10px 12px; border-radius: 8px; font-size: .9rem; font-weight: 600; }
.rm-site .rm-navbar .nav-link:hover, .rm-site .rm-navbar .nav-link:focus-visible,
.rm-site .rm-navbar .nav-link[aria-current="page"] { color: var(--rm-blue); background: #edf6fc; }
.rm-site .rm-navbar .rm-login-link { color: var(--rm-blue); border: 1px solid var(--rm-border); }
.rm-account-nav { margin-left: auto; }
.rm-account-nav .nav-link { overflow-wrap: anywhere; }
.rm-navbar .navbar-toggler { border-color: var(--rm-border); padding: 10px; }

/* Componentes para las páginas actuales y futuras */
.rm-eyebrow { display: block; margin-bottom: 16px; color: var(--rm-blue); font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.rm-page-header { margin-bottom: 32px; }
.rm-lead { max-width: 720px; font-size: 1.125rem; color: var(--rm-muted); }
.rm-section { margin-top: 40px; }
.rm-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.rm-section-heading h2 { margin-bottom: 0; font-size: 1.5rem; }
.rm-section-heading p { margin-bottom: 0; color: var(--rm-muted); font-size: .9rem; }
.rm-hero { position: relative; overflow: hidden; padding: clamp(28px, 5vw, 64px); border: 1px solid var(--rm-border); border-radius: var(--rm-radius); background: var(--rm-surface); box-shadow: var(--rm-shadow); }
.rm-hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: url("../Recursos/circuitos-rm.svg") right center / auto 100% no-repeat, linear-gradient(110deg, #fff 45%, #eef7fd);
}
.rm-hero > * { position: relative; }
.rm-hero h1 { max-width: 750px; margin-bottom: 20px; }
.rm-hero .rm-lead { max-width: 680px; margin-bottom: 28px; }
.rm-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.rm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.rm-card { padding: 28px; min-width: 0; border: 1px solid var(--rm-border); border-radius: var(--rm-radius); background: var(--rm-surface); box-shadow: var(--rm-shadow); }
.rm-card h2, .rm-card h3 { font-size: 1.25rem; margin-bottom: 12px; }
.rm-card p { color: var(--rm-muted); }
.rm-card > :last-child { margin-bottom: 0; }
.rm-card-number { display: inline-block; margin-bottom: 24px; color: var(--rm-blue); font-size: .8rem; font-weight: 700; letter-spacing: .08em; }
.rm-site .btn { border-radius: 9px; font-weight: 600; }
.rm-site .btn-primary, .rm-site .rm-btn-primary {
    --bs-btn-color: #fff; --bs-btn-bg: var(--rm-blue); --bs-btn-border-color: var(--rm-blue);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--rm-navy); --bs-btn-hover-border-color: var(--rm-navy);
    --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--rm-navy); --bs-btn-active-border-color: var(--rm-navy);
    --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--rm-blue); --bs-btn-disabled-border-color: var(--rm-blue);
    --bs-btn-focus-shadow-rgb: 0, 110, 174;
    color: #fff; background: var(--rm-blue); border-color: var(--rm-blue);
}
.rm-site .btn-primary:hover, .rm-site .btn-primary:focus-visible, .rm-site .rm-btn-primary:hover, .rm-site .rm-btn-primary:focus-visible { color: #fff; background: var(--rm-navy); border-color: var(--rm-navy); }
.rm-site .rm-btn-outline { color: var(--rm-blue); background: #fff; border: 1px solid var(--rm-border); }
.rm-site .rm-btn-outline:hover { color: var(--rm-navy); background: #edf6fc; border-color: var(--rm-blue); }
.rm-btn-primary, .rm-btn-outline { padding: 12px 20px; }
.rm-site .form-control, .rm-site .form-select { border-color: #bccbdc; border-radius: 9px; }
.rm-site .form-control:focus, .rm-site .form-select:focus { border-color: var(--rm-blue); box-shadow: 0 0 0 .2rem rgba(0, 110, 174, .16); }
.rm-form .form-control, .rm-form .form-select { max-width: none; }
.rm-form label { color: var(--rm-ink); font-weight: 600; margin-bottom: 6px; }
.rm-form .form-check-input:checked { background-color: var(--rm-blue); border-color: var(--rm-blue); }
.rm-table-wrap { overflow-x: auto; border: 1px solid var(--rm-border); border-radius: 12px; }
.rm-table-wrap .table { margin-bottom: 0; }
.rm-table-wrap thead { --bs-table-bg: #edf4fc; --bs-table-color: var(--rm-navy); }
.rm-table-wrap th, .rm-table-wrap td { padding: 14px 18px; }
.rm-callout { border-left: 3px solid var(--rm-blue); padding: 18px 24px; background: #eaf4fc; border-radius: 0 10px 10px 0; }

/* Pie común */
.rm-footer { margin-top: auto; color: #fff; background: var(--rm-navy); }
.rm-footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-block: 40px; }
.rm-footer-brand { display: block; margin-bottom: 8px; font-size: 1.25rem; font-weight: 650; }
.rm-footer p { margin-bottom: 0; color: #dbe9ff; font-size: .85rem; }
.rm-footer-heading { display: block; margin-bottom: 12px; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #dbe9ff; }
.rm-footer-links { display: flex; flex-direction: column; gap: 8px; font-size: .85rem; }
.rm-site .rm-footer a { color: #fff; text-decoration: none; overflow-wrap: anywhere; }
.rm-site .rm-footer a:hover { text-decoration: underline; }
.rm-footer :focus-visible, .rm-topbar :focus-visible { outline-color: #fff; }
.rm-footer-bottom { border-top: 1px solid rgba(255, 255, 255, .18); }
.rm-footer-bottom .rm-container { padding-block: 16px; color: #dbe9ff; font-size: .75rem; }

@media (max-width: 991.98px) {
    .rm-navbar .navbar-collapse { padding-top: 16px; }
    .rm-navbar .navbar-nav { gap: 4px; }
    .rm-account-nav { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rm-border); }
    .rm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rm-footer-inner { gap: 24px; }
}
@media (max-width: 575.98px) {
    .rm-site .rm-container { padding-left: 20px; padding-right: 20px; }
    .rm-topbar-role, .rm-topbar-email { display: none; }
    .rm-topbar-inner { gap: 8px; font-size: .7rem; }
    .rm-topbar-contact { gap: 0; flex-shrink: 0; }
    .rm-brand-logo { width: 76px; height: 62px; }
    .rm-site .rm-brand { gap: 8px; margin-right: 8px; }
    .rm-brand-name { font-size: 1.1rem; }
    .rm-brand-tagline { max-width: 155px; font-size: .65rem; }
    .rm-navbar { padding-block: 10px; }
    .rm-site .rm-main { padding-top: 28px; padding-bottom: 40px; }
    .rm-grid, .rm-footer-inner { grid-template-columns: 1fr; }
    .rm-section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
    .rm-hero { padding: 28px 24px; }
    .rm-card { padding: 24px; }
    .rm-actions .btn { width: 100%; }
}
@media print {
    body.rm-site { background: #fff; }
    .rm-topbar, .rm-navbar .navbar-collapse, .rm-navbar .navbar-toggler, .rm-footer, .rm-skip-link { display: none !important; }
    .rm-layout { min-height: 0; }
    .rm-hero, .rm-card { box-shadow: none; break-inside: avoid; }
}


/* Contacto y llamada a la acción de presupuesto */
.rm-site .rm-navbar .rm-nav-cta {
    color: #fff;
    background: var(--rm-blue);
    border: 1px solid var(--rm-blue);
    padding-left: 16px;
    padding-right: 16px;
}
.rm-site .rm-navbar .rm-nav-cta:hover,
.rm-site .rm-navbar .rm-nav-cta:focus-visible {
    color: #fff;
    background: var(--rm-navy);
    border-color: var(--rm-navy);
}
.rm-contact-page { display: flex; flex-direction: column; gap: 0; }
.rm-contact-hero { margin-bottom: 8px; }
.rm-contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.rm-contact-card { display: flex; flex-direction: column; }
.rm-contact-card p { flex: 1; }
.rm-contact-link {
    display: inline-block;
    margin-top: 8px;
    font-weight: 650;
    overflow-wrap: anywhere;
}
.rm-budget-panel {
    padding: clamp(28px, 5vw, 52px);
    border: 1px solid var(--rm-border);
    border-radius: var(--rm-radius);
    background: #fff;
    box-shadow: var(--rm-shadow);
}
.rm-budget-copy { max-width: 780px; }
.rm-budget-copy h2 { margin-bottom: 14px; }
.rm-budget-copy p { color: var(--rm-muted); margin-bottom: 0; }
.rm-budget-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 24px;
    margin-top: 28px;
}
.rm-budget-list > div {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 10px;
    align-items: start;
    padding-top: 14px;
    border-top: 1px solid var(--rm-border);
}
.rm-budget-list strong { color: var(--rm-blue); font-size: .8rem; letter-spacing: .08em; }
.rm-budget-list span { color: var(--rm-ink); }
.rm-budget-actions { margin-top: 28px; }

@media (max-width: 991.98px) {
    .rm-nav-cta-item { margin-top: 4px; }
    .rm-site .rm-navbar .rm-nav-cta { display: inline-block; }
    .rm-contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .rm-budget-list { grid-template-columns: 1fr; }
    .rm-budget-panel { padding: 24px; }
}

/* Navegación y panel privado de gestión · 01/10/2026 */
.rm-admin-nav { background: #edf4fc; border-top: 1px solid var(--rm-border); }
.rm-admin-nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding-top: 8px; padding-bottom: 8px;
}
.rm-site .rm-admin-nav-link {
    color: var(--rm-navy); text-decoration: none; font-size: .9rem;
    font-weight: 700; border-radius: 8px; padding: 6px 10px; margin-left: -10px;
}
.rm-site .rm-admin-nav-link:hover, .rm-site .rm-admin-nav-link[aria-current="page"] {
    color: var(--rm-blue); background: #dcecf9;
}
.rm-admin-nav-label { color: var(--rm-muted); font-size: .75rem; }
.rm-management-page { min-width: 0; }
.rm-management-header h1 { font-size: clamp(1.9rem, 3.8vw, 3rem); }
.rm-management-header .rm-lead { margin-bottom: 20px; }
.rm-management-badge {
    display: inline-block; color: var(--rm-navy); background: #edf4fc;
    border: 1px solid #cbdced; border-radius: 50px; padding: 6px 14px;
    font-size: .8rem; font-weight: 600;
}
.rm-site .rm-management-card {
    display: flex; flex-direction: column; text-decoration: none;
    color: var(--rm-ink); transition: border-color .15s ease, box-shadow .15s ease;
}
.rm-site .rm-management-card:hover, .rm-site .rm-management-card:focus-visible {
    color: var(--rm-ink); border-color: var(--rm-blue);
    box-shadow: 0 12px 32px rgba(16, 33, 101, .12);
}
.rm-management-code {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 12px; color: var(--rm-blue);
    background: #edf6fc; font-weight: 700; font-size: 1.25rem; margin-bottom: 22px;
}
.rm-management-card p { flex: 1; }
.rm-management-card-link { color: var(--rm-blue); font-size: .9rem; font-weight: 650; }
.rm-management-card-link > span { margin-left: 8px; }
.rm-management-note { margin-top: 28px; }
.rm-management-note p { margin-top: 6px; margin-bottom: 0; color: var(--rm-muted); }
.rm-management-breadcrumb { margin-bottom: 24px; font-size: .9rem; }
.rm-management-options { max-width: 980px; }
.rm-management-option-list { list-style: none; margin: 20px 0 0; padding: 0; }
.rm-management-option-list li {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px 24px; padding-block: 18px;
    border-top: 1px solid var(--rm-border); font-weight: 600;
}
.rm-management-status {
    color: var(--rm-muted); background: #f2f5f9; border-radius: 50px;
    padding: 5px 12px; font-size: .75rem; font-weight: 500;
}
@media (max-width: 575.98px) {
    .rm-admin-nav-label { display: none; }
    .rm-management-grid { grid-template-columns: 1fr; }
    .rm-management-options { padding: 24px; }
    .rm-management-option-list li { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    .rm-site .rm-management-card { transition: none; }
}
@media print {
    .rm-admin-nav { display: none !important; }
}

/* Gestión de trabajadores · Componentes reutilizables de listado y ficha · 06/10/2026 */
.rm-workers-header { padding: clamp(24px, 4vw, 40px); }
.rm-workers-header .rm-lead { margin-bottom: 20px; }
.rm-workers-message { margin-top: 24px; }
.rm-workers-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 24px; align-items: start; }
.rm-workers-layout .rm-card { padding: 28px; min-width: 0; }
.rm-workers-layout h2 { font-size: 1.4rem; margin-bottom: 20px; }
.rm-workers-filters { display: grid; grid-template-columns: minmax(180px, 1fr) 130px; gap: 16px; margin-bottom: 16px; }
.rm-workers-filter-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.rm-workers-count { color: var(--rm-muted); font-size: .85rem; margin-bottom: 16px; }
.rm-workers-table { font-size: .875rem; margin-bottom: 0; }
.rm-workers-table th, .rm-workers-table td { padding: 14px 12px; vertical-align: middle; }
.rm-workers-table th { font-weight: 650; white-space: nowrap; }
.rm-workers-table strong { display: block; min-width: 130px; color: var(--rm-navy); }
.rm-workers-secondary { display: block; color: var(--rm-muted); font-size: .8rem; overflow-wrap: anywhere; }
.rm-workers-contact { display: block; min-width: 110px; }
.rm-workers-cost { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rm-workers-row-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 90px; }
.rm-workers-row-actions .btn { font-size: .75rem; white-space: nowrap; }
.rm-worker-state { display: inline-block; padding: 4px 10px; border-radius: 40px; font-size: .75rem; font-weight: 600; }
.rm-worker-active { color: #17603a; background: #e4f5ec; }
.rm-worker-inactive { color: #586a81; background: #eef1f5; }
.rm-workers-pager table { margin: 12px auto 0; }
.rm-workers-pager td { padding: 4px; }
.rm-workers-pager a, .rm-workers-pager span { display: inline-block; min-width: 30px; padding: 6px 10px; border-radius: 6px; text-align: center; }
.rm-workers-pager a { text-decoration: none; background: #edf4fc; }
.rm-workers-pager span { color: #fff; background: var(--rm-blue); }
.rm-workers-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.rm-workers-full { grid-column: 1 / -1; }
.rm-workers-form .form-label, .rm-workers-filters .form-label { font-size: .85rem; font-weight: 600; }
.rm-workers-form .form-text { margin-bottom: 0; font-size: .8rem; }
.rm-workers-form .text-danger { font-size: .8rem; }
.rm-workers-checkbox input { width: 17px; height: 17px; vertical-align: middle; accent-color: var(--rm-blue); }
.rm-workers-checkbox label { font-size: .9rem; margin-left: 4px; }
.rm-workers-form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.rm-workers-form-actions .btn { font-size: .85rem; }
.rm-workers-audit { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--rm-border); }
.rm-workers-audit h3 { font-size: .95rem; margin-bottom: 12px; }
.rm-workers-audit dl { display: grid; grid-template-columns: minmax(90px, .7fr) minmax(0, 1fr); gap: 6px 12px; font-size: .75rem; margin-bottom: 0; }
.rm-workers-audit dt { font-weight: 600; color: var(--rm-muted); }
.rm-workers-audit dd { margin-bottom: 0; overflow-wrap: anywhere; }
.rm-workers-empty p { color: var(--rm-muted); font-size: .9rem; }
@media (max-width: 1100px) {
    .rm-workers-layout { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .rm-workers-layout .rm-card { padding: 22px 18px; }
    .rm-workers-filters, .rm-workers-form { grid-template-columns: 1fr; }
    .rm-workers-form-actions .btn { width: 100%; }
    .rm-workers-audit dl { grid-template-columns: 1fr; gap: 2px; }
    .rm-workers-audit dd { margin-bottom: 8px; }
}

/* Partes: menús, asignaciones, registro y consulta de horas. */
.rm-parts-options > div { min-width: 0; }
.rm-parts-options.rm-parts-options-own { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rm-parts-options .rm-management-card { height: 100%; }
.rm-parts-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.rm-parts-wide { grid-column: 1 / -1; }
.rm-parts-form { max-width: 900px; }
.rm-parts-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; margin-bottom: 16px; }
.rm-parts-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.rm-parts-message { margin-top: 24px; }
.rm-parts-muted { color: var(--rm-muted); font-size: .9rem; margin-top: 12px; }
.rm-parts-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 20px; margin-bottom: 24px; }
.rm-parts-total strong { font-size: 1.75rem; color: var(--rm-navy); }
.rm-parts-total span { color: var(--rm-muted); }
.rm-parts-table { margin-bottom: 0; font-size: .9rem; }
.rm-parts-table th { white-space: nowrap; color: var(--rm-navy); }
.rm-parts-table td { vertical-align: middle; }
.rm-parts-table td:nth-child(1) { min-width: 70px; }
@media (max-width: 767px) {
    .rm-parts-options.rm-parts-options-own { grid-template-columns: 1fr; }
    .rm-parts-fields, .rm-parts-admin-grid { grid-template-columns: 1fr; }
    .rm-parts-actions .btn { width: 100%; }
}

/* Aplicación y textos legales · 10/10/2026.
   Componentes compartidos para las páginas públicas de privacidad y condiciones. */
.rm-legal-hero h1 { max-width: 100%; }
.rm-legal-hero .rm-lead { max-width: 850px; margin-bottom: 20px; }
.rm-legal-version { color: var(--rm-muted); font-size: .875rem; margin-bottom: 24px; }
.rm-legal-draft { margin: 24px 0 0; padding: 16px 20px; border: 1px solid #d9b950; border-radius: 10px; background: #fff8de; color: #53431c; }
.rm-legal-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 32px; }
.rm-legal-index { position: sticky; top: 24px; padding: 24px; border: 1px solid var(--rm-border); border-radius: var(--rm-radius); background: var(--rm-surface); }
.rm-legal-index .rm-eyebrow { margin-bottom: 12px; }
.rm-legal-index ol { margin: 0; padding-left: 20px; }
.rm-legal-index li + li { margin-top: 10px; }
.rm-legal-index a { font-size: .9rem; }
.rm-legal-content { min-width: 0; }
.rm-legal-section { padding: 32px; border: 1px solid var(--rm-border); border-radius: var(--rm-radius); background: var(--rm-surface); scroll-margin-top: 24px; overflow-wrap: anywhere; }
.rm-legal-section + .rm-legal-section { margin-top: 20px; }
.rm-legal-section h2 { font-size: 1.45rem; margin: 0 0 20px; line-height: 1.35; }
.rm-legal-section p, .rm-legal-section li { max-width: 80ch; }
.rm-legal-section p { margin: 0 0 16px; }
.rm-legal-section p:last-child { margin-bottom: 0; }
.rm-legal-section ul { padding-left: 24px; margin: 0 0 20px; }
.rm-legal-section li + li { margin-top: 12px; }
.rm-legal-details { display: grid; grid-template-columns: 100px minmax(0, 1fr); column-gap: 16px; row-gap: 10px; margin-bottom: 24px; }
.rm-legal-details dt { font-weight: 650; color: var(--rm-navy); }
.rm-legal-details dd { margin: 0; }
.rm-legal-pending { font-weight: 600; color: #715408; background: #fff8de; padding: 1px 4px; border-radius: 4px; }
.rm-legal-highlight { padding: 20px; margin-bottom: 20px; border-left: 4px solid var(--rm-cyan); border-radius: 0 10px 10px 0; background: #edf7fd; }
.rm-legal-highlight p { margin: 0; }
.rm-legal-table-wrap { overflow-x: auto; margin-bottom: 20px; }
.rm-legal-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.rm-legal-table caption { caption-side: top; color: var(--rm-muted); text-align: left; padding-bottom: 12px; font-size: .85rem; }
.rm-legal-table th, .rm-legal-table td { text-align: left; vertical-align: top; padding: 16px; border: 1px solid var(--rm-border); }
.rm-legal-table th { color: var(--rm-navy); background: #f0f5fc; font-weight: 650; }
.rm-legal-table th:first-child { width: 42%; }
.rm-legal-top { display: inline-block; margin-top: 8px; }
.rm-application-page .rm-callout h2 { font-size: 1.5rem; margin-bottom: 16px; }
.rm-application-page .rm-card h2 { font-size: 1.5rem; }

@media (max-width: 900px) {
    .rm-legal-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .rm-legal-index { position: static; }
    .rm-legal-index ol { columns: 2; column-gap: 32px; }
    .rm-legal-index li { break-inside: avoid; }
}
@media (max-width: 600px) {
    .rm-legal-section { padding: 24px 20px; }
    .rm-legal-index { padding: 20px; }
    .rm-legal-index ol { columns: 1; }
    .rm-legal-details { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
    .rm-legal-details dd { margin-bottom: 10px; }
    .rm-legal-table th, .rm-legal-table td { padding: 12px; }
}
@media print {
    .rm-legal-page .rm-legal-index, .rm-legal-page .rm-actions,
    .rm-legal-page .rm-legal-top { display: none; }
    .rm-legal-layout { display: block; }
    .rm-legal-page .rm-hero::before { display: none; }
    .rm-legal-page .rm-hero, .rm-legal-section { box-shadow: none; border: 0; padding: 0; background: #fff; }
    .rm-legal-section { margin-top: 24px; }
    .rm-legal-section h2 { break-after: avoid; }
    .rm-legal-section p, .rm-legal-section li { color: #000; }
    .rm-legal-table { font-size: 10pt; }
}

/* Navegación de regreso compartida por las páginas de gestión y Partes. */
.rm-management-footer {
    display: flex;
    flex-wrap: wrap;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--rm-border);
}

.rm-management-footer .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-width: 128px;
    min-height: 44px;
}

@media (max-width: 575.98px) {
    .rm-management-footer .btn { width: 100%; }
}

/* Actualizaciones parciales: indicador discreto y avisos accesibles. */
.rm-partial-content { min-width: 0; }
.rm-async-error[hidden] { display: none; }
.rm-async-progress {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1080;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: calc(100vw - 32px);
    padding: 12px 18px;
    color: var(--rm-navy);
    background: var(--rm-surface);
    border: 1px solid var(--rm-border);
    border-radius: 12px;
    box-shadow: var(--rm-shadow);
    pointer-events: none;
}
.rm-async-spinner {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 2px solid var(--rm-border);
    border-top-color: var(--rm-blue);
    border-radius: 50%;
    animation: rm-async-giro .8s linear infinite;
}
@keyframes rm-async-giro { to { transform: rotate(360deg); } }
@media (max-width: 575.98px) {
    .rm-async-progress { right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .rm-async-spinner { animation: none; }
}


/* Ventana de albaranes del proyecto: compatible con actualizaciones parciales. */
.rm-albaran-dialog {
    width: min(96vw, 82rem);
    max-width: 96vw;
    max-height: 90vh;
    padding: 0;
    border: 1px solid #dce4ea;
    border-radius: 1rem;
    color: #172b3a;
    background: #fff;
    box-shadow: 0 1.5rem 5rem rgba(16, 35, 50, .25);
}
.rm-albaran-dialog::backdrop { background: rgba(12, 28, 43, .62); }
.rm-albaran-dialog[open] { display: flex; flex-direction: column; }
.rm-albaran-dialog-header,
.rm-albaran-dialog-footer { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; }
.rm-albaran-dialog-header { justify-content: space-between; border-bottom: 1px solid #e3eaf0; }
.rm-albaran-dialog-header h2 { margin: 0 0 .4rem; font-size: 1.4rem; }
.rm-albaran-dialog-header p { margin: 0; }
.rm-albaran-dialog-body { min-height: 0; max-height: 63vh; overflow: auto; padding: 1.25rem 1.5rem; }
.rm-albaran-dialog-footer { flex-wrap: wrap; border-top: 1px solid #e3eaf0; }
.rm-albaran-dialog-footer span { font-size: .85rem; color: #526575; }
.rm-albaran-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; }
.rm-albaran-datos dt { font-size: .85rem; color: #526575; }
.rm-albaran-datos dd { margin: .3rem 0 0; overflow-wrap: anywhere; }
.rm-albaran-excluida td { background-color: #fff4df; }
.rm-albaran-excluida td:nth-child(4) { text-decoration: line-through; }
@media (max-width: 600px) {
    .rm-albaran-dialog-header,
    .rm-albaran-dialog-body,
    .rm-albaran-dialog-footer { padding: 1rem; }
    .rm-albaran-dialog-header { align-items: flex-start; }
    .rm-albaran-dialog-footer span { flex-basis: 100%; }
}

/* Acciones independientes: el espacio se muestra únicamente al renderizar el botón. */
.rm-spaced-action {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin-top: 1rem;
}


/* Sobre Ingeniería RM: presentación personal y proceso de trabajo.
   Selectores limitados a .rm-about para conservar el resto de páginas. */
.rm-about { max-width: 1120px; margin-inline: auto; }
.rm-about .rm-about-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
}
.rm-about .rm-about-heading h1 { max-width: 560px; margin-bottom: 24px; }
.rm-about .rm-about-heading .rm-lead { margin-bottom: 24px; font-size: 1.25rem; }
.rm-about .rm-about-heading > p:last-child { margin-bottom: 0; }
.rm-about .rm-about-profile {
    padding: clamp(28px, 4vw, 40px);
    border-radius: var(--rm-radius);
    border-top: 4px solid var(--rm-cyan);
    color: #fff;
    background: var(--rm-navy);
}
.rm-about .rm-about-profile .rm-eyebrow { color: #bce9ff; margin-bottom: 24px; }
.rm-site .rm-about .rm-about-profile h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.25rem); margin-bottom: 16px; }
.rm-about .rm-about-role { color: #bce9ff; margin-bottom: 24px; }
.rm-about .rm-about-profile-detail { padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .24); }
.rm-about .rm-about-profile-detail p { margin-bottom: 4px; }
.rm-about .rm-about-profile-note { margin: 20px 0 0; color: #dbe9ff; font-size: .95rem; }
.rm-about .rm-about-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(32px, 6vw, 80px);
    margin-top: 64px;
    padding-top: 48px;
    border-top: 1px solid var(--rm-border);
}
.rm-about .rm-about-details h2 { margin-bottom: 24px; font-size: 1.65rem; }
.rm-about .rm-about-story > p { color: var(--rm-muted); }
.rm-about .rm-about-quote {
    margin: 28px 0;
    padding: 4px 0 4px 22px;
    border-left: 3px solid var(--rm-cyan);
    color: var(--rm-navy);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.5;
}
.rm-about .rm-about-quote p { margin: 0; }
.rm-about .rm-about-services-link { display: inline-block; padding-block: 8px; font-weight: 600; }
.rm-about .rm-about-steps { margin: 0; padding: 0; list-style: none; }
.rm-about .rm-about-steps li {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid var(--rm-border);
}
.rm-about .rm-about-steps li:first-child { padding-top: 0; border-top: 0; }
.rm-about .rm-about-steps li:last-child { padding-bottom: 0; }
.rm-about .rm-about-step-number { color: var(--rm-blue); font-size: .9rem; font-weight: 700; line-height: 1.5; }
.rm-about .rm-about-steps h3 { margin: 0 0 8px; font-size: 1.1rem; }
.rm-about .rm-about-steps p { margin: 0; color: var(--rm-muted); font-size: .95rem; }
.rm-about .rm-about-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 56px;
    padding: 28px 32px;
    border-left: 3px solid var(--rm-blue);
    border-radius: 0 12px 12px 0;
    background: #eaf4fc;
}
.rm-about .rm-about-contact h2 { margin-bottom: 8px; font-size: 1.4rem; }
.rm-about .rm-about-contact p { margin: 0; color: var(--rm-muted); }
.rm-about .rm-about-contact .btn { flex-shrink: 0; }
@media (max-width: 767.98px) {
    .rm-about .rm-about-intro, .rm-about .rm-about-details { grid-template-columns: 1fr; gap: 32px; }
    .rm-about .rm-about-details { margin-top: 40px; padding-top: 32px; }
    .rm-about .rm-about-contact { margin-top: 40px; padding: 24px; }
}
@media (max-width: 575.98px) {
    .rm-about .rm-about-heading .rm-lead { font-size: 1.125rem; }
    .rm-about .rm-about-steps li { gap: 12px; }
    .rm-about .rm-about-contact .btn { width: 100%; }
}
@media print {
    .rm-about .rm-about-intro, .rm-about .rm-about-details { display: block; }
    .rm-about .rm-about-profile { margin-top: 24px; border: 1px solid var(--rm-border); color: var(--rm-ink); background: #fff; }
    .rm-site .rm-about .rm-about-profile h2, .rm-about .rm-about-profile .rm-eyebrow,
    .rm-about .rm-about-role, .rm-about .rm-about-profile-note { color: var(--rm-navy); }
    .rm-about .rm-about-profile-detail { border-color: var(--rm-border); }
    .rm-about .rm-about-process { margin-top: 32px; }
    .rm-about .rm-about-steps li, .rm-about .rm-about-profile { break-inside: avoid; }
}
