:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --panel-2: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --error: #ef4444;
  --success: #10b981;
  --border: #334155;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "Sukhumvit Set", "Noto Sans Thai", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card h1 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
}

.card .subtitle {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--muted);
}

.field input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
}

.field input:focus {
  border-color: var(--accent);
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn:hover {
  background: var(--accent-hover);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--panel-2);
}

.alert {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fecaca;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
}

.hidden {
  display: none;
}

.text-center {
  text-align: center;
}

.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.muted a {
  color: var(--accent);
  text-decoration: none;
}

.muted a:hover {
  text-decoration: underline;
}

.divider {
  margin: 1rem 0;
  border: none;
  border-top: 1px solid var(--border);
}

.dashboard {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.dashboard header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.dashboard header h1 {
  margin: 0;
  font-size: 1.4rem;
}

.user-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.user-card .row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border);
}

.user-card .row:last-child {
  border-bottom: none;
}

.user-card .row span:first-child {
  color: var(--muted);
}
