:root {
  --ink: #19352f;
  --muted: #71847d;
  --green: #136b52;
  --dark: #163e34;
  --line: #dfe7e1;
  --bg: #f4f6f2;
  --gold: #be8740;
  --red: #b64139;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font:
    14px Tahoma,
    "Segoe UI",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}
button {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 9px;
  padding: 10px 14px;
}
button:hover {
  border-color: var(--green);
  background: #f0f7f2;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
button.danger {
  color: var(--red);
}
button.small {
  padding: 7px 10px;
  font-size: 12px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #d7b472;
  outline-offset: 2px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--ink);
  min-width: 0;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #accdbb;
  outline-offset: 1px;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}
textarea {
  resize: vertical;
  min-height: 75px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  color: #566e63;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 28px;
  margin-bottom: 9px;
}
h2 {
  font-size: 17px;
}
h3 {
  font-size: 14px;
}
small,
.muted {
  color: var(--muted);
  line-height: 1.8;
}
.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #173d33;
  color: #fff;
  padding: 24px 17px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 13px;
  border-bottom: 1px solid #436156;
}
.brandmark {
  font-size: 27px;
  color: #e4c597;
}
.brand strong {
  font-size: 20px;
}
.brand small {
  display: block;
  color: #aac2b6;
  font-size: 10px;
  letter-spacing: 2px;
}
.sidebar button {
  background: #274e42;
  border-color: #48675b;
  color: white;
}
.sidebar button:hover {
  background: #335f50;
}
.sidebar input,
.sidebar select {
  background: #23483d;
  border-color: #48675b;
  color: #fff;
}
.sidebar input::placeholder {
  color: #adc3b8;
}
.sidebar select {
  font-size: 12px;
}
.client-list {
  overflow: auto;
  flex: 1;
  min-height: 80px;
}
.client-item {
  display: block;
  width: 100%;
  text-align: right;
  margin: 0 0 7px;
  padding: 12px !important;
  border-color: transparent !important;
}
.client-item.active {
  background: #e8efe4 !important;
  color: #173d33 !important;
}
.client-item strong {
  display: block;
  font-size: 13px;
  margin-bottom: 5px;
}
.client-item span {
  display: block;
  font-size: 11px;
  opacity: 0.75;
  line-height: 1.7;
}
.side-footer {
  border-top: 1px solid #48675b;
  padding-top: 12px;
  font-size: 11px;
  color: #adc3b8;
  line-height: 1.8;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 17px 28px;
  background: #ffffffed;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(12px);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.save-info {
  font-size: 11px;
  line-height: 1.8;
  max-width: 370px;
}
.save-info b {
  display: block;
  color: var(--green);
}
.save-info.error b {
  color: var(--red);
}
main {
  max-width: 1540px;
  margin: auto;
  padding: 28px;
}
.eyebrow {
  color: var(--green);
  letter-spacing: 2px;
  font:
    11px "Segoe UI",
    sans-serif;
  margin-bottom: 10px;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.badge {
  display: inline-block;
  background: #e4eee5;
  color: #386449;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 11px;
}
.navtabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  margin: 21px 0;
}
.navtabs a {
  color: #688073;
  text-decoration: none;
  font-size: 12px;
  padding: 0 0 13px;
}
.navtabs a:first-child {
  color: var(--green);
  border-bottom: 2px solid var(--green);
}
section {
  scroll-margin-top: 105px;
}
.card {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 18px;
}
.cardhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.cardhead h2 {
  margin: 0;
}
.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border-radius: 7px;
  background: #edf2eb;
  color: var(--green);
  font: 12px "Segoe UI";
  margin-left: 7px;
}
.fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
}
.span2 {
  grid-column: span 2;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 22px 0;
}
.metric {
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.metric small {
  font-size: 11px;
}
.metric strong {
  display: block;
  margin-top: 8px;
  font:
    600 25px "Segoe UI",
    sans-serif;
  direction: ltr;
  text-align: right;
}
.metric.featured {
  background: var(--dark);
  color: #fff;
}
.metric.featured small {
  color: #c0d3c7;
}
.metric.negative strong {
  color: var(--red);
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
}
.pricecard .fields {
  grid-template-columns: 1fr;
}
.pricecard {
  background: #ecf1e8;
  height: max-content;
}
.pricecard label {
  margin-top: 15px;
}
.line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.line strong {
  direction: ltr;
}
.tablewrap {
  overflow: auto;
}
.costtable {
  min-width: 850px;
  width: 100%;
  border-collapse: collapse;
}
.costtable th {
  text-align: right;
  background: #f4f6f1;
  font-size: 10px;
  padding: 10px;
  color: #657c6e;
}
.costtable td {
  padding: 8px 5px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.costtable input,
.costtable select {
  padding: 9px 6px;
  font-size: 12px;
}
.costtable .desc {
  min-width: 200px;
}
.costtable .tiny {
  width: 72px;
}
.costtable .money {
  width: 97px;
}
.costtable .supplier {
  width: 130px;
}
.row-extra {
  background: #f8faf7;
}
.row-extra .fields {
  padding: 10px;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}
.row-extra td {
  padding: 0;
}
.empty {
  text-align: center;
  padding: 34px 15px;
  color: var(--muted);
  line-height: 2;
}
.notice {
  border-radius: 10px;
  background: #fff7e6;
  color: #805d24;
  padding: 12px 15px;
  line-height: 1.9;
  font-size: 12px;
  margin-bottom: 16px;
}
.notice.error {
  background: #fdf0ed;
  color: var(--red);
}
.notice:empty {
  display: none;
}
.payment {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.task {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
  background: #f7f9f5;
  padding: 10px;
  border-radius: 8px;
}
.task input[type="text"] {
  flex: 1;
}
.task input[type="date"] {
  width: 145px;
}
.task.done input[type="text"] {
  text-decoration: line-through;
  color: var(--muted);
}
.task.overdue {
  background: #fff1e9;
}
.footer-note {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  text-align: center;
  padding: 10px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 17px;
  width: min(700px, 94vw);
  padding: 25px;
  max-height: 90vh;
  color: var(--ink);
  box-shadow: 0 24px 100px #0003;
}
dialog::backdrop {
  background: #17372d99;
  backdrop-filter: blur(3px);
}
.modalhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modalhead h2 {
  margin: 0;
}
.option {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 16px;
  margin: 12px 0;
}
.option h3 {
  margin-bottom: 7px;
}
.option p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
}
.option .actions {
  margin-top: 12px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 25px;
  background: #183e33;
  color: white;
  border-radius: 12px;
  padding: 13px 20px;
  z-index: 20;
  max-width: 90vw;
  box-shadow: 0 6px 30px #0002;
}
#toast[hidden] {
  display: none;
}
.quote {
  line-height: 1.9;
}
.quote .quote-brand {
  color: var(--green);
  border-bottom: 3px solid var(--green);
  padding-bottom: 18px;
}
.quote h1 {
  font-size: 25px;
}
.quote table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.quote th,
.quote td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: pre-line;
}
.quote .quote-price {
  background: #edf4ed;
  padding: 20px;
  font-size: 23px;
  margin: 20px 0;
}
.quote .pre {
  white-space: pre-wrap;
}
.print-area {
  display: none;
}
.checklist {
  margin: 0;
  padding-right: 20px;
  font-size: 12px;
  line-height: 2;
}
.linkbtn {
  font-size: 12px;
  color: var(--green);
}
@media (max-width: 1600px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .pricecard .fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1500px) {
  .costtable {
    min-width: 100%;
  }
}
@media (max-width: 1200px) {
  .shell {
    grid-template-columns: 225px minmax(0, 1fr);
  }
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .pricecard .fields {
    grid-template-columns: repeat(3, 1fr);
  }
  .fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .topbar {
    padding: 14px 20px;
  }
  .metrics {
    gap: 8px;
  }
  .metric {
    padding: 13px;
  }
  .metric strong {
    font-size: 22px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: static;
    padding: 15px;
  }
  .client-list {
    max-height: 180px;
  }
  .brand,
  .side-footer {
    display: none;
  }
  .sidebar .actions {
    display: flex;
  }
  .sidebar input {
    margin: 0;
  }
  .topbar {
    position: static;
    flex-wrap: wrap;
    padding: 15px;
  }
  main {
    padding: 17px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .fields {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .card {
    padding: 16px;
  }
  .payment {
    grid-template-columns: 1fr 1fr;
  }
  .task {
    flex-wrap: wrap;
  }
  .task input[type="text"] {
    min-width: 170px;
  }
  .navtabs {
    gap: 15px;
  }
  .cardhead {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .page-head {
    flex-wrap: wrap;
  }
  .pricecard .fields {
    grid-template-columns: 1fr;
  }
  .save-info {
    max-width: none;
  }
  .row-extra .fields {
    grid-template-columns: repeat(4, 160px);
  }
}
@media print {
  .shell,
  dialog,
  #toast {
    display: none !important;
  }
  .print-area {
    display: block !important;
  }
  body {
    background: white;
  }
  .quote {
    font-family: Tahoma, sans-serif;
  }
  .quote table tr {
    break-inside: avoid;
  }
  @page {
    size: A4;
    margin: 15mm;
  }
}

/* Focused booking workflow: optional information stays available on demand. */
main {
  padding-bottom: 110px;
}
.optional {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 12px;
}
.optional summary {
  cursor: pointer;
  color: var(--green);
  font-size: 12px;
  padding: 5px 0;
  list-style-position: inside;
}
.optional[open] summary {
  margin-bottom: 16px;
}
.fold-card > summary {
  font-weight: bold;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}
.fold-card[open] > summary {
  margin-bottom: 20px;
}
.workbar {
  position: sticky;
  bottom: 0;
  z-index: 6;
  background: #fffef9f5;
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  box-shadow: 0 -6px 25px #19352f08;
}
.workbar strong {
  font: 600 22px "Segoe UI";
  margin-inline: 9px;
}
.workbar small {
  font-size: 11px;
}
.costtable {
  min-width: 660px;
}
.costtable .desc {
  width: 40%;
  min-width: 190px;
}
.costtable .statecell {
  min-width: 125px;
}
.row-meta {
  display: block;
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
}
#priceSummary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
#priceSummary .line {
  flex-direction: column;
  align-items: flex-start;
  border-bottom: 0;
}
#followFields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.quick-summary {
  padding: 12px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.recent-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.recent-item strong {
  font-size: 13px;
}
.recent-item small {
  display: block;
}
.recent-results {
  max-height: 370px;
  overflow: auto;
}
.undo-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.quote-check {
  margin-top: 12px;
}
.shortcut {
  font-family: "Segoe UI";
  direction: ltr;
  display: inline-block;
  background: #edf2eb;
  border-radius: 4px;
  padding: 2px 6px;
}
.close-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.close-summary > div {
  padding: 16px;
  background: #f4f6f2;
  border-radius: 10px;
}
.close-summary b {
  display: block;
  font: 600 23px "Segoe UI";
  margin-top: 8px;
}
.status-note {
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 760px) {
  #priceSummary {
    grid-template-columns: 1fr 1fr;
  }
  #followFields {
    grid-template-columns: 1fr 1fr;
  }
  .workbar {
    padding: 10px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .workbar .actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }
  .workbar button {
    font-size: 11px;
    padding: 10px 5px;
  }
  .workbar strong {
    font-size: 19px;
  }
  .workbar small {
    font-size: 10px;
  }
  main {
    padding-bottom: 20px;
  }
  .costtable {
    min-width: 650px;
  }
  .row-extra .fields {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }
  .costtable .desc {
    min-width: 200px;
  }
}
@media print {
  .workbar {
    display: none !important;
  }
}

