/* Wireframe Styles - Valores Documentales Module (Revisado) */
/* Single-column layout for Claude Code direct generation */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.5;
}

/* ==========================================
   WIREFRAME LABEL (fixed top bar)
   ========================================== */

.wireframe-label {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #333;
  color: #fff;
  padding: 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  z-index: 1000;
}

.wireframe-label + .wireframe-container {
  margin-top: 40px;
}

/* ==========================================
   SINGLE-COLUMN LAYOUT
   ========================================== */

.wireframe-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 8px;
  padding: 16px 24px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.user-info {
  font-size: 14px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.user-icon {
  width: 32px;
  height: 32px;
  background: #ddd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #666;
}

.main-content {
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 8px;
  padding: 24px;
  min-height: 500px;
}

/* ==========================================
   APP SHELL LAYOUT (header + sidebar + content) — legacy
   ========================================== */

.app-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  height: 56px;
  background: #fff;
  border-bottom: 2px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
}

.app-header-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: #0066cc;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.app-header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #555;
}

.app-header-user .user-avatar {
  width: 32px;
  height: 32px;
  background: #ddd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #666;
}

.app-body {
  display: grid;
  grid-template-columns: 260px 1fr;
}

/* ==========================================
   SIDEBAR
   ========================================== */

.sidebar {
  background: #fff;
  border-right: 1px solid #ddd;
  padding: 16px 0;
  overflow-y: auto;
  height: calc(100vh - 56px);
  position: sticky;
  top: 56px;
}

.sidebar-group {
  margin-bottom: 4px;
}

.sidebar-group-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #999;
  padding: 12px 20px 4px;
}

.sidebar-item {
  display: block;
  padding: 8px 20px 8px 24px;
  font-size: 13px;
  color: #555;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-item:hover {
  background: #f5f5f5;
  color: #333;
}

.sidebar-item.active {
  background: #e8f0fe;
  color: #0066cc;
  border-left-color: #0066cc;
  font-weight: 500;
}

.sidebar-item .item-id {
  font-size: 11px;
  color: #999;
  margin-right: 6px;
}

.sidebar-item.active .item-id {
  color: #4d94db;
}

/* ==========================================
   CONTENT AREA
   ========================================== */

.content {
  padding: 24px;
  background: #f5f5f5;
  min-height: calc(100vh - 56px);
}

/* Breadcrumb */
.breadcrumb {
  font-size: 13px;
  color: #666;
  margin-bottom: 16px;
}

.breadcrumb a {
  color: #0066cc;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
}

.page-subtitle {
  font-size: 14px;
  color: #666;
  margin-top: 4px;
}

/* Content Card (white box for each section) */
.content-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.content-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: #0066cc;
  color: #fff;
}

.btn-primary:hover {
  background: #0052a3;
}

.btn-secondary {
  background: #f0f0f0;
  color: #333;
  border: 1px solid #ccc;
}

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

.btn-success {
  background: #28a745;
  color: #fff;
}

.btn-success:hover {
  background: #218838;
}

.btn-danger {
  background: #dc3545;
  color: #fff;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-warning {
  background: #ffc107;
  color: #333;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-group {
  display: flex;
  gap: 8px;
}

/* ==========================================
   FILTERS SECTION
   ========================================== */

.filters-section {
  background: #fafafa;
  border: 1px dashed #bbb;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 20px;
}

.filters-title {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  margin-bottom: 12px;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 150px;
}

.filter-label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.filter-input,
.filter-select {
  height: 36px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0 12px;
  font-size: 14px;
  background: #fff;
}

.filter-select {
  min-width: 160px;
}

/* ==========================================
   CARDS GRID
   ========================================== */

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

.card {
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  border-color: #0066cc;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card-icon {
  width: 40px;
  height: 40px;
  background: #e8f0fe;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
  color: #0066cc;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}

.card-description {
  font-size: 13px;
  color: #666;
}

.card-link {
  text-decoration: none;
  color: inherit;
}

.card-meta {
  font-size: 11px;
  color: #999;
  margin-top: 8px;
}

/* ==========================================
   KPI CARDS
   ========================================== */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  padding: 20px;
  color: #fff;
}

