
/* ============================================
   buwo Tracker — Dark Premium Theme
   ============================================ */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(255, 255, 255, 0.12);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-from: #00b4ff;
  --accent-to: #0055ff;
  --accent: #0080ff;

  --status-espera: #94a3b8;
  --status-pausa: #f59e0b;
  --status-brief: #f97316;
  --status-diseno: #a78bfa;
  --status-programando: #3b82f6;
  --status-terminado: #4ade80;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --label-width: 170px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Mesh gradient background */
.mesh-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(0, 180, 255, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 90%, rgba(0, 85, 255, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(16, 185, 129, 0.03) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  animation: meshShift 20s ease-in-out infinite alternate;
}

@keyframes meshShift {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(12deg); }
}

.app {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- DASHBOARD TABS ---- */
.dash-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 28px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  width: fit-content;
}

.dash-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.dash-tab:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
}

.dash-tab--active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

.dash-tab-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ---- HEADER ---- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 32px;
}

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

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.header-divider {
  width: 1px;
  height: 24px;
  background: var(--border-subtle);
}

.header-title {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.header-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ---- SECTION TITLES ---- */
.section-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

/* ---- STATUS BAR ---- */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
  animation: fadeSlideUp 0.5s ease-out both;
}

.status-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--pill-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 100px;
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}

.status-pill:hover {
  border-color: var(--pill-color);
  transform: translateY(-1px);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pill-color);
  box-shadow: 0 0 8px var(--pill-color);
}

.status-dot--pulse {
  animation: statusPulse 1.4s ease-in-out infinite;
}

.status-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.status-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pill-color);
  min-width: 18px;
  text-align: center;
}

.status-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.status-total-number {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.status-total-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---- TIMELINE ---- */
.timeline-section {
  margin-bottom: 48px;
  animation: fadeSlideUp 0.6s ease-out both;
  animation-delay: 0.1s;
}

.timeline-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.timeline-wrapper {
  padding: 20px 24px 24px;
  overflow-x: auto;
  min-width: 600px;
}

/* Week header row */
.timeline-header-row {
  display: flex;
  margin-bottom: 8px;
}

.timeline-label-spacer {
  flex: 0 0 var(--label-width);
}

.timeline-weeks-track {
  flex: 1;
  position: relative;
  height: 32px;
}

.timeline-week {
  position: absolute;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 6px;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  border-left: 1px solid var(--border-subtle);
  overflow: hidden;
  white-space: nowrap;
}

/* Shade alternating weeks faintly */
.timeline-week:nth-child(even) {
  background: rgba(255, 255, 255, 0.012);
}

/* ---- TIMELINE ROWS ---- */
.timeline-rows {
  position: relative;
}

.timeline-row {
  display: flex;
  align-items: center;
  height: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.025);
  animation: fadeSlideRight 0.5s ease-out both;
  animation-delay: var(--row-delay);
}

.timeline-row-label {
  flex: 0 0 var(--label-width);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 14px;
}

.timeline-row-track {
  flex: 1;
  position: relative;
  height: 100%;
}

/* Week grid lines behind bars */
.timeline-rows::before {
  content: '';
  position: absolute;
  inset: 0;
  left: var(--label-width);
  background-image: repeating-linear-gradient(
    90deg,
    var(--border-subtle) 0px,
    var(--border-subtle) 1px,
    transparent 1px,
    transparent calc(100% / var(--week-count, 12))
  );
  pointer-events: none;
  opacity: 0.5;
}

/* ---- BARS ---- */
.timeline-bar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: visible;
  cursor: pointer;
  transition: height 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.timeline-bar:hover {
  height: 26px;
  border-color: var(--bar-color);
  box-shadow: 0 0 16px color-mix(in srgb, var(--bar-color) 30%, transparent);
}

/* Active (programando / diseño) bar: border highlight only */
.timeline-bar--active {
  border-color: color-mix(in srgb, var(--bar-color) 45%, transparent);
}

/* Stripes animadas sobre el fill activo */
.timeline-bar-fill--active {
  position: relative;
  overflow: hidden;
}

.timeline-bar-fill--active::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent           0px,
    transparent           5px,
    rgba(255,255,255,0.18) 5px,
    rgba(255,255,255,0.18) 10px
  );
  background-size: 14px 14px;
  animation: stripesMove 0.5s linear infinite;
}

@keyframes stripesMove {
  from { background-position: 0 0; }
  to   { background-position: 14px 0; }
}

