/* ============================================================
   TAREAS YAAMPPEX — Atlassian Design System (Fiel al original)
   ADS Dark Theme · Atlassian Sans / Inter · ADS Tokens exactos
   ============================================================ */

/* Importar fuente equivalente a "Atlassian Sans" */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ============== ADS DESIGN TOKENS EXACTOS ============== */
:root {
  /* === Backgrounds — ADS elevation layers === */
  --ds-background-default:         #22272B;  /* Page background */
  --ds-background-input:           #22272B;  /* Input fields */
  --ds-background-input-hovered:   #282E33;  /* Input hover */
  --ds-background-input-pressed:   #1D2125;
  --ds-surface:                    #282E33;  /* Cards, panels */
  --ds-surface-overlay:            #282E33;  /* Modals, dialogs */
  --ds-surface-raised:             #2C333A;  /* Dropdown, tooltips */
  --ds-elevation-surface:          #161A1D;  /* Deepest bg */

  /* === Borders === */
  --ds-border:             #738496;
  --ds-border-input:       #738496;
  --ds-border-inverse:     #091E42;
  --ds-border-disabled:    #2C333A;
  --ds-border-focused:     #579DFF;    /* ADS focus ring — azul claro */
  --ds-border-danger:      #F87168;

  /* === Text === */
  --ds-text:               #B6C2CF;   /* Body text */
  --ds-text-subtle:        #8C9BAB;   /* Secondary text */
  --ds-text-subtlest:      #738496;   /* Placeholder, disabled */
  --ds-text-disabled:      #4C5B6B;
  --ds-text-inverse:       #1D2125;   /* Text on colored bg */
  --ds-text-brand:         #579DFF;   /* Brand links */
  --ds-text-selected:      #579DFF;
  --ds-text-danger:        #F87168;
  --ds-text-warning:       #E2B203;
  --ds-text-success:       #7EE2B8;
  --ds-text-information:   #579DFF;
  --ds-text-discovery:     #C0B6F2;

  /* === Brand — Yaamppex Red mantiene protagonismo en logo === */
  --brand-red:             #FF0505;
  --brand-red-hover:       #D90000;
  --brand-red-subtle:      rgba(255,5,5,0.12);
  --brand-red-border:      rgba(255,5,5,0.4);

  /* === ADS Button Backgrounds — EXACTOS del inspector === */
  --ds-background-brand-bold:         #0C66E4;   /* Primary button */
  --ds-background-brand-bold-hovered: #0055CC;
  --ds-background-brand-bold-pressed: #09326C;

  --ds-background-danger-bold:         #CA3521;   /* Danger button */
  --ds-background-danger-bold-hovered: #AE2A19;
  
  --ds-background-neutral:            transparent;
  --ds-background-neutral-hovered:    #A6C5E229;  /* Subtle button hover — translúcido */
  --ds-background-neutral-pressed:    #A6C5E24D;

  /* === ADS Status/Lozenge Exact Colors === */
  /* Default (neutral-gray) */
  --loz-default-bg:    #454F59;
  --loz-default-text:  #D4DCE5;

  /* In Progress (blue) */
  --loz-inprogress-bg:   #0C66E4;
  --loz-inprogress-text: #FFFFFF;

  /* Success/Done (green) */
  --loz-success-bg:   #1F845A;
  --loz-success-text: #FFFFFF;

  /* Error/Blocked (red) */
  --loz-error-bg:   #CA3521;
  --loz-error-text: #FFFFFF;

  /* Warning (yellow/orange) */
  --loz-warning-bg:   #7F5F01;
  --loz-warning-text: #F8E6A0;

  /* === ADS Section Messages / Alerts === */
  --ds-background-danger:        #FFECEB1A;
  --ds-background-warning:       #F8E6A019;
  --ds-background-information:   #E9F2FF1A;
  --ds-background-success:       #DCFFF129;

  /* === Shadows ADS === */
  --ds-shadow-overlay:    0px 8px 12px rgba(0,0,0,0.5), 0px 0px 1px rgba(0,0,0,0.5);
  --ds-shadow-raised:     0px 1px 1px rgba(0,0,0,0.25), 0px 0px 1px rgba(0,0,0,0.31);
  --ds-shadow-overflow:   0px 0px 8px rgba(0,0,0,0.5), 0px 0px 1px rgba(0,0,0,0.5);

  /* === Radius — ADS usa 3px para casi todo === */
  --ds-radius:       3px;   /* Standard: buttons, inputs, badges */
  --ds-radius-sm:    3px;
  --ds-radius-md:    8px;   /* Cards, modals */
  --ds-radius-lg:    8px;
  --ds-radius-pill:  9999px;

  /* === Spacing ADS === */
  --ds-space-025:  2px;
  --ds-space-050:  4px;
  --ds-space-075:  6px;
  --ds-space-100:  8px;
  --ds-space-150: 12px;
  --ds-space-200: 16px;
  --ds-space-300: 24px;
  --ds-space-400: 32px;

  /* === Font (Atlassian Sans fallback stack) === */
  --ds-font-family: 'Inter', ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif;
  --ds-font-size-body:   14px;
  --ds-font-size-small:  11px;
  --ds-font-size-large:  16px;
  --ds-font-weight-regular: 400;
  --ds-font-weight-medium:  500;
  --ds-font-weight-semibold: 600;
  --ds-font-weight-bold: 700;

  /* Transitions */
  --ease: 0.2s ease;
}