.stay-timeline {
  display: flex;
  gap: 10px;
  overflow: auto;
  margin: 16px 0;
}
.stay-chip {
  text-align: right;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 15px;
  background: #f6f9f4;
  max-width: 290px;
}
.stay-chip b,
.stay-chip span,
.stay-chip small {
  display: block;
}
.stay-chip span {
  font-size: 11px;
  line-height: 1.8;
  margin-top: 5px;
}
.stay-chip small {
  color: var(--green);
}
.stay-card {
  scroll-margin-top: 90px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 12px 0;
  background: white;
  overflow: hidden;
}
.stay-card > summary {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  cursor: pointer;
  background: #f8faf6;
  list-style: none;
}
.stay-card > summary:before {
  content: "◂";
  color: var(--green);
}
.stay-card[open] > summary:before {
  content: "▾";
}
.stay-card > summary small {
  display: block;
  font-size: 11px;
  margin-top: 5px;
}
.stay-card > summary strong {
  margin-right: auto;
  direction: ltr;
  font: 600 16px "Segoe UI";
}
.stay-index {
  background: #e5eee2;
  border-radius: 8px;
  padding: 6px 9px;
  color: var(--green);
}
.stay-body {
  padding: 16px;
}
.stay-fields {
  margin-bottom: 18px;
}
.stay-actions {
  margin-top: 14px;
}
.badge.warn {
  background: #fff2d8;
  color: #805d24;
}
.hotel-table .tiny {
  width: 125px;
}
.hotel-table {
  min-width: 680px;
}
.navtabs {
  overflow: auto;
  white-space: nowrap;
}
.stay-card summary b {
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .stay-card > summary {
    flex-wrap: wrap;
    padding: 12px;
  }
  .stay-body {
    padding: 12px;
  }
  .stay-card > summary strong {
    font-size: 14px;
  }
  .stay-fields {
    grid-template-columns: 1fr 1fr;
  }
}

