/* TravelBooks v11 — colour themes, menu bar with company name & logo, dropdown menus, single-view grids, Bank, Chat. */

/* ---------- three colour themes (Settings › Appearance; each person can also pick their own) ---------- */
:root, :root[data-theme="ocean"] {
  --bg: #eef2f7; --panel: #ffffff; --ink: #13233a; --muted: #5a6678; --line: #dfe5ee; --line2: #c9d2df;
  --accent: #1d5fbf; --accent-ink: #fff; --accent-soft: #e1ebfa;
  --top-bg: #0f2342; --top-muted: #b8c7dd; --brand-accent: #7cc0ff; --badge: #ff8a3d; --head-bg: #f5f8fc; --hover: #f2f6fc;
}
:root[data-theme="saffron"] {
  --bg: #f8f3ec; --panel: #ffffff; --ink: #2a1e14; --muted: #74665a; --line: #eadfd1; --line2: #dbcab6;
  --accent: #c4561a; --accent-ink: #fff; --accent-soft: #fbe8da;
  --top-bg: #3b2414; --top-muted: #e2cdb7; --brand-accent: #ffb26b; --badge: #1f9d8b; --head-bg: #fbf7f1; --hover: #fbf4ea;
}
:root[data-theme="emerald"] {
  --bg: #edf4f0; --panel: #ffffff; --ink: #0f2a20; --muted: #586b62; --line: #d8e6de; --line2: #c2d5ca;
  --accent: #0a7a55; --accent-ink: #fff; --accent-soft: #dbf0e6;
  --top-bg: #0b2b20; --top-muted: #b5d3c6; --brand-accent: #6fe0b0; --badge: #f29a3f; --head-bg: #f4f9f6; --hover: #eef7f2;
}
html, body { background: var(--bg); }
table.t th { background: var(--head-bg); }
table.t tr.click:hover td { background: var(--hover); }
.badge { background: var(--badge); }
.tile:hover, .work:hover, .bigbtn:hover { box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 18%, transparent); }

