/* ── PAUER Dashboard v4 CSS ───────────────────────────────────────────────── */
/* Supplements pauer-design-system.css — never overrides it */

/* ── Variable bridge (legacy → canonical) ── */
:root {
  --orange: #FF5A00;
  --bg: #080808;
  --glass: rgba(255,255,255,0.03);
  --glass-border: rgba(255,255,255,0.06);
  --sidebar-w: 220px;
  --text: #E8E8E8;
  --text-muted: rgba(255,255,255,0.45);
  --green: #22C55E;
  --red: #FF3333;
  --yellow: #FFB800;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--text); font-family: 'Barlow', sans-serif; overflow: hidden; }

/* ── LAYOUT ── */
.shell { display: flex; height: 100vh; }

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w);
  background: rgba(255,255,255,0.02);
  border-right: 1px solid var(--glass-border);
  display: flex; flex-direction: column;
  padding: 20px 12px; gap: 4px;
  position: relative; z-index: 10;
  overflow-y: auto;
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 8px 10px 20px; border-bottom: 1px solid var(--glass-border); margin-bottom: 8px; }
.sidebar-logo img { height: 32px; width: auto; }
.nav-group-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,0.22); padding: 16px 12px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px; cursor: pointer;
  font-family: 'Barlow', sans-serif; font-weight: 500; font-size: 13px;
  color: var(--text-muted); border: none; background: none; width: 100%; text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.nav-item.active { background: rgba(255,90,0,0.12); color: var(--text); border-left: 3px solid var(--orange); padding-left: 9px; }
.nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-badge { margin-left: auto; background: #FF5A00; color: #fff; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 8px; font-family: 'Barlow', sans-serif; line-height: 1.4; }
.nav-divider { height: 1px; background: var(--glass-border); margin: 8px 0; }
.sidebar-bottom { margin-top: auto; }
.cmd-hint { padding: 8px 12px; color: var(--text-muted); font-size: 11px; display: flex; align-items: center; gap: 6px; cursor: pointer; border-radius: 8px; transition: background 0.15s ease; }
.cmd-hint:hover { background: rgba(255,255,255,0.04); }
.cmd-hint kbd { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); padding: 1px 5px; border-radius: 4px; font-size: 10px; font-family: monospace; }
.ext-link { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 8px; font-size: 12px; color: var(--text-muted); text-decoration: none; transition: background 0.15s ease, color 0.15s ease; }
.ext-link:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.sidebar-ext-links { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }

/* ── MAIN CONTENT ── */
.content { flex: 1; overflow-y: auto; padding: 32px; display: flex; flex-direction: column; gap: 0; transition: opacity 0.2s ease-out, transform 0.2s ease-out; }

/* ── VIEW HEADER ── */
.view-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.view-title { font-family: 'Bebas Neue', sans-serif; font-size: 32px; letter-spacing: 1px; color: #fff; }
.view-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.view-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; border: none; cursor: pointer; font-family: 'Barlow', sans-serif; font-size: 13px; font-weight: 600; transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: #ff6a1a; box-shadow: 0 4px 16px rgba(255,90,0,0.3); }
.btn-ghost { background: var(--glass); border: 1px solid var(--glass-border); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,0.06); }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.btn-danger { background: rgba(255,51,51,0.15); border: 1px solid rgba(255,51,51,0.3); color: var(--red); }
.btn-danger:hover { background: rgba(255,51,51,0.25); }
.btn-success { background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.3); color: var(--green); }
.active-filter { background: rgba(255,90,0,0.15) !important; border-color: var(--orange) !important; color: var(--orange) !important; }

