:root {
  /* Fondos principales */
  --bg-main: #303030;        /* fondo general casi negro */
  --bg-sidebar: #282828;     /* lateral ligeramente más claro */
  --bg-card: #282828;        /* tarjeta central */
  --bg-card-soft: #1d1d1d;   /* elementos dentro de la card */

  /* Verdes del diseño */
  --accent: #7ae0a9;         /* verde de textos y links */
  --accent-soft: #303030;    /* fondos suaves de iconos verdes */
  --accent-cta: #7ae0a9;     /* botones principales */

  /* Tipografía y bordes */
  --text-main: #f9f9f9;
  --text-muted: #bbb;
  --border-soft: #363636;
  --danger: #e74c3c;

  /* Radii */
  --radius-pill: 999px;
  --radius-card: 24px;
  --radius-input: 4px;

  /* Espaciados */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;

  /* Otros */
  --transition-fast: 0.2s ease;
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* SHELL GENERAL */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.shell-main {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* HEADER SUPERIOR (header.html) */
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-lg);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.logo {
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 18px;
}

.logo img {
  height: 36px;
  width: auto;
  display: block;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.topbar-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--border-soft);
  cursor: pointer;
  transition: background var(--transition-fast),
    transform var(--transition-fast);
  font-size: 14px;
  position: relative;
}

.topbar-icon-btn:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.avatar-btn {
  width: auto;
  padding: 0 10px 0 6px;
  gap: 6px;
  background: transparent;
  color: var(--text-muted);
}

.avatar-btn:hover {
  color: #000;
}

.avatar-btn:hover i {
  color: #000;
}

.avatar-role-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.avatar-btn:hover .avatar-role-badge {
  color: #000;
  background: var(--accent);
  padding: 2px 6px;
  border-radius: 6px;
}

body[data-role="gdels"] .avatar-role-badge {
  color: #013088;
}

body[data-role="latvia"] .avatar-role-badge {
  color: #9d2235;
}

.notification-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  top: 2px;
  right: 2px;
  border: 2px solid var(--bg-card);
  display: none;
}

.notification-dot.is-visible {
  display: block;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--accent);
}

/* SIDEBAR (sidebar.html) */
.sidebar {
  position: relative;
  width: 220px;
  height: 100%;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-soft);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  transition: width var(--transition-fast);
  overflow: hidden;
}

body.sidebar-collapsed .sidebar {
  width: 72px;
}

/* botón plegar, solo visible al hacer hover */
.sidebar-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border-soft);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast);
  z-index: 5;
}

.sidebar-toggle .fa-thumbtack.pinned {
  transform: rotate(45deg);
}

.sidebar:hover .sidebar-toggle {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-toggle:hover {
  background: var(--border-soft);
  transform: translateY(-1px);
}

.sidebar-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  padding: var(--space-sm);
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
}
.sidebar-section-title .section-toggle {
  font-size: 10px;
  opacity: 0.7;
}
.sidebar-section-title.is-collapsed::after {
  content: "•";
  color: #7ae0a9;
  font-size: 14px;
  margin-left: 6px;
}

.sidebar-nav {
  margin: 0 0 12px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  transition: max-height 0.2s ease;
  max-height: none;
}

/* ITEM DEL MENÚ */
.sidebar-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 10px 18px;
  margin: 2px 0;
  border-radius: 24px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

/* ICONO EN ESTADO NORMAL (sidebar expandido) */
.sidebar-item .icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color var(--transition-fast), font-size var(--transition-fast);
  position: relative;
}

.sidebar-alert-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger);
  top: 0;
  right: 0;
  border: 2px solid var(--bg-sidebar);
  display: none;
}

.sidebar-alert-dot.is-visible {
  display: block;
}

/* Texto del item */
.sidebar-item-text {
  white-space: nowrap;
}

/* ESTADOS (expandido) */
.sidebar-item:hover {
  background: var(--bg-main);
  color: #ffffff;
  transform: translateY(-1px);
}

.sidebar-item:hover .icon {
  color: #ffffff;
}

.sidebar-item.active {
  background: #323232;
  color: var(--accent);
}

.sidebar-item.active .icon,
.sidebar-item.active .sidebar-item-text {
  color: var(--accent);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}

/* 🔻 MODO COLAPSADO 🔻 */

body.sidebar-collapsed .sidebar-item-text,
body.sidebar-collapsed .sidebar-section-title {
  display: none;
}

/* Centramos el contenido de cada item y quitamos el gap */
body.sidebar-collapsed .sidebar-item {
  justify-content: center;
  gap: 0;
  padding-left: 0;
  padding-right: 0;
  background: transparent;
  transform: none;
}

/* Iconos más grandes y centrados horizontalmente */
body.sidebar-collapsed .sidebar-item .icon {
  font-size: 24px;
  width: 32px;
  height: 32px;
  margin: 0 auto;
}

/* Sin fondo en hover, solo cambio de color */
body.sidebar-collapsed .sidebar-item:hover {
  background: transparent;
}

body.sidebar-collapsed .sidebar-item:hover .icon {
  color: #ffffff;
}

/* Activo en colapsado: sin fondo, icono verde */
body.sidebar-collapsed .sidebar-item.active {
  background: transparent;
}

body.sidebar-collapsed .sidebar-item.active .icon {
  color: var(--accent);
}

/* Estados responsive */
body.sidebar-compact .sidebar {
  width: 200px;
  padding: var(--space-md);
  gap: var(--space-md);
}
body.sidebar-compact .sidebar-section-title {
  padding: var(--space-xs);
  margin-top: 2px;
}
body.sidebar-compact .sidebar-item {
  padding: 10px;
}

body.sidebar-folded .sidebar-section-title {
  opacity: 0.8;
}
body.sidebar-folded .sidebar-section-title .section-toggle {
  display: inline-block;
}
body.sidebar-folded .sidebar-nav {
  gap: 0;
}
body.sidebar-folded .sidebar {
  gap: var(--space-sm);
}

.sidebar-nav.is-open {
  max-height: 800px; /* suficiente para mostrar items */
  overflow: hidden;
}

body.sidebar-tight .sidebar {
  padding: var(--space-md);
  gap: var(--space-md);
}
body.sidebar-tight .sidebar-section-title {
  padding: var(--space-xs);
  margin-top: 0;
}
body.sidebar-tight .sidebar-nav {
  gap: 2px;
}

/* MAIN CONTENT AREA */
.main {
  flex: 1;
  padding: var(--space-lg) calc(var(--space-lg) + 8px);
  min-width: 0;
  overflow: auto;
  background: var(--bg-main);
}

/* encabezado de página (título + botones) */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.page-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
}

.page-title-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---- BOTONES GENERALES ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 24px;
  margin-right: 8px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--bg-card-soft);
  color: var(--text-main);
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    opacity var(--transition-fast);
}

.btn-table {
  padding: 6px 12px;
  font-size: 12px;
  margin-right: 0;
}

.btn-icon {
  padding: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
}

/* Botón fantasma oscuro */
.btn-ghost {
  background: var(--bg-card-soft);
  border-color: var(--border-soft);
}

.btn-ghost:hover {
  background: #22262d;
}

/* PRIMARIO – verde */
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0f2018;
}

.btn-primary:hover {
  background: #8df2bc;
  transform: translateY(-1px);
}

/* SECUNDARIO – gris oscuro */
.btn-secondary {
  background: #181b1f;
  border-color: var(--border-soft);
}

