/* ==========================================================================
   Hardy & Fit Sdn Bhd - booking app theme
   Matches the main site's palette (assets/css/style.css):
     navy #1a2b3c   safety orange #d9822b
   ========================================================================== */
:root {
  --bg: #f1f3f6;         /* page background (soft grey) */
  --card: #ffffff;
  --card2: #f6f7f9;
  --ink: #1a2b3c;        /* headings / body text (deep navy) */
  --muted: #5c6b82;
  --brand: #1a2b3c;      /* navy */
  --brand-strong: #0f1c28;
  --brand2: #d9822b;     /* safety orange */
  --brand2-strong: #c07423;
  --ok: #16a34a;
  --ok-ink: #063d1f;
  --err: #dc2626;
  --line: #e2e5e9;
  --tint: #eef1f4;       /* faint navy surface */
  --tint2: #fff8f0;      /* faint orange surface */
  --radius: 16px;
  --shadow: 0 20px 50px rgba(26, 43, 60, .12);
  --shadow-sm: 0 6px 18px rgba(26, 43, 60, .07);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 480px at 85% -10%, rgba(217,130,43,.10), transparent),
    radial-gradient(1000px 520px at -10% 0%, rgba(26,43,60,.10), transparent),
    var(--bg);
  min-height: 100vh;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 32px 20px 60px; }

