/* Mommy & Me — admin dashboard.
   Builds on site.css tokens; adds the app-shell layout. */

body.admin { background: var(--bg); }

/* --- Shell ---------------------------------------------------------------- */

.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }

.side {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.side .brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 20px; }
.side .brand img { height: 34px; width: auto; }
.side .brand span {
  font-size: 11px; font-weight: 800; letter-spacing: .8px;
  text-transform: uppercase; color: var(--red);
  background: var(--pink); padding: 4px 9px; border-radius: 999px;
}
.side h6 {
  margin: 18px 8px 6px; font-size: 10.5px; letter-spacing: .9px;
  text-transform: uppercase; color: var(--muted); font-weight: 800;
}
.side button.nav {
  display: flex; align-items: center; gap: 11px; width: 100%;
  border: 0; background: transparent; cursor: pointer;
  padding: 11px 12px; border-radius: 12px; text-align: left;
  font: inherit; font-size: 14.5px; font-weight: 600; color: var(--blue);
}
.side button.nav:hover { background: var(--cream); }
.side button.nav.on { background: var(--red); color: #fff; }
.side button.nav .ico-svg { width: 19px; height: 19px; }
.side button.nav .count {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px;
}
.side button.nav.on .count { background: rgba(255,255,255,.28); }
.side .foot { margin-top: auto; padding-top: 18px; }

.main { padding: 26px 30px 70px; max-width: 1400px; }
.main > header { display: flex; align-items: flex-end; gap: 16px;
  margin-bottom: 22px; flex-wrap: wrap; }
.main > header h1 { margin: 0; font-size: 27px; font-weight: 900;
  color: var(--blue); letter-spacing: -.6px; }
.main > header p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }
.main > header .actions { margin-left: auto; display: flex; gap: 9px;
  flex-wrap: wrap; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row;
    flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .brand, .side h6, .side .foot { width: 100%; }
  .side button.nav { width: auto; }
  .main { padding: 20px 16px 60px; }
}

/* --- Stats ---------------------------------------------------------------- */

.stats { display: grid; gap: 13px; margin-bottom: 26px;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 17px 18px; }
.stat b { display: block; font-size: 25px; color: var(--blue);
  line-height: 1.15; font-weight: 900; }
.stat span { font-size: 12.5px; color: var(--muted); }
.stat.urgent { border-color: var(--red);
  background: color-mix(in srgb, var(--pink) 45%, var(--surface)); }
.stat.urgent b { color: var(--red); }

/* --- Request cards -------------------------------------------------------- */

