/* === CABSABifrost Design System === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #0f172a;
  --bg-sidebar-hover: #1e293b;
  --bg-sidebar-active: #3b82f6;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-white: #ffffff;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #64748b;

  --success: #10b981;
  --success-bg: #ecfdf5;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --info: #06b6d4;

  --border-color: #e2e8f0;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 14px;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
}

/* Layout App */
.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  color: var(--text-white);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.sidebar-brand span {
  color: #38bdf8;
}

.sidebar-nav {
  padding: 16px 12px;
  flex-grow: 1;
}

.nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 12px 12px 6px 12px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: #94a3b8;
  border-radius: var(--radius-sm);
  font-weight: 500;
  margin-bottom: 2px;
  transition: all 0.15s ease;
}

.nav-item:hover {
  background-color: var(--bg-sidebar-hover);
  color: #ffffff;
}

.nav-item.active {
  background-color: var(--primary);
  color: #ffffff;
}

.nav-item-sub {
  padding-left: 30px;
  font-size: 13px;
  color: #7b91ad;
}

.nav-item-sub:hover {
  background-color: var(--bg-sidebar-hover);
  color: #ffffff;
}

.nav-item-sub.active {
  background-color: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
}

.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.navbar {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;

  box-shadow: var(--shadow-sm);
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #0284c7);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
}

.page-content {
  padding: 28px;
  flex-grow: 1;
}

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

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
}

.btn-secondary {
  background-color: #ffffff;
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background-color: #f1f5f9;
  color: var(--text-primary);
}

.btn-danger {
  background-color: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #dc2626;
  color: #ffffff;
}

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

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.badge-success {
  background-color: var(--success-bg);
  color: var(--success);
}

.badge-danger {
  background-color: var(--danger-bg);
  color: var(--danger);
}

.badge-warning {
  background-color: var(--warning-bg);
  color: var(--warning);
}

.badge-info {
  background-color: var(--primary-light);
  color: var(--primary);
}

/* Tables */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: #ffffff;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th {
  background-color: #f8fafc;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background-color: #f1f5f9;
}

/* Forms */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 13.5px;
  font-family: inherit;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea.form-control {
  resize: vertical;
  min-height: 70px;
  field-sizing: content;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.form-grid:last-child {
  margin-bottom: 0;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}

/* Form Visual Hierarchy & Sections */
.form-section {
  margin-bottom: 48px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 24px;
  padding-bottom: 0;
}

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

h2.form-section-title,
.form-section-title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.form-section-title svg {
  color: var(--primary);
  flex-shrink: 0;
}

.form-section-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 30px;
  line-height: 1.45;
}

.form-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   Project Details Systematic Scale (Typographic Ratio 1.25x, Spacing 4-48px)
   ========================================================================== */
.project-details-card {
  padding: 32px;
  margin-bottom: 32px;
}

.details-card-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.details-card-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

.details-card-title svg {
  color: var(--primary);
  flex-shrink: 0;
}

.details-card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 30px;
  line-height: 1.4;
}

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

.details-group:last-child {
  margin-bottom: 0;
}

.details-group-header {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.details-group-header svg {
  color: var(--primary);
}

.details-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.details-unified-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 4px 18px;
  display: flex;
  flex-direction: column;
}

.details-unified-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid #edf2f7;
}

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

.details-meta-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s ease;
}

.details-meta-item:hover {
  border-color: #cbd5e1;
}

.details-meta-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.details-meta-value {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.details-content-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.details-content-block:last-child {
  margin-bottom: 0;
}

.details-content-header {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.details-content-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-primary);
}

.details-attachment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.details-attachment-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: all 0.15s ease;
  text-decoration: none;
  color: var(--text-primary);
}

.details-attachment-pill:hover {
  border-color: var(--primary);
  background: #f0fdf4;
}

