:root {
  color-scheme: light;
  --bg: #f7f7f5;
  --card: #ffffff;
  --text: #1f2933;
  --muted: #65707f;
  --border: #e5e7eb;
  --accent: #1c4e80;
  --accent-soft: #e1ecf7;
  --shadow: 0 10px 40px rgba(31, 41, 51, 0.08);
  --radius: 16px;
  --transition: 0.15s ease;
}

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

body {
  min-height: 100vh;
  font-family: "Avenir Next", "Futura", "Trebuchet MS", "Helvetica Neue", sans-serif;
  background: radial-gradient(circle at top left, #ffffff 0%, #f2f4f6 40%, #eef1f3 100%);
  color: var(--text);
}

.page {
  display: flex;
  flex-direction: column;
}

h1 {
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.subtext {
  color: var(--muted);
  margin-top: 0.4rem;
  font-size: 0.95rem;
}

.login-layout {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 2rem 1.5rem;
}

.card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem 2.2rem;
}

.card-header {
  margin-bottom: 2rem;
}

.form {
  display: grid;
  gap: 1.2rem;
}

.field {
  display: grid;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.field input,
.field select {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  transition: border var(--transition), box-shadow var(--transition);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.button {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(28, 78, 128, 0.2);
}

.button-secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.button-secondary:hover {
  box-shadow: 0 8px 16px rgba(31, 41, 51, 0.08);
}

.form-error {
  min-height: 1.2rem;
  color: #b91c1c;
  font-size: 0.85rem;
}

.hint {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem clamp(1.5rem, 4vw, 3rem) 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(140deg, #1c4e80, #79a8d8);
  box-shadow: 0 8px 16px rgba(28, 78, 128, 0.2);
}

.content {
  flex: 1;
  padding: 0 clamp(1.5rem, 4vw, 3rem) 3rem;
  display: grid;
  gap: 1.5rem;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.table-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.data-table th,
.data-table td {
  padding: 1rem 1.2rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.data-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:hover {
  background: #f6f9fc;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-top: 1px solid var(--border);
  background: #fbfcfd;
}

.page-info {
  font-size: 0.9rem;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-active {
  background: #e8f5e9;
  color: #1b5e20;
}

.status-inactive {
  background: #fff3e0;
  color: #8a4b12;
}

.empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .data-table {
    min-width: 100%;
  }

  .data-table th,
  .data-table td {
    padding: 0.8rem 0.9rem;
  }

  .table-footer {
    flex-direction: column;
    align-items: stretch;
  }
}
