@import "tailwindcss";

/* Epic CRM - rediseno profesional (boceto aislado) */

:root {
  --bg-deep: #0b0f17;
  --bg-elev: #11161f;
  --bg-panel: #131a24;
  --bg-input: #0e131b;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.22);
  --text: #e8edf4;
  --text-dim: #9aa6b5;
  --text-muted: #687589;
  --accent: #1faa59;
  --accent-soft: rgba(31, 170, 89, 0.14);
  --accent-border: rgba(31, 170, 89, 0.32);
  --violet: #8b5cf6;
  --violet-soft: rgba(139, 92, 246, 0.14);
  --rose: #f1647c;
  --radius: 14px;
  --radius-sm: 10px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sidebar: 320px;
  --drawer: 640px;
  --header: 64px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.18);
}

html.light {
  --bg-deep: #f4f6fa;
  --bg-elev: #ffffff;
  --bg-panel: #ffffff;
  --bg-input: #f1f4f9;
  --border: rgba(15, 23, 42, 0.10);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #131a24;
  --text-dim: #4a5567;
  --text-muted: #8593a6;
  --accent: #15924c;
  --accent-soft: rgba(21, 146, 76, 0.10);
  --shadow: 0 8px 30px rgba(15, 23, 42, 0.10);
}

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

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

* { scrollbar-width: thin; scrollbar-color: rgba(148,163,184,0.25) transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.22); border-radius: 99px; }

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 50% at 85% 0%, rgba(31, 170, 89, 0.06), transparent 60%),
    radial-gradient(60% 50% at 0% 100%, rgba(139, 92, 246, 0.05), transparent 60%);
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
}

.screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  flex-direction: column;
}
.screen.active { display: flex; animation: fade-in 0.3s ease both; }
#screen-dashboard.active { padding-bottom: 48px; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* AUTH */
.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 40px 36px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}
.auth-logo {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
}
.auth-title { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; }
.auth-sub { font-size: 0.85rem; color: var(--text-muted); margin: 6px 0 28px; }
.field-label { display: block; text-align: left; font-size: 0.78rem; font-weight: 600; color: var(--text-dim); margin-bottom: 8px; }

.input-epic {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.92rem;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.input-epic:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn-epic {
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: var(--accent);
  transition: filter 0.18s, transform 0.1s;
}
.btn-epic:hover { filter: brightness(1.08); }
.btn-epic:active { transform: translateY(1px); }

/* Logo theming */
.logo-light-mode { display: none; }
.logo-dark-mode { display: block; }
html.light .logo-light-mode { display: block; }
html.light .logo-dark-mode { display: none; }


.qr-frame {
  position: relative;
  padding: 18px;
  border-radius: 16px;
  background: #fff;
  margin: 8px auto 22px;
  width: fit-content;
}
.qr-scan {
  position: absolute;
  left: 12px; right: 12px;
  height: 2px;
  background: var(--accent);
  animation: scan 2.2s linear infinite;
}
@keyframes scan {
  0% { top: 12px; opacity: 0; }
  10%, 90% { opacity: 1; }
  100% { top: calc(100% - 12px); opacity: 0; }
}
.qr-placeholder {
  width: 200px;
  height: 200px;
  background: repeating-conic-gradient(#e2e8f0 0% 25%, #fff 0% 50%) 0 0 / 16px 16px;
}

.steps { list-style: none; text-align: left; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 24px; }
.steps li { display: flex; gap: 12px; margin-bottom: 12px; align-items: center; }
.steps .num {
  width: 24px; height: 24px; border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem; font-weight: 700;
  display: grid; place-items: center; flex-shrink: 0;
}

/* DASHBOARD */
.dash-header {
  height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
  z-index: 30;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
}
.brand h1 { font-size: 0.95rem; font-weight: 800; letter-spacing: -0.01em; }
.brand span { font-size: 0.62rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; display: block; }

.live-status {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 16px; border-radius: 999px;
  font-size: 0.76rem; font-weight: 500; color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--bg-panel);
  transition: border-color 0.3s, background 0.3s;
}
.live-status strong { color: var(--accent); font-weight: 700; }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.4s;
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.header-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-dim);
  cursor: pointer;
  display: grid; place-items: center;
  transition: color 0.18s, border-color 0.18s, background 0.18s, transform 0.1s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-elev); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-border); }

