/* ──────────────────────────────────────────
   Luntrack — Purple · White · Black Theme
   ────────────────────────────────────────── */

:root {
  /* ── Backgrounds: true black, no purple tint ── */
  --bg-base:     #080808;
  --bg-surface:  #0f0f0f;
  --bg-elevated: #181818;
  --bg-card:     #131313;
  --bg-hover:    #202020;

  /* ── Purple accent ── */
  --accent:      #7c67f5;
  --accent-glow: rgba(124,103,245,0.30);
  --accent-soft: rgba(124,103,245,0.12);

  --purple-100: #ede9ff;
  --purple-200: #c4bbff;
  --purple-300: #a394ff;
  --purple-400: #7c67f5;
  --purple-500: #6654d4;

  /* ── Text: all white ── */
  --text-primary:   #ffffff;
  --text-secondary: #ffffff;
  --text-muted:     #ffffff;
  --text-disabled:  rgba(255,255,255,0.35);

  /* ── Borders: white-based, not purple-tinted ── */
  --border:        rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);

  /* ── Status ── */
  --success:    #34d399;  --success-bg: rgba(52,211,153,0.10);
  --warning:    #fbbf24;  --warning-bg: rgba(251,191,36,0.10);
  --danger:     #f87171;  --danger-bg:  rgba(248,113,113,0.10);
  --info:       #60a5fa;  --info-bg:    rgba(96,165,250,0.10);

  /* ── Shape ── */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 999px;

  --shadow:        0 4px 24px rgba(0,0,0,0.7);
  --shadow-purple: 0 4px 32px rgba(124,103,245,0.25);
}

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

/* ── BASE ── */
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(124,103,245,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,103,245,0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 90% 85% at 50% 45%, rgba(0,0,0,0.65) 0%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 85% at 50% 45%, rgba(0,0,0,0.65) 0%, transparent 100%);
}

/* ── PAGE TRANSITION ── */
#page-transition {
  position: fixed; inset: 0;
  background: var(--bg-base);
  z-index: 9999; pointer-events: none;
  opacity: 0; transition: opacity 0.18s ease;
}
#page-transition.out { opacity: 1; pointer-events: all; }

/* ──────────────── TOP NAV ──────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: 56px;
  background: rgba(8,8,8,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px; gap: 4px;
  z-index: 100;
}

.nav-logo {
  display: flex; align-items: center; gap: 8px;
  margin-right: 20px; cursor: pointer; text-decoration: none;
}

.nav-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #b89fff;
  box-shadow:
    0 0 4px 2px rgba(255,255,255,0.85),
    0 0 8px 4px var(--accent),
    0 0 20px 10px rgba(124,103,245,0.7),
    0 0 50px 22px rgba(124,103,245,0.35),
    0 0 90px 40px rgba(124,103,245,0.12);
}

.nav-name {
  font-family: 'Syne', sans-serif;
  font-size: 16px; font-weight: 800;
  color: #ffffff; letter-spacing: -0.2px;
}

.nav-links { display: flex; gap: 2px; flex: 1; }

.nav-link {
  padding: 6px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  color: var(--text-muted);
  cursor: pointer; transition: all .15s;
  border: 1px solid transparent;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  letter-spacing: 0.01em;
}
.nav-link:hover { color: #ffffff; background: var(--bg-hover); }
.nav-link.active {
  background: var(--accent-soft);
  color: #ffffff;
  border-color: rgba(124,103,245,0.25);
}
.nav-link.active i { color: var(--accent); }


.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-user  { font-size: 13px; color: var(--text-muted); font-weight: 500; font-family: 'DM Sans', sans-serif; }

.nav-logout {
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; transition: all .15s; color: var(--text-muted);
}
.nav-logout:hover {
  background: var(--danger-bg);
  border-color: rgba(248,113,113,0.35);
  color: var(--danger);
}

/* ──────────────── BOTTOM NAV ──────────────── */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 62px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  z-index: 200;
  justify-content: space-around; align-items: center;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bn-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; padding: 6px 4px;
  text-decoration: none; color: var(--text-muted);
  font-size: 10px; font-weight: 500;
  transition: color .15s; border: none; background: transparent;
  font-family: 'DM Sans', sans-serif; cursor: pointer;
}
.bn-item i { font-size: 18px; }
.bn-item.active { color: var(--accent); }