/* ============== RESET ============== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--ds-font-family);
  background: var(--ds-elevation-surface);
  color: var(--ds-text);
  min-height: 100vh;
  line-height: 1.5;
  font-size: var(--ds-font-size-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   ADS NAVIGATION BAR (Atlassian Navigation style)
   ============================================================ */
.app-header {
  height: 56px;
  padding: 0 var(--ds-space-200);
  background: #1C2B41;   /* ADS nav exact dark color */
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-logo {
  font-size: 14px;
  font-weight: var(--ds-font-weight-semibold);
  letter-spacing: -0.1px;
  display: flex;
  align-items: center;
  gap: var(--ds-space-100);
  color: #FFFFFF;
}

.app-logo .logo-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-logo .logo-icon svg { width: 100%; height: 100%; display: block; }

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--ds-space-100);
}

/* ADS nav link style */
.header-link {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 14px;
  font-weight: var(--ds-font-weight-medium);
  padding: var(--ds-space-075) var(--ds-space-100);
  border-radius: var(--ds-radius);
  transition: background var(--ease), color var(--ease);
}

.header-link:hover {
  background: rgba(255,255,255,0.12);
  color: #FFFFFF;
}

/* ADS user badge / lozenge pill in header */
.user-badge {
  background: rgba(255,5,5,0.18);
  border: 1px solid rgba(255,5,5,0.4);
  color: #FF6B6B;
  padding: var(--ds-space-025) var(--ds-space-100);
  border-radius: var(--ds-radius-pill);
  font-size: var(--ds-font-size-small);
  font-weight: var(--ds-font-weight-bold);
  display: flex;
  align-items: center;
  gap: var(--ds-space-025);
}

/* ============================================================
   ADS PAGE LAYOUT
   ============================================================ */
.app-main {
  padding: var(--ds-space-300) var(--ds-space-400);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ============================================================
   ADS CARD / SURFACE (replaces glassmorphism)
   ============================================================ */
.glass-panel {
  background: var(--ds-surface);
  border: 1px solid transparent;
  border-radius: var(--ds-radius-md);
  padding: var(--ds-space-200);
  box-shadow: var(--ds-shadow-raised);
  transition: box-shadow var(--ease), border-color var(--ease);
}

.glass-panel:hover { border-color: rgba(116, 140, 171, 0.15); }

.glass-panel.interactive:hover {
  box-shadow: var(--ds-shadow-overlay);
}

/* ============================================================
   ADS TEXT FIELD & SELECT
   ============================================================ */
.form-group { margin-bottom: var(--ds-space-200); }

/* ADS Form Label */
.form-label {
  display: block;
  margin-bottom: var(--ds-space-025);
  font-size: var(--ds-font-size-body);
  font-weight: var(--ds-font-weight-semibold);
  color: var(--ds-text);
  line-height: 1.5;
}

.form-required::after {
  content: ' *';
  color: var(--ds-text-danger);
}

/* ADS Textfield — exacto del inspector */
.form-control {
  width: 100%;
  /* ADS uses specific padding: 6px 8px top/bottom, 8px left/right */
  padding: 6px 8px;
  background: var(--ds-background-input);
  border: 2px solid var(--ds-border-input);
  border-radius: var(--ds-radius);   /* 3px — ADS exacto */
  color: var(--ds-text);
  font-size: var(--ds-font-size-body);
  font-family: var(--ds-font-family);
  line-height: 1.5;
  min-height: 36px;
  transition: background var(--ease), border-color var(--ease), box-shadow var(--ease);
  outline: none;
}

.form-control:hover:not(:focus):not([readonly]):not(:disabled) {
  background: var(--ds-background-input-hovered);
  border-color: var(--ds-border-input);
}

/* ADS Focus Ring — borde 2px azul exacto + fondo cambio */
.form-control:focus {
  background: var(--ds-background-input-pressed);
  border-color: var(--ds-border-focused);
  box-shadow: 0 0 0 2px var(--ds-background-default);  /* ADS inner white gap */
  outline: 2px solid var(--ds-border-focused);
  outline-offset: 2px;
}

.form-control::placeholder { color: var(--ds-text-subtlest); }

.form-control[readonly] {
  background: #1D2125;
  color: var(--ds-text-subtle);
  cursor: not-allowed;
  border-color: var(--ds-border-disabled);
}

.form-control:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ADS Select custom arrow */
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%238C9BAB' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

select.form-control option {
  background: var(--ds-surface-raised);
  color: var(--ds-text);
}

textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

/* ADS Form Hint */
.form-hint {
  color: var(--ds-text-subtle);
  font-size: var(--ds-font-size-small);
  margin-top: var(--ds-space-025);
  display: block;
  line-height: 1.5;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ds-space-150);
}