.kpi-card:nth-child(2) {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.kpi-card:nth-child(3) {
  background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
}

.kpi-card:nth-child(4) {
  background: linear-gradient(135deg, #fc4a1a 0%, #f7b733 100%);
}

.kpi-card:nth-child(5) {
  background: linear-gradient(135deg, #5b86e5 0%, #36d1dc 100%);
}

.kpi-card:nth-child(6) {
  background: linear-gradient(135deg, #c94b4b 0%, #4b134f 100%);
}

.kpi-label {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 28px;
  font-weight: 700;
}

.kpi-sublabel {
  font-size: 11px;
  opacity: 0.8;
  margin-top: 4px;
}

/* ==========================================
   DATA TABLE
   ========================================== */

.table-container {
  overflow-x: auto;
  margin-bottom: 20px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.data-table th {
  background: #f8f8f8;
  font-weight: 600;
  color: #555;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
}

.data-table tr:hover {
  background: #f9f9f9;
}

.data-table .link {
  color: #0066cc;
  text-decoration: none;
}

.data-table .link:hover {
  text-decoration: underline;
}

.data-table .checkbox-cell {
  width: 40px;
  text-align: center;
}

.data-table .checkbox-cell input {
  width: 16px;
  height: 16px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.badge-success {
  background: #d4edda;
  color: #155724;
}

.badge-warning {
  background: #fff3cd;
  color: #856404;
}

.badge-danger {
  background: #f8d7da;
  color: #721c24;
}

.badge-info {
  background: #d1ecf1;
  color: #0c5460;
}

.badge-secondary {
  background: #e2e3e5;
  color: #383d41;
}

.badge-primary {
  background: #cce5ff;
  color: #004085;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #eee;
}

.pagination-info {
  font-size: 13px;
  color: #666;
}

.pagination-controls {
  display: flex;
  gap: 4px;
}

.pagination-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}

.pagination-btn.active {
  background: #0066cc;
  color: #fff;
  border-color: #0066cc;
}

/* ==========================================
   TABS
   ========================================== */

.tabs {
  display: flex;
  border-bottom: 2px solid #eee;
  margin-bottom: 20px;
}

.tab {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}

.tab:hover {
  color: #333;
}

.tab.active {
  color: #0066cc;
  border-bottom-color: #0066cc;
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  background: #dc3545;
  color: #fff;
  border-radius: 10px;
  font-size: 11px;
  margin-left: 8px;
}

.tab-panel {
  display: none;
}

.tab-panel-hidden {
  display: none;
}

/* ==========================================
   FORM SECTIONS
   ========================================== */

.form-section {
  margin-bottom: 24px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

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

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

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: #555;
}

.form-label .required {
  color: #dc3545;
}

.form-input,
.form-select,
.form-textarea {
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 2px rgba(0,102,204,0.1);
}

.form-textarea {
  min-height: 110px;
  width: 100%;
  resize: vertical;
}

/* Default styling for ANY textarea (even without .form-textarea class)
   prevents the recurring issue of textareas rendering as tiny browser-default
   monospace boxes. Override locally only when truly justified. */
textarea {
  min-height: 110px;
  min-width: 280px;
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  resize: vertical;
  box-sizing: border-box;
}
textarea:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 2px rgba(0,102,204,0.1);
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-checkbox input {
  width: 18px;
  height: 18px;
}

.form-hint {
  font-size: 12px;
  color: #888;
}

.form-readonly {
  background: #f5f5f5;
  color: #666;
}

/* ==========================================
   ALERTS
   ========================================== */

.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 14px;
  align-items: flex-start;
  display: block;
  gap: 10px;
}

.alert-icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1;
}

.alert-content {
  flex: 1;
}

.alert-action {
  flex-shrink: 0;
}

.alert-info {
  background: #e7f3ff;
  border: 1px solid #b6d4fe;
  color: #084298;
}

.alert-warning {
  background: #fff3cd;
  border: 1px solid #ffecb5;
  color: #664d03;
}

.alert-success {
  background: #d1e7dd;
  border: 1px solid #badbcc;
  color: #0f5132;
}

.alert-danger {
  background: #f8d7da;
  border: 1px solid #f5c2c7;
  color: #842029;
}

/* ==========================================
   ACTIONS BAR
   ========================================== */

.actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid #eee;
  margin-top: 24px;
}

.actions-left,
.actions-right {
  display: flex;
  gap: 8px;
}

/* ==========================================
   PROGRESS STEPS (Wizard Tracker)
   ========================================== */

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 0 10px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.step::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: #ddd;
}

.step:last-child::after {
  display: none;
}

.step.completed::after {
  background: #28a745;
}

.step.active::after {
  background: #ddd;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ddd;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  position: relative;
  z-index: 1;
}

.step.active .step-circle {
  background: #0066cc;
}

.step.completed .step-circle {
  background: #28a745;
}

.step-label {
  font-size: 11px;
  color: #666;
  margin-top: 8px;
  text-align: center;
  max-width: 100px;
}

.step.active .step-label {
  color: #0066cc;
  font-weight: 600;
}

/* Wizard Navigation */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid #eee;
  margin-top: 24px;
}