.usuarios-actions-cell {
  text-align: center;
}
.usuarios-reset-btn {
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.2;
}

.btn-secondary:hover {
  background: #22262d;
  transform: translateY(-1px);
}

/* TERCIARIO – texto solo (para cancel o enlaces) */
.btn-tertiary {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
  text-decoration: underline;
  padding-inline: 0;
}

.btn-tertiary:hover {
  color: #ffffff;
  transform: none;
}

/* DANGER – rojo */
.btn-danger {
  background: #b14848;
  border-color: #b14848;
  color: #ffffff;
}

.btn-danger:hover {
  background: #c75a5a;
  transform: translateY(-1px);
}

/* Disabled genérico */
.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

/* card tabla */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-soft);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.card .card-body {
  padding: 18px;
}

.card--overflow-visible {
  overflow: visible;
}

.card--overflow-visible .card-header {
  position: relative;
  z-index: 2;
}

.planning-frame {
  width: 100%;
  height: 80vh;
  border: none;
}
.card--bare {
  background: transparent;
  border: none;
  box-shadow: none;
}

.card-body--bare {
  padding: 0;
}

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

.card-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.select {
  position: relative;
  min-width: 180px;
}

.select button {
  width: 100%;
  padding: 7px 32px 7px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.select .fa-chevron-down {
  font-size: 11px;
  opacity: 0.6;
}

.badge-filter {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid #272b33;
}

.card-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* buscador */
.search-input {
  position: relative;
  min-width: 220px;
}

.search-input input {
  width: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  padding: 7px 10px 7px 30px;
  color: var(--text-main);
  font-size: 13px;
}

.search-input input::placeholder {
  color: var(--text-muted);
}

.search-input i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--text-muted);
}

/* tabla */
.table-wrapper {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 720px;
}

thead {
  background: var(--bg-card);
}

th,
td {
  text-align: left;
  padding: 6px 20px;
  border-bottom: 0;
  white-space: nowrap;
  height: 50px;
}

th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  font-weight: 500;
}

tbody tr {
  transition: background var(--transition-fast),
    transform var(--transition-fast);
  cursor: pointer;
}

tbody tr:hover {
  background: var(--border-soft);
  transform: translateY(-1px);
}

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

.cell-ref {
  font-weight: 500;
  color: var(--text-main);
}

.cell-name-link {
  color: var(--accent);
  cursor: pointer;
}

.cell-name-link:hover {
  text-decoration: underline;
}

.cell-price {
  font-weight: 600;
}

.cell-time {
  color: var(--text-muted);
}

.picture-thumb {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #1f2329;
  border: 1px solid #272b33;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
}

.picture-img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #272b33;
}

.table-footer {
  padding: 10px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border-top: 1px solid var(--border-soft);
  font-size: 12px;
  color: var(--text-muted);
}

.table-pager {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pager-btn {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--bg-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  color: var(--text-muted);
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}

.pager-btn:hover {
  background: var(--bg-main);
  color: #ffffff;
}

.table-pager {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* contenedor de las páginas */
.pager-pages {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

/* botoncito de página 1, 2, 3... */
.pager-page {
  min-width: 28px;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  text-align: center;
  cursor: pointer;
  color: var(--text-muted);
  background: transparent;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.pager-page:hover {
  border-color: var(--border-soft);
  background: #181b1f;
  color: #ffffff;
  transform: translateY(-1px);
}

/* página actual */
.pager-page--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0f2018;
  font-weight: 600;
  cursor: default;
  transform: none;
}

/* los "..." */
.pager-ellipsis {
  padding: 0 4px;
  color: var(--text-muted);
}

.brand-footer {
  position: absolute;
  z-index: 5;
  right: 24px;
  bottom: 24px;
  font-size: 11px;
  opacity: 0.65;
}

.app-brand-footer {
  position: fixed;
  right: 24px;
  bottom: 24px;
  font-size: 11px;
  opacity: 0.65;
  z-index: 5;
}

.brand-login-footer {
  margin-top: 56px;
  margin-bottom: -20px;
  font-size: 11px;
  opacity: 0.65;
}

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

  .page-actions {
    align-self: stretch;
    justify-content: flex-end;
  }

  .card-header {
    flex-direction: column;
    align-items: stretch;
  }

  .card-header-right {
    width: 100%;
    justify-content: space-between;
  }
}

/* ========= MODAL SUBIDA DE FICHEROS ========= */

.upload-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none; /* se muestra con .is-open */
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.upload-modal-backdrop.is-open {
  display: flex;
}

.upload-modal {
  position: relative;
  width: min(720px, calc(100% - 48px));
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-soft);
  padding: var(--space-xl) 40px 40px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.9);
}

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

.upload-modal-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.upload-modal-link {
  color: #4aa5ff;
  text-decoration: underline;
}

.upload-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.upload-modal-close--lg {
  width: 44px;
  height: 44px;
  font-size: 24px;
}

.upload-modal-close:hover {
  color: #ffffff;
  transform: scale(1.05);
}

.modal-no-padding .upload-modal-close {
  z-index: 5;
  background: rgba(0, 0, 0, 0.35);
}

.modal-no-padding .upload-modal-close:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* Dropzone */

.upload-dropzone {
  border-radius: var(--radius-card);
  border: 1px dashed #4b4b4b;
  padding: 48px 24px 40px;
  background: var(--bg-card-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.upload-dropzone-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-pill);
  background: #181b1f;
  border: 2px solid #3b3b3b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #ffffff;
}

.upload-dropzone-btn {
  margin-top: 8px;
  padding: 10px 40px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--accent-cta);
  color: #04110a;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.upload-dropzone-btn:hover {
  background: var(--accent-cta);
  transform: translateY(-2px);
}

.upload-dropzone-help {
  font-size: 14px;
  color: var(--text-main);
}

.upload-input-hidden {
  display: none;
}

@media (max-width: 600px) {
  .upload-modal {
    padding: 24px 20px 32px;
  }

  .upload-modal-title {
    font-size: 24px;
  }

  .upload-dropzone {
    padding: 32px 16px 28px;
  }
}

/* ========== MODAL NEW / EDIT SPARE PART ========== */

.spare-modal-backdrop {
  position: fixed;
  inset: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none; /* se activa con .is-open */
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.spare-modal-backdrop.is-open {
  display: flex;
}

.spare-modal {
  position: relative;
  width: min(960px, calc(100% - 48px));
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: var(--space-xl) 40px 40px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.9);
  border: 1px solid var(--border-soft);
}

.spare-modal-title {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 32px;
}

.spare-edit-modal .spare-modal-title {
  margin-bottom: 16px;
}

.order-detail-modal {
  max-width: 1100px;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-lg) 32px 32px;
}

.spare-modal--wide {
  width: min(1100px, 98vw);
  max-height: 92vh;
}

.modal-no-padding {
  padding: 0 !important;
}

.order-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 16px;
  padding-right: 48px;
  flex-wrap: wrap;
}

.order-detail-header-info .spare-modal-title {
  margin-bottom: 8px;
}

.order-detail-created {
  font-size: 14px;
  color: var(--text-muted);
}

.order-detail-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.detail-card {
  background: var(--bg-main);
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  padding: 16px;
}

.detail-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.detail-card p {
  font-size: 18px;
  font-weight: 600;
}

.order-status-select {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.order-status-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.order-status-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-main);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
}