#cloudLogin {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(430px, 100%);
  padding: 32px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 50px #19352f0c;
}
.login-card h1 {
  font-size: 25px;
}
.login-card label {
  display: block;
  margin: 16px 0;
}
.login-card p {
  line-height: 1.8;
}
#loginMessage {
  color: var(--muted);
  min-height: 38px;
  font-size: 12px;
}
#permissionNote {
  margin: 12px 0;
  font-size: 12px;
  color: var(--muted);
}
#cloudAccount {
  display: block;
  overflow-wrap: anywhere;
  color: #c8ddd2;
  margin: 12px 0;
}
.cloud-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cloud-actions button {
  font-size: 11px;
  padding: 6px 8px;
}
@media print {
  #cloudLogin,
  .cloud-actions {
    display: none !important;
  }
}
/* Employee appearance. The quote stylesheet uses its own brand colors. */
:root {
  --ink: #25394d;
  --muted: #6b7b8d;
  --green: #2563a6;
  --dark: #183655;
  --line: #dfe6ee;
  --tint: #edf4fb;
  --page-bg: linear-gradient(135deg, #edf4ff, #f7f9fc 55%, #e8f3fa);
}
body {
  background: var(--page-bg);
  background-attachment: fixed;
}
.sidebar {
  background: linear-gradient(160deg, var(--dark), var(--green));
  box-shadow: -6px 0 25px #1836550a;
}
.brand {
  flex-direction: column;
  border-bottom: 1px solid #ffffff30;
  text-align: center;
  gap: 8px;
}
.brand-logo {
  width: 100%;
  max-width: 190px;
  height: 113px;
  object-fit: contain;
  background: #f4f4f4;
  border-radius: 10px;
  padding: 5px;
}
.brand small {
  color: #fff;
  letter-spacing: 0;
  font-size: 11px;
}
.login-brand {
  text-align: center;
  margin-bottom: 18px;
}
.login-brand img {
  display: block;
  max-width: 250px;
  width: 100%;
  height: 150px;
  object-fit: contain;
  margin: 0 auto 8px;
  border-radius: 12px;
}
.login-brand span {
  font-size: 12px;
  color: var(--muted);
}
.login-card {
  box-shadow: 0 20px 65px #22374e12;
}
.login-card h1 {
  font-size: 23px;
}
.sidebar button,
.sidebar input,
.sidebar select {
  background: #ffffff12;
  border-color: #ffffff38;
}
.sidebar button:hover {
  background: #ffffff24;
}
.sidebar input::placeholder,
.side-footer {
  color: #e5edf7;
}
.side-footer {
  border-color: #ffffff35;
}
.client-item.active {
  background: #fff !important;
  color: var(--dark) !important;
}
.card {
  box-shadow: 0 5px 18px #213a5604;
}
.metric.featured {
  background: linear-gradient(120deg, var(--dark), var(--green));
}
.metric.featured small {
  color: #eff4fb;
}
.pricecard,
.badge,
.num,
.stay-chip,
.stay-index {
  background: var(--tint);
  color: var(--green);
}
.badge.warn {
  background: #fff2d8;
  color: #805d24;
}
.stay-card > summary,
.row-extra,
.task {
  background: var(--tint);
}
.costtable th {
  background: #f3f6fa;
  color: #61768c;
}
.navtabs a {
  color: var(--muted);
}
label {
  color: #566d82;
}
.sort-handle {
  padding: 6px 8px;
  font-size: 23px;
  line-height: 1;
  cursor: grab;
  touch-action: none;
  color: var(--muted);
  border: 0;
  background: transparent !important;
  vertical-align: middle;
  margin-right: 3px;
}
.sort-handle:active {
  cursor: grabbing;
}
.sort-handle:disabled {
  cursor: default;
}
.sorting {
  cursor: grabbing;
  user-select: none;
}
.sort-source {
  opacity: 0.4;
}
[data-drop-state="before"] {
  box-shadow: inset 0 3px var(--green);
}
[data-drop-state="after"] {
  box-shadow: inset 0 -3px var(--green);
}
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.theme-choice {
  padding: 10px;
  font-size: 12px;
  text-align: center;
}
.theme-choice > span {
  height: 70px;
  border: 1px solid;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}
.theme-choice i {
  display: block;
  width: 23%;
  height: 100%;
  float: right;
}
.theme-choice[aria-pressed="true"] {
  border: 2px solid var(--green);
  background: var(--tint);
}
.quote-section {
  scroll-margin-top: 0;
}
#modal:has(.quote) {
  width: min(980px, 96vw);
}
.workbar {
  background: #ffffffed;
}
.costtable td:last-child {
  min-width: 105px;
}
.topbar,
.workbar {
  border-color: var(--line);
}
@media (max-width: 760px) {
  .brand {
    display: flex;
  }
  .brand-logo {
    max-width: 150px;
    height: 89px;
  }
  .sidebar .brand {
    margin-bottom: 6px;
  }
  .theme-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .theme-choice > span {
    height: 60px;
  }
  .navtabs {
    gap: 16px;
  }
}

