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

:root {
  --bg:        #0f1117;
  --surface:   #1a1d27;
  --border:    #2a2d3a;
  --accent:    #2563eb;
  --accent-h:  #3b82f6;
  --text:      #e2e8f0;
  --muted:     #64748b;
  --error:     #f87171;
  --success:   #4ade80;
  --radius:    12px;
  --shadow:    0 20px 60px rgba(0,0,0,0.5);
}

html[data-theme="light"] {
  --bg:        #f3f6fb;
  --surface:   #ffffff;
  --border:    #d6deea;
  --accent:    #1d4ed8;
  --accent-h:  #2563eb;
  --text:      #152033;
  --muted:     #5f6f88;
  --error:     #dc2626;
  --success:   #16a34a;
  --shadow:    0 20px 60px rgba(0,0,0,0.12);
}

html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* ===== Card ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 400px;
  padding: 2.5rem 2rem;
}

.card-logo {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
}

.card-sub {
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 2rem;
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 0;
  background: var(--bg);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 1.75rem;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
}

.tab-btn.active {
  background: var(--accent);
  color: #fff;
}

/* ===== Form ===== */
.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  padding: 0.65rem 0.85rem;
  transition: border-color 0.15s;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.18);
}

/* ===== Button ===== */
.btn {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.15s, opacity 0.15s;
}

.btn:hover:not(:disabled) { background: var(--accent-h); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ===== Alert ===== */
.alert {
  border-radius: 8px;
  font-size: 0.875rem;
  padding: 0.65rem 0.9rem;
  margin-bottom: 1rem;
  display: none;
}

.alert.error   { background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.3); color: var(--error); }
.alert.success { background: rgba(74,222,128,0.12);  border: 1px solid rgba(74,222,128,0.3);  color: var(--success); }
.alert.show    { display: block; }

/* ===== Panel toggle ===== */
.panel { display: none; }
.panel.active { display: block; }
