:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #1f2933;
  --muted: #7b8490;
  --line: #e8edf2;
  --primary: #f6a23b;
  --primary-dark: #e88e23;
  --teal: #68c8bd;
  --danger: #e76464;
  --shadow: 0 18px 50px rgba(35, 45, 60, .08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #fff0d9, transparent 34%), var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(420px, 100%);
  padding: 36px;
  border-radius: 28px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, .75);
}

.brand-mark,
.logo span {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffbd5c, #f59a2e);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.login-card h1 {
  margin: 22px 0 8px;
  font-size: 28px;
}

.login-card p,
.panel-head p {
  color: var(--muted);
  margin: 0;
}

.login-card label {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: #59636f;
  font-weight: 700;
}

.login-card input,
.panel-head input {
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  outline: none;
  background: #f8fafc;
}

.login-card input:focus,
.panel-head input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(246, 162, 59, .12);
}

.login-card button,
.row-action,
.logout {
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}

.login-card button {
  width: 100%;
  height: 48px;
  margin-top: 22px;
  background: linear-gradient(135deg, #ffb34d, #f69a2f);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(246, 162, 59, .28);
}

.login-card button:hover,
.row-action:hover,
.logout:hover {
  transform: translateY(-1px);
}

.login-tip {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.admin-shell {
  display: none;
  min-height: 100vh;
}

body[data-logged-in="1"] .login-shell {
  display: none;
}

body[data-logged-in="1"] .admin-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(220, 226, 232, .72);
  display: flex;
  flex-direction: column;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.logo strong {
  font-size: 20px;
}

nav {
  display: grid;
  gap: 8px;
}

.nav-item,
.logout {
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #59636f;
  text-align: left;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 700;
}

.nav-item.active {
  background: #fff4e7;
  color: var(--primary-dark);
}

.logout {
  margin-top: auto;
  background: #fff;
  color: var(--danger);
  box-shadow: 0 8px 24px rgba(35, 45, 60, .06);
}

.workspace {
  padding: 28px;
}

.topbar {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.topbar h2,
.panel h3 {
  margin: 0;
}

.top-actions {
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  box-shadow: 0 8px 24px rgba(35, 45, 60, .06);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #26c281;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 18px;
  margin: 18px 0 24px;
}

.metric {
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.metric span {
  color: var(--muted);
}

.metric strong {
  display: block;
  margin-top: 12px;
  font-size: 30px;
}

.panel {
  border-radius: 28px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head input {
  width: 280px;
}

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

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

th,
td {
  padding: 14px 18px;
  border-bottom: 1px solid #f0f3f6;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: #687380;
  background: #fafbfc;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

td img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
}

.status {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #edf9f6;
  color: #219d8f;
  font-size: 12px;
  font-weight: 800;
}

.status.pending {
  background: #fff4e7;
  color: var(--primary-dark);
}

.status.rejected {
  background: #fff0f0;
  color: var(--danger);
}

.row-action {
  height: 32px;
  padding: 0 12px;
  margin-right: 6px;
  color: #fff;
  background: var(--teal);
  font-weight: 800;
}

.row-action.reject {
  background: var(--danger);
}

@media (max-width: 900px) {
  body[data-logged-in="1"] .admin-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}
