* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f7fb;
  color: #1f2937;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  padding: 0.65rem 1rem;
}

button:hover {
  background: #1d4ed8;
}

input,
select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.auth-card,
.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.auth-card {
  width: min(420px, 100%);
  padding: 2rem;
}

.admin-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px 1fr;
}

.sidebar {
  background: #0f172a;
  color: #fff;
  padding: 2rem 1.25rem;
}

.sidebar-link {
  display: block;
  padding: 0.75rem 1rem;
  color: #cbd5e1;
  border-radius: 10px;
}

.sidebar-link:hover {
  color: #fff;
  background: rgba(148, 163, 184, 0.14);
}

.sidebar-link.is-active {
  color: #fff;
  background: rgba(37, 99, 235, 0.3);
}

.content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.page-header,
.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.card {
  padding: 1.5rem;
}

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

.stat-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-label {
  color: #64748b;
  font-size: 0.95rem;
}

.stat-value {
  color: #0f172a;
  font-size: 2rem;
  font-weight: 700;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  padding: 0.65rem 1rem;
}

.button-link:hover {
  background: #1d4ed8;
}

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

.form-actions {
  display: flex;
  align-items: flex-end;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.subtitle {
  color: #64748b;
  margin-top: 0;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

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

.inline-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 10px;
}

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

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

.badge {
  display: inline-flex;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.875rem;
}

.badge.muted {
  background: #e2e8f0;
  color: #475569;
}

@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 1rem 1.25rem;
  }
}
