/* ============================================================
   JOLIE CENTER — Admin Panel
   ============================================================ */

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

:root {
  --cyan-deep:     #0A2E2E;
  --cyan-mid:      #134444;
  --cyan-rich:     #0D5C5C;
  --cyan-bright:   #00C8C8;
  --cyan-light:    #A0E8E8;
  --cyan-pale:     #E0F7F7;
  --cream:         #F5FAFA;
  --cream-2:       #E8F4F4;
  --white:         #FFFFFF;
  --charcoal:      #0D1A1A;
  --text-body:     #2A4A4A;
  --text-muted:    #6A9090;
  --gold:          #C6A96A;

  --warn:          #E89A2C;
  --warn-bg:       #FFF3DB;
  --ok:            #1FAE7A;
  --ok-bg:         #DDF6EC;
  --err:           #E84D55;
  --err-bg:        #FFE7E7;
  --done:          #6A9090;
  --done-bg:       #E5EFEF;

  --font:          'Cairo', system-ui, sans-serif;
  --ease:          0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --radius:        0px;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--charcoal);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
input, button, select, textarea { font-family: inherit; }
button { cursor: pointer; }

/* ── LOGIN ───────────────────────────────────────────────── */
.login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(0,200,200,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 90%, rgba(0,200,200,0.1) 0%, transparent 50%),
    linear-gradient(150deg, var(--cyan-deep) 0%, var(--charcoal) 100%);
  color: var(--cream);
}

.login__card {
  width: 100%;
  max-width: 420px;
  background: rgba(13, 26, 26, 0.65);
  border: 1px solid rgba(0,200,200,0.18);
  padding: 40px 32px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: cardIn 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login__brand {
  display: flex;
  align-items: baseline;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 28px;
  color: var(--cream);
}

.login__logo-j {
  font-size: 30px;
  font-weight: 900;
  color: var(--cyan-bright);
}

.login__logo-text { font-weight: 500; }

.login__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--cyan-bright);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.login__title {
  font-size: clamp(34px, 8vw, 44px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 12px;
}

.login__title em {
  font-style: normal;
  color: var(--cyan-bright);
}

.login__hint {
  font-size: 13px;
  color: rgba(224,247,247,0.65);
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 28px;
}

.login__form { display: flex; flex-direction: column; gap: 14px; }

.login__field { display: flex; flex-direction: column; gap: 8px; }

.login__field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--cyan-light);
  text-transform: uppercase;
}

.login__field input {
  background: rgba(0,200,200,0.06);
  border: 1.5px solid rgba(0,200,200,0.22);
  color: var(--cream);
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  transition: all var(--ease);
  letter-spacing: 0.3em;
  text-align: center;
  direction: ltr;
}

.login__field input::placeholder {
  color: rgba(160,232,232,0.35);
  letter-spacing: 0.15em;
}

.login__field input:focus {
  border-color: var(--cyan-bright);
  background: rgba(0,200,200,0.12);
}

.login__demo {
  font-size: 11px;
  color: rgba(224,247,247,0.45);
  font-weight: 400;
  margin: 2px 0 8px;
}

