/* WrapAgenda — tokens y componentes */
:root {
  --bg: #f5f5f7; --surface: #ffffff; --surface-2: #f2f2f5; --surface-3: #e8e8ed;
  --border: rgba(0,0,0,.08); --border-strong: rgba(0,0,0,.14);
  --text: #1d1d1f; --muted: #6e6e73; --faint: #a1a1a6;
  --accent: #0a84ff; --accent-ink: #fff;
  --ink: #0a0a0f; --ink-text: #fff;
  --ok: #10b981; --warn: #f59e0b; --bad: #ef4444;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --shadow-lg: 0 24px 64px rgba(0,0,0,.18);
  --cyan: #00b4d8; --magenta: #e6007e; --yellow: #ffd400;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --surface-3: #3a3a3c;
    --border: rgba(255,255,255,.08); --border-strong: rgba(255,255,255,.16);
    --text: #f5f5f7; --muted: #98989d; --faint: #636366;
    --accent: #0a84ff; --ink: #f5f5f7; --ink-text: #000;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 24px 64px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --surface-3: #3a3a3c;
  --border: rgba(255,255,255,.08); --border-strong: rgba(255,255,255,.16);
  --text: #f5f5f7; --muted: #98989d; --faint: #636366;
  --ink: #f5f5f7; --ink-text: #000; --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 24px 64px rgba(0,0,0,.6);
  color-scheme: dark;
}

html, body { background: var(--bg); color: var(--text); }
body { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
[x-cloak] { display: none !important; }

.surface { background: var(--surface); }
.surface-2 { background: var(--surface-2); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.bd { border-color: var(--border); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }
.glass { background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--border); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; height: 40px; padding: 0 16px; border-radius: 12px; font-weight: 600; font-size: 14px; transition: transform .08s ease, background .15s, opacity .15s; white-space: nowrap; user-select: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--ink); color: var(--ink-text); }
.btn-primary:hover { opacity: .88; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-outline { border: 1px solid var(--border-strong); color: var(--text); background: transparent; }
.btn-danger { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-wa { background: #25d366; color: #fff; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { height: 52px; padding: 0 22px; font-size: 16px; border-radius: 16px; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--text); transition: background .15s; }
.icon-btn:hover { background: var(--surface-2); }

.label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; letter-spacing: .01em; }
.input { width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent; color: var(--text); font-size: 15px; outline: none; transition: border .15s, background .15s, box-shadow .15s; }
textarea.input { height: auto; padding: 10px 14px; line-height: 1.45; }
.input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.input::placeholder { color: var(--faint); }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2398989d' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

.seg { display: inline-flex; background: var(--surface-2); padding: 3px; border-radius: 12px; gap: 2px; }
.seg button { height: 32px; padding: 0 14px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); transition: all .15s; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 99px; display: inline-block; flex: none; }

.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 50; }
.sheet { background: var(--surface); box-shadow: var(--shadow-lg); }
.no-scrollbar::-webkit-scrollbar { display: none; } .no-scrollbar { scrollbar-width: none; }
.thin-scroll::-webkit-scrollbar { width: 8px; height: 8px; } .thin-scroll::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; }

.toast { background: var(--ink); color: var(--ink-text); box-shadow: var(--shadow-lg); }
.cmyk-bar { height: 3px; background: linear-gradient(90deg, var(--cyan) 0 33%, var(--magenta) 33% 66%, var(--yellow) 66%); }

/* Gantt */
.gantt-grid { display: grid; }
.gantt-cell { border-left: 1px solid var(--border); }
.gantt-bar { position: absolute; border-radius: 10px; padding: 6px 9px; overflow: hidden; cursor: pointer; transition: transform .1s, box-shadow .15s; font-size: 12px; line-height: 1.25; }
.gantt-bar:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.18); z-index: 5; }
.today-col { background: color-mix(in srgb, var(--accent) 6%, transparent); }

.fade-in { animation: fadeIn .25s ease both; }
@keyframes fadeIn { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
.slide-up { animation: slideUp .28s cubic-bezier(.2,.8,.2,1) both; }
@keyframes slideUp { from { translate: 0 24px; opacity: 0; } to { translate: 0 0; opacity: 1; } }
.pulse-dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom); }
