:root {
  --bg: #0b0d12;
  --surface: #11141c;
  --surface-2: #181c27;
  --text: #e7e9ef;
  --muted: #8b92a8;
  --accent: #5865f2;
  --accent-2: #8e6bf2;
  --danger: #ed4245;
  --success: #3ba55d;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.hero {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(88,101,242,.25) 0%, transparent 70%);
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
}

.navbar {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
}

.brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.2rem;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, opacity .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}
.btn-lg { padding: .9rem 1.8rem; font-size: 1.1rem; }

.header {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 6rem auto 4rem;
  text-align: center;
  padding: 0 1.5rem;
}

.header h1 { font-size: clamp(2.2rem, 6vw, 4rem); margin: 0 0 1rem; }
.gradient {
  background: linear-gradient(135deg, #8e6bf2, #5865f2, #00d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.header p { color: var(--muted); font-size: 1.15rem; max-width: 640px; margin: 0 auto 2rem; }

.features {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(88,101,242,.4); }
.card .icon { font-size: 2rem; margin-bottom: .75rem; }
.card h3 { margin: 0 0 .5rem; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Dashboard */
.dashboard { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px;
  background: var(--surface);
  border-right: 1px solid rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar nav { display: flex; flex-direction: column; gap: .25rem; margin-top: 2rem; }
.sidebar nav a {
  padding: .6rem .8rem;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 500;
}
.sidebar nav a:hover, .sidebar nav a.active { background: var(--surface-2); color: var(--text); }

.user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .9rem;
}
.user img { width: 32px; height: 32px; border-radius: 50%; }

.content { flex: 1; padding: 2rem; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.topbar select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: .6rem 1rem;
  min-width: 260px;
}

.panel {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.panel h2 { margin-top: 0; font-size: 1.25rem; }

.grid { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.stat {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}
.stat-value { display: block; font-size: 2rem; font-weight: 800; }
.stat-label { color: var(--muted); font-size: .85rem; }

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

label { display: flex; flex-direction: column; gap: .35rem; font-size: .9rem; color: var(--muted); }
label:has(input[type="checkbox"]) {
  flex-direction: row;
  align-items: center;
  gap: .6rem;
  color: var(--text);
}

input, select, textarea {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: .6rem .8rem;
  font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); }

.logs {
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.log {
  background: var(--surface-2);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: .75rem 1rem;
}
.log-header { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); margin-bottom: .25rem; }
.log-action { font-weight: 700; color: var(--text); text-transform: uppercase; }
.muted { color: var(--muted); }

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,.1);
  padding: 1rem 1.25rem;
  border-radius: 10px;
  transform: translateY(120%);
  transition: transform .3s;
  z-index: 100;
}
.toast.show { transform: translateY(0); }

@media (max-width: 800px) {
  .dashboard { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .content { padding: 1rem; }
}
