@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  --bg-primary: #060a14;
  --bg-secondary: #0d1225;
  --bg-card: rgba(15, 20, 45, 0.65);
  --bg-card-hover: rgba(20, 28, 58, 0.8);
  --bg-sidebar: rgba(10, 14, 30, 0.9);
  --border-color: rgba(124, 58, 237, 0.15);
  --border-glow: rgba(124, 58, 237, 0.35);
  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --accent-cyan: #22d3ee;
  --accent-green: #34d399;
  --accent-amber: #fbbf24;
  --accent-rose: #f43f5e;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --glass-blur: blur(20px);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(124, 58, 237, 0.08), transparent),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgba(34, 211, 238, 0.06), transparent);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent-cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ── Layout Shell ───────────────────────────────────────── */
.app-shell {
  display: none;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 64px 1fr;
  grid-template-areas: "sidebar header" "sidebar main";
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.app-shell.visible {
  display: grid;
}

.login-overlay.hidden {
  display: none !important;
}

/* ── Header ─────────────────────────────────────────────────── */
.header {
  grid-area: header;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  z-index: 10;
}

.header-left { display: flex; align-items: center; gap: 16px; }

.header-title {
  font-size: 1.15rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-light), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-right { display: flex; align-items: center; gap: 16px; }

.user-badge { display: flex; align-items: center; gap: 8px; }
.user-avatar { font-size: 1.1rem; }
.user-name { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(124, 58, 237, 0.08);
}

.lang-switcher .lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.lang-switcher .lang-btn:hover {
  background: rgba(124, 58, 237, 0.2);
  border-color: var(--border-glow);
}

.live-clock {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  grid-area: sidebar;
  background: var(--bg-sidebar);
  backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  z-index: 20;
  overflow-y: auto;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid var(--border-color);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 19;
}

.sidebar-overlay.show {
  display: block;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 8px;
}

.sidebar-logo .logo-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.sidebar-logo .logo-text {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.sidebar-logo .logo-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
}

.nav-section {
  padding: 16px 16px 8px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 24px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  position: relative;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(124, 58, 237, 0.08);
}

.nav-item.active {
  color: var(--accent-light);
  background: rgba(124, 58, 237, 0.12);
  border-left-color: var(--accent);
}

.nav-item .nav-icon { font-size: 1.15rem; width: 24px; text-align: center; }

.nav-item .nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
}

/* ── Main Content ───────────────────────────────────────────── */
.main-content {
  grid-area: main;
  padding: 28px 32px;
  overflow-y: auto;
  position: relative;
}

.page { display: none; animation: fadeIn 0.35s ease; }
.page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

/* ── Stat Cards ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

/* 5-card variant: smaller minimum so all 5 fit on one row */
.stats-grid-5 {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 22px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-cyan));
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.stat-card:hover::before { opacity: 1; }

.stat-icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-value.green { color: var(--accent-green); }
.stat-value.purple { color: var(--accent-light); }
.stat-value.cyan { color: var(--accent-cyan); }
.stat-value.amber { color: var(--accent-amber); }

/* Secondary stat row — slightly dimmer card */
.stat-card-accent {
  background: rgba(13, 18, 37, 0.55);
  border-color: rgba(34, 211, 238, 0.08);
}

.stat-card-accent:hover {
  border-color: rgba(34, 211, 238, 0.25);
}

/* Sub-label (e.g. "(maks 5)") */
.stat-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ── Cards / Panels ─────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  color: #fff;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
}

