/* Dawly Gateway — shared frame for client workspaces and HQ. */
body.gateway-hq .sidebar {
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  border: 0;
  border-radius: 0;
  background: #142c40;
  color: #d8e3e9;
  box-shadow: none;
  padding: 26px 16px 20px;
  width: 248px;
}
body.gateway-hq .sidebar .wschip {
  padding: 5px 10px 25px;
  margin: 0;
  background: transparent;
}
body.gateway-hq .sidebar .wsmark {
  width: 30px;
  height: 34px;
  border-radius: 0;
  box-shadow: none;
}
body.gateway-hq .sidebar .wsmeta b {
  color: #fff;
  font-size: 18px;
  letter-spacing: -0.5px;
}
.gateway-hq .sidebar .wsmeta i {
  color: #a6bac8;
  font-size: 10px;
  margin-top: 5px;
}
body.gateway-hq .sidebar .cmdk-trigger {
  background: #203c51;
  border-color: #385469;
  color: #b9cad5;
  height: 41px;
  margin: 0 5px 20px;
  border-radius: 5px;
  font-size: 12px;
}
.gateway-hq .sidebar .kbd {
  background: transparent;
  color: #b9cad5;
  border-color: #506576;
}
body.gateway-hq .sidebar .navitem,
body.gateway-hq .sidebar .grpbtn {
  color: #c1d0db;
  min-height: 41px;
  font-size: 12.5px;
  border-radius: 5px;
  background: transparent;
}
body.gateway-hq .sidebar .ic {
  color: #9cb4c4;
}
body.gateway-hq .sidebar .grpbtn:hover,
body.gateway-hq .sidebar .navitem:hover {
  background: #244259;
  color: #fff;
}
body.gateway-hq .sidebar .navitem.active {
  background: #2b4c64;
  color: #fff;
  box-shadow: inset 3px 0 #c6ad72;
}
body.gateway-hq .sidebar .navitem.active .ic {
  color: #d4bd8a;
}
body.gateway-hq .sidebar .grpkids {
  border-color: #355064;
}
body.gateway-hq .sidebar .nav-badge {
  background: #365a71;
  color: #eef4f7;
  border: 0;
}
body.gateway-hq .sidebar .nav-sub {
  color: #a1b6c5;
  text-transform: none;
  letter-spacing: 0;
}
body.gateway-hq .sidebar .sidefoot {
  border-color: #365064;
  color: #b9cad5;
}
body.gateway-hq .sidebar .sidefoot a,
body.gateway-hq .sidebar .sidefoot button {
  color: #c1d0db;
}
body.gateway-hq .sidebar .langtog {
  background: #244259;
  border-color: #355a73;
  color: #d7e4ed;
}
body.gateway-hq .content {
  margin-inline-start: 248px;
  padding: 40px 44px 80px;
  max-width: 1710px;
}
body.gateway-hq .pagehead {
  margin-bottom: 28px;
}
body.gateway-hq .pagehead h1 {
  font-size: 30px;
  letter-spacing: -0.9px;
  font-weight: 600;
}
body.gateway-hq .pagehead h1 .ic {
  display: none;
}
body.gateway-hq .grid th {
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 500;
  background: #f5f8fa;
  color: #536a7b;
}
body.gateway-hq .grid td {
  padding-block: 15px;
}
body.gateway-hq .kpi b {
  font-family: var(--font-sans);
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  font-size: 30px;
}
body.gateway-hq .cards {
  gap: 18px;
}
body.gateway-hq .kpi {
  border-radius: 7px;
  box-shadow: none;
  padding: 22px;
}
body.gateway-hq .content > * {
  animation: none;
}
body.gateway-hq .btn {
  border-radius: 5px;
  box-shadow: none;
}
/* Portal navigation: the content direction can change, its placement does not. */
.shell .side {
  background: #142c40;
  color: #d8e3e9;
  width: 248px;
  padding: 30px 17px 23px;
  border: 0;
}
.shell .side .brand {
  padding: 0 12px 35px;
  gap: 11px;
  color: #fff;
  font-size: 25px;
  letter-spacing: -0.8px;
  font-weight: 600;
}
.shell .side .brand .mark {
  height: 34px;
  width: 29px;
  border-radius: 0;
  box-shadow: none;
}
.shell .side .nav {
  gap: 5px;
}
.shell .side .nav a {
  font-size: 13px;
  min-height: 44px;
  padding: 11px 14px;
  border-radius: 5px;
  color: #c0d0db;
  font-weight: 450;
  gap: 13px;
}
.shell .side .nav .ico {
  color: #9db5c5;
  width: 18px;
  height: 18px;
}
.shell .side .nav a:hover {
  background: #244259;
  color: #fff;
}
.shell .side .nav a.on {
  background: #2b4c64;
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 #c6ad72;
}
.shell .side .nav a.on .ico {
  color: #d4bd8a;
}
.shell .side .foot {
  border-top: 1px solid #365064;
  padding-top: 18px;
  color: #c0d0db;
}
.shell .side .foot .who {
  color: #c0d0db;
  font-size: 12px;
  white-space: normal;
  line-height: 1.6;
  padding: 6px 10px;
}
.shell .side .foot .lgt {
  background: #203c51;
  border-color: #405e73;
  border-radius: 5px;
}
.shell .side .foot .lgt span {
  color: #c5d4df;
  border-radius: 3px;
}
.shell .side .foot .lgt span.on {
  background: #3b5b73;
  color: #fff;
  box-shadow: none;
}
.shell .side .foot form {
  padding: 7px 10px;
  font-size: 12px;
}
.shell .side .foot a {
  color: #c0d0db;
}
.shell .side .foot > div:has(.lgt) {
  padding-inline: 8px;
}
body .shell .main {
  font-family: var(--font-sans);
  background: #f7f9fa;
  max-width: none;
  padding: 32px clamp(24px, 4vw, 65px) 90px;
}
body .shell {
  background: #f7f9fa;
}
body .shell h2.sec {
  text-transform: none;
  letter-spacing: -0.3px;
  font-size: 17px;
  font-weight: 600;
  color: #142c40;
  margin: 35px 0 15px;
}
body .shell .btn {
  border-radius: 5px;
  box-shadow: none;
  font-size: 13px;
}
body .shell .chip {
  border-radius: 5px;
  font-size: 11px;
  padding: 6px 9px;
}
body .shell .fig {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
}
body .shell .p-card,
body .shell .p-rows,
body .shell .railcard,
body .shell .cohero {
  box-shadow: none;
  border-radius: 8px;
  border-color: #dce5eb;
}
body .shell .cohero {
  padding: 4px 25px 24px;
  background: #fff;
}
body .shell .cohero-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px 32px;
}
body .shell .coc {
  padding-top: 22px;
}
body .shell .coc-k {
  font-size: 11px;
  font-weight: 450;
  text-transform: none;
  letter-spacing: 0;
  color: #657b8b;
  margin-bottom: 8px;
}
body .shell .coc-v {
  font-size: 14px;
  font-weight: 550;
}
body .shell .coc--wide {
  border-top: 1px solid #e8eef2;
  margin-top: 15px;
  padding-top: 20px;
}
body .shell .railcard {
  padding: 27px 25px 23px;
}
body .shell .rl-dot {
  animation: none;
}
body .shell .rl::before {
  animation: none;
}
body .shell .rl.now .rl-dot {
  background: #b79a59;
  border-color: #b79a59;
  box-shadow: 0 0 0 4px #f0eadd;
}
body .shell .rl-l {
  font-size: 11px;
  font-weight: 500;
}
body .shell .rn-step {
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
}
body .shell .rn-ttl {
  font-size: 18px;
}
body .shell .rn-msg {
  font-size: 13px;
  line-height: 1.8;
}
body .shell .rail-now {
  margin-top: 23px;
  padding-top: 20px;
}
body.gateway-dashboard .main {
  max-width: 1460px;
}
body.gateway-dashboard .gw-workspace-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-bottom: 23px;
  border-bottom: 1px solid #dce5eb;
  margin-bottom: 35px;
  font-size: 12px;
  color: #5e7484;
}
body.gateway-dashboard .gw-workspace-bar > span {
  display: flex;
  align-items: center;
  gap: 11px;
}
body.gateway-dashboard .gw-workspace-bar svg {
  width: 16px;
  height: 16px;
}
body.gateway-dashboard .gw-workspace-bar a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  background: #fff;
  border: 1px solid #dce5eb;
  border-radius: 5px;
}
body.gateway-dashboard .gw-company-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
body.gateway-dashboard .gw-company-monogram {
  width: 62px;
  height: 64px;
  border: 1px solid #d0dde6;
  background: #e8eff4;
  color: #274962;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 31px;
  font-weight: 500;
  flex: none;
}
body.gateway-dashboard .gw-company-heading h1 {
  font-family: var(--font-sans);
  font-size: 34px;
  font-weight: 550;
  letter-spacing: -1.1px;
  line-height: 1.25;
}
body.gateway-dashboard .gw-company-heading .co-sub {
  font-size: 12px;
  color: #667d8d;
  margin-top: 8px;
}
body.gateway-dashboard .gw-company-actions {
  display: flex;
  gap: 9px;
  margin-inline-start: auto;
}
body.gateway-dashboard .gw-company-actions a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 11px 15px;
  border: 1px solid #d7e2e9;
  border-radius: 5px;
  background: #fff;
}
body.gateway-dashboard .gw-company-actions svg {
  width: 16px;
  height: 16px;
}
body.gateway-dashboard .needs {
  margin: 0 0 27px;
}
body.gateway-dashboard .need {
  background: #fffaf0;
  border: 1px solid #e9dcb5;
  border-radius: 7px;
  padding: 21px 24px;
}
body.gateway-dashboard .need--ok {
  background: #eef5f1;
  border-color: #d9e8de;
}
body.gateway-dashboard .need-main b {
  font-size: 14px;
  font-weight: 600;
}
body.gateway-dashboard .need-main > span {
  font-size: 12px;
  line-height: 1.75;
  color: #52705f;
  max-width: 850px;
}
body.gateway-dashboard .need-main .need-kicker {
  color: #87601c;
}
body.gateway-dashboard .need:not(.need--ok) .need-main > span {
  color: #765e2e;
}
body.gateway-dashboard .afil {
  gap: 14px;
}
body.gateway-dashboard .afcard {
  border-radius: 7px;
  border-color: #dce5eb;
  background: #fff;
  box-shadow: none;
}
body.gateway-dashboard .af-hd {
  padding: 23px;
}
body.gateway-dashboard .af-ttl {
  font-size: 14px;
  font-weight: 600;
}
body.gateway-dashboard .af-desc {
  font-size: 12px;
  line-height: 1.8;
}
body.gateway-dashboard .af-meta {
  font-size: 11px;
}
body.gateway-dashboard .af-ic {
  border-radius: 6px;
  background: #edf2f5;
  color: #4d7089;
}
body.gateway-dashboard .af-detail {
  background: #fbfcfd;
}
body.gateway-dashboard .rnw-note {
  font-size: 11px;
  line-height: 1.8;
  color: #617889;
}
body.gateway-dashboard .cos-lbl {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}
body.gateway-dashboard .cos-pill {
  border-radius: 5px;
}
html[lang="ar"] body .shell h2.sec,
html[lang="ar"] body.gateway-dashboard .gw-company-heading h1 {
  letter-spacing: 0;
}
@media (min-width: 1250px) {
  body.gateway-dashboard .cohero-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  body.gateway-dashboard .afil {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  body.gateway-dashboard .gw-company-heading h1 {
    font-size: 29px;
  }
  body.gateway-dashboard .gw-company-actions {
    margin-inline-start: 80px;
  }
  body.gateway-dashboard .gw-company-monogram {
    width: 56px;
    height: 58px;
  }
  body .shell .cohero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.gateway-hq .content {
    padding: 30px 28px 70px;
  }
}
@media (max-width: 900px) {
  .shell .side {
    width: min(86vw, 300px);
  }
  body .shell .main {
    padding: 23px 20px 70px;
    width: 100%;
  }
  body.gateway-dashboard .gw-workspace-bar {
    padding-bottom: 18px;
    margin-bottom: 25px;
  }
  body.gateway-dashboard .gw-company-heading h1 {
    font-size: 27px;
  }
  .shell .pappbar {
    background: #142c40;
    color: #fff;
  }
  .pappbar .pappbar__btn {
    background: #244259;
    color: #d8e5ee;
    border-color: #395a73;
  }
  .pappbar .pappbar__brand {
    color: #142c40;
  }
  body.gateway-hq .sidebar {
    width: 248px;
    top: 0;
    bottom: 0;
  }
  body.gateway-hq .content {
    margin-inline-start: 0;
    padding: 25px 20px 70px;
  }
  body.gateway-hq .appbar {
    background: #142c40;
    color: #fff;
  }
  body.gateway-hq .appbar__brand {
    color: #fff;
  }
  body.gateway-hq .appbar__btn {
    background: #244259;
    color: #fff;
    border-color: #395a73;
  }
}
@media (max-width: 560px) {
  body.gateway-dashboard .gw-workspace-bar {
    font-size: 11px;
  }
  body.gateway-dashboard .gw-company-heading {
    gap: 12px;
    margin-bottom: 23px;
  }
  body.gateway-dashboard .gw-company-monogram {
    width: 47px;
    height: 51px;
    font-size: 25px;
  }
  body.gateway-dashboard .gw-company-heading h1 {
    font-size: 24px;
    letter-spacing: -0.7px;
    overflow-wrap: anywhere;
  }
  body.gateway-dashboard .gw-company-heading > div:nth-child(2) {
    flex: 1;
    min-width: 0;
  }
  body.gateway-dashboard .gw-company-actions {
    margin-inline-start: 0;
    width: 100%;
  }
  body.gateway-dashboard .gw-company-actions a {
    justify-content: center;
    flex: 1;
  }
  body.gateway-dashboard .need {
    padding: 18px;
    gap: 13px;
  }
  body.gateway-dashboard .need-main b {
    font-size: 13px;
  }
  body.gateway-dashboard .need-main > span {
    font-size: 12px;
  }
  body .shell .cohero {
    padding: 0 19px 22px;
  }
  body .shell .cohero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px 18px;
  }
  body .shell .coc-v {
    font-size: 12px;
  }
  body .shell .coc-k {
    font-size: 10px;
  }
  body .shell .cohero-grid > .coc:first-child {
    grid-column: 1/-1;
  }
  body .shell .railcard {
    padding: 21px 18px;
  }
  body .shell .rl-l {
    font-size: 12px;
  }
  body.gateway-dashboard .af-hd {
    padding: 18px;
  }
  body .shell h2.sec {
    font-size: 16px;
    margin-top: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.gateway-hq *,
  body.gateway-dashboard * {
    animation: none !important;
    transition: none !important;
  }
}
/* Keep the record and upcoming work visible together at common desktop sizes. */
.shell {
  font-family: var(--font-sans);
}
body.gateway-dashboard .afil-head {
  margin: 30px 0 14px;
  align-items: center;
}
body.gateway-dashboard .afil-head h2.sec {
  margin: 0;
}
body.gateway-hq .sidebar .acctfoot {
  border-color: #365064;
  padding-top: 15px;
  margin-top: 15px;
}
body.gateway-hq .sidebar .acctname,
body.gateway-hq .sidebar .acctenv,
body.gateway-hq .sidebar .signout {
  color: #c1d0db;
}
body.gateway-hq .sidebar .signout:hover {
  background: #244259;
  color: #fff;
}
body.gateway-hq .sidebar .langtog span {
  color: #c1d0db;
}
@media (min-width: 1250px) {
  body.gateway-dashboard .cohero-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  body.gateway-dashboard .afil {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  body.gateway-dashboard .afil > .afcard[open] {
    grid-column: 1/-1;
  }
  body.gateway-dashboard .afil > .afcard:not([open]) .af-hd {
    flex-wrap: wrap;
  }
  body.gateway-dashboard .afil > .afcard:not([open]) .af-badge {
    margin-inline-start: 58px;
  }
  body.gateway-dashboard .afil > .afcard:not([open]) .af-main {
    flex-basis: calc(100% - 65px);
  }
}

/* The operational controls keep their desktop density; phones need room to tap. */
@media (max-width: 900px) {
  body.gateway-hq .content :is(.btn, .ws-button, .editbtn, .statuspill, .sec-btn, .pipe-switch button, .live-refresh, .live-payment-button, .live-open, .finance-text-button, .clienthead__menuitem) {
    min-height: 44px;
    height: auto;
    line-height: 1.35;
  }
  body.gateway-hq :is(.appbar__btn, .docmodal-close, .btn--icon) {
    min-width: 44px;
    min-height: 44px;
  }
  body.gateway-hq .sidebar :is(.navitem, .grpbtn, .signout, .cmdk-trigger, .newbtn) {
    min-height: 44px;
    height: auto;
  }
  body.gateway-hq .content :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), select, textarea) {
    max-width: 100%;
    min-height: 44px;
    font-size: 16px;
  }
  body.gateway-hq .content :is(.tablecard, .tablescroll, .sub-board) {
    min-width: 0;
    max-width: 100%;
  }
  body.gateway-hq .content .card-attach-btn {
    width: 44px;
    height: 44px;
    opacity: 1;
  }
  body.gateway-hq .content .card:has(.card-attach) .cardname {
    padding-inline-end: 32px;
  }
  body.gateway-hq .content .card-attach-menu {
    top: 44px;
  }
  body.gateway-hq .content .sub-menu summary {
    width: 44px;
    height: 44px;
  }
  body.gateway-hq .content .sub-menu-panel {
    inset-block-start: 46px;
  }
  body.gateway-hq .content .sub-card-top {
    padding-inline-end: 44px;
  }
  body.gateway-hq .docmodal-title {
    min-width: 0;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.gateway-hq .docmodal-actions {
    flex: none;
  }
}

@media (max-width: 440px) {
  body.gateway-hq .calm-page .kpi b {
    font-size: clamp(16px, 5vw, 20px);
  }
}
