@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Outfit:wght@300;400;500;600&display=swap');

:root {
  --bg:       #09080f;
  --bg2:      #100f1a;
  --bg3:      #16141f;
  --surface:  #1d1b2e;
  --surface2: #252338;
  --surface3: #2e2b42;
  --border:   rgba(255,255,255,0.06);
  --border2:  rgba(255,255,255,0.11);
  --border3:  rgba(255,255,255,0.18);

  /* Violet accent */
  --accent:      #9b6dff;
  --accent2:     #7c4fe0;
  --accent3:     #b899ff;
  --accent-dim:  rgba(155,109,255,0.13);
  --accent-dim2: rgba(155,109,255,0.22);
  --accent-glow: rgba(155,109,255,0.35);

  --text:  #f0eef8;
  --text2: #9590b0;
  --text3: #5a5570;

  --red:       #ff5471;  --red-dim:    rgba(255,84,113,0.13);
  --amber:     #ffaa40;  --amber-dim:  rgba(255,170,64,0.13);
  --green:     #3ddba0;  --green-dim:  rgba(61,219,160,0.13);
  --blue:      #5b9cf6;  --blue-dim:   rgba(91,156,246,0.13);
  --teal:      #22d3ee;  --teal-dim:   rgba(34,211,238,0.13);
  --pink:      #f472b6;  --pink-dim:   rgba(244,114,182,0.13);
  --orange:    #fb923c;  --orange-dim: rgba(251,146,60,0.13);
  --lime:      #a3e635;  --lime-dim:   rgba(163,230,53,0.13);

  /* STATUS colors */
  --s-idea:         #9b6dff; --s-idea-dim:         rgba(155,109,255,0.13);
  --s-preprod:      #5b9cf6; --s-preprod-dim:      rgba(91,156,246,0.13);
  --s-presupuesto:  #ffaa40; --s-presupuesto-dim:  rgba(255,170,64,0.13);
  --s-diseno:       #f472b6; --s-diseno-dim:       rgba(244,114,182,0.13);
  --s-ticketing:    #22d3ee; --s-ticketing-dim:    rgba(34,211,238,0.13);
  --s-produccion:   #3ddba0; --s-produccion-dim:   rgba(61,219,160,0.13);
  --s-ejecucion:    #a3e635; --s-ejecucion-dim:    rgba(163,230,53,0.13);
  --s-espera:       #fb923c; --s-espera-dim:       rgba(251,146,60,0.13);

  /* EMPRESA colors */
  --e0: #9b6dff; --e1: #22d3ee; --e2: #ffaa40;

  --r:  10px;
  --r2: 15px;
  --r3: 20px;
  --shadow: 0 8px 40px rgba(0,0,0,0.6);
  --shadow-accent: 0 0 30px rgba(155,109,255,0.2);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: 'Outfit', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 99px; }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: var(--r); border: none; font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 500; cursor: pointer; transition: all .18s; white-space: nowrap; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent3); transform: translateY(-1px); box-shadow: var(--shadow-accent); }