/* ============================================================
   ADS BUTTONS — EXACTOS del inspector
   height: 32px, border-radius: 3px, font-weight: 500
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-050);
  padding: 0 var(--ds-space-150);
  height: 32px;
  min-width: 0;
  background: var(--ds-background-brand-bold);
  color: #FFFFFF;
  border: none;
  border-radius: var(--ds-radius);   /* ADS exacto: 3px */
  font-weight: var(--ds-font-weight-medium);
  font-size: var(--ds-font-size-body);
  font-family: var(--ds-font-family);
  line-height: 1;
  cursor: pointer;
  transition: background var(--ease), box-shadow var(--ease);
  text-decoration: none;
  white-space: nowrap;
  outline: none;
}

.btn:hover:not(:disabled) {
  background: var(--ds-background-brand-bold-hovered);
}

.btn:active:not(:disabled) {
  background: var(--ds-background-brand-bold-pressed);
  box-shadow: none;
}

/* ADS Focus Ring para botones */
.btn:focus-visible {
  outline: 2px solid var(--ds-border-focused);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ADS Button Sizes */
.btn-sm {
  height: 24px;
  padding: 0 var(--ds-space-100);
  font-size: var(--ds-font-size-small);
}

/* ADS Subtle Button — transparent background */
.btn-ghost {
  background: var(--ds-background-neutral);
  color: var(--ds-text);
  border: 1px solid #738496;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--ds-background-neutral-hovered);
  border-color: var(--ds-border);
}
.btn-ghost:active:not(:disabled) {
  background: var(--ds-background-neutral-pressed);
}

/* ADS Brand button (Yaamppex red) */
.btn-brand {
  background: var(--brand-red);
  color: #FFFFFF;
}
.btn-brand:hover:not(:disabled) {
  background: var(--brand-red-hover);
}

/* ADS Danger Button */
.btn-danger {
  background: transparent;
  color: var(--ds-text-danger);
  border: 1px solid transparent;
}
.btn-danger:hover:not(:disabled) {
  background: rgba(202,53,33,0.15);
  border-color: rgba(202,53,33,0.5);
}

/* ADS Success/Confirm button */
.btn-success {
  background: #1F845A;
  color: #FFFFFF;
}
.btn-success:hover:not(:disabled) { background: #216E4E; }

/* ADS Export button */
.btn-export {
  background: #1F845A;
  color: #FFFFFF;
}
.btn-export:hover:not(:disabled) { background: #216E4E; }

.btn-full { width: 100%; }

/* ============================================================
   ADS SECTION TITLES / HEADINGS
   ============================================================ */
.section-title {
  font-size: 14px;
  font-weight: var(--ds-font-weight-semibold);
  margin-bottom: var(--ds-space-150);
  display: flex;
  align-items: center;
  gap: var(--ds-space-075);
  color: var(--ds-text);
}

/* ADS Badge count */
.section-title .count {
  background: var(--brand-red-subtle);
  color: #FF6B6B;
  border: 1px solid var(--brand-red-border);
  padding: 1px 6px;
  border-radius: var(--ds-radius-pill);
  font-size: var(--ds-font-size-small);
  font-weight: var(--ds-font-weight-bold);
}

/* ============================================================
   ADS TASK CARDS (Jira Issue Card style)
   ============================================================ */
.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--ds-space-150);
}

.task-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  min-height: 140px;
  position: relative;
  overflow: hidden;
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface);
  border: 1px solid transparent;
  box-shadow: var(--ds-shadow-raised);
  transition: box-shadow var(--ease), border-color var(--ease);
  padding: var(--ds-space-150);
}

.task-card:hover {
  box-shadow: var(--ds-shadow-overflow);
  border-color: rgba(116, 140, 171, 0.2);
}

/* ADS color indicator bar — left border */
.task-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
}

