/* samsa-tracker · global.css
   Editorial dark dashboard — Samsa house style.
   Matchea 1:1 con ultimatesolutions.samsa.studio (Tailwind v4 → vanilla CSS). */

@font-face {
  font-family: 'Europa';
  src: url('/fonts/EuropaLight.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'Europa';
  src: url('/fonts/EuropaRegular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Europa';
  src: url('/fonts/EuropaBold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* === Brand tokens (mismos que el dashboard) === */
  --paper: #0e1a2c;
  --paper-2: #16263d;
  --paper-3: #1d2f49;
  --ink: #eaeef5;
  --ink-soft: #a8b4c8;
  --ink-muted: #6b7a93;
  --stroke: rgba(234, 238, 245, 0.08);
  --stroke-strong: rgba(234, 238, 245, 0.16);
  --mark: #4ddba2;
  --mark-soft: #6cc8c1;
  --brand-accent: #f97316;
  --positive: #5fd6a0;
  --negative: #f76b6b;
  --warning: #f5b942;

  /* Per-client */
  --client-primary: var(--mark);

  /* Status colors */
  --status-no-iniciada: var(--ink-muted);
  --status-en-curso: #5fa8d3;
  --status-feedback: var(--warning);
  --status-completada: var(--mark);

  --priority-p1: var(--negative);
  --priority-p2: var(--warning);
  --priority-p3: var(--ink-muted);

  --radius: 0.875rem;
  --radius-sm: 0.481rem;
  --radius-md: 0.656rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.181rem;
  --radius-2xl: 1.488rem;

  --shadow-glow-mark: 0 8px 24px -12px rgba(77, 219, 162, 0.18);
}

* { box-sizing: border-box; }
*::selection { background: rgba(77, 219, 162, 0.25); color: var(--ink); }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Europa', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grain texture igual al dashboard */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
  background-size: 160px 160px;
}
body > * { position: relative; z-index: 1; }

/* === Layout === */

.tracker-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.tracker-content {
  margin: 0 auto;
  width: 100%;
  max-width: 80rem;
  padding: 1rem;
  flex: 1;
}
@media (min-width: 640px) {
  .tracker-content { padding: 1.5rem; }
}

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

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}
.login-shell::after {
  content: '';
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 720px; height: 720px;
  max-width: 90vw; max-height: 90vw;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(77, 219, 162, 0.18), transparent 70%);
  filter: blur(40px);
}
.login-mark {
  width: 80px; height: 80px;
  margin-bottom: 1.5rem;
  animation: mark-in 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.05s backwards;
}
@keyframes mark-in {
  from { opacity: 0; transform: translateY(-12px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.login-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 32px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(22, 38, 61, 0.85), rgba(14, 26, 44, 0.85));
  border: 1px solid var(--stroke);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: card-in 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.25s backwards;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.login-head { text-align: center; margin-bottom: 24px; }
.login-head h1 {
  margin: 0 0 0.4rem;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}
.login-head p {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.login-field { position: relative; margin-bottom: 16px; }
.login-field input {
  width: 100%;
  padding: 14px 44px 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(14, 26, 44, 0.6);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.login-field input::placeholder { color: var(--ink-muted); }
.login-field input:focus {
  border-color: var(--mark);
  box-shadow: 0 0 0 3px rgba(77, 219, 162, 0.15);
}
.login-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--ink-muted);
  padding: 6px;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1;
}
.login-eye:hover { color: var(--ink); background: rgba(234, 238, 245, 0.05); }
.login-submit {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 0;
  background: var(--mark);
  color: var(--paper);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 20px -6px rgba(77, 219, 162, 0.5);
}
.login-submit:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -8px rgba(77, 219, 162, 0.6);
}
.login-submit:disabled { opacity: 0.55; cursor: not-allowed; }
.login-error {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(247, 107, 107, 0.1);
  color: var(--negative);
  font-size: 0.82rem;
  animation: shake 0.3s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.login-footer {
  margin-top: 1.75rem;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: center;
  position: relative;
  z-index: 1;
}

.picker-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.picker-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(14, 26, 44, 0.5);
  border: 1px solid var(--stroke);
  color: var(--ink);
  text-decoration: none;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.picker-item a:hover {
  border-color: var(--mark);
  background: rgba(77, 219, 162, 0.08);
  transform: translateX(2px);
}
.picker-item__name { font-weight: 700; }
.picker-item__arrow { color: var(--mark); font-size: 1.1rem; }

/* ============================================================================
   HEADER (matches DashboardHeader)
   ============================================================================ */

.tracker-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--stroke);
  background: rgba(22, 38, 61, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.tracker-header__inner {
  margin: 0 auto;
  max-width: 80rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}
@media (min-width: 640px) {
  .tracker-header__inner { padding: 1rem 1.5rem; }
}
@media (min-width: 1024px) {
  .tracker-header__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
}

.tracker-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}
.tracker-brand__logo {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  transition: transform 0.5s ease-out;
}
.tracker-brand:hover .tracker-brand__logo {
  transform: rotate(6deg) scale(1.1);
}
@media (min-width: 640px) {
  .tracker-brand__logo { width: 2.5rem; height: 2.5rem; }
}
.tracker-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.tracker-brand__name {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
@media (min-width: 640px) {
  .tracker-brand__name { font-size: 1rem; }
}
.tracker-brand__eyebrow {
  margin: 0.15rem 0 0;
  font-size: 0.5625rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
@media (min-width: 640px) {
  .tracker-brand__eyebrow { font-size: 0.625rem; }
}

.tracker-header__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(77, 219, 162, 0.1);
  border: 1px solid rgba(77, 219, 162, 0.2);
  color: var(--mark);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.role-chip--admin {
  background: rgba(247, 107, 107, 0.1);
  border-color: rgba(247, 107, 107, 0.25);
  color: var(--negative);
}
.role-chip__dot {
  width: 0.4rem; height: 0.4rem;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}
.logout-btn {
  background: transparent;
  border: 1px solid var(--stroke);
  color: var(--ink-muted);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.logout-btn:hover { border-color: var(--ink-muted); color: var(--ink); }

/* Tabs nav (matches dashboard tabs-nav) */
.tabs-nav {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--stroke);
  margin: 0 -1rem;
  padding: 0 1rem;
  scrollbar-width: none;
}
@media (min-width: 640px) {
  .tabs-nav { margin: 0; padding: 0; flex-wrap: wrap; }
}
.tabs-nav::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  flex-shrink: 0;
  padding: 0.625rem 0.9rem;
  background: transparent;
  border: 0;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s;
}
.tab:hover { color: var(--ink-soft); }
.tab--active { color: var(--ink); }
.tab--active::after {
  content: '';
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: -1px;
  height: 1.5px;
  background: var(--mark);
  border-radius: 2px;
}
.tab__count {
  margin-left: 0.4rem;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.tab--active .tab__count { color: var(--ink-soft); }

/* Chips (sub-blocks) */
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(29, 47, 73, 0.6);
  border: 1px solid var(--stroke);
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s;
}
.chip:hover { color: var(--ink); border-color: var(--stroke-strong); }
.chip--active {
  background: rgba(77, 219, 162, 0.12);
  border-color: rgba(77, 219, 162, 0.3);
  color: var(--mark);
}
.chip__diamond { font-size: 0.5rem; color: var(--mark); opacity: 0.6; }
.chip--active .chip__diamond { opacity: 1; }
.chip__count {
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.chip--active .chip__count { color: var(--mark-soft); }

/* ============================================================================
   KPI CARDS (matches dashboard KpiCard exactly)
   ============================================================================ */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 640px) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
  .kpi-grid--6 {
    grid-template-columns: repeat(6, 1fr);
  }
  /* Hero credits card spans 2 columns */
  .kpi-grid--6 .kpi--credits { grid-column: span 2 / span 2; }
}
@media (min-width: 1024px) {
  .kpi-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  .kpi-grid--6 {
    grid-template-columns: repeat(6, 1fr);
  }
}

.kpi {
  position: relative;
  overflow: hidden;
  background: rgba(22, 38, 61, 0.7);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 1rem 1rem;
  transition: transform 0.3s ease-out, border-color 0.3s, box-shadow 0.3s;
  will-change: transform;
}
@media (min-width: 640px) {
  .kpi { padding: 1.25rem; }
}
.kpi::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s;
  background: radial-gradient(120% 80% at 50% -20%, rgba(77, 219, 162, 0.18), transparent 60%);
  pointer-events: none;
}
.kpi:hover {
  transform: translateY(-2px);
  border-color: var(--stroke-strong);
  box-shadow: var(--shadow-glow-mark);
}
.kpi:hover::before { opacity: 1; }
.kpi--emphasis {
  border-color: rgba(77, 219, 162, 0.3);
  background: linear-gradient(135deg, var(--paper-3), var(--paper-2));
  box-shadow: inset 0 0 0 1px rgba(77, 219, 162, 0.2);
}
.kpi--emphasis::before { opacity: 0.6; }
.kpi--emphasis:hover {
  box-shadow: inset 0 0 0 1px rgba(77, 219, 162, 0.4), var(--shadow-glow-mark);
}

