:root {
  --bg-start: #f1f5f9;
  --bg-end: #dbeafe;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --primary: #0f766e;
  --primary-strong: #115e59;
  --danger: #b91c1c;
  --success: #15803d;
  --ring: rgba(15, 118, 110, 0.24);
  --shadow: 0 16px 38px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background: linear-gradient(155deg, var(--bg-start), var(--bg-end));
}

.top-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.nav-brand {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topnav a {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 500;
  color: var(--muted);
  transition: 0.2s ease;
}

.topnav a:hover {
  background: #e2e8f0;
  color: var(--text);
}

.topnav a.active {
  background: var(--primary);
  color: #fff;
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.card {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.auth-card {
  max-width: 460px;
}

.page-title {
  margin: 0 0 6px;
  font-family: "Space Grotesk", sans-serif;
}

.subtitle {
  margin: 0 0 18px;
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 14px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

input,
select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
}

.btn {
  display: inline-block;
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  color: #fff;
  background: var(--primary);
}

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

.btn-danger {
  color: #fff;
  background: var(--danger);
}

.btn-soft {
  color: var(--text);
  background: #e2e8f0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.layout-grid {
  display: grid;
  gap: 16px;
}

.stats-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.stat-value {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.4rem;
  margin-top: 6px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

th {
  background: var(--surface-soft);
}

tr:last-child td {
  border-bottom: none;
}

.chip {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.82rem;
  background: #e2e8f0;
}

.profile-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 120px 1fr;
  align-items: start;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 700;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.detail-card {
  background: var(--surface-soft);
  border-radius: 12px;
  padding: 10px 12px;
}

.detail-label {
  font-size: 0.82rem;
  color: var(--muted);
}

.detail-value {
  margin-top: 4px;
  font-weight: 600;
}

.alert {
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.alert.error {
  background: #fee2e2;
  color: #991b1b;
}

.alert.success {
  background: #dcfce7;
  color: #166534;
}

.alert.info {
  background: #dbeafe;
  color: #1d4ed8;
}

.muted-link {
  color: var(--primary-strong);
  text-decoration: none;
  font-weight: 600;
}

@media (max-width: 700px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-avatar {
    margin: 0 auto;
  }
}