/* Done bar */
.timeline-bar--done {
  opacity: 0.38;
  border-style: dashed;
}

.timeline-row--done .timeline-row-label {
  opacity: 0.45;
  text-decoration: line-through;
}

.timeline-row--active .timeline-row-label {
  color: var(--text-primary);
  font-weight: 600;
}

.timeline-row-active-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  margin-right: 6px;
  vertical-align: middle;
  animation: statusPulse 1.4s ease-in-out infinite;
  box-shadow: 0 0 6px #10b981;
}

.timeline-row-done-icon {
  font-size: 0.7rem;
  margin-right: 4px;
  opacity: 0.5;
}

/* Open-ended bar: no right date */
.timeline-bar--open {
  border-right-style: dashed;
  border-right-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(90deg, rgba(255,255,255,0.06) 55%, rgba(255,255,255,0.015) 100%);
}

.timeline-bar--open::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.25));
  border-radius: 0 4px 4px 0;
  pointer-events: none;
}

.timeline-bar-open-hint {
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: var(--bar-color);
  opacity: 0.45;
  letter-spacing: 2px;
  pointer-events: none;
}

.timeline-bar-fill {
  height: 100%;
  background: var(--bar-color);
  border-radius: 4px;
  opacity: 0.55;
  transition: width 1s ease-out;
  box-shadow: 0 0 6px color-mix(in srgb, var(--bar-color) 50%, transparent);
}

/* ---- MILESTONES ---- */
.timeline-milestone {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  background: var(--bar-color, var(--accent));
  border: 2px solid var(--bg-primary);
  transform: translate(-50%, -50%) rotate(45deg);
  cursor: pointer;
  z-index: 2;
  transition: transform 0.2s ease;
  box-shadow: 0 0 6px var(--bar-color, var(--accent));
}

.timeline-milestone:hover {
  transform: translate(-50%, -50%) rotate(45deg) scale(1.5);
}

/* ---- TODAY LINE ---- */
.timeline-today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  z-index: 5;
  pointer-events: none;
}

.timeline-today-line {
  position: absolute;
  left: 0;
  top: 0;
  width: 1.5px;
  height: 100%;
  background: #f87171;
  opacity: 0.8;
  animation: todayPulse 2.5s ease-in-out infinite;
}

.timeline-today-label {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  font-weight: 700;
  color: #f87171;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  background: rgba(248, 113, 113, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

@keyframes todayPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.9; }
}

.timeline-empty {
  padding: 48px;
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
}

/* ---- TOOLTIP ---- */
.tooltip {
  position: fixed;
  z-index: 1000;
  padding: 10px 14px;
  background: rgba(10, 10, 18, 0.96);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(20px);
  font-size: 0.78rem;
  color: var(--text-primary);
  line-height: 1.6;
  white-space: pre-line;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  max-width: 260px;
}

.tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- PROJECT CARDS ---- */
.project-grid-section {
  margin-bottom: 48px;
  animation: fadeSlideUp 0.7s ease-out both;
  animation-delay: 0.2s;
}

.project-grid {
  columns: 300px 4;
  column-gap: 20px;
}

.project-grid .project-card {
  break-inside: avoid;
  margin-bottom: 20px;
  display: block;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(16px);
  transition: all 0.3s ease;
  animation: fadeSlideUp 0.5s ease-out both;
  animation-delay: var(--card-delay);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--status-color), transparent);
  opacity: 0.5;
}

.project-card:hover {
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

/* ---- ACTIVE CARD GLOW ---- */
.project-card--active {
  border-color: color-mix(in srgb, var(--status-color) 30%, transparent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--status-color) 12%, transparent),
              inset 0 0 40px color-mix(in srgb, var(--status-color) 4%, transparent);
  animation: fadeSlideUp 0.5s ease-out both, cardActivePulse 3.5s ease-in-out 0.6s infinite;
}

.project-card--active::before {
  opacity: 1;
  animation: topBarShimmer 2.5s ease-in-out infinite;
}

.project-card--done {
  opacity: 0.6;
}

.project-card--done::before {
  background: linear-gradient(90deg, transparent, var(--status-color), transparent);
  opacity: 0.25;
}

.card-active-glow {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(ellipse 80% 50% at 50% 0%, color-mix(in srgb, var(--status-color) 8%, transparent), transparent 70%);
  pointer-events: none;
}

