﻿:root {
  --bg: #0b0f1a;
  --panel: #121a2b;
  --panel-soft: rgba(18, 26, 43, 0.75);
  --primary: #00e5ff;
  --secondary: #7c4dff;
  --text: #e6f1ff;
  --muted: #9cb0d3;
  --border: rgba(140, 170, 220, 0.22);
  --danger: #ff4d6d;
  --warning: #ffb703;
  --success: #00e676;
  --prio-1: #ff4d6d;
  --prio-2: #ff7f50;
  --prio-3: #ffb703;
  --prio-4: #3aa8ff;
  --prio-5: #8b95a7;
  --font-ui: "Rajdhani", "Inter", sans-serif;
  --font-display: "Orbitron", "Rajdhani", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  margin: 0;
  background: radial-gradient(circle at 15% 10%, rgba(124, 77, 255, 0.16), transparent 32%),
    radial-gradient(circle at 82% 2%, rgba(0, 229, 255, 0.18), transparent 35%),
    var(--bg);
  background-size: 140% 140%, 140% 140%, auto;
  animation: bg-shift 36s ease-in-out infinite alternate;
  color: var(--text);
  font-family: var(--font-ui);
  min-height: 100vh;
  overflow-x: hidden;
}

body[data-font-theme="classic"] {
  --font-ui: "Rajdhani", "Inter", sans-serif;
  --font-display: "Orbitron", "Rajdhani", sans-serif;
}

body[data-font-theme="clean"] {
  --font-ui: "Exo 2", "Inter", sans-serif;
  --font-display: "Rajdhani", "Exo 2", sans-serif;
}

body[data-font-theme="hardcore"] {
  --font-ui: "Exo 2", "Rajdhani", sans-serif;
  --font-display: "Oxanium", "Orbitron", sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background:
    radial-gradient(42% 38% at 18% 22%, rgba(0, 229, 255, 0.30), transparent 72%),
    radial-gradient(34% 36% at 78% 20%, rgba(124, 77, 255, 0.32), transparent 70%),
    radial-gradient(28% 32% at 50% 82%, rgba(0, 229, 255, 0.20), transparent 72%);
  filter: blur(22px) saturate(118%);
  animation: nebula-drift 42s ease-in-out infinite alternate;
  mix-blend-mode: screen;
}

body::after {
  background-image:
    linear-gradient(rgba(124, 77, 255, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.10) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px;
  mask-image: radial-gradient(circle at 50% 35%, rgba(0, 0, 0, 0.8), transparent 78%);
  opacity: 0.36;
  animation: grid-drift 44s linear infinite;
}

.bg-orb {
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(78px);
  opacity: 0.13;
  pointer-events: none;
  z-index: 0;
  animation: orb-float 34s ease-in-out infinite alternate;
}

.bg-orb-a {
  background: var(--primary);
  top: -120px;
  left: -80px;
}

.bg-orb-b {
  background: var(--secondary);
  bottom: -140px;
  right: -90px;
  animation-duration: 42s;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 15, 26, 0.72);
  border-bottom: 1px solid rgba(124, 77, 255, 0.24);
  backdrop-filter: blur(10px);
  padding: 14px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  background: rgba(8, 14, 24, 0.7);
  color: #cde8ff;
  font-size: 12px;
}

.settings-panel {
  position: absolute;
  right: 120px;
  top: calc(100% + 8px);
  z-index: 30;
  min-width: 210px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(124, 77, 255, 0.32);
  background: rgba(10, 15, 28, 0.96);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4), 0 0 12px rgba(0, 229, 255, 0.30);
}

.settings-group + .settings-group {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(124, 77, 255, 0.18);
}

.settings-group h4 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(188, 203, 228, 0.88);
}

.voice-toggle {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  padding: 7px 10px;
  margin-bottom: 0;
  border: 1px solid rgba(124, 77, 255, 0.28);
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.55);
}

.voice-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.settings-action {
  width: 100%;
  margin-top: 2px;
}

.settings-collapse-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(124, 77, 255, 0.24);
  border-radius: 10px;
  background: rgba(7, 11, 20, 0.62);
  color: var(--text);
  padding: 8px 10px;
  cursor: pointer;
}

#account-section-body {
  margin-top: 8px;
}