/* Dedicated request directory and personal profile; editor stays mounted. */
.desk-page {
  padding: 32px;
  min-width: 0;
}
.current-request {
  flex: 0 0 auto;
  padding: 18px 12px;
  border: 1px solid #ffffff25;
  border-radius: 14px;
  margin: 14px 0;
}
.current-request > strong,
.current-request > span {
  display: block;
  margin: 8px 0;
}
.current-label {
  font-size: 12px;
  opacity: 0.75;
}
.request-tabs {
  display: flex;
  gap: 10px;
  margin: 24px 0 16px;
}
.request-tabs button[aria-selected="true"] {
  color: white;
  background: var(--accent, #2463a4);
  border-color: transparent;
}
.request-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.request-toolbar input {
  flex: 1;
  min-width: 220px;
}
.request-toolbar select {
  width: auto;
}
.request-table-wrap {
  overflow-x: auto;
  padding: 0;
}
.request-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}
.request-table th {
  text-align: right;
  background: #f1f5f9;
  padding: 16px;
  font-size: 12px;
  color: #475569;
  white-space: nowrap;
}
.request-table td {
  padding: 16px;
  vertical-align: middle;
  border-top: 1px solid #e8edf3;
  font-size: 13px;
}
.request-table td small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 11px;
}
.request-table td [dir="ltr"] {
  text-align: right;
}
.request-table .selected-request {
  background: #f0f7ff;
}
.request-open {
  color: #225b97;
  font-weight: 700;
  text-align: right;
}
.staff-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.staff-cell > div {
  min-width: 0;
}
.staff-avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: #dbeafe;
  color: #225b97;
  font-weight: 700;
  font-size: 12px;
}
.staff-avatar.large {
  width: 112px;
  height: 112px;
  font-size: 30px;
}
.profile-card {
  max-width: 540px;
  padding: 28px;
  display: grid;
  gap: 20px;
}
.profile-preview {
  display: flex;
  justify-content: center;
}
.button-label {
  border: 1px solid #d7e0e8;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
  font-size: 13px;
}
#profileMessage {
  margin: 0;
  line-height: 1.8;
}
@media (max-width: 700px) {
  .desk-page {
    padding: 18px 12px;
  }
  .request-tabs {
    flex-wrap: wrap;
  }
  .request-toolbar input {
    min-width: 100%;
  }
  .profile-card {
    padding: 20px;
  }
}
.sidebar {
  overflow-y: auto;
  gap: 10px;
}
.sidebar > * {
  flex-shrink: 0;
}
.current-request {
  min-height: 0;
  margin: 4px 0;
}
@media (max-width: 760px) {
  .sidebar .side-footer {
    display: block;
    font-size: 11px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 12px;
  }
  .sidebar .brand {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 12px;
    padding-bottom: 8px;
  }
  .sidebar .brand-logo {
    width: 70px;
    height: 40px;
    object-fit: contain;
    padding: 3px;
  }
  .sidebar .brand small {
    font-size: 10px;
  }
  .sidebar .current-request {
    display: none;
  }
  .sidebar > button {
    padding: 8px;
    font-size: 11px;
    min-height: 36px;
  }
  .sidebar > .actions,
  .sidebar .side-footer {
    grid-column: 1 / -1;
  }
  .sidebar .side-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0;
    margin-top: 0;
  }
  .sidebar .side-footer > br,
  .sidebar #cloudAccount {
    display: none;
  }
  .sidebar .side-footer button {
    font-size: 10px;
    margin: 0 !important;
    padding: 6px 9px;
  }
  .sidebar .side-footer .cloud-actions {
    gap: 6px;
  }
  .request-table-wrap::after {
    content: "اسحب الجدول أفقيًا لرؤية باقي الأعمدة";
    display: block;
    text-align: center;
    font-size: 11px;
    padding: 12px;
    color: #64748b;
  }
}