.wizard-nav-info {
  font-size: 13px;
  color: #666;
}

/* ==========================================
   CHART PLACEHOLDER
   ========================================== */

.chart-placeholder {
  background: #f8f8f8;
  border: 2px dashed #ccc;
  border-radius: 8px;
  height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 14px;
  margin-bottom: 20px;
  gap: 8px;
}

.chart-placeholder .chart-icon {
  font-size: 36px;
  opacity: 0.5;
}

.chart-placeholder .chart-label {
  font-weight: 500;
}

.chart-placeholder .chart-type {
  font-size: 12px;
  opacity: 0.7;
}

/* ==========================================
   INFO BLOCK
   ========================================== */

.info-block {
  background: #f9f9f9;
  border-left: 4px solid #0066cc;
  padding: 16px;
  margin-bottom: 16px;
}

.info-block-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.info-block-content {
  font-size: 13px;
  color: #555;
}

/* ==========================================
   SPLIT LAYOUT
   ========================================== */

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
  background: #f8f8f8;
  border: 1px dashed #ccc;
  border-radius: 6px;
  padding: 12px 16px;
  margin-top: 20px;
  font-size: 12px;
  color: #666;
}

/* ==========================================
   NEW COMPONENTS — TOGGLE SWITCH
   ========================================== */

.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.toggle-track {
  width: 44px;
  height: 24px;
  background: #ccc;
  border-radius: 12px;
  position: relative;
  transition: background 0.2s;
}

.toggle-track.on {
  background: #0066cc;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-track.on::after {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 13px;
  color: #555;
}

/* ==========================================
   NEW COMPONENTS — UPLOAD ZONE
   ========================================== */

.upload-zone {
  border: 2px dashed #bbb;
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  background: #fafafa;
  margin-bottom: 16px;
  transition: border-color 0.2s, background 0.2s;
}

.upload-zone:hover {
  border-color: #0066cc;
  background: #f0f7ff;
}

.upload-zone-icon {
  font-size: 36px;
  color: #aaa;
  margin-bottom: 8px;
}

.upload-zone-text {
  font-size: 14px;
  color: #555;
  margin-bottom: 4px;
}

.upload-zone-hint {
  font-size: 12px;
  color: #999;
}

/* ==========================================
   NEW COMPONENTS — PERMISSION MATRIX
   ========================================== */

.permission-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.permission-matrix th,
.permission-matrix td {
  padding: 10px 12px;
  border: 1px solid #ddd;
  text-align: center;
}

.permission-matrix th {
  background: #f0f0f0;
  font-weight: 600;
  font-size: 12px;
  color: #555;
}

.permission-matrix td:first-child {
  text-align: left;
  font-weight: 500;
  background: #fafafa;
  min-width: 200px;
}

.permission-matrix input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.permission-check {
  color: #28a745;
  font-weight: 700;
}

.permission-deny {
  color: #ccc;
}

/* ==========================================
   NEW COMPONENTS — BULK ACTION BAR
   ========================================== */

.bulk-action-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #e8f0fe;
  border: 1px solid #b6d4fe;
  border-radius: 6px;
  padding: 10px 16px;
  margin-bottom: 16px;
}

.bulk-action-bar .selection-count {
  font-size: 14px;
  font-weight: 500;
  color: #0066cc;
}

.bulk-action-bar .bulk-actions {
  display: flex;
  gap: 8px;
}

/* ==========================================
   NEW COMPONENTS — TIMELINE
   ========================================== */

.timeline {
  position: relative;
  padding-left: 28px;
  margin-bottom: 20px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: #ddd;
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0066cc;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #0066cc;
}

.timeline-dot.completed {
  background: #28a745;
  box-shadow: 0 0 0 2px #28a745;
}

.timeline-dot.alert {
  padding: 0px;
  background: #dc3545;
  box-shadow: 0 0 0 2px #dc3545;
}

.timeline-date {
  font-size: 12px;
  color: #999;
  margin-bottom: 2px;
}

.timeline-title {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.timeline-details {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
}

/* ==========================================
   NEW COMPONENTS — FIELD CONDITIONAL
   ========================================== */

.field-conditional {
  border-left: 3px solid #ffc107;
  padding-left: 12px;
  margin-left: 4px;
}

.field-conditional-label {
  font-size: 11px;
  color: #856404;
  margin-bottom: 4px;
}

/* ==========================================
   NEW COMPONENTS — EDITABLE TABLE
   ========================================== */

.editable-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 16px;
}