/* === KPI variant: credits hero card === */
.kpi--credits {
  background: linear-gradient(135deg, rgba(29, 47, 73, 0.85), rgba(22, 38, 61, 0.85));
  border-color: rgba(77, 219, 162, 0.2);
}
.kpi--credits::before {
  opacity: 0.45;
  background: radial-gradient(60% 100% at 100% 50%, rgba(77, 219, 162, 0.22), transparent 60%);
}
.kpi--credits-warn { border-color: rgba(245, 185, 66, 0.3); }
.kpi--credits-warn::before {
  background: radial-gradient(60% 100% at 100% 50%, rgba(245, 185, 66, 0.22), transparent 60%);
}
.kpi--credits-danger { border-color: rgba(247, 107, 107, 0.35); }
.kpi--credits-danger::before {
  background: radial-gradient(60% 100% at 100% 50%, rgba(247, 107, 107, 0.22), transparent 60%);
}
.kpi__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 0.85rem;
  gap: 0.75rem;
}
.kpi__head .kpi__label { margin: 0; }
.kpi__pill {
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mark);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(77, 219, 162, 0.12);
  border: 1px solid rgba(77, 219, 162, 0.25);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.kpi--credits-warn .kpi__pill {
  color: var(--warning);
  background: rgba(245, 185, 66, 0.12);
  border-color: rgba(245, 185, 66, 0.25);
}
.kpi--credits-danger .kpi__pill {
  color: var(--negative);
  background: rgba(247, 107, 107, 0.12);
  border-color: rgba(247, 107, 107, 0.25);
}
.kpi__value--credits {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
}
.kpi__value-main {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
@media (min-width: 640px) {
  .kpi__value-main { font-size: 2.5rem; }
}
.kpi__value-sep {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--ink-muted);
}
.kpi__value-total {
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.kpi__bar {
  position: relative;
  height: 6px;
  background: rgba(234, 238, 245, 0.07);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 0 0.5rem;
}
.kpi__bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--mark), var(--mark-soft));
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  box-shadow: 0 0 12px rgba(77, 219, 162, 0.35);
}
.kpi--credits-warn .kpi__bar-fill {
  background: linear-gradient(90deg, var(--warning), #f9c560);
  box-shadow: 0 0 12px rgba(245, 185, 66, 0.4);
}
.kpi--credits-danger .kpi__bar-fill {
  background: linear-gradient(90deg, var(--negative), #ff8a8a);
  box-shadow: 0 0 12px rgba(247, 107, 107, 0.4);
}
.kpi__bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  position: relative;
}
.kpi__bar-meta span:last-child { color: var(--ink-soft); }
.kpi__label {
  position: relative;
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  margin: 0 0 0.7rem;
}
@media (min-width: 640px) {
  .kpi__label { font-size: 0.6875rem; letter-spacing: 0.18em; }
}
.kpi--emphasis .kpi__label { color: var(--mark); }
.kpi__value {
  position: relative;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  margin: 0 0 0.6rem;
}
@media (min-width: 640px) {
  .kpi__value { font-size: 1.875rem; }
}
.kpi__delta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.delta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.delta-pill--positive { background: rgba(95, 214, 160, 0.15); color: var(--positive); }
.delta-pill--negative { background: rgba(247, 107, 107, 0.15); color: var(--negative); }
.delta-pill--neutral { background: rgba(234, 238, 245, 0.1); color: var(--ink-soft); }
.kpi__caption {
  font-size: 0.7rem;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kpi--emphasis .kpi__caption { color: var(--ink-soft); }

/* ============================================================================
   SECTION HEADERS & TABLE
   ============================================================================ */

.section-block { margin-bottom: 2rem; animation: fade-up 0.5s ease-out both; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--stroke);
}
.section-header__title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0;
}
.section-header__diamond {
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  background: var(--mark);
  border-radius: 1px;
  transform: rotate(45deg);
  margin-right: 0.15rem;
}
.section-header__label {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.section-header__count {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.section-header__progress {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.72rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.section-header__bar {
  width: 7rem;
  height: 3px;
  background: var(--stroke);
  border-radius: 2px;
  overflow: hidden;
}
.section-header__fill {
  display: block;
  height: 100%;
  background: var(--mark);
  border-radius: 2px;
  transition: width 0.5s ease-out;
}

.section-empty {
  padding: 1rem;
  color: var(--ink-muted);
  font-style: italic;
  font-size: 0.82rem;
  background: rgba(22, 38, 61, 0.3);
  border: 1px dashed var(--stroke);
  border-radius: var(--radius);
  text-align: center;
}

/* Table — refined dashboard style, no Linear-style density */
.table-wrap {
  background: rgba(22, 38, 61, 0.5);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.deliverable-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.deliverable-table thead th {
  text-align: left;
  font-weight: 500;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  padding: 0.75rem 0.85rem;
  background: rgba(29, 47, 73, 0.4);
  border-bottom: 1px solid var(--stroke);
}
.deliverable-table tbody td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--stroke);
  vertical-align: middle;
}
.deliverable-table tbody tr:last-child td { border-bottom: 0; }
.deliverable-row {
  cursor: pointer;
  transition: background 0.15s;
}
.deliverable-row:hover { background: rgba(29, 47, 73, 0.4); }
.deliverable-row td.col-prio { width: 2.5rem; }
.deliverable-row td.col-type,
.deliverable-row td.col-format { width: 5rem; color: var(--ink-soft); font-size: 0.78rem; }
.deliverable-row td.col-social { width: 6.5rem; }
.deliverable-row td.col-owner { width: 11rem; }
.deliverable-row td.col-credits {
  width: 4rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-align: right;
  padding-right: 1.1rem;
}
.deliverable-row td.col-due { width: 5rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; font-size: 0.78rem; }
.deliverable-row td.col-status { width: 8.5rem; }

.credit-cell {
  display: inline-block;
  min-width: 2rem;
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
  background: rgba(77, 219, 162, 0.08);
  color: var(--mark);
  font-weight: 500;
  font-size: 0.75rem;
}
.credit-cell--null {
  background: transparent;
  color: var(--ink-muted);
  font-weight: 300;
}

.task-label {
  color: var(--ink);
  font-weight: 400;
}
.task-link {
  margin-left: 0.5rem;
  color: var(--mark);
  text-decoration: none;
  font-size: 0.85rem;
  opacity: 0.8;
}
.task-link:hover { opacity: 1; }

/* ============================================================================
   PILLS & CHIPS DETAILED
   ============================================================================ */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  background: rgba(234, 238, 245, 0.06);
  color: var(--ink-soft);
  white-space: nowrap;
}
.status-pill__dot {
  width: 0.4rem; height: 0.4rem; border-radius: 50%;
  background: currentColor;
}
.status-pill--no_iniciada { background: rgba(107, 122, 147, 0.12); color: var(--status-no-iniciada); }
.status-pill--en_curso    { background: rgba(95, 168, 211, 0.15); color: var(--status-en-curso); }
.status-pill--feedback    { background: rgba(245, 185, 66, 0.15); color: var(--status-feedback); }
.status-pill--completada  { background: rgba(77, 219, 162, 0.15); color: var(--status-completada); }

.status-button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.status-button:disabled { cursor: default; }
.status-button:not(:disabled):hover .status-pill {
  filter: brightness(1.18);
}

.priority-pill {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 5px;
  background: rgba(29, 47, 73, 0.6);
  color: var(--ink-muted);
  min-width: 1.7rem;
  text-align: center;
}
.priority-pill--p1 { background: rgba(247, 107, 107, 0.15); color: var(--priority-p1); }
.priority-pill--p2 { background: rgba(245, 185, 66, 0.15); color: var(--priority-p2); }
.priority-pill--p3 { background: rgba(107, 122, 147, 0.18); color: var(--priority-p3); }
.priority-pill--none { color: var(--ink-muted); }

.social-row { display: flex; gap: 0.25rem; }
.social-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem; height: 1.5rem;
  border-radius: 5px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(29, 47, 73, 0.6);
  color: var(--ink-soft);
}
.social-chip--ig  { background: rgba(233, 91, 153, 0.15); color: #e95b99; }
.social-chip--fb  { background: rgba(77, 124, 222, 0.15); color: #4d7cde; }
.social-chip--lk  { background: rgba(77, 161, 222, 0.15); color: #4da1de; }
.social-chip--ytb { background: rgba(247, 107, 107, 0.15); color: #f76b6b; }
.social-chip--web { background: rgba(107, 122, 147, 0.18); color: var(--ink-soft); }

.owner {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 100%;
}
.owner__avatar {
  flex: 0 0 1.65rem;
  width: 1.65rem; height: 1.65rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--paper-3), var(--paper-2));
  border: 1px solid var(--stroke);
  color: var(--ink-soft);
  font-size: 0.625rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.owner__name {
  font-size: 0.8rem;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================================
   SEARCH (small floating input)
   ============================================================================ */

.search-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  padding: 0.5rem 0.7rem;
  background: rgba(22, 38, 61, 0.55);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  max-width: 24rem;
}
.search-row__icon { color: var(--ink-muted); font-size: 0.85rem; }
.search-row input {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  padding: 0.2rem 0;
}
.search-row input::placeholder { color: var(--ink-muted); }

/* ============================================================================
   DETAIL DRAWER
   ============================================================================ */

.detail-backdrop {
  position: fixed; inset: 0;
  background: rgba(7, 14, 24, 0.65);
  backdrop-filter: blur(4px);
  z-index: 50;
  animation: fade-in 0.2s ease-out;
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(580px, 92vw);
  background: var(--paper-2);
  border-left: 1px solid var(--stroke);
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.5);
  z-index: 51;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slide-in 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes slide-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid var(--stroke);
}
.detail-eyebrow {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--mark);
  margin-bottom: 0.35rem;
  font-weight: 500;
}
.detail-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
}
.detail-close {
  background: transparent;
  border: none;
  color: var(--ink-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}
.detail-close:hover { color: var(--ink); background: rgba(234, 238, 245, 0.05); }
.detail-body {
  padding: 1.25rem 1.75rem;
  overflow-y: auto;
  flex: 1;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  margin-bottom: 1.75rem;
}
.detail-field__label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
  font-weight: 500;
}
.detail-field__value { font-size: 0.9rem; }
.detail-field__value select {
  background: rgba(29, 47, 73, 0.7);
  border: 1px solid var(--stroke);
  color: var(--ink);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.85rem;
}
.detail-section {
  margin-bottom: 1.5rem;
}
.detail-section h3 {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  margin: 0 0 0.6rem;
  font-weight: 500;
}
.detail-section p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.55;
}
.detail-section a {
  color: var(--mark);
  font-size: 0.85rem;
  word-break: break-all;
}
.detail-section a:hover { text-decoration: underline; }
.detail-section textarea {
  width: 100%;
  background: rgba(29, 47, 73, 0.6);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  color: var(--ink);
  padding: 0.7rem 0.85rem;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.5;
  resize: vertical;
}
.detail-section textarea:focus {
  outline: none;
  border-color: var(--mark);
  box-shadow: 0 0 0 3px rgba(77, 219, 162, 0.12);
}
.detail-section--internal {
  padding: 0.95rem 1.1rem;
  background: rgba(247, 107, 107, 0.05);
  border: 1px dashed rgba(247, 107, 107, 0.22);
  border-radius: var(--radius-md);
}
.detail-section--internal h3 { color: var(--negative); }

.detail-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--stroke);
  background: var(--paper-2);
}

.btn {
  border: 1px solid var(--stroke);
  background: var(--paper-3);
  color: var(--ink);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn--ghost { background: transparent; color: var(--ink-soft); }
.btn--ghost:hover { color: var(--ink); border-color: var(--ink-muted); }
.btn--primary {
  background: var(--mark);
  border-color: var(--mark);
  color: var(--paper);
  font-weight: 700;
  box-shadow: 0 6px 16px -6px rgba(77, 219, 162, 0.4);
}
.btn--primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn--primary:disabled { opacity: 0.4; cursor: default; transform: none; }

/* ============================================================================
   STATES
   ============================================================================ */

.loading,
.empty {
  padding: 3rem;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

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

@media (max-width: 640px) {
  .deliverable-table { font-size: 0.78rem; }
  .deliverable-row td.col-format,
  .deliverable-row td.col-due { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-header, .detail-body, .detail-footer { padding-left: 1rem; padding-right: 1rem; }
}
