/* ============================================
   PMO DASHBOARD — Dataproa (white-label)
   Sistema de gestión de proyectos
   Branding v1.0: paleta parametrizable por tokens en :root
   Para re-marcar: cambia solo los tokens --brand* / --accent* de abajo.
   ============================================ */

/* --- CSS Variables — Tokens de marca (single source of truth) --- */
:root {
  /* Marca (defaults Dataproa — azul). Editar aquí para re-marcar todo. */
  --brand:       #004aad;   /* color primario de marca */
  --brand-dark:  #003580;   /* variante oscura para gradientes/hover */
  --brand-light: #1a6bd6;   /* variante clara para estados activos */
  --accent:      #C9A84C;   /* acento secundario */
  --accent-soft: rgba(201, 168, 76, 0.18);
  --brand-gray:  #555555;   /* gris neutro */
  --brand-white: #FFFFFF;
  --brand-muted: #B8C9E0;   /* tono muted para texto secundario */

  /* Dark theme derivado de la paleta de marca */
  --bg-primary:     #05102a;   /* navy muy oscuro derivado de --brand-dark */
  --bg-secondary:   #0a1a3d;   /* sidebar — navy oscuro */
  --bg-card:        #0f2451;   /* cards — navy medio */
  --bg-card-hover:  #142c5f;
  --bg-input:       #0f2451;
  --border-color:   #1c3566;
  --border-light:   #2a4680;

  --text-primary:   #f0f5ff;   /* casi blanco con leve tinte azul */
  --text-secondary: #B8C9E0;   /* = --brand-muted */
  --text-muted:     #7a8ba8;
  --text-accent:    #C9A84C;   /* acento para links/acentos de texto */

  /* Acentos principales — marca como primario, accent como secundario */
  --accent-primary:        #004aad;
  --accent-primary-hover:  #1a6bd6;
  --accent-secondary:      #C9A84C;
  --accent-gradient:       linear-gradient(135deg, #004aad 0%, #003580 100%);
  --accent-gradient-gold:  linear-gradient(135deg, #C9A84C 0%, #a88938 100%);

  /* Estados semánticos */
  --status-completed:    #22c55e;
  --status-completed-bg: rgba(34, 197, 94, 0.15);
  --status-in-progress:  #C9A84C;                /* accent = "en curso" */
  --status-in-progress-bg: rgba(201, 168, 76, 0.15);
  --status-pending:      #7a8ba8;
  --status-pending-bg:   rgba(122, 139, 168, 0.15);
  --status-blocked:      #ef4444;
  --status-blocked-bg:   rgba(239, 68, 68, 0.15);
  --status-review:       #1a6bd6;                /* variante clara de marca */
  --status-review-bg:    rgba(26, 107, 214, 0.15);

  --priority-critical: #ef4444;
  --priority-high:     #C9A84C;
  --priority-medium:   #1a6bd6;
  --priority-low:      #7a8ba8;

  --shadow-sm:   0 1px 3px rgba(0, 15, 40, 0.45);
  --shadow-md:   0 4px 12px rgba(0, 15, 40, 0.55);
  --shadow-lg:   0 8px 24px rgba(0, 15, 40, 0.65);
  --shadow-glow: 0 0 24px rgba(0, 74, 173, 0.28);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --transition: all 0.2s ease;
  --sidebar-width: 260px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  font-feature-settings: "ss01", "ss02";
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

a { color: var(--text-accent); text-decoration: none; }
a:hover { color: var(--accent-primary-hover); }

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

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0, 74, 173, 0.3);
  flex-shrink: 0;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-text h1 {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-white);
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.logo-text h1 .brand-value {
  color: var(--brand-white);
}
.logo-text h1 .brand-strategy {
  color: var(--accent);
}

.logo-text span {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-top: 2px;
}

.sidebar-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(180deg, var(--brand-dark) 0%, var(--bg-secondary) 100%);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 20px;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 0 10px;
  margin-bottom: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-size: 13px;
  font-weight: 500;
  position: relative;
}

.nav-item:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(0, 74, 173, 0.12);
  color: var(--accent-primary-hover);
}

.nav-item .nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.nav-item .nav-badge {
  margin-left: auto;
  background: var(--accent-primary);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  color: white;
}

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

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

/* --- Main Content --- */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- Top Bar --- */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb .separator { opacity: 0.4; }

.breadcrumb .current {
  color: var(--text-primary);
  font-weight: 600;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-bar {
  position: relative;
}

.search-bar input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 14px 8px 36px;
  color: var(--text-primary);
  font-size: 13px;
  width: 260px;
  outline: none;
  transition: var(--transition);
}

.search-bar input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 74, 173, 0.1);
}

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

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

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== Language switch (ES/EN) ===== */
.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-card);
}

.lang-switch .lang-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 6px 10px;
  cursor: pointer;
  transition: var(--transition);
}

.lang-switch .lang-btn + .lang-btn {
  border-left: 1px solid var(--border-color);
}

.lang-switch .lang-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.lang-switch .lang-btn.active {
  background: var(--accent-primary);
  color: #fff;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 15px;
}

.icon-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.icon-btn.has-notification::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: var(--status-blocked);
  border-radius: 50%;
}

/* --- Page Content --- */
.page-content {
  padding: 24px 28px;
  flex: 1;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.4px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 4px;
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
}

.btn-primary:hover {
  opacity: 0.9;
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
}

.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

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

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* --- KPI Cards Grid --- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.kpi-card.kpi-completed::before { background: var(--status-completed); }
.kpi-card.kpi-progress::before { background: var(--status-in-progress); }
.kpi-card.kpi-pending::before { background: var(--status-pending); }
.kpi-card.kpi-blocked::before { background: var(--status-blocked); }
.kpi-card.kpi-accent::before { background: var(--accent-gradient); }

