:root {
  --ccs-orange: #ff6802;
  --ccs-black: #000000;
  --ccs-white: #ffffff;
  --ccs-grey: #b8babc;
  --btn-primary-bg: #ff6802;
  --btn-primary-text: #ffffff;
  --btn-primary-border: rgba(255, 104, 2, 0.45);
  --btn-primary-soft-bg: rgba(255, 104, 2, 0.12);
  --btn-ghost-bg: #111111;
  --btn-ghost-text: #ffffff;
  --btn-ghost-border: rgba(17, 17, 17, 0.6);
  --btn-danger-bg: #d14039;
  --btn-danger-text: #ffffff;
  --btn-danger-border: rgba(209, 64, 57, 0.45);
  --btn-danger-soft-bg: rgba(209, 64, 57, 0.12);
  --btn-success-bg: #1f8f4a;
  --btn-success-text: #ffffff;
  --btn-success-border: rgba(31, 143, 74, 0.45);
  --btn-success-soft-bg: rgba(31, 143, 74, 0.12);
  --btn-warning-bg: #ffb347;
  --btn-warning-text: #1a1a1a;
  --btn-warning-border: rgba(255, 179, 71, 0.5);
  --btn-warning-soft-bg: rgba(255, 179, 71, 0.16);
  --radius: 16px;
  --bg: #f1f1f1;
  --panel: #ffffff;
  --panel-soft: #f2f2f2;
  --card: #fdfdfd;
  --text: #0a0a0a;
  --muted: #2f2f2f;
  --border: rgba(0, 0, 0, 0.12);
  --pill: rgba(184, 186, 188, 0.2);
  --shortcut-bg: #f4f4f4;
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
  --top-nav-height: 74px;
  --sidebar-width: min(340px, 88vw);
  --nav-inner-pad-x: 18px;
  --nav-inner-gap: 14px;
  --sidebar-toggle-width: 92px;
  --bg-image: none;
  --accent-pattern: repeating-linear-gradient(
      135deg,
      rgba(184, 186, 188, 0.08),
      rgba(184, 186, 188, 0.08) 12px,
      transparent 12px,
      transparent 24px
    );
}

:root {
  --bg-image: url('assets/bg/CCS 1920x1080 White Wallpaper.png');
}

@media (max-width: 1023px) {
  :root {
    --bg-image: url('assets/bg/CCS Rectangle White Wallpaper.png');
  }
}

@media (max-width: 639px) {
  :root {
    --bg-image: url('assets/bg/CCS 1080x1920 White Wallpaper.png');
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-image: url('assets/bg/CCS 1920x1080 Black Wallpaper.png');
  }
}

@media (prefers-color-scheme: dark) and (max-width: 1023px) {
  :root {
    --bg-image: url('assets/bg/CCS Rectangle Black Wallpaper.png');
  }
}

@media (prefers-color-scheme: dark) and (max-width: 639px) {
  :root {
    --bg-image: url('assets/bg/CCS 1080x1920 Black Wallpaper.png');
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

input[type="number"] {
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

body {
  margin: 0;
  font-family: 'Montserrat', 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  padding: 32px;
}

body.has-sidebar-nav {
  padding-top: calc(32px + var(--top-nav-height) + 18px);
}

body.job-manager {
  padding: 20px;
  overflow-x: hidden;
  overflow-y: auto;
}

body.has-sidebar-nav.job-manager {
  padding-top: calc(20px + var(--top-nav-height));
}

body.receipt-upload {
  overflow-y: auto;
}

body.receipt-upload .content {
  height: auto;
  min-height: calc(100vh - 40px);
}

body.settings-page {
  overflow: auto;
}

body.settings-page .content {
  height: auto;
  min-height: calc(100vh - 40px);
}

body.settings-page .job-panel {
  flex: 0 0 auto;
}

body.settings-page .job-panel .table-wrapper {
  max-height: 520px;
  overflow: auto;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 6px;
}

.settings-tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.settings-tab-button:hover {
  transform: translateY(-1px);
}

.settings-tab-button.active {
  border-color: rgba(255, 104, 2, 0.42);
  background: rgba(255, 104, 2, 0.12);
  color: var(--ccs-orange);
}

.settings-tab-button:focus-visible {
  outline: 2px solid rgba(255, 104, 2, 0.45);
  outline-offset: 2px;
}

.settings-tab-panel[hidden] {
  display: none !important;
}

.system-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.system-metric-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  padding: 14px;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.system-progress-wrap {
  position: relative;
  width: 120px;
  height: 120px;
}

.system-progress-ring {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}

.system-progress-track,
.system-progress-value {
  fill: none;
  stroke-width: 10;
}

.system-progress-track {
  stroke: rgba(128, 128, 128, 0.18);
}

.system-progress-value {
  stroke-dasharray: 289;
  stroke-dashoffset: 289;
  transition: stroke-dashoffset 0.35s ease;
  stroke-linecap: round;
}

.system-progress-load {
  stroke: #ffc107;
}

.system-progress-cpu {
  stroke: #ff6802;
}

.system-progress-ram {
  stroke: #1e88e5;
}

.system-progress-disk {
  stroke: #2e7d32;
}

.system-progress-center {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  text-align: center;
}

.system-progress-center strong {
  font-size: 18px;
  line-height: 1.1;
}

.system-progress-center span {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.system-metric-card > .muted {
  margin: 0;
  font-size: 13px;
  text-align: center;
}

.system-status-meta {
  margin: 12px 2px 0;
}

#system-status-panel.system-status-unavailable .system-metric-card {
  opacity: 0.7;
}

.no-scroll {
  overflow: hidden;
}

.background-accent,
.hero,
.content,
.hero-bar {
  transition: filter 0.2s ease;
}

.blur-background .background-accent,
.blur-background .hero,
.blur-background .content,
.blur-background .hero-bar {
  filter: blur(4px);
}

body.sidebar-open .background-accent,
body.sidebar-open .hero,
body.sidebar-open .content,
body.sidebar-open .hero-bar {
  filter: blur(4px);
}

.lights-toggle {
  position: fixed;
  right: 16px;
  bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
  z-index: 5;
  box-shadow: var(--shadow);
}

.auth-guard {
  position: fixed;
  inset: 0;
  background: rgba(245, 245, 245, 0.96);
  display: grid;
  place-items: center;
  z-index: 999;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.auth-guard[hidden] {
  display: none !important;
}

.background-accent {
  position: fixed;
  inset: 0;
  background: var(--bg-image), var(--accent-pattern);
  background-size: cover;
  background-position: center;
  pointer-events: none;
  z-index: 0;
}

.lightrope {
  text-align: center;
  white-space: nowrap;
  overflow: visible;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 4;
  margin: -10px 0 0 0;
  padding: 0;
  pointer-events: none;
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.lightrope[hidden] {
  display: none !important;
}

.lightrope li {
  position: relative;
  animation-fill-mode: both;
  animation-iteration-count: infinite;
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-block;
  width: 12px;
  height: 28px;
  border-radius: 50%;
  margin: 20px 0;
  background: #ff6802;
  box-shadow: 0px 4px 24px 3px rgba(255, 104, 2, 1);
  animation-name: flash-orange;
  animation-duration: 2.4s;
}

.lightrope li:nth-child(2n+1) {
  background: #ffffff;
  box-shadow: 0px 4px 24px 3px rgba(255, 255, 255, 0.9);
  animation-name: flash-white;
  animation-duration: 2s;
}

.lightrope li:before {
  content: "";
  position: absolute;
  background: #222;
  width: 10px;
  height: 9px;
  border-radius: 3px;
  top: -4px;
  left: 1px;
}

.lightrope li:after {
  content: "";
  top: -14px;
  left: 9px;
  position: absolute;
  width: 52px;
  height: 18px;
  border-bottom: solid #222 2px;
  border-radius: 50%;
}

.lightrope li:last-child:after {
  content: none;
}

.lightrope li:first-child {
  margin-left: -20px;
}

@keyframes flash-1 {
  0%, 100% {
    background: rgba(0, 247, 165, 1);
    box-shadow: 0px 4px 24px 3px rgba(0, 247, 165, 1);
  }
  50% {
    background: rgba(0, 247, 165, 0.4);
    box-shadow: 0px 4px 24px 3px rgba(0, 247, 165, 0.2);
  }
}

@keyframes flash-2 {
  0%, 100% {
    background: rgba(0, 255, 255, 1);
    box-shadow: 0px 4px 24px 3px rgba(0, 255, 255, 1);
  }
  50% {
    background: rgba(0, 255, 255, 0.4);
    box-shadow: 0px 4px 24px 3px rgba(0, 255, 255, 0.2);
  }
}

@keyframes flash-3 {
  0%, 100% {
    background: rgba(247, 0, 148, 1);
    box-shadow: 0px 4px 24px 3px rgba(247, 0, 148, 1);
  }
  50% {
    background: rgba(247, 0, 148, 0.4);
    box-shadow: 0px 4px 24px 3px rgba(247, 0, 148, 0.2);
  }
}

@keyframes flash-orange {
  0%, 100% {
    background: #ff6802;
    box-shadow: 0px 4px 24px 3px rgba(255, 104, 2, 1);
  }
  50% {
    background: rgba(255, 104, 2, 0.4);
    box-shadow: 0px 4px 24px 3px rgba(255, 104, 2, 0.2);
  }
}

@keyframes flash-white {
  0%, 100% {
    background: #ffffff;
    box-shadow: 0px 4px 24px 3px rgba(255, 255, 255, 0.9);
  }
  50% {
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0px 4px 24px 3px rgba(255, 255, 255, 0.2);
  }
}

@media (max-width: 640px) {
  .lightrope li:nth-child(n+15) {
    display: none;
  }
}

.hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto 8px;
  padding: 0;
  position: relative;
  z-index: 3;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 95;
  margin: 0;
  width: 100%;
}

.site-nav-inner {
  max-width: none;
  width: 100%;
  margin: 0;
  min-height: var(--top-nav-height);
  padding: 10px var(--nav-inner-pad-x);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--nav-inner-gap);
  background: rgba(255, 255, 255, 0.52);
  border-bottom: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(175%) blur(10px);
  -webkit-backdrop-filter: saturate(175%) blur(10px);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-right: auto;
  cursor: pointer;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.nav-logo img {
  width: 122px;
  height: 50px;
  object-fit: contain;
}

body.sidebar-open .nav-logo {
  transform: translateX(min(calc(var(--sidebar-width) + 20px - var(--nav-inner-pad-x) - var(--sidebar-toggle-width) - var(--nav-inner-gap)), calc(100vw - 268px)));
}

.sidebar-toggle {
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
  height: 42px;
  border-radius: 12px;
  width: var(--sidebar-toggle-width);
  min-width: var(--sidebar-toggle-width);
  flex: 0 0 var(--sidebar-toggle-width);
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

body.sidebar-open .sidebar-toggle {
  opacity: 0;
  pointer-events: none;
}

.sidebar-toggle i {
  font-size: 18px;
}

.sidebar-toggle:hover {
  filter: brightness(0.98);
}

.nav-actions {
  display: none !important;
}

.topbar-user {
  margin-left: 8px;
}

.topbar-meta-cluster {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.topbar-meta-chip {
  height: 38px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
  border-radius: 12px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.topbar-meta-chip i {
  font-size: 14px;
  color: var(--ccs-orange);
}

.topbar-meta-chip.loading i {
  animation: topbar-spin 1.05s linear infinite;
}

.topbar-meta-value {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.topbar-time-chip {
  width: 130px;
  justify-content: flex-start;
}

.topbar-time-chip .topbar-meta-value {
  width: 82px;
  text-align: right;
}

#topbar-weather-chip .topbar-meta-value {
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes topbar-spin {
  to {
    transform: rotate(360deg);
  }
}

.topbar-user .topbar-user-toggle {
  height: 44px;
  border-radius: 14px;
  padding: 4px 10px 4px 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.topbar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  overflow: hidden;
}

.topbar-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar-user-name {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-user-unread {
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--ccs-orange);
  color: var(--ccs-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  padding: 0 5px;
}

.topbar-user .topbar-user-menu {
  right: 0;
  left: auto;
  min-width: min(430px, calc(100vw - 30px));
  width: min(430px, calc(100vw - 30px));
  max-height: 0;
  overflow: hidden;
}

.topbar-user.dropdown.open .topbar-user-menu {
  max-height: min(74vh, 620px);
}

.topbar-user-menu-inner {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.topbar-user-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--panel-soft);
}

.topbar-user-shortcuts {
  margin-top: 8px;
}

.topbar-theme-pref {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.topbar-theme-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.topbar-theme-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.topbar-theme-btn {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 7px 8px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.topbar-theme-btn i {
  font-size: 12px;
}

.topbar-theme-btn.active {
  border-color: var(--btn-primary-border);
  background: var(--btn-primary-soft-bg);
  color: var(--btn-primary-bg);
}

.topbar-theme-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.topbar-shortcut-btn {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.topbar-shortcut-btn:hover {
  border-color: rgba(255, 104, 2, 0.45);
  color: var(--ccs-orange);
}

.topbar-user-block {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--panel);
}

.topbar-user-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.topbar-user-block-head h4 {
  margin: 0;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.topbar-user-block .count {
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 11px;
  padding: 0 6px;
}

.topbar-inline-btn {
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.topbar-inline-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.topbar-feed-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 210px;
  overflow: auto;
  padding-right: 2px;
}

.topbar-feed-empty {
  margin: 2px 0 0;
  font-size: 13px;
}

.topbar-feed-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px;
  background: var(--panel-soft);
}

.topbar-feed-item.is-unread {
  border-color: rgba(255, 104, 2, 0.45);
}

.topbar-feed-copy {
  min-width: 0;
}

.topbar-feed-title {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
}

.topbar-feed-item.is-read .topbar-feed-title {
  font-weight: 500;
}

.topbar-feed-meta {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.topbar-task-link {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px;
  text-decoration: none;
  color: var(--text);
  background: var(--panel-soft);
}

.topbar-task-link i {
  margin-top: 2px;
  color: var(--ccs-orange);
}

.topbar-task-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.topbar-task-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.topbar-task-meta {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.site-sidebar-overlay {
  position: fixed;
  inset: var(--top-nav-height) 0 0 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.36);
  border: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.site-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  z-index: 120;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border);
  border-left: none;
  box-shadow: 20px 0 36px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translateX(-102%);
  transition: transform 0.24s ease;
  display: flex;
  flex-direction: column;
}

body.sidebar-open .site-sidebar {
  transform: translateX(0);
}

body.sidebar-open .site-sidebar-overlay {
  opacity: 1;
  pointer-events: auto;
}

.site-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--top-nav-height);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.site-sidebar-header strong {
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ccs-orange);
}

.site-sidebar-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.site-sidebar-content {
  padding: 12px;
  overflow: auto;
  overscroll-behavior: contain;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-sidebar-group-title {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-sidebar-group-title i {
  color: var(--ccs-orange);
  font-size: 13px;
}

.site-sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.site-sidebar-link {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--text);
  font-weight: 400;
  font-size: 14px;
}

.site-sidebar-link:hover {
  background: var(--panel-soft);
  border-color: var(--border);
  color: var(--ccs-orange);
}

.site-sidebar-actions {
  display: grid;
  gap: 8px;
}

.site-sidebar-actions .cta {
  width: 100%;
  justify-content: center;
}

.site-sidebar-empty {
  margin: 0;
}

.hero-logo {
  width: 130px;
  height: 60px;
  object-fit: contain;
  margin: 0;
}

.eyebrow-right {
  margin: 0;
}

.greeting-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.greeting-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 104, 2, 0.12);
  border: 1px solid rgba(255, 104, 2, 0.35);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--ccs-black);
  overflow: hidden;
  flex-shrink: 0;
}

.greeting-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto 28px;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  gap: 18px;
  align-items: center;
}

.brand-copy h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand-copy .subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}

.eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.12em;
  margin: 0 0 6px;
  color: var(--ccs-orange);
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.dropdown {
  position: relative;
}

.dropdown-toggle {
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  font-size: 14px;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 220px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 20;
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.dropdown-menu a {
  padding: 10px 12px;
  text-decoration: none;
  color: var(--text);
  display: block;
}

.dropdown-menu .menu-link {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.menu-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 104, 2, 0.12);
  border: 1px solid rgba(255, 104, 2, 0.35);
  display: grid;
  place-items: center;
  padding: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.menu-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.menu-logo i {
  font-size: 16px;
  line-height: 1;
  color: var(--ccs-orange);
}

.menu-label {
  font-weight: 600;
  font-size: 14px;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-menu a:hover,
.dropdown-menu .menu-link:hover {
  background: rgba(255, 104, 2, 0.08);
  color: var(--ccs-orange);
}

.dropdown.open .dropdown-menu {
  max-height: 400px;
  opacity: 1;
  transform: translateY(0);
}

#hero-quicklinks-dropdown.open #hero-quicklinks-menu {
  max-height: min(65vh, 520px);
  overflow-y: auto;
  overflow-x: hidden;
}

.social-links {
  display: inline-flex;
  justify-content: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
  align-items: center;
  margin: 24px auto 16px;
  width: 100%;
  max-width: 320px;
}

.social-links a {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.social-links a:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 104, 2, 0.5);
}

.social-links i {
  font-size: 18px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  text-decoration: none;
  font-weight: 700;
  border: 1px solid var(--btn-primary-border);
  font-size: 15px;
  cursor: pointer;
}

.cta.ghost {
  background: var(--btn-ghost-bg);
  color: var(--btn-ghost-text);
  border-color: var(--btn-ghost-border);
}

.cta.danger {
  background: var(--btn-danger-bg);
  color: var(--btn-danger-text);
  border-color: var(--btn-danger-border);
}

.cta.success {
  background: var(--btn-success-bg);
  color: var(--btn-success-text);
  border-color: var(--btn-success-border);
}

.cta.warning {
  background: var(--btn-warning-bg);
  color: var(--btn-warning-text);
  border-color: var(--btn-warning-border);
}

.content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.home-dashboard .content.home-grid {
  max-width: none;
  width: 100%;
  margin: 0 auto 56px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.home-dashboard #calendar-stack {
  grid-column: 6 / span 7;
}

.home-dashboard #insights-stack {
  grid-column: 1 / span 5;
}

.home-dashboard .home-social-links {
  grid-column: 1 / -1;
}

@media (max-width: 1320px) {
  .home-dashboard .content.home-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .home-dashboard #calendar-stack,
  .home-dashboard #insights-stack {
    grid-column: span 4;
  }

  .home-dashboard #insights-stack {
    grid-column: 1 / span 4;
  }

  .home-dashboard #calendar-stack {
    grid-column: 5 / span 4;
  }

  .home-dashboard .home-social-links {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .home-dashboard .content.home-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .home-dashboard #calendar-stack,
  .home-dashboard #insights-stack,
  .home-dashboard .home-social-links {
    grid-column: span 1;
  }
}

.stack-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-dashboard .stack-panel .panel-head {
  margin-bottom: 2px;
}

.home-dashboard .stack-panel .panel-block {
  padding: 14px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 15px;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-head.compact {
  margin-top: 12px;
  margin-bottom: 10px;
}

.panel h2 {
  margin: 0;
  color: var(--text);
}

.count {
  background: rgba(255, 104, 2, 0.12);
  color: var(--ccs-orange);
  border: 1px solid rgba(255, 104, 2, 0.25);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.support-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.support-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 104, 2, 0.5);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.support-logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: #000;
  display: grid;
  place-items: center;
  padding: 10px;
  overflow: hidden;
}

.support-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.support-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.support-title {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}

.support-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.quote-card {
  padding: 12px 6px 6px;
}

.quote-text {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text);
}