@keyframes cardActivePulse {
  0%, 100% { box-shadow: 0 0 18px color-mix(in srgb, var(--status-color) 10%, transparent); }
  50%       { box-shadow: 0 0 32px color-mix(in srgb, var(--status-color) 22%, transparent); }
}

@keyframes topBarShimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.card-status {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-status-pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: statusPulse 1.4s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

.card-progress {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--status-color);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.3;
}

.card-progress-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  margin-bottom: 16px;
  overflow: hidden;
}

.card-title--done {
  text-decoration: line-through;
  opacity: 0.5;
}

.card-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease-out;
}

.card-progress-fill--active {
  animation: progressShimmer 2s linear infinite;
  background-size: 200% 100% !important;
}

.card-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.card-date {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-date-label {
  font-size: 0.67rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-date-value {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.card-comments {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.card-url-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  align-self: flex-start;
}

.card-url-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-glow);
  color: var(--text-primary);
}

/* ---- FOOTER ---- */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  margin-top: 16px;
}

.footer-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-logo {
  font-weight: 700;
  color: var(--text-secondary);
}

/* ---- ADMIN ---- */
.admin-page {
  padding: 40px 0;
}

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

.admin-header-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.admin-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.admin-back {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  transition: opacity 0.2s;
}

.admin-back:hover { opacity: 0.75; }

.admin-message {
  padding: 12px 20px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-sm);
  color: #10b981;
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.admin-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

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

.admin-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lc);
  box-shadow: 0 0 6px var(--lc);
}

.admin-section {
  margin-bottom: 36px;
}

.admin-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

/* ---- ADMIN CARDS GRID ---- */
.acard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.acard {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  backdrop-filter: blur(16px);
  transition: border-color 0.25s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.acard:focus-within {
  border-color: color-mix(in srgb, var(--acard-color) 40%, transparent);
}

.acard--empty {
  opacity: 0.45;
}

.acard--empty:focus-within {
  opacity: 1;
}

.acard-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--acard-color);
  border-radius: 3px 0 0 3px;
  opacity: 0.7;
}

.acard-top {
  display: flex;
  gap: 10px;
  align-items: center;
}

.acard-id-wrap {
  flex: 1;
}

.acard-orden-wrap {
  flex: 0 0 64px;
}

.acard-name-row {
  width: 100%;
}

.acard-status-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.acard-status-row .acard-field {
  flex: 1;
}

.acard-field--sm {
  flex: 0 0 120px !important;
}

.acard-dates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}

.acard-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.acard-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.acard-input {
  width: 100%;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.82rem;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}

.acard-input:focus {
  outline: none;
  border-color: var(--acard-color);
  background: color-mix(in srgb, var(--acard-color) 6%, transparent);
}

.acard-input--id {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.acard-input--sm {
  width: 100%;
}

.acard-input--name {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 9px 12px;
}

.acard-select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

.acard-pct-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.acard-pct-bar {
  height: 3px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px;
  overflow: hidden;
}

.acard-pct-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
  opacity: 0.7;
}

.admin-actions-bottom {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.admin-btn {
  padding: 9px 24px;
  background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.admin-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.admin-btn--lg {
  padding: 12px 32px;
  font-size: 0.95rem;
}

/* ---- ANIMATIONS ---- */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes progressShimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ---- ADMIN LIST (drag-sortable) ---- */
.acard-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.acard-list .acard {
  width: 100%;
}

.admin-section-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

/* ---- DRAG HANDLE ---- */
.acard-drag-handle {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 4px;
  cursor: grab;
  opacity: 0.3;
  transition: opacity 0.2s;
  flex-shrink: 0;
  align-self: center;
}

.acard-drag-handle:active {
  cursor: grabbing;
}

.acard-drag-handle span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
}

.acard:hover .acard-drag-handle {
  opacity: 0.7;
}

.acard--dragging {
  opacity: 0.4;
  transform: scale(0.98);
  border-style: dashed;
}

.acard--drag-over {
  border-color: var(--acard-color) !important;
  background: color-mix(in srgb, var(--acard-color) 8%, var(--bg-card));
}

.acard-row-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}

.acard-dates-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}

/* ---- HITOS REPEATER ---- */
.acard-hitos {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hitos-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hito-row {
  display: flex;
  gap: 6px;
  align-items: center;
  animation: fadeSlideUp 0.2s ease-out both;
}

.hito-date {
  flex: 0 0 150px !important;
  width: 150px !important;
}

.hito-nombre {
  flex: 1 !important;
  width: auto !important;
}

.hito-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: 6px;
  color: #f87171;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  line-height: 1;
  padding: 0;
}