/* ---------- menu bar: brand · menus · company name & logo (between white lines) · person ---------- */
.top { background: var(--top-bg); height: auto; min-height: 54px; gap: 14px; padding: 0 16px; }
.brand b { color: var(--brand-accent); }
.top nav { overflow: visible; flex-wrap: wrap; gap: 0; align-items: center; }
.top nav .nv { position: relative; }
.top nav .nv > a { display: inline-flex; align-items: center; gap: 5px; color: var(--top-muted); padding: 7px 9px; border-radius: 6px; font-size: 13.5px; white-space: nowrap; }
.top nav .nv > a:hover, .top nav .nv:hover > a { color: #fff; background: #ffffff1a; text-decoration: none; }
.top nav .nv > a.on { color: #fff; background: #ffffff2b; }
.top nav .nv > a .caret { font-size: 9px; opacity: .7; }
.top nav .sub { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--panel); border: 1px solid var(--line2);
  border-radius: 9px; box-shadow: 0 12px 34px #0003; padding: 6px; z-index: 60; }
.top nav .nv:hover .sub, .top nav .nv:focus-within .sub { display: block; }
.top nav .sub a { display: block; color: var(--ink); padding: 7px 10px; border-radius: 6px; font-size: 13.5px; white-space: nowrap; background: none; }
.top nav .sub a:hover { background: var(--accent-soft); text-decoration: none; color: var(--ink); }
.top nav .sub a.on { background: transparent; color: var(--ink); }
.top nav .sub .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); padding: 8px 10px 2px; }
.cobrand { display: flex; align-items: center; gap: 10px; align-self: stretch; padding: 0 18px; margin: 8px 0;
  border-left: 1.5px solid #ffffffd9; border-right: 1.5px solid #ffffffd9; color: #fff; min-width: 0; max-width: 330px; }
.cobrand:empty { display: none; }
.cobrand img { max-height: 34px; max-width: 96px; background: #fff; border-radius: 5px; padding: 2px 4px; display: block; }
.cobrand .cn { font-size: 15.5px; font-weight: 650; letter-spacing: .2px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cobrand.switch { cursor: pointer; } .cobrand.switch:hover .cn { text-decoration: underline; }
.cobrand .code { font-size: 11px; opacity: .75; display: block; font-weight: 500; }
.who { color: var(--top-muted); }
.who .nv { position: relative; }
.who .mebtn { background: #ffffff14; color: #fff; border: 1px solid #ffffff33; border-radius: 6px; padding: 5px 11px; cursor: pointer; font: inherit; font-size: 13px; }
.who .menu { display: none; position: absolute; right: 0; top: calc(100% + 4px); min-width: 230px; background: var(--panel); color: var(--ink);
  border: 1px solid var(--line2); border-radius: 9px; box-shadow: 0 12px 34px #0003; padding: 6px; z-index: 60; }
.who .nv:focus-within .menu, .who .nv.open .menu { display: block; }
.who .menu a, .who .menu button.lnk { display: block; width: 100%; text-align: left; color: var(--ink); padding: 7px 10px; border-radius: 6px; background: none; border: 0; cursor: pointer; font: inherit; font-size: 13.5px; }
.who .menu a:hover, .who .menu button.lnk:hover { background: var(--accent-soft); text-decoration: none; }
.who .menu .info { font-size: 12px; color: var(--muted); padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; white-space: normal; }
.swatches { display: flex; gap: 6px; padding: 6px 10px 8px; }
.sw { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.sw.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--panel) inset; }
.sw-ocean { background: linear-gradient(135deg, #0f2342 50%, #1d5fbf 50%); }
.sw-saffron { background: linear-gradient(135deg, #3b2414 50%, #c4561a 50%); }
.sw-emerald { background: linear-gradient(135deg, #0b2b20 50%, #0a7a55 50%); }
@media (max-width: 1450px) { .top nav .nv > a { padding: 7px 7px; font-size: 13px; } .cobrand { max-width: 240px; padding: 0 12px; } }

/* ---------- theme cards (Settings › Appearance) ---------- */
.themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.theme-card { border: 2px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; background: #fff; }
.theme-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.theme-card .bar { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 12px; color: #fff; font-weight: 600; font-size: 13px; }
.theme-card .body { padding: 12px; display: flex; gap: 8px; align-items: center; }
.theme-card .chip { width: 64px; height: 26px; border-radius: 6px; }
.theme-card .name { padding: 0 12px 12px; font-weight: 600; }

/* ---------- single view: booking form and Charged Amounts (point 13) ---------- */
.entry { min-width: 0 !important; table-layout: fixed; }
.entry th { font-size: 10px; white-space: normal; line-height: 1.15; vertical-align: bottom; padding: 3px; }
.entry td { padding: 2px 2px; }
.entry input, .entry select { padding: 4px 5px; font-size: 12.5px; }
.entry select[name=service] { min-width: 0 !important; }
.entry .w-svc { width: 13% !important; min-width: 0 !important; } .entry .w-num { width: 7.5% !important; } .entry .w-pax { width: 4.2% !important; }
.entry .w-dt { width: 9.5% !important; } .entry .w-chk { width: 4% !important; } .entry .w-vendor { width: 10% !important; }
.entry th:last-child { width: 30px; }
#lines { font-size: 12.5px; } #lines td, #lines th { padding: 5px 5px; }
table.sv { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 12px; background: var(--panel); }
table.sv th { font-size: 11px; font-weight: 700; text-align: left; padding: 5px 5px; background: #d6e4f5; color: #102033; border: 1px solid #c3d3e8; white-space: normal; line-height: 1.15; }
table.sv thead tr.cap th { background: transparent; border: 0; font-weight: 600; color: var(--muted); font-size: 11px; padding: 2px 5px; }
table.sv th.inv { background: #8ff0ff; } table.sv th.mon { background: #8ff0ff; }
table.sv td { padding: 3px 5px; border: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.sv td.num { text-align: right; }
table.sv tr.tax td { background: var(--tax-soft); color: var(--tax); }
table.sv tbody tr:hover td { background: var(--hover); }

/* ---------- Bank ---------- */
.bk-table td { vertical-align: top; }
.bk-table .narr { max-width: 420px; white-space: normal; word-break: break-word; }
.bk-table .led b { display: block; }
.bk-table .rmk { color: var(--muted); font-size: 12px; white-space: normal; max-width: 260px; }
.pill.req { background: var(--amber-soft); color: var(--amber); }
.mapgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; }
.drop { border: 2px dashed var(--line2); border-radius: 10px; padding: 18px; text-align: center; color: var(--muted); }

/* ---------- For my action ---------- */
.act-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; align-items: start; }
.act h3 { display: flex; justify-content: space-between; align-items: center; text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--ink); }
.act h3 .n { background: var(--badge); color: #fff; border-radius: 999px; padding: 1px 9px; font-size: 12.5px; }
.act ul { list-style: none; margin: 0; padding: 0; }
.act li { border-top: 1px solid var(--line); padding: 7px 2px; cursor: pointer; }
.act li:hover { background: var(--hover); }
.act li .s { color: var(--muted); font-size: 12px; }

/* ---------- Chat ---------- */
.chat { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; height: calc(100vh - 150px); min-height: 460px; }
.chat .list { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: auto; display: flex; flex-direction: column; }
.chat .list .grp { padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.chat .list .grp:hover { background: var(--hover); } .chat .list .grp.on { background: var(--accent-soft); }
.chat .list .grp .last { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat .room { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; min-height: 0; }
.chat .room .head { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.chat .msgs { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.chat .m { max-width: 70%; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; white-space: pre-wrap; word-break: break-word; }
.chat .m.me { align-self: flex-end; background: var(--accent-soft); border-color: transparent; }
.chat .m .w { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.chat .compose { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat .compose textarea { flex: 1; resize: none; height: 46px; }
.chat .note { font-size: 11.5px; color: var(--muted); padding: 0 12px 8px; }

/* ---------- company picker ---------- */
.cpick { max-width: 1000px; margin: 5vh auto; }
.cpick .tile .no { font-size: 22px; }
.cpick .tile { min-height: 130px; }

/* ---------- misc ---------- */
.tabs a.tb { border: 0; background: none; padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.tb.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.tabs a.tb:hover { text-decoration: none; color: var(--ink); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; }
.brandprev { border: 1px dashed var(--line2); border-radius: 8px; min-height: 90px; display: grid; place-items: center; background: #fff; padding: 8px; }
.brandprev img { max-height: 80px; max-width: 100%; }
td.neg { color: var(--warn); }
@media print { .cobrand, .who { display: none !important; } }