.system-stats-box {
  margin-top: 4px;
  border: 1px solid rgba(124, 77, 255, 0.24);
  border-radius: 10px;
  background: rgba(7, 11, 20, 0.62);
  padding: 8px 10px;
}

.system-stat-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  padding: 4px 0;
}

.system-stat-line + .system-stat-line {
  border-top: 1px solid rgba(124, 77, 255, 0.16);
}

.system-stat-line strong {
  color: #d7e9ff;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.system-stats-note {
  margin-top: 6px;
  color: rgba(170, 188, 216, 0.84);
  font-size: 11px;
  line-height: 1.3;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.settings-field select {
  border: 1px solid rgba(124, 77, 255, 0.3);
  border-radius: 10px;
  background: rgba(7, 11, 20, 0.72);
  color: var(--text);
  padding: 8px 10px;
}

body[data-bg-intensity="ef1"]::before {
  background:
    radial-gradient(64% 42% at 50% 38%, rgba(255, 70, 220, 0.26), transparent 72%),
    radial-gradient(56% 30% at 50% 52%, rgba(124, 77, 255, 0.20), transparent 76%),
    radial-gradient(36% 24% at 50% 60%, rgba(0, 229, 255, 0.12), transparent 82%);
  filter: blur(20px) saturate(118%);
  animation: synth-horizon 22s ease-in-out infinite alternate;
  mix-blend-mode: screen;
}

body[data-bg-intensity="ef1"]::after {
  inset: 36% -10% -24% -10%;
  opacity: 0.58;
  background-image:
    linear-gradient(rgba(255, 78, 224, 0.42) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 225, 255, 0.42) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 70, 220, 0.18), transparent 42%);
  background-size: 88px 64px, 88px 64px, 100% 100%;
  mask-image: none;
  transform-origin: center bottom;
  transform: perspective(720px) rotateX(72deg);
  animation: grid-lite-pulse 9s ease-in-out infinite;
}

body[data-bg-intensity="ef1"] .bg-orb {
  opacity: 0.06;
  filter: blur(88px);
  animation-duration: 52s;
}

body[data-bg-intensity="ef2"]::before {
  background:
    radial-gradient(72% 46% at 50% 40%, rgba(115, 68, 255, 0.34), transparent 74%),
    radial-gradient(54% 34% at 50% 60%, rgba(0, 229, 255, 0.22), transparent 78%),
    linear-gradient(180deg, rgba(14, 18, 36, 0.18), rgba(6, 10, 20, 0.78) 56%, rgba(5, 8, 16, 0.96));
  filter: blur(12px) saturate(122%);
  animation: nebula-drift 46s ease-in-out infinite alternate;
  mix-blend-mode: screen;
}

body[data-bg-intensity="ef2"]::after {
  inset: -12% -12% -12% -12%;
  opacity: 0.42;
  background-image:
    radial-gradient(42% 26% at 22% 66%, rgba(124, 77, 255, 0.28), transparent 72%),
    radial-gradient(40% 24% at 78% 64%, rgba(0, 229, 255, 0.26), transparent 72%),
    radial-gradient(24% 16% at 50% 56%, rgba(189, 127, 255, 0.20), transparent 74%);
  background-size: auto, auto, auto;
  mix-blend-mode: screen;
  mask-image: none;
  animation: ef2-glow-drift 30s ease-in-out infinite alternate;
  filter: blur(10px);
}

body[data-bg-intensity="ef2"] .bg-orb {
  display: none;
}

body[data-bg-intensity="ef3"]::before {
  background:
    radial-gradient(52% 48% at 14% 18%, rgba(255, 0, 106, 0.32), transparent 72%),
    radial-gradient(42% 38% at 84% 26%, rgba(255, 184, 0, 0.34), transparent 70%),
    radial-gradient(40% 34% at 52% 84%, rgba(0, 229, 255, 0.34), transparent 72%),
    radial-gradient(30% 28% at 64% 64%, rgba(124, 77, 255, 0.30), transparent 68%),
    radial-gradient(28% 24% at 28% 70%, rgba(0, 230, 118, 0.28), transparent 68%);
  filter: blur(14px) saturate(140%);
  animation: reactor-wave 18s ease-in-out infinite alternate;
}

