@font-face {
  font-family: 'Fredoka';
  src: url('../assets/fonts/fredoka-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: 'Nunito';
  src: url('../assets/fonts/nunito-latin.woff2') format('woff2');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --ink: #4b302a;
  --berry: #c94d6d;
  --berry-dark: #a83d58;
  --pink: #ffd6e0;
  --butter: #fff1b8;
  --mint: #cfeee0;
  --lavender: #e7dcfb;
  --cream: #fff8ee;
  --paper: #fffdf8;
  --muted: #7c6053;
  --border: rgba(75, 48, 42, 0.16);
  --danger: #a93f2c;
  --font-display: 'Fredoka', 'Trebuchet MS', sans-serif;
  --font-body: 'Nunito', 'Segoe UI', sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse at 8% -10%, rgba(255, 192, 209, 0.45), transparent 34rem),
    radial-gradient(ellipse at 100% 0%, rgba(255, 235, 168, 0.35), transparent 32rem),
    radial-gradient(ellipse at 50% 110%, rgba(184, 226, 205, 0.4), transparent 42rem),
    var(--cream);
}

h1, h2, h3, p { margin: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
}

.admin-topbar {
  width: min(1000px, calc(100% - 32px));
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1rem;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: linear-gradient(145deg, #f891ab, #e56083);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 0 rgba(75, 48, 42, 0.18);
}

.admin-link {
  padding: 8px 13px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.8);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.admin-link:hover { background: #fff; color: var(--ink); }

.admin-main {
  width: min(1000px, calc(100% - 32px));
  margin: 22px auto 40px;
  flex: 1;
}

.admin-card {
  padding: clamp(20px, 4vw, 30px);
  margin-top: 20px;
  border: 2.5px solid var(--ink);
  border-radius: 28px;
  background:
    radial-gradient(circle at 94% 6%, rgba(255, 214, 224, 0.5) 0 5rem, transparent 5.1rem),
    linear-gradient(135deg, #fffaf1, #fff0e7);
  box-shadow: 0 7px 0 rgba(75, 48, 42, 0.09);
}

.login-card { max-width: 540px; margin: 40px auto; }

.eyebrow {
  color: var(--berry);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-card h1 { margin: 6px 0 10px; font-size: clamp(2.1rem, 5vw, 2.9rem); }

.admin-lead { color: var(--muted); line-height: 1.6; }

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 22px;
}

.field { display: flex; flex-direction: column; gap: 6px; }

.field > span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: #fff;
  font: inherit;
  font-weight: 700;
  outline: none;
}

.field input:focus {
  border-color: var(--berry);
  box-shadow: 0 0 0 3px rgba(201, 77, 109, 0.14);
}

.admin-error { color: var(--berry-dark); font-size: 0.82rem; font-weight: 800; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: 0.5; cursor: default; pointer-events: none; }

.btn-primary {
  border-color: #c24a68;
  background: linear-gradient(160deg, #f891ab, #e56083);
  color: #fff;
  box-shadow: 0 5px 0 #c24a68;
}

.btn-primary:hover { box-shadow: 0 7px 0 #c24a68; }

.btn-ghost {
  border-color: var(--border);
  background: rgba(255, 253, 248, 0.86);
  color: var(--ink);
  box-shadow: 0 3px 0 rgba(75, 48, 42, 0.06);
}

.btn-danger-ghost {
  border-color: rgba(169, 63, 44, 0.32);
  background: transparent;
  color: var(--danger);
}

.btn-lg { padding: 14px 22px; border-radius: 18px; font-size: 1rem; }
.btn-sm { padding: 7px 11px; font-size: 0.74rem; }

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 6px 4px 10px;
}

.admin-hero h1 { margin: 4px 0 8px; font-size: clamp(2.1rem, 5vw, 3rem); }

.admin-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-section-head h2 { margin-top: 3px; font-size: clamp(1.5rem, 3vw, 2rem); }

.admin-note { color: var(--muted); font-size: 0.8rem; line-height: 1.55; }

.admin-profile-list { display: flex; flex-direction: column; gap: 9px; }

.admin-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  background: var(--paper);
}

.admin-avatar {
  width: 46px;
  height: 46px;
  flex: none;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: linear-gradient(145deg, #ffe9ef, #ffd3de);
  display: grid;
  place-items: center;
  font-size: 24px;
}

.admin-profile-copy { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 160px; }
.admin-profile-copy strong { font-family: var(--font-display); font-size: 1.05rem; }
.admin-profile-copy small { color: var(--muted); font-size: 0.7rem; }
.admin-profile-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.admin-inline-form {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.admin-inline-form .field { flex: 1; min-width: 240px; }

.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.admin-rule {
  margin: 18px 0;
  border: 0;
  border-top: 1.5px dashed var(--border);
}

.admin-import { display: flex; flex-direction: column; gap: 10px; }

.admin-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-status {
  margin-top: 10px;
  color: #3f6f58;
  font-size: 0.8rem;
  font-weight: 800;
}

.admin-status.is-error { color: var(--danger); }

.admin-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  width: min(1000px, calc(100% - 32px));
  margin: 0 auto 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
}

@media (max-width: 560px) {
  .admin-profile-actions { width: 100%; }
  .admin-profile-actions .btn { flex: 1; }
}
