* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background: #d4dce7;
  color: #111827;
  overflow: hidden;
}

.portfolio-header {
  height: 60px;
  padding: 10px 18px 8px;
  background: #0d0f12;
  color: #e8e8e8;
}

.portfolio-header h1 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
}

.portfolio-header a {
  color: #8aa4ff;
  font-size: 13px;
  text-decoration: none;
}

.portfolio-header a:hover {
  text-decoration: underline;
}

/* Main app */
.app-shell {
  --header-height: 75px;
  --nav-width: 184px;
  position: relative;
  width: 100%;
  height: calc(100vh - 60px);
  background: #d4dce7;
  overflow: hidden;
}

/* Shared header recreated in HTML so it does not move between views. */
.top-bar {
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--header-height);
  background: #33424b;
  display: flex;
  align-items: center;
  padding: 0 24px 0 10px;
  gap: 10px;
}

.logo-wrap {
  width: 172px;
  height: 100%;
  display: flex;
  align-items: center;
}

.logo {
  width: 132px;
  height: auto;
  display: block;
}

.search-box {
  width: 532px;
  height: 34px;
  border: 2px solid #15202b;
  background: white;
  font-size: 15px;
  padding: 5px 8px;
}

.clear-button {
  width: 86px;
  height: 34px;
  border: 1px solid #c4cbd3;
  background: #f7f7f7;
  font-size: 14px;
  cursor: pointer;
}

.user-icon {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #536879;
  display: grid;
  place-items: center;
  font-size: 19px;
}

/* Shared navigation recreated in HTML so only the content area changes. */
.side-nav {
  position: absolute;
  top: calc(var(--header-height) - 1px);
  left: 0;
  bottom: 0;
  width: var(--nav-width);
  background: #d4dce7;
  z-index: 3;
  border-right: 0;
  box-shadow: none;
  overflow: hidden;
}

.nav-button {
  width: 100%;
  height: 52px;
  border: 0;
  display: block;
  background: #d4dce7;
  color: #111827;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
}

.nav-button:hover {
  background: #d8e4f2;
}

.nav-button.active {
  background: #aec5df;
}

/* View description message.*/
.sidebar-message {
  position: fixed;
  left: 12px;
  bottom: 18px;
  width: calc(var(--nav-width) - 24px);
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(27, 39, 50, .88);
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  user-select: none;
  z-index: 60;
}

/* Screenshots. */
.content-stage {
  position: absolute;
  top: var(--header-height);
  left: calc(var(--nav-width) - 5px);
  right: 0;
  bottom: 0;
  background: #d4dce7;
  overflow: auto;
  padding: 0;
}

.screen-content {
  display: block;
  height: auto;
  max-width: none;
  transform-origin: top left;
  margin-top: -4px;
}

.screen-dashboard { width: 103%; }
.screen-jobs {
  width: 97.5%;
  margin-top: -6px;
}
.screen-customers { width: 100%; }
.screen-invoices { width: 103%; }
.screen-reports { width: 103%; }
.screen-settings { width: 100%; }

.demo-notice {
  position: fixed;
  right: 18px;
  bottom: 16px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(27, 39, 50, .88);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  user-select: none;
  z-index: 60;
}

.app-shell::after {
  content: "";
  position: absolute;
  top: var(--header-height);
  left: calc(var(--nav-width) - 8px);
  width: 8px;
  bottom: 0;
  background: #d4dce7;
  pointer-events: none;
  z-index: 2;
}

/* -----------------------------------------------------------------
   MOBILE / TABLET WIDTH
------------------------------------------------------------------ */
@media (max-width: 900px) {

  .app-shell {
    --header-height: 60px;
    --nav-width: 82px;
  }

  .top-bar {
    height: var(--header-height);
    padding: 0 8px;
    gap: 6px;
  }

  .side-nav {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 4px;
  }

  .nav-button {
    height: 34px;
    min-height: 0;
    flex: 0 0 34px;
    font-size: 10px;
    line-height: 1.05;
    padding: 0 2px;
  }

  .sidebar-message {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    flex: 0 0 auto;
    margin: auto 5px 0;
    padding: 5px 5px;
    font-size: 9px;
    line-height: 1.12;
    border-radius: 5px;
    max-height: 88px;
    overflow: hidden;
  }

  .logo-wrap {
    width: 82px;
  }

  .logo {
    width: 70px;
  }

  .search-box,
  .clear-button {
    display: none;
  }

  .content-stage {
    overflow: auto;
  }

  .screen-content {
    width: 135% !important;
    max-width: none;
  }

  .demo-notice {
    font-size: 11px;
    right: 8px;
    bottom: 8px;
  }

}