body[data-bg-intensity="ef3"]::after {
  opacity: 0.60;
  background-image:
    linear-gradient(rgba(255, 0, 106, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.16) 1px, transparent 1px),
    linear-gradient(45deg, rgba(255, 184, 0, 0.12) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px, 96px 96px;
  animation: holo-scan 14s linear infinite;
}

body[data-bg-intensity="ef4"]::before {
  background:
    radial-gradient(circle at 50% 52%, rgba(0, 229, 255, 0.24), transparent 28%),
    radial-gradient(circle at 50% 52%, rgba(124, 77, 255, 0.20), transparent 42%),
    repeating-radial-gradient(
      circle at 50% 52%,
      rgba(0, 229, 255, 0.15) 0 2px,
      rgba(124, 77, 255, 0.08) 2px 4px,
      transparent 4px 22px
    ),
    conic-gradient(
      from 0deg at 50% 52%,
      rgba(0, 229, 255, 0.10) 0deg,
      transparent 70deg,
      rgba(124, 77, 255, 0.10) 150deg,
      transparent 260deg,
      rgba(0, 229, 255, 0.08) 320deg,
      transparent 360deg
    );
  filter: blur(10px) saturate(112%);
  animation: hologram-tunnel 30s linear infinite;
  mix-blend-mode: screen;
}

body[data-bg-intensity="ef4"]::after {
  opacity: 0.52;
  background-image:
    repeating-radial-gradient(
      circle at 50% 52%,
      transparent 0 30px,
      rgba(255, 255, 255, 0.05) 30px 31px,
      transparent 31px 62px
    ),
    linear-gradient(rgba(0, 229, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 77, 255, 0.07) 1px, transparent 1px);
  background-size: auto, 120px 120px, 120px 120px;
  animation: ring-focus 22s ease-in-out infinite;
  mask-image: none;
}

body[data-bg-intensity="ef4"] .bg-orb {
  opacity: 0;
  animation: none;
}

body[data-bg-intensity="ef5"]::before {
  background:
    radial-gradient(52% 48% at 14% 18%, rgba(255, 0, 170, 0.33), transparent 72%),
    radial-gradient(42% 38% at 84% 26%, rgba(0, 229, 255, 0.4), transparent 70%),
    radial-gradient(40% 34% at 52% 84%, rgba(124, 77, 255, 0.36), transparent 72%);
  filter: blur(14px) saturate(136%);
  animation: reactor-wave 18s ease-in-out infinite alternate;
}

body[data-bg-intensity="ef5"]::after {
  opacity: 0.62;
  background-image:
    linear-gradient(rgba(255, 0, 170, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.2) 1px, transparent 1px);
  background-size: 62px 62px, 62px 62px;
  animation: holo-scan 14s linear infinite;
}

body[data-bg-intensity="ef5"] .bg-orb {
  opacity: 0.24;
  filter: blur(62px);
  animation-duration: 16s;
}

body[data-bg-intensity="ef6"] {
  background: #070b12;
  animation: none;
}

body[data-bg-intensity="ef6"]::before {
  background:
    radial-gradient(circle at 12% 22%, rgba(255, 255, 255, 0.72) 0 1px, transparent 2px),
    radial-gradient(circle at 28% 64%, rgba(255, 255, 255, 0.58) 0 1px, transparent 2px),
    radial-gradient(circle at 44% 36%, rgba(255, 255, 255, 0.50) 0 1px, transparent 2px),
    radial-gradient(circle at 58% 72%, rgba(255, 255, 255, 0.62) 0 1px, transparent 2px),
    radial-gradient(circle at 74% 20%, rgba(255, 255, 255, 0.56) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 56%, rgba(255, 255, 255, 0.70) 0 1px, transparent 2px);
  background-size: 340px 340px, 400px 400px, 300px 300px, 420px 420px, 360px 360px, 460px 460px;
  filter: none;
  mix-blend-mode: normal;
  animation: stars-twinkle-a 6s ease-in-out infinite alternate;
  opacity: 0.58;
}

body[data-bg-intensity="ef6"]::after {
  background:
    radial-gradient(circle at 18% 48%, rgba(255, 255, 255, 0.44) 0 1px, transparent 2px),
    radial-gradient(circle at 36% 18%, rgba(255, 255, 255, 0.36) 0 1px, transparent 2px),
    radial-gradient(circle at 52% 54%, rgba(255, 255, 255, 0.42) 0 1px, transparent 2px),
    radial-gradient(circle at 68% 30%, rgba(255, 255, 255, 0.34) 0 1px, transparent 2px),
    radial-gradient(circle at 84% 76%, rgba(255, 255, 255, 0.46) 0 1px, transparent 2px);
  background-size: 260px 260px, 320px 320px, 280px 280px, 360px 360px, 300px 300px;
  mask-image: none;
  animation: stars-twinkle-b 4.8s ease-in-out infinite alternate;
  opacity: 0.42;
}

body[data-bg-intensity="ef6"] .bg-orb {
  display: none;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #001118;
  background: linear-gradient(135deg, var(--primary), #79f2ff);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.34);
}

.brand {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
}

.container {
  position: relative;
  z-index: 2;
  max-width: 1220px;
  margin: 24px auto;
  padding: 0 16px 30px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.card,
.panel {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(8px);
}

.stat-card {
  padding: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 229, 255, 0.48);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3), 0 0 18px rgba(0, 229, 255, 0.14);
}

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

.stat-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.25), rgba(124, 77, 255, 0.3));
  border: 1px solid rgba(0, 229, 255, 0.34);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.card h3 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.card p {
  font-family: var(--font-display);
  margin: 10px 0 0;
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.5px;
}