.kpi-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.kpi-icon.green { background: var(--status-completed-bg); color: var(--status-completed); }
.kpi-icon.yellow { background: var(--status-in-progress-bg); color: var(--status-in-progress); }
.kpi-icon.blue { background: var(--status-review-bg); color: var(--status-review); }
.kpi-icon.red { background: var(--status-blocked-bg); color: var(--status-blocked); }
.kpi-icon.purple { background: rgba(0, 74, 173, 0.15); color: var(--brand-light); }

.kpi-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
}

.kpi-trend.up { color: var(--status-completed); }
.kpi-trend.down { color: var(--status-blocked); }
.kpi-trend.neutral { color: var(--text-muted); }

.kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.kpi-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

.kpi-progress-bar {
  margin-top: 12px;
  height: 4px;
  background: var(--bg-input);
  border-radius: 2px;
  overflow: hidden;
}

.kpi-progress-bar .fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}

.kpi-progress-bar .fill.green { background: var(--status-completed); }
.kpi-progress-bar .fill.yellow { background: var(--status-in-progress); }
.kpi-progress-bar .fill.blue { background: var(--status-review); }
.kpi-progress-bar .fill.purple { background: var(--accent-secondary); }

/* --- Cards & Sections --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-light);
}

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

.card-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  padding: 20px;
}

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

/* --- Grid Layouts --- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.grid-2-1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.grid-1-2 {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
}

/* --- Phase/Project Cards --- */
.phase-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.phase-item {
  display: grid;
  grid-template-columns: 40px 1fr 120px 100px 140px 80px;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  gap: 12px;
}

.phase-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color);
  border-radius: var(--radius-sm);
}

.phase-item .phase-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.phase-item .phase-info h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.phase-item .phase-info p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.phase-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phase-progress .bar {
  flex: 1;
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}

.phase-progress .bar .fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.phase-progress .pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 35px;
  text-align: right;
}

/* --- Status Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

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

.badge-in-progress {
  background: var(--status-in-progress-bg);
  color: var(--status-in-progress);
}

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

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

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

.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Priority badges */
.badge-critical { background: rgba(239,68,68,0.12); color: #ef4444; }
.badge-high { background: rgba(245,158,11,0.12); color: #f59e0b; }
.badge-medium { background: rgba(59,130,246,0.12); color: #3b82f6; }
.badge-low { background: rgba(100,116,139,0.12); color: #64748b; }

/* --- Owner Tag --- */
.owner-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.owner-tag .avatar-sm {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: white;
}

.avatar-owner { background: var(--brand); }
.avatar-gonzalo { background: #22c55e; }
.avatar-assistant { background: var(--accent); color: var(--brand-dark); }
.avatar-david { background: #f59e0b; }
.avatar-magdalena { background: #ec4899; }

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  padding: 12px 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: var(--bg-primary);
}

.timeline-item.completed::before {
  background: var(--status-completed);
  border-color: var(--status-completed);
}

.timeline-item.active::before {
  background: var(--status-in-progress);
  border-color: var(--status-in-progress);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

.timeline-date {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.timeline-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
}

.timeline-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* --- Task List --- */
.task-list {
  display: flex;
  flex-direction: column;
}

.task-item {
  display: grid;
  grid-template-columns: 32px 1fr 120px 100px 100px 60px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
  transition: var(--transition);
}

.task-item:last-child { border-bottom: none; }

.task-item:hover {
  background: var(--bg-card-hover);
}

.task-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid var(--border-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  background: transparent;
  color: transparent;
  font-size: 12px;
}

.task-checkbox:hover {
  border-color: var(--accent-primary);
}

.task-checkbox.checked {
  background: var(--status-completed);
  border-color: var(--status-completed);
  color: white;
}

.task-title {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}

.task-title.completed-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.task-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: var(--transition);
}

.task-item:hover .task-actions {
  opacity: 1;
}

.task-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: var(--transition);
}

.task-action-btn:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.task-action-btn.delete:hover {
  color: var(--status-blocked);
}

/* --- Tab System --- */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
  padding: 0 4px;
}

.tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  position: relative;
}

.tab:hover {
  color: var(--text-secondary);
}

.tab.active {
  color: var(--accent-primary-hover);
  border-bottom-color: var(--accent-primary);
}

.tab .tab-count {
  margin-left: 6px;
  font-size: 11px;
  background: var(--bg-input);
  padding: 1px 6px;
  border-radius: 8px;
  color: var(--text-muted);
}

.tab.active .tab-count {
  background: rgba(0, 74, 173, 0.15);
  color: var(--accent-primary-hover);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* --- Gantt Chart (Simplified) --- */
.gantt-container {
  overflow-x: auto;
  padding-bottom: 12px;
}

.gantt-chart {
  display: flex;
  flex-direction: column;
  min-width: 900px;
}

.gantt-header {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 4px;
}

.gantt-label-col {
  width: 200px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gantt-timeline-col {
  flex: 1;
  display: flex;
}

.gantt-week {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  padding: 4px 0;
  border-left: 1px solid var(--border-color);
  position: relative;
}

.gantt-week.current {
  color: var(--accent-primary-hover);
  font-weight: 600;
}

.gantt-week.current::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  bottom: -500px;
  width: 2px;
  background: rgba(0, 74, 173, 0.2);
  transform: translateX(-50%);
  z-index: 1;
}

.gantt-row {
  display: flex;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(45, 51, 72, 0.3);
}

.gantt-row-label {
  width: 200px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  padding-right: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-row-bars {
  flex: 1;
  display: flex;
  position: relative;
  height: 28px;
}

.gantt-bar {
  position: absolute;
  height: 22px;
  top: 3px;
  border-radius: 4px;
  font-size: 10px;
  color: white;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: opacity 0.2s;
}

.gantt-bar:hover {
  opacity: 0.85;
  box-shadow: var(--shadow-md);
}

.gantt-bar.completed { background: var(--status-completed); }
.gantt-bar.in-progress { background: var(--status-in-progress); }
.gantt-bar.pending { background: var(--status-pending); }
.gantt-bar.blocked { background: var(--status-blocked); }
.gantt-bar.review { background: var(--status-review); }

/* --- Tables --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
}

.data-table td {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.data-table tr:hover td {
  background: var(--bg-card-hover);
}

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

/* --- Filters Bar --- */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.filter-chip:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
}

.filter-chip.active {
  background: rgba(0, 74, 173, 0.12);
  border-color: rgba(0, 74, 173, 0.3);
  color: var(--accent-primary-hover);
}

/* --- Select & Input --- */
.form-select, .form-input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}

.form-select:focus, .form-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 74, 173, 0.1);
}

.form-select option {
  background: var(--bg-secondary);
}

.form-group {
  margin-bottom: 16px;
}

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

textarea.form-input {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

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

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
}

/* --- Progress Ring --- */
.progress-ring {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto;
}

.progress-ring svg {
  transform: rotate(-90deg);
}

.progress-ring circle {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
}

.progress-ring .ring-bg {
  stroke: var(--border-color);
}

.progress-ring .ring-fill {
  transition: stroke-dashoffset 1s ease;
}

.progress-ring .ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.progress-ring .ring-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.progress-ring .ring-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* --- Activity Feed --- */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

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

.activity-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.activity-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Calendar Mini --- */
.calendar-mini {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-day-header {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 0;
  text-transform: uppercase;
}

.calendar-day {
  text-align: center;
  padding: 6px 4px;
  font-size: 12px;
  color: var(--text-secondary);
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.calendar-day:hover {
  background: var(--bg-card-hover);
}

.calendar-day.today {
  background: var(--accent-primary);
  color: white;
  font-weight: 600;
}

.calendar-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-secondary);
}

.calendar-day.other-month {
  color: var(--text-muted);
  opacity: 0.4;
}

/* --- Stat Pill --- */
.stat-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
}