/* Alerts Flash */
.flash-messages {
  margin-bottom: 20px;
}

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.alert-notice {
  background-color: var(--success-bg);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-alert {
  background-color: var(--danger-bg);
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Login Page */
.login-body {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px;
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Search Bar */
.search-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.search-input {
  flex-grow: 1;
}

/* Stats Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Pagination (Pagy) */
.pagy.series-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagy.series-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s ease;
  user-select: none;
}

.pagy.series-nav a:hover:not([aria-disabled="true"]) {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.pagy.series-nav a[aria-current="page"] {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
  cursor: default;
}

.pagy.series-nav a[aria-disabled="true"]:not([aria-current="page"]) {
  color: var(--text-muted);
  background-color: #f8fafc;
  border-color: var(--border-color);
  cursor: not-allowed;
  opacity: 0.7;
}

.pagy.series-nav a[role="separator"] {
  border: none;
  background: transparent;
  cursor: default;
}

/* Co-responsibles Component */
.co-responsible-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 28px;
}

.co-responsible-list:empty::before {
  content: "Ningún co-responsable asignado aún.";
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
  display: block;
}

.co-responsible-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #bae6fd;
  width: 100%;
  font-size: 12px;
  font-weight: 500;
}

.co-responsible-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.co-responsible-dept {
  color: #0284c7;
}

.co-responsible-remove-btn {
  background: none;
  border: none;
  color: #0369a1;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 4px;
  font-weight: 700;
}

.co-responsible-input {
  font-size: 12px !important;
  padding: 6px 10px !important;
  border-color: #bae6fd !important;
  width: 100%;
  margin-top: 4px;
}

.co-responsible-placeholder {
  padding: 12px;
  background-color: #f8fafc;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

/* CSS-driven form validation states */
.form-control:user-invalid {
  border-color: var(--danger);
  background-color: #fef2f2;
}

.form-control:user-invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Trix Editor Styles */
trix-editor {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin: 0;
  padding: 10px 14px;
  min-height: 90px;
  background-color: #ffffff;
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  line-height: 1.5;
}

trix-editor:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

trix-toolbar {
  margin-bottom: 6px;
}

trix-toolbar * {
  box-sizing: border-box;
}

trix-toolbar .trix-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

trix-toolbar .trix-button-group {
  display: inline-flex;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  overflow: hidden;
  margin-bottom: 4px;
}

trix-toolbar .trix-button-group:not(:first-child) {
  margin-left: 0;
}

trix-toolbar .trix-button {
  position: relative;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  margin: 0;
  outline: none;
  border: none;
  border-right: 1px solid var(--border-color);
  background: transparent;
  cursor: pointer;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}

trix-toolbar .trix-button:last-child {
  border-right: none;
}

trix-toolbar .trix-button:hover:not(:disabled) {
  background-color: #e2e8f0;
  color: var(--text-primary);
}

trix-toolbar .trix-button.trix-active {
  background-color: #eff6ff;
  color: var(--primary);
}

trix-toolbar .trix-button:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

trix-toolbar .trix-button--icon {
  width: 28px;
  text-indent: -9999px;
}

trix-toolbar .trix-button--icon::before {
  display: inline-block;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0.7;
  content: "";
  background-position: center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
}

trix-toolbar .trix-button--icon.trix-active::before {
  opacity: 1;
}

trix-toolbar .trix-button--icon-attach,
trix-toolbar .trix-button-group--file-tools {
  display: none !important;
}

trix-toolbar .trix-button--icon-bold::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.522%2019.242a.5.5%200%200%201-.5-.5V5.35a.5.5%200%200%201%20.5-.5h5.783c1.347%200%202.46.345%203.24.982.783.64%201.216%201.562%201.216%202.683%200%201.13-.587%202.129-1.476%202.71a.35.35%200%200%200%20.049.613c1.259.56%202.101%201.742%202.101%203.22%200%201.282-.483%202.334-1.363%203.063-.876.726-2.132%201.12-3.66%201.12h-5.89ZM9.27%207.347v3.362h1.97c.766%200%201.347-.17%201.733-.464.38-.291.587-.716.587-1.27%200-.53-.183-.928-.513-1.198-.334-.273-.838-.43-1.505-.43H9.27Zm0%205.606v3.791h2.389c.832%200%201.448-.177%201.853-.497.399-.315.614-.786.614-1.423%200-.62-.22-1.077-.63-1.385-.418-.313-1.053-.486-1.905-.486H9.27Z%22%20fill%3D%22%231e293b%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-italic::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9%205h6.5v2h-2.23l-2.31%2010H13v2H6v-2h2.461l2.306-10H9V5Z%22%20fill%3D%22%231e293b%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-link::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M18.948%205.258a4.337%204.337%200%200%200-6.108%200L11.217%206.87a.993.993%200%200%200%200%201.41c.392.39%201.027.39%201.418%200l1.623-1.613a2.323%202.323%200%200%201%203.271%200%202.29%202.29%200%200%201%200%203.251l-2.393%202.38a3.021%203.021%200%200%201-4.255%200l-.05-.049a1.007%201.007%200%200%200-1.418%200%20.993.993%200%200%200%200%201.41l.05.049a5.036%205.036%200%200%200%207.091%200l2.394-2.38a4.275%204.275%200%200%200%200-6.072Zm-13.683%2013.6a4.337%204.337%200%200%200%206.108%200l1.262-1.255a.993.993%200%200%200%200-1.41%201.007%201.007%200%200%200-1.418%200L9.954%2017.45a2.323%202.323%200%200%201-3.27%200%202.29%202.29%200%200%201%200-3.251l2.344-2.331a2.579%202.579%200%200%201%203.631%200c.392.39%201.027.39%201.419%200a.993.993%200%200%200%200-1.41%204.593%204.593%200%200%200-6.468%200l-2.345%202.33a4.275%204.275%200%200%200%200%206.072Z%22%20fill%3D%22%231e293b%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-strike::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6%2014.986c.088%202.647%202.246%204.258%205.635%204.258%203.496%200%205.713-1.728%205.713-4.463%200-.275-.02-.536-.062-.781h-3.461c.398.293.573.654.573%201.123%200%201.035-1.074%201.787-2.646%201.787-1.563%200-2.773-.762-2.91-1.924H6ZM6.432%2010h3.763c-.632-.314-.914-.715-.914-1.273%200-1.045.977-1.739%202.432-1.739%201.475%200%202.52.723%202.617%201.914h2.764c-.05-2.548-2.11-4.238-5.39-4.238-3.145%200-5.392%201.719-5.392%204.316%200%20.363.04.703.12%201.02ZM4%2011a1%201%200%201%200%200%202h15a1%201%200%201%200%200-2H4Z%22%20fill%3D%22%231e293b%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-heading-1::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.5%207.5v-3h-12v3H14v13h3v-13h4.5ZM9%2013.5h3.5v-3h-10v3H6v7h3v-7Z%22%20fill%3D%22%231e293b%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-quote::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.581%208.471c.44-.5%201.056-.834%201.758-.995C8.074%207.17%209.201%207.822%2010%208.752c1.354%201.578%201.33%203.555.394%205.277-.941%201.731-2.788%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.121-.49.16-.764.294-.286.567-.566.791-.835.222-.266.413-.54.524-.815.113-.28.156-.597.026-.908-.128-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.674-2.7c0-.905.283-1.59.72-2.088Zm9.419%200c.44-.5%201.055-.834%201.758-.995%201.734-.306%202.862.346%203.66%201.276%201.355%201.578%201.33%203.555.395%205.277-.941%201.731-2.789%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.122-.49.16-.764.294-.286.567-.566.791-.835.222-.266.412-.54.523-.815.114-.28.157-.597.026-.908-.127-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.672-2.701c0-.905.283-1.59.72-2.088Z%22%20fill%3D%22%231e293b%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-code::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.293%2011.293a1%201%200%200%200%200%201.414l4%204a1%201%200%201%200%201.414-1.414L5.414%2012l3.293-3.293a1%201%200%200%200-1.414-1.414l-4%204Zm13.414%205.414%204-4a1%201%200%200%200%200-1.414l-4-4a1%201%200%201%200-1.414%201.414L18.586%2012l-3.293%203.293a1%201%200%200%200%201.414%201.414Z%22%20fill%3D%22%231e293b%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-bullet-list::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%207.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203ZM8%206a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-2.5-5a1.5%201.5%200%201%201-3%200%201.5%201.5%200%200%201%203%200ZM5%2019.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203Z%22%20fill%3D%22%231e293b%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-number-list::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%204h2v4H4V5H3V4Zm5%202a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-3.5-7H6v1l-1.5%202H6v1H3v-1l1.667-2H3v-1h2.5ZM3%2017v-1h3v4H3v-1h2v-.5H4v-1h1V17H3Z%22%20fill%3D%22%231e293b%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-undo::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%2014a1%201%200%200%200%201%201h6a1%201%200%201%200%200-2H6.257c2.247-2.764%205.151-3.668%207.579-3.264%202.589.432%204.739%202.356%205.174%205.405a1%201%200%200%200%201.98-.283c-.564-3.95-3.415-6.526-6.825-7.095C11.084%207.25%207.63%208.377%205%2011.39V8a1%201%200%200%200-2%200v6Zm2-1Z%22%20fill%3D%22%231e293b%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-redo::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2014a1%201%200%200%201%201h-6a1%201%200%201%201%200-2h3.743c-2.247-2.764-5.151-3.668-7.579-3.264-2.589.432-4.739%202.356-5.174%205.405a1%201%200%200%201-1.98-.283c.564-3.95%203.415-6.526%206.826-7.095%203.08-.513%206.534.614%209.164%203.626V8a1%201%200%201%201%202%200v6Zm-2-1Z%22%20fill%3D%22%231e293b%22%2F%3E%3C%2Fsvg%3E");
}

trix-toolbar .trix-dialogs {
  position: relative;
}
trix-toolbar .trix-dialog {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  font-size: 12px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  z-index: 20;
}
trix-toolbar .trix-input--dialog {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #fff;
  outline: none;
}
trix-toolbar .trix-button--dialog {
  padding: 6px 10px;
  font-size: 12px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
}

.trix-content {
  line-height: 1.6;
  overflow-wrap: break-word;
  word-break: break-word;
  color: var(--text-primary);
}
.trix-content h1 {
  font-size: 1.25em;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.trix-content blockquote {
  border-left: 3px solid var(--primary);
  margin-left: 0;
  padding-left: 10px;
  color: var(--text-secondary);
  font-style: italic;
}
.trix-content ul, .trix-content ol {
  padding-left: 20px;
  margin-bottom: 6px;
}
.trix-content li {
  margin-bottom: 2px;
}
.trix-content pre {
  background: #f1f5f9;
  border-radius: 4px;
  padding: 8px 12px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 12.5px;
  overflow-x: auto;
}
.trix-content a {
  color: var(--primary);
  text-decoration: underline;
}

/* ══════════════════════════════════════════════════════════════
   MÓDULO: TICKETS DE SOPORTE
   ══════════════════════════════════════════════════════════════ */

/* ─── Badges de Estado ────────────────────────────────────────── */
.ticket-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.ticket-status-open        { background: #dbeafe; color: #1d4ed8; }
.ticket-status-in_progress { background: #ecfdf5; color: #065f46; }
.ticket-status-paused      { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.ticket-status-pending_user { background: #fef3c7; color: #92400e; }
.ticket-status-resolved    { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.ticket-status-closed      { background: #f1f5f9; color: #475569; }
.ticket-status-reopened    { background: #ede9fe; color: #5b21b6; }

/* ─── Badges de Prioridad ─────────────────────────────────────── */
.ticket-priority-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.ticket-priority-critical { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.ticket-priority-high     { background: #fef3c7; color: #b45309; }
.ticket-priority-medium   { background: #ede9fe; color: #7c3aed; }
.ticket-priority-low      { background: #f1f5f9; color: #64748b; }

/* ─── Badges de SLA ───────────────────────────────────────────── */
.ticket-sla-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.sla-breached { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; animation: sla-pulse 2s ease-in-out infinite; }
.sla-warning  { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.sla-ok       { background: #dcfce7; color: #15803d; }

@keyframes sla-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ─── Nota Interna (comentario interno) ───────────────────────── */
.ticket-internal-note {
  background: #fefce8;
  border: 1px solid #fde047;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.ticket-internal-badge {
  font-size: 10px;
  background: #fef08a;
  color: #78350f;
  border: 1px solid #fde047;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 700;
  margin-left: 6px;
}

/* ─── Card de ticket derivado ─────────────────────────────────── */
.ticket-derived-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ticket-derived-banner a {
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: underline;
}

/* ═════════════════════════════════════════════════════════
   Tooltips interactivos y visuales (Instantáneos)
   ═════════════════════════════════════════════════════════ */
.has-tooltip,
[data-tooltip] {
  position: relative;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 12px;
  background: #0f172a;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.4;
  border-radius: 6px;
  white-space: normal;
  width: max-content;
  max-width: 250px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 10000;
}

[data-tooltip]::after {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 10000;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Tooltip orientado hacia abajo */
[data-tooltip].tooltip-bottom::before {
  bottom: auto;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(-4px);
}

[data-tooltip].tooltip-bottom::after {
  bottom: auto;
  top: calc(100% + 2px);
  border-width: 0 6px 6px 6px;
  border-color: transparent transparent #0f172a transparent;
  transform: translateX(-50%) translateY(-4px);
}

[data-tooltip].tooltip-bottom:hover::before,
[data-tooltip].tooltip-bottom:hover::after {
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   MÓDULO: CARGA LABORAL Y PRODUCTIVIDAD (TIME BLOCKING GRID)
   ========================================================================== */

.workload-toolbar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.workload-toolbar-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.workload-user-selector-wrapper {
  display: flex;
  align-items: center;
}

.form-group-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-label-inline {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
  white-space: nowrap;
}

.workload-nav-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.workload-current-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-left: 0.5rem;
  white-space: nowrap;
}

.workload-toolbar-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
}

.workload-custom-range-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.workload-range-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.workload-range-inputs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.range-separator {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.workload-custom-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--warning-bg);
  border: 1px solid var(--warning);
  color: #92400e;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
}

.workload-reset-link {
  color: #b45309;
  text-decoration: underline;
  font-weight: 600;
}

.workload-reset-link:hover {
  color: #78350f;
}

/* Resumen superior */
.workload-summary-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.workload-summary-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  box-shadow: var(--shadow-sm);
}

.workload-summary-count {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.workload-summary-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.workload-summary-item--danger {
  border-color: var(--danger);
  background: var(--danger-bg);
}

.workload-summary-item--danger .workload-summary-count {
  color: var(--danger);
}

/* Grid Container */
.workload-grid-wrapper {
  margin-bottom: 1.5rem;
}

.workload-grid-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  position: relative;
}

.workload-grid {
  display: grid;
  grid-template-columns: 70px repeat(var(--day-count), minmax(var(--col-width, 150px), 1fr));
  grid-template-rows: 50px repeat(var(--hour-count), 58px);
  min-width: calc(70px + (var(--day-count) * var(--col-width, 150px)));
  position: relative;
}

.workload-grid__corner-header {
  grid-column: 1;
  grid-row: 1;
  background: #f1f5f9;
  border-bottom: 2px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 10;
}

.workload-grid__col-header {
  background: #f8fafc;
  border-bottom: 2px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  padding: 0.35rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 5;
  user-select: none;
}

/* Handle interactivo de redimensionamiento */
.workload-grid__col-resizer {
  position: absolute;
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  z-index: 10;
  touch-action: none;
}

.workload-grid__col-resizer::after {
  content: "";
  position: absolute;
  top: 15%;
  bottom: 15%;
  left: 3px;
  width: 2px;
  background-color: transparent;
  border-radius: 1px;
  transition: background-color 0.15s ease;
}

.workload-grid__col-resizer:hover::after,
.workload-grid__col-header:hover .workload-grid__col-resizer::after {
  background-color: var(--primary);
}

body.is-resizing-column {
  cursor: col-resize !important;
  user-select: none !important;
}

body.is-resizing-column * {
  cursor: col-resize !important;
  user-select: none !important;
}

.workload-grid__col-header--today {
  background: #eff6ff;
  border-bottom-color: var(--primary);
}

.workload-grid__col-header--weekend {
  background: #f1f5f9;
  opacity: 0.75;
}

.workload-grid__col-day {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.workload-grid__col-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.workload-grid__col-today-badge {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  margin-top: 2px;
}

.workload-grid__hour-cell {
  background: #f8fafc;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px dashed var(--border-color);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  position: sticky;
  left: 0;
  z-index: 4;
}

.workload-grid__cell {
  border-right: 1px solid #f1f5f9;
  border-bottom: 1px dashed #f1f5f9;
  background: transparent;
  pointer-events: none;
}

.workload-grid__cell--weekend {
  background: rgba(241, 245, 249, 0.45);
}

.workload-grid__cell--today {
  background: rgba(239, 246, 255, 0.25);
}

/* Time Block Card */
.workload-block {
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-left-width: 4px;
  box-shadow: var(--shadow-sm);
  padding: 0.35rem 0.45rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  z-index: 3;
  position: relative;
  box-sizing: border-box;

  /* Disposición en carriles paralelos si hay múltiples asignaciones simultáneas */
  width: calc((100% - 8px) / var(--total-lanes, 1) - 2px);
  margin-top: 2px;
  margin-bottom: 2px;
  margin-left: calc(4px + (var(--lane-index, 0) * ((100% - 8px) / var(--total-lanes, 1))));
}

.workload-block:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  opacity: 0.95;
}

.workload-block--project {
  border-style: solid;
  background: linear-gradient(135deg, #ffffff 0%, #fbfcfe 100%);
}

.workload-block--breached {
  border-color: var(--danger) !important;
  background: #fff5f5;
}

.workload-block--pending-user {
  background: repeating-linear-gradient(
    -45deg,
    #fafbfc,
    #fafbfc 8px,
    #f1f3f7 8px,
    #f1f3f7 16px
  );
  border-style: dashed;
  opacity: 0.92;
}

.workload-block__header {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  margin-bottom: 0.15rem;
}

.workload-block__icon {
  font-size: 0.8125rem;
}

.workload-block__folio {
  font-weight: 700;
  color: var(--text-primary);
}

.workload-block__time {
  margin-left: auto;
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.workload-block__body {
  margin-bottom: 0.2rem;
}

.workload-block__title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.workload-block__business {
  font-size: 0.6875rem;
  font-weight: 600;
  margin-top: 1px;
}

.workload-block__footer {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.workload-block__badge {
  font-size: 0.625rem;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: capitalize;
}

.workload-badge--critical {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.workload-badge--high {
  background: #fff7ed;
  color: #ea580c;
  border: 1px solid #fed7aa;
}

.workload-badge--medium {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.workload-badge--low {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.workload-block__badge--breached {
  background: #dc2626;
  color: #ffffff;
}

.workload-block__badge--reopened {
  background: #8b5cf6;
  color: #ffffff;
}

.workload-block__badge--pending-user {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Empty State */
.workload-empty-state {
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 3rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.workload-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.workload-empty-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.workload-empty-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* Leyenda */
.workload-legend {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.8125rem;
}

.workload-legend__section {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.workload-legend__title {
  font-weight: 700;
  color: var(--text-secondary);
}

.workload-legend__item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-secondary);
}

.workload-legend__businesses {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.workload-legend__business-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-primary);
  font-weight: 500;
}

.workload-legend__color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Color Picker Input */
.color-picker-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.color-picker-input {
  width: 44px;
  height: 38px;
  padding: 2px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
}

.color-picker-hex {
  font-family: monospace;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: #f1f5f9;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   File Accumulator & Upload Dropzone
   ========================================================================== */
.file-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 24px 20px;
  background: #f8fafc;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.file-dropzone:hover,
.file-dropzone.dragover {
  border-color: var(--primary);
  background: #f0fdf4;
}

.file-dropzone-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 10px;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e0f2fe;
  border-radius: 50%;
}

.file-dropzone-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.file-dropzone-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.file-accumulator-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  margin-top: 12px;
}

.file-accumulator-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.file-accumulator-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.file-accumulator-item-info {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-accumulator-remove-btn {
  background: #fee2e2;
  color: #ef4444;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.file-accumulator-remove-btn:hover {
  background: #ef4444;
  color: #ffffff;
}