.quote-author {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.status-success {
  color: #1f7a3a;
  font-weight: 700;
}

.status-error {
  color: #b32828;
  font-weight: 700;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border-radius: 12px;
}

.job-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.job-table th,
.job-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.job-table td.cell-actions {
  white-space: nowrap;
}

.job-table th {
  background: var(--panel-soft);
  position: sticky;
  top: 0;
  z-index: 1;
}

.receipt-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  cursor: pointer;
}

.receipt-description {
  max-width: 420px;
}

.receipt-actions {
  padding: 10px 8px;
  position: relative;
}

.receipt-actions-inner {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  min-height: 36px;
  position: absolute;
  top: 50%;
  left: 8px;
  right: 8px;
  transform: translateY(-50%);
}

.icon-button {
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.icon-button:hover {
  filter: brightness(0.98);
}

.icon-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.status-pill.receipt-status-pending {
  background: rgba(255, 193, 7, 0.18);
  color: #b77900;
  border-color: rgba(255, 193, 7, 0.4);
}

.status-pill.receipt-status-approved {
  background: rgba(76, 175, 80, 0.18);
  color: #2e7d32;
  border-color: rgba(76, 175, 80, 0.45);
}

.status-pill.receipt-status-filed {
  background: rgba(33, 150, 243, 0.18);
  color: #1e6cc0;
  border-color: rgba(33, 150, 243, 0.45);
}

.status-pill.receipt-status-reimbursed {
  background: rgba(0, 150, 136, 0.18);
  color: #00796b;
  border-color: rgba(0, 150, 136, 0.45);
}

.ticket-row.status-open .status-pill {
  background: rgba(255, 193, 7, 0.18);
  color: #b77900;
  border-color: rgba(255, 193, 7, 0.4);
}

.ticket-row.status-open {
  background: rgba(255, 193, 7, 0.06);
}

.ticket-row.status-investigating .status-pill {
  background: rgba(126, 87, 194, 0.18);
  color: #6a45b8;
  border-color: rgba(126, 87, 194, 0.45);
}

.ticket-row.status-investigating {
  background: rgba(126, 87, 194, 0.06);
}

.ticket-row.status-in-progress .status-pill {
  background: rgba(33, 150, 243, 0.18);
  color: #1e6cc0;
  border-color: rgba(33, 150, 243, 0.45);
}

.ticket-row.status-in-progress {
  background: rgba(33, 150, 243, 0.06);
}

.ticket-row.status-complete .status-pill {
  background: rgba(76, 175, 80, 0.18);
  color: #2e7d32;
  border-color: rgba(76, 175, 80, 0.45);
}

.ticket-row.status-complete {
  background: rgba(76, 175, 80, 0.06);
}

.ticket-row.status-completed .status-pill {
  background: rgba(76, 175, 80, 0.18);
  color: #2e7d32;
  border-color: rgba(76, 175, 80, 0.45);
}

.ticket-row.status-completed {
  background: rgba(76, 175, 80, 0.06);
}

.ticket-row.status-cancelled .status-pill {
  background: rgba(244, 67, 54, 0.18);
  color: #b71c1c;
  border-color: rgba(244, 67, 54, 0.45);
}

.ticket-row.status-cancelled {
  background: rgba(244, 67, 54, 0.06);
}

.walkthrough-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 400px));
  gap: 12px;
  justify-content: flex-start;
}

.walkthrough-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 140px;
}

.walkthrough-card.active {
  border-color: var(--btn-primary-border);
}

.walkthrough-card.not-in-scope {
  opacity: 0.75;
}

.walkthrough-card.status-not-added {
  background: var(--btn-danger-soft-bg);
  border-color: var(--btn-danger-border);
}

.walkthrough-card.status-pending {
  background: var(--btn-warning-soft-bg);
  border-color: var(--btn-warning-border);
}

.walkthrough-card.status-reviewed {
  background: var(--btn-success-soft-bg);
  border-color: var(--btn-success-border);
}

.walkthrough-card.status-needs-attention {
  background: var(--btn-warning-soft-bg);
  border-color: var(--btn-warning-border);
}

.walkthrough-card.status-assigned-for-resolution {
  background: rgba(30, 136, 229, 0.16);
  border-color: rgba(30, 136, 229, 0.45);
}

.walkthrough-card.status-resolved {
  background: var(--btn-success-soft-bg);
  border-color: var(--btn-success-border);
}

.walkthrough-card.status-not-in-scope {
  background: rgba(244, 67, 54, 0.14);
  border-color: rgba(244, 67, 54, 0.45);
}