.panel {
  padding: 16px;
}

.hidden {
  display: none;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--muted);
}

input,
select,
button {
  font: inherit;
}

input,
select {
  border: 1px solid rgba(124, 77, 255, 0.26);
  border-radius: 10px;
  padding: 10px;
  background: rgba(7, 11, 20, 0.7);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(0, 229, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.30);
}

/* Improve contrast for native date/time picker icon in dark theme */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.35);
  opacity: 0.95;
  cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
  filter: invert(1) brightness(1.6) drop-shadow(0 0 6px rgba(0, 229, 255, 0.45));
}

input[type="date"],
input[type="time"],
input[type="datetime-local"] {
  color-scheme: dark;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 12px;
}

.actions-row {
  display: flex;
  gap: 8px;
}

.btn {
  border-radius: 10px;
  border: 1px solid rgba(124, 77, 255, 0.28);
  background: rgba(17, 24, 39, 0.7);
  color: var(--text);
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover {
  border-color: rgba(0, 229, 255, 0.7);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.22);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(120deg, rgba(0, 229, 255, 0.92), rgba(124, 77, 255, 0.9));
  border-color: transparent;
  color: #03111c;
  font-weight: 700;
}

.btn-ghost {
  background: rgba(7, 11, 20, 0.58);
}

.btn-danger {
  background: linear-gradient(120deg, rgba(255, 77, 109, 0.92), rgba(255, 122, 89, 0.88));
  border-color: transparent;
  color: #19040a;
  font-weight: 700;
}

.table-panel {
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid rgba(156, 176, 211, 0.16);
  vertical-align: middle;
}

th {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.3px;
}

tbody tr {
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

tbody tr:hover {
  background: rgba(124, 77, 255, 0.08);
}

.group-row td {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(182, 198, 224, 0.9);
  background: rgba(124, 77, 255, 0.1);
  border-bottom: 1px solid rgba(124, 77, 255, 0.24);
  padding: 8px 8px;
}

.group-row-toggle td {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.group-row-toggle td:hover {
  background: rgba(124, 77, 255, 0.18);
  color: #d7e4ff;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #0b111d;
}

.prio-1 { background: var(--prio-1); }
.prio-2 { background: var(--prio-2); }
.prio-3 { background: var(--prio-3); }
.prio-4 { background: var(--prio-4); }
.prio-5 { background: var(--prio-5); color: #f3f6fb; }

.state {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
  border: 1px solid rgba(156, 176, 211, 0.22);
}

.state-pendiente {
  color: #ffd166;
  background: rgba(255, 209, 102, 0.12);
}

.state-en_proceso {
  color: #8be9ff;
  background: rgba(0, 229, 255, 0.12);
}

.state-completada {
  color: #8cf9bd;
  background: rgba(0, 230, 118, 0.12);
}

.time-cell {
  min-width: 180px;
}

.time-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
}

.progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(230, 241, 255, 0.12);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.row-soon {
  box-shadow: inset 0 0 0 1px rgba(255, 183, 3, 0.6), 0 0 14px rgba(255, 183, 3, 0.2);
}

.row-overdue {
  box-shadow: inset 0 0 0 1px rgba(255, 77, 109, 0.7), 0 0 18px rgba(255, 77, 109, 0.28);
  animation: pulse-red 1.8s infinite;
}

@keyframes pulse-red {
  0% { box-shadow: inset 0 0 0 1px rgba(255, 77, 109, 0.7), 0 0 10px rgba(255, 77, 109, 0.2); }
  50% { box-shadow: inset 0 0 0 1px rgba(255, 77, 109, 0.95), 0 0 20px rgba(255, 77, 109, 0.36); }
  100% { box-shadow: inset 0 0 0 1px rgba(255, 77, 109, 0.7), 0 0 10px rgba(255, 77, 109, 0.2); }
}

@keyframes bg-shift {
  0% {
    background-position: 0% 0%, 100% 0%, 0 0;
  }
  100% {
    background-position: 10% 12%, 88% 14%, 0 0;
  }
}

@keyframes orb-float {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(34px, 24px, 0) scale(1.08);
  }
}

@keyframes nebula-drift {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  100% {
    transform: translate3d(3%, 2%, 0) scale(1.04);
  }
}

@keyframes grid-drift {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 120px 80px, -120px -80px;
  }
}