/* ──────────────── BUTTONS ──────────────── */
.modal-btn-save,
.modal-btn-cancel,
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-ghost,
.btn-danger {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 500;
  border-radius: var(--radius-md);
  padding: 9px 18px;
  cursor: pointer; transition: all .18s;
  text-decoration: none; white-space: nowrap;
  border: 1.5px solid transparent;
  letter-spacing: 0.01em;
}

.modal-btn-save,
.btn-primary {
  background: var(--accent);
  color: #fff; border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
  flex: 1; justify-content: center;
}
.modal-btn-save:hover,
.btn-primary:hover {
  background: var(--purple-500);
  box-shadow: 0 0 28px rgba(124,103,245,0.45);
  transform: translateY(-1px);
}

.modal-btn-cancel,
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border-color: var(--border-strong);
  flex: 1; justify-content: center;
}
.modal-btn-cancel:hover,
.btn-secondary:hover {
  background: var(--bg-hover);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
}

.btn-outline {
  background: transparent;
  color: #fff; border-color: var(--border-strong);
}
.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.btn-ghost {
  background: transparent; color: var(--text-muted); border-color: transparent;
}
.btn-ghost:hover { color: #fff; background: var(--bg-hover); }

.btn-danger {
  background: var(--danger-bg); color: var(--danger);
  border-color: rgba(248,113,113,0.25);
}
.btn-danger:hover { background: rgba(248,113,113,0.18); }

.btn:disabled, button:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

/* ──────────────── FORM INPUTS ──────────────── */
input[type=text],
input[type=email],
input[type=password],
input[type=number],
select,
textarea {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 10px 14px;
  width: 100%;
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
}
input::placeholder, textarea::placeholder { color: rgba(255,255,255,0.35); }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(124,103,245,0.5), 0 0 12px 2px rgba(124,103,245,0.3), 0 0 28px 6px rgba(124,103,245,0.1);
  background: var(--bg-elevated);
}
input.error { border-color: var(--danger); }
input.error:focus { box-shadow: 0 0 0 3px rgba(248,113,113,0.2); }
input.success { border-color: var(--success); }

select {
  cursor: pointer;
  appearance: none; -webkit-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='%23555555' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
textarea { resize: vertical; min-height: 90px; }

/* ──────────────── TOGGLE ──────────────── */
.toggle { position: relative; width: 42px; height: 23px; cursor: pointer; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute; inset: 0;
  background: var(--bg-hover); border: 1.5px solid var(--border);
  border-radius: var(--radius-full); transition: .25s;
}
.toggle input:checked ~ .toggle-track {
  background: var(--accent); border-color: var(--accent);
}
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 15px; height: 15px; border-radius: 50%;
  background: #fff; transition: .25s;
  box-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.toggle input:checked ~ .toggle-track .toggle-thumb { transform: translateX(19px); }

/* ──────────────── MODAL OVERLAY ──────────────── */
.modal-overlay,
[id$="-overlay"][style*="display:none"],
[id$="Overlay"][style*="display:none"] {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 300;
  align-items: center; justify-content: center; padding: 20px;
}

/* ──────────────── COMMON MODAL BOX ──────────────── */
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 24px;
  width: 100%; max-width: 380px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(124,103,245,0.12);
}

/* ──────────────── BADGE ──────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  border-radius: var(--radius-full);
  padding: 3px 10px; letter-spacing: 0.02em;
}
.badge-purple {
  background: var(--accent-soft); color: var(--purple-200);
  border: 1px solid rgba(124,103,245,0.25);
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger);  }
.badge-info    { background: var(--info-bg);    color: var(--info);    }
.badge-muted   {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary); border: 1px solid var(--border);
}

/* ──────────────── SCROLLBAR ──────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ──────────────── SPINNER ──────────────── */
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ──────────────── RESPONSIVE ──────────────── */
@media (max-width: 768px) {
  .nav-links { display: none !important; }
  .nav-user  { display: none; }
  .bottom-nav { display: flex; }
}