.order-status-trigger select {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.order-status-trigger select:focus {
  outline: none;
}

.order-status-trigger.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-badge--pending {
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
}

.status-badge--processing {
  background: rgba(0, 123, 255, 0.15);
  color: #4da3ff;
}

.status-badge--in-transit {
  background: rgba(0, 210, 181, 0.15);
  color: #34d5c3;
}

.status-badge--delivered {
  background: rgba(40, 167, 69, 0.15);
  color: #6fda4f;
}

.status-badge--cancelled {
  background: rgba(231, 76, 60, 0.15);
  color: #ff6b6b;
}

.order-progress-card {
  background: var(--bg-main);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-soft);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-progress-header h3 {
  font-size: 20px;
  margin-bottom: 4px;
}

.order-progress-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.order-progress-scroll {
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.order-progress-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-progress-item {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  padding: 12px 16px;
}

.order-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  gap: 12px;
}

.order-progress-head strong {
  font-size: 14px;
}

.order-progress-head span {
  font-size: 12px;
  color: var(--text-muted);
}

.order-progress-empty {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  padding: 24px 12px;
}

.order-progress-form {
  border-top: 1px solid var(--border-soft);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-progress-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.order-progress-meta strong {
  color: var(--text-main);
}

.order-progress-fields {
  display: flex;
  flex-direction: column;
}

.order-progress-fields textarea {
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  color: var(--text-main);
  padding: 10px 12px;
  font-size: 14px;
  min-height: 80px;
  resize: vertical;
}

.order-progress-form button {
  align-self: flex-end;
}

/* Layout del formulario */

.spare-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.spare-edit-fields .spare-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}

.spare-edit-modal .spare-edit-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.spare-edit-preview-panel {
  flex: 0 0 320px;
}

.spare-edit-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.spare-edit-thumb {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  min-height: 100px;
}

.spare-edit-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  border: 1px dashed var(--border-soft);
  border-radius: 12px;
  min-height: 100px;
}

.spare-edit-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.spare-edit-thumb-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  cursor: pointer;
}

.spare-edit-thumb-remove:hover {
  background: rgba(0, 0, 0, 0.9);
}

.spare-gallery-add-btn {
  width: 100%;
  margin-top: 12px;
}

.spare-edit-new-gallery {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.spare-picture-readonly {
  cursor: default;
  pointer-events: none;
}

.spare-edit-form {
  flex: 1;
}

.spare-form-row {
  display: flex;
  gap: 24px;
}

.spare-edit-fields .spare-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.spare-edit-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
}

.spare-form-row-file {
  margin-top: 8px;
}

.spare-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spare-field label {
  font-size: 14px;
}

.spare-field input {
  border-radius: var(--radius-input);
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  background: var(--bg-main);
  color: var(--text-muted);
  font-size: 14px;
}

.spare-field textarea {
  border-radius: var(--radius-input);
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  background: var(--bg-main);
  color: var(--text-muted);
  font-size: 14px;
  min-height: 96px;
  resize: vertical;
}

.spare-field input::placeholder {
  color: #b0b0b0;
}

.spare-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.spare-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

/* File row (alta) */

.spare-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spare-file-name {
  font-size: 14px;
  color: var(--text-main);
}

.spare-file-clear {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  display: none; /* se muestra cuando hay archivo */
  align-items: center;
  justify-content: center;
}

.spare-file-clear:hover {
  color: #ffffff;
}

.spare-file-help {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

/* acciones alta */

.spare-form-actions {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft); /* línea separadora */
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.spare-submit-btn {
  min-width: 140px;  /* mismo ancho que Save/Cancel */
}

.spare-edit-buyer-cta {
  display: none;
  justify-content: flex-end;
  flex: 1;
}

.spare-edit-buyer-cta .btn {
  margin-left: auto;
}

.spare-readonly input {
  background: #1a1a1a;
  border-color: #2b2b2b;
  color: var(--text-main);
  cursor: default;
}

.buy-modal {
  max-width: 520px;
}

.buy-quantity-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0 24px;
}

.buy-quantity-input input {
  border-radius: var(--radius-input);
  border: 1px solid var(--border-soft);
  background: var(--bg-main);
  color: var(--text-main);
  padding: 10px 12px;
  font-size: 14px;
}

.buy-confirm-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 16px 0 24px;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.upload-progress{
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 200px;
  color: var(--text-muted);
  font-size: 13px;
}
.upload-progress__bar{
  position: relative;
  flex: 1;
  height: 8px;
  background: #1d1d1d;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
}
.upload-progress__bar span{
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #00d8a0, #00a67a);
  border-radius: 999px;
  transition: width 0.15s ease-out;
}
.upload-progress__text{
  min-width: 42px;
  text-align: right;
}

.file-current{
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.file-current a{
  color: #00d8a0;
  text-decoration: underline;
}
.btn-ghost{
  background: transparent;
  border: 1px dashed var(--border-soft);
  color: var(--text-main);
}

/* responsive */

@media (max-width: 800px) {
  .spare-modal {
    padding: 24px 20px 32px;
  }

  .spare-modal-title {
    font-size: 24px;
  }

  .spare-form-row {
    flex-direction: column;
  }

  .spare-edit-modal .spare-edit-layout {
    flex-direction: column;
  }

  .spare-edit-preview-panel {
    width: 100%;
  }

  .spare-edit-fields .spare-form-row {
    grid-template-columns: 1fr;
  }
}

/* ========== LOGIN PAGE ========== */

.login-body {
  position: relative;
  overflow: hidden;
  background: #0f1624;
  color: var(--text-main);
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.login-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5);
}

.login-wrapper {
  width: 100%;
  max-width: 520px;
  padding: var(--space-lg);
  position: relative;
  z-index: 1;
}
.login-lang {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}
.login-lang__select {
  background: rgba(31, 41, 51, 0.92);
  color: #e5e7eb;
  border: 1px solid #374151;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  width: 160px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #7ae0a9 50%), linear-gradient(135deg, #7ae0a9 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 11px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 28px;
}

.login-card {
  background: rgba(40, 40, 40, 0.82);
  border-radius: var(--radius-card);
  padding: 32px 28px 0px;
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-soft);
  backdrop-filter: blur(4px);
}

.login-logo img {
  height: 60px;
  width: auto;
  display: block;
  margin: 0 auto;
  margin-bottom: 56px;
}

.login-alt-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin: 10px 0 10px;
}

.login-azure-btn {
  width: 100%;
  margin: 0 auto;
  display: block;
  padding-top: 13px;
  padding-bottom: 13px;
}

.login-separator-line {
  border: 0;
  border-top: 1px solid var(--border-soft);
  margin: 20px 0 6px;
}

.login-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.login-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.login-links a:hover {
  color: var(--text-main);
  text-decoration: underline;
}

.login-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-field input {
  border-radius: var(--radius-input);
  padding: 13px 12px;
  border: 1px solid var(--border-soft);
  background: var(--bg-main);
  color: var(--text-muted);
  font-size: 14px;
}

.login-field input::placeholder {
  color: #eeeeee;
}

.login-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.login-submit {
  width: 100%;
  margin: 8px auto 0;
  text-align: center;
  padding-top: 13px;
  padding-bottom: 13px;
}

.login-error {
  min-height: 18px;
  font-size: 13px;
  color: var(--danger);
  margin-top: 4px;
}

/* SELECT GENÉRICO (filtro categoría) */

.select-menu {
  position: absolute;
  top: 110%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 6px 0;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.6);
  display: none;
  z-index: 10;
}

.select-menu.open {
  display: block;
}

.select-menu-item {
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
}

.select-menu-item:hover {
  background: var(--border-soft);
}

