body { background: #f4f7fb; }
.card { border: 0; border-radius: 1rem; }
.stat-card { min-height: 130px; }
.table-responsive { border-radius: .75rem; }
.form-control, .form-select, .btn { min-height: 46px; }
.badge { font-size: .82rem; }
@media (max-width: 767px) {
  .display-6 { font-size: 1.8rem; }
  .table { font-size: .88rem; }
}

@media print {
  nav, .d-print-none, .btn { display: none !important; }
  body { background: #fff; font-size: 10px; }
  main.container-fluid { padding: 0 !important; }
  .table { font-size: 9px; }
  .table th, .table td { padding: 3px !important; }
  .table-responsive { overflow: visible !important; }
  @page { size: landscape; margin: 10mm; }
}

.offline-banner{position:fixed;bottom:16px;right:16px;z-index:1080}
@media (display-mode: standalone) {
  body { overscroll-behavior-y: contain; }
}
@media (max-width: 991px) {
  .navbar .d-flex { flex-wrap: wrap; margin-top: .75rem; }
}


:root{
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 82px;
  --sidebar-bg: #172033;
  --sidebar-bg-2: #111827;
  --sidebar-text: #dbe4f0;
  --sidebar-muted: #94a3b8;
  --sidebar-active: #2563eb;
  --topbar-height: 76px;
}

html, body { min-height: 100%; }
body { overflow-x: hidden; }

.app-shell {
  min-height: 100vh;
  display: flex;
  background: #f4f7fb;
}

.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg-2));
  color: var(--sidebar-text);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: width .25s ease, transform .25s ease;
  box-shadow: 8px 0 24px rgba(15, 23, 42, .14);
}