.walkthrough-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.walkthrough-card-status {
  display: flex;
  justify-content: center;
  margin: -14px -14px 4px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.walkthrough-card-status .status-pill {
  border: none;
  background: transparent;
  color: inherit;
}

.walkthrough-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

.walkthrough-card-actions .cta {
  flex: 1 1 100%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.walkthrough-card-actions .cta.walkthrough-primary-action {
  flex: 1 1 auto;
}

.walkthrough-card-actions .cta.walkthrough-create-new {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 12px;
  font-size: 12px;
  margin-left: auto;
}

.walkthrough-add {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
  justify-content: flex-start;
}

.walkthrough-add input {
  min-width: 0;
  flex: 1 1 auto;
}

.walkthrough-add .cta {
  flex: 0 0 auto;
  margin-top: 0;
}

.walkthrough-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.walkthrough-meta-label {
  font-weight: 700;
}

.walkthrough-prepared {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.walkthrough-completed-meta {
  margin-top: 8px;
}

.walkthrough-prepared-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 104, 2, 0.12);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.walkthrough-prepared-avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.walkthrough-completed-by {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.walkthrough-completed-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 104, 2, 0.12);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
}

.walkthrough-completed-avatar.has-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.walkthrough-date-display {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.walkthrough-date-display .bi {
  font-size: 14px;
}

.walkthrough-complete-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin: 10px 0 2px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(76, 175, 80, 0.45);
  background: rgba(76, 175, 80, 0.16);
  color: #2e7d32;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
}

.walkthrough-complete-chip[hidden] {
  display: none !important;
}

.walkthrough-complete-chip::before {
  content: "\F26B";
  font-family: "bootstrap-icons";
  font-size: 14px;
  line-height: 1;
}

.walkthrough-item-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.walkthrough-photo-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.walkthrough-photo-card {
  border: 1px solid var(--border);
  background: var(--panel-soft);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.walkthrough-photo-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #111;
}

.walkthrough-photo-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.walkthrough-photo-view {
  flex: 1 1 auto;
  margin-top: 0;
}

.walkthrough-photo-empty {
  margin: 0;
  grid-column: 1 / -1;
}

.item-markup-link-btn {
  margin-top: 0;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.2;
}

.walkthrough-floorplan-btn {
  margin-top: 0;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.modal.modal-wide.floorplan-modal {
  width: min(1700px, 97vw);
  max-height: calc(100vh - 24px);
  height: calc(100vh - 24px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal.modal-wide.floorplan-modal .modal-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.floorplan-stage {
  height: 100%;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.floorplan-stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}

.modal.modal-wide.markup-modal {
  width: min(1700px, 97vw);
  max-height: calc(100vh - 24px);
  height: calc(100vh - 24px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.markup-modal .modal-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.markup-stage {
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.markup-stage canvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  border-radius: 10px;
  background: #fff;
}

.signature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.signature-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.signature-pad {
  width: 100%;
  height: 160px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  touch-action: none;
}

.walkthrough-card.reviewed {
  background: rgba(255, 104, 2, 0.12);
  border-color: rgba(255, 104, 2, 0.35);
}

.status-pill.status-reviewed {
  background: rgba(76, 175, 80, 0.22);
  color: #2e7d32;
  border-color: rgba(76, 175, 80, 0.45);
}

.status-pill.status-needs-attention {
  background: rgba(255, 193, 7, 0.2);
  color: #b77900;
  border-color: rgba(255, 193, 7, 0.45);
}

.status-pill.status-assigned {
  background: rgba(30, 136, 229, 0.2);
  color: #155fa0;
  border-color: rgba(30, 136, 229, 0.45);
}

.status-pill.status-resolved {
  background: rgba(76, 175, 80, 0.22);
  color: #2e7d32;
  border-color: rgba(76, 175, 80, 0.45);
}

.status-pill.status-complete,
.status-pill.status-completed {
  background: rgba(76, 175, 80, 0.22);
  color: #2e7d32;
  border-color: rgba(76, 175, 80, 0.45);
}

.status-pill.status-pending {
  background: rgba(255, 193, 7, 0.2);
  color: #b77900;
  border-color: rgba(255, 193, 7, 0.45);
}

.status-pill.status-not-added {
  background: rgba(244, 67, 54, 0.22);
  color: #b71c1c;
  border-color: rgba(244, 67, 54, 0.45);
}

.status-pill.status-danger {
  background: rgba(244, 67, 54, 0.18);
  color: #b71c1c;
  border-color: rgba(244, 67, 54, 0.45);
}

.status-pill.walkthrough-submitted {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(120, 120, 120, 0.18);
  color: #4a4a4a;
  border-color: rgba(120, 120, 120, 0.4);
}

.status-pill.walkthrough-submitted .bi {
  font-size: 12px;
  line-height: 1;
}

.status-pill.walkthrough-submitted.walkthrough-status-needs-attention {
  background: rgba(255, 193, 7, 0.2);
  color: #b77900;
  border-color: rgba(255, 193, 7, 0.45);
}

.status-pill.walkthrough-submitted.walkthrough-status-assigned {
  background: rgba(30, 136, 229, 0.2);
  color: #155fa0;
  border-color: rgba(30, 136, 229, 0.45);
}

.status-pill.walkthrough-submitted.walkthrough-status-complete,
.status-pill.walkthrough-submitted.walkthrough-status-completed {
  background: rgba(76, 175, 80, 0.2);
  color: #2e7d32;
  border-color: rgba(76, 175, 80, 0.45);
}

.status-pill.walkthrough-status-open {
  background: rgba(255, 193, 7, 0.18);
  color: #b77900;
  border-color: rgba(255, 193, 7, 0.4);
}

.walkthrough-row.status-open .status-pill {
  background: rgba(255, 193, 7, 0.18);
  color: #b77900;
  border-color: rgba(255, 193, 7, 0.4);
}

.walkthrough-row.status-open {
  background: rgba(255, 193, 7, 0.06);
}

.walkthrough-row.status-submitted .status-pill {
  background: rgba(76, 175, 80, 0.18);
  color: #2e7d32;
  border-color: rgba(76, 175, 80, 0.45);
}

.walkthrough-row.status-submitted {
  background: rgba(76, 175, 80, 0.06);
}

.walkthrough-row.status-needs-attention .status-pill {
  background: rgba(255, 193, 7, 0.2);
  color: #b77900;
  border-color: rgba(255, 193, 7, 0.45);
}

.walkthrough-row.status-needs-attention {
  background: rgba(255, 193, 7, 0.08);
}

.walkthrough-row.status-assigned .status-pill {
  background: rgba(30, 136, 229, 0.2);
  color: #155fa0;
  border-color: rgba(30, 136, 229, 0.45);
}

.walkthrough-row.status-assigned {
  background: rgba(30, 136, 229, 0.08);
}

.walkthrough-row.status-complete .status-pill,
.walkthrough-row.status-completed .status-pill {
  background: rgba(76, 175, 80, 0.2);
  color: #2e7d32;
  border-color: rgba(76, 175, 80, 0.45);
}

.walkthrough-row.status-complete,
.walkthrough-row.status-completed {
  background: rgba(76, 175, 80, 0.08);
}

.confirm-sign-list {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  max-height: 280px;
  overflow: auto;
}

.confirm-sign-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.confirm-sign-items li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
}

.status-pill.danger {
  background: rgba(244, 67, 54, 0.18);
  color: #b71c1c;
  border-color: rgba(244, 67, 54, 0.45);
}

.vacation-remaining {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin: 6px 0;
}

.vacation-balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cta.small-btn {
  padding: 6px 10px;
  font-size: 12px;
}

.vacation-row.status-pending .status-pill {
  background: rgba(255, 193, 7, 0.18);
  color: #b77900;
  border-color: rgba(255, 193, 7, 0.4);
}

.vacation-row.status-pending {
  background: rgba(255, 193, 7, 0.06);
}

.vacation-row.status-approved .status-pill {
  background: rgba(46, 125, 50, 0.18);
  color: #2e7d32;
  border-color: rgba(46, 125, 50, 0.35);
}

.vacation-row.status-approved {
  background: rgba(46, 125, 50, 0.06);
}

.vacation-row.status-denied .status-pill {
  background: rgba(244, 67, 54, 0.18);
  color: #b71c1c;
  border-color: rgba(244, 67, 54, 0.35);
}

.vacation-row.status-denied {
  background: rgba(244, 67, 54, 0.06);
}

.vacation-row.status-cancelled .status-pill {
  background: rgba(117, 117, 117, 0.18);
  color: #424242;
  border-color: rgba(117, 117, 117, 0.35);
}

.vacation-row.status-cancelled {
  background: rgba(117, 117, 117, 0.08);
}

.vacation-row {
  cursor: pointer;
}

.vacation-calendar-modal {
  max-width: min(95vw, 1100px);
}

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.calendar-toolbar h3 {
  margin: 0;
}

.calendar-legend {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}

.legend-dot.pending { background: #f5a623; }
.legend-dot.approved { background: #2e7d32; }
.legend-dot.denied { background: #b71c1c; }
.legend-dot.cancelled { background: #757575; }

.vacation-calendar {
  overflow-x: auto;
  padding-bottom: 8px;
}

.calendar-grid {
  min-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-row {
  display: grid;
  grid-template-columns: 180px repeat(31, minmax(20px, 1fr));
  align-items: center;
  gap: 6px 4px;
}

.calendar-row.calendar-header {
  font-size: 12px;
  color: var(--muted);
}

.calendar-cell.label {
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calendar-cell.day {
  text-align: center;
  padding: 6px 0;
  border-radius: 8px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
}

.calendar-cell.day.inactive {
  opacity: 0.4;
}

.calendar-bar-wrap {
  display: grid;
  grid-template-columns: repeat(31, minmax(20px, 1fr));
  grid-column: 2 / span 31;
}

.calendar-bar {
  height: 28px;
  border-radius: 12px;
  padding: 4px 8px;
  font-size: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-bar.status-pending { background: #f5a623; }
.calendar-bar.status-approved { background: #2e7d32; }
.calendar-bar.status-denied { background: #b71c1c; }
.calendar-bar.status-cancelled { background: #757575; }

.calendar-empty {
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.email-row.status-queued .status-pill,
.email-row.status-sending .status-pill {
  background: rgba(255, 104, 2, 0.16);
  color: #ff6802;
  border-color: rgba(255, 104, 2, 0.35);
}

.email-row.status-queued,
.email-row.status-sending {
  background: rgba(255, 104, 2, 0.06);
}

.email-row.status-sent .status-pill,
.email-row.status-delivered .status-pill,
.email-row.status-opened .status-pill,
.email-row.status-clicked .status-pill {
  background: rgba(46, 125, 50, 0.16);
  color: #2e7d32;
  border-color: rgba(46, 125, 50, 0.35);
}

.email-row.status-sent,
.email-row.status-delivered,
.email-row.status-opened,
.email-row.status-clicked {
  background: rgba(46, 125, 50, 0.06);
}

.email-row.status-bounced .status-pill,
.email-row.status-failed .status-pill,
.email-row.status-rejected .status-pill,
.email-row.status-complaint .status-pill {
  background: rgba(244, 67, 54, 0.14);
  color: #b71c1c;
  border-color: rgba(244, 67, 54, 0.35);
}

.email-row.status-bounced,
.email-row.status-failed,
.email-row.status-rejected,
.email-row.status-complaint {
  background: rgba(244, 67, 54, 0.06);
}

.email-row.status-deferred .status-pill {
  background: rgba(66, 165, 245, 0.16);
  color: #1565c0;
  border-color: rgba(66, 165, 245, 0.35);
}

.email-row.status-deferred {
  background: rgba(66, 165, 245, 0.06);
}

.push-sub-row.status-active .status-pill {
  background: rgba(46, 125, 50, 0.16);
  color: #2e7d32;
  border-color: rgba(46, 125, 50, 0.35);
}

.push-sub-row.status-active {
  background: rgba(46, 125, 50, 0.05);
}

.push-sub-row.status-inactive .status-pill {
  background: rgba(117, 117, 117, 0.16);
  color: #535353;
  border-color: rgba(117, 117, 117, 0.35);
}

.push-sub-row.status-inactive {
  background: rgba(117, 117, 117, 0.05);
}

.receipt-row.status-pending {
  background: rgba(255, 193, 7, 0.06);
}

.receipt-row.status-approved {
  background: rgba(76, 175, 80, 0.06);
}

.receipt-row.status-filed {
  background: rgba(33, 150, 243, 0.06);
}

.receipt-row.status-reimbursed {
  background: rgba(0, 150, 136, 0.06);
}

.quote-row.status-open,
.saved-quote-row.status-open {
  background: rgba(255, 193, 7, 0.06);
}

.quote-row.status-sold,
.saved-quote-row.status-sold {
  background: rgba(76, 175, 80, 0.06);
}

.ticket-row.status-pending .status-pill {
  background: rgba(255, 104, 2, 0.18);
  color: #ff6802;
  border-color: rgba(255, 104, 2, 0.45);
}

.ticket-row.status-pending {
  background: rgba(255, 104, 2, 0.06);
}

.ticket-row {
  cursor: pointer;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.photo-grid img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.photo-thumb img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.photo-grid button,
.photo-thumb {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.comment-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--panel-soft);
  display: grid;
  gap: 8px;
}

.comment-card .photo-grid {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.comment-card .photo-grid img {
  height: 72px;
}

.comment-meta {
  font-size: 12px;
  color: var(--muted);
}

.modal .form-group select,
.modal select {
  min-height: 42px;
}

.modal input[type="file"]::file-selector-button {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 10px;
}

.modal input[type="file"]::file-selector-button:hover {
  filter: brightness(0.98);
}

.image-viewer {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  max-width: min(90vw, 960px);
  max-height: 90vh;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.image-viewer img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 12px;
  object-fit: contain;
}

.assignee-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0 0;
}

.assignee-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-soft);
  min-height: 42px;
  position: relative;
  overflow: visible;
}

.assignee-input input {
  border: none;
  background: transparent;
  flex: 1;
  min-width: 180px;
  padding: 6px 4px;
  color: var(--text);
}

.assignee-input input:focus {
  outline: none;
}

.assignee-input input::placeholder {
  color: var(--muted);
}

.assignee-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.assignee-tag {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.assignee-tag img {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.assignee-tag span {
  font-size: 14px;
  opacity: 0.7;
}

.assignee-options {
  list-style: none;
  margin: 6px 0 0;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  max-height: 220px;
  overflow: auto;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 10;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.assignee-input.assignee-dropup .assignee-options {
  top: auto;
  bottom: calc(100% + 6px);
  margin: 0 0 6px;
}

.assignee-options li {
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.assignee-options img {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.assignee-options li.active,
.assignee-options li:hover {
  background: var(--panel-soft);
}

.assignee-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
}

.assignee-chip input {
  margin: 0;
}

.pdf-ticket {
  font-family: 'Montserrat', Arial, sans-serif;
  color: #111;
  padding: 24px 28px;
}

.pdf-ticket .pdf-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.pdf-ticket .pdf-logo {
  width: 140px;
  height: auto;
}

.pdf-ticket .pdf-section {
  margin-bottom: 16px;
}

.pdf-ticket .pdf-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

.pdf-ticket .pdf-photo-grid img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.pdf-receipts {
  font-family: 'Montserrat', Arial, sans-serif;
  color: #111;
  padding: 24px 28px;
}

.pdf-receipts .pdf-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.pdf-receipts .pdf-logo {
  width: 160px;
  height: auto;
}

.pdf-receipt-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  margin-bottom: 12px;
}

.pdf-receipt-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: #f6f6f6;
}

.pdf-receipt-placeholder {
  width: 100%;
  height: 120px;
  border-radius: 10px;
  border: 1px dashed #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #666;
}

.pdf-ticket .pdf-comment {
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
  background: #fafafa;
}

.job-manager .content {
  max-width: 100%;
  width: 100%;
  height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}

body.estimate-page .content {
  height: auto;
  min-height: calc(100vh - 40px);
  padding-bottom: 440px;
}

.job-manager .job-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.job-manager .job-panel .table-wrapper {
  flex: 1;
  overflow: auto;
}

.job-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.job-table th.sortable {
  cursor: pointer;
}

.job-table th.sortable.sorted {
  color: var(--text);
}

.job-table th.sortable.sorted::after {
  margin-left: 6px;
  font-size: 12px;
  opacity: 0.6;
}

.job-table th.sortable.sorted-asc::after {
  content: '▲';
}

.job-table th.sortable.sorted-desc::after {
  content: '▼';
}

.job-table th.sortable::after {
  content: '';
  margin-left: 6px;
  font-size: 12px;
  color: var(--muted);
}

.job-table th.sortable[data-dir="asc"]::after {
  content: '▲';
}

.job-table th.sortable[data-dir="desc"]::after {
  content: '▼';
}

.status-select.status-lead {
  background: rgba(126, 87, 194, 0.18);
  color: #6a45b8;
  border-color: rgba(126, 87, 194, 0.45);
}

.status-select.status-progress {
  background: rgba(255, 193, 7, 0.18);
  color: #b77900;
  border-color: rgba(255, 193, 7, 0.4);
}

.status-select.status-complete {
  background: rgba(76, 175, 80, 0.18);
  color: #2e7d32;
  border-color: rgba(76, 175, 80, 0.45);
}

.status-select.status-dead {
  background: rgba(244, 67, 54, 0.18);
  color: #b71c1c;
  border-color: rgba(244, 67, 54, 0.45);
}

.status-select.status-pink {
  background: rgba(255, 77, 157, 0.18);
  color: #c2185b;
  border-color: rgba(255, 77, 157, 0.45);
}

.status-select.status-bright-orange {
  background: rgba(255, 104, 2, 0.18);
  color: #ff6802;
  border-color: rgba(255, 104, 2, 0.45);
}

.status-pill.crm-purple {
  background: rgba(126, 87, 194, 0.18);
  color: #6a45b8;
  border-color: rgba(126, 87, 194, 0.45);
}

.status-pill.crm-orange {
  background: rgba(255, 193, 7, 0.18);
  color: #b77900;
  border-color: rgba(255, 193, 7, 0.4);
}

.status-pill.crm-green {
  background: rgba(76, 175, 80, 0.18);
  color: #2e7d32;
  border-color: rgba(76, 175, 80, 0.45);
}

.status-pill.crm-red {
  background: rgba(244, 67, 54, 0.18);
  color: #b71c1c;
  border-color: rgba(244, 67, 54, 0.45);
}

.status-pill.crm-pending {
  background: rgba(255, 77, 157, 0.2);
  color: #ff4d9d;
  border-color: rgba(255, 77, 157, 0.45);
}

.status-pill.crm-needs-followup {
  background: rgba(255, 104, 2, 0.2);
  color: #ff6802;
  border-color: rgba(255, 104, 2, 0.5);
}

.job-row.status-purple {
  background: rgba(126, 87, 194, 0.06);
}

.job-row.status-orange {
  background: rgba(255, 193, 7, 0.06);
}

.job-row.status-green {
  background: rgba(76, 175, 80, 0.06);
}

.job-row.status-red {
  background: rgba(244, 67, 54, 0.06);
}

.job-row.status-pink {
  background: rgba(255, 77, 157, 0.08);
}

.job-row.status-bright-orange {
  background: rgba(255, 104, 2, 0.08);
}

@media (max-width: 900px) {
  body.job-manager {
    overflow-y: auto;
  }

  .settings-tabs {
    width: 100%;
  }

  .settings-tab-button {
    flex: 1 1 160px;
    justify-content: center;
  }

  .job-manager .content {
    height: auto;
    min-height: calc(100vh - 40px);
  }

  body.estimate-page .content {
    padding-bottom: 360px;
  }

  .job-manager .job-panel {
    flex: 0 0 auto;
  }

  .job-manager .job-panel .table-wrapper {
    max-height: none;
  }

  .job-manager .job-panel {
    padding-left: 0;
    padding-right: 0;
  }

  .job-manager .job-panel .panel-head {
    padding: 0 12px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .job-tools {
    flex-wrap: wrap;
    width: 100%;
  }

  .job-tools .cta {
    padding: 6px 10px;
    font-size: 13px;
  }

  .job-tools .search-box input,
  .job-tools input[type="search"] {
    padding: 8px 10px;
    font-size: 13px;
  }

  .job-tools .count {
    padding: 4px 8px;
    font-size: 12px;
  }

  .job-table {
    font-size: 12px;
  }

  .job-table th,
  .job-table td {
    padding: 8px 6px;
  }

  .status-pill {
    padding: 3px 8px;
    font-size: 11px;
  }
}

@media (max-width: 600px) {
  .job-manager .content {
    gap: 14px;
  }

  body.estimate-page .content {
    padding-bottom: 300px;
  }

  .job-table {
    font-size: 11px;
  }

  .modal.modal-wide,
  .modal {
    width: 100vw;
    max-width: 100vw;
    border-radius: 0;
    max-height: 100vh;
  }

  .modal.modal-wide {
    padding-right: 18px;
  }

  .modal-close {
    top: 8px;
    right: 8px;
  }

  .modal-header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ticket-row {
    cursor: pointer;
  }

}

@media (max-width: 760px) {
  .table-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 12px;
    background: var(--panel);
    border: 1px solid var(--border);
  }

  .job-table.mobile-hybrid-table {
    min-width: 0;
    border-collapse: collapse;
    border-spacing: 0;
    background: var(--panel);
    table-layout: fixed;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active thead {
    display: none;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    overflow: hidden;
    margin: 0;
    box-shadow: 0 10px 24px rgba(10, 14, 20, 0.08);
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active tr.mobile-detail-row-generated {
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active th,
  .job-table.mobile-hybrid-table.mobile-hybrid-active td {
    display: block;
    width: 100%;
    padding: 0;
    border-bottom: none;
    white-space: normal;
    word-break: break-word;
    background: transparent;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active td.mobile-col-visible {
    display: grid;
    grid-template-columns: minmax(88px, 34%) 1fr;
    gap: 10px;
    align-items: start;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(128, 138, 154, 0.16);
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active td.mobile-col-visible::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1.25;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active td.mobile-primary-cell {
    font-size: 14px;
    font-weight: 600;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active td.mobile-primary-cell::before {
    color: var(--ccs-orange);
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active td.mobile-secondary-cell {
    background: rgba(255, 255, 255, 0.02);
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active th.mobile-col-hidden,
  .job-table.mobile-hybrid-table.mobile-hybrid-active td.mobile-col-hidden {
    display: none !important;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active td.cell-actions,
  .job-table.mobile-hybrid-table.mobile-hybrid-active th.cell-actions {
    white-space: normal;
    width: auto;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active td.cell-actions .cta {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active td.cell-actions .receipt-actions-inner {
    position: static;
    inset: auto;
    transform: none;
    min-height: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active td.mobile-actions-cell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: none;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active td.mobile-actions-cell::before {
    content: none !important;
    display: none !important;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active td input,
  .job-table.mobile-hybrid-table.mobile-hybrid-active td select,
  .job-table.mobile-hybrid-table.mobile-hybrid-active td textarea,
  .job-table.mobile-hybrid-table.mobile-hybrid-active td .status-pill {
    max-width: 100%;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active .receipt-thumb {
    width: 56px;
    height: 56px;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active .icon-button {
    width: 32px;
    height: 32px;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active .mobile-row-toggle {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--panel-soft);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 8px;
    padding: 0;
    vertical-align: middle;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active .mobile-row-toggle i {
    transition: transform 0.16s ease;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active tr.mobile-expanded .mobile-row-toggle i {
    transform: rotate(180deg);
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active tr.mobile-expanded {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active tr.mobile-detail-row-generated td {
    background: transparent;
    border: none;
    padding: 0;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active .mobile-detail-grid {
    display: grid;
    gap: 8px;
    padding: 10px 12px 12px;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 16px 16px;
    background: rgba(0, 0, 0, 0.02);
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active .mobile-detail-item {
    display: grid;
    grid-template-columns: minmax(84px, 34%) 1fr;
    gap: 8px;
    align-items: start;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active .mobile-detail-label {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1.25;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active .mobile-detail-value {
    color: var(--text);
    font-size: 13px;
    line-height: 1.35;
    word-break: break-word;
  }

  .job-table.mobile-hybrid-table.mobile-hybrid-active tr > td[colspan] {
    padding: 14px;
    border: none;
    background: transparent;
  }
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1f7a3a;
  border: 1px solid #2d9a4d;
  box-shadow: var(--shadow);
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 700;
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 360;
}

.toast.error {
  background: #8f2a2a;
  border-color: #c44545;
}

.toast.info {
  background: #2b3446;
  border-color: #3b4a63;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.topbar-hub-toast-stack {
  position: fixed;
  top: calc(var(--top-nav-height, 72px) + 14px);
  right: 20px;
  z-index: 260;
  width: min(420px, calc(100vw - 24px));
  max-width: min(420px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.topbar-hub-toast {
  position: relative;
  inset: auto;
  right: auto;
  top: auto;
  bottom: auto;
  margin: 0;
  width: 100%;
  max-width: 100%;
  pointer-events: auto;
  background: var(--panel);
  border: 1px solid rgba(255, 104, 2, 0.45);
  color: var(--text);
  padding: 12px;
  border-radius: 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
}

.topbar-hub-toast .topbar-hub-toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 104, 2, 0.35);
  background: rgba(255, 104, 2, 0.12);
  color: var(--ccs-orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.topbar-hub-toast .topbar-hub-toast-content {
  min-width: 0;
}

.topbar-hub-toast .topbar-hub-toast-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.topbar-hub-toast .topbar-hub-toast-desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.topbar-hub-toast .topbar-hub-toast-actions {
  margin-top: 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  pointer-events: auto;
}

.topbar-hub-toast .topbar-hub-toast-btn {
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.topbar-hub-toast .topbar-hub-toast-btn.primary {
  border-color: rgba(255, 104, 2, 0.45);
  background: rgba(255, 104, 2, 0.16);
  color: var(--ccs-orange);
}

.topbar-hub-toast .topbar-hub-toast-btn:hover {
  filter: brightness(0.98);
}

.topbar-hub-toast .topbar-hub-toast-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.site-push-optin {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 255;
  width: min(360px, calc(100vw - 24px));
  border-radius: 14px;
  border: 1px solid rgba(255, 104, 2, 0.38);
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-push-optin.show {
  opacity: 1;
  transform: translateY(0);
}

.site-push-optin-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid rgba(255, 104, 2, 0.32);
  background: rgba(255, 104, 2, 0.12);
  color: var(--ccs-orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.site-push-optin-copy {
  min-width: 0;
}

.site-push-optin-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.site-push-optin-desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.site-push-optin-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.site-push-optin-btn {
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.site-push-optin-btn.primary {
  border-color: rgba(255, 104, 2, 0.45);
  background: rgba(255, 104, 2, 0.16);
  color: var(--ccs-orange);
}

.site-push-optin-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .site-push-optin {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}

.bizcard-qr {
  margin: 10px auto;
  width: 200px;
  height: 200px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.bizcard-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bizcard-qr canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.card-page .content {
  max-width: 520px;
}

.card-panel {
  text-align: center;
  padding: 24px 20px;
}

.card-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.card-logo img {
  width: 140px;
  height: auto;
}

.card-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--panel-soft);
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 32px;
  color: var(--muted);
  overflow: hidden;
}

.card-avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-name {
  margin: 0;
  font-size: 24px;
  color: var(--text);
}

.card-meta {
  margin: 6px 0 16px;
  color: var(--muted);
}

.card-contacts {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  color: var(--text);
}

.contact-row {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
}

.card-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.ticket-list {
  display: grid;
  gap: 12px;
}

.ticket-card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.ticket-header h3 {
  margin: 0;
  font-size: 16px;
  color: var(--text);
}

.ticket-comment {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  font-size: 14px;
  background: var(--panel);
  color: var(--text);
  resize: vertical;
}

.ticket-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.proposal-row.status-draft .status-pill {
  background: rgba(158, 158, 158, 0.2);
  color: #616161;
  border-color: rgba(158, 158, 158, 0.45);
}

.proposal-row.status-draft {
  background: rgba(158, 158, 158, 0.06);
}

.proposal-row.status-estimating .status-pill {
  background: rgba(255, 104, 2, 0.2);
  color: #ff6802;
  border-color: rgba(255, 104, 2, 0.45);
}

.proposal-row.status-estimating {
  background: rgba(255, 104, 2, 0.08);
}

.proposal-row.status-estimate-locked .status-pill {
  background: rgba(76, 175, 80, 0.2);
  color: #2e7d32;
  border-color: rgba(76, 175, 80, 0.45);
}

.proposal-row.status-estimate-locked {
  background: rgba(76, 175, 80, 0.07);
}

.proposal-modal .modal-body,
.estimate-modal .modal-body {
  display: grid;
  gap: 14px;
}

.proposal-upload-block {
  display: grid;
  gap: 10px;
}

.proposal-upload-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
}

.proposal-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.proposal-image-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-soft);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.proposal-image-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: pointer;
}

.proposal-image-card textarea {
  width: 100%;
  min-height: 52px;
  resize: vertical;
}

.proposal-image-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.proposal-actions-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}

.lookup-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lookup-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.lookup-tab {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}

.lookup-tab.active {
  border-color: rgba(255, 104, 2, 0.4);
  background: rgba(255, 104, 2, 0.12);
  color: var(--ccs-orange);
}

.lookup-pane {
  display: none;
}

.lookup-pane.active {
  display: block;
}

.lookup-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.lookup-table-wrapper {
  max-height: 440px;
  overflow: auto;
  overflow-x: auto;
}

.lookup-table td {
  vertical-align: top;
}

.lookup-table {
  min-width: 1100px;
}

.lookup-input {
  width: 100%;
  min-width: 140px;
}

.lookup-archived td {
  opacity: 0.6;
}

.lookup-actions-cell {
  white-space: nowrap;
  min-width: 180px;
  text-align: left;
}

.lookup-actions-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dashboard-grid {
  display: grid;
  gap: 16px;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.dashboard-card {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.dashboard-card.alert {
  border-color: rgba(255, 104, 2, 0.35);
  background: rgba(255, 104, 2, 0.08);
}

.dashboard-card h3 {
  margin: 6px 0 0;
  font-size: 20px;
}

.trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-height: 140px;
  padding: 8px 4px 20px;
}

.trend-bar {
  flex: 1;
  background: rgba(255, 104, 2, 0.5);
  border-radius: 6px 6px 2px 2px;
  position: relative;
}

.trend-label {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.dashboard-split {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.dashboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.dashboard-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
}

.dashboard-list-item .muted {
  display: block;
  font-size: 12px;
}

.dashboard-list-item .pill {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
}

.dashboard-list-item .pill.warning {
  background: rgba(255, 104, 2, 0.15);
  color: #b75000;
}

.lookup-icon {
  width: 34px;
  height: 34px;
}

.lookup-row {
  background: var(--panel-soft);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid transparent;
}

.lookup-row.is-new {
  border-color: rgba(255, 104, 2, 0.25);
  background: rgba(255, 104, 2, 0.06);
}

.lookup-row.is-archived {
  opacity: 0.7;
}

.lookup-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.lookup-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lookup-title {
  font-weight: 700;
}

.lookup-id {
  font-size: 12px;
  color: var(--muted);
}

.lookup-status {
  font-size: 11px;
  padding: 4px 8px;
  border: 1px solid var(--border);
}

.lookup-status.active {
  background: rgba(76, 175, 80, 0.12);
  color: #2e7d32;
  border-color: rgba(76, 175, 80, 0.35);
}

.lookup-status.archived {
  background: rgba(255, 107, 107, 0.12);
  color: #b54040;
  border-color: rgba(255, 107, 107, 0.35);
}

.lookup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.lookup-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.lookup-action {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lookup-action.danger {
  border-color: var(--btn-danger-border);
  background: var(--btn-danger-soft-bg);
  color: var(--btn-danger-bg);
}

.job-table tr.low-stock td {
  background: rgba(255, 104, 2, 0.08);
}

.estimate-lines-table td textarea {
  width: 100%;
  min-height: 56px;
  resize: vertical;
}

.estimate-lines-table tr.estimate-category-row td {
  background: var(--panel-soft);
  font-weight: 700;
  padding-top: 12px;
  padding-bottom: 12px;
  border-top: 4px solid var(--ccs-orange);
}

.estimate-category-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.estimate-category-toggle {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
}

.estimate-category-title {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

.estimate-category-desc {
  width: min(520px, 100%);
}

.estimate-lines-table tr.estimate-row td:nth-child(2) {
  padding-left: 18px;
}

.estimate-lines-table tr.estimate-row td {
  vertical-align: bottom;
  transition: background-color 0.12s ease;
}

.estimate-lines-table tr.estimate-subrow td {
  padding-top: 6px;
  padding-bottom: 12px;
  background: var(--panel);
  transition: background-color 0.12s ease;
}

.estimate-lines-table tr.estimate-row:hover td,
.estimate-lines-table tr.estimate-row:hover + tr.estimate-subrow td,
.estimate-lines-table tr.estimate-row:hover + tr.estimate-subrow + tr.estimate-subrow td,
.estimate-lines-table tr.estimate-subrow:hover td,
.estimate-lines-table tr.estimate-subrow:hover + tr.estimate-subrow td,
.estimate-lines-table tr.estimate-row:has(+ tr.estimate-subrow:hover) td,
.estimate-lines-table tr.estimate-row:has(+ tr.estimate-subrow + tr.estimate-subrow:hover) td,
.estimate-lines-table tr.estimate-row:has(+ tr.estimate-subrow + tr.estimate-subrow:hover) + tr.estimate-subrow td,
.estimate-lines-table tr.estimate-row:focus-within td,
.estimate-lines-table tr.estimate-row:focus-within + tr.estimate-subrow td,
.estimate-lines-table tr.estimate-row:focus-within + tr.estimate-subrow + tr.estimate-subrow td,
.estimate-lines-table tr.estimate-subrow:focus-within td {
  background: color-mix(in srgb, var(--ccs-orange) 10%, var(--panel));
}

.estimate-lines-table tr.estimate-subrow .subrow-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.estimate-lines-table td select,
.estimate-lines-table td input,
.estimate-lines-table td textarea {
  min-width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  background: var(--panel);
  color: var(--text);
}

.estimate-lines-table th.line-select-col,
.estimate-lines-table td.line-select-cell {
  width: 44px;
  min-width: 44px;
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}

.estimate-lines-table :is(#estimate-select-all, .line-select) {
  accent-color: var(--ccs-orange);
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  min-width: 22px;
  height: 22px;
  margin: 0 auto;
  padding: 0;
  display: block;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel);
  position: relative;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.estimate-lines-table :is(#estimate-select-all, .line-select)::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.12s ease;
}

.estimate-lines-table :is(#estimate-select-all, .line-select):checked {
  background: var(--ccs-orange);
  border-color: var(--ccs-orange);
}

.estimate-lines-table :is(#estimate-select-all, .line-select):checked::after {
  transform: rotate(45deg) scale(1);
}

.estimate-lines-table :is(#estimate-select-all, .line-select):focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 104, 2, 0.28);
}

.estimate-lines-table :is(#estimate-select-all, .line-select):disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.line-code-stack {
  display: grid;
  gap: 6px;
}

.line-field-stack {
  display: grid;
  gap: 4px;
}

.line-field-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  text-align: left;
  line-height: 1.1;
  padding-left: 2px;
}

.line-field-label.is-spacer {
  visibility: hidden;
}

.line-field-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.line-field-input-wrap .line-has-unit {
  padding-right: 28px;
}

.line-field-unit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  pointer-events: none;
  line-height: 1;
}

.line-select-control {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.estimate-lines-table td.line-select-cell .line-select {
  margin: 0;
}

.line-code-picker {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.line-code-picker .line-code {
  min-width: 0;
  width: auto;
  max-width: 100%;
}

.line-title-btn {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}

.line-code-title-input {
  font-size: 13px;
}

.estimate-lines-table td input[readonly],
.estimate-lines-table td input:disabled,
.estimate-lines-table td textarea:disabled,
.estimate-lines-table td select:disabled {
  background: var(--panel-soft);
  color: var(--muted);
  cursor: not-allowed;
}

.estimate-lines-table td input.line-cost {
  background: color-mix(in srgb, var(--ccs-orange) 9%, var(--panel));
  border-color: color-mix(in srgb, var(--ccs-orange) 30%, var(--border));
}

.estimate-lines-table td input.line-cost:focus {
  background: color-mix(in srgb, var(--ccs-orange) 13%, var(--panel));
}

.multi-select {
  position: relative;
}

.multi-select-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.multi-select-toggle.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.multi-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, 85vw);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 10px;
  z-index: 6;
  display: none;
}

.multi-select-menu.show {
  display: block;
}

.multi-select-search input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  background: var(--panel);
  color: var(--text);
}

.multi-select-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  max-height: 260px;
  overflow: auto;
  content-visibility: auto;
  contain: content;
}

.estimate-code-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.95fr);
  gap: 16px;
  align-items: start;
  min-height: 0;
}

.estimate-code-selector {
  min-width: 0;
}

.estimate-code-tree-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-soft);
  padding: 10px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  min-height: 0;
}

.estimate-code-tree-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.estimate-code-tree-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  padding: 8px;
  max-height: 62vh;
  overflow: auto;
}

.estimate-code-tree {
  font-size: 13px;
  color: var(--text);
}

.estimate-code-tree.empty {
  color: var(--muted);
  padding: 8px;
}

.estimate-code-tree-root,
.estimate-code-tree-children {
  list-style: none;
  margin: 0;
  padding: 0;
}

.estimate-code-tree-root {
  display: grid;
  gap: 8px;
}

.estimate-code-tree-category {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-soft);
  overflow: hidden;
}

.estimate-code-tree-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.estimate-code-tree-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 104, 2, 0.35);
  background: rgba(255, 104, 2, 0.12);
  color: #ff6802;
  font-size: 12px;
  font-weight: 700;
}

.estimate-code-tree-children {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
}

.estimate-code-tree-children li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.estimate-code-tree-children .code {
  font-weight: 600;
}

.estimate-code-tree-children .qty {
  color: var(--muted);
}

@media (max-width: 980px) {
  .estimate-code-layout {
    grid-template-columns: 1fr;
  }
}

.multi-select-option {
  border: 1px solid var(--border);
  background: var(--panel-soft);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);
}

.multi-select-main {
  min-width: 0;
  flex: 1 1 auto;
}

.multi-select-option strong {
  color: var(--text);
}

.multi-select-option .muted {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.multi-select-option .check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  background: var(--panel);
  flex: 0 0 22px;
}

.multi-select-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.multi-select-qty-wrap {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.multi-select-qty-wrap input {
  width: 64px;
  min-width: 64px;
  text-align: center;
}

.multi-select-option.selected {
  border-color: rgba(255, 104, 2, 0.4);
  background: rgba(255, 104, 2, 0.12);
}

.multi-select-option.selected span {
  font-weight: 700;
}

.multi-select-option.selected .check {
  background: var(--ccs-orange);
  color: #fff;
  border-color: var(--ccs-orange);
}

.line-code option {
  font-weight: 400;
}

.line-code option:checked {
  font-weight: 700;
}

.line-code.has-selection {
  font-weight: 700;
}

.line-code.has-selection option {
  font-weight: 400;
}

.multi-select-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

@media (max-width: 900px) {
  .proposal-upload-row {
    grid-template-columns: 1fr;
  }
}

.job-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
}

.modal input[type="text"],
.modal input[type="email"],
.modal input[type="search"],
.modal input[type="number"],
.modal textarea,
.modal select,
.assignment-block input[type="text"],
.assignment-block input[type="email"],
.assignment-block input[type="search"],
.assignment-block input[type="number"],
.assignment-block textarea,
.assignment-block select {
  color: var(--text);
  background: var(--panel);
}

.modal input::placeholder,
.modal textarea::placeholder,
.assignment-block input::placeholder,
.assignment-block textarea::placeholder {
  color: var(--muted);
}

.job-input:disabled,
.job-input[readonly] {
  background: var(--panel-soft);
  color: var(--muted);
  cursor: not-allowed;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 10px;
  justify-items: center;
}

.link-icon {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: 12px;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.link-icon:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 104, 2, 0.5);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

.icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 104, 2, 0.12);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--ccs-orange);
  border: 1px solid rgba(255, 104, 2, 0.35);
}

.logo-circle {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 104, 2, 0.12);
  border: 1px solid rgba(255, 104, 2, 0.35);
  display: grid;
  place-items: center;
  padding: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.logo-mark {
  width: 80%;
  height: 80%;
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  display: block;
}

.title {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}

.name-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.link-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.muted {
  margin: 4px 0 0;
  color: var(--muted);
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.panel-block {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.ticket-locked-notice {
  background: rgba(244, 67, 54, 0.12);
  border-color: rgba(244, 67, 54, 0.35);
  color: #b71c1c;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ticket-locked-notice[hidden] {
  display: none;
}

.ticket-locked-notice strong {
  color: #d32f2f;
}

.assignee-tags.is-locked {
  opacity: 0.6;
  pointer-events: none;
}

#notification-types {
  display: block;
}

.settings-assignment-table th,
.settings-assignment-table td {
  vertical-align: middle;
}

.settings-assignment-table td.cell-actions {
  width: 120px;
}

.settings-assignee-names {
  display: block;
  max-width: 520px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.settings-assignment-modal {
  width: min(760px, 96vw);
}

.settings-assignment-modal .modal-body {
  gap: 12px;
}

.settings-assignment-modal .assignee-input {
  min-height: 58px;
}

.assignment-block {
  background: var(--panel);
  border-color: rgba(0, 0, 0, 0.08);
  padding: 16px;
}

.assignment-block .panel-head {
  margin-bottom: 12px;
}

.assignment-block .assignee-input {
  background: var(--panel-soft);
}

.security-threshold-input {
  width: 98px;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 6px 8px;
  font: inherit;
}

.security-enable-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.settings-check {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid rgba(255, 104, 2, 0.6);
  background: rgba(255, 104, 2, 0.08);
  cursor: pointer;
  position: relative;
  display: inline-grid;
  place-items: center;
  transition: all 0.15s ease;
}

.settings-check::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  transition: transform 0.12s ease;
}

.settings-check:checked {
  background: var(--ccs-orange);
  border-color: var(--ccs-orange);
}

.settings-check:checked::after {
  transform: rotate(-45deg) scale(1);
}

.settings-check:focus-visible {
  outline: 2px solid rgba(255, 104, 2, 0.45);
  outline-offset: 1px;
}

.security-monitor-row.is-disabled {
  opacity: 0.7;
}

.security-monitor-row .status-pill {
  min-width: 84px;
  justify-content: center;
}

.security-monitor-row td,
#security-events-table td {
  vertical-align: middle;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
}

.list a {
  color: var(--text);
  text-decoration: underline;
}

.list a:hover {
  color: var(--ccs-orange);
}

.event-item {
  cursor: pointer;
}

.event-item:focus {
  outline: 2px solid rgba(255, 104, 2, 0.6);
  outline-offset: 2px;
}

.pill {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--pill);
  color: var(--text);
  font-weight: 700;
}

.pill.accent {
  background: rgba(255, 104, 2, 0.12);
  color: var(--ccs-orange);
  border: 1px solid rgba(255, 104, 2, 0.35);
}

.pill.pending {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
}

.pill.cancelled {
  background: rgba(255, 0, 0, 0.12);
  color: #b00020;
  border: 1px solid rgba(255, 0, 0, 0.25);
}

.event-item.past {
  opacity: 0.55;
}

.invite-actions {
  font-size: 13px;
  margin-top: 4px;
}

.invite-actions a {
  color: var(--ccs-orange);
  text-decoration: none;
}

.invite-actions a:hover {
  text-decoration: underline;
}

.committee-block {
  margin-top: 8px;
  padding: 10px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.committee-block .list {
  margin: 0;
}

#committee-panels {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.person {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 14px;
  background: var(--panel);
  border-radius: 14px;
  border: 1px solid var(--border);
  color: var(--text);
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 104, 2, 0.12);
  color: var(--ccs-black);
  font-weight: 800;
  border: 1px solid rgba(255, 104, 2, 0.35);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(255, 104, 2, 0.12);
  color: var(--ccs-orange);
  border: 1px solid rgba(255, 104, 2, 0.25);
  font-size: 12px;
  font-weight: 700;
}

.name-email {
  color: var(--text);
  text-decoration: none;
}

.name-email:hover {
  text-decoration: underline;
}

.search {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 4px 10px;
}

.estimate-line-search {
  min-width: 220px;
}

.estimate-sticky-actions {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translate(calc(-50% + var(--estimate-sticky-shift-x, 0px)), 12px);
  width: fit-content;
  max-width: calc(100vw - 40px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: saturate(175%) blur(10px);
  -webkit-backdrop-filter: saturate(175%) blur(10px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  z-index: 215;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.estimate-sticky-actions.show {
  opacity: 1;
  transform: translate(calc(-50% + var(--estimate-sticky-shift-x, 0px)), 0);
  pointer-events: auto;
}

.estimate-sticky-search {
  flex: 0 1 240px;
  max-width: 240px;
  min-width: 180px;
}

.estimate-sticky-actions .cta {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .estimate-sticky-actions {
    width: fit-content;
    max-width: calc(100vw - 20px);
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
  }

  .estimate-sticky-search {
    flex: 0 1 200px;
    max-width: 220px;
    min-width: 140px;
  }

  .estimate-sticky-actions .cta {
    flex: 1 1 calc(50% - 4px);
    justify-content: center;
    padding: 10px 12px;
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .estimate-sticky-actions {
    width: calc(100vw - 20px);
  }

  .estimate-sticky-search {
    flex: 1 1 100%;
    max-width: none;
    min-width: 0;
  }
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 8px 4px;
  font-size: 15px;
  outline: none;
}

.search-box input::placeholder {
  color: var(--muted);
}

.shortcut {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 6px;
  background: var(--shortcut-bg);
}

.footer-note {
  margin: 12px 0 0;
  text-align: right;
  color: var(--muted);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.pagination button {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination .pages {
  color: var(--muted);
  font-size: 14px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 220;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  overscroll-behavior: contain;
}

body.has-sidebar-nav .modal-backdrop {
  inset: var(--top-nav-height) 0 0 0;
}

.modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal {
  position: relative;
  background: var(--panel);
  color: var(--text);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 18px 18px 12px;
  width: min(520px, 95vw);
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow);
  transform: translateY(-10px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  overscroll-behavior: contain;
}

.modal-backdrop.show .modal {
  opacity: 1;
  transform: translateY(0);
}

.modal.modal-wide {
  width: min(1200px, 96vw);
  max-height: 85vh;
  padding-right: 18px;
}

.feature-update-backdrop {
  z-index: 240;
}

.feature-update-modal {
  width: min(680px, 95vw);
  max-height: 88vh;
  border-top: 4px solid var(--ccs-orange);
}

.feature-update-modal .modal-close {
  top: 12px;
  right: 12px;
}

.feature-update-modal-header {
  align-items: flex-start;
  justify-content: space-between;
  padding-right: 44px;
  margin-bottom: 6px;
}

.feature-update-modal-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feature-update-modal-title-wrap .eyebrow {
  margin: 0;
}

.feature-update-modal-version {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.feature-update-modal-summary {
  margin: 0 0 12px;
  line-height: 1.5;
}

.feature-update-modal-list {
  margin: 0;
  padding: 0 0 0 18px;
  display: grid;
  gap: 8px;
}

.feature-update-modal-list li {
  line-height: 1.45;
}

.feature-update-modal-footer {
  justify-content: flex-end;
}

.modal.cost-code-modal {
  max-height: 97vh;
}

.modal.cost-code-modal .modal-body {
  max-height: 80vh;
  overflow: auto;
}

.cost-code-category-row td {
  background: rgba(255, 104, 2, 0.08);
  border-top: 2px solid rgba(255, 104, 2, 0.35);
}

.cost-code-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.cost-code-category-head strong {
  font-size: 14px;
  letter-spacing: 0.02em;
}

.cost-code-category-default {
  display: grid;
  gap: 6px;
}

.cost-code-category-default label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

.cost-code-category-default textarea {
  resize: vertical;
  min-height: 58px;
}

.modal.estimate-code-modal {
  max-height: 95vh;
}

.modal.estimate-code-modal .modal-body {
  max-height: 78vh;
  overflow: hidden;
}

.modal.estimate-code-modal .multi-select-list {
  max-height: 62vh;
  overflow: auto;
}

.modal.lookup-modal {
  width: min(1400px, 98vw);
}

.ticket-modal {
  width: 100%;
  max-width: 100%;
  padding-right: 18px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-actions.walkthrough-add {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  width: min(560px, 100%);
  margin-left: auto;
}

.header-actions.walkthrough-add .job-input {
  min-width: 0;
  flex: 1 1 auto;
}

.header-actions.walkthrough-add .cta {
  flex: 0 0 auto;
  margin-top: 0;
  white-space: nowrap;
}

.modal-link {
  color: var(--text);
  text-decoration: none;
}

.modal-link:hover {
  text-decoration: underline;
}

.job-modal .modal-header {
  background: var(--panel-soft);
  padding: 12px 16px;
  border-radius: 14px;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.job-modal .modal-header .modal-name {
  margin: 0;
}

.job-modal .modal-close {
  position: static;
  margin-left: 4px;
}

.crm-modal .modal-header {
  background: var(--panel-soft);
  padding: 12px 16px;
  border-radius: 14px;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.crm-modal .modal-close {
  position: static;
  margin-left: 4px;
}

.partner-modal .modal-header {
  background: var(--panel-soft);
  padding: 12px 16px;
  border-radius: 14px;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.partner-modal .modal-close {
  position: static;
  margin-left: 4px;
}

.dashboard-modal .modal-header {
  background: var(--panel-soft);
  padding: 12px 16px;
  border-radius: 14px;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.dashboard-modal .modal-close {
  position: static;
  margin-left: 4px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.dashboard-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dashboard-upcoming {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
}

.crm-jobs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.crm-job-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.crm-job-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.crm-modal-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-soft);
  padding: 12px;
  gap: 10px;
}

.crm-modal-section label {
  margin: 0;
}

.crm-address-edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.crm-address-edit-grid .form-group {
  margin: 0;
}

.crm-intake-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.crm-intake-meta-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-intake-meta-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.crm-intake-meta-value {
  color: var(--text);
  font-weight: 600;
}

.crm-intake-owner-chip {
  padding-right: 10px;
}

.crm-intake-status-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.crm-intake-status-card.status-info {
  background: rgba(255, 104, 2, 0.08);
  border-color: rgba(255, 104, 2, 0.24);
}

.crm-intake-status-card.status-warning {
  background: var(--btn-warning-soft-bg);
  border-color: var(--btn-warning-border);
}

.crm-intake-status-card.status-success {
  background: var(--btn-success-soft-bg);
  border-color: var(--btn-success-border);
}

.crm-intake-status-card.status-danger {
  background: var(--btn-danger-soft-bg);
  border-color: var(--btn-danger-border);
}

.crm-intake-status-message {
  color: var(--text);
  font-weight: 600;
  line-height: 1.4;
}

.crm-intake-status-meta {
  line-height: 1.35;
}

.crm-address-current-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.crm-address-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crm-address-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.crm-address-type-chip {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ccs-orange);
  background: rgba(255, 104, 2, 0.12);
  border: 1px solid rgba(255, 104, 2, 0.35);
  border-radius: 999px;
  padding: 3px 8px;
}

.crm-address-value {
  line-height: 1.35;
}

.crm-address-history {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.crm-address-history-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  padding: 10px 12px;
}

.crm-address-history-meta {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 132px;
}

.itsm-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.itsm-summary-card {
  padding: 12px;
}

.itsm-summary-card p {
  margin: 0 0 6px;
}

.itsm-summary-card h3 {
  margin: 0;
}

.millwork-bom-page .content {
  padding-bottom: 48px;
}

.mwbom-summary-grid,
.mwbom-rollup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.mwbom-summary-card {
  padding: 12px;
}

.mwbom-summary-card p {
  margin: 0 0 6px;
}

.mwbom-summary-card h3 {
  margin: 0;
}

.millwork-bom-page .job-table td.cell-actions,
.millwork-bom-page .job-table th.cell-actions {
  width: 1%;
  white-space: nowrap;
}

.millwork-bom-page .job-table .receipt-actions-inner {
  position: static;
  inset: auto;
  transform: none;
  min-height: 0;
  justify-content: flex-start;
}

.mwbom-row-clickable {
  cursor: pointer;
}

.mwbom-row-clickable:hover td {
  background: rgba(255, 104, 2, 0.06);
}

.mwbom-row-clickable:focus-visible {
  outline: 2px solid rgba(255, 104, 2, 0.45);
  outline-offset: -2px;
}

.mwbom-adjusted-inline {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.mwbom-adjustment-banner {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 104, 2, 0.26);
  background: rgba(255, 104, 2, 0.09);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
}

.mwbom-adjustment-banner[hidden] {
  display: none;
}

.millwork-tracker-page .content {
  padding-bottom: 48px;
}

.mwt-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.mwt-job-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mwt-empty-state {
  padding: 26px 18px;
  text-align: center;
}

.mwt-job-card {
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.mwt-job-card.has-custom-color {
  background:
    linear-gradient(90deg, var(--mwt-accent-soft, transparent) 0, rgba(0, 0, 0, 0) 180px),
    var(--panel);
}

.mwt-job-card.has-custom-color::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--mwt-accent, var(--accent));
}

.mwt-job-card.is-overdue {
  border-color: rgba(200, 51, 43, 0.36);
  box-shadow: inset 0 0 0 1px rgba(200, 51, 43, 0.16);
}

.mwt-job-card.is-complete {
  border-color: rgba(52, 150, 86, 0.28);
}

.mwt-job-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.mwt-job-head-copy {
  flex: 1;
  min-width: 0;
}

.mwt-job-title-meta {
  display: flex;
  align-items: center;
  gap: 10px 12px;
  flex-wrap: wrap;
}

.mwt-job-head-copy .eyebrow {
  margin: 0;
  white-space: nowrap;
}

.mwt-job-head-copy h3 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mwt-job-head-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 10px;
  min-width: min(360px, 100%);
}

.mwt-job-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 12px;
  flex-wrap: wrap;
  width: 100%;
}

.mwt-job-pills,
.mwt-task-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.mwt-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.mwt-job-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.mwt-job-actions .modal-action {
  margin-top: 0;
  white-space: nowrap;
}

.tracker-live-chip {
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
  user-select: none;
}

.tracker-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  background: #8a94a6;
  box-shadow: 0 0 0 3px rgba(138, 148, 166, 0.2);
  transition: background-color .15s ease, box-shadow .15s ease;
}

.tracker-live-chip.is-pending {
  color: var(--muted);
  border-color: var(--border);
  background: color-mix(in srgb, var(--panel-soft) 92%, transparent);
}

.tracker-live-chip.is-live {
  color: #1e7f52;
  border-color: rgba(34, 160, 100, 0.5);
  background: rgba(34, 160, 100, 0.14);
}

.tracker-live-chip.is-live .tracker-live-dot {
  background: #22a064;
  box-shadow: 0 0 0 3px rgba(34, 160, 100, 0.24);
  animation: trackerLivePulse 1.8s ease-in-out infinite;
}

.tracker-live-chip.is-down {
  color: #b42318;
  border-color: rgba(217, 48, 37, 0.52);
  background: rgba(217, 48, 37, 0.12);
}

.tracker-live-chip.is-down .tracker-live-dot {
  background: #d93025;
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.22);
  animation: none;
}

@keyframes trackerLivePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 3px rgba(34, 160, 100, 0.22);
  }
  50% {
    transform: scale(1.12);
    box-shadow: 0 0 0 5px rgba(34, 160, 100, 0.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tracker-live-chip.is-live .tracker-live-dot {
    animation: none !important;
  }
}

.mwt-job-pill-active {
  background: rgba(76, 175, 80, 0.22);
  color: #2e7d32;
  border-color: rgba(76, 175, 80, 0.45);
}

.mwt-progress-pill {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
}

.mwt-progress-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  width: calc(var(--mwt-progress, 0) * 100%);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 104, 2, 0.34), rgba(255, 140, 66, 0.52));
  z-index: -1;
}

.mwt-progress-pill-hours::before {
  background: linear-gradient(90deg, rgba(76, 175, 80, 0.28), rgba(129, 199, 132, 0.5));
}

.mwt-job-pill-due-ok {
  background: rgba(76, 175, 80, 0.22);
  color: #2e7d32;
  border-color: rgba(76, 175, 80, 0.45);
}

.mwt-job-pill-due-soon {
  background: rgba(255, 193, 7, 0.2);
  color: #b77900;
  border-color: rgba(255, 193, 7, 0.45);
}

.mwt-job-pill-due-today,
.mwt-job-pill-due-overdue {
  background: rgba(244, 67, 54, 0.18);
  color: #b71c1c;
  border-color: rgba(244, 67, 54, 0.45);
}

.mwt-inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.mwt-inline-form .job-input {
  flex: 1;
}

.mwt-color-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mwt-color-picker-row .modal-action {
  margin-top: 0;
}

.mwt-color-picker-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mwt-color-input {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
}

.mwt-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.mwt-color-input::-webkit-color-swatch {
  border: 0;
  border-radius: 10px;
}

.mwt-color-input::-moz-color-swatch {
  border: 0;
  border-radius: 10px;
}

.mwt-color-value {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mwt-color-recents {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.mwt-color-swatches {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mwt-color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: var(--mwt-swatch, #ff6802);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.mwt-color-swatch.is-selected {
  border-color: #fff;
  box-shadow:
    0 0 0 2px rgba(255, 104, 2, 0.2),
    inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.mwt-color-empty {
  font-size: 12px;
}

.mwt-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.mwt-gantt-modal {
  width: min(1880px, 98vw);
  max-height: 94vh;
}

.mwt-gantt-modal .modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.mwt-gantt-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.mwt-gantt-meta .eyebrow,
.mwt-gantt-meta .muted {
  margin: 0;
}

.mwt-gantt-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mwt-gantt-note {
  margin: 0;
}

.mwt-gantt-wrap {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel-soft);
  overflow: auto;
  max-height: calc(94vh - 220px);
}

.mwt-gantt-grid {
  min-width: calc(320px + var(--mwt-gantt-width, 0px));
}

.mwt-gantt-row {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-width: max-content;
}

.mwt-gantt-row + .mwt-gantt-row {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.mwt-gantt-row-header {
  position: sticky;
  top: 0;
  z-index: 6;
}

.mwt-gantt-label {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  min-height: 48px;
}

.mwt-gantt-label-head {
  z-index: 7;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.mwt-gantt-label-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.mwt-gantt-label-copy strong,
.mwt-gantt-label-copy span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mwt-gantt-label-copy span {
  color: var(--muted);
  font-size: 12px;
}

.mwt-gantt-task-label {
  background: var(--panel-soft);
}

.mwt-gantt-row-task .mwt-gantt-label {
  min-height: 38px;
  padding: 6px 10px;
}

.mwt-gantt-row-task .mwt-gantt-track {
  min-height: 38px;
}

.mwt-gantt-row-task .mwt-gantt-label-copy {
  gap: 1px;
}

.mwt-gantt-row-task .mwt-gantt-label-copy strong {
  font-size: 13px;
  line-height: 1.2;
}

.mwt-gantt-row-task .mwt-gantt-label-copy span {
  font-size: 11px;
}

.mwt-gantt-scale {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.mwt-gantt-scale-cell {
  min-height: 48px;
  padding: 6px 4px;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.mwt-gantt-scale-cell .dow {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.mwt-gantt-scale-cell .date {
  font-size: 11px;
  font-weight: 600;
}

.mwt-gantt-scale-cell.is-weekend {
  background: rgba(0, 0, 0, 0.025);
}

.mwt-gantt-scale-cell.is-today {
  background: rgba(255, 104, 2, 0.12);
}

.mwt-gantt-track {
  position: relative;
  min-height: 48px;
  background-image: repeating-linear-gradient(
    to right,
    rgba(0, 0, 0, 0.06) 0,
    rgba(0, 0, 0, 0.06) 1px,
    transparent 1px,
    transparent 100%
  );
  background-color: transparent;
}

.mwt-gantt-row-job .mwt-gantt-track {
  background-color: rgba(0, 0, 0, 0.025);
}

.mwt-gantt-row.has-custom-color .mwt-gantt-label {
  border-left: 3px solid var(--mwt-gantt-accent);
  padding-left: 9px;
}

.mwt-gantt-row-job.has-custom-color .mwt-gantt-label {
  background:
    linear-gradient(90deg, var(--mwt-gantt-accent-soft) 0, rgba(0, 0, 0, 0) 160px),
    var(--panel);
}

.mwt-gantt-row-task.has-custom-color .mwt-gantt-label {
  background:
    linear-gradient(90deg, var(--mwt-gantt-accent-soft) 0, rgba(0, 0, 0, 0) 140px),
    var(--panel-soft);
}

.mwt-gantt-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 104, 2, 0.85);
  z-index: 1;
}

.mwt-gantt-bar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  z-index: 2;
}

.mwt-gantt-row.has-custom-color .mwt-gantt-bar {
  background: var(--mwt-gantt-accent);
  border: 1px solid var(--mwt-gantt-accent-border);
  color: var(--mwt-gantt-accent-text);
}

.mwt-gantt-bar span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
}

.mwt-gantt-bar.is-job {
  background: rgba(148, 163, 184, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.mwt-gantt-bar.is-pending {
  background: rgba(99, 102, 241, 0.3);
  border: 1px solid rgba(99, 102, 241, 0.44);
}

.mwt-gantt-bar.is-active {
  background: rgba(255, 104, 2, 0.46);
  border: 1px solid rgba(255, 104, 2, 0.66);
}

.mwt-gantt-bar.is-hold {
  background: rgba(200, 51, 43, 0.42);
  border: 1px solid rgba(200, 51, 43, 0.6);
}

.mwt-gantt-bar.is-done {
  background: rgba(52, 150, 86, 0.42);
  border: 1px solid rgba(52, 150, 86, 0.6);
}

.mwt-gantt-row-task .mwt-gantt-bar {
  height: 15px;
  font-size: 10px;
  padding: 0 6px;
}

@media (prefers-color-scheme: dark) {
  .mwt-gantt-row + .mwt-gantt-row {
    border-top-color: rgba(255, 255, 255, 0.04);
  }

  .mwt-gantt-scale-cell {
    border-right-color: rgba(255, 255, 255, 0.05);
  }

  .mwt-gantt-scale-cell.is-weekend {
    background: rgba(255, 255, 255, 0.02);
  }

  .mwt-gantt-track {
    background-image: repeating-linear-gradient(
      to right,
      rgba(255, 255, 255, 0.06) 0,
      rgba(255, 255, 255, 0.06) 1px,
      transparent 1px,
      transparent 100%
    );
  }

  .mwt-gantt-row-job .mwt-gantt-track {
    background-color: rgba(255, 255, 255, 0.02);
  }
}

.mwt-task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mwt-task-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  position: relative;
  overflow: hidden;
}

.mwt-task-row.has-custom-color {
  background:
    linear-gradient(90deg, var(--mwt-accent-soft, transparent) 0, rgba(0, 0, 0, 0) 130px),
    var(--panel-soft);
}

.mwt-task-row.has-custom-color::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--mwt-accent, var(--accent));
}

.mwt-task-row.is-done {
  opacity: 0.78;
}

.mwt-task-row.is-done .mwt-task-title-text {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(255, 104, 2, 0.7);
}

.mwt-task-row.is-active {
  border-color: rgba(255, 104, 2, 0.32);
}

.mwt-task-row.is-hold {
  border-color: rgba(200, 51, 43, 0.34);
}

.mwa-task-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.mwa-task-row .mwt-task-main {
  cursor: pointer;
}

.mwt-task-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 0;
  flex: 0 0 auto;
}

.mwt-task-check input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
  accent-color: var(--ccs-orange);
}

.mwt-task-check span {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid rgba(255, 104, 2, 0.52);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.mwt-task-check span::before {
  content: '';
  width: 5px;
  height: 9px;
  border-right: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transform: rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform 0.16s ease, border-color 0.16s ease;
  margin-top: -2px;
}

.mwt-task-check input:checked + span {
  background: var(--ccs-orange);
  border-color: var(--ccs-orange);
  box-shadow: 0 0 0 1px rgba(255, 104, 2, 0.18);
}

.mwt-task-check input:checked + span::before {
  border-color: #fff;
  transform: rotate(45deg) scale(1);
}

.mwt-task-check input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(255, 104, 2, 0.14);
}

.mwt-task-main {
  min-width: 0;
  cursor: pointer;
}

.mwt-task-topline {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.mwt-task-inline {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px 8px;
  flex-wrap: wrap;
}

.mwt-task-inline strong {
  font-size: 14px;
  line-height: 1.25;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mwt-task-inline-text {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.mwt-task-inline-assignees {
  display: flex;
  align-items: center;
  min-width: 0;
  width: 100%;
}

.mwt-task-inline-assignees .table-user-list {
  display: flex;
  width: 100%;
  justify-content: flex-start;
}

.mwt-task-inline-assignees .table-user-chip {
  background: rgba(255, 255, 255, 0.04);
}

.mwt-task-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  align-self: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.mwt-task-action-btn {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mwt-task-action-btn.is-active {
  border-color: rgba(255, 104, 2, 0.42);
  background: rgba(255, 104, 2, 0.12);
  color: var(--accent);
}

.mwt-task-action-btn.is-hold {
  border-color: rgba(200, 51, 43, 0.36);
  background: rgba(200, 51, 43, 0.1);
  color: #e78e89;
}

.mwt-task-action-btn:disabled {
  cursor: default;
  opacity: 0.75;
}

.mwt-status-active {
  border-color: rgba(255, 104, 2, 0.42);
  background: rgba(255, 104, 2, 0.12);
  color: var(--accent);
}

.mwt-empty-inline {
  padding: 12px 4px 4px;
}

.mwt-hold-modal-copy {
  margin-bottom: 12px;
}

.mwt-hold-modal-copy .eyebrow,
.mwt-hold-modal-copy h3 {
  margin: 0;
}

.mwt-hold-modal-copy h3 {
  margin-top: 4px;
}

.mwt-hold-reason-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.mwt-hold-reason-btn {
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.mwt-hold-reason-btn.is-selected {
  border-color: rgba(255, 104, 2, 0.5);
  background: rgba(255, 104, 2, 0.14);
  color: var(--accent);
}

.mwt-hold-reason-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mwt-hold-reason-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.mwt-modal .modal-header {
  background: var(--panel-soft);
  padding: 12px 16px;
  border-radius: 14px;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-right: 46px;
}

.mwt-modal .modal-close {
  top: 12px;
  right: 12px;
}

.mwa-stats-modal {
  width: min(1100px, 96vw);
}

.mwa-stats-modal .modal-body {
  padding-top: 8px;
}

.mwa-stats-modal .mwt-summary-grid {
  margin: 0;
}

.mwa-task-detail-shell {
  width: min(1180px, 96vw);
}

.mwt-assignee-input {
  align-items: flex-start;
}

.mwt-assignee-input input {
  min-width: 220px;
}

.mwt-assignee-input .assignee-tags:empty {
  display: none;
}

.mwt-task-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mwt-task-detail-panel {
  padding: 14px;
}

.mwt-task-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.mwt-task-detail-head .eyebrow,
.mwt-task-detail-head h3 {
  margin: 0;
}

.mwt-task-detail-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mwt-task-detail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-soft);
}

.mwt-task-detail-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mwt-task-detail-copy strong,
.mwt-task-detail-copy span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mwt-task-detail-copy span {
  font-size: 12px;
  color: var(--muted);
}

.mwt-task-detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.assignee-tag .mwt-assignee-tag-avatar,
.mwt-assignee-suggestion-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 104, 2, 0.12);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
  opacity: 1;
  font-size: 10px;
}

.mwt-assignee-suggestion-avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.assignee-tag .mwt-assignee-tag-remove {
  font-size: 14px;
  line-height: 1;
  opacity: 0.65;
}

@media (max-width: 860px) {
  .mwt-job-head,
  .mwt-job-head-side {
    flex-direction: column;
  }

  .mwt-job-actions,
  .mwt-job-pills,
  .mwt-task-pills {
    justify-content: flex-start;
  }

  .mwt-job-head {
    display: flex;
  }

  .mwt-job-head-side {
    align-items: flex-start;
    min-width: 0;
    width: 100%;
  }

  .mwt-job-toolbar,
  .mwt-job-title-meta {
    justify-content: flex-start;
  }

  .mwt-task-topline {
    grid-template-columns: minmax(0, 1fr);
    align-items: flex-start;
  }

  .mwt-task-inline-assignees,
  .mwt-task-inline-assignees .table-user-list {
    width: 100%;
  }

  .mwt-job-actions {
    flex-wrap: wrap;
  }

  .mwt-task-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .mwa-task-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .mwt-task-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .mwa-task-row .mwt-task-actions {
    grid-column: 1;
  }

  .mwa-task-row .mwt-task-actions {
    width: 100%;
    gap: 10px;
  }

  .mwa-task-row .mwt-task-action-btn {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 13px;
    gap: 7px;
    flex: 1 1 140px;
    justify-content: center;
  }

  .mwa-task-row .mwt-task-action-btn .bi {
    font-size: 16px;
  }

  .mwt-task-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mwt-inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  .mwt-gantt-row {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

.mwbom-adjustment-banner i {
  color: var(--accent);
  font-size: 16px;
}

.mwbom-change-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mwbom-change-pill-added {
  background: rgba(31, 143, 74, 0.14);
  border-color: rgba(31, 143, 74, 0.38);
  color: #248b48;
}

.mwbom-change-pill-changed {
  background: rgba(255, 104, 2, 0.14);
  border-color: rgba(255, 104, 2, 0.35);
  color: #d76910;
}

.mwbom-change-pill-removed {
  background: rgba(191, 47, 47, 0.12);
  border-color: rgba(191, 47, 47, 0.28);
  color: #b33636;
}

.mwbom-line-added td {
  background: rgba(31, 143, 74, 0.06);
}

.mwbom-line-changed td {
  background: rgba(255, 104, 2, 0.06);
}

.mwbom-line-change-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mwbom-line-change-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.mwbom-line-change-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.mwbom-line-change-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.mwbom-line-change-item strong {
  color: var(--text);
}

.mwbom-line-change-item i {
  color: var(--accent);
}

.mwbom-removed-list {
  margin-top: 14px;
}

.mwbom-removed-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.mwbom-removed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.mwbom-removed-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  padding: 12px 14px;
}

.mwbom-history-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mwbom-history-modal .modal-body {
  display: block;
}

.mwbom-history-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  padding: 14px 16px;
}

.mwbom-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.mwbom-history-head-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mwbom-history-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mwbom-history-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.mwbom-history-item {
  border: 1px solid rgba(255, 104, 2, 0.14);
  border-radius: 14px;
  background: rgba(255, 104, 2, 0.04);
  padding: 12px 14px;
}

.mwbom-history-removed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mwbom-status-draft {
  background: rgba(255, 179, 71, 0.18);
  border-color: rgba(255, 179, 71, 0.45);
  color: #94601a;
}

.mwbom-status-submitted {
  background: rgba(255, 104, 2, 0.14);
  border-color: rgba(255, 104, 2, 0.35);
  color: #d76910;
}

.mwbom-status-open {
  background: rgba(31, 143, 74, 0.14);
  border-color: rgba(31, 143, 74, 0.38);
  color: #248b48;
}

.mwbom-status-amended {
  background: rgba(90, 108, 126, 0.14);
  border-color: rgba(90, 108, 126, 0.3);
  color: var(--muted);
}

.mwbom-meta-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 12px;
}

.mwbom-meta-user .table-user-cell,
.mwbom-meta-user .table-user-chip-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mwbom-readonly-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(255, 104, 2, 0.22);
  background: rgba(255, 104, 2, 0.08);
  border-radius: 14px;
  padding: 16px 18px;
}

.mwbom-lines-table input,
.mwbom-lines-table textarea,
.mwbom-lines-table select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  background: var(--panel);
  color: var(--text);
  box-sizing: border-box;
}

.mwbom-vendor-sections {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mwbom-vendor-panel {
  padding: 10px 12px;
}

.mwbom-vendor-panel .panel-head {
  margin-bottom: 10px;
}

.mwbom-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mwbom-picker-pane {
  padding: 14px;
}

.mwbom-search-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
}

.mwbom-item-suggestion-list {
  max-height: 320px;
}

.mwbom-item-suggestion-list li {
  align-items: flex-start;
  justify-content: space-between;
}

.mwbom-item-suggestion-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  width: 100%;
}

.mwbom-item-suggestion-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.mwbom-item-suggestion-title strong {
  color: var(--text);
}

.mwbom-item-suggestion-add {
  margin-left: 10px;
  padding: 8px 12px;
  min-height: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.mwbom-item-suggestion-empty {
  color: var(--muted);
  cursor: default;
  pointer-events: none;
}

.mwbom-picker-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  padding: 12px 14px;
}

.mwbom-po-card-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mwbom-po-card,
.mwbom-po-create-card {
  padding: 10px 12px;
}

.mwbom-lines-table td.cell-actions {
  white-space: nowrap;
  position: static;
}

.mwbom-lines-table .receipt-actions-inner {
  position: static;
  inset: auto;
  transform: none;
  min-height: 0;
}

.mwbom-readonly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.itsm-account-page .content {
  padding-bottom: 48px;
}

.itsm-account-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.itsm-account-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 460px;
  min-width: 0;
}

.itsm-account-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

.itsm-account-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.itsm-account-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 1 540px;
}

.itsm-account-quotes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.itsm-account-quotes-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.itsm-account-quotes-head .eyebrow {
  margin: 0;
}

.itsm-account-quotes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.itsm-quote-chip {
  min-width: 170px;
  max-width: 240px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.75));
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 10px 24px rgba(15, 15, 15, 0.08);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.dark-mode .itsm-quote-chip,
[data-theme="dark"] .itsm-quote-chip {
  background: linear-gradient(180deg, rgba(33, 33, 35, 0.92), rgba(24, 24, 26, 0.82));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

.itsm-quote-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 119, 0, 0.45);
  box-shadow: 0 14px 28px rgba(15, 15, 15, 0.12);
}

.itsm-quote-chip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.itsm-quote-chip-number {
  font-weight: 700;
  font-size: 15px;
}

.itsm-quote-chip-label {
  font-size: 13px;
  color: var(--text);
  line-height: 1.35;
}

.itsm-quote-chip-meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.itsm-account-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.itsm-account-page .itsm-section-grid {
  grid-template-columns: 1fr;
}

.itsm-row.status-active .status-pill {
  background: rgba(37, 143, 78, 0.18);
  color: #2f9a58;
  border: 1px solid rgba(37, 143, 78, 0.45);
}

.itsm-row.status-inactive .status-pill {
  background: rgba(200, 51, 43, 0.14);
  color: #d25a54;
  border: 1px solid rgba(200, 51, 43, 0.4);
}

.itsm-modal .modal-header {
  background: var(--panel-soft);
  padding: 12px 16px;
  border-radius: 14px;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.itsm-modal .modal-close {
  position: static;
  margin-left: 4px;
}

.itsm-account-grid {
  margin-bottom: 14px;
}

.itsm-selected-customer {
  margin: 8px 2px 0;
}

.itsm-modal .option-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.itsm-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.itsm-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-soft);
  padding: 10px;
}

.itsm-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.itsm-section-head > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.itsm-section-head h3 {
  margin: 0;
}

.itsm-entry-block {
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}

.itsm-entry-form {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
}

.itsm-entry-submit {
  align-self: end;
}

.itsm-entry-submit .cta {
  width: 100%;
}

.itsm-inline-form {
  display: grid;
  grid-template-columns: 1fr 1fr 110px 140px auto;
  gap: 8px;
  margin-bottom: 8px;
}

.itsm-inline-form .cta {
  white-space: nowrap;
}

.itsm-time-details-input {
  margin-bottom: 8px;
}

.itsm-subtable-wrap {
  max-height: 280px;
  overflow: auto;
}

.itsm-subtable {
  min-width: 920px;
}

.itsm-page .itsm-subtable input,
.itsm-page .itsm-subtable select,
.itsm-page .itsm-subtable textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  background: var(--panel);
  color: var(--text);
  box-sizing: border-box;
}

.itsm-page .itsm-subtable input[readonly] {
  background: var(--panel-soft);
  color: var(--muted);
}

.itsm-page .itsm-subtable td.cell-actions {
  position: static;
  white-space: nowrap;
}

.itsm-page .itsm-subtable .receipt-actions-inner {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  transform: none;
  min-height: 0;
}

.itsm-page .job-table td .checkbox-inline {
  margin: 0;
  gap: 6px;
  font-size: 12px;
}

@media (max-width: 640px) {
  .crm-address-history-row {
    flex-direction: column;
  }

  .crm-address-history-meta {
    align-items: flex-start;
    min-width: 0;
  }

  .itsm-section-grid {
    grid-template-columns: 1fr;
  }

  .itsm-inline-form {
    grid-template-columns: 1fr;
  }

  .itsm-entry-form {
    grid-template-columns: 1fr;
  }

  .itsm-account-actions {
    width: 100%;
    justify-content: stretch;
  }

  .itsm-account-actions .cta,
  .itsm-account-actions .modal-action {
    width: 100%;
  }

  .mwbom-picker-grid {
    grid-template-columns: 1fr;
  }

  .mwbom-meta-strip {
    align-items: flex-start;
  }
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.link-button {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.address-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.address-autocomplete {
  position: relative;
  width: 100%;
}

.address-autocomplete > input {
  width: 100%;
  display: block;
}

.address-autocomplete .assignee-options {
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 25;
}

.job-customer-selection {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.job-customer-selection[hidden] {
  display: none;
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
}

.checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 500;
}

.customer-checkbox {
  accent-color: var(--ccs-orange);
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  min-width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  display: inline-block;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel);
  position: relative;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.customer-checkbox::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.12s ease;
}

.customer-checkbox:checked {
  background: var(--ccs-orange);
  border-color: var(--ccs-orange);
}

.customer-checkbox:checked::after {
  transform: rotate(45deg) scale(1);
}

.customer-checkbox:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ccs-orange) 24%, transparent);
}

.partner-add {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.partner-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.partner-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
}

.suggest-input {
  position: relative;
  width: 100%;
}

.suggest-input > input {
  width: 100%;
  display: block;
}

.ticket-modal .modal-header {
  background: var(--panel-soft);
  padding: 12px 16px;
  border-radius: 14px;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.ticket-modal .modal-header .modal-name {
  margin: 0;
}

.modal-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ticket-modal .modal-header .modal-action {
  margin-top: 0;
}

.ticket-modal .modal-header .modal-close {
  position: static;
  margin-left: 4px;
}

.modal-avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255, 104, 2, 0.12);
  color: var(--ccs-black);
  font-weight: 800;
  border: 1px solid rgba(255, 104, 2, 0.35);
  overflow: hidden;
  font-size: 18px;
}

.modal-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-name {
  margin: 0;
  font-weight: 800;
  font-size: 20px;
}

.modal-title {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.modal-body {
  display: grid;
  gap: 10px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}

.modal-action {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  margin-top: 10px;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px 12px;
  margin-top: 8px;
}

.form-page .panel {
  background: var(--panel);
}

.customer-intake-header {
  display: grid;
  gap: 14px;
}

.customer-intake-header-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.customer-intake-logo {
  width: 78px;
  height: auto;
  object-fit: contain;
  flex: 0 0 auto;
}

.secure-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(31, 143, 74, 0.45);
  background: rgba(31, 143, 74, 0.12);
  color: #19663a;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  width: fit-content;
}

.secure-chip-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(31, 143, 74, 0.18);
  border: 1px solid rgba(31, 143, 74, 0.3);
  font-size: 12px;
  line-height: 1;
}

.secure-chip-bottom {
  margin-top: 12px;
}

.secure-chip-row {
  display: flex;
  justify-content: center;
}

.secure-chip-centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

#app[data-theme="dark"] .secure-chip,
body.dark-mode .secure-chip,
body.theme-dark .secure-chip {
  color: #8be3aa;
  border-color: rgba(86, 196, 127, 0.55);
  background: rgba(41, 103, 63, 0.35);
}

#app[data-theme="dark"] .secure-chip-icon,
body.dark-mode .secure-chip-icon,
body.theme-dark .secure-chip-icon {
  background: rgba(86, 196, 127, 0.22);
  border-color: rgba(86, 196, 127, 0.4);
}

#project-address-wrap.is-disabled {
  opacity: 0.75;
}

#project-address-wrap.is-disabled .muted {
  opacity: 0.9;
}

.modal-action.primary {
  border-color: var(--btn-primary-border);
  background: var(--btn-primary-soft-bg);
  color: var(--btn-primary-bg);
}

.modal-action.success {
  border-color: var(--btn-success-border);
  background: var(--btn-success-soft-bg);
  color: var(--btn-success-bg);
}

.modal-action.danger {
  border-color: var(--btn-danger-border);
  background: var(--btn-danger-soft-bg);
  color: var(--btn-danger-bg);
}

.modal-action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.modal-action.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.modal-action.is-loading i {
  animation: topbar-spin 1.05s linear infinite;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  font-weight: 600;
  color: var(--muted);
  font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  background: var(--panel);
  color: var(--text);
}

.form-group input[type="file"] {
  padding: 8px 10px;
}

.form-group input[type="file"]::file-selector-button {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 10px;
}

.form-group input[type="file"]::file-selector-button:hover {
  filter: brightness(0.98);
}

.quote-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  background: var(--panel);
  color: var(--text);
  resize: vertical;
  min-height: 120px;
  box-sizing: border-box;
}

.quote-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.quote-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.history-list li {
  margin: 2px 0;
}

.table-user-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.table-user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 104, 2, 0.12);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
}

.table-user-avatar.has-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.table-user-name {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-user-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.table-user-copy .muted {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.directory-person-trigger {
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.directory-person-trigger:hover,
.directory-person-trigger:focus-visible {
  color: var(--ccs-orange);
  text-decoration: underline;
}

#directory-table .directory-email-link {
  color: var(--ccs-orange);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

#directory-table .directory-email-link:hover,
#directory-table .directory-email-link:focus-visible {
  color: color-mix(in srgb, var(--ccs-orange) 78%, var(--text));
  border-bottom-color: currentColor;
}

.directory-person-modal {
  width: min(560px, 95vw);
  text-align: center;
  padding: 22px 20px 16px;
}

.directory-person-logo {
  margin-bottom: 10px;
}

.directory-person-logo img {
  width: 132px;
  height: auto;
}

.directory-person-head {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.directory-person-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  margin-bottom: 2px;
  font-size: 30px;
}

.directory-person-modal .modal-name {
  margin: 0;
  line-height: 1.2;
}

.directory-person-modal .modal-title {
  margin: 0;
  max-width: 100%;
}

.directory-person-contacts {
  margin-top: 8px;
  margin-bottom: 6px;
}

.directory-person-contact {
  display: grid;
  grid-template-columns: 122px 1fr;
  gap: 10px;
  align-items: center;
  text-align: left;
}

.directory-person-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.directory-person-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.directory-person-footer {
  justify-content: center;
  gap: 12px;
}

@media (max-width: 640px) {
  .directory-person-contact {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .org-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .org-stats {
    white-space: normal;
  }

  .org-root-children,
  .org-tree-members {
    grid-template-columns: 1fr;
  }
}

.org-chart-page .content {
  max-width: 1320px;
}

.org-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.org-stats {
  border: 1px solid var(--border);
  background: var(--panel-soft);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.org-tree-surface {
  min-height: 72px;
}

.org-root-tree {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0;
}

.org-root-node,
.org-tree-node-dept {
  border: 1px solid rgba(255, 104, 2, 0.45);
  background: color-mix(in srgb, var(--panel) 92%, var(--ccs-orange) 8%);
  border-radius: 12px;
  padding: 10px 16px;
  min-width: 220px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  display: grid;
  gap: 2px;
}

.org-root-node .title,
.org-tree-node-dept .title {
  font-weight: 800;
  letter-spacing: 0.01em;
}

.org-root-node .meta,
.org-tree-node-dept .meta {
  font-size: 12px;
  color: var(--muted);
}

.org-root-children {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  padding-top: 20px;
}

.org-root-children::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 20px;
  background: color-mix(in srgb, var(--border) 70%, var(--ccs-orange) 30%);
  transform: translateX(-50%);
}

.org-root-children::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: color-mix(in srgb, var(--border) 70%, var(--ccs-orange) 30%);
}

.org-root-leader {
  position: relative;
  width: min(420px, 100%);
  padding-top: 20px;
  padding-bottom: 8px;
}

.org-root-leader::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 20px;
  background: color-mix(in srgb, var(--border) 70%, var(--ccs-orange) 30%);
  transform: translateX(-50%);
}

.org-root-leader.has-children::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  width: 2px;
  height: 12px;
  background: color-mix(in srgb, var(--border) 70%, var(--ccs-orange) 30%);
  transform: translateX(-50%);
}

.org-tree-departments {
  display: grid;
  gap: 22px;
}

.org-tree-department {
  position: relative;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 95%, var(--ccs-orange) 5%);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  justify-items: center;
  gap: 14px;
  overflow: hidden;
}

.org-tree-node-dept {
  min-width: min(360px, 100%);
}

.org-tree-leader {
  position: relative;
  padding-top: 20px;
  width: min(420px, 100%);
}

.org-tree-leader::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 20px;
  background: color-mix(in srgb, var(--border) 70%, var(--ccs-orange) 30%);
  transform: translateX(-50%);
}

.org-tree-members {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  padding-top: 22px;
}

.org-tree-members::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 22px;
  background: color-mix(in srgb, var(--border) 70%, var(--ccs-orange) 30%);
  transform: translateX(-50%);
}

.org-tree-members::after {
  content: '';
  position: absolute;
  top: 22px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: color-mix(in srgb, var(--border) 70%, var(--ccs-orange) 30%);
}

.org-tree-member {
  position: relative;
}

.org-tree-member::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  width: 2px;
  height: 12px;
  background: color-mix(in srgb, var(--border) 70%, var(--ccs-orange) 30%);
  transform: translateX(-50%);
}

.org-tree-empty {
  margin: 2px 0 6px;
}

.org-person-card {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.org-person-card:hover,
.org-person-card:focus-visible {
  border-color: rgba(255, 104, 2, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.org-person-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 104, 2, 0.18);
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  position: relative;
}

.org-person-avatar.has-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.org-person-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.org-role-chip {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  border: 1px solid rgba(255, 104, 2, 0.35);
  background: rgba(255, 104, 2, 0.12);
  color: var(--ccs-orange);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.org-person-name {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-person-title {
  font-size: 12px;
  color: var(--text);
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-person-meta {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-user-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.table-user-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
  border-radius: 999px;
  padding: 2px 8px 2px 4px;
  max-width: 100%;
}

.table-user-chip-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.table-user-chip .table-user-name {
  max-width: 120px;
  font-size: 12px;
}

.table-user-chip-extra {
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
}

.history-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--ccs-orange);
  font-weight: 600;
  cursor: pointer;
}

.history-link:hover,
.history-link:focus-visible {
  text-decoration: underline;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.metrics-inline {
  margin-top: 16px;
}

.metric-card {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

.metric-card h3 {
  margin: 6px 0 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.badge.sold {
  background: rgba(46, 125, 50, 0.15);
  color: #2e7d32;
  border-color: rgba(46, 125, 50, 0.35);
}

.badge.open {
  background: rgba(255, 104, 2, 0.12);
  color: var(--ccs-orange);
  border-color: rgba(255, 104, 2, 0.35);
}

.quote-meta-line input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.quote-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.quote-meta-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quote-meta-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.quote-meta-line label,
.quote-meta-line span {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.quote-meta-line input,
.quote-meta-line select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  background: var(--panel);
  color: var(--text);
  min-width: 160px;
}

.quote-from {
  margin: 0;
  line-height: 1.5;
}

.quote-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.quote-table input {
  width: 100%;
}

.quote-table input[type="text"],
.quote-table input[type="number"] {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  background: var(--panel);
  color: var(--text);
}

.quote-table input[readonly] {
  background: var(--panel-soft);
  color: var(--muted);
}

.quote-table .line-total {
  font-weight: 600;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-title-row h3 {
  margin: 0;
}

.line-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.line-tools-bottom {
  margin-top: 12px;
  justify-content: flex-end;
}

.csv-upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px dashed var(--border);
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  background: var(--panel-soft);
}

.csv-upload input {
  display: none;
}

.line-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.line-comment-text {
  width: 100%;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  background: var(--panel-soft);
  color: var(--text);
}

.line-comment td {
  padding-top: 14px;
}

.line-subtotal-label {
  font-weight: 600;
  color: var(--muted);
}

.pdf-comment td {
  font-weight: 600;
  padding-top: 14px;
}

.pdf-subtotal td {
  font-weight: 600;
}

.quote-row {
  user-select: none;
}

.drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  cursor: grab;
  color: var(--muted);
  user-select: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.icon-button {
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-button.is-active {
  border-color: rgba(255, 104, 2, 0.7);
  background: rgba(255, 104, 2, 0.12);
  color: var(--text);
}

.icon-button.is-accent {
  border-color: rgba(255, 104, 2, 0.7);
  background: rgba(255, 104, 2, 0.12);
  color: var(--text);
}

.icon-button.is-active i {
  color: #ff6802;
}

.icon-button.is-accent i {
  color: #ff6802;
}

.icon-button.danger {
  border-color: var(--btn-danger-border);
  color: var(--btn-danger-bg);
}

.icon-button:hover {
  border-color: rgba(255, 104, 2, 0.5);
}

.quote-row.dragging {
  opacity: 0.5;
}

.quote-row.margin-ignored .line-total {
  color: var(--muted);
}

.quote-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.quote-totals {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quote-totals div {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quote-totals.totals-right {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  align-items: center;
  max-width: 320px;
  margin-left: auto;
}

.quote-totals.totals-right div {
  display: contents;
}

.quote-totals.totals-right span {
  text-align: right;
  color: var(--muted);
}

.quote-totals.totals-right strong {
  text-align: right;
}

.quote-totals.estimate-totals-float {
  position: fixed;
  right: 18px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 214;
  width: auto;
  max-width: min(420px, calc(100vw - 28px));
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: saturate(175%) blur(10px);
  -webkit-backdrop-filter: saturate(175%) blur(10px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.quote-totals.estimate-totals-float.stack-above-sticky {
  bottom: calc(14px + env(safe-area-inset-bottom, 0px) + var(--estimate-sticky-height, 0px) + 10px);
}

.quote-totals.estimate-totals-float .estimate-totals-content {
  display: grid;
  gap: 8px;
}

.quote-totals.estimate-totals-float.collapsed {
  width: auto;
  max-width: none;
  min-height: 44px;
  min-width: 96px;
  padding: 10px 14px;
  gap: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quote-totals.estimate-totals-float.collapsed .estimate-totals-content {
  display: none;
}

.quote-totals.estimate-totals-float.collapsed::after {
  content: 'Totals';
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.quote-totals.estimate-totals-float .totals-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.quote-totals.estimate-totals-float .totals-row > span {
  color: var(--muted);
  font-weight: 600;
}

.quote-totals.estimate-totals-float .totals-row > strong {
  text-align: right;
  font-weight: 800;
}

.quote-totals.estimate-totals-float .totals-row.target-row {
  border: 1px solid rgba(255, 104, 2, 0.45);
  border-radius: 10px;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--ccs-orange) 12%, var(--panel));
}

.quote-totals.estimate-totals-float .totals-row.target-row > span {
  color: color-mix(in srgb, var(--text) 88%, var(--ccs-orange) 12%);
}

.quote-totals.estimate-totals-float .totals-row.target-row > strong {
  color: var(--ccs-orange);
}

@media (max-width: 900px) {
  .quote-totals.estimate-totals-float {
    right: 10px;
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }
}

.quote-totals .total {
  font-weight: 700;
  border-top: 1px solid var(--border);
  padding-top: 6px;
}

.pdf-quote {
  font-family: 'Montserrat', 'Segoe UI', Tahoma, sans-serif;
  margin: 0;
  padding: 18px 24px 48px;
  color: #1d1d1d;
  font-size: 10px;
  position: relative;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.pdf-quote > * {
  position: relative;
  z-index: 1;
}

.pdf-quote h1,
.pdf-quote h2,
.pdf-quote h3 {
  margin: 0;
}

.pdf-quote .pdf-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}

.pdf-quote .pdf-meta {
  text-align: right;
}

.pdf-quote .pdf-section {
  margin-bottom: 14px;
}

.pdf-quote table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.pdf-quote th,
.pdf-quote td {
  border-bottom: 1px solid #ddd;
  padding: 6px 8px;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.92);
}

.pdf-quote th {
  text-align: left;
}

.pdf-quote .pdf-totals {
  margin-left: auto;
  width: 240px;
}

.pdf-quote .pdf-totals div {
  display: flex;
  justify-content: space-between;
  margin: 4px 0;
}

.pdf-quote .pdf-totals .total {
  font-weight: 700;
  border-top: 1px solid #ddd;
  padding-top: 6px;
}

.pdf-quote .pdf-logo {
  height: 64px;
  margin-bottom: 10px;
}

.pdf-quote .pdf-signoff {
  margin-top: 18px;
}

.pdf-quote .pdf-signoff-row {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 24px;
  align-items: end;
}

.pdf-quote .pdf-signoff-label {
  font-weight: 600;
  margin-bottom: 6px;
}

.pdf-quote .pdf-signoff-line {
  border-bottom: 1px solid #666;
  height: 18px;
}

@media (max-width: 720px) {
  .quote-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.modal-field {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.modal-field:last-child {
  border-bottom: none;
}

.label {
  color: var(--muted);
  font-size: 13px;
}


@media (max-width: 820px) {
  :root {
    --top-nav-height: 66px;
    --sidebar-width: min(340px, 92vw);
    --nav-inner-pad-x: 12px;
    --nav-inner-gap: 10px;
    --sidebar-toggle-width: 84px;
  }

  body {
    padding: 0 0 20px;
  }

  body.has-sidebar-nav {
    padding-top: calc(var(--top-nav-height) + 12px);
  }

  body.job-manager {
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
  }

  body.has-sidebar-nav.job-manager {
    padding-top: calc(var(--top-nav-height) + 12px);
  }

  .hero-bar,
  .hero,
  .content {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .site-nav-inner {
    min-height: var(--top-nav-height);
    padding: 9px var(--nav-inner-pad-x);
    gap: var(--nav-inner-gap);
  }

  .nav-logo img {
    width: 112px;
    height: 46px;
  }

  .sidebar-toggle {
    height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }

  .topbar-user {
    width: auto;
    margin-left: 8px;
  }

  .topbar-meta-cluster {
    display: none;
  }

  .topbar-meta-chip {
    height: 34px;
    padding: 0 8px;
    border-radius: 10px;
    font-size: 11px;
  }

  .topbar-meta-chip i {
    font-size: 13px;
  }

  .topbar-user .dropdown-toggle {
    width: auto;
    min-width: 0;
    max-width: calc(100vw - 150px);
  }

  .topbar-user-name {
    max-width: 110px;
  }

  .topbar-user .dropdown-menu {
    position: fixed;
    top: var(--top-nav-height);
    left: 12px;
    right: 12px;
    width: auto;
    min-width: 0;
    margin-top: 0;
    box-shadow: var(--shadow);
  }

  .topbar-user.dropdown.open .dropdown-menu {
    max-height: calc(100vh - var(--top-nav-height) - 12px);
  }

  .site-sidebar {
    width: var(--sidebar-width);
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .hero-bar {
    padding: 0;
  }

  .hero-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .cta {
    flex: 1;
    justify-content: center;
  }

  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .job-tools {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .list li {
    grid-template-columns: 1fr;
  }

  .dropdown {
    width: 100%;
  }

  .dropdown-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .dropdown-menu {
    position: static;
    width: 100%;
    min-width: 100%;
    box-shadow: none;
    margin-top: 6px;
  }

  .modal {
    width: 100%;
    max-height: 85vh;
  }
}

@media (max-width: 620px) {
  .topbar-time-chip {
    display: none;
  }

  #topbar-weather-chip .topbar-meta-value {
    max-width: 68px;
  }
}


@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0b;
    --panel: #151515;
    --panel-soft: #1f1f1f;
    --card: #1a1a1a;
    --text: #ffffff;
    --muted: #d6d6de;
    --border: rgba(255, 255, 255, 0.16);
    --pill: rgba(255, 255, 255, 0.14);
    --shortcut-bg: rgba(255, 255, 255, 0.14);
    --btn-primary-border: rgba(255, 104, 2, 0.55);
    --btn-primary-soft-bg: rgba(255, 104, 2, 0.18);
    --btn-ghost-bg: #1a1a1a;
    --btn-ghost-text: #ffffff;
    --btn-ghost-border: rgba(255, 255, 255, 0.18);
    --btn-danger-border: rgba(255, 107, 107, 0.55);
    --btn-danger-soft-bg: rgba(255, 107, 107, 0.18);
    --btn-success-border: rgba(57, 199, 121, 0.5);
    --btn-success-soft-bg: rgba(57, 199, 121, 0.18);
    --btn-warning-border: rgba(255, 198, 107, 0.5);
    --btn-warning-soft-bg: rgba(255, 198, 107, 0.18);
    --shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
    --accent-pattern: repeating-linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.05),
        rgba(255, 255, 255, 0.05) 12px,
        transparent 12px,
        transparent 24px
      );
  }

  .cta.ghost {
    background: #1f1f2a;
    color: var(--ccs-white);
  }

  .avatar {
    background: rgba(255, 104, 2, 0.2);
    color: var(--text);
  }

  .site-nav-inner {
    background: rgba(21, 21, 21, 0.78);
    border-color: rgba(255, 255, 255, 0.2);
  }

  .site-sidebar {
    background: rgba(21, 21, 21, 0.78);
    border-color: rgba(255, 255, 255, 0.2);
  }

  .site-sidebar-overlay {
    background: rgba(0, 0, 0, 0.55);
  }

  .sidebar-toggle,
  .site-sidebar-close {
    background: #1f1f1f;
    border-color: rgba(255, 255, 255, 0.22);
  }
}

:root[data-theme='light'] {
  --bg-image: url('assets/bg/CCS 1920x1080 White Wallpaper.png');
  --bg: #f1f1f1;
  --panel: #ffffff;
  --panel-soft: #f2f2f2;
  --card: #fdfdfd;
  --text: #0a0a0a;
  --muted: #2f2f2f;
  --border: rgba(0, 0, 0, 0.12);
  --pill: rgba(184, 186, 188, 0.2);
  --shortcut-bg: #f4f4f4;
  --btn-primary-border: rgba(255, 104, 2, 0.45);
  --btn-primary-soft-bg: rgba(255, 104, 2, 0.12);
  --btn-ghost-bg: #111111;
  --btn-ghost-text: #ffffff;
  --btn-ghost-border: rgba(17, 17, 17, 0.6);
  --btn-danger-border: rgba(209, 64, 57, 0.45);
  --btn-danger-soft-bg: rgba(209, 64, 57, 0.12);
  --btn-success-border: rgba(31, 143, 74, 0.45);
  --btn-success-soft-bg: rgba(31, 143, 74, 0.12);
  --btn-warning-border: rgba(255, 179, 71, 0.5);
  --btn-warning-soft-bg: rgba(255, 179, 71, 0.16);
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
  --accent-pattern: repeating-linear-gradient(
      135deg,
      rgba(184, 186, 188, 0.08),
      rgba(184, 186, 188, 0.08) 12px,
      transparent 12px,
      transparent 24px
    );
}

@media (max-width: 1023px) {
  :root[data-theme='light'] {
    --bg-image: url('assets/bg/CCS Rectangle White Wallpaper.png');
  }
}

@media (max-width: 639px) {
  :root[data-theme='light'] {
    --bg-image: url('assets/bg/CCS 1080x1920 White Wallpaper.png');
  }
}

:root[data-theme='light'] .site-nav-inner {
  background: rgba(255, 255, 255, 0.52);
  border-color: rgba(255, 255, 255, 0.58);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(175%) blur(10px);
  -webkit-backdrop-filter: saturate(175%) blur(10px);
}

:root[data-theme='light'] .site-sidebar {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(0, 0, 0, 0.12);
}

:root[data-theme='light'] .site-sidebar-overlay {
  background: rgba(0, 0, 0, 0.36);
}

:root[data-theme='light'] :is(.sidebar-toggle, .site-sidebar-close) {
  background: #f2f2f2;
  border-color: rgba(0, 0, 0, 0.12);
}

:root[data-theme='dark'] {
  --bg-image: url('assets/bg/CCS 1920x1080 Black Wallpaper.png');
  --bg: #0b0b0b;
  --panel: #151515;
  --panel-soft: #1f1f1f;
  --card: #1a1a1a;
  --text: #ffffff;
  --muted: #d6d6de;
  --border: rgba(255, 255, 255, 0.16);
  --pill: rgba(255, 255, 255, 0.14);
  --shortcut-bg: rgba(255, 255, 255, 0.14);
  --btn-primary-border: rgba(255, 104, 2, 0.55);
  --btn-primary-soft-bg: rgba(255, 104, 2, 0.18);
  --btn-ghost-bg: #1a1a1a;
  --btn-ghost-text: #ffffff;
  --btn-ghost-border: rgba(255, 255, 255, 0.18);
  --btn-danger-border: rgba(255, 107, 107, 0.55);
  --btn-danger-soft-bg: rgba(255, 107, 107, 0.18);
  --btn-success-border: rgba(57, 199, 121, 0.5);
  --btn-success-soft-bg: rgba(57, 199, 121, 0.18);
  --btn-warning-border: rgba(255, 198, 107, 0.5);
  --btn-warning-soft-bg: rgba(255, 198, 107, 0.18);
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  --accent-pattern: repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.05),
      rgba(255, 255, 255, 0.05) 12px,
      transparent 12px,
      transparent 24px
    );
}

@media (max-width: 1023px) {
  :root[data-theme='dark'] {
    --bg-image: url('assets/bg/CCS Rectangle Black Wallpaper.png');
  }
}

@media (max-width: 639px) {
  :root[data-theme='dark'] {
    --bg-image: url('assets/bg/CCS 1080x1920 Black Wallpaper.png');
  }
}

:root[data-theme='dark'] .cta.ghost {
  background: #1f1f2a;
  color: var(--ccs-white);
}

:root[data-theme='dark'] .avatar {
  background: rgba(255, 104, 2, 0.2);
  color: var(--text);
}

:root[data-theme='dark'] .site-nav-inner {
  background: rgba(13, 14, 18, 0.56);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.56), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  backdrop-filter: saturate(185%) blur(10px);
  -webkit-backdrop-filter: saturate(185%) blur(10px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .site-nav-inner {
    background: rgba(13, 14, 18, 0.56);
    border-color: rgba(255, 255, 255, 0.34);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.56), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: saturate(185%) blur(10px);
    -webkit-backdrop-filter: saturate(185%) blur(10px);
  }
}

:root[data-theme='dark'] :is(.estimate-sticky-actions, .quote-totals.estimate-totals-float) {
  background: rgba(13, 14, 18, 0.56);
  border-color: rgba(255, 255, 255, 0.34);
  backdrop-filter: saturate(185%) blur(10px);
  -webkit-backdrop-filter: saturate(185%) blur(10px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.56), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) :is(.estimate-sticky-actions, .quote-totals.estimate-totals-float) {
    background: rgba(13, 14, 18, 0.56);
    border-color: rgba(255, 255, 255, 0.34);
    backdrop-filter: saturate(185%) blur(10px);
    -webkit-backdrop-filter: saturate(185%) blur(10px);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.56), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
}

:root[data-theme='dark'] .site-sidebar {
  background: rgba(21, 21, 21, 0.78);
  border-color: rgba(255, 255, 255, 0.2);
}

:root[data-theme='dark'] .site-sidebar-overlay {
  background: rgba(0, 0, 0, 0.55);
}

:root[data-theme='dark'] :is(.sidebar-toggle, .site-sidebar-close) {
  background: #1f1f1f;
  border-color: rgba(255, 255, 255, 0.22);
}

.time-clock-page .content {
  height: auto;
  min-height: calc(100vh - 40px);
}

.tc-header-actions {
  gap: 10px;
  flex-wrap: wrap;
}

.tc-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.tc-summary-card {
  padding: 16px 18px;
}

.tc-summary-card .eyebrow,
.tc-summary-card h3,
.tc-summary-card .muted {
  margin: 0;
}

.tc-summary-card h3 {
  margin-top: 6px;
  font-size: 2rem;
}

.tc-status-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 0 2px;
}

.tc-status-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.tc-status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tc-status-copy .muted {
  margin: 0;
}

.tc-status-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tc-status-actions .cta {
  min-width: 150px;
  justify-content: center;
}

.tc-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.tc-filter-grid-wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tc-checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 4px 8px;
  color: var(--text);
}

.tc-checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--ccs-orange);
}

.tc-search-box {
  min-width: 0;
}

.tc-modal-shell {
  width: min(640px, 96vw);
}

.tc-modal-wide {
  width: min(980px, 96vw);
}

.tc-modal-body-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tc-suggestion-shell {
  position: relative;
  z-index: 20;
}

.tc-suggestion-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 0;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.tc-suggestion-list[hidden] {
  display: none !important;
}

.tc-suggestion-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--text);
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
}

.tc-suggestion-item strong,
.tc-suggestion-item span {
  margin: 0;
}

.tc-suggestion-item:hover {
  border-color: rgba(255, 104, 2, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 104, 2, 0.18);
}

.tc-selected-job,
.tc-last-job-prompt {
  margin-top: 10px;
}

.tc-selected-job h3,
.tc-selected-job .eyebrow,
.tc-selected-job .muted,
.tc-last-job-prompt .eyebrow {
  margin: 0;
}

.tc-selected-job h3 {
  margin-top: 4px;
}

.tc-last-job-prompt .cta {
  margin-top: 6px;
}

.tc-inline-value {
  margin: 10px 0 0;
}

.tc-status-open {
  background: rgba(255, 104, 2, 0.14);
  color: var(--ccs-orange);
  border-color: rgba(255, 104, 2, 0.35);
}

.tc-status-pending {
  background: rgba(255, 193, 7, 0.14);
  color: #b77900;
  border-color: rgba(255, 193, 7, 0.35);
}

.time-clock-page .cell-actions {
  white-space: nowrap;
}

.time-clock-page .cell-actions .cta {
  margin-right: 6px;
}

.time-clock-page .cell-actions .cta:last-child {
  margin-right: 0;
}

@media (max-width: 1100px) {
  .tc-summary-grid,
  .tc-filter-grid-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .tc-status-shell {
    flex-direction: column;
    align-items: stretch;
  }

  .tc-status-actions .cta {
    flex: 1 1 180px;
  }

  .tc-filter-grid {
    grid-template-columns: 1fr;
  }

  .tc-modal-body-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .tc-summary-grid {
    grid-template-columns: 1fr;
  }

  .tc-summary-card h3 {
    font-size: 1.6rem;
  }

  .tc-status-actions {
    width: 100%;
  }

  .tc-status-actions .cta {
    width: 100%;
  }
}

.daily-logs-page .content {
  height: auto;
  min-height: calc(100vh - 40px);
}

.dl-compose-modal {
  width: min(760px, 96vw);
}

.dl-compose-modal .modal-body {
  overflow: visible;
}

.dl-textarea {
  min-height: 140px;
  resize: vertical;
}

.dl-job-field {
  margin-bottom: 4px;
}

.dl-upload-field {
  margin-top: 8px;
}

.dl-compose-footer {
  margin-top: 14px;
}

.daily-logs-page .job-tools {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.95fr) auto;
  align-items: center;
  gap: 12px;
}

.daily-logs-page .job-tools > * {
  min-width: 0;
}

.daily-logs-page .job-tools .search-box {
  min-width: 0;
}

.daily-logs-page .job-tools .search-box input {
  min-width: 0;
}

.dl-job-filter {
  min-width: 240px;
  width: 100%;
}

.daily-logs-page .job-tools .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  white-space: nowrap;
  text-align: center;
  line-height: 1;
  padding: 8px 12px;
}

.dl-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dl-feed-status {
  margin: 12px 2px 0;
  text-align: center;
}

.dl-feed-sentinel {
  width: 100%;
  height: 1px;
}

.dl-log-card {
  padding: 16px 18px;
}

.dl-log-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.dl-log-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dl-log-author {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dl-log-avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 104, 2, 0.12);
  color: var(--ccs-orange);
  font-weight: 700;
  border: 1px solid rgba(255, 104, 2, 0.18);
  flex: 0 0 48px;
}

.dl-log-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dl-log-author-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.dl-log-author-copy strong,
.dl-log-author-copy span {
  margin: 0;
}

.dl-log-author-copy span {
  color: var(--muted);
  font-size: 13px;
}

.dl-log-body {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
  color: var(--text);
  min-width: 0;
}

.dl-log-readmore {
  margin-top: 8px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ccs-orange);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  align-self: flex-start;
}

.dl-log-readmore:hover {
  text-decoration: underline;
}

.dl-log-readmore:focus-visible {
  outline: 2px solid rgba(255, 104, 2, 0.35);
  outline-offset: 3px;
}

.dl-log-footer {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dl-log-like {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 104, 2, 0.18);
  background: rgba(255, 104, 2, 0.06);
  color: var(--muted);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.dl-log-like:hover {
  transform: translateY(-1px);
  background: rgba(255, 104, 2, 0.1);
  border-color: rgba(255, 104, 2, 0.28);
  color: var(--ccs-orange);
}

.dl-log-like.is-active {
  background: rgba(220, 68, 55, 0.12);
  border-color: rgba(220, 68, 55, 0.3);
  color: #d64237;
}

.dl-log-like:focus-visible {
  outline: 2px solid rgba(255, 104, 2, 0.35);
  outline-offset: 2px;
}

.dl-log-delete {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(220, 68, 55, 0.22);
  background: rgba(220, 68, 55, 0.08);
  color: #b43024;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.dl-log-delete:hover {
  background: rgba(220, 68, 55, 0.14);
  border-color: rgba(220, 68, 55, 0.32);
  transform: translateY(-1px);
}

.dl-log-delete:focus-visible {
  outline: 2px solid rgba(255, 104, 2, 0.35);
  outline-offset: 2px;
}

.dl-log-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.dl-log-image {
  display: block;
  width: 100%;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  cursor: pointer;
}

.dl-log-image img {
  display: block;
  width: 100%;
  height: 88px;
  object-fit: cover;
}

.dl-image-modal {
  width: min(1040px, 96vw);
}

.dl-image-modal .modal-body {
  display: grid;
  gap: 14px;
}

.dl-image-carousel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.dl-image-nav {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 104, 2, 0.2);
  background: rgba(255, 104, 2, 0.08);
  color: var(--ccs-orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.dl-image-nav:hover {
  background: rgba(255, 104, 2, 0.14);
  border-color: rgba(255, 104, 2, 0.32);
  transform: translateY(-1px);
}

.dl-image-nav:focus-visible {
  outline: 2px solid rgba(255, 104, 2, 0.35);
  outline-offset: 2px;
}

.dl-image-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.dl-image-meta p {
  margin: 0;
}

#dl-log-modal.modal-backdrop {
  z-index: 221;
}

#dl-image-modal.modal-backdrop {
  z-index: 222;
}

.dl-log-modal {
  width: min(920px, 96vw);
}

.dl-log-modal .modal-body {
  padding-top: 6px;
}

.dl-log-modal-card {
  padding: 18px 20px;
}

.dl-log-modal-body {
  white-space: pre-wrap;
  line-height: 1.7;
  color: var(--text);
}

.dl-image-preview-shell {
  width: 100%;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel-soft);
  overflow: hidden;
}

.dl-image-preview {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

@media (max-width: 640px) {
  .daily-logs-page .job-tools {
    grid-template-columns: 1fr;
  }

  .dl-log-head {
    gap: 10px;
  }

  .dl-log-author {
    align-items: flex-start;
  }

  .dl-log-gallery {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  }

  .dl-job-filter {
    min-width: 0;
    width: 100%;
  }

  .daily-logs-page .job-tools .count {
    justify-self: start;
  }

  .dl-image-carousel {
    grid-template-columns: 1fr;
  }

  .dl-image-nav {
    width: 100%;
    height: 40px;
    border-radius: 12px;
  }
}