/* ==== EDIT SPARE PART MODAL – CTA ROW ==== */

.spare-edit-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

.spare-edit-cta-row {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.spare-save-cancel-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.spare-save-btn,
.spare-cancel-btn {
  min-width: 140px;
}

/* Delete de edición como botón terciario en rojo */
.spare-delete-link.btn-tertiary {
  color: var(--danger);
}

.spare-delete-link.btn-tertiary:hover {
  color: #ff8787;
}

/* ==== PICTURE PREVIEW (modal edición) ==== */

.spare-picture-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spare-picture-preview {
  width: 84px;
  height: 84px;
  border-radius: 12px;
  background: var(--bg-card-soft);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.spare-picture-preview:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  transform: translateY(-1px);
}

.spare-picture-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none; /* se muestra solo si hay imagen */
}

.spare-picture-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.spare-picture-placeholder i {
  font-size: 20px;
  opacity: 0.7;
}

/* ==== CONFIRM DELETE MODAL ==== */

.confirm-modal {
  max-width: 360px;
}

.confirm-title {
  font-size: 18px;
  margin-bottom: 8px;
}

.confirm-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.confirm-input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--bg-card-soft);
  color: var(--text-main);
  padding: 8px 10px;
  font-size: 14px;
  margin-bottom: 16px;
}

.confirm-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.confirm-cta-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ---------- Campos de formulario (inputs + selects) ---------- */

input.spare-input,
select.spare-input {
  width: 100%;
  box-sizing: border-box;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-input);
  border: 1px solid var(--border-soft);
  background-color: var(--bg-card-soft);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.6;
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

/* efecto hover/focus común */
input.spare-input:hover,
select.spare-input:hover {
  border-color: var(--accent);
}

input.spare-input:focus,
select.spare-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(122, 224, 169, 0.35);
}

/* ---------- Ajustes específicos para SELECT ---------- */

select.spare-input {
  /* quitar aspecto nativo y poner nuestra flecha */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  padding-right: calc(var(--space-md) * 2);

  background-image: url("data:image/svg+xml;utf8,<svg fill='%23666666' xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right var(--space-md) center;
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding: 0;
  background: transparent;
  border: none;
}
.news-grid.academy-timeline{
  display: block;
  padding: 0 0 10px 0;
}
.news-grid.academy-timeline .timeline{
  margin-left: 0;
}
.academy-intro{
  margin: 16px 0 28px 0;
  padding: 0 2px;
}

.academy-body{
  display: block;
}
.academy-main{
  flex: 1;
  min-width: 0;
}
.news-create-card {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  min-height: 260px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.news-card--home {
  min-height: 0;
}

.news-card-thumb {
  width: 100%;
  height: 170px;
  background: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
}

.news-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card-thumb--placeholder {
  color: var(--text-muted);
  font-size: 32px;
}

.news-card__body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.news-card__body h3 {
  margin: 0;
  font-size: 18px;
}

.news-card__body h4 {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
}

.news-card__body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.news-card__date {
  font-size: 12px;
  color: var(--text-muted);
}

.timeline{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-left: 50px;
}
.timeline::before{
  content:'';
  position:absolute;
  top:0;
  bottom:0;
  left:0;
  width:2px;
  background: linear-gradient(180deg, rgba(0,216,160,0.08), rgba(0,216,160,0.35));
}
.timeline-item{
  position: relative;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 16px;
  padding: 16px 18px;
  width: 100%;
  max-width: 1000px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
  cursor: pointer;
  overflow: visible;
}
.timeline-item.dragging{
  opacity: 0.6;
  border-style: dashed;
}
.timeline-item:hover{
  border-color: rgba(0,216,160,0.35);
}
.timeline-item--create{
  grid-template-columns: 1fr;
  cursor: pointer;
}
.timeline-dot{
  position: absolute;
  left: -57px;
  top: 16px;
  width: 14px;
  height: 14px;
  background: #00d8a0;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(0,216,160,0.12);
  border: 1px solid rgba(0,0,0,0.35);
}
.timeline-dot--create{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #131313;
  background: #00d8a0;
  box-shadow: 0 0 0 6px rgba(0,216,160,0.14);
}
.timeline-line{
  display: none;
}
.timeline-content{
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #d6d6d6;
  position: relative;
}
.timeline-meta{
  display: flex;
  align-items: center;
  gap: 10px;
  color: #9ea0a6;
  font-size: 13px;
  font-weight: 600;
}
.timeline-order{
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(0,216,160,0.12);
  color: #00d8a0;
  font-weight: 800;
  position: relative;
  left: 0;
}
.timeline-lang{
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,0.04);
}
.timeline-actions{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.timeline-content h3{
  color: #e0e0e0;
  padding-left: 32px;
}
.timeline-content p{
  color: #bfc2c7;
  padding-left: 32px;
}
.timeline-badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #d0d0d0;
}
.timeline-item--watched .timeline-badge{
  background: rgba(0,216,160,0.16);
  color: #00d8a0;
  border-color: rgba(0,216,160,0.4);
}
.timeline-check{
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #00d8a0;
  color: #0f0f0f;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 8px 20px rgba(0,216,160,0.2);
  z-index: 3;
}
.timeline-item--watched .timeline-check{
  display: flex;
}
.timeline-thumb{
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #0f0f0f;
  border: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
}
.timeline-thumb img,
.timeline-thumb .timeline-video,
.timeline-thumb .timeline-cover{
  position: relative;
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}
.timeline-thumb .timeline-video{
  display: none;
  background: #000;
}
.timeline-thumb.playing .timeline-video{
  display: block;
}
.timeline-thumb.playing .timeline-cover{
  display: none;
}
.timeline-play{
  display: none;
}
.timeline-edit{
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 10px;
}
.timeline-move-group{
  position: absolute;
  top: 10px;
  right: -60px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.timeline-move{
  background: rgba(0,0,0,0.25);
  border: 1px dashed var(--border-soft);
  color: #e0e0e0;
  padding: 6px 9px;
  border-radius: 8px;
  cursor: pointer;
}

.news-create-card {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  border: 1px dashed var(--border-soft);
  background: var(--bg-main);
  color: var(--text-muted);
}

.news-create-card:hover {
  border-color: var(--accent);
  color: #fff;
}

.news-create-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px dashed var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto;
}

.news-empty {
  border: 1px dashed var(--border-soft);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.news-modal .spare-modal-title {
  margin-bottom: 12px;
}

.news-editor-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-main);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
}

.news-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.news-picture-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-picture-input img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  display: none;
}

.news-picture-input img.is-visible {
  display: block;
}

.news-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.news-view-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.news-view-header span {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
}

.news-view-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.news-view-actions .btn {
  min-height: 36px;
}

.news-view-modal {
  max-width: 760px;
}

.news-view-body img {
  width: min(100%, 600px);
  border-radius: 12px;
  margin: 0 auto 16px;
  display: block;
}

.news-view-body p {
  white-space: pre-wrap;
  line-height: 1.6;
}

.news-view-body {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 8px;
}

.news-view-meta {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.home-news-section {
  margin: 24px 0;
}

.home-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0 32px;
}

.home-widget-card {
  border-radius: 16px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.home-widget-card h4 {
  margin-bottom: 12px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.home-widget-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-widget-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-muted);
  padding: 4px 0;
}

.home-widget-row strong {
  color: var(--text-main);
}

.home-widget-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
}