.task-card.border-pending::before  { background: #696F78; }
.task-card.border-progress::before { background: #0C66E4; }
.task-card.border-blocked::before  { background: #CA3521; }
.task-card.border-done::before     { background: #1F845A; }

.task-card-body { padding-left: var(--ds-space-050); }

/* ADS Issue Key — exacto a Jira (DEV-01) */
.task-id {
  display: inline-block;
  font-size: 11px;
  font-family: ui-monospace, 'JetBrains Mono', 'Fira Code', monospace;
  font-weight: var(--ds-font-weight-semibold);
  color: var(--ds-text-brand);
  background: rgba(87, 157, 255, 0.1);
  border: 1px solid rgba(87, 157, 255, 0.3);
  border-radius: var(--ds-radius);
  padding: 1px 5px;
  letter-spacing: 0.2px;
}

.task-title {
  font-size: 14px;
  font-weight: var(--ds-font-weight-medium);
  margin: var(--ds-space-075) 0 var(--ds-space-050);
  line-height: 1.4;
  color: var(--ds-text);
}

.task-criteria {
  font-size: var(--ds-font-size-small);
  color: var(--ds-text-subtle);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: var(--ds-space-100);
  border-top: 1px solid rgba(116, 140, 171, 0.1);
  font-size: var(--ds-font-size-small);
  gap: var(--ds-space-075);
}

.task-date { color: var(--ds-text-subtlest); }
.task-date.overdue { color: var(--ds-text-danger); font-weight: var(--ds-font-weight-semibold); }

/* ============================================================
   ADS LOZENGE — EXACTO (border-radius: 3px, padding: 2px 4px)
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 4px;
  border-radius: var(--ds-radius);   /* ADS: 3px */
  font-size: var(--ds-font-size-small);   /* 11px exacto */
  font-weight: var(--ds-font-weight-bold);   /* 700 */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 16px;
  white-space: nowrap;
  border: none;
}

/* ADS Lozenge exact colors — del inspector real */
.badge-pending  { background: var(--loz-default-bg);    color: var(--loz-default-text); }
.badge-progress { background: var(--loz-inprogress-bg); color: var(--loz-inprogress-text); }
.badge-blocked  { background: var(--loz-error-bg);      color: var(--loz-error-text); }
.badge-done     { background: var(--loz-success-bg);    color: var(--loz-success-text); }

/* ============================================================
   ADS MODAL DIALOG
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(9, 30, 66, 0.54);   /* ADS blanket exacto */
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 80px var(--ds-space-200) var(--ds-space-200);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0,0,0.2,1);
  overflow-y: auto;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ADS Modal Content */
.modal-content {
  background: var(--ds-surface-overlay);
  border-radius: var(--ds-radius-md);   /* 8px */
  width: 100%;
  max-width: 560px;
  padding: var(--ds-space-300);
  box-shadow: var(--ds-shadow-overlay);
  transform: translateY(-20px);
  transition: transform 0.25s cubic-bezier(0,0,0.2,1);
  margin-bottom: var(--ds-space-300);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

/* ADS Modal Header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--ds-space-200);
  padding-bottom: var(--ds-space-150);
  border-bottom: 1px solid rgba(116, 140, 171, 0.15);
}

.modal-header h3 {
  font-size: 20px;
  font-weight: var(--ds-font-weight-semibold);
  color: var(--ds-text);
  line-height: 1.2;
}

/* ADS Icon Button (close) */
.close-btn {
  background: transparent;
  border: none;
  color: var(--ds-text-subtle);
  width: 32px;
  height: 32px;
  border-radius: var(--ds-radius);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--ease), color var(--ease);
  flex-shrink: 0;
  line-height: 1;
}

.close-btn:hover {
  background: var(--ds-background-neutral-hovered);
  color: var(--ds-text);
}

/* ============================================================
   ADS PIN SCREEN
   ============================================================ */
.pin-screen {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--ds-elevation-surface);
  z-index: 300;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pin-box {
  text-align: center;
  width: 380px;
  max-width: 94vw;
}

.pin-box h2 {
  font-size: 20px;
  font-weight: var(--ds-font-weight-semibold);
  color: var(--ds-text);
  margin-bottom: var(--ds-space-075);
}

.pin-box p {
  color: var(--ds-text-subtle);
  font-size: var(--ds-font-size-body);
  margin-bottom: var(--ds-space-200);
  line-height: 1.5;
}

.pin-input {
  text-align: center;
  font-size: 28px;
  letter-spacing: 12px;
  font-weight: var(--ds-font-weight-bold);
  padding: var(--ds-space-150);
}

.pin-error {
  color: var(--ds-text-danger);
  font-size: var(--ds-font-size-body);
  margin-top: var(--ds-space-075);
  min-height: 20px;
}

/* ============================================================
   ADS KPI STATS CARDS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--ds-space-150);
  margin-bottom: var(--ds-space-200);
}

.stat-card {
  text-align: center;
  padding: var(--ds-space-200) var(--ds-space-150);
  background: var(--ds-surface);
  border: 1px solid rgba(116, 140, 171, 0.12);
  border-radius: var(--ds-radius-md);
  box-shadow: var(--ds-shadow-raised);
  transition: box-shadow var(--ease);
}

.stat-card:hover { box-shadow: var(--ds-shadow-overflow); }

.stat-card .stat-label {
  font-size: var(--ds-font-size-small);
  font-weight: var(--ds-font-weight-semibold);
  color: var(--ds-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--ds-space-075);
}

.stat-card .stat-value {
  font-size: 36px;
  font-weight: var(--ds-font-weight-bold);
  line-height: 1;
}

/* ADS metric colors */
.val-pending  { color: var(--ds-text-subtle); }
.val-progress { color: #579DFF; }
.val-blocked  { color: var(--ds-text-danger); }
.val-done     { color: var(--ds-text-success); }
.val-total    { color: #579DFF; }

/* ============================================================
   ADS PROGRESS BAR
   ============================================================ */
.progress-container { margin-bottom: var(--ds-space-200); }

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--ds-space-075);
  font-size: var(--ds-font-size-body);
  color: var(--ds-text-subtle);
}

/* ADS Progress Bar exact */
.progress-bar {
  height: 8px;
  background: #2C333A;
  border-radius: var(--ds-radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--brand-red);
  border-radius: var(--ds-radius-pill);
  transition: width 0.9s cubic-bezier(.4,0,.2,1);
}

/* ============================================================
   ADS SECTION MESSAGES (Alerts) — exacto al "Section Message"
   ============================================================ */
.alert-box {
  padding: var(--ds-space-150) var(--ds-space-200);
  border-radius: var(--ds-radius-md);
  margin-bottom: var(--ds-space-150);
  border: none;
  border-left: 3px solid;    /* ADS section message indicator */
}

.alert-danger {
  background: var(--ds-background-danger);
  border-color: var(--ds-text-danger);
  color: var(--ds-text-danger);
}

.alert-warning {
  background: var(--ds-background-warning);
  border-color: var(--ds-text-warning);
  color: var(--ds-text-warning);
}

.alert-box h4 {
  font-size: var(--ds-font-size-body);
  font-weight: var(--ds-font-weight-semibold);
  margin-bottom: var(--ds-space-075);
}
.alert-box ul  { padding-left: var(--ds-space-150); }
.alert-box li  { margin-bottom: var(--ds-space-025); font-size: var(--ds-font-size-body); line-height: 1.5; }

/* ============================================================
   ADS DYNAMIC TABLE — exacto al "Dynamic Table" de ADS
   ============================================================ */
.table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--ds-radius-md);
  border: 1px solid rgba(116, 140, 171, 0.12);
  background: var(--ds-surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
  font-size: var(--ds-font-size-body);
}

.data-table thead tr {
  border-bottom: 2px solid rgba(116, 140, 171, 0.2);
}

.data-table th {
  padding: var(--ds-space-100) var(--ds-space-150);
  background: var(--ds-surface);
  font-weight: var(--ds-font-weight-semibold);
  font-size: var(--ds-font-size-small);
  color: var(--ds-text-subtle);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table td {
  padding: var(--ds-space-100) var(--ds-space-150);
  border-bottom: 1px solid rgba(116, 140, 171, 0.08);
  vertical-align: middle;
  font-size: var(--ds-font-size-body);
  color: var(--ds-text);
}

/* ADS table row hover — suave */
.data-table tbody tr {
  transition: background var(--ease);
}
.data-table tbody tr:hover td {
  background: rgba(116, 140, 171, 0.05);
}

.data-table td a {
  color: var(--ds-text-brand);
  text-decoration: none;
  font-size: var(--ds-font-size-body);
}
.data-table td a:hover { text-decoration: underline; }

.table-dep      { color: var(--ds-text-danger); font-size: var(--ds-font-size-small); }
.table-criteria { color: var(--ds-text-subtle); font-size: var(--ds-font-size-small); line-height: 1.4; max-width: 200px; }

/* ADS Icon Button para delete */
.delete-btn {
  background: transparent;
  border: none;
  color: var(--ds-text-subtlest);
  cursor: pointer;
  font-size: 14px;
  padding: var(--ds-space-050) var(--ds-space-075);
  border-radius: var(--ds-radius);
  transition: background var(--ease), color var(--ease);
}
.delete-btn:hover {
  color: var(--ds-text-danger);
  background: rgba(202, 53, 33, 0.12);
}

/* ============================================================
   ADS FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  gap: var(--ds-space-100);
  margin-bottom: var(--ds-space-150);
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar select {
  width: auto;
  min-width: 160px;
  padding: 6px 32px 6px 8px;
  background: var(--ds-background-input);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%238C9BAB' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  border: 2px solid var(--ds-border-input);
  border-radius: var(--ds-radius);
  color: var(--ds-text);
  font-size: var(--ds-font-size-body);
  font-family: var(--ds-font-family);
  appearance: none;
  min-height: 32px;
  outline: none;
  transition: border-color var(--ease), background var(--ease);
}
.filter-bar select:hover { background-color: var(--ds-background-input-hovered); }
.filter-bar select:focus { border-color: var(--ds-border-focused); box-shadow: 0 0 0 2px rgba(87,157,255,0.25); }
.filter-bar select option { background: var(--ds-surface-raised); }

/* ============================================================
   ADS IDENTITY SCREEN
   ============================================================ */
.identity-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 56px);
  padding: var(--ds-space-400) var(--ds-space-200);
}