.hito-remove:hover {
  background: rgba(248, 113, 113, 0.2);
  border-color: rgba(248, 113, 113, 0.4);
}

.hito-add {
  align-self: flex-start;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.hito-add:hover {
  border-color: var(--acard-color);
  color: var(--acard-color);
  background: color-mix(in srgb, var(--acard-color) 6%, transparent);
}

/* ---- CARD HITOS (vertical timeline) ---- */
.card-hitos {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--border-subtle);
}

.card-hito {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.76rem;
}

.card-hito-spine {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 10px;
  padding-top: 3px;
}

.card-hito-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-muted);
  border: 1.5px solid var(--bg-primary);
  position: relative;
  z-index: 1;
}

.card-hito-dot--next {
  background: var(--status-color);
  box-shadow: 0 0 6px var(--status-color);
  width: 9px;
  height: 9px;
}

.card-hito-line {
  width: 1px;
  flex: 1;
  min-height: 14px;
  background: var(--border-subtle);
  margin: 2px 0 0;
}

.card-hito--past .card-hito-dot {
  background: color-mix(in srgb, var(--text-muted) 40%, transparent);
}

.card-hito-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
  padding-bottom: 10px;
}

.card-hito:last-child .card-hito-body {
  padding-bottom: 0;
}

.card-hito-name {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-hito--past .card-hito-name {
  color: var(--text-muted);
  text-decoration: line-through;
}

.card-hito--next .card-hito-name {
  color: var(--text-primary);
  font-weight: 500;
}

.card-hito-date {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.card-hito--next .card-hito-date {
  color: var(--status-color);
}

/* ---- ACTIVITY FEED (redesigned) ---- */
.activity-section {
  margin-bottom: 48px;
  animation: fadeSlideUp 0.8s ease-out both;
  animation-delay: 0.3s;
}

.af-block {
  margin-bottom: 20px;
}

.af-block--recent {
  margin-top: 4px;
}

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

.af-block-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.af-block-count {
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 1px 7px;
  color: var(--text-muted);
}

/* ---- UPCOMING CARDS ---- */
.af-up-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.af-up-card {
  display: flex;
  align-items: stretch;
  background: color-mix(in srgb, var(--af-color) 4%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--af-color) 20%, var(--border-subtle));
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.af-up-card:hover {
  border-color: color-mix(in srgb, var(--af-color) 40%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--af-color) 10%, transparent);
}

/* Date tile */
.af-up-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 54px;
  flex-shrink: 0;
  padding: 12px 0;
  background: color-mix(in srgb, var(--af-color) 14%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--af-color) 20%, var(--border-subtle));
  gap: 1px;
}

.af-up-date-day {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
  color: var(--af-color);
}

.af-up-date-mon {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--af-color) 75%, var(--text-muted));
}

/* Content area */
.af-up-body {
  flex: 1;
  min-width: 0;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.af-up-body-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.af-up-body-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--af-color);
}

.af-up-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.af-up-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.af-up-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

/* countdown badges */
.af-countdown {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}

.af-countdown--today {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.af-countdown--tomorrow {
  background: rgba(249, 115, 22, 0.14);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.af-countdown--soon {
  background: rgba(234, 179, 8, 0.12);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.2);
}

.af-countdown--later {
  background: rgba(0, 180, 255, 0.1);
  color: var(--accent-from);
  border: 1px solid rgba(0, 180, 255, 0.18);
}

/* ---- TYPE BADGES ---- */
.af-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--af-color);
  background: color-mix(in srgb, var(--af-color) 12%, transparent);
}

/* ---- CLIENT PILL ---- */
.af-client-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--cl-color);
  background: color-mix(in srgb, var(--cl-color) 12%, transparent);
  border-radius: 4px;
  padding: 2px 7px;
  white-space: nowrap;
}

.af-client-pill::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cl-color);
  flex-shrink: 0;
}

/* ---- RECENT LIST ---- */
.af-recent-list {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.af-date-sep {
  padding: 6px 16px 4px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.af-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.035);
  transition: background 0.15s;
  position: relative;
}

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

.af-item:hover {
  background: rgba(255,255,255,0.02);
}