/* Home roadmap */
.home-roadmap {
  display: grid;
  gap: 18px;
}
.home-roadmap__hero {
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0,216,160,0.16), rgba(13,148,136,0.08));
  padding: 22px 24px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.home-roadmap__hero h1 {
  margin: 0;
  font-size: 22px;
}
.home-roadmap__hero p {
  margin: 4px 0 0;
  color: var(--text-soft);
}
.home-roadmap__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--text-soft);
  margin: 0 0 4px;
}
.home-roadmap__lede {
  max-width: 720px;
}
.home-roadmap__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(122,224,169,0.6);
  color: #7ae0a9;
  background: rgba(122,224,169,0.08);
  font-weight: 700;
}
.home-roadmap__grid {
  display: grid;
  grid-template-columns: 1fr;
}
.home-steps {
  position: relative;
  padding-left: 28px;
  display: grid;
  gap: 12px;
}
.home-steps::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #7ae0a9, rgba(122,224,169,0.1));
  border-radius: 999px;
}
.home-step {
  position: relative;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--bg-card);
  box-shadow: 0 5px 12px rgba(0,0,0,0.25);
  padding: 14px;
  display: grid;
  gap: 8px;
}
.home-step__bullet {
  position: absolute;
  left: -28px;
  top: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-main);
  border: 2px solid #7ae0a9;
  color: #7ae0a9;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 3px rgba(122,224,169,0.1);
}
.home-step__bullet.is-checked {
  background: #7ae0a9;
  color: #0b1f1a;
}
.home-step__content h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.home-step__content p {
  margin: 2px 0 8px;
  color: var(--text-soft);
}
.home-step__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.home-link {
  color: var(--text-main);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.home-check {
  border: 1px solid var(--border-soft);
  background: var(--bg-main);
  color: var(--text-soft);
  border-radius: 999px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all .2s ease;
}
.home-check.is-checked {
  border-color: #7ae0a9;
  color: #7ae0a9;
  background: rgba(122,224,169,0.08);
}

.home-news-header {
  margin-bottom: 12px;
}

.text-muted {
  color: var(--text-muted);
}

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

.detail-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  display: block;
}

.detail-value {
  font-size: 15px;
  color: var(--text-main);
}

.detail-block {
  margin-top: 12px;
}

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

.card--wide {
  grid-column: 1 / -1;
}

.card-grid.info-cards .card,
.team-section .team-card {
  padding: 18px;
}

.detail-value {
  font-size: 16px;
}

#projectDescription {
  font-size: 14px;
  line-height: 1.4;
}

.team-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.team-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-grid.info-cards .card .card-body,
.team-section .team-card {
  padding: 18px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  color: #ffffff;
}

.status-pill.status-ok {
  background: #2e7d32;
}

.status-pill.status-warning {
  background: #c79311;
}

.status-pill.status-danger {
  background: #c62828;
}

.team-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.team-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 18px;
  background: var(--bg-card);
  width: 246px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.25);
}

.team-card-header {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.team-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-main);
  color: var(--text-muted);
}

.team-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card-name {
  font-weight: 600;
}

.team-card-company {
  font-size: 13px;
  color: var(--text-muted);
}

.team-card-body {
  font-size: 13px;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(246px, 1fr));
  gap: 12px;
}
.trend-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  font-size: 11px;
  border-radius: var(--radius-pill);
  background: rgba(122, 224, 169, 0.2);
  color: var(--accent);
  margin-left: 6px;
}

.trend-badge--new {
  background: rgba(122, 224, 169, 0.2);
  color: var(--accent);
}

.trend-badge--updated {
  background: rgba(1, 48, 136, 0.2);
  color: #8db1ff;
}
.documents-actions {
  display: flex;
  gap: 12px;
}

.documents-breadcrumb-row {
  display: flex;
  align-items: center;
  padding: 12px 16px 0;
  margin-bottom: 16px;
  gap: 12px;
}

.documents-breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.documents-back-row {
  padding: 0 16px 12px;
}

.breadcrumb-btn {
  background: transparent;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
}

.breadcrumb-btn:disabled {
  color: var(--text-muted);
  cursor: default;
}

.documents-folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  padding: 0 16px 12px;
}

.documents-table-title {
  padding: 0 16px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.folder-card {
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 16px;
  background: var(--bg-card);
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: transform var(--transition-fast);
  position: relative;
}

.folder-card:hover {
  transform: translateY(-2px);
}

.folder-card__icon {
  font-size: 28px;
  color: var(--accent);
}

.folder-card__body {
  display: flex;
  flex-direction: column;
}

.folder-card__rename {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  color: #4a5a73;
  padding: 6px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, color 0.12s ease;
}

.folder-card__rename:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #1f2a3c;
}

