:root {
  --bg: #0b0f17;
  --bg-soft: #111827;
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover: rgba(255, 255, 255, 0.07);
  --text: #e5e7eb;
  --text-soft: #9ca3af;
  --text-dim: #6b7280;
  --accent: #8b5cf6;
  --accent-2: #3b82f6;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.bg-ambient {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(50% 50% at 100% 10%, rgba(59, 130, 246, 0.15), transparent 60%),
    var(--bg);
}
.bg-grid {
  position: fixed; inset: 0; z-index: -1; opacity: 0.4;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 0%, #000 40%, transparent 100%);
          mask-image: radial-gradient(70% 60% at 50% 0%, #000 40%, transparent 100%);
}

.app {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 24px 32px;
}
.loading { color: var(--text-dim); text-align: center; padding: 80px 0; }

/* Header */
.hero { margin-bottom: 36px; }
.hero-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.12em;
  color: var(--text-soft); text-transform: uppercase; margin-bottom: 18px;
}
.hero-brand .diamond { color: var(--accent); }
.hero-brand .sep { color: var(--text-dim); }
.hero h1 {
  font-size: clamp(26px, 4vw, 40px); font-weight: 800; line-height: 1.1;
  background: linear-gradient(120deg, #fff, #c4b5fd);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub { color: var(--text-soft); margin-top: 12px; max-width: 720px; font-size: 15px; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 18px;
  font-size: 13px; color: var(--text-dim);
}
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(139, 92, 246, 0.14); color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3); font-weight: 600;
}
.badge .pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--amber);
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Note banner */
.note-banner {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 18px;
  padding: 12px 16px; border-radius: 12px; font-size: 13px; line-height: 1.5;
  background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.28);
  color: #bfdbfe; max-width: 820px;
}
.note-banner .note-ico { color: var(--accent-2); font-weight: 800; flex-shrink: 0; }

/* Depósitos table */
.dep-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.dep-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dep-table thead th {
  text-align: left; padding: 11px 14px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-soft); background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--card-border);
}
.dep-table td { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.05); color: var(--text-soft); }
.dep-table tbody tr:last-child td, .dep-table tbody tr:last-child td { border-bottom: none; }
.dep-table tr:hover td { background: rgba(255,255,255,0.025); }
.dep-cod { font-weight: 700; color: #fff; font-family: ui-monospace, monospace; }
.dep-resp { color: var(--text); }
.dep-tipo { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.dep-tipo.físico, .dep-tipo.fisico { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.dep-tipo.control { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.dep-tipo.virtual { background: rgba(139,92,246,0.15); color: #c4b5fd; border: 1px solid rgba(139,92,246,0.3); }
.dep-tipo.tránsito, .dep-tipo.transito { background: rgba(59,130,246,0.15); color: #93c5fd; border: 1px solid rgba(59,130,246,0.3); }
.dep-tipo.no-inventario { background: rgba(148,163,184,0.15); color: #cbd5e1; border: 1px solid rgba(148,163,184,0.3); }
.dep-foot { font-size: 12px; color: var(--text-dim); margin-top: 10px; line-height: 1.5; }

/* Sections */
.section { margin-top: 40px; }
.section-title {
  font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-soft); margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.section-title::before { content: ""; width: 4px; height: 16px; border-radius: 4px; background: linear-gradient(var(--accent), var(--accent-2)); }

/* KPIs */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.kpi {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 20px; transition: 0.2s; box-shadow: var(--shadow);
}
.kpi:hover { background: var(--card-hover); transform: translateY(-2px); }
.kpi .v { font-size: 30px; font-weight: 800; color: #fff; }
.kpi .l { font-size: 13px; color: var(--text-soft); font-weight: 600; margin-top: 4px; }
.kpi .h { font-size: 12px; color: var(--text-dim); margin-top: 6px; }

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 4px 0; }
.tl-date {
  font-size: 12px; font-weight: 700; color: var(--text-soft); text-align: right;
  padding-top: 14px; letter-spacing: 0.03em;
}
.tl-body {
  border-left: 2px solid var(--card-border); padding: 0 0 22px 22px; position: relative;
}
.tl-item:last-child .tl-body { padding-bottom: 4px; }
.tl-dot {
  position: absolute; left: -8px; top: 14px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--text-dim);
}
.tl-item.active .tl-dot { border-color: var(--amber); box-shadow: 0 0 12px rgba(245,158,11,0.5); }
.tl-item.done .tl-dot { border-color: var(--green); background: var(--green); }
.tl-card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: 12px; padding: 14px 16px;
}
.tl-card .t { font-weight: 700; color: #fff; font-size: 15px; }
.tl-card .d { color: var(--text-soft); font-size: 13px; margin-top: 5px; }

/* Responsables */
.resp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.resp {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 18px; transition: 0.2s;
}
.resp:hover { background: var(--card-hover); }
.resp .area { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.resp .persona { font-size: 17px; font-weight: 700; color: #fff; margin-top: 6px; }
.resp .det { font-size: 13px; color: var(--text-soft); margin-top: 6px; line-height: 1.5; }
.pill { display: inline-block; margin-top: 12px; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
.pill.confirmado { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.pill.pendiente { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }

/* Procesos */
.proc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.proc { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 20px; }
.proc h3 { font-size: 15px; color: #fff; margin-bottom: 12px; }
.proc ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.proc li { font-size: 13px; color: var(--text-soft); padding-left: 18px; position: relative; line-height: 1.5; }
.proc li::before { content: "▸"; position: absolute; left: 0; color: var(--accent); }

/* Checklist */
.check-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 8px 6px; }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 11px 14px; border-radius: 10px; transition: 0.15s; }
.check:hover { background: rgba(255,255,255,0.03); }
.check .box {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--text-dim);
  display: grid; place-items: center; margin-top: 1px; font-size: 12px; color: var(--bg);
}
.check.done .box { background: var(--green); border-color: var(--green); }
.check .txt { font-size: 14px; color: var(--text); line-height: 1.45; }
.check.done .txt { color: var(--text-dim); text-decoration: line-through; }

/* Avances */
.log { display: flex; flex-direction: column; gap: 12px; }
.log-item { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start; }
.log-date { font-size: 12px; font-weight: 700; color: var(--accent-2); padding-top: 2px; }
.log-text { font-size: 14px; color: var(--text-soft); line-height: 1.5; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* Footer */
.app-footer {
  max-width: 1120px; margin: 24px auto 40px; padding: 0 24px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 12px; color: var(--text-dim);
}
.app-footer .dot { color: var(--card-border); }

@media (max-width: 720px) {
  .two-col { grid-template-columns: 1fr; }
  .tl-date { text-align: left; }
}