.stat-pill .stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

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

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

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state h4 {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 13px;
  max-width: 360px;
  margin: 0 auto;
}

/* --- Tooltip --- */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 11px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  z-index: 200;
  box-shadow: var(--shadow-md);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* --- View Containers --- */
.view-container {
  display: none;
}

.view-container.active {
  display: block;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-2-1 { grid-template-columns: 1fr; }
  .grid-1-2 { grid-template-columns: 1fr; }

  .phase-item {
    grid-template-columns: 32px 1fr 100px 80px;
  }

  .phase-item .phase-dates,
  .phase-item .phase-actions {
    display: none;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .menu-toggle {
    display: block;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-content {
    padding: 16px;
  }

  .top-bar {
    padding: 12px 16px;
  }

  .search-bar input {
    width: 180px;
  }

  .task-item {
    grid-template-columns: 32px 1fr 80px;
  }

  .task-item .task-owner,
  .task-item .task-priority,
  .task-item .task-actions {
    display: none;
  }

  .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .search-bar {
    display: none;
  }

  .header-actions {
    flex-wrap: wrap;
  }
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-in {
  animation: fadeIn 0.3s ease forwards;
}

.card, .kpi-card {
  animation: fadeIn 0.4s ease forwards;
}

/* --- Detail Panel (for project drill-down) --- */
.detail-panel {
  display: none;
}

.detail-panel.active {
  display: block;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.detail-back {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: var(--transition);
}

.detail-back:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.detail-title h2 {
  font-size: 20px;
  font-weight: 700;
}

.detail-title .detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

/* --- Subtask styles --- */
.subtask-group {
  margin-left: 20px;
  border-left: 2px solid var(--border-color);
  padding-left: 12px;
}

.subtask-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 500;
}

.subtask-toggle:hover {
  color: var(--text-secondary);
}

/* --- Notification Toast --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-primary);
  animation: slideInRight 0.3s ease;
  min-width: 280px;
}

.toast.success { border-left: 3px solid var(--status-completed); }
.toast.error { border-left: 3px solid var(--status-blocked); }
.toast.info { border-left: 3px solid var(--status-review); }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* --- Drag handle --- */
.drag-handle {
  cursor: grab;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.2s;
}

.task-item:hover .drag-handle {
  opacity: 1;
}

/* --- Inline edit --- */
.inline-edit {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-primary);
  font-size: inherit;
  font-family: inherit;
  font-weight: inherit;
  padding: 2px 4px;
  border-radius: 4px;
  outline: none;
  width: 100%;
}

.inline-edit:focus {
  background: var(--bg-input);
  border-color: var(--accent-primary);
}

/* --- Chart placeholder --- */
.chart-area {
  width: 100%;
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
}

.chart-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-bar-label {
  width: 100px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-bar {
  height: 24px;
  border-radius: 4px;
  transition: width 0.6s ease;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 11px;
  color: white;
  font-weight: 500;
  min-width: 30px;
}

/* ============================================
   DAILY EXECUTION VIEW
   ============================================ */

.daily-exec-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 1100px) {
  .daily-exec-layout { grid-template-columns: 1fr; }
}

.daily-exec-calendar {
  position: sticky;
  top: 16px;
}

.daily-exec-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.cal-month-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  text-transform: capitalize;
}

.cal-nav-btn {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.cal-nav-btn:hover { background: var(--accent-primary); border-color: var(--accent-primary); }

.cal-weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}

.cal-weekday {
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  padding: 4px 0;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-cell {
  aspect-ratio: 1;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.15s;
  min-height: 44px;
}

.cal-cell:hover {
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.cal-cell-empty { background: transparent; border-color: transparent; cursor: default; }
.cal-cell-empty:hover { transform: none; }

.cal-cell-day {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.cal-cell-today {
  border-color: var(--status-in-progress);
  box-shadow: 0 0 0 1px var(--status-in-progress);
}

.cal-cell-today .cal-cell-day { color: var(--status-in-progress); font-weight: 700; }

.cal-cell-milestone::before {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  background: var(--accent-secondary);
  border-radius: 50%;
}

.cal-cell-selected {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}
.cal-cell-selected .cal-cell-day { color: white; }

.cal-cell-synthetic {
  background: var(--bg-card);
  border-style: dashed;
  opacity: 0.85;
}

.cal-cell-progress {
  height: 2px;
  background: var(--bg-primary);
  border-radius: 1px;
  overflow: hidden;
  margin-top: 2px;
}

.cal-cell-progress-bar {
  height: 100%;
  background: var(--status-completed);
  transition: width 0.3s;
}

.cal-cell-dots {
  display: flex;
  gap: 2px;
  justify-content: flex-start;
  margin-top: 2px;
}

.cal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.cal-legend {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cal-legend-title {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 2px;
}

.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

.cal-legend-box {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  display: inline-block;
  position: relative;
}

.cal-legend-box.cal-cell-milestone::before {
  top: 2px;
  right: 2px;
  width: 4px;
  height: 4px;
}

/* ========= DETAIL PANEL ========= */

.daily-detail-header {
  margin-bottom: 16px;
}

.daily-detail-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.daily-detail-eyebrow {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.daily-synthetic-badge {
  background: var(--bg-primary);
  color: var(--text-muted);
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 6px;
  border: 1px dashed var(--border-color);
}

.daily-detail-date {
  margin: 4px 0;
  font-size: 20px;
  color: var(--text-primary);
  text-transform: capitalize;
}

.daily-today-badge {
  background: var(--status-in-progress);
  color: var(--bg-primary);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  margin-left: 8px;
  vertical-align: middle;
}

.daily-detail-milestone {
  color: var(--accent-secondary);
  font-weight: 600;
  font-size: 13px;
  margin-top: 4px;
}

.daily-detail-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.daily-progress-ring {
  --progress: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: conic-gradient(var(--status-completed) calc(var(--progress) * 1%), var(--bg-primary) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.daily-progress-ring::before {
  content: '';
  position: absolute;
  inset: 4px;
  background: var(--bg-card);
  border-radius: 50%;
}

.daily-progress-ring span {
  position: relative;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.daily-progress-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.daily-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

@media (max-width: 900px) {
  .daily-summary-grid { grid-template-columns: 1fr; }
}

.daily-summary-cell {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px;
}

.daily-summary-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.daily-summary-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.daily-detail-filters {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  align-items: center;
}

/* ========= LAYER GROUPS ========= */

.daily-layer-group {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
}

.daily-layer-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.daily-layer-icon {
  font-size: 16px;
  font-weight: 700;
}

.daily-layer-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.daily-layer-desc {
  color: var(--text-muted);
  font-size: 11px;
  font-style: italic;
}

.daily-layer-count {
  margin-left: auto;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  color: var(--text-secondary);
}

.daily-blocks {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.daily-block {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  transition: border-color 0.15s;
}

.daily-block:hover { border-color: var(--border-light); }

.daily-block-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.daily-block-time {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 12px;
  color: var(--accent-secondary);
  min-width: 90px;
  font-family: monospace;
}

.daily-block-title-wrap {
  flex: 1;
  min-width: 0;
}

.daily-block-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.daily-block-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.45;
}

.daily-block-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  flex-shrink: 0;
}

.daily-block-prio {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
}

.daily-block-cat {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

.daily-block-info {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
}

.daily-block-chip {
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-card);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.daily-block-chip strong {
  color: var(--text-primary);
  margin-right: 3px;
}

.daily-block-cmd code {
  color: var(--accent-secondary);
  font-family: monospace;
  font-size: 11px;
}

.daily-block-src {
  color: var(--text-muted);
  font-style: italic;
  font-size: 10px;
}

.daily-block-checklist {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.daily-block-checklist-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.daily-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}

.daily-check:hover { background: var(--bg-card-hover); }

.daily-check-box {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1.5px solid var(--border-light);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: white;
  margin-top: 1px;
}

.daily-check-done .daily-check-box {
  background: var(--status-completed);
  border-color: var(--status-completed);
}

.daily-check-text {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.4;
}

.daily-check-done .daily-check-text {
  color: var(--text-muted);
  text-decoration: line-through;
}

.daily-block-linked {
  margin-top: 6px;
  font-size: 11px;
  color: var(--accent-primary-hover);
  background: rgba(0, 74, 173, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  border: 1px solid rgba(0, 74, 173, 0.2);
}

.daily-block-linked strong { color: var(--text-primary); }
.daily-block-linked em { color: var(--accent-secondary); font-style: normal; font-weight: 600; }

/* ============================================
   CLICKABLE KPIs (Bundle A)
   ============================================ */

.kpi-clickable {
  cursor: pointer;
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
}

.kpi-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 74, 173, 0.25);
}

.kpi-clickable::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  background: var(--accent-secondary);
  border-radius: 50%;
  opacity: 0.6;
}

.kpi-drilldown-hint {
  margin-top: 8px;
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.kpi-clickable:hover .kpi-drilldown-hint {
  opacity: 1;
  color: var(--accent-secondary);
}

/* ============================================
   GANTT BAR ENHANCED TOOLTIP (Bundle C item 6)
   ============================================ */

.gantt-bar-enhanced {
  position: relative;
  cursor: pointer;
  overflow: visible !important;
}

.gantt-bar-label {
  position: relative;
  z-index: 1;
}

.gantt-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  max-width: 340px;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--accent-secondary);
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  color: var(--text-primary);
  font-size: 11px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 100;
}

.gantt-bar-enhanced:hover .gantt-tooltip {
  opacity: 1;
  pointer-events: auto;
}

.gantt-tooltip-title {
  font-weight: 700;
  font-size: 12px;
  color: var(--accent-secondary);
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-color);
}

.gantt-tooltip-row {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.gantt-tooltip-row strong { color: var(--text-primary); margin-right: 4px; }

/* Show the label only when the bar is wide enough */
.gantt-bar-enhanced .gantt-bar-label {
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 6px;
}

/* ==========================================================================
   POLISH — Capa de refinamiento visual top-tier (no estructural)
   ==========================================================================
   Eleva todas las vistas al nivel de consultoría premium manteniendo
   la identidad de marca (navy + acento). Solo enhancements CSS —
   no cambia HTML ni JS ni data. Puesta al final del archivo para
   override de las clases existentes sin romper nada.
   ========================================================================== */

:root {
  --shadow-card-default: 0 2px 8px rgba(0, 15, 40, 0.35), 0 1px 2px rgba(0, 15, 40, 0.2);
  --shadow-card-hover:   0 12px 28px rgba(0, 74, 173, 0.25), 0 4px 10px rgba(0, 15, 40, 0.4);
  --shadow-card-active:  0 18px 40px rgba(0, 74, 173, 0.35), 0 6px 14px rgba(0, 15, 40, 0.5);
  --shadow-inner-deep:   inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --border-accent-grad:  linear-gradient(135deg, rgba(0, 74, 173, 0.4), rgba(201, 168, 76, 0.35));
}

/* ----- GLOBAL CARD ELEVATION ----- */
.card {
  box-shadow: var(--shadow-card-default), var(--shadow-inner-deep);
  background: linear-gradient(180deg, var(--bg-card) 0%, #0d2048 100%);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-card-hover), var(--shadow-inner-deep);
  border-color: rgba(201, 168, 76, 0.35);
}

/* ----- KPI CARDS — ELEVACION CORPORATIVA ----- */
.kpi-card {
  background: linear-gradient(180deg, var(--bg-card) 0%, #0d2048 100%);
  box-shadow: var(--shadow-card-default), var(--shadow-inner-deep);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease, border-color 0.2s ease;
  position: relative;
}

.kpi-card::before {
  height: 3px;
  box-shadow: 0 0 18px rgba(201, 168, 76, 0.3);
}

.kpi-card.kpi-accent::before {
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-light) 50%, var(--accent) 100%);
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover), var(--shadow-inner-deep);
  border-color: rgba(201, 168, 76, 0.45);
}

.kpi-card .kpi-value {
  font-size: 30px;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #f0f5ff 0%, #B8C9E0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.kpi-card .kpi-icon {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s ease;
}

.kpi-card:hover .kpi-icon { transform: scale(1.08) rotate(-3deg); }

/* ----- KPI CLICKABLE — INDICADOR REFINADO ----- */
.kpi-clickable::after { display: none !important; }

.kpi-clickable {
  cursor: pointer;
}

.kpi-clickable::before {
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-light) 50%, var(--accent) 100%) !important;
  height: 3px !important;
  transition: height 0.25s ease, box-shadow 0.25s ease;
}

.kpi-clickable:hover::before {
  height: 5px !important;
  box-shadow: 0 0 22px rgba(201, 168, 76, 0.55);
}

.kpi-clickable:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-active), var(--shadow-inner-deep);
  border-color: var(--accent-secondary);
}

.kpi-drilldown-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  margin-top: 10px;
  background: linear-gradient(135deg, rgba(0, 74, 173, 0.15), rgba(201, 168, 76, 0.1));
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-secondary);
  opacity: 0.7;
  font-style: normal;
  transition: opacity 0.2s ease, transform 0.2s ease;
  letter-spacing: 0.3px;
}

