/* ============ Travel CMS — clean self-contained styles ============ */
:root {
  --bg: #f4f6fa;
  --card: #ffffff;
  --ink: #1c2333;
  --muted: #6b7385;
  --line: #e3e7ef;
  --brand: #1a56db;
  --brand-dark: #1442a8;
  --brand-soft: #e8effc;
  --green: #0e9f6e;  --green-soft: #e6f6f0;
  --amber: #d97706;  --amber-soft: #fdf3e3;
  --red: #dc2626;    --red-soft: #fdeaea;
  --violet: #7c3aed; --violet-soft: #f1eafd;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20,30,60,.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14.5px; line-height: 1.5;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Topbar & nav ---------- */
.topbar {
  background: linear-gradient(90deg, #14325f, #1a56db);
  color: #fff; padding: 0 22px; display: flex; align-items: center; gap: 24px;
  height: 56px; position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow);
}
.topbar .logo { font-weight: 700; font-size: 17px; letter-spacing: .3px; color: #fff; }
.topbar .logo:hover { text-decoration: none; }
.nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.nav a {
  color: #dbe4f5; padding: 7px 12px; border-radius: 7px; font-weight: 500; font-size: 13.5px;
}
.nav a:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.nav a.active { background: rgba(255,255,255,.2); color: #fff; }
.nav a .navbadge {
  background: #ff5a5a; color: #fff; font-size: 11px; border-radius: 99px;
  padding: 0 6px; margin-left: 5px; font-weight: 700;
}
.userbox { color: #cdd9f0; font-size: 13px; display:flex; align-items:center; gap:10px; }
.userbox a { color: #fff; background: rgba(255,255,255,.15); padding: 5px 12px; border-radius: 7px; font-size: 13px; }
.userbox a:hover { text-decoration: none; background: rgba(255,255,255,.28); }

.wrap { max-width: 1200px; margin: 24px auto; padding: 0 20px; }

/* ---------- Cards / layout ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .card-h { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card .card-h h2 { font-size: 16px; }
.card .card-b { padding: 18px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

.page-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.page-title h1 { font-size: 21px; }
.page-title .sub { color: var(--muted); font-size: 13px; }

/* ---------- Stat tiles ---------- */
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .n { font-size: 26px; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.stat.accent-red .n { color: var(--red); }
.stat.accent-amber .n { color: var(--amber); }
.stat.accent-green .n { color: var(--green); }
.stat.accent-brand .n { color: var(--brand); }

/* ---------- Tables ---------- */
.tablewrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 12px; letter-spacing: .4px; text-transform: uppercase;
  color: var(--muted); padding: 10px 14px; border-bottom: 2px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:hover td { background: #f8fafd; }
.tbl td.actions { white-space: nowrap; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.b-blue   { background: var(--brand-soft); color: var(--brand-dark); }
.b-green  { background: var(--green-soft); color: var(--green); }
.b-amber  { background: var(--amber-soft); color: var(--amber); }
.b-red    { background: var(--red-soft);   color: var(--red); }
.b-violet { background: var(--violet-soft);color: var(--violet); }
.b-gray   { background: #eef0f4; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; background: var(--brand); color: #fff !important; border: none; cursor: pointer;
  padding: 8px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 600; font-family: inherit;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn.ghost { background: transparent; color: var(--brand) !important; border: 1px solid var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.green { background: var(--green); }
.btn.green:hover { background: #0b7f58; }
.btn.red { background: var(--red); }
.btn.red:hover { background: #b21c1c; }
.btn.gray { background: #7a8299; }
.btn.gray:hover { background: #616a82; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
label.fl { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
label.fl .req { color: var(--red); }
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: 8px 11px; border: 1px solid #cdd4e0; border-radius: 8px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
textarea { min-height: 80px; resize: vertical; }
.hint { color: var(--muted); font-size: 12px; margin-top: 3px; }

/* ---------- Flash ---------- */
.flash { padding: 11px 16px; border-radius: 8px; margin-bottom: 16px; font-weight: 500; }
.flash.success { background: var(--green-soft); color: #086b4a; border: 1px solid #bfe8d8; }
.flash.error   { background: var(--red-soft); color: #a51d1d; border: 1px solid #f3c3c3; }

/* ---------- Reminder list ---------- */
.rem { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.rem:last-child { border-bottom: none; }
.rem .ic { font-size: 20px; line-height: 1.3; }
.rem .body { flex: 1; min-width: 0; }
.rem .t { font-weight: 600; }
.rem .s { color: var(--muted); font-size: 13px; margin-top: 1px; }
.rem .meta { text-align: right; white-space: nowrap; }
.rem .d { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.rem.u-overdue { border-left: 4px solid var(--red); background: #fffafa; }
.rem.u-today   { border-left: 4px solid var(--amber); background: #fffdf7; }
.rem.u-soon    { border-left: 4px solid var(--brand); }
.rem.u-upcoming{ border-left: 4px solid #c9d2e2; }

/* ---------- Tabs / filter pills ---------- */
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pills a { padding: 6px 14px; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 500; }
.pills a:hover { text-decoration: none; border-color: var(--brand); }
.pills a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pills a .cnt { opacity: .75; font-size: 12px; margin-left: 4px; }

/* ---------- Search bar ---------- */
.searchbar { display: flex; gap: 8px; }
.searchbar input { max-width: 300px; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #14325f, #1a56db); padding: 20px; }
.login-card { background: #fff; border-radius: 14px; padding: 34px; width: 100%; max-width: 380px; box-shadow: 0 20px 60px rgba(0,0,20,.35); }
.login-card h1 { font-size: 21px; margin-bottom: 4px; }
.login-card .sub { color: var(--muted); margin-bottom: 22px; font-size: 13.5px; }
.login-card .field { margin-bottom: 14px; }
.login-card .btn { width: 100%; padding: 11px; font-size: 15px; margin-top: 6px; }

/* ---------- Misc ---------- */
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.empty { padding: 34px; text-align: center; color: var(--muted); }
.divider { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 14px; font-size: 14px; }
.kv .k { color: var(--muted); }
.footer { text-align: center; color: #9aa3b5; font-size: 12.5px; padding: 26px 0 18px; }

/* ---------- Simple CRM additions ---------- */
.btn.wa { background: #25d366; }
.btn.wa:hover { background: #1eb857; }
.quickdates { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.qd {
  background: #fff; border: 1px solid #cdd4e0; border-radius: 99px; cursor: pointer;
  padding: 4px 12px; font-size: 12.5px; font-weight: 600; color: var(--ink); font-family: inherit;
}
.qd:hover { border-color: var(--brand); color: var(--brand); }
.qd.sel { background: var(--brand); border-color: var(--brand); color: #fff; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips label {
  display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #cdd4e0;
  border-radius: 99px; padding: 6px 13px; font-size: 13px; cursor: pointer; user-select: none; font-weight: 500;
}
.chips label:hover { border-color: var(--brand); }
.chips input { accent-color: var(--brand); }
.chips label:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); font-weight: 600; }
.phone-row { display: flex; gap: 8px; }
.phone-row .cc { width: 90px; flex: 0 0 90px; }
.countrybadges .badge { margin: 1px 2px 1px 0; }
.payment-start { padding: 14px; border: 1px solid #bfe8d8; background: #f7fdfb; border-radius: 8px; }
.paid { color: var(--green); font-weight: 600; }
.due-text { color: var(--red); font-weight: 700; }