.editable-table th,
.editable-table td {
  padding: 8px 12px;
  border: 1px solid #ddd;
  text-align: left;
}

.editable-table th {
  background: #f8f8f8;
  font-weight: 600;
  color: #555;
  font-size: 12px;
}

.editable-table td input,
.editable-table td select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 13px;
  background: #fff;
}

.editable-table .row-actions {
  white-space: nowrap;
  width: 80px;
  text-align: center;
}

.editable-table .btn-add-row {
  width: 100%;
  padding: 8px;
  background: #f8f8f8;
  border: 1px dashed #ccc;
  border-radius: 4px;
  cursor: pointer;
  color: #0066cc;
  font-size: 13px;
  text-align: center;
  margin-top: 8px;
}

.editable-table .btn-add-row:hover {
  background: #e8f0fe;
}

/* Totals Row */
.totals-row td {
  background: #f0f4f8;
  font-weight: 600;
  border-top: 2px solid #0066cc;
}

/* ==========================================
   MODAL (for reference)
   ========================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

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

.modal {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* ==========================================
   DOCUMENT LIST
   ========================================== */

.doc-list {
  list-style: none;
}

.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 8px;
  background: #fff;
}

.doc-item .doc-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-icon {
  width: 40px;
  height: 40px;
  background: #f0f0f0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.doc-name {
  font-weight: 500;
}

.doc-status {
  font-size: 12px;
  color: #666;
}

/* ==========================================
   DETAIL GRID (for read-only detail views)
   ========================================== */

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 12px;
  color: #888;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.detail-value {
  font-size: 14px;
  color: #333;
}

.detail-value a {
  color: #0066cc;
  text-decoration: none;
}

.detail-value a:hover {
  text-decoration: underline;
}

/* ==========================================
   INDEX PAGE — screen list
   ========================================== */

.index-group {
  margin-bottom: 24px;
}

.index-group-title {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.index-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.index-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.15s;
}

.index-card:hover {
  border-color: #0066cc;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.index-card-id {
  font-size: 12px;
  font-weight: 600;
  color: #0066cc;
  min-width: 50px;
}

.index-card-title {
  font-size: 14px;
  color: #333;
  flex: 1;
}

.index-card-meta {
  font-size: 11px;
  color: #999;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 900px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .header-right {
    flex-wrap: wrap;
  }

  .app-body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

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

  .filters-row {
    flex-direction: column;
  }

  .filter-group {
    width: 100%;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .progress-steps {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .step::after {
    display: none;
  }
}

@media (max-width: 600px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    gap: 12px;
  }
}

/* ==========================================
   INTERACTIVE JS PATTERNS (Tab & Wizard)
   ========================================== */

.tab-panel.active {
  display: block;
}

.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
}

/* ===== SER-02..05 Additional badge variants ===== */

/* Estado: Borrador — gris claro con borde discontinuo */
.badge-borrador {
  background: #f5f5f5;
  color: #888;
  border: 1px dashed #888;
}

/* Estado: Pendiente de aprobación — naranja/ámbar */
.badge-pend-aprobacion {
  background: #fff0e0;
  color: #b25000;
  border: 1px solid #f0a070;
}

/* Estado: Ejecutada — gris-verde */
.badge-ejecutada {
  background: #d6ecd6;
  color: #2d6a2d;
}

/* Variant section title (colored) */
.variant-section-title {
  color: #0052a3;
}

/* Radio card selector */
.tipo-radio-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 12px;
}

.tipo-radio-card:last-child {
  margin-bottom: 0;
}

.tipo-radio-card.selected {
  border-color: #0066cc;
  background: #f0f7ff;
}

.tipo-radio-card input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}

.tipo-radio-card .radio-description {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
}

/* Variant section indicator */
.variant-section-indicator {
  border-left: 3px solid #0066cc;
  padding-left: 16px;
  margin-bottom: 0;
}

/* Approval hint text */
.approval-hint {
  font-size: 12px;
  font-weight: 500;
  color: #084298;
}

.approval-hint-warning {
  font-size: 12px;
  font-weight: 500;
  color: #664d03;
}

/* Tier section (aprobaciones) */
.tier-box {
  border: 2px solid #b6d4fe;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.tier-box-title {
  color: #084298;
}

.tier-box-disabled {
  border-color: #ddd;
  background: #f9f9f9;
  opacity: 0.65;
}

.tier-box-disabled-title {
  color: #888;
}