/* Very small phone screens. */
@media (max-width: 480px) {
  .app-shell {
    --nav-width: 72px;
  }

  .nav-button {
    height: 30px;
    flex-basis: 30px;
    font-size: 8.5px;
    line-height: 1;
    padding: 0 1px;
  }

  .sidebar-message {
    margin: auto 4px 0;
    padding: 4px 4px;
    font-size: 7.8px;
    line-height: 1.05;
    max-height: 76px;
  }

  .logo-wrap {
    width: 72px;
  }

  .logo {
    width: 62px;
  }

  .screen-content {
    width: 155% !important;
  }
}

/* -----------------------------------------------------------------
   SHORT HEIGHT DEVICES - phones/tablets in landscape.
------------------------------------------------------------------ */
@media (max-height: 620px) {

  .app-shell {
    --header-height: 60px;
  }

  .side-nav {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding-bottom: 4px !important;
  }

  .nav-button {
    height: 34px !important;
    min-height: 0 !important;
    flex: 0 0 34px !important;
    font-size: 10px !important;
    line-height: 1.05 !important;
    padding: 0 2px !important;
  }

  .sidebar-message {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    flex: 0 0 auto !important;
    margin: auto 6px 0 !important;
    padding: 5px 5px !important;
    font-size: 9px !important;
    line-height: 1.12 !important;
    max-height: 76px !important;
    overflow: hidden !important;
  }
}

/* Very short landscape screens. */
@media (max-height: 430px) {

  .app-shell {
    --header-height: 54px;
  }

  .nav-button {
    height: 29px !important;
    flex-basis: 29px !important;
    font-size: 8.2px !important;
  }

  .sidebar-message {
    margin: auto 4px 0 !important;
    padding: 4px 4px !important;
    font-size: 7.5px !important;
    line-height: 1.05 !important;
    max-height: 62px !important;
  }

  .demo-notice {
    font-size: 10px;
  }
}

/* -----------------------------------------------------------------
   MOBILE PORTRAIT WARNING
------------------------------------------------------------------ */
.portrait-warning {
  display: none;
}

@media (max-width: 900px) and (orientation: portrait) {
  .portrait-warning {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(27, 39, 50, 0.94);
    color: #ffffff;
    text-align: center;
  }

  .portrait-warning__box {
    max-width: 340px;
    padding: 24px 22px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  }

  .portrait-warning__icon {
    margin-bottom: 10px;
    font-size: 42px;
    line-height: 1;
  }

  .portrait-warning h1 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
  }

  .portrait-warning p {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
  }
}