/* ──────────────── NEON ACCENTS ──────────────── */

/* Nav dot — neon orb з пульсом */
@keyframes neon-pulse {
  0%, 100% {
    box-shadow:
      0 0 3px 1px rgba(255,255,255,0.6),
      0 0 6px 3px var(--accent),
      0 0 14px 7px rgba(124,103,245,0.5),
      0 0 34px 14px rgba(124,103,245,0.22),
      0 0 60px 26px rgba(124,103,245,0.08);
  }
  50% {
    box-shadow:
      0 0 2px 1px rgba(255,255,255,0.35),
      0 0 5px 2px rgba(124,103,245,0.7),
      0 0 10px 5px rgba(124,103,245,0.35),
      0 0 24px 10px rgba(124,103,245,0.15),
      0 0 42px 18px rgba(124,103,245,0.05);
  }
}
.nav-dot {
  animation: neon-pulse 2.8s ease-in-out infinite;
}

/* Active nav link — neon icon */
.nav-link.active i {
  filter:
    drop-shadow(0 0 3px var(--accent))
    drop-shadow(0 0 7px rgba(124,103,245,0.65));
}
.nav-link.active {
  box-shadow: 0 0 10px rgba(124,103,245,0.18), inset 0 0 7px rgba(124,103,245,0.05);
}

/* Primary button — постійний неон + посилення на ховері */
.modal-btn-save,
.btn-primary {
  box-shadow:
    0 0 5px var(--accent),
    0 0 10px rgba(124,103,245,0.4),
    0 0 20px rgba(124,103,245,0.18);
}
.modal-btn-save:hover,
.btn-primary:hover {
  box-shadow:
    0 0 3px #fff,
    0 0 8px var(--accent),
    0 0 16px var(--accent),
    0 0 32px rgba(124,103,245,0.42),
    0 0 56px rgba(124,103,245,0.18);
  transform: translateY(-1px);
}

/* Bottom nav active — neon icon + текст */
.bn-item.active {
  color: var(--purple-200);
  text-shadow: 0 0 6px rgba(124,103,245,0.65);
}
.bn-item.active i {
  filter:
    drop-shadow(0 0 4px var(--accent))
    drop-shadow(0 0 9px rgba(124,103,245,0.55));
}

/* Toggle checked — neon track */
.toggle input:checked ~ .toggle-track {
  box-shadow:
    0 0 5px var(--accent),
    0 0 10px rgba(124,103,245,0.32),
    inset 0 0 4px rgba(124,103,245,0.14);
}

/* Option pill active — neon */
.option-pill.active {
  box-shadow:
    0 0 5px var(--accent),
    0 0 12px rgba(124,103,245,0.35),
    0 0 22px rgba(124,103,245,0.18);
}

/* Modal box — neon border */
.modal-box {
  box-shadow:
    0 32px 80px rgba(0,0,0,0.8),
    0 0 0 1px rgba(124,103,245,0.22),
    0 0 18px rgba(124,103,245,0.08);
}

/* Badge purple */
.badge-purple {
  box-shadow: 0 0 6px rgba(124,103,245,0.28), 0 0 12px rgba(124,103,245,0.1);
}

/* Scrollbar hover */
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent), 0 0 12px rgba(124,103,245,0.35);
}

/* ── NEON AMBIENT BACKGROUND ORBS ── */
@keyframes neon-orb-a {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
@keyframes neon-orb-b {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    /* Top neon glow strip — "neon ceiling" */
    linear-gradient(180deg, rgba(124,103,245,0.045) 0%, transparent 160px),
    /* Ambient corner orbs */
    radial-gradient(ellipse 700px 540px at  8%  12%, rgba(124,103,245,0.055) 0%, transparent 68%),
    radial-gradient(ellipse 500px 400px at 92%  82%, rgba(124,103,245,0.048) 0%, transparent 65%),
    radial-gradient(ellipse 340px 270px at 80%   7%, rgba(124,103,245,0.030) 0%, transparent 60%),
    radial-gradient(ellipse 270px 210px at 18%  90%, rgba(124,103,245,0.024) 0%, transparent 55%);
  animation: neon-orb-a 11s ease-in-out infinite;
}