/* Section title inline flex variant */
.section-title-flex {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

/* Upload zone link color */
.upload-link {
  color: #0066cc;
}

/* Modal summary block */
.modal-summary {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 16px;
  font-size: 13px;
}

/* Approval tier status labels */
.tier-approve-label {
  color: #155724;
}

.tier-reject-label {
  color: #721c24;
}

/* Badge inline in page title */
.badge-title-inline {
  font-size: 14px;
  vertical-align: middle;
  margin-left: 8px;
}

/* Tier box badge label */
.badge-sm {
  font-size: 12px;
  margin-left: 12px;
}

/* Tier disabled inner alert */
.alert-tier-disabled {
  background: #f5f5f5;
  border-color: #ccc;
  color: #666;
}

/* Form label muted */
.form-label-muted {
  color: #aaa;
}

/* Approval hint approval info line */
.approval-info {
  font-size: 12px;
  color: #084298;
  font-weight: 500;
}

.approval-info-sub {
  font-size: 12px;
  color: #666;
  display: block;
}

/* Section title with flex for action button */
.section-title-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

/* Section title inline (no margin/border/padding override) */
.section-title-inline {
  margin-bottom: 0;
  border: none;
  padding: 0;
}

/* Modal paragraph */
.modal-para {
  margin-bottom: 12px;
  color: #555;
  font-size: 14px;
}

/* Modal actions row */
.modal-actions-row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Btn-group margin top */
.btn-group-mt {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ===== SER-01 Home-specific classes ===== */
.kpi-card-link-wrap {
  margin-top: 12px;
}
.kpi-card a.kpi-card-link {
  color: #fff;
  font-size: 12px;
  opacity: 0.9;
  text-decoration: underline;
}
.kpi-card a.kpi-card-link:hover {
  opacity: 1;
}
.footnote {
  font-size: 13px;
  color: #666;
  margin-top: 8px;
  padding: 12px 16px;
  background: #f8f9fa;
  border-left: 3px solid #ccc;
  border-radius: 4px;
}

/* Utility: colored bold text */
.text-success-bold {
  color: #28a745;
  font-weight: 600;
}

.text-warning-bold {
  color: #e67e22;
  font-weight: 600;
}

.text-danger-bold {
  color: #dc3545;
  font-weight: 600;
}

/* ==========================================
   SER-09 — STAR RATING (Likert 1-5)
   ========================================== */

.star-rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}

.star-rating-row:last-child {
  border-bottom: none;
}

/* ===== SER-14 Tab 3 alert severity ===== */
.content-card-alert-ok {
  border-left: 4px solid #28a745;
}
.content-card-alert-warning {
  border-left: 4px solid #f39c12;
}
.content-card-alert-danger {
  border-left: 4px solid #dc3545;
}
.content-card-alert-info {
  border-left: 4px solid #3498db;
}

.star-rating-criterion {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  min-width: 200px;
}

.star-rating-criterion-desc {
  font-size: 12px;
  color: #777;
  margin-top: 2px;
  font-weight: 400;
}

.star-rating {
  display: flex;
  flex-direction: row-reverse;
  gap: 4px;
}

.star-rating input[type="radio"] {
  display: none;
}

.star-rating label {
  font-size: 28px;
  color: #ddd;
  cursor: pointer;
  transition: color 0.15s;
  line-height: 1;
}

.star-rating input[type="radio"]:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
  color: #f5a623;
}

.star-rating-block {
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 8px 16px;
  margin-bottom: 16px;
}

.star-rating-scale {
  background: #f9f9f9;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 12px;
  color: #666;
  line-height: 1.8;
}

.star-rating-scale-title {
  font-weight: 600;
  color: #444;
  margin-bottom: 4px;
}

/* Anonymous panel */
.anon-panel {
  background: #fffde7;
  border: 1px solid #fff176;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13px;
  color: #555;
  margin-top: 8px;
  display: none;
}

.anon-panel.visible {
  display: block;
}

/* Char counter */
.char-counter {
  font-size: 12px;
  color: #888;
  text-align: right;
  margin-top: 4px;
}

.char-counter.near-limit {
  color: #e67e22;
}

.char-counter.at-limit {
  color: #dc3545;
}