.dash-body { flex: 1; display: flex; min-height: 0; overflow: hidden; z-index: 20; position: relative; }

/* Sidebar */
.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
}
.sidebar-top { padding: 18px 16px 12px; }
.sidebar-top h2 {
  font-size: 0.66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-muted); margin-bottom: 14px;
  display: flex; justify-content: space-between; align-items: center;
}
.badge-count {
  font-size: 0.66rem; padding: 2px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 700;
}

.search-epic { position: relative; margin-bottom: 12px; }
.search-epic input {
  width: 100%; padding: 10px 12px 10px 38px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--bg-input); color: var(--text);
  font-family: var(--font); font-size: 0.85rem;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.search-epic input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-epic svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); }

.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter {
  font-size: 0.72rem; font-weight: 600; padding: 6px 12px;
  border-radius: 8px; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted);
  cursor: pointer; font-family: var(--font); transition: 0.18s;
}
.filter:hover { color: var(--text-dim); border-color: var(--border-strong); }
.filter.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-border);
}

.convo-scroll { flex: 1; overflow-y: auto; padding: 6px 10px 16px; }
.convo {
  display: flex; gap: 12px; padding: 11px 12px;
  border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  margin-bottom: 2px;
  transition: background 0.16s, border-color 0.16s, transform 0.14s;
  position: relative;
}
.convo:hover { background: var(--bg-panel); transform: translateX(2px); }
.convo.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  border-left-color: var(--accent);
  transform: translateX(2px);
}

.avatar {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.82rem; color: #fff;
  flex-shrink: 0; position: relative;
}
.avatar-sm { width: 42px; height: 42px; border-radius: 11px; font-size: 0.78rem; }
.mode-pip {
  position: absolute; bottom: -3px; right: -3px;
  min-width: 18px; height: 16px; padding: 0 4px;
  border-radius: 6px;
  border: 2px solid var(--bg-elev);
  font-size: 0.52rem; font-weight: 800; letter-spacing: 0.04em;
  display: grid; place-items: center; color: #fff;
}
.mode-pip.ai { background: var(--accent); }
.mode-pip.human { background: var(--violet); }

