:root {
  --bg: #edf7ff;
  --surface: rgba(255, 255, 255, 0.9);
  --text: #0c1f35;
  --muted: #637891;
  --primary: #0d6efd;
  --line: rgba(13, 110, 253, 0.16);
  --shadow: 0 22px 60px rgba(17, 86, 150, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(13, 110, 253, 0.16), transparent 30%),
    linear-gradient(135deg, #f8fcff, var(--bg));
  color: var(--text);
}

button, input, select { font: inherit; }

.admin-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 0.75rem;
  padding: 0.42rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.08);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.login-card,
.dashboard-header,
.metric-grid article,
.toolbar,
.table-card,
dialog {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-card {
  width: min(440px, 100%);
  margin: 8vh auto;
  padding: 2rem;
}

.login-card h1,
.dashboard-header h1 {
  margin: 0 0 1.5rem;
}

.login-card form,
.login-card label {
  display: grid;
  gap: 0.75rem;
}

.login-card label {
  color: var(--muted);
  font-weight: 700;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  padding: 0.9rem 1rem;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
}

button {
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #04bfd9);
  color: #fff;
  padding: 0.9rem 1rem;
  font-weight: 800;
  cursor: pointer;
}

.status {
  min-height: 1.2rem;
  color: #ef476f;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}

.metric-grid article {
  padding: 1.2rem;
}

.metric-grid span {
  color: var(--muted);
  font-weight: 700;
}

.metric-grid strong {
  display: block;
  margin-top: 0.55rem;
  font-size: 2rem;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 220px 180px;
  gap: 0.8rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.table-card {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

th, td {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.09);
  color: var(--primary);
  padding: 0.35rem 0.7rem;
  font-weight: 800;
  font-size: 0.78rem;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.row-actions button,
.row-actions select {
  width: auto;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  font-size: 0.78rem;
}

.row-actions button:nth-child(2) {
  background: #ef476f;
}

dialog {
  width: min(680px, calc(100% - 2rem));
  border: 0;
  padding: 1.5rem;
}

.dialog-close {
  float: right;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  clear: both;
}

.details-grid p {
  margin: 0;
  padding: 0.85rem;
  border-radius: 12px;
  background: rgba(13, 110, 253, 0.07);
}

.details-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

@media (max-width: 820px) {
  .metric-grid,
  .toolbar,
  .details-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
