/* Shared control, spacing and page states across the customer portal. */
[hidden] { display: none !important; }
.customer-workspace { font: 16px/1.5 var(--bt-font); }
.customer-workspace :is(h1,h2,h3,h4,button,input,select,textarea,summary) { font-family: var(--bt-font); }
.customer-workspace h1 { font-size: 30px; line-height: 1.2; font-weight: 600; letter-spacing: -.6px; }
.customer-workspace h2 { font-size: 20px; line-height: 1.35; font-weight: 600; }
.customer-workspace h3 { font-size: 17px; line-height: 1.4; }
.customer-workspace main { padding-block: 28px; }
.customer-workspace header { min-height: 82px; padding: 16px 32px; flex-wrap: nowrap; }
.customer-workspace header nav { gap: 4px; min-width: 0; }
.customer-workspace header nav a,.customer-workspace header .nav-inactive {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 9px; font-size: 14px; white-space: nowrap;
}
.customer-workspace nav a.active { border-color: transparent; box-shadow: inset 0 -2px #80bfad; }
.workspace-bar { padding: 16px 20px; gap: 16px; margin-bottom: 28px; }
.workspace-identity { display: grid; gap: 2px; min-width: 0; }
.workspace-identity strong { font-size: 16px; overflow-wrap: anywhere; }
.workspace-identity .muted { font-size: 13px; overflow-wrap: anywhere; }
.workspace-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.workspace-actions a,.workspace-actions .text-button { min-height: 44px; display: inline-flex; align-items: center; }
.workspace-actions a { text-decoration: none; font-weight: 500; }
.workspace-actions a:hover,.workspace-actions a[aria-current] { text-decoration: underline; }

.customer-workspace :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=hidden]) {
  min-height: 44px; border: 1px solid var(--bt-input-line); border-radius: 8px;
  padding: 10px 12px; color: var(--txt); background: var(--surface); max-width: 100%;
}
.customer-workspace :is(input,textarea)::placeholder { color: var(--muted); opacity: 1; }
.customer-workspace input[type=checkbox],.customer-workspace input[type=radio] {
  width: 18px; height: 18px; padding: 0; margin: 2px 0; flex: none; accent-color: var(--accent);
}
.customer-workspace label { font-size: 14px; font-weight: 500; }
.primary-button,.secondary-button,.res-btn,.customer-workspace .panel button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px; border-radius: 8px; font-size: 14px;
  font-weight: 600; line-height: 1.4; text-align: center; text-decoration: none;
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
}
.secondary-button,.res-btn,.customer-workspace .panel button.secondary-button {
  background: var(--surface); border-color: var(--bt-input-line); color: var(--accent);
}
.primary-button:hover,.customer-workspace .panel button:hover { background: #24676a; border-color: #24676a; color: #fff; }
.secondary-button:hover,.res-btn:hover,.customer-workspace .panel button.secondary-button:hover {
  background: var(--surface2); color: var(--accent); border-color: var(--accent);
}
.text-button { min-height: 44px; padding: 8px 2px; text-underline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .55; }
button:disabled:hover { filter: none; }
.is-submitting button { opacity: .6; pointer-events: none; }
.is-submitting { cursor: progress; }
.ui-notice,[role=alert]:not([hidden]) { padding: 12px 16px; border-radius: 8px; font-size: 14px; line-height: 1.5; }
.ui-notice { background: var(--surface2); color: var(--accent); }
[role=alert]:not([hidden]) { background: var(--bt-pale-danger); color: var(--no); }
.customer-workspace .panel { background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 24px; margin-bottom: 24px; }
.customer-workspace .panel>h2 { margin-bottom: 8px; }
.customer-workspace .panel>p { color: var(--muted); margin-bottom: 16px; }
.customer-workspace .panel>form,.member-row form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.customer-workspace .panel label { display: flex; flex-direction: column; gap: 6px; }
.customer-workspace .panel>form>label:first-of-type { flex: 1; min-width: 220px; }
.customer-workspace .panel .account-bar { padding: 18px 0; margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.customer-workspace .panel .account-bar:last-child { border-bottom: 0; padding-bottom: 0; }
.member-copy { display: grid; gap: 4px; flex: 1; min-width: 220px; overflow-wrap: anywhere; }
.member-copy small { color: var(--muted); }
.invitation-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.customer-workspace .panel button.danger-button { background: var(--bt-pale-danger); color: var(--no); border-color: #edc8c2; }
.customer-workspace .panel button.danger-button:hover { background: #f9dbd6; }
.error-panel { max-width: 620px; margin: 8vh auto; display: grid; gap: 20px; }
.error-panel .secondary-button { justify-self: start; }
.pagetitle,.sectiontitle { border: 0; margin-bottom: 8px; }
.page-actions { align-items: center; margin-bottom: 24px; }
.page-actions .sectiontitle { margin: 0; }
.proj-sec>summary { text-transform: none; letter-spacing: 0; font-size: 18px; padding: 18px 20px; }
.proj-sec>summary .muted { margin-left: auto; padding-right: 12px; }
.jobhead,.crewhead,.jobname,.jobproject { text-transform: none; letter-spacing: 0; }
.library-tabs a { text-decoration: none; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
.res-kind { font-size: 12px; }
.folder { color: var(--txt); transition: border-color .15s,background .15s; }
.folder:hover { background: var(--surface2); border-color: #b9d2c5; }
.report-value { background: var(--surface); }
.res-btn.res-del { color: var(--no); border-color: #edc8c2; }
.wa-wrap { border-radius: 12px; }
.wa-list a { min-height: 56px; font-weight: 500; }
.wa-list a:hover { background: var(--bg); }
.wa-thread-head { font-size: 18px; padding: 18px; margin: 0; }
.message.own,.wa-out { background: var(--accent); color: #fff; border-color: var(--accent); }
.message.own small,.wa-out .wa-sender { color: #d6e1e3; }
.message.own a { color: #fff; }
.wa-reply-row button { padding: 12px 20px; }
.empty,.noreport,.res-empty { line-height: 1.6; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; transition: none !important; } }
@media (max-width: 720px) {
  .customer-workspace header { min-height: 76px; padding: 14px 20px; }
  .customer-workspace header nav { top: 100%; display: none; padding: 12px 16px; max-height: calc(100dvh - 76px); align-items: stretch; }
  .customer-workspace header nav.is-open { display: flex; }
  .hamburger { border: 0; background: transparent; width: 44px; height: 44px; align-items: center; margin: 0; }
  .workspace-bar { align-items: flex-start; }
  .workspace-actions { gap: 8px 16px; }
  .customer-workspace .panel { padding: 18px; }
  .customer-workspace h1 { font-size: 26px; }
}