/* ===== SER-10 Inventario extras ===== */
.kpi-card.kpi-card-teal {
  background: linear-gradient(135deg, #4a90a4 0%, #64b5f6 100%);
}
.badge.badge-plomeria {
  background: #e3f6fd;
  color: #0077aa;
}

/* ==========================================
   SER-13..16 — BIENES E INFRAESTRUCTURA
   Badge de tipo de activo
   ========================================== */

.badge.badge-generador {
  background: #dbeafe;
  color: #1d4ed8;
}
.badge.badge-motocicleta {
  background: #dcfce7;
  color: #15803d;
}
.badge.badge-extintor {
  background: #fee2e2;
  color: #b91c1c;
}
.badge.badge-purificador {
  background: #cffafe;
  color: #0e7490;
}
.badge.badge-transformador {
  background: #ffedd5;
  color: #c2410c;
}
.badge.badge-ascensor {
  background: #ede9fe;
  color: #6d28d9;
}
.badge.badge-otros-activo {
  background: #f3f4f6;
  color: #374151;
}

/* KPI sublabel danger */
.kpi-sublabel.kpi-sublabel-danger {
  color: #fecdd3;
  font-weight: 600;
}

/* ==========================================
   SER-16 — CALENDARIO DE MANTENIMIENTOS
   ========================================== */

/* Layout: grilla + sidebar lateral */
.calendar-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  margin-bottom: 20px;
}

/* Contenedor de la grilla mensual */
.calendar-wrapper {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

/* Fila de cabeceras días semana */
.calendar-header-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #f0f4f8;
  border-bottom: 2px solid #ddd;
}

.calendar-day-header {
  padding: 8px 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calendar-day-header.calendar-day-header-sunday {
  color: #888;
}

/* Fila de semana */
.calendar-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid #eee;
}

.calendar-row:last-child {
  border-bottom: none;
}

/* Celda de día */
.calendar-day {
  min-height: 100px;
  padding: 6px 8px;
  border-right: 1px solid #eee;
  vertical-align: top;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}

.calendar-day:last-child {
  border-right: none;
}

.calendar-day:hover {
  background: #f5f8ff;
}

/* Número de día */
.calendar-day-num {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  text-align: right;
  margin-bottom: 4px;
}

/* Días fuera del mes */
.calendar-day.calendar-day-muted {
  background: #fafafa;
}

.calendar-day.calendar-day-muted .calendar-day-num {
  color: #bbb;
}

/* Domingos */
.calendar-day.calendar-day-sunday {
  background: #f9f9f9;
}

.calendar-day.calendar-day-sunday .calendar-day-num {
  color: #999;
}