.sidebar-header {
  min-height: var(--topbar-height);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-brand {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #2563eb;
  font-weight: 800;
  flex: 0 0 42px;
}

.brand-text {
  font-weight: 700;
  line-height: 1.15;
  white-space: normal;
}

.sidebar-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.sidebar-nav {
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.sidebar-link {
  color: var(--sidebar-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 12px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.sidebar-link:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
  transform: translateX(2px);
}

.sidebar-link.active {
  background: var(--sidebar-active);
  color: #fff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, .22);
}

.nav-icon {
  width: 28px;
  text-align: center;
  font-size: 20px;
  flex: 0 0 28px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.user-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #334155;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: 0 0 42px;
}

.user-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.user-meta strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta small { color: var(--sidebar-muted); }

.app-main {
  min-width: 0;
  width: 100%;
  margin-left: var(--sidebar-width);
  transition: margin-left .25s ease;
}

.topbar {
  min-height: var(--topbar-height);
  position: sticky;
  top: 0;
  z-index: 1020;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-title {
  font-weight: 700;
  color: #111827;
}

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

.hamburger-btn {
  width: 44px;
  height: 44px;
  border: 1px solid #dbe3ef;
  background: #fff;
  border-radius: 12px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 12px rgba(15,23,42,.06);
}

.hamburger-btn span {
  width: 20px;
  height: 2px;
  background: #1f2937;
  border-radius: 3px;
}

.content-area {
  padding: 24px;
  min-width: 0;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  z-index: 1035;
}

body.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-width);
  min-width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .app-main {
  margin-left: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .user-meta,
body.sidebar-collapsed .sidebar-footer .btn {
  display: none;
}

body.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding-inline: 10px;
}

body.sidebar-collapsed .sidebar-brand {
  justify-content: center;
  width: 100%;
}

body.sidebar-collapsed .user-box {
  justify-content: center;
}

@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    width: min(86vw, 300px);
    min-width: min(86vw, 300px);
  }

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

  .sidebar-overlay.show { display: block; }

  .app-main { margin-left: 0; }

  body.sidebar-open { overflow: hidden; }

  .topbar {
    align-items: flex-start;
    padding: 12px 14px;
  }

  .topbar-actions {
    max-width: 58%;
  }

  .content-area { padding: 16px; }
}

@media (max-width: 575.98px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar > div:first-child {
    justify-content: space-between;
  }

  .topbar-actions {
    max-width: none;
    justify-content: flex-start;
  }

  .topbar-actions .btn {
    flex: 1 1 auto;
  }

  .content-area { padding: 12px; }
}

@media print {
  .sidebar, .topbar, .sidebar-overlay { display: none !important; }
  .app-main { margin-left: 0 !important; }
  .content-area { padding: 0 !important; }
}

.sticky-report-toolbar{
  position: sticky;
  top: calc(var(--topbar-height) + 10px);
  z-index: 1010;
  border: 1px solid #dbe5f1;
}
.selection-column{width:82px;text-align:center}
.report-card{
  border:1px solid #dbe3ef;
  border-radius:14px;
  padding:20px;
  background:#fff;
  break-inside:avoid;
}
.report-card h3{
  color:#1d4ed8;
  border-bottom:2px solid #dbeafe;
  padding-bottom:8px;
}
.signature-row{break-inside:avoid}
@media(max-width:767px){
  .sticky-report-toolbar{position:static}
  .selection-toolbar .btn{flex:1 1 45%}
}
@media print{
  .report-document{font-size:11px}
  .report-card{box-shadow:none;border-color:#555}
  .report-card h3{color:#000}
}

.company-logo-preview{max-width:180px;max-height:120px;object-fit:contain}
.professional-report-header{
  display:flex;
  justify-content:space-between;
  gap:24px;
  border-bottom:3px solid #1d4ed8;
  padding-bottom:18px;
  align-items:flex-start;
}
.report-brand{display:flex;gap:16px;align-items:center}
.report-brand h1{font-size:24px;margin:0 0 6px;color:#0f172a}
.report-logo{width:90px;height:90px;object-fit:contain;border:1px solid #dbe3ef;border-radius:12px;padding:6px;background:#fff}
.report-meta{text-align:right;min-width:260px}
.report-meta h2{font-size:22px;color:#1d4ed8;margin-bottom:10px}
.report-document{background:#fff;padding:28px;border-radius:18px;box-shadow:0 10px 30px rgba(15,23,42,.08)}
.report-card{border-left:5px solid #2563eb}
.report-card h3{display:flex;justify-content:space-between;align-items:center}
@media(max-width:767px){
  .professional-report-header{flex-direction:column}
  .report-meta{text-align:left;min-width:0}
  .report-document{padding:16px}
}
@media print{
  .professional-report-header{border-color:#000}
  .report-document{box-shadow:none;padding:0}
  .report-logo{border-color:#777}
}

/* ============================================================
   DISEÑO EMPRESARIAL INSPIRADO EN PLATAFORMAS CMMS MODERNAS
   ============================================================ */
:root{
  --ui-bg:#f3f6fb;
  --ui-surface:#ffffff;
  --ui-surface-soft:#f8faff;
  --ui-border:#e4eaf3;
  --ui-border-strong:#d5deeb;
  --ui-text:#172033;
  --ui-muted:#6f7d90;
  --ui-primary:#3478f6;
  --ui-primary-dark:#235fc9;
  --ui-primary-soft:#eaf2ff;
  --ui-success:#18a874;
  --ui-warning:#f4a62a;
  --ui-danger:#ef5b67;
  --ui-info:#35a7d8;
  --ui-sidebar:#202a3c;
  --ui-sidebar-2:#182131;
  --ui-shadow:0 8px 24px rgba(24,40,72,.07);
  --ui-shadow-hover:0 14px 36px rgba(24,40,72,.12);
  --ui-radius:14px;
  --ui-radius-sm:10px;
}

body{
  background:var(--ui-bg);
  color:var(--ui-text);
  font-family:Inter,Segoe UI,Roboto,Arial,sans-serif;
  font-size:14px;
  letter-spacing:.01em;
}

h1,h2,h3,h4,h5,h6{color:var(--ui-text);font-weight:700}
h1{font-size:1.75rem;letter-spacing:-.02em}
h2{font-size:1.4rem}
h3{font-size:1.15rem}
.text-muted{color:var(--ui-muted)!important}

/* Sidebar */
.sidebar{
  background:linear-gradient(180deg,var(--ui-sidebar),var(--ui-sidebar-2));
  box-shadow:12px 0 35px rgba(15,23,42,.13);
}
.sidebar-header{border-color:rgba(255,255,255,.07)}
.brand-icon{
  background:linear-gradient(135deg,#4b8bff,#2d67d7);
  box-shadow:0 8px 20px rgba(52,120,246,.28);
  border-radius:11px;
}
.brand-text{font-size:14px;letter-spacing:.01em}
.sidebar-nav{padding:16px 10px}
.sidebar-link{
  min-height:44px;
  border-radius:9px;
  font-size:13.5px;
  color:#cbd5e1;
}
.sidebar-link:hover{background:rgba(255,255,255,.065);transform:none}
.sidebar-link.active{
  background:linear-gradient(90deg,rgba(52,120,246,.95),rgba(52,120,246,.72));
  box-shadow:0 8px 22px rgba(52,120,246,.2);
}
.nav-icon{font-size:17px}
.sidebar-footer{background:rgba(0,0,0,.08)}
.user-avatar{background:#33445f;border:1px solid rgba(255,255,255,.09)}

/* Topbar */
.topbar{
  min-height:68px;
  background:rgba(255,255,255,.94);
  border-bottom:1px solid var(--ui-border);
  box-shadow:0 3px 12px rgba(24,40,72,.035);
  padding:10px 20px;
}
.topbar-title{font-size:14px}
.hamburger-btn{
  width:40px;height:40px;border-radius:10px;
  border-color:var(--ui-border);
  box-shadow:none;
}
.hamburger-btn:hover{background:var(--ui-primary-soft);border-color:#bed4ff}
.content-area{padding:22px}

/* Cards and panels */
.card{
  background:var(--ui-surface);
  border:1px solid var(--ui-border)!important;
  border-radius:var(--ui-radius);
  box-shadow:var(--ui-shadow)!important;
  transition:box-shadow .2s ease,transform .2s ease;
}
.card:hover{box-shadow:var(--ui-shadow-hover)!important}
.card-header{
  background:transparent;
  border-bottom:1px solid var(--ui-border);
  padding:16px 18px;
  font-weight:700;
}
.card-body{padding:18px}
.stat-card{
  min-height:116px;
  position:relative;
  overflow:hidden;
}
.stat-card:after{
  content:"";
  width:70px;height:70px;border-radius:50%;
  position:absolute;right:-18px;bottom:-24px;
  background:var(--ui-primary-soft);
}
.stat-card .display-6{font-size:2rem}
.border-start.border-5{border-width:4px!important}

/* Professional module header */
.module-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:20px;
}
.module-title{margin:0;font-size:1.65rem}
.module-subtitle{margin:5px 0 0;color:var(--ui-muted)}
.module-actions{display:flex;gap:8px;flex-wrap:wrap}

/* Buttons */
.btn{
  min-height:40px;
  border-radius:9px;
  font-size:13.5px;
  font-weight:600;
  padding:.55rem .9rem;
  box-shadow:none!important;
}
.btn-primary{
  background:var(--ui-primary);
  border-color:var(--ui-primary);
}
.btn-primary:hover{background:var(--ui-primary-dark);border-color:var(--ui-primary-dark)}
.btn-danger{background:var(--ui-danger);border-color:var(--ui-danger)}
.btn-success{background:var(--ui-success);border-color:var(--ui-success)}
.btn-outline-secondary{border-color:var(--ui-border-strong);color:#536176;background:#fff}
.btn-outline-secondary:hover{background:#f4f7fb;color:var(--ui-text);border-color:#c4cedd}
.btn-sm{min-height:34px;padding:.4rem .7rem}

/* Forms */
.form-label,label{
  font-size:12.5px;
  font-weight:650;
  color:#4d5a6d;
  margin-bottom:6px;
}
.form-control,.form-select{
  min-height:43px;
  border:1px solid var(--ui-border-strong);
  border-radius:9px;
  background:#fff;
  color:var(--ui-text);
  font-size:13.5px;
  padding:.62rem .75rem;
  transition:border-color .15s ease,box-shadow .15s ease;
}
.form-control:focus,.form-select:focus{
  border-color:#72a2ff;
  box-shadow:0 0 0 3px rgba(52,120,246,.12);
}
textarea.form-control{min-height:90px;resize:vertical}
.form-control::placeholder{color:#9aa6b7}
.form-section{
  background:var(--ui-surface-soft);
  border:1px solid var(--ui-border);
  border-radius:12px;
  padding:18px;
  margin-bottom:18px;
}
.form-section-title{
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:#536176;
  margin-bottom:14px;
  font-weight:750;
}
.form-actions{
  border-top:1px solid var(--ui-border);
  padding-top:16px;
  margin-top:8px;
  display:flex;
  justify-content:flex-end;
  gap:8px;
}

/* Tables */
.table-responsive{
  border:1px solid var(--ui-border);
  border-radius:12px;
  overflow:auto;
  background:#fff;
}
.table{
  margin:0;
  font-size:13px;
  color:var(--ui-text);
}
.table thead th{
  background:#f6f8fc;
  color:#56647a;
  font-size:11.5px;
  font-weight:750;
  text-transform:uppercase;
  letter-spacing:.045em;
  padding:12px 14px;
  border-bottom:1px solid var(--ui-border-strong);
  white-space:nowrap;
  position:sticky;
  top:0;
  z-index:2;
}
.table tbody td{
  padding:12px 14px;
  border-color:#edf1f6;
  vertical-align:middle;
}
.table tbody tr:hover{background:#f8faff}
.table-hover>tbody>tr:hover>*{--bs-table-bg-state:#f8faff}
.table-actions{display:flex;gap:6px;justify-content:flex-end}

/* Badges */
.badge{
  border-radius:999px;
  padding:.42rem .62rem;
  font-size:11px;
  font-weight:700;
}
.bg-success{background-color:var(--ui-success)!important}
.bg-warning{background-color:var(--ui-warning)!important}
.bg-danger{background-color:var(--ui-danger)!important}
.bg-primary{background-color:var(--ui-primary)!important}
.bg-secondary{background-color:#7a8799!important}

/* Dashboard */
.kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}
.kpi-card{
  background:#fff;border:1px solid var(--ui-border);border-radius:13px;
  padding:17px;box-shadow:var(--ui-shadow);position:relative;overflow:hidden;
}
.kpi-label{color:var(--ui-muted);font-size:12px;margin-bottom:8px}
.kpi-value{font-size:2rem;font-weight:750;line-height:1}
.kpi-icon{
  position:absolute;right:14px;top:14px;width:38px;height:38px;
  display:grid;place-items:center;border-radius:10px;background:var(--ui-primary-soft);
  color:var(--ui-primary);font-size:17px;
}
.dashboard-grid{display:grid;grid-template-columns:1.35fr .65fr;gap:16px}
.dashboard-panel{background:#fff;border:1px solid var(--ui-border);border-radius:14px;box-shadow:var(--ui-shadow);padding:18px}

/* Alerts/modals */
.alert{border:0;border-radius:11px;box-shadow:0 5px 14px rgba(24,40,72,.05)}
.modal-content{
  border:0;border-radius:16px;box-shadow:0 24px 70px rgba(15,23,42,.23);
}
.modal-header,.modal-footer{border-color:var(--ui-border)}
.modal-header{padding:16px 20px}
.modal-body{padding:20px}

/* Login */
.login-shell{
  min-height:100vh;
  background:
    radial-gradient(circle at 15% 20%,rgba(52,120,246,.15),transparent 30%),
    radial-gradient(circle at 80% 75%,rgba(53,167,216,.12),transparent 35%),
    #eef3fb;
}

/* Responsive */
@media(max-width:1199px){
  .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dashboard-grid{grid-template-columns:1fr}
}
@media(max-width:767px){
  .content-area{padding:14px}
  .module-header{flex-direction:column}
  .module-actions{width:100%}
  .module-actions .btn{flex:1}
  .kpi-grid{grid-template-columns:1fr 1fr;gap:10px}
  .kpi-card{padding:14px}
  .kpi-value{font-size:1.55rem}
  .card-body,.card{padding-left:0;padding-right:0}
  .card.p-3,.card.p-4{padding:14px!important}
  .table thead th,.table tbody td{padding:10px}
}
@media(max-width:480px){
  .kpi-grid{grid-template-columns:1fr}
}

.area-checklist{display:grid;gap:8px;max-height:260px;overflow:auto;padding:8px;border:1px solid var(--ui-border);border-radius:10px;background:#f8faff}
.area-option{display:flex;gap:10px;align-items:flex-start;padding:10px;border-radius:8px;background:#fff;border:1px solid #e4eaf3;cursor:pointer}
.area-option:hover{border-color:#8eb3ff}
.area-option span{display:flex;flex-direction:column}.area-option small{font-weight:400;color:#6f7d90;margin-top:2px}

.report-screen-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  margin-bottom:20px;
}
.professional-report-document{
  width:min(1120px,100%);
  margin:0 auto;
  background:#fff;
  border:1px solid #dbe3ef;
  border-radius:18px;
  box-shadow:0 16px 42px rgba(15,23,42,.09);
  padding:32px;
}
.corporate-report-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:28px;
  padding-bottom:22px;
  border-bottom:4px solid #2f73e8;
}
.corporate-brand{display:flex;gap:18px;align-items:center;min-width:0}
.corporate-brand h1{font-size:25px;margin:0 0 7px}
.corporate-contact{display:flex;flex-wrap:wrap;gap:5px 14px;color:#5d6b80}
.corporate-report-logo{
  width:105px;height:90px;object-fit:contain;
  border:1px solid #dbe3ef;border-radius:12px;padding:7px;background:#fff;
}
.corporate-report-placeholder{
  width:88px;height:88px;border-radius:16px;background:#3478f6;color:#fff;
  display:grid;place-items:center;font-size:26px;font-weight:800;
}
.report-identification{
  min-width:275px;text-align:right;
  border-left:1px solid #dbe3ef;padding-left:22px;color:#536176;
}
.report-type{font-size:21px;font-weight:800;color:#1d4ed8;margin-bottom:10px}
.professional-report-item{
  margin-top:28px;
  padding:24px;
  border:1px solid #dce4ef;
  border-left:5px solid #3478f6;
  border-radius:14px;
  break-inside:auto;
}
.report-item-heading{
  display:flex;justify-content:space-between;gap:16px;
  padding-bottom:15px;margin-bottom:18px;border-bottom:1px solid #e5eaf2;
}
.report-item-heading h2{font-size:21px;margin:4px 0 0}
.report-item-type{
  display:inline-block;border-radius:999px;background:#feecef;color:#ca3346;
  padding:5px 10px;font-weight:750;font-size:11px;text-transform:uppercase;
}
.report-item-type.bitacora{background:#eaf2ff;color:#235fc9}
.report-status-group{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap}
.report-status,.report-priority{
  display:inline-block;border-radius:999px;padding:6px 10px;
  background:#eef2f7;color:#4c5a6d;font-size:11px;font-weight:750;
}
.priority-crítica{background:#fee7e9;color:#bf2638}
.priority-alta{background:#fff0d6;color:#a86600}
.priority-media{background:#eaf2ff;color:#235fc9}
.priority-baja{background:#e4f8ef;color:#087951}
.report-data-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;margin-bottom:18px;
}
.report-data-grid>div{
  background:#f7f9fc;border:1px solid #e5eaf2;border-radius:10px;padding:11px 12px;
}
.report-data-grid span{
  display:block;font-size:10.5px;text-transform:uppercase;letter-spacing:.045em;
  color:#758296;margin-bottom:4px;font-weight:700;
}
.report-data-grid strong{font-size:12.5px;color:#1d2738;font-weight:650}
.report-people-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.report-section{
  margin:17px 0;padding:17px;border:1px solid #e5eaf2;border-radius:11px;
}
.report-section h3{font-size:16px;margin-bottom:9px;color:#1d4ed8}
.report-section p{margin:0;line-height:1.55}
.report-highlight{
  display:grid;grid-template-columns:1fr 1fr;gap:18px;background:#f8fbff;
}
.report-highlight>div+div{border-left:1px solid #dce6f3;padding-left:18px}
.report-highlight h4{font-size:12px;text-transform:uppercase;color:#607087}
.report-photo-section{
  margin-top:20px;padding-top:16px;border-top:1px solid #dce4ef;
  break-inside:avoid;
}
.report-photo-section h3{font-size:14px;margin-bottom:12px}
.report-photo-mosaic{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.report-photo-mosaic figure{
  margin:0;border:1px solid #dce4ef;border-radius:10px;overflow:hidden;
  background:#f4f7fb;break-inside:avoid;
}
.report-photo-mosaic img{
  display:block;width:100%;height:235px;object-fit:cover;
}
.report-photo-mosaic figcaption{
  padding:7px 9px;font-size:10px;color:#68768a;background:#fff;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.report-photo-mosaic.photo-count-1{grid-template-columns:1fr}
.report-photo-mosaic.photo-count-1 img{height:430px;object-fit:contain}
.report-photo-mosaic.photo-count-3 figure:first-child{
  grid-row:span 2;
}
.report-photo-mosaic.photo-count-3 figure:first-child img{height:500px}
.report-signature-area{
  display:grid;grid-template-columns:1fr 1fr;gap:90px;margin:80px 30px 30px;
}
.report-signature-area div{border-top:1px solid #3f4c5f;text-align:center;padding-top:8px}
.report-signature-area span{font-size:11px;color:#5f6d80}
.report-footer-note{
  text-align:center;border-top:1px solid #e1e7ef;padding-top:12px;
  color:#8490a1;font-size:10px;
}
.supervisor-list{display:grid;gap:9px;max-height:300px;overflow:auto}
.supervisor-list-item{
  display:flex;align-items:center;gap:10px;padding:10px;
  border:1px solid #e4eaf3;border-radius:10px;background:#f8faff;
}
.supervisor-list-item>div:last-child{display:flex;flex-direction:column;min-width:0}
.supervisor-list-item small{color:#768397;overflow:hidden;text-overflow:ellipsis}
.supervisor-avatar{
  width:38px;height:38px;border-radius:50%;display:grid;place-items:center;
  background:#3478f6;color:#fff;font-weight:750;flex:0 0 38px;
}

@media(max-width:900px){
  .corporate-report-header{flex-direction:column}
  .report-identification{text-align:left;border-left:0;padding-left:0;min-width:0}
  .report-data-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .report-photo-mosaic img{height:190px}
}
@media(max-width:600px){
  .report-screen-toolbar{flex-direction:column}
  .professional-report-document{padding:16px}
  .corporate-brand{align-items:flex-start}
  .corporate-report-logo,.corporate-report-placeholder{width:72px;height:72px}
  .corporate-brand h1{font-size:19px}
  .report-data-grid,.report-people-grid,.report-highlight{grid-template-columns:1fr}
  .report-highlight>div+div{border-left:0;border-top:1px solid #dce6f3;padding-left:0;padding-top:14px}
  .report-photo-mosaic{grid-template-columns:1fr}
  .report-photo-mosaic img,
  .report-photo-mosaic.photo-count-3 figure:first-child img{height:245px}
}
@media print{
  @page{size:A4 portrait;margin:9mm}
  body{background:#fff!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .sidebar,.topbar,.report-screen-toolbar,.modal,.sidebar-overlay{display:none!important}
  .app-main{margin-left:0!important}
  .content-area{padding:0!important}
  .professional-report-document{
    width:100%;border:0;box-shadow:none;border-radius:0;padding:0;margin:0;
  }
  .corporate-report-header{padding-bottom:13px}
  .corporate-brand h1{font-size:20px}
  .corporate-report-logo{width:78px;height:68px}
  .report-identification{font-size:10px}
  .report-type{font-size:17px}
  .professional-report-item{
    margin-top:15px;padding:14px;border-radius:8px;
  }
  .report-item-heading{margin-bottom:11px;padding-bottom:10px}
  .report-data-grid{gap:7px;margin-bottom:11px}
  .report-data-grid>div{padding:7px}
  .report-data-grid span{font-size:8px}
  .report-data-grid strong{font-size:9px}
  .report-section{padding:10px;margin:10px 0}
  .report-section h3{font-size:12px}
  .report-section p{font-size:9px}
  .report-photo-mosaic{gap:5px}
  .report-photo-mosaic img{height:155px}
  .report-photo-mosaic.photo-count-1 img{height:300px}
  .report-photo-mosaic.photo-count-3 figure:first-child img{height:320px}
  .report-photo-mosaic figcaption{font-size:8px;padding:4px}
  .report-signature-area{margin-top:55px}
  .professional-report-item,.report-photo-section,figure{break-inside:avoid}
}

.area-supervisor-list{
  display:grid;
  gap:10px;
  padding:10px;
  border:1px solid var(--ui-border);
  border-radius:11px;
  background:#f8faff;
}
.area-supervisor-row{
  display:grid;
  grid-template-columns:minmax(150px,.8fr) minmax(190px,1.2fr);
  gap:12px;
  align-items:center;
  padding:10px;
  border:1px solid #e3e9f2;
  border-radius:10px;
  background:#fff;
}
.area-supervisor-check{
  display:flex;
  align-items:center;
  gap:9px;
  margin:0;
  cursor:pointer;
}
.area-supervisor-check span{
  font-weight:700;
  color:#273348;
}
@media(max-width:650px){
  .area-supervisor-row{grid-template-columns:1fr}
}

/* Impresión/PDF: evitar bloques forzados y espacios vacíos */
@media print{
  html,body{
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
  }
  .professional-report-document{
    display:block!important;
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
  }
  .professional-report-item{
    break-inside:auto!important;
    page-break-inside:auto!important;
    overflow:visible!important;
    margin-top:10px!important;
    padding:11px!important;
  }
  .report-item-heading,
  .corporate-report-header,
  .report-data-grid>div,
  .report-section h3,
  .report-photo-mosaic figure{
    break-inside:avoid!important;
    page-break-inside:avoid!important;
  }
  .report-photo-section{
    break-inside:auto!important;
    page-break-inside:auto!important;
  }
  .report-photo-mosaic{
    break-inside:auto!important;
    page-break-inside:auto!important;
  }
  .report-signature-area{
    break-inside:avoid!important;
    page-break-inside:avoid!important;
    margin:34px 22px 18px!important;
    gap:60px!important;
  }
  .report-footer-note{
    break-inside:avoid!important;
    page-break-inside:avoid!important;
  }
  .report-photo-mosaic img{
    height:auto!important;
    max-height:175px!important;
    object-fit:contain!important;
    background:#fff!important;
  }
  .report-photo-mosaic.photo-count-1 img,
  .report-photo-mosaic.photo-count-3 figure:first-child img{
    height:auto!important;
    max-height:280px!important;
  }
  p{
    orphans:3;
    widows:3;
  }
}

.multi-area-selector{
  display:grid;
  gap:10px;
  max-height:330px;
  overflow:auto;
  padding:10px;
  border:1px solid var(--ui-border);
  border-radius:11px;
  background:#f8faff;
}
.multi-area-group{
  padding:11px;
  border:1px solid #e3e9f2;
  border-radius:10px;
  background:#fff;
}
.multi-area-group>strong{
  display:block;
  margin-bottom:8px;
  color:#273348;
}
.multi-area-group label{
  display:flex;
  align-items:center;
  gap:8px;
  padding:5px 3px;
  margin:0;
  cursor:pointer;
}
.multi-area-group label span{
  font-weight:500;
}
.modal-selector{
  max-height:460px;
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.assignment-badges{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
}
.assignment-badges span{
  display:inline-block;
  padding:5px 8px;
  border-radius:999px;
  background:#eaf2ff;
  color:#235fc9;
  font-size:11px;
  font-weight:700;
}
@media(max-width:700px){
  .modal-selector{grid-template-columns:1fr}
}

.glossary-category-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
  margin-bottom:20px;
}
.glossary-category-card{
  display:flex;
  align-items:center;
  gap:11px;
  min-height:78px;
  padding:13px;
  border:1px solid var(--ui-border);
  border-radius:13px;
  background:#fff;
  color:var(--ui-text);
  text-decoration:none;
  box-shadow:var(--ui-shadow);
  transition:.18s ease;
}
.glossary-category-card:hover{
  transform:translateY(-2px);
  border-color:#9bbcff;
  color:var(--ui-text);
}
.glossary-category-card.active{
  border-color:var(--ui-primary);
  background:var(--ui-primary-soft);
}
.glossary-category-card>div:last-child{
  min-width:0;
  display:flex;
  flex-direction:column;
}
.glossary-category-card strong{
  line-height:1.2;
}
.glossary-category-card small{
  color:var(--ui-muted);
  margin-top:4px;
}
.glossary-category-icon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  flex:0 0 42px;
  border-radius:11px;
  background:#eaf2ff;
  color:#235fc9;
  font-size:12px;
  font-weight:800;
}
.glossary-results-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
}
.glossary-list{
  display:grid;
  gap:14px;
}
.glossary-item{
  background:#fff;
  border:1px solid var(--ui-border);
  border-radius:14px;
  box-shadow:var(--ui-shadow);
  padding:20px;
}
.glossary-item-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:15px;
  padding-bottom:14px;
  margin-bottom:14px;
  border-bottom:1px solid var(--ui-border);
}
.glossary-letter{
  width:46px;
  height:46px;
  border-radius:12px;
  display:grid;
  place-items:center;
  flex:0 0 46px;
  background:linear-gradient(135deg,#4b8bff,#2d67d7);
  color:#fff;
  font-size:18px;
  font-weight:800;
}
.glossary-category-label{
  color:var(--ui-primary);
  font-size:10px;
  font-weight:750;
  text-transform:uppercase;
  letter-spacing:.07em;
}
.glossary-item h2{
  font-size:19px;
  margin:4px 0 0;
}
.glossary-abbreviation{
  display:inline-block;
  margin-left:6px;
  padding:4px 7px;
  border-radius:999px;
  background:#eef2f7;
  color:#536176;
  font-size:10px;
  vertical-align:middle;
}
.glossary-definition{
  color:#273348;
  font-size:14px;
  line-height:1.62;
}
.glossary-example{
  margin-top:15px;
  padding:13px 15px;
  border-left:4px solid #35a7d8;
  border-radius:8px;
  background:#f2faff;
}
.glossary-example strong{
  display:block;
  margin-bottom:5px;
  color:#28779a;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.glossary-example p{
  margin:0;
  color:#435166;
}
.glossary-keywords{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:14px;
}
.glossary-keywords span{
  padding:5px 8px;
  border-radius:999px;
  background:#f0f3f8;
  color:#627087;
  font-size:10px;
  font-weight:650;
}
.glossary-empty-icon{
  width:64px;
  height:64px;
  display:grid;
  place-items:center;
  border-radius:16px;
  margin:0 auto 15px;
  background:#eaf2ff;
  color:#235fc9;
  font-weight:800;
}
@media(max-width:1200px){
  .glossary-category-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media(max-width:760px){
  .glossary-category-grid{
    grid-template-columns:1fr 1fr;
  }
  .glossary-item{
    padding:15px;
  }
}
@media(max-width:480px){
  .glossary-category-grid{
    grid-template-columns:1fr;
  }
}