.documents-empty {
  border: 1px dashed var(--border-soft);
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.documents-modal-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.documents-modal-actions .btn {
  min-width: 100px;
}

.documents-table thead th {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
}

.documents-table td {
  vertical-align: middle;
}

.documents-table .doc-icon {
  font-size: 18px;
  text-align: center;
}

/* Equipo: grid sin scroll y tarjetas mínimas */
body[data-page="equipo"] .cards-grid{
  display:grid;
  gap:1rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
body[data-page="equipo"] .person-card{
  min-width:190px;
}

/* Scrollbars oscuros y discretos */
* {
  scrollbar-width: thin;
  scrollbar-color: #444 var(--bg-card);
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-track {
  background: var(--bg-card);
}
*::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 8px;
}
*::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.last-run-info{
  color: var(--text-muted);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 0.5rem;
}

/* Equipo (timetrack) */
body[data-page="equipo"] :root{
body[data-page="equipo"]   --c-bg:#1f1f1f;
body[data-page="equipo"]   --c-card:#2a2a2a;
body[data-page="equipo"]   --c-card-2:#232323;
body[data-page="equipo"]   --c-fg:#e0e0e0;
body[data-page="equipo"]   --c-muted:#bdbdbd;
body[data-page="equipo"]   --c-sub:#999;
body[data-page="equipo"]   --c-brand:#00d8a0;
body[data-page="equipo"]   --c-warn:#DFA902;
body[data-page="equipo"]   --c-red:#ff4d4d;
body[data-page="equipo"] }

body[data-page="equipo"] *{box-sizing:border-box;}

body[data-page="equipo"] body{
body[data-page="equipo"]   font-family:'Lato',sans-serif;
body[data-page="equipo"]   background:var(--bg-main);
body[data-page="equipo"]   color:var(--text-main);
body[data-page="equipo"]   margin:0;
body[data-page="equipo"] }

body[data-page="equipo"] /* ===== HEADER ===== */
body[data-page="equipo"] header{
body[data-page="equipo"]   background:#111;
body[data-page="equipo"]   padding:0.8rem 1.5rem;
body[data-page="equipo"]   display:flex;
body[data-page="equipo"]   align-items:center;
body[data-page="equipo"]   justify-content:space-between;
body[data-page="equipo"]   font-family:'Montserrat',sans-serif;
body[data-page="equipo"] }
body[data-page="equipo"] header .logo img{height:36px;}
body[data-page="equipo"] header nav{display:flex;gap:2rem;}
body[data-page="equipo"] header a{
body[data-page="equipo"]   color:var(--accent);
body[data-page="equipo"]   text-decoration:none;
body[data-page="equipo"]   font-weight:600;
body[data-page="equipo"]   font-size:1rem;
body[data-page="equipo"]   padding-bottom:0.3rem;
body[data-page="equipo"]   border-bottom:3px solid transparent;
body[data-page="equipo"]   transition:all 0.2s;
body[data-page="equipo"] }
body[data-page="equipo"] header a:hover{color:var(--accent-cta);}
body[data-page="equipo"] header a.active{
body[data-page="equipo"]   color:var(--accent);
body[data-page="equipo"]   font-weight:700;
body[data-page="equipo"]   border-bottom:3px solid var(--accent);
body[data-page="equipo"] }

body[data-page="equipo"] /* ===== TOP SUMMARY ===== */
body[data-page="equipo"] .top-summary.grid4{
body[data-page="equipo"]   margin: 0 2rem 1rem;
body[data-page="equipo"]   background: var(--bg-card);
body[data-page="equipo"]   border-radius: 14px;
body[data-page="equipo"]   padding: 0.6rem 1rem;
body[data-page="equipo"]   box-shadow: 0 2px 10px rgba(0,0,0,.5);
body[data-page="equipo"]   display: grid;
body[data-page="equipo"]   grid-template-columns: repeat(6, minmax(0,1fr));
body[data-page="equipo"]   gap: 1rem;
body[data-page="equipo"]   align-items: stretch;
body[data-page="equipo"] }
body[data-page="equipo"] .metric{
body[data-page="equipo"]   background:var(--bg-card-soft);
body[data-page="equipo"]   border:1px solid rgba(255,255,255,.08);
body[data-page="equipo"]   border-radius:12px;
body[data-page="equipo"]   padding:0.75rem;
body[data-page="equipo"]   display:flex;
body[data-page="equipo"]   flex-direction:column;
body[data-page="equipo"]   justify-content:center;
body[data-page="equipo"]   box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
body[data-page="equipo"]   min-height:120px;
body[data-page="equipo"] }
body[data-page="equipo"] .metric .label{color:var(--text-muted);font-size:.85rem;margin-bottom:.25rem;}
body[data-page="equipo"] .metric .value{color:#fff;font-weight:800;font-size:1.3rem;}
body[data-page="equipo"] .metric .sub{color:var(--text-muted);font-size:.8rem;margin-top:.2rem;}

body[data-page="equipo"] .chart-card{
body[data-page="equipo"]   background:var(--bg-card-soft);
body[data-page="equipo"]   border:1px solid rgba(255,255,255,.08);
body[data-page="equipo"]   border-radius:12px;
body[data-page="equipo"]   padding:0.75rem;
body[data-page="equipo"]   flex:1;
body[data-page="equipo"]   display:flex;
body[data-page="equipo"]   flex-direction:column;
body[data-page="equipo"]   justify-content:space-between;
body[data-page="equipo"]   box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
body[data-page="equipo"]   min-height:120px;
body[data-page="equipo"] }
body[data-page="equipo"] .chart-title{
body[data-page="equipo"]   color:var(--text-muted);
body[data-page="equipo"]   font-size:.9rem;
body[data-page="equipo"]   text-align:center;
body[data-page="equipo"]   margin-bottom:.5rem;
body[data-page="equipo"] }
body[data-page="equipo"] #globalDonut,#globalTrend{
body[data-page="equipo"]   width:100%;
body[data-page="equipo"]   max-height:75px;
body[data-page="equipo"]   display:block;
body[data-page="equipo"]   margin:auto;
body[data-page="equipo"] }

@media (max-width:1100px){
body[data-page="equipo"]   .top-summary.grid4{grid-template-columns:repeat(3,minmax(0,1fr));}
body[data-page="equipo"] }
@media (max-width:700px){
body[data-page="equipo"]   .top-summary.grid4{grid-template-columns:1fr;}
body[data-page="equipo"]   #globalDonut,#globalTrend{max-height:70px;}
body[data-page="equipo"] }

body[data-page="equipo"] /* ===== GRID DE PERSONAS ===== */
body[data-page="equipo"] .section-list{
body[data-page="equipo"]   padding:0 2rem 2rem;
body[data-page="equipo"] }
body[data-page="equipo"] .team-list{
body[data-page="equipo"]   display:flex;
body[data-page="equipo"]   flex-direction:column;
body[data-page="equipo"]   gap:1.4rem;
body[data-page="equipo"] }
body[data-page="equipo"] .team-block{
body[data-page="equipo"]   display:flex;
body[data-page="equipo"]   flex-direction:column;
body[data-page="equipo"]   gap:0.55rem;
body[data-page="equipo"] }
body[data-page="equipo"] .team-title{
body[data-page="equipo"]   margin:0;
body[data-page="equipo"]   font-family:'Montserrat',sans-serif;
body[data-page="equipo"]   font-weight:700;
body[data-page="equipo"]   letter-spacing:.02em;
body[data-page="equipo"]   font-size:1rem;
body[data-page="equipo"]   color:var(--text-muted);
body[data-page="equipo"]   display:flex;
body[data-page="equipo"]   align-items:center;
body[data-page="equipo"]   gap:0.5rem;
body[data-page="equipo"]   text-transform:uppercase;
body[data-page="equipo"] }
body[data-page="equipo"] .team-title::after{
body[data-page="equipo"]   content:'';
body[data-page="equipo"]   flex:1;
body[data-page="equipo"]   height:1px;
body[data-page="equipo"]   background:rgba(255,255,255,.08);
body[data-page="equipo"] }
body[data-page="equipo"] .cards-grid{
body[data-page="equipo"]   display:grid;
body[data-page="equipo"]   gap:1rem;
body[data-page="equipo"]   grid-template-columns: 1fr;
body[data-page="equipo"] }
@media (min-width:520px){.cards-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }}
@media (min-width:768px){.cards-grid{ grid-template-columns: repeat(4, minmax(0,1fr)); }}
@media (min-width:992px){.cards-grid{ grid-template-columns: repeat(4, minmax(0,1fr)); }}
@media (min-width:1200px){.cards-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }}
@media (min-width:1350px){.cards-grid{ grid-template-columns: repeat(4, minmax(0,1fr)); }}
@media (min-width:1500px){.cards-grid{ grid-template-columns: repeat(5, minmax(0,1fr)); }}
@media (min-width:1600px){.cards-grid{ grid-template-columns: repeat(6, minmax(0,1fr)); }}

body[data-page="equipo"] /* Tarjeta de persona */
body[data-page="equipo"] .person-card{
body[data-page="equipo"]   background: var(--bg-card);
body[data-page="equipo"]   border: 1px solid rgba(255,255,255,.08);
body[data-page="equipo"]   border-radius: 14px;
body[data-page="equipo"]   padding: 0.55rem;
body[data-page="equipo"]   box-shadow: 0 2px 10px rgba(0,0,0,.5);
body[data-page="equipo"]   display: grid;
body[data-page="equipo"]   grid-template-rows: auto 120px auto;  /* título / donut (120px) / números  */
body[data-page="equipo"]   gap: 0.2rem;
body[data-page="equipo"]   min-height: 230px;
body[data-page="equipo"]   overflow: hidden;
body[data-page="equipo"]   cursor:pointer;
body[data-page="equipo"]   transition: all .2s ease;
body[data-page="equipo"] }

