/* Colors and fonts from emmenntech.com */
:root {
  --navy: #071233;
  --navy-deep: #040b22;
  --ink: #0c1530;
  --text: #2b3550;
  --soft: #5b6683;
  --light: #eef5ff;
  --tint: #f5f9ff;
  --edge: #d3e3fb;
  --cyan: #22c6e0;
  --cyan-hi: #7af0f5;
  --blue: #1f6be0;
  --pop: #ff8a1f;
  --red: #c8321e;
  --green: #17794f;
  --font: 'Urbanist', 'Segoe UI', Arial, sans-serif;
  --num: 'Space Grotesk', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--tint);
  color: var(--text);
  font: 500 16px/1.5 var(--font);
}

h1, h2 { color: var(--ink); font-weight: 800; line-height: 1.2; margin: 0; }
h1 { font-size: 28px; }
h2 { font-size: 18px; margin-bottom: 12px; }
p { margin: 0; }
a { color: var(--blue); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: Consolas, monospace; font-size: 15px; font-weight: 700; user-select: all; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Header */
.topbar {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 10px 24px;
  background: var(--navy);
  color: #fff;
}
.topbar-logo { display: flex; }
.topbar-logo img { height: 34px; width: auto; display: block; }
.topbar-nav { display: flex; gap: 6px; flex: 1; }
.topbar-nav a {
  color: rgba(255, 255, 255, .78);
  padding: 7px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
}
.topbar-nav a:hover { color: #fff; text-decoration: none; background: rgba(255, 255, 255, .08); }
.topbar-nav a.active { color: var(--cyan-hi); background: rgba(255, 255, 255, .1); }
.topbar-user { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.topbar-user a { color: rgba(255, 255, 255, .78); }
.topbar-user form { margin: 0; }

.link-button {
  background: none;
  border: 0;
  padding: 0;
  color: rgba(255, 255, 255, .78);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.link-button:hover { color: #fff; text-decoration: underline; }
.link-button-dark, .link-button-dark:hover { color: var(--blue); }

/* Layout */
.page { max-width: 1160px; margin: 0 auto; padding: 28px 24px 56px; }
.narrow { max-width: 520px; margin: 0 auto; }
.medium { max-width: 760px; margin: 0 auto; }
.spaced { margin-top: 24px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.head-side { display: flex; align-items: center; gap: 10px; }
.crumb { font-size: 14px; margin-bottom: 10px; }
.muted { color: var(--soft); }
.right { text-align: right; }
.capitalize { text-transform: capitalize; }
.empty { text-align: center; padding: 48px 0; }
.empty .button { margin-top: 18px; }

.card {
  background: #fff;
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 20px;
}
.stack { display: flex; flex-direction: column; gap: 14px; }
.narrow h1, .medium h1 { margin-bottom: 16px; }

.lead-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }

/* Forms */
label { display: block; color: var(--ink); font-weight: 700; font-size: 14px; }
input:not([type="radio"]), select, textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 11px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: 500 15px var(--font);
}
input:not([type="radio"]):focus, select:focus, textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: -1px;
  border-color: var(--blue);
}
textarea { resize: vertical; }
.hint { display: block; color: var(--soft); font-size: 13px; font-weight: 500; margin-top: 3px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.span-all { grid-column: 1 / -1; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

.button {
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid var(--edge);
  border-radius: 50px;
  background: #fff;
  color: var(--blue);
  font: 700 15px var(--font);
  cursor: pointer;
  white-space: nowrap;
}
.button:hover { background: var(--light); text-decoration: none; }
.button-primary {
  border-color: transparent;
  background: linear-gradient(90deg, #0e8ba8, var(--blue));
  color: #fff;
}
.button-primary:hover { background: linear-gradient(90deg, #0b7a94, #185cc4); }
.button-danger { color: var(--red); border-color: #f1c9c3; }
.button-danger:hover { background: #fdf0ee; }
.button-small { padding: 5px 13px; font-size: 14px; }
.button-wide { width: 100%; }
.stack > .button { align-self: flex-start; }
.stack > .button-wide { align-self: stretch; }

/* Call form */
.pills { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pills legend { padding: 0; margin-bottom: 8px; color: var(--ink); font-weight: 700; font-size: 14px; }
.pill input { position: absolute; opacity: 0; }
.pill span {
  display: block;
  padding: 7px 14px;
  border: 1px solid var(--edge);
  border-radius: 50px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.pill span:hover { background: var(--light); }
.pill input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.pill input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  padding: 4px 11px;
  border: 1px solid var(--edge);
  border-radius: 50px;
  background: var(--tint);
  color: var(--blue);
  font: 700 13px var(--font);
  cursor: pointer;
}
.chip:hover { background: var(--light); }
.chip-on { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip-on:hover { background: var(--blue); }

/* Booking */
.lead-line { margin: -10px 0 16px; }
.date-field { max-width: 220px; }
.field-title { color: var(--ink); font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.slot {
  padding: 7px 0;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font: 600 14px var(--num);
  cursor: pointer;
}
.slot:hover:not(:disabled) { background: var(--light); }
.slot:disabled { background: #eceff5; border-color: #eceff5; color: #9aa3b8; text-decoration: line-through; cursor: not-allowed; }
.slot-on, .slot-on:hover:not(:disabled) { background: var(--navy); border-color: var(--navy); color: #fff; }
.nowrap { white-space: nowrap; }

/* Import */
.steps { margin: 0 0 16px; padding-left: 22px; }
.steps li { margin-bottom: 4px; }
.tally { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tally-item { background: #fff; border: 1px solid var(--edge); border-radius: 12px; padding: 12px 14px; color: var(--soft); font-size: 14px; }
.tally-number { display: block; color: var(--ink); font: 600 26px/1.2 var(--num); }

/* Dashboard */
.range-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.range-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.range-presets .chip { padding: 6px 13px; }
.range-presets .chip:hover { text-decoration: none; }
.range-presets .chip-on, .range-presets .chip-on:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.range-custom { display: flex; align-items: center; gap: 10px; }
.range-custom label { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.range-custom input { margin-top: 0; width: 160px; padding: 6px 9px; }
.tally-5 { grid-template-columns: repeat(5, 1fr); }
.spaced-small { margin-top: 10px; }
.numbers th:not(:first-child), .numbers td:not(:first-child) { text-align: right; font-family: var(--num); font-size: 14px; }
.numbers th:not(:first-child) { font-family: var(--font); font-size: 13px; }
.dash-notes { font-size: 14px; }
.dash-notes p + p { margin-top: 4px; }

/* Filters */
.filters { display: flex; gap: 10px; margin-bottom: 16px; }
.filters input, .filters select { margin-top: 0; }
.filters input { flex: 1; }
.filters select { width: 170px; }

/* Tables */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--edge); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th {
  text-align: left;
  padding: 10px 14px;
  background: var(--light);
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
td { padding: 10px 14px; border-top: 1px solid var(--light); vertical-align: middle; }
tbody tr:hover { background: var(--tint); }
.row-off td { color: var(--soft); }
.phone { font-family: var(--num); font-size: 14px; white-space: nowrap; }
.text-overdue { color: var(--red); font-weight: 700; white-space: nowrap; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 16px; }

/* Statuses */
.status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 50px;
  background: var(--light);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.status-new { background: #e3ecfb; color: #174ea6; }
.status-no-answer { background: #eceff5; color: #47516b; }
.status-call-back-later { background: #fff0df; color: #99500a; }
.status-interested { background: #dcf6fa; color: #0a6275; }
.status-not-interested { background: #f3e7e5; color: #8a3a2d; }
.status-meeting-booked { background: #dff5e9; color: var(--green); }
.status-wrong-number { background: #fbe3df; color: var(--red); }
.status-booked { background: #dcf6fa; color: #0a6275; }
.status-showed { background: #dff5e9; color: var(--green); }
.status-no-show { background: #fbe3df; color: var(--red); }

.count {
  display: inline-block;
  min-width: 26px;
  padding: 1px 8px;
  border-radius: 50px;
  background: var(--light);
  color: var(--soft);
  font: 600 14px var(--num);
  text-align: center;
  vertical-align: middle;
}
.count-overdue { background: #fbe3df; color: var(--red); }
.count-today { background: #dcf6fa; color: #0a6275; }

/* Lead details and history */
.details dl { margin: 0; }
.details dt { color: var(--soft); font-size: 13px; font-weight: 700; margin-top: 12px; }
.details dt:first-child { margin-top: 0; }
.details dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; }

.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.history li { background: #fff; border: 1px solid var(--edge); border-radius: 10px; padding: 11px 14px; }
.history-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.history p { margin-top: 5px; }
.history p.muted { font-size: 14px; }

/* Messages */
.notice { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 15px; }
.notice-ok { background: #dff5e9; color: #0f5c3a; }
.notice-error { background: #fbe3df; color: #8f2312; }

/* Login */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: radial-gradient(circle at 80% 20%, #0d2a55, var(--navy) 45%, var(--navy-deep));
}
.login-card {
  width: 100%;
  max-width: 400px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px;
  background: rgba(255, 255, 255, .04);
  color: #fff;
}
.login-logo { display: block; width: 210px; height: auto; margin: 0 auto 18px; }
.login-card h1 { color: #fff; font-size: 23px; text-align: center; margin-bottom: 22px; }
.login-card label { color: rgba(255, 255, 255, .85); }
.login-card .button-primary { margin-top: 4px; background: linear-gradient(90deg, #0e8ba8, var(--blue)); }
.login-help { margin-top: 16px; text-align: center; color: rgba(255, 255, 255, .6); font-size: 14px; }

@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; gap: 10px 16px; padding: 10px 16px; }
  .topbar-nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .topbar-user { margin-left: auto; }
  .page { padding: 20px 16px 40px; }
  .lead-grid, .form-grid { grid-template-columns: 1fr; }
  .tally, .tally-5 { grid-template-columns: 1fr 1fr; }
  .range-custom { flex-wrap: wrap; }
  .filters { flex-wrap: wrap; }
  .filters select { flex: 1; width: auto; }
}