.af-item-bar {
  width: 3px;
  align-self: stretch;
  flex-shrink: 0;
  background: var(--af-color);
  opacity: 0.6;
  border-radius: 0 2px 2px 0;
}

.af-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  flex-shrink: 0;
}

.af-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.af-item-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.af-item-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.af-item-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.af-item-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.af-item-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}

/* legacy compat — keep for activity-client-tag refs in older markup */
.activity-client-tag {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--cl-color);
  background: color-mix(in srgb, var(--cl-color) 12%, transparent);
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
}

/* ---- CARD DATE HINT ---- */
.card-date-hint {
  font-size: 0.65rem;
  color: var(--accent-from);
  margin-top: 1px;
  opacity: 0.85;
}

/* ---- PENDIENTES SECTION ---- */
.pendientes-section {
  margin-bottom: 48px;
  animation: fadeSlideUp 0.6s ease-out both;
  animation-delay: 0.2s;
}

/* ---- PENDIENTES WEEK (vertical day view) ---- */
.pendientes-week {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 28px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  animation: fadeSlideUp 0.5s ease-out both;
  animation-delay: 0.15s;
}

.pendientes-day {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.pendientes-day:last-child {
  border-bottom: none;
}

.pendientes-day--today {
  background: rgba(0, 180, 255, 0.04);
  border-top: 1px solid rgba(0, 180, 255, 0.1);
  border-bottom: 1px solid rgba(0, 180, 255, 0.08);
}

.pendientes-day-header {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  min-width: 80px;
  padding-right: 16px;
  padding-top: 2px;
  flex-shrink: 0;
}

.pendientes-day-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.pendientes-day--today .pendientes-day-label {
  color: var(--accent-from);
}

.pendientes-day-count {
  font-size: 0.6rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 1px 6px;
  font-weight: 600;
}

.pendientes-day--today .pendientes-day-count {
  background: rgba(0, 180, 255, 0.12);
  color: var(--accent-from);
}

.pendientes-day-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  border-left: 1px solid var(--border-subtle);
  padding-left: 16px;
  flex: 1;
  min-height: 28px;
}

.pendientes-day--today .pendientes-day-items {
  border-left-color: rgba(0, 180, 255, 0.2);
}

.pendientes-day--open {
  background: rgba(148, 163, 184, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 12px;
}

.pendientes-day-label--open {
  color: var(--text-secondary);
}

.pendiente-chip--pending {
  border-color: rgba(255, 255, 255, 0.1);
  opacity: 0.9;
}

.pendiente-chip-badge--due {
  color: #f97316;
  background: rgba(249, 115, 22, 0.1);
}

.pendiente-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  font-size: 0.76rem;
  white-space: nowrap;
  transition: border-color 0.2s;
}

.pendiente-chip--done {
  opacity: 0.5;
}

.pendiente-chip--today {
  border-color: rgba(0, 180, 255, 0.25);
}

.pendiente-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-from);
  flex-shrink: 0;
}

.pendiente-chip-dot--done {
  background: var(--status-terminado);
}

.pendiente-chip-icon {
  flex-shrink: 0;
}

.pendiente-chip-icon--done {
  color: var(--status-terminado);
}

.pendiente-chip-icon--clock {
  color: var(--text-muted);
}

.pendiente-chip-name {
  color: var(--text-secondary);
  font-weight: 500;
}

.pendiente-chip-badge {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-from);
  background: rgba(0, 180, 255, 0.1);
  border-radius: 4px;
  padding: 1px 5px;
}

.pendiente-chip-client {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--cl-color);
  background: color-mix(in srgb, var(--cl-color) 12%, transparent);
  border-radius: 4px;
  padding: 1px 6px;
}

/* ---- TIMELINE PENDIENTES ROW ---- */
.timeline-row--pendientes {
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
  margin-top: 4px;
  align-items: flex-start;
}

.timeline-row-label--pendientes {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.timeline-pendiente-marker {
  position: absolute;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: var(--pm-color, var(--accent-from));
  border: 1.5px solid var(--bg-primary);
  border-radius: 2px;
  cursor: default;
  z-index: 2;
}

.timeline-pendiente-marker--entrega {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--pm-color, var(--accent-from));
  opacity: 0.75;
}

.timeline-pendiente-marker--done {
  opacity: 0.45;
}

.timeline-pendiente-line {
  position: absolute;
  height: 1px;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  z-index: 1;
}

/* ---- PENDIENTE ADMIN CARDS ---- */
.pcard-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pcard {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s;
  min-width: 0;
}