body[data-page="equipo"] .person-card:hover{
body[data-page="equipo"]   transform: translateY(-2px);
body[data-page="equipo"]   box-shadow: 0 6px 18px rgba(0,0,0,.7);
body[data-page="equipo"]   border-color: var(--accent); /* borde verde al pasar */
body[data-page="equipo"] }
body[data-page="equipo"] .person-card .chart-wrap{
body[data-page="equipo"]   position: relative;
body[data-page="equipo"]   display: flex;
body[data-page="equipo"]   align-items: center;
body[data-page="equipo"]   justify-content: center;
body[data-page="equipo"]   height: 120px;
body[data-page="equipo"]   width: 100%;
body[data-page="equipo"] }
body[data-page="equipo"] .person-card canvas{
body[data-page="equipo"]   display: block;
body[data-page="equipo"]   width: 100% !important;
body[data-page="equipo"]   max-width: 120px;
body[data-page="equipo"]   height: 120px !important;
body[data-page="equipo"]   margin: 0 auto;
body[data-page="equipo"] }

body[data-page="equipo"] /* Imagen centrada dentro del donut */
body[data-page="equipo"] .person-card .center-img{
body[data-page="equipo"]   position: absolute;
body[data-page="equipo"]   top: 50%;
body[data-page="equipo"]   left: 50%;
body[data-page="equipo"]   width: 80px;
body[data-page="equipo"]   height: 80px;
body[data-page="equipo"]   transform: translate(-50%, -50%);
body[data-page="equipo"]   border-radius: 50%;
body[data-page="equipo"]   overflow: hidden;
body[data-page="equipo"]   display: flex;
body[data-page="equipo"]   align-items: center;
body[data-page="equipo"]   justify-content: center;
body[data-page="equipo"]   background: #1f1f1f;
body[data-page="equipo"]   pointer-events: none;
body[data-page="equipo"]   z-index: 2;
body[data-page="equipo"] }
body[data-page="equipo"] .person-card .center-img img{
body[data-page="equipo"]   width: 100%;
body[data-page="equipo"]   height: 100%;
body[data-page="equipo"]   object-fit: cover;
body[data-page="equipo"] }
body[data-page="equipo"] .person-card .center-img span{
body[data-page="equipo"]   font-family:'Montserrat',sans-serif;
body[data-page="equipo"]   font-weight:800;
body[data-page="equipo"]   font-size:.8rem;
body[data-page="equipo"]   color:var(--accent);
body[data-page="equipo"] }
body[data-page="equipo"] .person-card .header{
body[data-page="equipo"]   display:flex;
body[data-page="equipo"]   align-items:center;
body[data-page="equipo"]   min-height:30px;
body[data-page="equipo"]   justify-content:space-between;
body[data-page="equipo"]   gap:0.35rem;
body[data-page="equipo"] }
body[data-page="equipo"] .person-card .name-pill{
body[data-page="equipo"]   display:inline-flex;
body[data-page="equipo"]   align-items:center;
body[data-page="equipo"]   font-family:'Montserrat',sans-serif;
body[data-page="equipo"]   font-weight:700;
body[data-page="equipo"]   padding:.3rem .55rem;
body[data-page="equipo"]   border-radius:10px;
body[data-page="equipo"]   font-size:.78rem;
body[data-page="equipo"]   line-height:1.15;
body[data-page="equipo"]   background:var(--bg-card-soft);
body[data-page="equipo"]   color:#fff;
body[data-page="equipo"]   max-width:100%;
body[data-page="equipo"]   white-space:nowrap;
body[data-page="equipo"]   overflow:hidden;
body[data-page="equipo"]   text-overflow:ellipsis;
body[data-page="equipo"] }
body[data-page="equipo"] .person-card .pct-pill{
body[data-page="equipo"]   font-family:'Montserrat',sans-serif;
body[data-page="equipo"]   font-weight:800;
body[data-page="equipo"]   font-size:.82rem;
body[data-page="equipo"]   color:var(--text-muted);
body[data-page="equipo"]   white-space:nowrap;
body[data-page="equipo"] }
body[data-page="equipo"] .person-card .pct-pill.red{color:var(--danger);}
body[data-page="equipo"] .person-card .pct-pill.yellow{color:#f2c94c;}

body[data-page="equipo"] /* Números */
body[data-page="equipo"] .person-card .numbers{
body[data-page="equipo"]   display:grid;
body[data-page="equipo"]   grid-template-columns:repeat(3,1fr);
body[data-page="equipo"]   gap:0.25rem;
body[data-page="equipo"]   text-align:center;
body[data-page="equipo"] }
body[data-page="equipo"] .person-card .numbers.single-row{
body[data-page="equipo"]   grid-template-columns:1fr;
body[data-page="equipo"] }
body[data-page="equipo"] .person-card .numbers.dual-row{
body[data-page="equipo"]   grid-template-columns:repeat(2,1fr);
body[data-page="equipo"] }
body[data-page="equipo"] .person-card .num{
body[data-page="equipo"]   background:var(--bg-card-soft);
body[data-page="equipo"]   border:1px solid rgba(255,255,255,.08);
body[data-page="equipo"]   border-radius:8px;
body[data-page="equipo"]   padding:0.2rem 0.15rem;
body[data-page="equipo"] }
body[data-page="equipo"] .person-card .lbl{
body[data-page="equipo"]   color:var(--text-muted);
body[data-page="equipo"]   font-size:.55rem;
body[data-page="equipo"] }
body[data-page="equipo"] .person-card .val{
body[data-page="equipo"]   font-weight:800;
body[data-page="equipo"]   font-size:.7rem;
body[data-page="equipo"] }
body[data-page="equipo"] .val.red{color:var(--danger);}
body[data-page="equipo"] .val.yellow{color:#f2c94c;}
body[data-page="equipo"] .person-card .planning-row{
body[data-page="equipo"]   margin-top:0.15rem;
body[data-page="equipo"] }

body[data-page="equipo"] /* ===== MODAL WORKLOAD ===== */
body[data-page="equipo"] .modal-backdrop {
body[data-page="equipo"]   position: fixed; inset: 0;
body[data-page="equipo"]   background-color: rgba(0,0,0,0.65);
body[data-page="equipo"]   z-index: 40;
body[data-page="equipo"]   opacity: 0; visibility: hidden;
body[data-page="equipo"]   transition: opacity .3s, visibility .3s;
body[data-page="equipo"] }
body[data-page="equipo"] .modal-backdrop.show {
body[data-page="equipo"]   opacity: 1; visibility: visible;
body[data-page="equipo"] }
body[data-page="equipo"] #task-modal {
body[data-page="equipo"]   position: fixed;
body[data-page="equipo"]   inset: 0;
body[data-page="equipo"]   transform: none;
body[data-page="equipo"]   background-color: var(--c-bg, #1f1f1f);
body[data-page="equipo"]   color:#fff;
body[data-page="equipo"]   padding: 24px;
body[data-page="equipo"]   z-index: 50;
body[data-page="equipo"]   opacity:0; visibility:hidden;
body[data-page="equipo"]   transition: opacity .3s, visibility .3s;
body[data-page="equipo"]   width: 100vw;
body[data-page="equipo"]   height: 100vh;
body[data-page="equipo"]   max-width: 100vw;
body[data-page="equipo"]   max-height: 100vh;
body[data-page="equipo"]   overflow: auto;
body[data-page="equipo"]   border: none;
body[data-page="equipo"]   border-radius: 0;
body[data-page="equipo"]   box-shadow: none;
body[data-page="equipo"]   display: flex;
body[data-page="equipo"]   flex-direction: column;
body[data-page="equipo"] }
body[data-page="equipo"] #task-modal.show { opacity:1; visibility:visible; }
body[data-page="equipo"] .modal-header-wl {
body[data-page="equipo"]   font-size: 1.1rem;
body[data-page="equipo"]   font-weight: 700;
body[data-page="equipo"]   margin-bottom: 8px;
body[data-page="equipo"]   padding-right: 32px;
body[data-page="equipo"] }
body[data-page="equipo"] .close-modal-btn {
body[data-page="equipo"]   position: absolute;
body[data-page="equipo"]   top: 16px;
body[data-page="equipo"]   right: 16px;
body[data-page="equipo"]   background: #2a2a2a;
body[data-page="equipo"]   border: 1px solid rgba(255,255,255,.12);
body[data-page="equipo"]   border-radius: 8px;
body[data-page="equipo"]   color: #fff;
body[data-page="equipo"]   font-size: 1.4rem;
body[data-page="equipo"]   cursor: pointer;
body[data-page="equipo"]   padding: 6px 10px;
body[data-page="equipo"]   line-height: 1;
body[data-page="equipo"]   transition: background .2s, color .2s, border-color .2s;
body[data-page="equipo"] }
body[data-page="equipo"] .close-modal-btn:hover { background:#353535; color: #DFA902; border-color: rgba(255,255,255,.2); }
body[data-page="equipo"] .section-sub {
body[data-page="equipo"]   color:#94a3b8;
body[data-page="equipo"]   font-size:.75rem;
body[data-page="equipo"]   margin-bottom:8px;
body[data-page="equipo"] }

body[data-page="equipo"] /* Tabla modal compacta */
body[data-page="equipo"] #task-modal table {
body[data-page="equipo"]   width: 100%;
body[data-page="equipo"]   border-collapse: collapse;
body[data-page="equipo"]   font-size: 0.7rem;
body[data-page="equipo"]   table-layout: fixed;
body[data-page="equipo"] }
body[data-page="equipo"] #task-modal thead th {
body[data-page="equipo"]   background:#252525;
body[data-page="equipo"]   color:#d0d0d0;
body[data-page="equipo"]   font-weight:700;
body[data-page="equipo"]   padding:6px 8px;
body[data-page="equipo"]   border-bottom:1px solid #383838;
body[data-page="equipo"]   white-space:nowrap;
body[data-page="equipo"] }
body[data-page="equipo"] #task-modal tbody td {
body[data-page="equipo"]   padding:6px 8px;
body[data-page="equipo"]   border-bottom:1px solid #1f1f1f;
body[data-page="equipo"]   vertical-align:top;
body[data-page="equipo"]   word-break: break-word;
body[data-page="equipo"]   white-space: normal;
body[data-page="equipo"] }
body[data-page="equipo"] #task-modal tbody tr:nth-child(odd)  { background:#1a1a1a; }
body[data-page="equipo"] #task-modal tbody tr:nth-child(even) { background:#202020; }
body[data-page="equipo"] #task-modal tbody tr.summary-row {
body[data-page="equipo"]   background:#181818;
body[data-page="equipo"]   font-weight:700;
body[data-page="equipo"] }