.btn-ghost { background: transparent; color: var(--text2); border: 1px solid var(--border2); }
.btn-ghost:hover { background: var(--surface); color: var(--text); border-color: var(--border3); }
.btn-danger { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255,84,113,.2); }
.btn-danger:hover { background: rgba(255,84,113,.22); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-xs { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── INPUTS ── */
.input, select, textarea {
  width: 100%; padding: 10px 13px;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--r); color: var(--text);
  font-family: 'Outfit', sans-serif; font-size: 14px;
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.input::placeholder { color: var(--text3); }
select option { background: var(--surface2); color: var(--text); }
textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
label { display: block; font-size: 12px; color: var(--text2); margin-bottom: 5px; font-weight: 500; letter-spacing: .02em; }

/* ── BADGES ── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 600; letter-spacing: .03em; white-space: nowrap; }
.b-idea        { background: var(--s-idea-dim);        color: var(--s-idea); }
.b-preprod     { background: var(--s-preprod-dim);     color: var(--s-preprod); }
.b-presupuesto { background: var(--s-presupuesto-dim); color: var(--s-presupuesto); }
.b-diseno      { background: var(--s-diseno-dim);      color: var(--s-diseno); }
.b-ticketing   { background: var(--s-ticketing-dim);   color: var(--s-ticketing); }
.b-produccion  { background: var(--s-produccion-dim);  color: var(--s-produccion); }
.b-ejecucion   { background: var(--s-ejecucion-dim);   color: var(--s-ejecucion); }
.b-espera      { background: var(--s-espera-dim);      color: var(--s-espera); }
.b-alta   { background: var(--red-dim);    color: var(--red); }
.b-media  { background: var(--amber-dim);  color: var(--amber); }
.b-baja   { background: var(--green-dim);  color: var(--green); }

/* ── AVATAR ── */
.av { border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; background: var(--accent-dim); color: var(--accent3); }
.av-xs { width: 22px; height: 22px; font-size: 9px; }
.av-sm { width: 28px; height: 28px; font-size: 11px; }
.av-md { width: 36px; height: 36px; font-size: 13px; }
.av-lg { width: 44px; height: 44px; font-size: 16px; }

/* ── PROGRESS ── */
.pbar { height: 3px; background: var(--surface3); border-radius: 99px; overflow: hidden; }
.pbar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent2), var(--accent3)); transition: width .5s ease; }
.pbar-thick { height: 6px; }

/* ── MODAL ── */
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); z-index: 1000; align-items: center; justify-content: center; padding: 1rem; }
.overlay.open { display: flex; animation: fadeIn .15s ease; }
.modal { background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--r3); width: 600px; max-width: 100%; max-height: 92vh; overflow-y: auto; padding: 2rem; box-shadow: var(--shadow); animation: slideUp .22s ease; }
.modal::-webkit-scrollbar { width: 3px; }
.modal-hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-ttl { font-family: 'Playfair Display', serif; font-size: 22px; color: var(--text); }
.modal-x { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 18px; padding: 5px 7px; border-radius: 7px; transition: all .15s; line-height: 1; }
.modal-x:hover { background: var(--surface); color: var(--text); }
.frow { margin-bottom: 1rem; }
.fgrid { display: grid; gap: 1rem; }
.fg2 { grid-template-columns: 1fr 1fr; }
.fg3 { grid-template-columns: 1fr 1fr 1fr; }
.modal-ft { display: flex; gap: 10px; justify-content: flex-end; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* ── TOPNAV ── */
.topnav { position: sticky; top: 0; z-index: 200; background: rgba(9,8,15,0.9); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 1.75rem; height: 58px; }
.nav-logo { font-family: 'Playfair Display', serif; font-size: 19px; color: var(--text); display: flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
.logo-gem { font-size: 18px; }
.nav-right { display: flex; align-items: center; gap: 10px; }

/* ── ANIMATIONS ── */
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse   { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

/* ── TAG INPUT ── */
.tag-wrap { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: var(--surface); border: 1px solid var(--border2); border-radius: var(--r); min-height: 44px; cursor: text; transition: border-color .15s, box-shadow .15s; }
.tag-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.tag-pill { display: inline-flex; align-items: center; gap: 5px; background: var(--accent-dim2); color: var(--accent3); padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 500; }
.tag-pill button { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 13px; padding: 0; line-height: 1; opacity: .7; transition: opacity .15s; }
.tag-pill button:hover { opacity: 1; }
.tag-input-inner { border: none; background: transparent; color: var(--text); font-family: 'Outfit', sans-serif; font-size: 13px; outline: none; min-width: 80px; flex: 1; padding: 2px 4px; }
.tag-input-inner::placeholder { color: var(--text3); }

/* ── MISC ── */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: 11px; background: rgba(255,255,255,0.05); border: 1px solid var(--border2); color: var(--text2); }
.chip-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.section-label { font-size: 10px; font-weight: 600; color: var(--text3); letter-spacing: .1em; text-transform: uppercase; }
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }
.empty { text-align: center; padding: 3.5rem 2rem; color: var(--text3); }
.empty h3 { font-size: 16px; color: var(--text2); margin-bottom: .4rem; }
.empty p { font-size: 13px; }

@media (max-width: 700px) { .fg2, .fg3 { grid-template-columns: 1fr; } .topnav { padding: 0 1rem; } }