.convo-info { flex: 1; min-width: 0; }
.convo-row { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 3px; align-items: center; }
.convo-name { font-size: 0.88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-time { font-size: 0.66rem; color: var(--text-muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.convo-preview { font-size: 0.78rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread-pill {
  min-width: 19px; height: 19px; padding: 0 6px;
  border-radius: 999px; background: var(--accent);
  color: #fff; font-size: 0.64rem; font-weight: 700;
  display: grid; place-items: center; flex-shrink: 0;
  box-shadow: 0 0 8px rgba(31,170,89,0.4);
  animation: pill-appear 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes pill-appear {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Chat */
.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg-deep); }
.chat-header {
  height: var(--header);
  padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
}
.chat-contact { display: flex; align-items: center; gap: 13px; }
.chat-contact h3 { font-size: 0.92rem; font-weight: 700; }
.chat-contact p { font-size: 0.72rem; color: var(--text-muted); font-family: var(--mono); }

.mode-switcher {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 6px 14px; border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
}
.mode-switcher span { font-size: 0.74rem; font-weight: 600; color: var(--text-dim); }
.toggle {
  width: 46px; height: 26px; border-radius: 999px;
  border: none; cursor: pointer; position: relative;
  transition: background 0.25s;
}
.toggle.ai { background: var(--accent); }
.toggle.human { background: var(--violet); }
.toggle::after {
  content: '';
  position: absolute; top: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  transition: left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.toggle.ai::after { left: 3px; }
.toggle.human::after { left: 23px; }

.messages { flex: 1; overflow-y: auto; padding: 20px 28px; display: flex; flex-direction: column; gap: 2px; }
.day-label {
  text-align: center; margin: 20px 0 14px;
  font-size: 0.64rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-muted);
}
.day-label span {
  padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  backdrop-filter: blur(8px);
}

.msg-row { display: flex; margin-bottom: 10px; }
.msg-row.in { justify-content: flex-start; }
.msg-row.out { justify-content: flex-end; }

.bubble {
  max-width: min(78%, 520px);
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.55;
  position: relative;
  transition: transform 0.12s ease;
}
.bubble:hover { transform: translateY(-1px); }
.bubble.in {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.bubble.out-ai {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-bottom-right-radius: 4px;
}
.bubble.out-human {
  background: var(--violet-soft);
  border: 1px solid rgba(139,92,246,0.3);
  border-bottom-right-radius: 4px;
}
.bubble-tag {
  font-size: 0.6rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 5px;
  display: flex; align-items: center; gap: 6px;
}
.bubble-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.bubble-tag.ai { color: var(--accent); }
.bubble-tag.human { color: var(--violet); }
.bubble-time { font-size: 0.64rem; color: var(--text-muted); text-align: right; margin-top: 6px; }

.composer {
  padding: 14px 20px;
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.ai-banner {
  align-items: center; justify-content: center; gap: 9px;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem; font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  display: none;
}
.ai-banner.show { display: flex; }

.composer-form { display: flex; gap: 10px; align-items: flex-end; }
.composer-form.hidden { display: none; }
.composer textarea {
  flex: 1; min-height: 46px; max-height: 120px;
  padding: 12px 15px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text); font-family: var(--font);
  font-size: 0.88rem; resize: none; line-height: 1.4;
}
.composer textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.send-btn {
  width: 46px; height: 46px; border-radius: var(--radius-sm); border: none;
  cursor: pointer; color: #fff;
  background: var(--accent);
  display: grid; place-items: center;
  transition: filter 0.18s, transform 0.1s, box-shadow 0.18s; flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(31,170,89,0.25);
}
.send-btn:hover { filter: brightness(1.08); box-shadow: 0 4px 16px rgba(31,170,89,0.35); }
.send-btn:active { transform: translateY(1px); box-shadow: none; }
.send-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* Drawer */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(2, 6, 23, 0.55);
  opacity: 0; pointer-events: none;
  transition: opacity 0.28s;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: var(--drawer); max-width: 100vw;
  z-index: 51;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex; flex-direction: column;
  box-shadow: -16px 0 50px rgba(0,0,0,0.3);
  background: var(--bg-panel);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.drawer-head h2 { font-size: 1rem; font-weight: 700; }
.drawer-tabs { display: flex; gap: 4px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.drawer-tab {
  flex: 1;
  font-size: 0.74rem; font-weight: 600; padding: 8px 10px;
  border-radius: 8px; border: none; background: transparent;
  color: var(--text-muted); cursor: pointer; font-family: var(--font);
  white-space: nowrap; transition: 0.18s;
}
.drawer-tab:hover { color: var(--text-dim); }
.drawer-tab.active { background: var(--accent-soft); color: var(--accent); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.drawer-pane { display: none; }
.drawer-pane.active { display: block; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.stat {
  padding: 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-panel);
}
.stat strong { font-size: 1.6rem; font-weight: 800; display: block; line-height: 1; color: var(--text); }
.stat span { font-size: 0.72rem; color: var(--text-muted); margin-top: 6px; display: block; }
.hint { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; margin-top: 8px; }
.hint code { font-family: var(--mono); font-size: 0.75rem; color: var(--text-dim); }

.card-epic {
  padding: 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 14px;
  background: var(--bg-panel);
}
.card-epic h4 { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); margin-bottom: 10px; }
.card-epic textarea, .card-epic input {
  width: 100%; padding: 11px; border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-input); color: var(--text);
  font-family: var(--mono); font-size: 0.8rem; line-height: 1.5; resize: vertical;
}
.card-epic textarea:focus, .card-epic input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.quick-card { padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-panel); margin-bottom: 10px; }
.quick-card .shortcut { font-family: var(--mono); font-size: 0.74rem; color: var(--accent); font-weight: 600; }
.quick-card p { font-size: 0.84rem; margin-top: 7px; color: var(--text-dim); line-height: 1.45; }

/* Empty */
.empty-chat {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 40px;
  gap: 0;
}
.empty-chat .orb {
  width: 88px; height: 88px; border-radius: 24px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--accent);
  display: grid; place-items: center;
  margin-bottom: 24px;
  position: relative;
  box-shadow: 0 0 0 0 rgba(31,170,89,0.3);
}
.empty-chat .orb-pulse {
  animation: orb-pulse-anim 2.8s ease-in-out infinite;
}
@keyframes orb-pulse-anim {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31,170,89,0.25); }
  50% { box-shadow: 0 0 0 14px rgba(31,170,89,0); }
}
.empty-chat h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.empty-chat p { font-size: 0.85rem; color: var(--text-muted); max-width: 300px; line-height: 1.6; margin-bottom: 20px; }
.empty-hints { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.empty-hint-pill {
  font-size: 0.72rem; font-weight: 600;
  padding: 5px 12px; border-radius: 999px;
  background: var(--bg-panel); border: 1px solid var(--border);
  color: var(--text-dim); white-space: nowrap;
}

/* Mobile */
@media (max-width: 900px) {
  :root { --sidebar: 100%; }
  .sidebar { position: absolute; inset: 0; z-index: 25; }
  .sidebar.hidden-mobile { display: none; }
  .chat-main.hidden-mobile { display: none; }
  .drawer { width: 100%; }
  .dash-header .live-status span:last-child { display: none; }
}
@media (min-width: 901px) { .back-mobile { display: none !important; } }
.back-mobile {
  display: inline-flex; align-items: center;
  font-size: 0.8rem; font-weight: 600; color: var(--accent);
  background: none; border: none; cursor: pointer;
  font-family: var(--font); margin-right: 6px;
}

/* Toast */
.toast-stack { position: fixed; top: 76px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 11px 16px; border-radius: var(--radius-sm);
  font-size: 0.82rem; font-weight: 500;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 10px;
  animation: toast-in 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.toast svg { width: 16px; height: 16px; flex-shrink: 0; }
.toast.success { color: var(--accent); }
.toast.error { color: var(--rose); }
@keyframes toast-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }

/* Glass Card (Dark/Light compatible glassmorphic modal cards) */
.glass-card {
  background: rgba(19, 26, 36, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
html.light .glass-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
}

/* Skeleton Loading Shimmer animation */
.skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.6s infinite linear;
}
html.light .skeleton {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.03) 25%, rgba(0, 0, 0, 0.07) 50%, rgba(0, 0, 0, 0.03) 75%);
  background-size: 200% 100%;
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Spinner Epic */
.spinner-epic {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s cubic-bezier(0.4, 0.15, 0.3, 0.85) infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Close Drawer Button */
.close-drawer {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 1.25rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
}
.close-drawer:hover {
  background: var(--border);
  color: var(--text);
  border-color: var(--border-strong);
  transform: scale(1.05);
}

/* Danger Button style */
.btn-danger {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), #d03c54);
  box-shadow: 0 4px 15px rgba(241, 100, 124, 0.25);
  transition: filter 0.18s, transform 0.1s, box-shadow 0.18s;
}
.btn-danger:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 20px rgba(241, 100, 124, 0.35);
}
.btn-danger:active {
  transform: translateY(1px);
}

/* Background animated elements */
.aurora {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(31, 170, 89, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
  z-index: 1;
  pointer-events: none;
}
.grid-noise {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.007) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.007) 1px, transparent 1px);
  background-size: 20px 20px;
  mask-image: radial-gradient(ellipse at center, black, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black, transparent 75%);
  z-index: 2;
  pointer-events: none;
}
html.light .grid-noise {
  background-image: 
    linear-gradient(rgba(0,0,0,0.009) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.009) 1px, transparent 1px);
}