@keyframes aurora-flow {
  0% {
    transform: translate3d(-3%, -1%, 0) scale(1.02) rotate(0deg);
  }
  100% {
    transform: translate3d(4%, 2%, 0) scale(1.08) rotate(6deg);
  }
}

@keyframes reactor-wave {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(2%, -1%, 0) scale(1.06);
  }
  100% {
    transform: translate3d(-2%, 2%, 0) scale(1.1);
  }
}

@keyframes holo-scan {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 180px 120px, -180px -120px;
  }
}

@keyframes ion-flow {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1.02) rotate(-2deg);
  }
  100% {
    transform: translate3d(3%, 2%, 0) scale(1.09) rotate(4deg);
  }
}

@keyframes solar-surge {
  0% {
    transform: translate3d(-1%, 0, 0) scale(1.01) rotate(-1deg);
  }
  50% {
    transform: translate3d(2%, -2%, 0) scale(1.08) rotate(3deg);
  }
  100% {
    transform: translate3d(-2%, 2%, 0) scale(1.11) rotate(6deg);
  }
}

@keyframes plasma-drift {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 150px 100px, -150px -100px;
  }
}

@keyframes hologram-tunnel {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.05) rotate(2deg);
    opacity: 0.62;
  }
  100% {
    transform: scale(1.1) rotate(4deg);
    opacity: 0.54;
  }
}

@keyframes ring-focus {
  0% {
    transform: scale(1);
    opacity: 0.42;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.58;
  }
  100% {
    transform: scale(1.08);
    opacity: 0.46;
  }
}

@keyframes synth-horizon {
  0% {
    transform: translate3d(0, -1%, 0) scale(1);
  }
  100% {
    transform: translate3d(0, 1.5%, 0) scale(1.03);
  }
}

@keyframes grid-lite-pulse {
  0% {
    opacity: 0.50;
  }
  50% {
    opacity: 0.62;
  }
  100% {
    opacity: 0.54;
  }
}

@keyframes ef2-glow-drift {
  0% {
    transform: translate3d(-1.5%, -1%, 0) scale(1);
    opacity: 0.36;
  }
  50% {
    transform: translate3d(1.5%, 1.2%, 0) scale(1.03);
    opacity: 0.48;
  }
  100% {
    transform: translate3d(-1%, 1%, 0) scale(1.02);
    opacity: 0.4;
  }
}

@keyframes stars-twinkle-a {
  0% {
    opacity: 0.46;
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  }
  50% {
    opacity: 0.68;
    background-position: 2px -3px, -2px 2px, 3px -1px, -1px 3px, 2px 1px, -2px -2px;
  }
  100% {
    opacity: 0.54;
    background-position: 4px -5px, -4px 4px, 6px -2px, -2px 5px, 4px 2px, -3px -4px;
  }
}