.btn-secondary {
  background: rgba(124, 58, 237, 0.12);
  color: var(--accent-light);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(124, 58, 237, 0.2);
  border-color: var(--border-glow);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.btn-danger:hover { background: rgba(244, 63, 94, 0.25); }

.btn-sm { padding: 6px 14px; font-size: 0.78rem; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Form Elements ──────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(15, 20, 45, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.form-textarea { resize: vertical; min-height: 80px; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* Toggle Switch */
.toggle-wrapper { display: flex; align-items: center; gap: 10px; }

.toggle {
  position: relative;
  width: 44px; height: 24px;
  appearance: none;
  background: rgba(100, 116, 139, 0.3);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.toggle::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 3px; left: 3px;
  transition: var(--transition);
}

.toggle:checked { background: var(--accent); }
.toggle:checked::after { left: 23px; }

/* ── Niches Grid ────────────────────────────────────────────── */
.niche-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.niche-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.niche-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.niche-card.selected {
  border-color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.08);
}

.niche-number {
  position: absolute;
  top: 10px; right: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(100, 116, 139, 0.15);
  padding: 2px 8px;
  border-radius: 8px;
}

.niche-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 6px;
  padding-right: 40px;
}

.niche-style {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.niche-category {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.15);
  color: var(--accent-light);
}

/* ── Search Bar ─────────────────────────────────────────────── */
.search-bar {
  position: relative;
  margin-bottom: 20px;
}

.search-bar input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.search-bar .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ── Log Console ────────────────────────────────────────────── */
.log-console {
  background: #030712;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  height: 420px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.78rem;
  line-height: 1.8;
}

.log-line {
  animation: logSlide 0.25s ease;
  white-space: pre-wrap;
  word-break: break-word;
}

@keyframes logSlide {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

.log-line .log-time { color: var(--text-muted); }
.log-line .log-level-info { color: var(--accent-cyan); font-weight: 600; }
.log-line .log-level-warn { color: var(--accent-amber); font-weight: 600; }
.log-line .log-level-error { color: var(--accent-rose); font-weight: 600; }
.log-line .log-msg { color: var(--text-secondary); }

/* ── Channel Table ──────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
}

th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tr:hover td { background: rgba(124, 58, 237, 0.04); }

/* ── API Key Status ─────────────────────────────────────────── */
.env-list { list-style: none; }

.env-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(100, 116, 139, 0.1);
  font-size: 0.88rem;
}

.env-key { font-weight: 600; font-family: monospace; }

.env-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.env-status.ok { color: var(--accent-green); }
.env-status.missing { color: var(--accent-rose); }
.env-status.optional { color: var(--accent-amber); }

/* ── Progress Bar ───────────────────────────────────────────── */
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(100, 116, 139, 0.15);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-cyan));
  border-radius: 4px;
  transition: width 0.6s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.show { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 32px;
  width: 95%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s;
}

.modal-overlay.show .modal { transform: scale(1); }

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* ── Toast Notifications ────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: var(--glass-blur);
  animation: toastIn 0.35s ease, toastOut 0.35s ease 3.65s forwards;
  min-width: 280px;
  box-shadow: var(--shadow);
}

.toast-success {
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--accent-green);
}

.toast-error {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
}

.toast-info {
  background: rgba(34, 211, 238, 0.15);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--accent-cyan);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; transform: translateX(40px); }
}

/* ── Output Files ───────────────────────────────────────────── */
.file-list { list-style: none; }

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(100, 116, 139, 0.08);
  font-size: 0.85rem;
}

.file-icon { font-size: 1.2rem; }
.file-name { font-weight: 500; flex: 1; }
.file-size { color: var(--text-muted); font-size: 0.78rem; }
.file-date { color: var(--text-muted); font-size: 0.78rem; }

/* ── Two Column Layout ──────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .app-shell.visible {
    grid-template-columns: 1fr;
    grid-template-areas: "header" "main";
  }
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    bottom: 0;
    width: 240px;
    transition: left 0.3s ease;
  }
  .sidebar.show {
    left: 0;
  }
  .hamburger {
    display: flex;
  }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .main-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr; }
  .niche-grid { grid-template-columns: 1fr; }
  .header { padding: 0 16px; }
}

/* ── Loading Spinner ────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty State ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state .empty-text { font-size: 0.9rem; }

/* ── Login Overlay ──────────────────────────────────────────── */
.login-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  overflow: hidden;
}

.login-bg-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.login-bg-orbs .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 20s infinite ease-in-out alternate;
}

.login-bg-orbs .orb-1 { width: 400px; height: 400px; background: var(--accent); top: -100px; left: -100px; }
.login-bg-orbs .orb-2 { width: 300px; height: 300px; background: var(--accent-cyan); bottom: -50px; right: 10%; animation-delay: -5s; }
.login-bg-orbs .orb-3 { width: 250px; height: 250px; background: var(--accent-rose); top: 30%; left: 40%; animation-delay: -10s; }

@keyframes float {
  0% { transform: translate(0, 0); }
  100% { transform: translate(40px, 40px); }
}

.login-card {
  position: relative;
  z-index: 1;
  background: rgba(15, 20, 45, 0.7);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 48px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(124, 58, 237, 0.15);
  animation: modalIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}

.login-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.login-brand {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 4px;
  background: linear-gradient(135deg, #fff, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-brand-sub {
  font-size: 0.9rem;
  color: var(--accent-cyan);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.login-error {
  color: var(--accent-rose);
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 16px;
  min-height: 20px;
}

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 1rem;
}