/* ── CARDS ── */
.card { background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(20px); border-radius: 16px; padding: 20px; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.card-grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ── KPI CARDS ── */
.kpi-value { font-family: 'Bebas Neue', sans-serif; font-size: 42px; line-height: 1; color: #fff; }
.kpi-label { font-family: 'Barlow', sans-serif; font-size: 11px; font-weight: 500; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); margin-top: 4px; }
.kpi-trend { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; margin-top: 6px; font-weight: 600; }
.kpi-trend.up { color: var(--green); }
.kpi-trend.down { color: var(--red); }

/* ── KANBAN ── */
.kanban { display: grid; gap: 12px; overflow-x: auto; min-height: 400px; }
.kanban-col { background: rgba(255,255,255,0.02); border: 1px solid var(--glass-border); border-radius: 12px; padding: 12px; min-width: 160px; }
.kanban-col.drag-over { background: rgba(255,90,0,0.06); border: 1px dashed rgba(255,90,0,0.3); }
.kanban-col-header { font-family: 'Barlow', sans-serif; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.kanban-col-count { background: rgba(255,255,255,0.08); padding: 1px 7px; border-radius: 10px; font-size: 11px; }
.deal-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; padding: 10px; margin-bottom: 8px; cursor: pointer; transition: background 0.15s ease, transform 0.15s ease, opacity 0.2s ease; }
.deal-card:hover { background: rgba(255,255,255,0.08); transform: translateY(-1px); }
.deal-card[draggable="true"] { cursor: grab; }
.deal-card[draggable="true"]:active { cursor: grabbing; }
.deal-card.dragging { opacity: 0.4; transform: scale(0.95); }
.deal-title { font-size: 12px; font-weight: 600; color: #fff; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-meta { font-size: 11px; color: var(--text-muted); }
.deal-value { font-size: 12px; font-weight: 600; color: var(--orange); margin-top: 4px; }
.deal-stale { border-left: 3px solid var(--yellow); }
.deal-stale-danger { border-left: 3px solid var(--red); }
.deal-stale-badge { font-size: 9px; padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.deal-actions { display: flex; gap: 4px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--glass-border); }

/* ── STAGE COLORS ── */
.stage-nuevo_prospecto .kanban-col-header { color: #60A5FA; }
.stage-llamada_agendada .kanban-col-header { color: var(--yellow); }
.stage-propuesta_enviada .kanban-col-header { color: var(--orange); }
.stage-negociacion .kanban-col-header { color: #A78BFA; }
.stage-ganado .kanban-col-header { color: var(--green); }
.stage-perdido .kanban-col-header { color: var(--red); }

/* ── TABLE ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); padding: 8px 12px; border-bottom: 1px solid var(--glass-border); text-align: left; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.data-table tr:last-child td { border-bottom: none; }

/* ── BADGES ── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; font-family: 'Barlow', sans-serif; }
.badge-orange { background: rgba(255,90,0,0.18); color: var(--orange); }
.badge-green { background: rgba(34,197,94,0.18); color: var(--green); }
.badge-yellow { background: rgba(255,184,0,0.18); color: var(--yellow); }
.badge-red { background: rgba(255,51,51,0.18); color: var(--red); }
.badge-blue { background: rgba(96,165,250,0.18); color: #60A5FA; }
.badge-gray { background: rgba(255,255,255,0.08); color: var(--text-muted); }
.badge-purple { background: rgba(167,139,250,0.18); color: #A78BFA; }

/* ── RICH CARDS (content) ── */
.content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.rich-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 12px; overflow: hidden; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.rich-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.5); }
.rich-card-img { width: 100%; aspect-ratio: 4/5; object-fit: cover; background: rgba(255,255,255,0.04); display: block; }
.rich-card-placeholder { width: 100%; aspect-ratio: 4/5; background: rgba(255,255,255,0.04); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.rich-card-body { padding: 10px 12px; }
.rich-card-topic { font-size: 12px; font-weight: 600; color: #fff; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rich-card-meta { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.rich-card-pillar { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }

/* ── FINANZAS ── */
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 120px; margin: 16px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bar-fill { width: 100%; background: rgba(255,90,0,0.4); border-radius: 6px 6px 0 0; transition: height 0.4s ease; min-height: 4px; }
.bar-fill.income { background: rgba(255,90,0,0.6); }
.bar-label { font-size: 10px; color: var(--text-muted); }
.bar-value { font-size: 10px; color: var(--text-muted); font-weight: 600; }

/* ── CIMA ── */
.cima-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cima-col { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 16px; padding: 16px; min-height: 400px; }
.cima-col-header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--glass-border); }
.cima-col-title { font-family: 'Bebas Neue', sans-serif; font-size: 18px; letter-spacing: 0.5px; }
.cima-item { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; padding: 10px; margin-bottom: 8px; }
.cima-item-title { font-size: 12px; font-weight: 600; color: #fff; margin-bottom: 3px; }
.cima-item-meta { font-size: 11px; color: var(--text-muted); }
.cima-urgent { border-left: 3px solid var(--red); }
.cima-attention { border-left: 3px solid var(--yellow); }
.cima-ok { border-left: 3px solid var(--green); }

/* ── TABS ── */
.subview-tabs { display: flex; gap: 4px; margin-bottom: 20px; flex-wrap: wrap; }
.subview-tab { padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid var(--glass-border); background: transparent; color: var(--text-muted); transition: all 0.15s ease; font-family: 'Barlow', sans-serif; }
.subview-tab:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.subview-tab.active { background: rgba(255,90,0,0.15); border-color: var(--orange); color: var(--orange); }

/* ── STATES ── */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; text-align: center; gap: 12px; }
.empty-icon { font-size: 40px; opacity: 0.4; }
.empty-title { font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 700; color: var(--text); }
.empty-desc { font-size: 13px; color: var(--text-muted); max-width: 300px; }
.error-state { background: rgba(255,51,51,0.06); border: 1px solid rgba(255,51,51,0.2); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.error-state p { font-size: 13px; color: var(--red); }
.loading-state { display: flex; align-items: center; justify-content: center; padding: 60px; }

/* ── MODAL ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); z-index: 100; display: none; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: #111; border: 1px solid rgba(255,255,255,0.12); border-radius: 16px; padding: 28px; max-width: 420px; width: 90%; }
.modal-title { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.modal-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.5; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ── FORM ── */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 6px; }
.form-input { width: 100%; background: #111; border: 1px solid var(--glass-border); color: var(--text); padding: 8px 12px; border-radius: 8px; font-size: 13px; font-family: 'Barlow', sans-serif; outline: none; transition: border-color 0.2s ease; box-sizing: border-box; }
.form-input:focus { border-color: var(--orange); }
.form-input::placeholder { color: rgba(255,255,255,0.25); }
select.form-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 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── PANEL (slide-in) ── */
#panel-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 90; display: none; }
#panel-overlay.open { display: block; }
#panel { position: fixed; top: 0; right: -480px; width: 480px; max-width: 90vw; height: 100vh; background: #0a0a0a; border-left: 1px solid rgba(255,255,255,0.08); z-index: 91; transition: right 0.3s ease; overflow-y: auto; padding: 28px; }
#panel.open { right: 0; }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.panel-close { background: none; border: none; color: var(--text-muted); font-size: 20px; cursor: pointer; padding: 4px 8px; }
.panel-close:hover { color: #fff; }
.panel-title { font-family: 'Barlow Condensed', sans-serif; font-size: 24px; font-weight: 700; }
.panel-section { margin-bottom: 20px; }
.panel-section-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 8px; }
.panel-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 13px; }
.panel-row span:first-child { color: var(--text-muted); }

/* ── COMMAND PALETTE ── */
.cmd-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(8px); z-index: 200; display: none; align-items: flex-start; justify-content: center; padding-top: 20vh; }
.cmd-overlay.open { display: flex; }
.cmd-box { background: #111; border: 1px solid rgba(255,255,255,0.15); border-radius: 14px; width: 560px; max-width: 90vw; overflow: hidden; box-shadow: 0 24px 64px rgba(0,0,0,0.6); }
.cmd-input { width: 100%; background: transparent; border: none; outline: none; padding: 16px 20px; font-size: 16px; color: #fff; font-family: 'Barlow', sans-serif; border-bottom: 1px solid rgba(255,255,255,0.08); }
.cmd-input::placeholder { color: rgba(255,255,255,0.3); }
.cmd-results { max-height: 320px; overflow-y: auto; }
.cmd-item { display: flex; align-items: center; gap: 12px; padding: 11px 20px; cursor: pointer; transition: background 0.1s ease; font-size: 14px; }
.cmd-item:hover, .cmd-item.selected { background: rgba(255,90,0,0.1); }
.cmd-item .cmd-icon { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; color: var(--text-muted); }
.cmd-item .cmd-label { color: var(--text); }
.cmd-item .cmd-shortcut { margin-left: auto; font-size: 11px; color: var(--text-muted); }
.cmd-empty { padding: 20px; text-align: center; font-size: 13px; color: var(--text-muted); }

/* ── TOAST ── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #1a1a1a; border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; padding: 12px 16px; font-size: 13px; font-weight: 500; min-width: 200px; max-width: 320px; animation: slideUp 0.2s ease-out; display: flex; align-items: center; gap: 8px; transition: opacity 0.2s, transform 0.2s; }
.toast.success { border-color: rgba(34,197,94,0.4); color: var(--green); }
.toast.error { border-color: rgba(255,51,51,0.4); color: var(--red); }
.toast.info { border-color: rgba(255,90,0,0.4); color: var(--orange); }
@keyframes slideUp { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── SECTION HEADERS ── */
.section-title { font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 12px; margin-top: 28px; }
.section-title:first-child { margin-top: 0; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }

/* ── CURSOR GLOW ── */
#cursor-glow { pointer-events: none; position: fixed; border-radius: 50%; width: 500px; height: 500px; background: radial-gradient(circle, rgba(255,90,0,0.06) 0%, transparent 65%); transform: translate(-50%,-50%); z-index: 9999; transition: none; }

/* ── MONTHLY CALENDAR ── */
.monthly-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.monthly-header { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); text-align: center; padding: 8px 0; }
.monthly-cell { min-height: 80px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); border-radius: 8px; padding: 6px; cursor: pointer; transition: background 0.15s; }
.monthly-cell:hover { background: rgba(255,255,255,0.06); }
.monthly-cell.today { border-color: var(--orange); }
.monthly-cell.empty { background: transparent; border-color: transparent; cursor: default; }
.monthly-day { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.monthly-dots { display: flex; flex-wrap: wrap; gap: 3px; }
.monthly-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .sidebar { width: 60px; min-width: 60px; }
  .nav-item span:not(.nav-icon) { display: none; }
  .nav-group-label { display: none; }
  .sidebar-logo img { display: none; }
  .sidebar-bottom { display: none; }
  .kanban { grid-template-columns: 1fr !important; }
  .cima-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .content { padding: 16px; }
}