.identity-card {
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.identity-card h2 {
  font-size: 24px;
  font-weight: var(--ds-font-weight-semibold);
  margin-bottom: var(--ds-space-050);
  color: var(--ds-text);
}

.identity-card p {
  color: var(--ds-text-subtle);
  margin-bottom: var(--ds-space-300);
  font-size: var(--ds-font-size-body);
  line-height: 1.5;
}

/* ============================================================
   ADS EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: var(--ds-space-400) var(--ds-space-200);
  color: var(--ds-text-subtle);
}

.empty-state .empty-icon {
  font-size: 40px;
  margin-bottom: var(--ds-space-150);
  opacity: 0.5;
}

.empty-state p { font-size: var(--ds-font-size-body); }

/* ============================================================
   ADS SPINNER (Loader)
   ============================================================ */
.loader {
  border: 2px solid rgba(116, 140, 171, 0.2);
  border-top: 2px solid #579DFF;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 0.65s linear infinite;
  margin: var(--ds-space-300) auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   ADS FLAG (Toast notifications)
   ADS flags: max-width 400px, border-radius 3px, icon left
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: var(--ds-space-300);
  right: var(--ds-space-300);
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: var(--ds-space-100);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: var(--ds-space-100);
  padding: var(--ds-space-150) var(--ds-space-200);
  border-radius: var(--ds-radius-md);    /* ADS Flag: 8px */
  background: #22272B;
  border: 1px solid rgba(116, 140, 171, 0.2);
  box-shadow: var(--ds-shadow-overlay);
  color: var(--ds-text);
  font-size: var(--ds-font-size-body);
  min-width: 280px;
  max-width: 400px;
  animation: toastIn 0.3s cubic-bezier(0.15, 1, 0.3, 1) forwards;
}

.toast.toast-exit { animation: toastOut 0.25s ease forwards; }

.toast-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.toast-body { flex: 1; }
.toast-title { font-weight: var(--ds-font-weight-semibold); font-size: var(--ds-font-size-body); margin-bottom: 2px; }
.toast-msg   { font-size: var(--ds-font-size-body); color: var(--ds-text-subtle); line-height: 1.4; }

/* ADS Flag side indicator */
.toast-success { border-left: 3px solid #1F845A; }
.toast-error   { border-left: 3px solid #CA3521; }
.toast-warning { border-left: 3px solid #B38600; }
.toast-info    { border-left: 3px solid #0C66E4; }

.toast-close {
  background: none;
  border: none;
  color: var(--ds-text-subtlest);
  cursor: pointer;
  font-size: 18px;
  padding: 0 2px;
  flex-shrink: 0;
  transition: color var(--ease);
  line-height: 1;
  margin-top: -2px;
}
.toast-close:hover { color: var(--ds-text); }

@keyframes toastIn  { from { opacity:0; transform:translateX(24px); }  to { opacity:1; transform:translateX(0); } }
@keyframes toastOut { from { opacity:1; transform:translateX(0); } to { opacity:0; transform:translateX(24px) scale(0.95); } }

/* ============================================================
   ADS KANBAN BOARD
   ============================================================ */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--ds-space-150);
  min-height: 400px;
  align-items: start;
}

.kanban-column {
  background: #1D2125;
  border: 1px solid rgba(116, 140, 171, 0.1);
  border-radius: var(--ds-radius-md);
  padding: var(--ds-space-150);
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--ds-space-150);
  padding-bottom: var(--ds-space-100);
  border-bottom: 2px solid rgba(116, 140, 171, 0.15);
}

.col-pending  .kanban-column-header { border-color: #696F78; }
.col-progress .kanban-column-header { border-color: #0C66E4; }
.col-blocked  .kanban-column-header { border-color: #CA3521; }
.col-done     .kanban-column-header { border-color: #1F845A; }

.kanban-column-title {
  font-size: var(--ds-font-size-small);
  font-weight: var(--ds-font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ds-text-subtle);
}

/* ADS Lozenge count badge en kanban */
.kanban-column-count {
  font-size: var(--ds-font-size-small);
  font-weight: var(--ds-font-weight-bold);
  padding: 2px 6px;
  border-radius: var(--ds-radius);
  background: #454F59;
  color: #D4DCE5;
}

.col-progress .kanban-column-count { background: #0C66E4; color: #FFFFFF; }
.col-blocked  .kanban-column-count { background: #CA3521; color: #FFFFFF; }
.col-done     .kanban-column-count { background: #1F845A; color: #FFFFFF; }

.kanban-cards {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-100);
}

/* ADS Kanban Card */
.kanban-card {
  background: var(--ds-surface);
  border: 1px solid rgba(116, 140, 171, 0.12);
  border-radius: var(--ds-radius-md);
  padding: var(--ds-space-150);
  cursor: pointer;
  transition: box-shadow var(--ease), border-color var(--ease);
  box-shadow: var(--ds-shadow-raised);
}

.kanban-card:hover {
  box-shadow: var(--ds-shadow-overflow);
  border-color: rgba(116, 140, 171, 0.25);
}

.kanban-card .kc-id    { font-size: 11px; color: var(--ds-text-brand); font-family: monospace; font-weight: 600; margin-bottom: 4px; }
.kanban-card .kc-title { font-size: var(--ds-font-size-body); font-weight: var(--ds-font-weight-medium); line-height: 1.4; color: var(--ds-text); margin-bottom: var(--ds-space-075); }
.kanban-card .kc-meta  { font-size: var(--ds-font-size-small); color: var(--ds-text-subtlest); display: flex; justify-content: space-between; gap: var(--ds-space-050); }
.kanban-card .kc-person { color: var(--ds-text-subtle); font-weight: var(--ds-font-weight-medium); }

.kanban-empty {
  text-align: center;
  padding: var(--ds-space-300) var(--ds-space-100);
  color: var(--ds-text-subtlest);
  font-size: var(--ds-font-size-small);
  border: 1px dashed rgba(116, 140, 171, 0.15);
  border-radius: var(--ds-radius);
}

@media (max-width: 768px) { .kanban-board { grid-template-columns: 1fr; } }

/* ============================================================
   ADS VIEW TOGGLE (Tabs style)
   ============================================================ */
.view-toggle {
  display: flex;
  background: #1D2125;
  border: 1px solid rgba(116, 140, 171, 0.2);
  border-radius: var(--ds-radius);
  overflow: hidden;
}

.view-toggle-btn {
  padding: 0 var(--ds-space-150);
  height: 32px;
  border: none;
  background: transparent;
  color: var(--ds-text-subtle);
  font-size: var(--ds-font-size-body);
  font-weight: var(--ds-font-weight-medium);
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
  font-family: var(--ds-font-family);
}

.view-toggle-btn.active {
  background: var(--ds-background-brand-bold);
  color: #FFFFFF;
}

.view-toggle-btn:hover:not(.active) {
  background: var(--ds-background-neutral-hovered);
  color: var(--ds-text);
}

/* ============================================================
   ADS CARD ANIMATIONS
   ============================================================ */
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.anim-card {
  opacity: 0;
  animation: cardFadeIn 0.35s cubic-bezier(0.15, 1, 0.3, 1) forwards;
}

/* ============================================================
   ADS KPI counter animation
   ============================================================ */
@keyframes countUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stat-value.animate { animation: countUp 0.4s cubic-bezier(0.15, 1, 0.3, 1) forwards; }

/* ============================================================
   ADMIN ACTIONS BAR
   ============================================================ */
.admin-actions {
  display: flex;
  gap: var(--ds-space-100);
  flex-wrap: wrap;
  align-items: center;
}

/* ============================================================
   ADS BURNDOWN / PERSON CARDS
   ============================================================ */
.burndown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--ds-space-150);
}

.person-card {
  background: var(--ds-surface);
  border: 1px solid rgba(116, 140, 171, 0.12);
  border-radius: var(--ds-radius-md);
  padding: var(--ds-space-200);
  box-shadow: var(--ds-shadow-raised);
  transition: box-shadow var(--ease), border-color var(--ease);
  position: relative;
  overflow: hidden;
}

.person-card:hover {
  box-shadow: var(--ds-shadow-overflow);
  border-color: rgba(116, 140, 171, 0.25);
}

/* ADS color indicator top bar */
.person-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.person-card.perf-excelente::before { background: #1F845A; }
.person-card.perf-en_camino::before { background: #B38600; }
.person-card.perf-atrasado::before  { background: #CA3521; }
.person-card.perf-bloqueado::before { background: #CA3521; }
.person-card.perf-pendiente::before { background: #454F59; }
.person-card.perf-sin_tareas::before{ background: #2C333A; }
.person-card.perf-deuda::before     { background: #CA3521; animation: deudaPulse 2s ease-in-out infinite; }

@keyframes deudaPulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }

.person-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--ds-space-150);
}

.person-name {
  font-size: var(--ds-font-size-body);
  font-weight: var(--ds-font-weight-semibold);
  color: var(--ds-text);
  display: flex;
  align-items: center;
  gap: var(--ds-space-100);
}

/* ADS Avatar */
.person-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: var(--ds-font-weight-bold);
  color: white;
  flex-shrink: 0;
}

/* ADS Lozenge as perf badge */
.perf-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 4px;
  border-radius: var(--ds-radius);
  font-size: var(--ds-font-size-small);
  font-weight: var(--ds-font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.perf-badge.excelente  { background: var(--loz-success-bg);    color: var(--loz-success-text); }
.perf-badge.en_camino  { background: var(--loz-warning-bg);    color: var(--loz-warning-text); }
.perf-badge.atrasado   { background: var(--loz-error-bg);      color: var(--loz-error-text); }
.perf-badge.bloqueado  { background: var(--loz-error-bg);      color: var(--loz-error-text); }
.perf-badge.pendiente  { background: var(--loz-default-bg);    color: var(--loz-default-text); }
.perf-badge.sin_tareas { background: #2C333A;                   color: var(--ds-text-subtlest); }
.perf-badge.deuda      { background: var(--loz-error-bg);      color: var(--loz-error-text); }

.person-progress { margin-bottom: var(--ds-space-150); }

.person-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: var(--ds-font-size-small);
  color: var(--ds-text-subtle);
  margin-bottom: var(--ds-space-050);
}

.person-progress-pct {
  font-weight: var(--ds-font-weight-semibold);
  color: var(--ds-text);
}

/* ADS Progress Bar */
.person-bar {
  width: 100%;
  height: 6px;
  background: #2C333A;
  border-radius: var(--ds-radius-pill);
  overflow: hidden;
}

.person-bar-fill {
  height: 100%;
  border-radius: var(--ds-radius-pill);
  transition: width 0.9s cubic-bezier(.4,0,.2,1);
}

.person-bar-fill.bar-excellent { background: #1F845A; }
.person-bar-fill.bar-ontrack   { background: #B38600; }
.person-bar-fill.bar-behind    { background: #CA3521; }
.person-bar-fill.bar-neutral   { background: #454F59; }

.person-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--ds-space-050);
  margin-bottom: var(--ds-space-100);
}

.person-stat {
  text-align: center;
  padding: var(--ds-space-075) var(--ds-space-025);
  background: #1D2125;
  border-radius: var(--ds-radius);
  border: 1px solid rgba(116, 140, 171, 0.08);
}

.person-stat-value { font-size: 18px; font-weight: var(--ds-font-weight-bold); line-height: 1; }
.person-stat-label { font-size: 10px; color: var(--ds-text-subtlest); text-transform: uppercase; letter-spacing: 0.3px; margin-top: 2px; }

.stat-pending  .person-stat-value { color: var(--ds-text-subtle); }
.stat-progress .person-stat-value { color: #579DFF; }
.stat-blocked  .person-stat-value { color: var(--ds-text-danger); }
.stat-done     .person-stat-value { color: var(--ds-text-success); }

.velocity-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--ds-font-size-small);
  color: var(--ds-text-subtle);
  padding-top: var(--ds-space-100);
  border-top: 1px solid rgba(116, 140, 171, 0.1);
}

.velocity-value { font-weight: var(--ds-font-weight-semibold); color: #579DFF; }
.overdue-flag   { font-size: var(--ds-font-size-small); color: var(--ds-text-danger); font-weight: var(--ds-font-weight-semibold); }

/* ============================================================
   DEBT SECTION
   ============================================================ */
.debt-section {
  margin-top: var(--ds-space-100);
  padding: var(--ds-space-100) var(--ds-space-150);
  background: rgba(202, 53, 33, 0.08);
  border: 1px solid rgba(202, 53, 33, 0.2);
  border-radius: var(--ds-radius);
}

.debt-title {
  font-size: var(--ds-font-size-small);
  font-weight: var(--ds-font-weight-bold);
  color: var(--ds-text-danger);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: var(--ds-space-050);
}

.debt-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }

.debt-item {
  font-size: var(--ds-font-size-small);
  color: var(--ds-text-danger);
  display: flex;
  align-items: flex-start;
  gap: var(--ds-space-050);
  line-height: 1.4;
}

.debt-item-id {
  font-family: monospace;
  font-size: 11px;
  font-weight: bold;
  color: #579DFF;
  flex-shrink: 0;
}

.debt-item-date {
  font-size: 10px;
  color: rgba(248, 113, 104, 0.6);
  flex-shrink: 0;
  margin-left: auto;
  padding-left: var(--ds-space-050);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .app-header  { padding: 0 var(--ds-space-150); }
  .app-main    { padding: var(--ds-space-150); }
  .task-grid   { grid-template-columns: 1fr; }
  .stats-grid  { grid-template-columns: repeat(2, 1fr); }
  .form-row    { grid-template-columns: 1fr; }
  .filter-bar  { flex-direction: column; }
  .filter-bar select { width: 100%; }
  .burndown-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .app-logo span { display: none; }
  .header-nav { gap: var(--ds-space-050); }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.hidden { display: none !important; }
.mt-1 { margin-top: var(--ds-space-075); }
.mt-2 { margin-top: var(--ds-space-150); }
.mt-3 { margin-top: var(--ds-space-200); }
.mt-4 { margin-top: var(--ds-space-300); }
.mb-1 { margin-bottom: var(--ds-space-075); }
.mb-2 { margin-bottom: var(--ds-space-150); }
.mb-3 { margin-bottom: var(--ds-space-200); }
.mb-4 { margin-bottom: var(--ds-space-300); }
.flex  { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-1 { gap: var(--ds-space-075); }
.gap-2 { gap: var(--ds-space-150); }
.text-center { text-align: center; }
.text-muted  { color: var(--ds-text-subtle); }
.text-dim    { color: var(--ds-text-subtlest); }
.text-sm     { font-size: var(--ds-font-size-body); }
.text-xs     { font-size: var(--ds-font-size-small); }