.login__demo code {
  background: rgba(0,200,200,0.16);
  color: var(--cyan-bright);
  padding: 2px 8px;
  font-family: 'Cairo', monospace;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.login__btn {
  background: var(--cyan-bright);
  color: var(--cyan-deep);
  border: none;
  padding: 15px 24px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: all var(--ease);
}

.login__btn:hover { background: #00DFDF; transform: translateY(-1px); }
.login__btn:active { transform: translateY(0); }

.login__error {
  font-size: 12px;
  color: #FF6B6B;
  font-weight: 700;
  text-align: center;
  height: 18px;
  opacity: 0;
  transition: opacity var(--ease);
}

.login__error.is-visible { opacity: 1; }

/* ── DASH SHELL ──────────────────────────────────────────── */
.dash {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 28px 80px;
  animation: cardIn 0.5s ease;
}

/* ── TOPBAR ──────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 12px;
  flex-wrap: wrap;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar__logo-j {
  font-size: 36px;
  font-weight: 900;
  color: var(--cyan-bright);
  line-height: 1;
}

.topbar__brand > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.topbar__logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--cyan-deep);
}

.topbar__sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.topbar__actions { display: flex; gap: 8px; align-items: center; }

.topbar__link,
.topbar__logout {
  background: transparent;
  border: 1.5px solid var(--cream-2);
  color: var(--text-body);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  padding: 9px 18px;
  transition: all var(--ease);
}

.topbar__link:hover {
  border-color: var(--cyan-bright);
  color: var(--cyan-deep);
}

.topbar__logout:hover {
  border-color: var(--err);
  color: var(--err);
  background: var(--err-bg);
}

/* ── STATS ───────────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.stat {
  background: var(--white);
  border: 1px solid var(--cream-2);
  padding: 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all var(--ease);
}

.stat:hover {
  border-color: var(--cyan-bright);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,100,100,0.06);
}

.stat--accent {
  background: linear-gradient(140deg, var(--cyan-deep) 0%, var(--cyan-rich) 100%);
  border-color: transparent;
  color: var(--cream);
}

.stat__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat--accent .stat__label { color: var(--cyan-light); opacity: 0.85; }

.stat__value {
  font-size: clamp(32px, 4.5vw, 42px);
  font-weight: 900;
  color: var(--cyan-deep);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat--accent .stat__value { color: var(--cream); }

.stat__delta {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.stat--accent .stat__delta { color: var(--cyan-light); opacity: 0.7; }
.stat__delta--pending { color: var(--warn); }
.stat__delta--ok { color: var(--ok); }

/* ── TOOLBAR ─────────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-pill {
  background: transparent;
  border: 1.5px solid var(--cream-2);
  padding: 9px 16px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--ease);
  white-space: nowrap;
}

.filter-pill:hover {
  border-color: var(--cyan-light);
  color: var(--cyan-deep);
}

.filter-pill.is-active {
  background: var(--cyan-deep);
  border-color: var(--cyan-deep);
  color: var(--cyan-bright);
}

.toolbar__right {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

.toolbar__search {
  border: 1.5px solid var(--cream-2);
  background: var(--white);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--cyan-deep);
  outline: none;
  transition: border-color var(--ease);
  min-width: 0;
  flex: 1;
  max-width: 280px;
  text-align: right;
  direction: rtl;
}

.toolbar__search:focus { border-color: var(--cyan-bright); }

.toolbar__seed {
  background: var(--cream-2);
  border: none;
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan-deep);
  transition: all var(--ease);
  white-space: nowrap;
}

.toolbar__seed:hover { background: var(--cyan-bright); }

/* ── BOOKINGS ────────────────────────────────────────────── */
.bookings {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.booking-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr 1fr auto;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--cream-2);
  padding: 16px 20px;
  transition: all var(--ease);
  animation: rowIn 0.3s ease;
}

@keyframes rowIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.booking-row:hover {
  border-color: var(--cyan-bright);
  transform: translateX(2px);
}

.booking-row__col { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.booking-row__primary {
  font-size: 14px;
  font-weight: 800;
  color: var(--cyan-deep);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.booking-row__secondary {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.booking-row__phone {
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan-rich);
  direction: ltr;
  text-align: right;
}

.booking-row__service {
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan-deep);
  background: var(--cream-2);
  padding: 5px 10px;
  display: inline-block;
  width: fit-content;
}

.booking-row__id {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  font-family: monospace;
  direction: ltr;
}

/* Status badges */
.status {
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border: 1.5px solid;
}

.status--pending   { color: var(--warn); border-color: var(--warn); background: var(--warn-bg); }
.status--confirmed { color: var(--ok);   border-color: var(--ok);   background: var(--ok-bg); }
.status--completed { color: var(--done); border-color: var(--done); background: var(--done-bg); }
.status--cancelled { color: var(--err);  border-color: var(--err);  background: var(--err-bg); text-decoration: line-through; }

/* Actions menu */
.booking-row__actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.row-action {
  background: transparent;
  border: 1.5px solid var(--cream-2);
  padding: 6px 10px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--ease);
  white-space: nowrap;
}

.row-action:hover {
  border-color: var(--cyan-bright);
  color: var(--cyan-deep);
}

.row-action--ok { color: var(--ok); border-color: var(--ok-bg); }
.row-action--ok:hover { background: var(--ok); color: var(--white); border-color: var(--ok); }

.row-action--done { color: var(--done); border-color: var(--done-bg); }
.row-action--done:hover { background: var(--done); color: var(--white); border-color: var(--done); }

.row-action--cancel { color: var(--err); border-color: var(--err-bg); }
.row-action--cancel:hover { background: var(--err); color: var(--white); border-color: var(--err); }

.row-action--del {
  color: var(--err);
  background: var(--err-bg);
  border-color: transparent;
  width: 30px;
  padding: 6px 0;
  text-align: center;
}
.row-action--del:hover { background: var(--err); color: var(--white); }

/* Notes detail (expandable) */
.booking-row__notes {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--text-body);
  font-style: italic;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px dashed var(--cream-2);
  line-height: 1.7;
}

/* Empty state */
.empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}

.empty__icon {
  font-size: 48px;
  color: var(--cyan-bright);
  margin-bottom: 12px;
  opacity: 0.6;
}

.empty h3 {
  font-size: 22px;
  font-weight: 900;
  color: var(--cyan-deep);
  margin-bottom: 10px;
}

.empty p {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.8;
  max-width: 380px;
  margin: 0 auto 20px;
}

.empty__btn {
  background: var(--cyan-bright);
  color: var(--cyan-deep);
  border: none;
  padding: 12px 24px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 800;
  transition: all var(--ease);
}

.empty__btn:hover { background: #00DFDF; transform: translateY(-1px); }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .booking-row {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    gap: 10px 16px;
  }
  .booking-row > .status { grid-column: 1 / -1; justify-self: start; }
  .booking-row__actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 600px) {
  .dash { padding: 18px 14px 60px; }
  .topbar { margin-bottom: 22px; }
  .topbar__logo-j { font-size: 30px; }
  .topbar__logo-text { font-size: 16px; }
  .topbar__sub { font-size: 10px; }
  .topbar__link, .topbar__logout { padding: 8px 14px; font-size: 11px; }

  .stats { gap: 10px; margin-bottom: 18px; }
  .stat { padding: 16px 16px; gap: 4px; }
  .stat__label { font-size: 10px; }
  .stat__value { font-size: 28px; }
  .stat__delta { font-size: 10px; }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .toolbar__filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    margin: 0 -14px;
    padding: 0 14px;
  }
  .toolbar__filters::-webkit-scrollbar { display: none; }
  .filter-pill { padding: 9px 14px; font-size: 11px; }
  .toolbar__right { justify-content: stretch; }
  .toolbar__search { flex: 1; max-width: none; }
  .toolbar__seed { padding: 10px 12px; font-size: 11px; }

  .booking-row {
    padding: 14px 14px;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
  }

  .booking-row__primary { font-size: 13px; }
  .booking-row__secondary { font-size: 10px; }
  .booking-row__service { font-size: 11px; padding: 4px 8px; }
  .booking-row__phone { font-size: 12px; }

  .row-action { padding: 7px 10px; font-size: 11px; }

  .login__card { padding: 32px 24px; }
}

@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .booking-row { grid-template-columns: 1fr; }
  .booking-row > .status { justify-self: start; }
}
