/* =====================================================================
   Embassy Express Visa Appointments — shared stylesheet (public + admin)
   ===================================================================== */

:root {
  --navy: #10294b;
  --navy-2: #1b3a66;
  --gold: #c9a227;
  --bg: #f2f5f9;
  --card: #ffffff;
  --line: #e3e8ef;
  --text: #17233a;
  --muted: #5b6b7f;
  --ok: #1e7f4f;
  --ok-bg: #e6f4ec;
  --bad: #b3372e;
  --bad-bg: #fbeae8;
  --warn: #8a6d1a;
  --warn-bg: #fbf3d9;
  --muted-bg: #eef1f5;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 41, 75, .06), 0 8px 24px rgba(16, 41, 75, .07);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a { color: var(--navy-2); }
a:hover { color: var(--gold); }

:focus-visible { outline: 3px solid rgba(201, 162, 39, .55); outline-offset: 1px; }

/* ------------------------------ header ------------------------------ */

.site-header {
  background: linear-gradient(135deg, #0d2340 0%, #1b3a66 70%, #24487d 100%);
  color: #fff;
  padding: 26px 20px 30px;
}

.brand {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-crest {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  object-fit: contain;
  padding: 5px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .35);
}

.brand h1 { margin: 0; font-size: 22px; letter-spacing: .3px; }
.brand p { margin: 2px 0 0; color: #c9d6ea; font-size: 13.5px; }

/* ------------------------------ layout ------------------------------ */

.container { max-width: 960px; margin: 0 auto; padding: 0 20px 60px; }

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

.hero h2 { margin: 0 0 6px; font-size: 20px; }
.hero p { margin: 0 0 14px; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }

.chip {
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--navy-2);
  font-weight: 600;
}

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

.card h2 { margin: 0 0 18px; font-size: 18px; color: var(--navy); }
.section-title { font-size: 17px; color: var(--navy); margin: 0 0 14px; }
.hint { color: var(--muted); font-size: 13.5px; margin: 10px 0; }

/* ---------------------------- step wizard ---------------------------- */

.steps {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.steps li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 600;
}

.steps li .num {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--muted-bg);
  color: var(--muted);
  font-size: 13px;
}

.steps li.active { border-color: var(--navy); color: var(--navy); }
.steps li.active .num { background: var(--navy); color: #fff; }
.steps li.done { color: var(--ok); border-color: rgba(30, 127, 79, .4); }
.steps li.done .num { background: var(--ok); color: #fff; }

.wizard-step { display: none; }
.wizard-step.active { display: block; }

/* ------------------------------- forms ------------------------------- */

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.req { color: var(--bad); }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="time"], input[type="number"], input[type="password"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--navy-2);
  outline: 3px solid rgba(27, 58, 102, .15);
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

.check-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.check-row label { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; margin: 0; }
.check-row input { width: auto; }

/* ------------------------------ buttons ------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font: inherit;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .05s;
}

.btn:hover { background: #f3f6fa; border-color: var(--navy-2); color: var(--navy); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }

.btn-ok { border-color: rgba(30, 127, 79, .5); color: var(--ok); }
.btn-danger { border-color: rgba(179, 55, 46, .5); color: var(--bad); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 6px; }

.btn-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }

.inline-form { display: inline; }

/* ------------------------------- slots ------------------------------- */

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
  margin: 12px 0 4px;
}

.slot {
  padding: 10px 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.slot:hover:not(:disabled) { border-color: var(--navy); background: #f3f6fa; }
.slot.selected { background: var(--navy); border-color: var(--navy); color: #fff; }
.slot:disabled { color: #a8b3c0; text-decoration: line-through; cursor: not-allowed; background: var(--muted-bg); }

/* ------------------------------ summary ------------------------------ */

.summary { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.summary dt {
  padding: 10px 16px 2px;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  font-weight: 700;
}
.summary dd { margin: 0; padding: 0 16px 12px; font-weight: 600; border-bottom: 1px solid var(--line); }
.summary dd:last-of-type { border-bottom: 0; }

/* ---------------------------- success page --------------------------- */

.success-wrap { text-align: center; padding: 34px 24px 10px; }

.success-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  font-size: 38px;
  color: #fff;
  background: radial-gradient(circle at 30% 25%, #34a06e, var(--ok));
  border-radius: 50%;
}

.ref-box {
  display: inline-block;
  margin: 8px 0 18px;
  padding: 12px 26px;
  font-family: Consolas, Menlo, monospace;
  font-size: 22px;
  letter-spacing: 1px;
  font-weight: 700;
  color: var(--navy);
  background: #f7f9fc;
  border: 2px dashed var(--navy-2);
  border-radius: 10px;
}

.cal-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0 8px; }

.checklist { text-align: left; max-width: 520px; margin: 18px auto 0; padding-left: 22px; }
.checklist li { margin-bottom: 8px; }

/* ------------------------------- alerts ------------------------------ */

.alert { padding: 12px 16px; border-radius: 10px; margin: 0 0 18px; font-size: 14px; border: 1px solid transparent; }
.alert p { margin: 4px 0; }
.alert-ok { background: var(--ok-bg); border-color: rgba(30, 127, 79, .35); color: #14532d; }
.alert-bad { background: var(--bad-bg); border-color: rgba(179, 55, 46, .35); color: #7f221b; }
.alert-warn { background: var(--warn-bg); border-color: rgba(138, 109, 26, .35); color: #6b5310; }

/* ------------------------------- badges ------------------------------ */

.badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-muted { background: var(--muted-bg); color: var(--muted); }

/* ------------------------------- footer ------------------------------ */

.site-footer {
  border-top: 1px solid var(--line);
  background: #eaeff5;
  color: var(--muted);
  text-align: center;
  padding: 22px 20px;
  font-size: 13px;
}
.site-footer a { color: var(--navy-2); }

/* =====================================================================
   Admin area
   ===================================================================== */

.admin-nav {
  background: linear-gradient(135deg, #0d2340, #1b3a66);
  color: #fff;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-brand { font-weight: 700; display: flex; align-items: center; gap: 10px; }
.admin-brand em { font-style: normal; font-weight: 400; color: #c9d6ea; font-size: 13px; }
.admin-brand .brand-crest { width: 34px; height: 34px; padding: 3px; box-shadow: 0 0 0 2px rgba(255,255,255,.3); }

.admin-links { display: flex; flex-wrap: wrap; gap: 4px; }
.admin-links a {
  color: #dce6f4;
  text-decoration: none;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 14px;
}
.admin-links a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.admin-links a.active { background: var(--gold); color: #231d05; font-weight: 700; }

.admin-body .container { padding-top: 24px; }

.page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.page-head h2 { margin: 0; color: var(--navy); }
.page-head p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }

.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}
.stat-num { font-size: 28px; font-weight: 800; color: var(--navy); line-height: 1.2; }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 600; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.filters .field { margin: 0; min-width: 150px; flex: 0 1 auto; }
.filters label { font-size: 12.5px; color: var(--muted); }

.table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
  margin-bottom: 16px;
}

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left;
  padding: 12px 14px;
  background: #f0f4f9;
  color: var(--navy);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .4px;
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #f8fafc; }
.table .actions-cell { white-space: nowrap; display: flex; gap: 6px; align-items: center; }

/* operator accounts page */
.pw-reset { margin-top: 8px; }
.pw-reset summary { cursor: pointer; font-size: 13px; color: var(--navy-2); user-select: none; }
.pw-reset form { display: flex; flex-direction: column; margin-top: 10px; max-width: 240px; }
.pw-reset .field { margin-bottom: 10px; }

.table-empty { text-align: center; color: var(--muted); padding: 34px 10px !important; }

.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 4px 0 30px; font-size: 14px; color: var(--muted); }

.mono { font-family: Consolas, Menlo, monospace; font-weight: 700; color: var(--navy); }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 30px 24px;
}
.login-card h1 { font-size: 19px; margin: 0 0 4px; color: var(--navy); }
.login-card .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 20px; }
.login-card .brand-crest { margin-bottom: 14px; width: 46px; height: 46px; padding: 4px; }

.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; align-items: start; }

@media (max-width: 760px) {
  .form-grid, .two-col { grid-template-columns: 1fr; }
  .steps { flex-direction: column; }
  .brand h1 { font-size: 18px; }
  .btn-row { flex-direction: column-reverse; }
  .btn-row .btn { width: 100%; }
}

/* ---------------- show/hide password toggle ---------------- */
.pw-toggle {
  background: none; border: 0; padding: 0; margin-top: 6px;
  font: inherit; font-size: 12px; color: var(--navy-2);
  cursor: pointer; text-decoration: underline; align-self: flex-start;
}
.pw-toggle:hover { text-decoration: none; }