.pcard:hover {
  border-color: var(--border-glow);
}

.pcard--new-entry {
  border-color: rgba(0, 180, 255, 0.2);
  animation: fadeSlideUp 0.25s ease-out both;
}

.pcard-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.pcard-row .acard-field {
  flex: 1;
  min-width: 0;
}

.pcard-delete-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-top: 18px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.pcard-delete-btn:hover {
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.08);
}

/* ---- TIMELINE SECTION HEADER + VIEW CONTROLS ---- */
.timeline-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.tl-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* View tabs: Semanas | Meses */
.tl-view-tabs {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.tl-tab {
  padding: 5px 14px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.tl-tab:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.tl-tab--active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-weight: 600;
  pointer-events: none;
}

/* Range stepper: − 8 sem + */
.tl-range-stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.tl-step-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
  cursor: pointer;
}

.tl-step-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
}

.tl-step-btn--disabled {
  opacity: 0.25;
  pointer-events: none;
  cursor: default;
}

.tl-range-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 42px;
  text-align: center;
  padding: 0 2px;
  letter-spacing: 0.02em;
}

.timeline-zoom-track {
  width: 100%;
  min-width: 550px;
}

.timeline-week--month {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ---- ADMIN TABS ---- */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0;
}

.admin-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}

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

.admin-tab--active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
  pointer-events: none;
}

/* ---- CLIENT CARDS ---- */
.ccard-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.ccard {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  backdrop-filter: blur(16px);
  transition: border-color 0.25s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ccard:focus-within {
  border-color: color-mix(in srgb, var(--ccard-color) 40%, transparent);
}

.ccard--empty { opacity: 0.5; }
.ccard--empty:focus-within { opacity: 1; }

.ccard--new-entry {
  animation: fadeSlideUp 0.2s ease-out both;
  border-color: rgba(255, 255, 255, 0.1);
}

.ccard-accent {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--ccard-color);
  border-radius: 3px 0 0 3px;
  opacity: 0.8;
}

.ccard-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

/* Color palette picker */
.ccard-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.ccard-swatch-label {
  cursor: pointer;
}

.ccard-swatch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.ccard-swatch {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: transform 0.15s, border-color 0.15s;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}

.ccard-swatch-input:checked + .ccard-swatch {
  border-color: white;
  transform: scale(1.2);
  box-shadow: 0 0 8px currentColor;
}

.ccard-swatch-label:hover .ccard-swatch {
  transform: scale(1.15);
}

/* ---- CUSTOM COLOR PICKER swatch ---- */
.ccard-swatch--custom {
  position: relative;
  overflow: hidden;
  background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red);
}

.ccard-color-picker {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
}

/* ---- PROJECT CARD client tag ---- */
.card-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-client-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: color-mix(in srgb, var(--cl-color) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--cl-color) 25%, transparent);
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--cl-color);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.card-client-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cl-color);
  flex-shrink: 0;
}

/* ---- ADMIN SECTION HEADER ---- */
.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.admin-section-header .admin-section-title {
  margin-bottom: 0;
}

.admin-add-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  background: rgba(0, 180, 255, 0.08);
  border: 1px solid rgba(0, 180, 255, 0.2);
  border-radius: var(--radius-sm);
  color: var(--accent-from);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.admin-add-btn:hover {
  background: rgba(0, 180, 255, 0.14);
  border-color: rgba(0, 180, 255, 0.35);
  transform: translateY(-1px);
}

.acard--new-entry {
  animation: fadeSlideUp 0.25s ease-out both;
  border-color: rgba(0, 180, 255, 0.2);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  :root { --label-width: 130px; }
}

@media (max-width: 640px) {
  html { font-size: 14px; }
  .app { padding: 0 16px; }
  .header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .status-bar { flex-direction: column; align-items: flex-start; }
  .status-pills { gap: 6px; }
  .project-grid { columns: 1; }
  :root { --label-width: 100px; }
  .timeline-week { font-size: 0.6rem; }
  .acard-grid { grid-template-columns: 1fr; }
  .admin-header { flex-direction: column; align-items: flex-start; }
  .acard-dates-row { grid-template-columns: 1fr; }
  .hito-date { flex: 0 0 120px !important; width: 120px !important; }
  .timeline-section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .tl-controls { flex-wrap: wrap; }
  .admin-section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .pcard-list { grid-template-columns: 1fr 1fr; }
}

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