/* Tarjeta de mantenimiento en celda */
.calendar-event {
  display: block;
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 3px;
  margin-bottom: 3px;
  border-left: 3px solid;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

/* Colores por tipo */
.calendar-event.event-generador {
  background: #eff6ff;
  border-left-color: #2563eb;
  color: #1e40af;
}
.calendar-event.event-motocicleta {
  background: #f0fdf4;
  border-left-color: #16a34a;
  color: #166534;
}
.calendar-event.event-extintor {
  background: #fef2f2;
  border-left-color: #dc2626;
  color: #991b1b;
}
.calendar-event.event-purificador {
  background: #ecfeff;
  border-left-color: #0891b2;
  color: #0e7490;
}
.calendar-event.event-transformador {
  background: #fff7ed;
  border-left-color: #ea580c;
  color: #9a3412;
}
.calendar-event.event-ascensor {
  background: #f5f3ff;
  border-left-color: #7c3aed;
  color: #5b21b6;
}
.calendar-event.event-otros {
  background: #f9fafb;
  border-left-color: #6b7280;
  color: #374151;
}

/* Evento vencido: borde más intenso */
.calendar-event.calendar-event-vencido {
  background: #fef2f2;
  border-left-color: #b91c1c;
  color: #7f1d1d;
  font-weight: 600;
  border-left-width: 4px;
}

/* Panel lateral */
.calendar-sidebar {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  height: fit-content;
}

/* Item de próximos mantenimientos */
.calendar-upcoming-item {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

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

.calendar-upcoming-date {
  font-size: 12px;
  font-weight: 700;
  color: #0066cc;
  margin-bottom: 2px;
}

.calendar-upcoming-date.calendar-upcoming-date-overdue {
  color: #dc3545;
}

.calendar-upcoming-asset {
  font-size: 12px;
  color: #333;
  margin-bottom: 2px;
}

.calendar-upcoming-meta {
  font-size: 11px;
  color: #888;
}

/* Leyenda de colores */
.calendar-legend {
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 12px 16px;
  background: #fafafa;
  margin-top: 16px;
}

.calendar-legend-title {
  font-size: 12px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.calendar-legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.calendar-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #555;
}

.calendar-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

.calendar-legend-dot.legend-generador   { background: #2563eb; }
.calendar-legend-dot.legend-motocicleta { background: #16a34a; }
.calendar-legend-dot.legend-extintor    { background: #dc2626; }
.calendar-legend-dot.legend-purificador { background: #0891b2; }
.calendar-legend-dot.legend-transformador { background: #ea580c; }
.calendar-legend-dot.legend-ascensor    { background: #7c3aed; }
.calendar-legend-dot.legend-otros       { background: #6b7280; }

@media (max-width: 900px) {
  .calendar-layout {
    grid-template-columns: 1fr;
  }
  .calendar-event {
    white-space: normal;
  }
}

/* ==========================================
   SER-17..20 — INMUEBLES ADJUDICADOS
   ========================================== */

/* Origen badges */
.badge-dacion {
  background: #dbeafe;
  color: #1e40af;
}

.badge-remate {
  background: #ede9fe;
  color: #5b21b6;
}

/* Estado inmueble badges */
.badge-en-mantenimiento {
  background: #e2e3e5;
  color: #383d41;
}

.badge-publicado {
  background: #d4edda;
  color: #155724;
}

.badge-vendido-contado {
  background: #c3e6cb;
  color: #0f5132;
}

.badge-vendido-financiado {
  background: #cce5ff;
  color: #004085;
}

.badge-transferido {
  background: #343a40;
  color: #fff;
}

/* Interés manifestado (visitas) */
.badge-interes-alto {
  background: #d4edda;
  color: #155724;
}

.badge-interes-medio {
  background: #fff3cd;
  color: #856404;
}

.badge-interes-bajo {
  background: #fde8d8;
  color: #b25000;
}

.badge-interes-descartado {
  background: #f8d7da;
  color: #721c24;
}

.badge-interes-pendiente {
  background: #e2e3e5;
  color: #383d41;
}

/* Cuota estados */
.badge-pagada {
  background: #d4edda;
  color: #155724;
}

.badge-al-dia {
  background: #cce5ff;
  color: #004085;
}

.badge-en-mora {
  background: #f8d7da;
  color: #721c24;
}

.badge-reprogramada {
  background: #fff3cd;
  color: #856404;
}

/* Impuesto estado */
.badge-proximo-vencer {
  background: #fff3cd;
  color: #856404;
}

/* Table row highlight — mora (rojo claro) */
.data-table tr.row-mora {
  background: #fff5f5;
}

.data-table tr.row-mora:hover {
  background: #fce8e8;
}

/* Table row highlight — próximo a vencer (amarillo) */
.data-table tr.row-proxima {
  background: #fffdf0;
}

.data-table tr.row-proxima:hover {
  background: #fdf9d6;
}

/* Summary bar (cuotas summary at bottom of tab) */
.tab-summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  background: #f0f4f8;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 14px 20px;
  margin-top: 16px;
  font-size: 13px;
}

.tab-summary-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tab-summary-label {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 500;
}

.tab-summary-value {
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

.tab-summary-value.text-danger {
  color: #dc3545;
}

/* Ficha inmueble header summary line */
.ficha-meta {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
}

/* Post-visita disabled wrapper */
.post-visita-disabled-wrap {
  background: #f9f9f9;
  border: 1px dashed #ccc;
  border-radius: 6px;
  padding: 16px;
  position: relative;
}

.post-visita-notice {
  display: inline-block;
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffecb5;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 16px;
}

/* Dias mora — red text helper */
.text-mora {
  color: #dc3545;
  font-weight: 600;
}

/* Table cell: centered content (e.g. pagination placeholder row) */
.text-center-cell {
  text-align: center;
  padding: 10px;
}

/* Hidden utility (JS-toggled elements) */
.hidden {
  display: none;
}

/* ==========================================
   SER-21 — DASHBOARD GERENCIAL
   Horizontal bar chart (gasto por rubro)
   ========================================== */

.horiz-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.horiz-bar-row {
  display: grid;
  grid-template-columns: 200px 1fr 50px 160px;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.horiz-bar-label {
  color: #444;
  font-weight: 500;
}

.horiz-bar-track {
  background: #f0f0f0;
  border-radius: 4px;
  height: 24px;
  overflow: hidden;
}

.horiz-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}

/* Rubro colors */
.horiz-bar-c1 { background: #4a7fd4; }
.horiz-bar-c2 { background: #e06c3a; }
.horiz-bar-c3 { background: #38a169; }
.horiz-bar-c4 { background: #9b59b6; }
.horiz-bar-c5 { background: #95a5a6; }

/* Width classes (% of total spend) */
.horiz-bar-w44 { width: 44%; }
.horiz-bar-w25 { width: 25%; }
.horiz-bar-w18 { width: 18%; }
.horiz-bar-w9  { width: 9%; }
.horiz-bar-w4  { width: 4%; }

.horiz-bar-pct {
  color: #666;
  font-weight: 600;
  text-align: right;
}

.horiz-bar-amount {
  color: #333;
  font-size: 13px;
}

/* Evolution bars (evolución mensual del gasto table) */
.evol-bar {
  height: 16px;
  background: #4a7fd4;
  border-radius: 3px;
  min-width: 4px;
}

.evol-bar-w82 { width: 82%; }
.evol-bar-w72 { width: 72%; }
.evol-bar-w76 { width: 76%; }
.evol-bar-w61 { width: 61%; }

@media (max-width: 900px) {
  .horiz-bar-row {
    grid-template-columns: 140px 1fr 40px 100px;
    font-size: 13px;
  }
}

/* KPI card used as anchor link (removes browser default text-decoration) */
a.kpi-card-link-block {
  text-decoration: none;
  color: #fff;
  display: block;
}
a.kpi-card-link-block:hover {
  filter: brightness(1.05);
}
a.kpi-card-link-block .kpi-label,
a.kpi-card-link-block .kpi-value,
a.kpi-card-link-block .kpi-sublabel,
a.kpi-card-link-block .kpi-card-link {
  color: #fff;
}

/* SER-22 — column min-widths for param tables */
.col-pantalla {
  text-align: left;
  min-width: 220px;
}

.col-umbral {
  min-width: 280px;
}

.col-tipo-activo {
  min-width: 180px;
}

.col-plazo {
  min-width: 240px;
}

/* content-card with bottom spacing (used in Tab 3 tipo cards) */
.content-card-mb {
  margin-bottom: 16px;
}

/* ==========================================
   MODULE LANDING PAGE (index.html)
   ========================================== */

/* Intro paragraphs */
.module-intro {
  margin-bottom: 28px;
  padding: 20px 24px;
  background: #f0f7ff;
  border: 1px solid #b6d4fe;
  border-radius: 8px;
}

.module-intro p {
  font-size: 14px;
  color: #333;
  line-height: 1.65;
  margin-bottom: 12px;
}

.module-intro p:last-child {
  margin-bottom: 0;
}

/* Functional group section */
.module-group {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid #eee;
}

.module-group:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

/* Group description */
.group-desc {
  font-size: 13px;
  color: #666;
  margin-bottom: 14px;
  line-height: 1.55;
}

/* Screen list */
.screen-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.screen-list li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  transition: border-color 0.2s, box-shadow 0.15s;
}

.screen-list li:hover {
  border-color: #0066cc;
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}

.screen-list a {
  font-size: 14px;
  font-weight: 600;
  color: #0066cc;
  text-decoration: none;
}

.screen-list a:hover {
  text-decoration: underline;
}

/* Screen type annotation */
.screen-type {
  font-size: 12px;
  color: #555;
  line-height: 1.5;
  white-space: normal;
}

/* Footer for module landing */
.module-footer {
  margin-top: 28px;
  padding: 14px 20px;
  background: #f8f8f8;
  border: 1px dashed #ccc;
  border-radius: 6px;
  font-size: 13px;
  color: #555;
  line-height: 1.8;
}

.module-footer code {
  background: #eee;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
  color: #444;
}

.module-footer a {
  color: #0066cc;
  text-decoration: none;
  font-weight: 500;
}

.module-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .screen-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .screen-type {
    white-space: normal;
  }
}

/* ==========================================
   ICON UTILITIES (inline SVG via mask-image)
   No external dependencies, color inherits from text (currentColor).
   ========================================== */

.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
  vertical-align: -0.125em;
  flex-shrink: 0;
}

.icon-star {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/></svg>");
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
  vertical-align: -0.125em;
  flex-shrink: 0;
}

.icon-star-empty {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28z'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28z'/></svg>");
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: #ccc;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
  vertical-align: -0.125em;
  flex-shrink: 0;
}

.icon-check {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>");
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
  vertical-align: -0.125em;
  flex-shrink: 0;
}

.icon-arrow-up {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 4L22 20H2z'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 4L22 20H2z'/></svg>");
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
  vertical-align: -0.05em;
  flex-shrink: 0;
}

.icon-arrow-down {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 20L2 4h20z'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 20L2 4h20z'/></svg>");
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
  vertical-align: -0.05em;
  flex-shrink: 0;
}

.icon-warning {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z'/></svg>");
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
  vertical-align: -0.125em;
  flex-shrink: 0;
}

.icon-plus {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z'/></svg>");
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
  vertical-align: -0.125em;
  flex-shrink: 0;
}

/* Wizard: when a step is completed, render an SVG check inside the step-circle
   instead of the ✓ character. The number stays in the DOM for accessibility
   but is hidden visually via color: transparent. */
.step.completed .step-circle {
  color: transparent;
  position: relative;
}

.step.completed .step-circle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 65%;
  height: 65%;
  background-color: #fff;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>");
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
}