.requests { display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.request {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; padding: 18px; display: flex; flex-direction: column;
}
.request.pending { border-color: var(--red);
  background: color-mix(in srgb, var(--pink) 22%, var(--surface)); }
.request .top { display: flex; align-items: flex-start; gap: 12px; }
.request h3 { margin: 0 0 3px; font-size: 16px; color: var(--blue);
  font-weight: 800; line-height: 1.25; }
.request .ref { font-size: 12px; color: var(--muted); font-weight: 700; }
.request dl { margin: 14px 0 0; display: grid;
  grid-template-columns: auto 1fr; gap: 7px 14px; font-size: 13.5px; }
.request dt { color: var(--muted); }
.request dd { margin: 0; color: var(--ink); font-weight: 600; }
.request .decide { display: flex; gap: 9px; margin-top: 16px; }
.request .decide .btn { flex: 1; }

/* --- Tables --------------------------------------------------------------- */

.panel { background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { text-align: left; padding: 12px 15px;
  font-size: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th { background: var(--cream); color: var(--blue); font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.dim td { opacity: .55; }
.thumb { width: 46px; height: 46px; border-radius: 12px; object-fit: cover;
  display: block; }
.thumb.ph { display: grid; place-items: center; color: #fff; }
.thumb.ph .ico-svg { width: 22px; height: 22px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

.status { font-size: 11.5px; font-weight: 800; padding: 4px 10px;
  border-radius: 999px; white-space: nowrap; }
.status.upcoming { background: #e7f7f0; color: #12805c; }
.status.completed { background: #e8f1fe; color: #2563eb; }
.status.cancelled { background: var(--line); color: var(--muted); }
.status.pending { background: #fff3d6; color: #a06800; }
.status.declined { background: var(--pink); color: var(--red-dark); }
.status.live { background: #e7f7f0; color: #12805c; }
.status.hidden { background: var(--line); color: var(--muted); }

/* --- Media library -------------------------------------------------------- */

.media-grid { display: grid; gap: 13px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.media-item { position: relative; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface); }
.media-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.media-item .rm { position: absolute; top: 8px; right: 8px; border: 0;
  background: rgba(0,0,0,.6); color: #fff; width: 28px; height: 28px;
  border-radius: 50%; cursor: pointer; font-size: 15px; line-height: 1; }
.media-item.pick { cursor: pointer; }
.media-item.pick:hover { outline: 3px solid var(--red); }

.dropzone { border: 2px dashed var(--line); border-radius: 18px;
  padding: 30px; text-align: center; color: var(--muted); cursor: pointer;
  background: var(--surface); margin-bottom: 18px; }
.dropzone.over { border-color: var(--red); background: var(--pink); }
.dropzone b { display: block; color: var(--blue); font-size: 15.5px;
  margin-bottom: 4px; }

/* --- Modal ---------------------------------------------------------------- */

.modal-backdrop { position: fixed; inset: 0; background: rgba(20,20,28,.55);
  display: grid; place-items: center; padding: 20px; z-index: 100;
  overflow-y: auto; }
.modal { background: var(--surface); border-radius: 24px; width: 100%;
  max-width: 720px; max-height: 92vh; overflow-y: auto;
  border: 1px solid var(--line); }
.modal header { position: sticky; top: 0; background: var(--surface);
  padding: 20px 24px 14px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; z-index: 2; }
.modal header h2 { margin: 0; font-size: 20px; font-weight: 900;
  color: var(--blue); }
.modal header .x { margin-left: auto; border: 0; background: var(--cream);
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  color: var(--blue); font-size: 17px; line-height: 1; }
.modal .body { padding: 20px 24px 24px; }
.modal footer { position: sticky; bottom: 0; background: var(--surface);
  border-top: 1px solid var(--line); padding: 15px 24px;
  display: flex; gap: 10px; justify-content: flex-end; }

.grid2 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.grid3 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

.field small { display: block; color: var(--muted); font-size: 12px;
  margin-top: 5px; }
.swatch { display: flex; gap: 8px; align-items: center; }
.swatch input[type=color] { width: 46px; height: 42px; padding: 2px;
  border-radius: 10px; border: 1px solid var(--line); background: none;
  cursor: pointer; }
.preview-cover { height: 90px; border-radius: 14px; margin-top: 8px;
  display: grid; place-items: center; color: #fff; overflow: hidden; }
.preview-cover img { width: 100%; height: 100%; object-fit: cover; }

.switch { display: flex; align-items: center; gap: 10px; font-size: 14.5px;
  font-weight: 600; color: var(--blue); cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--red); }

/* --- Toasts --------------------------------------------------------------- */

.toasts { position: fixed; right: 18px; bottom: 18px; display: flex;
  flex-direction: column; gap: 9px; z-index: 200; }
.toast { background: var(--blue); color: #fff; padding: 13px 18px;
  border-radius: 14px; font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,.22); max-width: 340px;
  animation: rise .18s ease; }
.toast.err { background: var(--red); }
@keyframes rise { from { transform: translateY(8px); opacity: 0 } }

.empty-panel { padding: 54px 20px; text-align: center; color: var(--muted); }
.empty-panel b { display: block; color: var(--blue); font-size: 17px;
  margin-bottom: 6px; }

.login-shell { display: grid; place-items: center; min-height: 100vh;
  padding: 20px; }
.login-card { background: var(--surface); border: 1px solid var(--line);
  border-radius: 24px; padding: 32px; width: 100%; max-width: 390px; }
.login-card img { height: 46px; margin-bottom: 20px; }
.hidden { display: none !important; }
