/* Admin-only styles, layered on top of the public stylesheet. */

body.admin { background: #f4f7fa; }
.admin-wrap { max-width: 1180px; }

/* ---------- login ---------- */
.login-screen {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 1.5rem;
  background: radial-gradient(circle at 20% 10%, #e6fbf7, transparent 45%),
              radial-gradient(circle at 85% 85%, #e0f2fe, transparent 45%), #f4f7fa;
}
.login-card { width: 100%; max-width: 380px; }

/* ---------- tabs ---------- */
.tabbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 61px; z-index: 20;
  overflow-x: auto;
}
.tabbar .wrap { display: flex; gap: 0.15rem; }
.tab {
  border: none; background: transparent; border-radius: 0;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 0.95rem; color: var(--text-dim);
  font-weight: 600; font-size: 0.9rem; white-space: nowrap;
}
.tab:hover { color: var(--text); border-color: var(--border-strong); }
.tab.active { color: var(--accent-dark); border-bottom-color: var(--accent); }
.tabpanel { padding: 1.5rem 0 3rem; }

.pill-count {
  display: inline-block; min-width: 20px; padding: 0 6px;
  background: var(--danger); color: #fff; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; margin-left: 0.25rem;
}

/* ---------- stats ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.8rem; margin-bottom: 1.2rem; }
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 0.9rem 1rem; box-shadow: var(--shadow-sm);
}
.stat .n { font-size: 1.65rem; font-weight: 700; letter-spacing: -0.02em; color: var(--accent-dark); line-height: 1.1; }
.stat .l { font-size: 0.76rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 650; }

.toolbar {
  display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap;
  margin-bottom: 1.1rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; padding: 0.65rem 0.8rem;
}
.toolbar label { margin: 0; font-size: 0.82rem; color: var(--text-dim); }

/* ---------- day schedule ---------- */
.day-columns { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.day-col { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.day-col-head {
  padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 0.5rem; font-weight: 650;
}
.day-col-head .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.day-col-head .hours { margin-left: auto; font-size: 0.78rem; color: var(--text-dim); font-weight: 500; }
.day-col-body { padding: 0.6rem; display: grid; gap: 0.5rem; }

.appt {
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 9px; padding: 0.6rem 0.7rem; background: #fcfefe;
}
.appt.status-cancelled, .appt.status-no_show { opacity: 0.55; border-left-color: var(--danger); }
.appt.status-booked { border-left-color: #f59e0b; background: #fffdf5; }
.appt.status-confirmed { border-left-color: var(--accent); }
.appt.status-completed { border-left-color: #16a34a; }
.appt-top { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.appt-time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.92rem; }
.appt-name { font-weight: 600; }
.appt-meta { font-size: 0.82rem; color: var(--text-dim); margin-top: 0.15rem; }
.appt-actions { display: flex; gap: 0.35rem; margin-top: 0.55rem; flex-wrap: wrap; }
.appt-actions button { padding: 0.22rem 0.55rem; font-size: 0.78rem; border-radius: 7px; }

.empty { padding: 1.5rem; text-align: center; color: var(--text-dim); font-size: 0.9rem; }

/* ---------- lists ---------- */
.list-row {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 11px; padding: 0.8rem 0.95rem; margin-bottom: 0.6rem;
}
.list-row .grow { flex: 1; min-width: 180px; }
.list-row .title { font-weight: 650; }
.list-row .sub { font-size: 0.83rem; color: var(--text-dim); }
.list-row input, .list-row select { width: auto; }

/* ---------- availability ---------- */
.hours-editor { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
.hours-editor h3 { font-size: 1rem; margin-bottom: 0.15rem; }
.day-hours {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 0.6rem;
  align-items: center; padding: 0.45rem 0; border-bottom: 1px solid var(--border);
}
.day-hours:last-child { border-bottom: none; }
.day-hours .dh-name { font-weight: 600; font-size: 0.9rem; }
.day-hours .dh-windows { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.day-hours input[type="time"] { width: auto; padding: 0.3rem 0.45rem; font-size: 0.86rem; }
.window-pair { display: flex; align-items: center; gap: 0.3rem; background: var(--surface-2); padding: 0.2rem 0.35rem; border-radius: 8px; }
.window-pair button { padding: 0.05rem 0.35rem; font-size: 0.9rem; line-height: 1.2; border: none; background: transparent; color: var(--danger); }

.closure-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.7rem; align-items: end; }
.closure-form .field { margin-bottom: 0; }

.checkline { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; font-size: 0.9rem; margin: 0; }
.checkline input { width: auto; }

/* ---------- dialog ---------- */
.dialog {
  border: 1px solid var(--border); border-radius: 14px; padding: 1.4rem;
  width: min(560px, calc(100vw - 2rem));
  box-shadow: 0 24px 60px -20px rgba(15, 34, 51, 0.4);
  color: var(--text); background: var(--surface);
}
.dialog::backdrop { background: rgba(15, 34, 51, 0.45); backdrop-filter: blur(2px); }
.dialog h3 { margin-bottom: 1rem; }

@media (max-width: 620px) {
  .tabbar { top: 57px; }
  .day-hours { grid-template-columns: 1fr; }
}
