/* Africa Music School — Admin panel styles (flat brand colors, no gradients) */

:root {
  --red: #EA1902;
  --red-dark: #B51300;
  --red-soft: #FDE9E6;
  --ink: #16120E;
  --ink-2: #3A332C;
  --muted: #6E6459;
  --gold: #F5A800;
  --gold-soft: #FFF3D6;
  --cream: #FAF5EE;
  --line: #EBE2D7;
  --shadow: 0 12px 40px rgba(22, 18, 14, 0.10);
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Outfit", sans-serif; background: var(--cream); color: var(--ink); font-size: 15.5px; line-height: 1.55; }
h1, h2, h3 { font-family: "Fraunces", serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ---------- login ---------- */
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--ink); padding: 24px; }
.login-card {
  background: #fff; border-radius: 22px; padding: 44px 42px; width: 420px; max-width: 100%;
  box-shadow: var(--shadow); text-align: center;
}
.login-logo { background: #fff; display: inline-block; padding: 6px 10px; margin-bottom: 18px; }
.login-logo img { height: 48px; }
.login-card h1 { font-size: 28px; }
.login-sub { color: var(--muted); margin: 6px 0 24px; }
.login-card form { text-align: left; }
.login-card label { display: block; font-weight: 600; font-size: 13.5px; margin: 14px 0 6px; }
.login-card input {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 12px;
  font-family: inherit; font-size: 15px;
}
.login-card input:focus { outline: none; border-color: var(--red); }
.login-back { display: inline-block; margin-top: 20px; color: var(--muted); font-size: 14px; }
.login-back:hover { color: var(--red); }

/* ---------- buttons & alerts ---------- */
.a-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 26px;
  font-family: inherit; font-weight: 700; font-size: 14.5px; cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.a-btn:hover { transform: translateY(-1px); }
.a-btn-red { background: var(--red); color: #fff; width: 100%; margin-top: 22px; }
.a-btn-red:hover { background: var(--red-dark); }
.a-btn-ink { background: var(--ink); color: #fff; }
.a-btn-sm { padding: 8px 16px; font-size: 13px; width: auto; margin: 0; }
.a-btn-ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink-2); }
.a-btn-ghost:hover { border-color: var(--red); color: var(--red); }
.a-btn-danger { background: var(--red-soft); color: var(--red-dark); }
.a-btn-danger:hover { background: var(--red); color: #fff; }

.a-alert { border-radius: 12px; padding: 13px 16px; margin-bottom: 18px; font-weight: 600; font-size: 14px; }
.a-alert-error { background: var(--red-soft); color: var(--red-dark); }
.a-alert-success { background: #E8F8EE; color: #156038; }

/* ---------- dashboard layout ---------- */
.admin-top {
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 4vw; position: sticky; top: 0; z-index: 50;
}
.admin-top .brand { display: flex; align-items: center; gap: 14px; }
.admin-top .brand-plate { background: #fff; border-radius: 10px; padding: 5px 10px; display: inline-flex; }
.admin-top .brand-plate img { height: 32px; }
.admin-top .brand span { font-weight: 700; letter-spacing: .04em; }
.admin-top nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-top nav a {
  padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 14px;
  color: rgba(255,255,255,.8); transition: background .15s ease, color .15s ease;
}
.admin-top nav a:hover { color: #fff; background: rgba(255,255,255,.1); }
.admin-top nav a.active { background: var(--red); color: #fff; }
.admin-top nav a.logout { color: var(--gold); }

.admin-wrap { width: min(1150px, 94%); margin: 36px auto 60px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.admin-head h1 { font-size: 30px; }
.admin-head p { color: var(--muted); }

/* stat chips */
.chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 34px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.chip b { display: block; font-size: 30px; font-family: "Fraunces", serif; color: var(--red); }
.chip span { color: var(--muted); font-size: 13.5px; font-weight: 600; }

/* ---------- cards / table ---------- */
.a-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 3px 14px rgba(22,18,14,.05); margin-bottom: 26px; overflow: hidden; }
.a-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 26px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.a-card-head h2 { font-size: 20px; }
.a-card-body { padding: 26px; }

.item-list { list-style: none; }
.item-row {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 26px; border-bottom: 1px solid var(--line);
}
.item-row:last-child { border-bottom: 0; }
.item-thumb { width: 84px; height: 58px; object-fit: cover; border-radius: 10px; flex-shrink: 0; background: var(--red-soft); }
.item-thumb.noimg { display: flex; align-items: center; justify-content: center; color: var(--red); font-size: 22px; }
.item-main { flex: 1; min-width: 200px; }
.item-main b { display: block; font-size: 16px; }
.item-main small { color: var(--muted); }
.item-cat {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  padding: 4px 10px; border-radius: 999px; flex-shrink: 0;
}
.item-cat.cat-news { background: var(--red-soft); color: var(--red); }
.item-cat.cat-event { background: var(--gold-soft); color: #9A6A00; }
.item-cat.cat-announcement { background: #EDEAE4; color: var(--ink-2); }
.item-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---------- forms ---------- */
.a-form label { display: block; font-weight: 600; font-size: 13.5px; margin: 16px 0 6px; }
.a-form input[type="text"], .a-form input[type="date"], .a-form input[type="password"],
.a-form select, .a-form textarea {
  width: 100%; padding: 12px 15px; border: 1.5px solid var(--line); border-radius: 12px;
  font-family: inherit; font-size: 15px; background: #fff;
}
.a-form input:focus, .a-form select:focus, .a-form textarea:focus { outline: none; border-color: var(--red); }
.a-form .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.a-form .form-hint { color: var(--muted); font-size: 13px; margin-top: 5px; }
.a-form .form-actions { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.current-img { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.current-img img { width: 110px; height: 70px; object-fit: cover; border-radius: 10px; }

/* messages */
.msg-row { padding: 20px 26px; border-bottom: 1px solid var(--line); }
.msg-row:last-child { border-bottom: 0; }
.msg-row.unread { border-inline-start: 4px solid var(--red); background: #FFFDFB; }
.msg-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.msg-head b { font-size: 15.5px; }
.msg-head time { color: var(--muted); font-size: 13px; }
.msg-subject { font-weight: 700; color: var(--red-dark); margin-bottom: 6px; }
.msg-body { color: var(--ink-2); white-space: pre-line; }
.msg-meta { color: var(--muted); font-size: 13.5px; margin-top: 8px; }

.item-thumb-round { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; }
.mini-chip {
  display: inline-block; background: var(--ink); color: #fff;
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  padding: 2px 8px; border-radius: 999px; vertical-align: 2px; margin-inline-start: 6px;
}

/* gallery manager */
.gallery-admin {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px; padding: 22px 26px;
}
.ga-item {
  position: relative; margin: 0; border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; background: var(--cream);
}
.ga-item img { width: 100%; height: 120px; object-fit: cover; display: block; }
.ga-item figcaption {
  font-size: 11.5px; color: var(--muted); padding: 7px 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ga-delete {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: rgba(22, 18, 14, 0.65); color: #fff; font-size: 17px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.ga-delete:hover { background: var(--red); }

.empty-note { padding: 40px 26px; text-align: center; color: var(--muted); }
.empty-note::before { content: "♪"; display: block; font-size: 40px; color: var(--red); margin-bottom: 8px; }

@media (max-width: 700px) {
  .a-form .grid2 { grid-template-columns: 1fr; }
  .item-row { flex-wrap: wrap; }
  .admin-top { flex-direction: column; gap: 12px; }
}