@keyframes stars-twinkle-b {
  0% {
    opacity: 0.30;
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
  }
  50% {
    opacity: 0.50;
    background-position: -2px 2px, 2px -1px, -1px 3px, 3px -2px, -2px 1px;
  }
  100% {
    opacity: 0.36;
    background-position: -4px 4px, 4px -2px, -2px 6px, 6px -3px, -4px 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  body::before,
  body::after,
  .bg-orb,
  .row-overdue {
    animation: none !important;
  }
}

.actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.small {
  font-size: 11px;
  padding: 6px 8px;
}

.action-icon {
  font-size: 11px;
  opacity: 0.9;
}

@media (max-width: 980px) {
  .stats,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .topbar {
    gap: 10px;
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .settings-panel {
    right: 0;
    top: calc(100% + 6px);
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead {
    display: none;
  }

  tbody tr {
    border: 1px solid rgba(124, 77, 255, 0.25);
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(10, 14, 24, 0.64);
  }

  td {
    border-bottom: none;
    padding: 6px 6px;
  }
}



.flow-empty-row td {
  border-bottom: 1px solid rgba(156, 176, 211, 0.16);
  padding: 18px 10px;
}

.flow-empty-card {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: 22px 24px 20px;
  border-radius: 16px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0 2px, transparent 2px 4px) 0 0 / 100% 4px,
    linear-gradient(145deg, rgba(8, 16, 30, 0.86), rgba(14, 22, 40, 0.82));
  box-shadow: 0 0 0 1px rgba(124, 77, 255, 0.24), 0 14px 30px rgba(0, 0, 0, 0.3), 0 0 30px rgba(0, 229, 255, 0.18);
  animation: fade-in-soft 180ms ease-out;
  overflow: hidden;
}

.flow-empty-card::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 130px;
  background: radial-gradient(circle at 50% 50%, rgba(0, 229, 255, 0.24), transparent 70%);
  pointer-events: none;
}

.flow-empty-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(124, 77, 255, 0.28);
  pointer-events: none;
}

.flow-empty-kicker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid rgba(0, 229, 255, 0.34);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.09em;
  color: #b7f4ff;
  background: rgba(0, 229, 255, 0.08);
  margin-bottom: 10px;
}

.hud-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00e676;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.85);
  animation: hud-led-pulse 1.6s ease-in-out infinite;
}

.flow-empty-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d6f2ff;
  margin-bottom: 4px;
  text-shadow: 0 0 14px rgba(0, 229, 255, 0.34);
}

.flow-empty-subtitle {
  position: relative;
  z-index: 1;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #a9dbff;
  margin-bottom: 10px;
}

.flow-empty-text {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #b6c8e7;
  line-height: 1.55;
  font-size: 14px;
}

.flow-empty-footer {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(210, 222, 255, 0.8);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  animation: press-start-blink 1.8s steps(2, end) infinite;
}

.flow-empty-footer:hover {
  color: #dff4ff;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.32);
}

@keyframes fade-in-soft {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 12px;
}

.auth-card {
  width: min(520px, 96vw);
  border-radius: 16px;
  border: 1px solid rgba(124, 77, 255, 0.28);
  background: rgba(10, 16, 28, 0.86);
  backdrop-filter: blur(8px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 0 22px rgba(0, 229, 255, 0.12);
  padding: 18px;
}

.auth-head {
  margin-bottom: 12px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.auth-tab {
  border-radius: 10px;
  border: 1px solid rgba(124, 77, 255, 0.24);
  background: rgba(7, 11, 20, 0.7);
  color: #c6d9f7;
  padding: 8px;
  cursor: pointer;
}

.auth-tab.active {
  border-color: rgba(0, 229, 255, 0.6);
  box-shadow: inset 0 0 0 1px rgba(0, 229, 255, 0.34);
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form.hidden {
  display: none;
}

.auth-feedback {
  margin-top: 12px;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}

.auth-feedback.is-success {
  border: 1px solid rgba(0, 230, 118, 0.3);
  background: rgba(0, 230, 118, 0.12);
  color: #abefc6;
}

.auth-feedback.is-error {
  border: 1px solid rgba(255, 77, 109, 0.32);
  background: rgba(255, 77, 109, 0.12);
  color: #ffc1cd;
}

.auth-link {
  color: #8fe8ff;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

@keyframes hud-led-pulse {
  0% { opacity: 0.7; }
  50% { opacity: 1; }
  100% { opacity: 0.7; }
}

@keyframes press-start-blink {
  0% { opacity: 0.9; }
  50% { opacity: 0.45; }
  100% { opacity: 0.9; }
}