.kpi-clickable:hover .kpi-drilldown-hint {
  opacity: 1;
  transform: translateX(3px);
  background: linear-gradient(135deg, rgba(0, 74, 173, 0.3), rgba(201, 168, 76, 0.2));
}

.kpi-drilldown-hint::after {
  content: '→';
  font-size: 11px;
  margin-left: 2px;
  transition: transform 0.2s ease;
}

.kpi-clickable:hover .kpi-drilldown-hint::after { transform: translateX(3px); }

/* ----- DAILY EXECUTION — CALENDARIO REFINADO ----- */
.daily-exec-calendar.card {
  background: linear-gradient(180deg, var(--bg-card) 0%, #0a1a3d 100%);
  border: 1px solid rgba(201, 168, 76, 0.15);
  box-shadow: var(--shadow-card-hover), var(--shadow-inner-deep);
}

.daily-exec-cal-header {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
}

.cal-month-title {
  font-size: 16px;
  letter-spacing: 0.3px;
  background: linear-gradient(135deg, #f0f5ff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cal-nav-btn {
  background: linear-gradient(135deg, rgba(0, 74, 173, 0.3), rgba(26, 107, 214, 0.25));
  border: 1px solid rgba(26, 107, 214, 0.3);
  color: var(--brand-muted);
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.cal-nav-btn:hover {
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: white;
  border-color: var(--accent-secondary);
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(201, 168, 76, 0.3);
}

.cal-weekday {
  font-size: 10px;
  color: var(--accent-secondary);
  opacity: 0.7;
  letter-spacing: 1px;
  font-weight: 700;
}

.cal-cell {
  background: linear-gradient(160deg, rgba(20, 44, 95, 0.55), rgba(15, 36, 81, 0.3));
  border: 1px solid rgba(28, 53, 102, 0.6);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s, box-shadow 0.2s;
  padding: 5px;
}

.cal-cell:hover {
  background: linear-gradient(160deg, rgba(26, 107, 214, 0.35), rgba(0, 74, 173, 0.2));
  border-color: var(--accent-secondary);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 74, 173, 0.3);
  z-index: 2;
}

.cal-cell-today {
  background: linear-gradient(160deg, rgba(201, 168, 76, 0.22), rgba(201, 168, 76, 0.08));
  border-color: var(--accent-secondary);
  box-shadow: inset 0 0 0 1px var(--accent-secondary), 0 4px 12px rgba(201, 168, 76, 0.2);
}

.cal-cell-today .cal-cell-day {
  color: #f5e8b8;
  text-shadow: 0 1px 3px rgba(201, 168, 76, 0.5);
}

.cal-cell-selected {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  border-color: var(--accent-secondary);
  box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.3), 0 8px 20px rgba(0, 74, 173, 0.45);
  transform: translateY(-1px);
}

.cal-cell-selected .cal-cell-day {
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.cal-cell-milestone::before {
  background: linear-gradient(135deg, var(--accent), #e5c673);
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.7);
  width: 7px;
  height: 7px;
  top: 4px;
  right: 4px;
}

.cal-cell-progress { height: 3px; background: rgba(0, 15, 40, 0.5); }

.cal-cell-progress-bar {
  background: linear-gradient(90deg, #22c55e 0%, var(--accent) 100%);
  box-shadow: 0 0 4px rgba(34, 197, 94, 0.5);
}

.cal-dot { box-shadow: 0 0 4px currentColor; }

.cal-cell-synthetic {
  background: repeating-linear-gradient(45deg, rgba(15, 36, 81, 0.3), rgba(15, 36, 81, 0.3) 4px, rgba(20, 44, 95, 0.35) 4px, rgba(20, 44, 95, 0.35) 8px);
  border-style: dashed;
  border-color: rgba(122, 139, 168, 0.25);
}

.cal-legend {
  padding-top: 14px;
  border-top: 1px solid rgba(201, 168, 76, 0.15);
  gap: 6px;
}

.cal-legend-title {
  color: var(--accent-secondary);
  font-size: 10px;
  letter-spacing: 0.8px;
  opacity: 0.8;
}

.cal-legend-box { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }

/* ----- DAILY DETAIL HEADER — CARD JERARQUICA ----- */
.daily-detail-header.card {
  background: linear-gradient(135deg, rgba(0, 74, 173, 0.12) 0%, rgba(201, 168, 76, 0.06) 100%), linear-gradient(180deg, var(--bg-card), #0d2048);
  border: 1px solid rgba(201, 168, 76, 0.2);
  box-shadow: var(--shadow-card-hover), 0 0 0 1px rgba(201, 168, 76, 0.05), var(--shadow-inner-deep);
}

.daily-detail-eyebrow {
  color: var(--accent-secondary);
  font-size: 10px;
  letter-spacing: 1.2px;
  opacity: 0.9;
}

.daily-synthetic-badge {
  background: rgba(122, 139, 168, 0.15);
  border: 1px dashed rgba(122, 139, 168, 0.4);
  color: var(--text-muted);
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 9px;
  letter-spacing: 0.3px;
}

.daily-detail-date {
  font-size: 22px;
  letter-spacing: -0.01em;
  font-weight: 700;
  background: linear-gradient(135deg, #f0f5ff, #B8C9E0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.daily-today-badge {
  background: linear-gradient(135deg, var(--accent), #a88938);
  color: var(--bg-primary);
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(201, 168, 76, 0.4);
  text-transform: uppercase;
  font-size: 10px;
}

.daily-detail-milestone {
  background: linear-gradient(90deg, rgba(201, 168, 76, 0.12), transparent);
  padding: 6px 12px;
  border-left: 3px solid var(--accent-secondary);
  border-radius: 0 4px 4px 0;
  margin-top: 8px;
  font-size: 13px;
  color: #e5c673;
}

.daily-progress-ring {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 4px 10px rgba(34, 197, 94, 0.25));
}

.daily-progress-ring::before { inset: 6px; }

.daily-progress-ring span {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Summary cells por capa */
.daily-summary-cell {
  padding: 12px;
  border-radius: var(--radius-sm);
  transition: transform 0.2s ease, border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.daily-summary-cell::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
}

.daily-summary-cell.daily-summary-strategic { background: linear-gradient(135deg, rgba(0, 74, 173, 0.1), rgba(0, 74, 173, 0.02)); border: 1px solid rgba(0, 74, 173, 0.25); }
.daily-summary-cell.daily-summary-strategic::before { background: var(--brand); }
.daily-summary-cell.daily-summary-tactical { background: linear-gradient(135deg, rgba(201, 168, 76, 0.1), rgba(201, 168, 76, 0.02)); border: 1px solid rgba(201, 168, 76, 0.25); }
.daily-summary-cell.daily-summary-tactical::before { background: var(--accent); }
.daily-summary-cell.daily-summary-operational { background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.02)); border: 1px solid rgba(34, 197, 94, 0.25); }
.daily-summary-cell.daily-summary-operational::before { background: #22c55e; }

.daily-summary-cell:hover { transform: translateY(-2px); }

.daily-summary-label { letter-spacing: 0.8px; font-size: 10px; }

/* Filtros */
.daily-detail-filters .form-select {
  background: rgba(15, 36, 81, 0.7);
  border: 1px solid rgba(28, 53, 102, 0.8);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.daily-detail-filters .form-select:hover {
  border-color: var(--accent-secondary);
  background: rgba(20, 44, 95, 0.9);
}

/* ----- LAYER GROUPS — HEADERS DIFERENCIADOS ----- */
.daily-layer-group {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-card-default), var(--shadow-inner-deep);
  transition: box-shadow 0.25s ease;
}

.daily-layer-group:hover { box-shadow: var(--shadow-card-hover); }

.daily-layer-header {
  padding: 14px 18px;
  background: linear-gradient(90deg, rgba(10, 26, 61, 0.9), rgba(15, 36, 81, 0.6));
  border-bottom: 1px solid rgba(201, 168, 76, 0.12);
  position: relative;
}

.daily-layer-group[style*="border-left:4px solid #004aad"] .daily-layer-header { background: linear-gradient(90deg, rgba(0, 74, 173, 0.2), rgba(0, 74, 173, 0.04)); }
.daily-layer-group[style*="border-left:4px solid #C9A84C"] .daily-layer-header { background: linear-gradient(90deg, rgba(201, 168, 76, 0.18), rgba(201, 168, 76, 0.03)); }
.daily-layer-group[style*="border-left:4px solid #22c55e"] .daily-layer-header { background: linear-gradient(90deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.03)); }

.daily-layer-icon {
  font-size: 18px;
  text-shadow: 0 0 10px currentColor;
}

.daily-layer-title {
  font-size: 13px;
  letter-spacing: 1.5px;
}

.daily-layer-count {
  background: linear-gradient(135deg, var(--accent-secondary), #a88938);
  color: var(--bg-primary);
  border: none;
  padding: 3px 12px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(201, 168, 76, 0.3);
}

/* ----- DAILY BLOCKS — CARDS PREMIUM ----- */
.daily-blocks { padding: 10px; gap: 10px; }

.daily-block {
  background: linear-gradient(180deg, #0d2048 0%, #0a1838 100%);
  border: 1px solid rgba(28, 53, 102, 0.6);
  border-radius: 8px;
  padding: 14px;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s, box-shadow 0.25s;
  box-shadow: 0 2px 6px rgba(0, 15, 40, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
}

.daily-block::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 0;
  width: 3px;
  background: var(--border-light);
  opacity: 0.4;
  transition: background 0.2s, opacity 0.2s;
}

.daily-block:hover {
  border-color: rgba(201, 168, 76, 0.35);
  transform: translateX(2px);
  box-shadow: 0 6px 16px rgba(0, 74, 173, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.daily-block:hover::before { opacity: 1; background: var(--accent-secondary); }

.daily-block-time {
  font-weight: 700;
  color: var(--accent-secondary);
  font-size: 11px;
  letter-spacing: 0.5px;
  min-width: 92px;
  padding: 4px 8px;
  background: rgba(201, 168, 76, 0.08);
  border-radius: 4px;
  height: fit-content;
  text-align: center;
  border: 1px solid rgba(201, 168, 76, 0.2);
}

.daily-block-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.1px;
}

.daily-block-desc {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(184, 201, 224, 0.85);
  margin-top: 6px;
}

.daily-block-prio {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.daily-block-cat {
  font-size: 10px;
  color: var(--text-secondary);
  padding: 3px 8px;
  background: rgba(15, 36, 81, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.daily-block-info {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(28, 53, 102, 0.7);
  gap: 6px;
}

.daily-block-chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(15, 36, 81, 0.6);
  border: 1px solid rgba(28, 53, 102, 0.7);
  transition: border-color 0.2s, background 0.2s;
}

.daily-block-chip:hover { border-color: rgba(201, 168, 76, 0.35); background: rgba(20, 44, 95, 0.8); }

.daily-block-chip strong { color: var(--accent-secondary); font-weight: 700; }

.daily-block-cmd {
  background: linear-gradient(135deg, rgba(0, 74, 173, 0.15), rgba(0, 74, 173, 0.05));
  border-color: rgba(0, 74, 173, 0.35);
}

.daily-block-cmd code {
  color: #e5c673;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.daily-block-src {
  font-size: 9.5px;
  opacity: 0.7;
  background: transparent;
  border: 1px dashed rgba(122, 139, 168, 0.3);
  color: var(--text-muted);
}

.daily-block-linked {
  margin-top: 8px;
  padding: 5px 10px;
  font-size: 11px;
  color: var(--accent-secondary);
  background: linear-gradient(90deg, rgba(201, 168, 76, 0.12), rgba(201, 168, 76, 0.03));
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-left: 3px solid var(--accent-secondary);
  border-radius: 0 4px 4px 0;
  display: inline-block;
  font-weight: 500;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.daily-block-linked strong { color: #f0f5ff; font-weight: 700; }
.daily-block-linked em { color: #e5c673; font-style: normal; font-weight: 700; }

/* Checklist premium */
.daily-block-checklist {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(28, 53, 102, 0.5);
}

.daily-block-checklist-header {
  color: var(--accent-secondary);
  opacity: 0.85;
  letter-spacing: 1.2px;
  margin-bottom: 8px;
}

.daily-check {
  padding: 7px 8px;
  border-radius: 5px;
  transition: background 0.15s, transform 0.15s;
  margin-bottom: 2px;
}

.daily-check:hover {
  background: rgba(201, 168, 76, 0.06);
  transform: translateX(2px);
}

.daily-check-box {
  width: 17px;
  height: 17px;
  border-radius: 4px;
  border: 1.5px solid rgba(122, 139, 168, 0.5);
  background: rgba(10, 26, 61, 0.8);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.daily-check:hover .daily-check-box { border-color: var(--accent-secondary); }

.daily-check-done .daily-check-box {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border-color: #16a34a;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.daily-check-text {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(240, 245, 255, 0.92);
}

.daily-check-done .daily-check-text {
  color: rgba(122, 139, 168, 0.7);
}

/* ----- MODALES — PRESENTACION CORPORATIVA ----- */
.modal-overlay { backdrop-filter: blur(6px); background: rgba(5, 16, 42, 0.75); }

.modal {
  background: linear-gradient(180deg, #0f2451 0%, #0a1a3d 100%);
  border: 1px solid rgba(201, 168, 76, 0.25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(201, 168, 76, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  background: linear-gradient(90deg, rgba(0, 74, 173, 0.2), transparent);
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
  padding: 16px 24px;
}

.modal-header h3,
.modal-header #modal-title {
  font-size: 16px;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #f0f5ff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-track { background: rgba(10, 26, 61, 0.4); border-radius: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #1c3566, #2a4680); border-radius: 4px; }
.modal-body::-webkit-scrollbar-thumb:hover { background: var(--accent-secondary); }

.modal-footer {
  background: linear-gradient(180deg, transparent, rgba(5, 16, 42, 0.6));
  border-top: 1px solid rgba(28, 53, 102, 0.6);
  padding: 14px 24px;
}

.modal-close {
  background: rgba(28, 53, 102, 0.5);
  border: 1px solid rgba(28, 53, 102, 0.8);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--status-blocked-bg);
  border-color: var(--status-blocked);
  color: var(--status-blocked);
  transform: rotate(90deg);
}

/* ----- GANTT TOOLTIP — POPUP PROFESIONAL ----- */
.gantt-tooltip {
  background: linear-gradient(180deg, #0f2451, #0a1838);
  border: 1px solid rgba(201, 168, 76, 0.4);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(201, 168, 76, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 12px 14px;
  min-width: 300px;
  max-width: 380px;
}

.gantt-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 20px;
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, #0f2451, #0a1838);
  border-right: 1px solid rgba(201, 168, 76, 0.4);
  border-bottom: 1px solid rgba(201, 168, 76, 0.4);
  transform: rotate(45deg);
}

.gantt-tooltip-title {
  color: var(--accent-secondary);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.3px;
  padding-bottom: 6px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
}

.gantt-tooltip-row {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.5;
}

.gantt-tooltip-row strong {
  color: #f0f5ff;
  font-weight: 600;
  margin-right: 6px;
  display: inline-block;
  min-width: 82px;
}

.gantt-bar-enhanced {
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.gantt-bar-enhanced:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}

.gantt-bar-label {
  font-size: 10px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.5px;
}

/* ----- DATA TABLE HOVER (Operativa — plataformas, etc) ----- */
.data-table tbody tr {
  transition: background 0.15s ease, box-shadow 0.2s ease;
}

.data-table tbody tr:hover {
  background: rgba(0, 74, 173, 0.08) !important;
  box-shadow: inset 3px 0 0 var(--accent-secondary);
}

.data-table tbody tr[onclick] td:last-child {
  position: relative;
}

/* ----- BADGES PREMIUM ----- */
.badge {
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.badge-dot::before {
  box-shadow: 0 0 6px currentColor;
}

/* ----- BUTTONS — ELEVACION ----- */
.btn {
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 74, 173, 0.3);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  border: 1px solid rgba(201, 168, 76, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand) 100%);
  border-color: var(--accent-secondary);
  box-shadow: 0 6px 16px rgba(0, 74, 173, 0.45), 0 0 0 1px rgba(201, 168, 76, 0.3);
}

.btn-secondary {
  background: rgba(28, 53, 102, 0.5);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: rgba(42, 70, 128, 0.8);
  color: var(--text-primary);
  border-color: var(--accent-secondary);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(28, 53, 102, 0.6);
}

.btn-ghost:hover {
  background: rgba(28, 53, 102, 0.4);
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
}

/* ----- FORM INPUTS ----- */
.form-select, .form-input {
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.form-select:hover {
  border-color: rgba(201, 168, 76, 0.35);
}

.form-select:focus, .form-input:focus {
  border-color: var(--accent-secondary);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.2);
  outline: none;
}

/* ----- SIDEBAR REFINE ----- */
.sidebar {
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.3);
}

.nav-item {
  transition: all 0.2s ease;
  position: relative;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 70%;
  background: linear-gradient(180deg, var(--accent-secondary), #a88938);
  border-radius: 0 2px 2px 0;
  transition: transform 0.2s ease;
}

.nav-item.active::before,
.nav-item:hover::before { transform: translateY(-50%) scaleY(1); }

.nav-item.active {
  background: linear-gradient(90deg, rgba(0, 74, 173, 0.35), transparent);
  box-shadow: inset 0 0 0 1px rgba(201, 168, 76, 0.15);
}

.nav-badge {
  background: linear-gradient(135deg, var(--accent-secondary), #a88938);
  color: var(--bg-primary);
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  box-shadow: 0 2px 4px rgba(201, 168, 76, 0.3);
}

/* ----- TOP BAR ----- */
.top-bar {
  background: linear-gradient(180deg, rgba(10, 26, 61, 0.95), rgba(10, 26, 61, 0.85));
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* ----- BREADCRUMB ----- */
.breadcrumb .current {
  background: linear-gradient(135deg, var(--accent), #e5c673);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* ----- RESPONSIVE TWEAKS ----- */
@media (max-width: 900px) {
  .daily-block-top { flex-wrap: wrap; }
  .daily-block-time { min-width: auto; }
  .daily-progress-ring { width: 52px; height: 52px; }
  .kpi-card .kpi-value { font-size: 24px; }
}