/* -----------------------------------------------------------------
   landscape are wider than 480px, so this uses height.
   It keeps the view description under the nav buttons and away from
   the Demo only badge.
------------------------------------------------------------------ */
@media (max-height: 430px) {
  .app-shell {
    --header-height: 54px;
    --nav-width: 82px;
  }

  .top-bar {
    height: var(--header-height);
    padding: 0 8px;
    gap: 6px;
  }

  .logo-wrap {
    width: 82px;
  }

  .logo {
    width: 70px;
  }

  .search-box,
  .clear-button {
    display: none;
  }

  .side-nav {
    overflow: hidden !important;
    padding-bottom: 0 !important;
  }

  .nav-button {
    height: 29px !important;
    min-height: 0 !important;
    flex: none !important;
    font-size: 8.5px !important;
    line-height: 1 !important;
    padding: 0 1px !important;
  }

  .sidebar-message {
    position: fixed !important;
    left: 4px !important;
    right: auto !important;
    top: calc(var(--header-height) + (29px * 6) + 5px) !important;
    bottom: auto !important;
    width: calc(var(--nav-width) - 8px) !important;
    max-height: calc(100vh - var(--header-height) - (29px * 6) - 10px) !important;
    margin: 0 !important;
    padding: 4px 4px !important;
    font-size: 7.2px !important;
    line-height: 1.05 !important;
    overflow: hidden !important;
    z-index: 90 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .content-stage {
    left: calc(var(--nav-width) - 5px);
    overflow: auto;
  }

  .screen-content {
    width: 155% !important;
    max-width: none;
  }

  .demo-notice {
    right: 8px;
    bottom: 8px;
    font-size: 10px;
  }
}

/* Extra-tight short phones. */
@media (max-height: 360px) {
  .nav-button {
    height: 26px !important;
    font-size: 7.8px !important;
  }

  .sidebar-message {
    top: calc(var(--header-height) + (26px * 6) + 4px) !important;
    max-height: calc(100vh - var(--header-height) - (26px * 6) - 8px) !important;
    padding: 3px 3px !important;
    font-size: 6.7px !important;
    line-height: 1.02 !important;
  }
}

/* Interactive prototype layer */
.screen-wrap { position: relative; display: inline-block; line-height: 0; }
.interaction-layer { position: absolute; inset: 0; pointer-events: none; }
.hotspot { position: absolute; pointer-events: auto; border: 2px solid transparent; background: transparent; cursor: pointer; padding: 0; }
.hotspot:hover, .hotspot:focus-visible { border-color: rgba(0, 120, 215, .9); background: rgba(0, 120, 215, .10); outline: none; }
.hotspot--card:hover { background: rgba(255,255,255,.20); box-shadow: 0 0 0 3px rgba(0,120,215,.24); }
.hotspot--tile.is-selected { border-color: #0078d7; background: rgba(0,120,215,.09); }
.hotspot--row.is-dimmed { background: rgba(212,220,231,.73); cursor: default; }
.hotspot--row.is-dimmed:hover { border-color: transparent; }
.hotspot--row.is-selected-customer { border-color: rgba(0,120,215,.6); }
.hotspot--tab.is-selected { border-color: #0078d7; }
.filter-indicator { position: fixed; top: 84px; right: 20px; z-index: 70; background: rgba(27,39,50,.91); color:#fff; padding:7px 11px; border-radius:6px; font-size:12px; box-shadow:0 2px 8px rgba(0,0,0,.2); }
.record-modal[hidden] { display:none; }
.record-modal { position:fixed; inset:0; z-index:100; }
.record-modal__backdrop { position:absolute; inset:0; background:rgba(10,18,24,.55); }
.record-modal__panel { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:min(760px,calc(100vw - 40px)); max-height:calc(100vh - 40px); overflow:auto; background:#f4f6f8; border:1px solid #81909d; box-shadow:0 18px 60px rgba(0,0,0,.35); padding:26px; line-height:1.4; }
.record-modal__close { position:absolute; right:10px; top:8px; width:34px; height:34px; border:0; background:transparent; font-size:28px; cursor:pointer; }
.modal-kicker { color:#586875; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
.record-modal h2 { margin:5px 40px 18px 0; font-size:24px; }
.record-modal h3 { margin:16px 0 5px; font-size:14px; }
.record-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.record-grid > div { background:#fff; border:1px solid #c8d0d7; padding:10px 12px; }
.record-grid .wide { grid-column:1/-1; }
.record-grid span { display:block; font-size:11px; color:#64727d; margin-bottom:3px; }
.record-grid strong { font-size:14px; }
.record-notes { margin-top:14px; background:#fff; border:1px solid #c8d0d7; padding:12px; }
.record-notes p { margin:0; white-space:normal; }
.readonly-note { margin-top:16px; padding:10px 12px; background:#e5edf5; border-left:4px solid #5d86ad; font-size:13px; }
.mini-table { border:1px solid #aeb9c2; background:#fff; }
.mini-row { display:grid; grid-template-columns:1fr 2fr 1fr .5fr; }
.mini-row span { padding:9px; border-bottom:1px solid #d7dde2; }
.mini-head { background:#3f4e59; color:#fff; font-weight:700; }
.placeholder-copy { background:#fff; border:1px solid #c8d0d7; padding:18px; }
@media (max-width:900px){ .filter-indicator{top:66px;right:8px;font-size:10px}.record-modal__panel{padding:20px}.record-grid{grid-template-columns:1fr}.record-grid .wide{grid-column:auto}.mini-row{grid-template-columns:1fr 1.5fr 1fr .5fr;font-size:11px} }

/* Real screenshot and PDF previews supplied from the desktop application. */
.modal-screenshot {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #aab5bf;
  background: #fff;
}
.modal-pdf {
  display: block;
  width: min(820px, 100%);
  height: min(72vh, 900px);
  border: 1px solid #aab5bf;
  background: #fff;
}
.pdf-fallback { margin: 10px 0 0; font-size: 13px; }
.record-modal__panel { width: min(980px, calc(100vw - 32px)); }

/* interaction alignment fixes */
.screen-wrap {
  display: block;
  width: 100%;
  line-height: 0;
}
.screen-content {
  display: block;
  width: 100% !important;
  max-width: none;
}
.interaction-layer {
  width: 100%;
  height: 100%;
}

/* Small vertical corrections for screenshots captured with slightly different crops. */
.screen-customers { margin-top: 0; }
.screen-invoices { margin-top: -2px; }
.screen-reports { margin-top: 0; }

/* Make genuinely interactive rows discoverable without obscuring the desktop UI. */
.hotspot--available {
  border-color: rgba(0,120,215,.42);
  background: rgba(0,120,215,.025);
  color: transparent;
  font-size: 0;
}
.hotspot--available::after {
  content: attr(aria-label);
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  max-width: 132px;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(0,120,215,.9);
  color: white;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: .82;
}
.hotspot--available:hover::after,
.hotspot--available:focus-visible::after { opacity: 1; }

.record-modal--compact .record-modal__panel {
  width: min(520px, calc(100vw - 40px));
}
.record-modal--compact .modal-screenshot {
  width: 50%;
  min-width: 280px;
  margin: 0 auto;
}

@media (max-width:900px) {
  .screen-content { width: 135% !important; }
  .screen-wrap { width: 135%; }
  .record-modal--compact .modal-screenshot { width: 72%; min-width: 0; }
}
@media (max-width:480px), (max-height:430px) {
  .screen-content { width: 155% !important; }
  .screen-wrap { width: 155%; }
}

/* hotspots are measured against each image's natural pixel dimensions. */
.hotspot--badged::after {
  content: attr(data-badge);
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(0, 105, 190, .92);
  color: #fff;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.hotspot--row.hotspot--badged {
  border-color: rgba(0,105,190,.32);
  background: rgba(0,105,190,.015);
}
.hotspot--row.hotspot--badged:hover,
.hotspot--row.hotspot--badged:focus-visible {
  border-color: rgba(0,105,190,.95);
  background: rgba(0,105,190,.08);
}
.hotspot--button.hotspot--badged::after {
  right: 50%;
  transform: translate(50%,-50%);
}
/* Disable the older automatic aria-label badge so only the new concise labels appear. */
.hotspot--available::after { content: none !important; }
.record-modal--compact .record-modal__panel {
  width: min(500px, calc(100vw - 40px));
}
.record-modal--compact .modal-screenshot {
  width: 50%;
  min-width: 0;
  margin: 0 auto;
}

/* one consistent, left-edge interaction cue throughout the prototype. */
.hotspot--badged::after {
  left: 5px;
  right: auto;
  top: 50%;
  transform: translateY(-50%);
}

.hotspot--tile.hotspot--badged::after,
.hotspot--card.hotspot--badged::after,
.hotspot--tab.hotspot--badged::after,
.hotspot--button.hotspot--badged::after {
  left: 5px;
  right: auto;
  transform: translateY(-50%);
}

.hotspot--record-cue,
.hotspot--example-control {
  border: 0;
  background: transparent;
  overflow: visible;
}

.hotspot--record-cue.hotspot--badged::after,
.hotspot--example-control.hotspot--badged::after {
  left: 3px;
  right: auto;
  min-width: 54px;
  text-align: center;
  font-size: 10px;
  padding: 4px 6px;
  opacity: .96;
}

.hotspot--record-cue:hover,
.hotspot--record-cue:focus-visible,
.hotspot--example-control:hover,
.hotspot--example-control:focus-visible {
  border-color: transparent;
  background: transparent;
}

.hotspot--record-cue:hover::after,
.hotspot--record-cue:focus-visible::after,
.hotspot--example-control:hover::after,
.hotspot--example-control:focus-visible::after {
  box-shadow: 0 0 0 3px rgba(0,120,215,.22), 0 1px 3px rgba(0,0,0,.22);
}

.hotspot--customer-cue.hotspot--badged::after {
  min-width: 58px;
}

/* Customer edit and quick-edit screenshots are intentionally shown at half size. */
.record-modal--compact .record-modal__panel {
  width: min(560px, calc(100vw - 40px));
}
.record-modal--compact .modal-screenshot {
  width: 50%;
  min-width: 0;
  margin: 0 auto;
}

.hotspot--standalone-cue,
.hotspot--heading-control {
  border: 0;
  background: transparent;
  overflow: visible;
}
.hotspot--standalone-cue:hover,
.hotspot--standalone-cue:focus-visible,
.hotspot--heading-control:hover,
.hotspot--heading-control:focus-visible {
  border: 0;
  background: transparent;
}
.hotspot--standalone-cue.hotspot--badged::after,
.hotspot--heading-control.hotspot--badged::after {
  left: 0;
  right: auto;
  top: 50%;
  transform: translateY(-50%);
  min-width: 70px;
  text-align: center;
  font-size: 10px;
  padding: 4px 7px;
  opacity: .98;
}
.hotspot--heading-control.hotspot--badged::after {
  font-size: 11px;
  min-width: 86px;
}
.hotspot--standalone-cue:hover::after,
.hotspot--standalone-cue:focus-visible::after,
.hotspot--heading-control:hover::after,
.hotspot--heading-control:focus-visible::after {
  box-shadow: 0 0 0 3px rgba(0,120,215,.22), 0 1px 3px rgba(0,0,0,.22);
}
/* Linked tabs use the controls already visible in the desktop screenshot. */
.hotspot--tab::after { content: none !important; }



.hotspot--heading-control.hotspot--badged::after {
  min-width: 0;
  width: 100%;
  padding: 4px 5px;
  font-size: 10px;
  box-sizing: border-box;
}

.record-modal__panel {
  padding: 0;
  overflow: hidden;
  border-radius: 4px;
}
.record-modal__titlebar {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 16px;
  background: #33424b;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.record-modal__close {
  position: static;
  width: 34px;
  height: 34px;
  color: #fff;
  line-height: 1;
}
.record-modal__close:hover,
.record-modal__close:focus-visible {
  background: rgba(255,255,255,.12);
  outline: none;
}
.record-modal__content {
  max-height: calc(100vh - 82px);
  overflow: auto;
  padding: 22px 26px 26px;
}

.welcome-message[hidden] { display: none; }
.welcome-message {
  position: fixed;
  inset: 0;
  z-index: 150;
  opacity: 0;
  transition: opacity 200ms ease;
}
.welcome-message.is-visible { opacity: 1; }
.welcome-message.is-closing { opacity: 0; }
.welcome-message__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 20, 27, .20);
}
.welcome-message__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(430px, calc(100vw - 32px));
  padding: 23px 46px 21px 24px;
  border: 1px solid #7e8c98;
  border-radius: 7px;
  background: #f5f7f9;
  color: #1f2a33;
  box-shadow: 0 16px 48px rgba(0,0,0,.30);
  line-height: 1.45;
}
.welcome-message__panel h2 {
  margin: 0 0 8px;
  font-size: 22px;
}
.welcome-message__panel p { margin: 0; }
.welcome-message__note {
  margin-top: 8px !important;
  color: #53616c;
  font-size: 13px;
}
.welcome-message__close {
  position: absolute;
  right: 8px;
  top: 7px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #33424b;
  font-size: 25px;
  cursor: pointer;
}
.welcome-message__close:hover,
.welcome-message__close:focus-visible {
  background: #e1e7ec;
  outline: none;
}


.hotspot--tab-cue {
  border: 2px solid rgba(0, 120, 215, .72);
  background: rgba(0, 120, 215, .035);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.hotspot--tab-cue:hover,
.hotspot--tab-cue:focus-visible {
  border-color: #0078d7;
  background: rgba(0, 120, 215, .12);
  box-shadow: 0 0 0 3px rgba(0,120,215,.18);
}
.hotspot--tab-cue.is-selected {
  border-color: #0078d7;
  background: rgba(0, 120, 215, .07);
}


.hotspot {
  box-sizing: border-box;
}


@media (max-width: 900px) {
  .screen-wrap { width: 135%; }
  .screen-content { width: 100% !important; }
}

@media (max-width: 480px), (max-height: 430px) {
  .screen-wrap { width: 155%; }
  .screen-content { width: 100% !important; }
}


.hotspot--tab-cue {
  border-width: 1px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 120, 215, .42);
}


.hotspot--invisible,
.hotspot--invisible:hover,
.hotspot--invisible:focus-visible,
.hotspot--invisible.is-selected {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}