.hero { text-align: center; margin-bottom: 22px; }
.logo { display: block; height: 84px; width: auto; margin: 0 auto 14px; }
.logo-sm { height: 60px; margin-bottom: 10px; }
.logo-xs { height: 48px; margin: 0; }
.brand {
  display: inline-block; font-weight: 700; letter-spacing: .3px;
  padding: 6px 14px; border-radius: 999px; font-size: 13px;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  color: #fff; box-shadow: var(--shadow-sm);
}
.hero h1 { margin: 8px 0 6px; font-size: 30px; color: var(--ink); }
.sub { color: var(--muted); margin: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 20px; }
.steps .step {
  flex: 1; display: flex; align-items: center; gap: 8px; justify-content: center;
  padding: 10px; border-radius: 12px; background: var(--card2);
  color: var(--muted); font-size: 13px; border: 1px solid var(--line);
}
.steps .step span {
  width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center;
  background: #e7edf6; color: var(--muted); font-size: 12px;
}
.steps .step.active { color: var(--brand); border-color: var(--brand); background: var(--tint); }
.steps .step.active span { background: var(--brand); color: #fff; }
.steps .step.done { color: var(--brand2-strong); border-color: var(--brand2); background: var(--tint2); }
.steps .step.done span { background: var(--ok); color: #fff; }

.panel h2 { margin: 0 0 16px; font-size: 20px; }
.hidden { display: none; }

.services { display: grid; gap: 12px; }
.service {
  text-align: left; cursor: pointer; padding: 16px; border-radius: 14px;
  background: var(--card2); border: 1px solid var(--line); color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; transition: .15s;
}
.service:hover { border-color: var(--brand); background: var(--tint); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.service .nm { font-weight: 600; font-size: 16px; }
.service .du { color: var(--muted); font-size: 13px; margin-top: 3px; }
.service .go { color: var(--brand); font-size: 20px; }

.field { display: block; margin: 0 0 14px; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: 12px; font-size: 15px;
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  outline: none; transition: .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 3px rgba(3,97,203,.14);
}
.field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%235c6b82'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.19l3.71-3.96a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
  padding-right: 38px; cursor: pointer;
}

.slots-head { display:flex; justify-content: space-between; align-items:center; margin: 6px 0 10px; font-size: 14px; }
.slots-head small { color: var(--muted); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.slots > p { grid-column: 1 / -1; margin: 6px 2px; }
.slot {
  padding: 11px 8px; border-radius: 12px; cursor: pointer; text-align: center;
  background: var(--card2); border: 1px solid var(--line); color: var(--ink); font-size: 14px;
  transition: .12s;
}
.slot:hover { border-color: var(--brand); background: var(--tint); }
.slot.sel { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; box-shadow: 0 6px 16px rgba(3,97,203,.35); }
.slot .dshift { font-size: 11px; opacity: .75; margin-top: 2px; font-weight: 500; }

.hint a { color: var(--brand); text-decoration: none; font-weight: 600; }
.hint a:hover { text-decoration: underline; }

.nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
button { font: inherit; }
.primary {
  background: linear-gradient(90deg, var(--brand), var(--brand2)); color: #fff; border: 0;
  padding: 12px 20px; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 15px;
  box-shadow: 0 8px 24px rgba(3,97,203,.30);
}
.primary:hover { filter: brightness(1.03); }
.primary:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; filter: none; }
.ghost { background: #fff; color: var(--muted); border: 1px solid var(--line); padding: 12px 18px; border-radius: 12px; cursor: pointer; }
.ghost:hover { color: var(--brand); border-color: var(--brand); }

.summary {
  background: var(--tint); border: 1px solid var(--brand);
  padding: 14px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; line-height: 1.6;
  color: var(--ink);
}
.summary b { color: var(--brand-strong); }

.muted { color: var(--muted); }
.err { color: var(--err); min-height: 18px; margin: 10px 0 0; font-size: 14px; }

.done { text-align: center; padding: 12px 0; }
.check {
  width: 64px; height: 64px; border-radius: 999px; margin: 0 auto 14px; display: grid; place-items: center;
  background: var(--ok); color: #fff; font-size: 34px; font-weight: 800;
  box-shadow: 0 10px 24px rgba(15,158,88,.35);
}
.foot { text-align: center; margin-top: 22px; }
.foot a { color: var(--muted); text-decoration: none; font-size: 14px; }
.foot a:hover { color: var(--brand); }
.copyright { text-align: center; margin-top: 10px; font-size: 12px; color: var(--muted); }
.copyright a { color: var(--muted); font-size: 12px; font-weight: 600; text-decoration: none; }
.copyright a:hover { color: var(--brand); }

/* ---- Admin ---- */
.admin-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px;
}
.admin-title { display: flex; align-items: center; gap: 14px; }
.bell { position: relative; font-size: 24px; }
.badge {
  position: absolute; top: -6px; right: -10px; background: var(--err); color: #fff;
  border-radius: 999px; font-size: 11px; padding: 2px 6px; font-weight: 700; min-width: 18px; text-align: center;
}
.tabs { display: flex; gap: 8px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tab {
  padding: 10px 6px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent;
  background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; font-weight: 600;
}
.tab:hover { color: var(--brand); }
.tab.on { color: var(--brand); border-bottom-color: var(--brand); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; margin-bottom: 16px; }
.field.toggle input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.field.toggle span { margin: 0; color: var(--ink); font-size: 15px; }
.hint { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
#settingsMsg.ok { color: var(--ok); }
#pricesMsg.ok { color: var(--ok); }
.price-input { position: relative; }
.price-input .price-prefix {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 15px; pointer-events: none;
}
.price-input input { padding-left: 30px; }
@media (max-width: 520px) {
  .grid2 { grid-template-columns: 1fr; }
}
.filters { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; font-size: 13px; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.on { color: #fff; border-color: var(--brand); background: var(--brand); }
.blist { display: grid; gap: 12px; }
.brow {
  display: grid; grid-template-columns: 90px 1fr auto; gap: 14px; align-items: center;
  padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.brow.new { border-color: var(--ok); box-shadow: 0 0 0 1px rgba(15,158,88,.35) inset, var(--shadow-sm); }
.brow.cancelled { opacity: .6; }
.when { text-align: center; }
.when .d { font-weight: 700; }
.when .t { color: var(--muted); font-size: 13px; }
.who .n { font-weight: 600; }
.who .meta { color: var(--muted); font-size: 13px; margin-top: 3px; }
.tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; margin-left: 8px; }
.tag.confirmed { background: var(--tint2); color: var(--brand2-strong); }
.tag.cancelled { background: #fdecec; color: var(--err); }
.tag.newtag { background: var(--ok); color: #fff; }
.actions { display: flex; gap: 8px; }
.mini { padding: 8px 12px; font-size: 13px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; }
.mini:hover { color: var(--brand); border-color: var(--brand); }
.login { max-width: 380px; margin: 8vh auto 0; text-align: center; }
.login h2, .login .field, .login .primary { text-align: left; }
.login .field, .login .primary { display: block; }
.stat { display:flex; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.stat .box { flex:1; min-width: 120px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.stat .box .k { color: var(--muted); font-size: 12px; }
.stat .box .v { font-size: 24px; font-weight: 700; margin-top: 4px; color: var(--brand); }
@media (max-width: 520px) {
  .brow { grid-template-columns: 70px 1fr; }
  .actions { grid-column: 1 / -1; justify-content: flex-end; }
}

/* ---- Message-a-customer modal ---- */
.modal {
  position: fixed; inset: 0; background: rgba(16,24,39,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 1000;
}
.modal.hidden { display: none; }
.modal-card { position: relative; width: 100%; max-width: 480px; max-height: 86vh; overflow-y: auto; }
.modal-close {
  position: absolute; top: 14px; right: 14px; border: 0; background: transparent;
  font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px;
}
.modal-close:hover { color: var(--ink); }
.msg-history { display: grid; gap: 10px; margin: 4px 0 18px; max-height: 220px; overflow-y: auto; }
.msg-history:empty { display: none; }
.msg-item {
  background: var(--card2); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; font-size: 13px;
}
.msg-item .subj { font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.msg-item .body { color: var(--ink); white-space: pre-wrap; }
.msg-item .when { color: var(--muted); font-size: 11px; margin-top: 6px; }