body[data-page="equipo"] /* Grilla de días */
body[data-page="equipo"] .weeks-grid {
body[data-page="equipo"]   display:flex;
body[data-page="equipo"]   flex-wrap:wrap;
body[data-page="equipo"]   gap:3px;
body[data-page="equipo"] }
body[data-page="equipo"] .week-sq {
body[data-page="equipo"]   width:20px;
body[data-page="equipo"]   height:20px;
body[data-page="equipo"]   border-radius:4px;
body[data-page="equipo"]   display:inline-flex;
body[data-page="equipo"]   align-items:center;
body[data-page="equipo"]   justify-content:center;
body[data-page="equipo"]   font-size:.55rem;
body[data-page="equipo"]   font-weight:700;
body[data-page="equipo"]   border:1px solid #334155;
body[data-page="equipo"]   user-select:none;
body[data-page="equipo"] }
body[data-page="equipo"] .week-sq.empty {
body[data-page="equipo"]   background:transparent;
body[data-page="equipo"]   color:#9ca3af;
body[data-page="equipo"] }

body[data-page="equipo"] /* badges estado */
body[data-page="equipo"] .badge { display:inline-flex; align-items:center; gap:5px; padding:2px 8px; border-radius:9999px; font-size:.6rem; font-weight:600; white-space:nowrap; }
body[data-page="equipo"] .dot { width:6px; height:6px; border-radius:9999px; display:inline-block; }
body[data-page="equipo"] .estado-abierta   { background:#374151; color:#e5e7eb; }
body[data-page="equipo"] .estado-encurso   { background:#1e3a8a; color:#dbeafe; }
body[data-page="equipo"] .estado-bloqueada { background:#7f1d1d; color:#fee2e2; }
body[data-page="equipo"] .estado-finalizada{ background:#064e3b; color:#d1fae5; }
body[data-page="equipo"] .dot-abierta   { background:#9ca3af; }
body[data-page="equipo"] .dot-encurso   { background:#60a5fa; }
body[data-page="equipo"] .dot-bloqueada { background:#f87171; }
body[data-page="equipo"] .dot-finalizada{ background:#34d399; }

body[data-page="equipo"] /* enlaces Jira en verde marca */
body[data-page="equipo"] a.jira-link {
body[data-page="equipo"]   color: var(--accent);
body[data-page="equipo"]   text-decoration: none;
body[data-page="equipo"]   font-weight: 600;
body[data-page="equipo"] }
body[data-page="equipo"] a.jira-link:hover {
body[data-page="equipo"]   text-decoration: underline;
body[data-page="equipo"] }
@media (max-width: 700px) {
body[data-page="equipo"]   .top-summary.grid4 {
body[data-page="equipo"]     margin: 0 1rem 1rem;
body[data-page="equipo"]     grid-template-columns: 1fr;
body[data-page="equipo"]   }

body[data-page="equipo"]   .section-list {
body[data-page="equipo"]     padding: 0 1rem 1.5rem;
body[data-page="equipo"]   }

body[data-page="equipo"]   .person-card {
body[data-page="equipo"]     min-height: 210px;
body[data-page="equipo"]   }
body[data-page="equipo"] }


/* Producto: grid responsivo */
.product-grid, .products-grid, .cardsGrid, #cardsGrid, .products-wrapper, .cards-grid-product {
  display:grid;
  gap:1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.product-card{ min-width:200px; }


/* Producto: dimensiones fijas para tarjetas y métricas */
body[data-page="product"] .metric,
body[data-page="product"] .chart-card,
body[data-page="product"] .chart-center{
  width: 200px;
  max-width: 200px;
}
body[data-page="product"] .chart-card canvas,
body[data-page="product"] .chart-center canvas{
  max-width: 200px;
}


/* Dashboards sin padding lateral */
body[data-page="main"] .top-summary.grid6,
body[data-page="general"] .top-summary.grid5,
body[data-page="product"] .top-summary.grid4,
body[data-page="equipo"] .top-summary.grid4 {
  margin-left: 0;
  margin-right: 0;
}
body[data-page="main"] .main-grid,
body[data-page="general"] #dashboard,
body[data-page="product"] .section-list,
body[data-page="equipo"] .section-list {
  padding-left: 0;
  padding-right: 0;
}


.btn.is-loading i{ animation: spin 0.9s linear infinite; display:inline-block; }
@keyframes spin{ from{transform:rotate(0deg);} to{transform:rotate(360deg);} }


.user-menu{
  position: absolute;
  top: 48px;
  right: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  min-width: 160px;
  z-index: 9999;
}
.user-menu[hidden]{ display:none; }
.user-menu-item{
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  font-weight: 600;
}
.user-menu-item:hover{
  background: var(--bg-card-soft);
  color: var(--accent);
}
