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

:root {
  --bg:        #0f1117;
  --surface:   #1a1d27;
  --border:    #2a2d3a;
  --text:      #e4e4e7;
  --muted:     #71717a;
  --accent:    #6366f1;
  --accent-h:  #818cf8;
  --danger:    #ef4444;
  --radius:    8px;
}

html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Login ---------- */
.login-wrap {
  width: 100%;
  max-width: 380px;
  padding: 2rem;
}
.login-wrap h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: .25rem;
}
.login-wrap p.sub {
  color: var(--muted);
  font-size: .875rem;
  margin-bottom: 2rem;
}
.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  font-size: .8125rem;
  font-weight: 500;
  margin-bottom: .375rem;
  color: var(--muted);
}
.field input {
  width: 100%;
  padding: .625rem .75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: .9375rem;
  outline: none;
  transition: border-color .15s;
}
.field input:focus { border-color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: .625rem 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: .9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--accent-h); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.error-msg {
  margin-top: 1rem;
  padding: .5rem .75rem;
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: var(--radius);
  color: var(--danger);
  font-size: .8125rem;
  display: none;
}
.error-msg.visible { display: block; }

/* ---------- Dashboard ---------- */
.dash-shell {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.dash-header h1 { font-size: 1.125rem; font-weight: 600; }
.dash-header .user-info {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .875rem;
  color: var(--muted);
}
.dash-header .logout-btn {
  padding: .375rem .75rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: .8125rem;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.dash-header .logout-btn:hover { border-color: var(--danger); color: var(--danger); }

.dash-content {
  flex: 1;
  padding: 2rem 1.5rem;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}
.dash-content h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
