:root {
  --ink: #173631;
  --muted: #60746f;
  --back: #f0f5f4;
  --line: #e3ebe8;
  --nav: #0b3835;
  --green: #13766a;
  --green-dark: #0c6156;
  --accent: #f4a315;
  --rail: 236px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--back); font: 14px/1.5 Inter, "Segoe UI", Arial, sans-serif; }
a { color: var(--green-dark); text-decoration: none; }
a:hover { color: var(--green); }
button, input, select, textarea { font: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 26px; font-weight: 750; line-height: 1.2; margin-bottom: 5px; letter-spacing: -.025em; }
h2 { font-size: 16px; line-height: 1.4; font-weight: 720; margin-bottom: 12px; }
h3 { font-size: 15px; font-weight: 680; margin-bottom: 5px; }
p { margin-bottom: 12px; }
small { font-size: 12px; }
.app { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--rail); background: var(--nav); color: #d6e8e4; z-index: 20; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 67px; padding: 12px 16px; color: white; border-bottom: 1px solid #ffffff20; }
.brand:hover { color: white; }
.brand strong, .brand small { display: block; line-height: 1.3; }
.brand strong { font-size: 16px; }
.brand small { color: #a5c4bd; font-size: 11px; margin-top: 2px; }
.brand-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; color: #3f2a00; border-radius: 10px; background: var(--accent); font-size: 22px; flex: none; }
.sidebar nav { padding: 10px 8px; display: grid; gap: 3px; }
.nav-entry { display: flex; gap: 11px; align-items: center; padding: 9px 12px; min-height: 40px; border-radius: 7px; font-weight: 550; color: #d2e7e3; }
.nav-entry span { width: 17px; font-size: 16px; color: #c1ddd7; text-align: center; }
.nav-entry.selected, .nav-entry:hover { background: #176f63; color: white; }
.workspace { min-width: 0; margin-left: var(--rail); }
.topbar { min-height: 65px; display: flex; align-items: center; gap: 14px; padding: 10px 24px; border-bottom: 1px solid var(--line); background: white; position: sticky; top: 0; z-index: 10; }
.menu-toggle { display: inline-grid; place-items: center; border: 0; border-radius: 6px; background: #f2f7f5; width: 34px; height: 34px; cursor: pointer; color: var(--ink); }
.sidebar-closed .sidebar { display: none; }
.sidebar-closed .workspace { margin-left: 0; }
.global-search { width: min(355px, 35vw); margin: 0; }
.global-search .form-control { background: #f4f7f6; }
.top-user { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.user-name { font-weight: 700; white-space: nowrap; }
.clock { color: var(--muted); font-size: 12px; white-space: nowrap; }
.logout, .inline-form { margin: 0; }
.content { padding: 22px 26px 40px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 16px; }
.page-head p { color: var(--muted); margin-bottom: 0; }
.panel { min-width: 0; border: 1px solid var(--line); background: white; border-radius: 11px; padding: 15px 17px; margin-bottom: 14px; }
.panel > :last-child { margin-bottom: 0; }
.metrics { display: grid; grid-template-columns: repeat(7,minmax(90px,1fr)); gap: 10px; margin-bottom: 15px; }
.metric { display: flex; flex-direction: column; justify-content: center; min-height: 103px; gap: 5px; padding: 11px 14px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 10px; }
.metric strong { font-size: 27px; font-weight: 740; line-height: 1.05; }
.metric span { font-weight: 580; font-size: 13px; }
.metric.attention { background: #fff7f6; border-color: #f3d9d5; }
.metric.attention strong { color: #a7362c; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 14px; }
.two-cols { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.activity li div { min-width: 0; }
.activity small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; }
.activity li > small { flex-shrink: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid transparent; padding: 7px 12px; min-height: 35px; border-radius: 7px; font-size: 13px; font-weight: 660; text-decoration: none; line-height: 1.28; white-space: nowrap; cursor: pointer; }
.btn-primary { color: white; background: var(--green); border-color: var(--green); }
.btn-primary:hover { color: white; background: var(--green-dark); border-color: var(--green-dark); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #2f2203; }
.btn-accent:hover { background: #e49209; border-color: #e49209; color: #251a00; }
.btn-light { color: var(--ink); background: #f5f8f7; border-color: var(--line); }
.btn-light:hover { background: #e5efed; border-color: #d5e4de; }
.btn-danger, .btn-outline-danger:hover { color: white; background: #ac302d; border-color: #ac302d; }
.btn-outline-danger { color: #ac302d; border-color: #e0afac; background: white; }
.btn-link { color: var(--green-dark); padding-left: 0; background: transparent; }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid #e9a329; outline-offset: 2px; }
.form-control, .form-select { display: block; width: 100%; padding: 7px 10px; min-height: 37px; border: 1px solid #dce6e2; border-radius: 7px; color: var(--ink); background-color: white; font-size: 14px; line-height: 1.35; }
.form-control::placeholder { color: #788884; }
.form-control:focus, .form-select:focus { border-color: #5a988e; outline: 2px solid #d5eeea; box-shadow: none; }
textarea { resize: vertical; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 4px; margin: 0; }
.field > span { color: #435e58; font-size: 13px; font-weight: 650; }
.field-grid, .filters, .first-dates { display: grid; gap: 11px; }
.field-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,180px),1fr)); margin-bottom: 10px; }
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin-bottom: 11px; }
.filters .field { min-width: 120px; flex: 1 1 125px; }
.filters .field:has(input[type=search]) { flex: 1.5 1 210px; }
.filters > a { align-self: center; }
.stack { display: grid; gap: 11px; }
.stack .field-grid { margin: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
.actions.inline { justify-content: flex-start; margin-bottom: 10px; }
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; margin: 0; color: var(--ink); }
.table th { text-align: left; background: #f6f9f8; color: #506c66; font-weight: 690; white-space: nowrap; }
.table td, .table th { padding: 10px 9px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 13px; }
.table tbody tr:hover td { background: #f9fcfb; }
.table-footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 0 0; color: var(--muted); }
.report-panel th:nth-child(9), .report-panel td:nth-child(9),
.report-panel th:nth-child(12), .report-panel td:nth-child(12),
.report-panel th:nth-child(13), .report-panel td:nth-child(13),
.report-panel th:nth-child(16), .report-panel td:nth-child(16) { background: #fff9e8; }
.payment-schedule { white-space: pre-wrap; overflow-wrap: anywhere; }
.booking-code { font-weight: 720; }
.tracking-due, .tracking-payment-actions { display: flex; align-items: center; gap: 5px; }
.tracking-due .form-control { min-width: 140px; }
.tracking-payment-actions { flex-wrap: wrap; margin-top: 4px; }
.tracking-payment-actions a { white-space: nowrap; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 12px; margin: 1px 2px 1px 0; font-size: 12px; font-weight: 650; white-space: nowrap; }
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tag.green { background: #e7f6ed; color: #176b46; }
.tag.amber { background: #fff3d7; color: #875813; }
.tag.gray { background: #eef2f2; color: #4f6460; }
.tag.blue { background: #e8f2ff; color: #295c98; }
.tag.red { background: #fceceb; color: #a93632; }
.tabs { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; border-bottom: 1px solid #dbe8e4; }
.tabs a { padding: 8px 2px; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 620; }
.tabs a.active { color: var(--green-dark); border-color: var(--green); }
.empty { text-align: center; color: var(--muted); padding: 20px !important; }
.muted { color: var(--muted); }
.block { display: block; }
.stars { color: #a06700; }
.login-screen { min-height: 100vh; padding: 24px; display: grid; align-content: center; justify-items: center; gap: 12px; background: linear-gradient(145deg,#e8f4ef,#f5f8f7 61%); }
.login-panel { width: min(100%,420px); padding: 28px; box-shadow: 0 16px 55px #183d3017; }
.login-panel .brand-mark { width: 46px; height: 46px; margin-bottom: 16px; }
.login-panel h1 { margin-bottom: 7px; }
.login-panel p { color: var(--muted); }
.login-panel .btn { margin-top: 7px; }
.alert { width: 100%; padding: 10px 14px; border: 1px solid transparent; border-radius: 7px; margin-bottom: 12px; }
.login-screen .alert { width: min(100%,420px); margin: 0; }
.alert-success { color: #175d39; background: #e7f5ea; border-color: #c9e6d1; }
.alert-danger { color: #982c2a; background: #fdeceb; border-color: #f2cfcc; }
.booking-first { grid-template-columns: minmax(180px,1fr) minmax(300px,1.8fr); }
.first-dates, .stay-fields { grid-template-columns: 1fr 1fr 1.3fr; }
.stay-card { border: 1px solid var(--line); border-radius: 8px; padding: 11px; margin-bottom: 10px; }
.stay-heading { display: flex; align-items: center; justify-content: space-between; }
.stay-heading h2 { margin: 0; }
.stay-fields { margin-top: 10px; }
.room-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 9px; border-bottom: 1px solid var(--line); }
.room-row:last-child { border-bottom: 0; }
.room-head { font-weight: 650; color: var(--muted); background: #f5f8f7; }
.quantity { display: flex; align-items: center; gap: 5px; }
.quantity button { width: 29px; height: 28px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #f5f9f8; cursor: pointer; }
.quantity input { min-height: 28px; width: 49px; text-align: center; padding: 4px; appearance: textfield; }
.quantity input::-webkit-inner-spin-button { appearance: none; }
.recipient-line { color: var(--muted); }
.details { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 10px; }
.details dt, .envelope dt { color: var(--muted); font-weight: 650; }
.details dd, .envelope dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.profile-panel { max-width: 580px; }
dialog { width: min(480px,calc(100% - 24px)); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
dialog::backdrop { background: #0b312d73; }
.dialog-head, .thread-head { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.dialog-head button { background: none; border: 0; font-size: 21px; cursor: pointer; }
.mail-panel { padding: 0; overflow: hidden; }
.mail-layout { display: grid; grid-template-columns: minmax(125px,.7fr) minmax(230px,1.3fr) minmax(325px,3fr); min-height: 64vh; }
.mail-folders, .mail-list { border-right: 1px solid var(--line); min-width: 0; }
.mail-folders { padding: 15px 10px; }
.mail-folders a, .mail-folders p { display: block; padding: 9px 8px; border-radius: 6px; }
.mail-folders a.selected, .thread-item.current { background: #e9f4f1; font-weight: 670; }
.mail-folders h2 { margin-left: 8px; }
.mail-list { max-height: 75vh; overflow-y: auto; }
.mail-list-tools { position: sticky; top: 0; z-index: 1; background: white; }
.mail-search { display: flex; gap: 4px; align-items: end; padding: 9px; }
.mail-search .field { width: 100%; }
.mail-list-tools .table-footer { gap: 5px; padding: 0 9px 8px; }
.mail-list-tools .table-footer > span { white-space: nowrap; }
.thread-item { display: grid; gap: 3px; padding: 9px; border-top: 1px solid var(--line); color: var(--ink); overflow: hidden; }
.thread-item > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-item > span:first-child { display: flex; gap: 7px; justify-content: space-between; }
.thread-item strong { overflow: hidden; text-overflow: ellipsis; }
.thread-item small { color: var(--muted); }
.mail-reader { min-width: 0; padding: 14px; max-height: 75vh; overflow: auto; }
.thread-message { padding: 12px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.thread-head h2 { margin: 0 0 9px; }
.envelope { display: grid; grid-template-columns: max-content 1fr; column-gap: 9px; font-size: 12px; margin: 8px 0; }
.mail-body { margin: 12px 0; padding: 10px; background: #f8fbfa; border: 1px solid #eaf1ef; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.booking-detail-head { flex-wrap: wrap; }
.booking-detail-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.booking-detail-title h1 { margin: 0 4px 0 0; }
.booking-detail-grid { display: grid; grid-template-columns: minmax(0,4fr) minmax(0,5fr); align-items: start; gap: 18px; }
.booking-info { padding: 0; }
.booking-info-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 17px; border-bottom: 1px solid var(--line); }
.booking-info-head h2 { margin: 0; }
.booking-info-list { display: grid; grid-template-columns: minmax(110px,1fr) minmax(0,3fr); gap: 6px 12px; padding: 14px 17px; margin: 0; }
.booking-info-list dt { color: var(--muted); font-weight: 550; }
.booking-info-list dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.booking-stays { padding: 0 17px 14px; }
.booking-editor { scroll-margin-top: 80px; padding-block: 10px; }
.booking-editor summary, .booking-stays summary { cursor: pointer; font-weight: 680; color: var(--green-dark); }
.booking-editor[open] summary { margin-bottom: 12px; }
.booking-conversation { min-width: 0; }
.booking-detail-tabs { gap: 8px; margin-bottom: 8px; }
.booking-detail-tabs a { padding: 8px 12px; }
.booking-thread-actions { margin-bottom: 10px; }
.booking-timeline { border-left: 1px solid #c9ded8; margin-left: 8px; padding-left: 14px; }
.booking-thread-message { position: relative; padding: 0; }
.booking-thread-message::before { content: ""; position: absolute; left: -21px; top: 15px; width: 12px; height: 12px; background: white; border: 2px solid var(--green); border-radius: 50%; }
.booking-thread-message.incoming::before { border-color: #4776a5; }
.booking-thread-message > header { padding: 10px 13px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.booking-thread-message > header p { margin: 4px 0 0; font-size: 12px; }
.booking-message-head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; }
.booking-message-head time { color: var(--muted); font-size: 12px; }
.booking-message-content { padding: 12px 13px 16px; overflow-wrap: anywhere; }
.booking-message-body { white-space: pre-wrap; }
.tokens { display: flex; flex-wrap: wrap; gap: 5px; }
.token { background: #eff7f4; border: 1px solid #dceae6; border-radius: 4px; padding: 4px 6px; color: var(--green-dark); cursor: pointer; font-size: 12px; }
@media (max-width: 1250px) { .metrics { grid-template-columns: repeat(4,1fr); } .content { padding: 18px; } .clock { display: none; } }
@media (max-width: 1000px) { :root { --rail: 192px; } .mail-layout { grid-template-columns: minmax(150px,1fr) minmax(220px,2fr); } .mail-folders { grid-column: 1/-1; display: flex; gap: 5px; flex-wrap: wrap; padding: 7px; border-bottom: 1px solid var(--line); } .mail-folders h2,.mail-folders p { display: none; } .booking-first { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); }
  .workspace,.sidebar-closed .workspace { margin-left: 0; }
  .sidebar-open .sidebar { display: block; transform: none; box-shadow: 0 0 0 100vmax #123b3a55; }
  .sidebar-open .topbar { z-index: 21; }
  .sidebar-open .sidebar { top: 56px; }
  .topbar { min-height: 56px; padding: 8px 10px; gap: 7px; }
  .top-user { gap: 6px; }
  .global-search { width: auto; flex: 1; }
  .user-name { display: none; }
  .content { padding: 15px 10px 24px; }
  .page-head { align-items: flex-start; }
  .dashboard-grid,.two-cols { grid-template-columns: 1fr; }
  .booking-detail-grid { grid-template-columns: minmax(0,1fr); gap: 4px; }
  .booking-detail-head .actions { justify-content: flex-start; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric { min-height: 76px; }
  .mail-reader,.mail-list { max-height: none; }
}
@media (max-width: 520px) {
  .mail-layout { grid-template-columns: minmax(0,1fr); }
  .mail-list { max-height: 255px; border-bottom: 1px solid var(--line); }
  .first-dates,.stay-fields { grid-template-columns: 1fr 1fr; }
  .first-dates .field:last-child,.stay-fields .field:last-child { grid-column: 1/-1; }
  .page-head { flex-wrap: wrap; }
}

.hotel-contact-table { width: 100%; min-width: 660px; }
.hotel-contact-table td label > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.hotel-contact-table td:nth-child(2) { width: 45%; }
.hotel-contact-table td:nth-child(3) { width: 27%; }
.hotel-contact-table input, .hotel-contact-table select { width: 100%; }
.hotel-contacts .table-wrap { overflow-x: auto; margin-bottom: 12px; }
