:root {
  --bg-top: #f3f1fb;
  --bg-bottom: #eceafc;
  --card: #ffffff;
  --text: #24222e;
  --text-dim: #8b87a3;
  --text-faint: #b3affc;
  --accent: #7b6ef6;
  --accent-dark: #6a5cf0;
  --accent-tint: #edeafd;
  --border: #ece9fb;
  --shadow: 0 24px 60px -20px rgba(107, 92, 231, 0.35);
  --shadow-soft: 0 10px 30px -12px rgba(107, 92, 231, 0.25);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

a { color: inherit; }

.label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ---------- Login ---------- */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 40px 32px 32px;
  text-align: center;
}

.avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a89bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 24px;
  box-shadow: var(--shadow-soft);
}

.login-card h1 {
  font-size: 22px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.login-card .subtitle {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0 0 28px;
}

.field {
  text-align: left;
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: #fbfaff;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

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

.btn-primary {
  width: 100%;
  margin-top: 10px;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px -10px rgba(107, 92, 231, 0.45);
}

.error-msg {
  background: #fdeeee;
  color: #c0392b;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ---------- Dashboard ---------- */

.dash-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 48px 24px 60px;
}

.dash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.dash-top .greeting .label { margin-bottom: 4px; }

.dash-top h1 {
  font-size: 26px;
  margin: 0;
  letter-spacing: -0.02em;
}

.logout-link {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--card);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
  transition: color 0.15s ease;
}

.logout-link:hover { color: var(--accent-dark); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.card .icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.card .card-title {
  font-size: 16px;
  font-weight: 700;
}

.card .card-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0;
}

.card .status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #2fae67;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card .status-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2fae67;
}

.dash-footer {
  margin-top: 48px;
  text-align: center;
  color: var(--text-faint);
  font-size: 12px;
}
