/* New-UI: shared desktop patterns for the full project workspace. */
@media (min-width: 861px) {
  .app > header {
    min-height: 62px;
    padding: 8px 18px;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 440px) minmax(0, 1fr);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
  }
  .header-search { height: 38px; border-radius: 11px; background: rgba(255, 255, 255, .09); }
  .header-search input { height: 36px; background: transparent !important; color: #fff; box-shadow: none; }
  .header-search:focus-within { border-color: rgba(255, 255, 255, .72); box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
  .header-search:focus-within input { background: transparent !important; color: var(--ink); }
  .header-search:focus-within .header-search-go { background: var(--accent); }
  .header-search-go { height: 28px; border-radius: 8px; }
  .header-project-row { gap: 8px; }
  .header-project .work-title { max-width: min(34vw, 440px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app > header .meta { gap: 6px; }
  #helpBtn, #logoutBtn, #settingsBtn, #profileBtn, #tenantLabel { min-height: 36px; border-radius: 9px; }

  .proto-nav { flex-basis: 218px; width: 218px; padding: 12px 9px; gap: 3px; }
  .proto-nav button { min-height: 38px; padding: 8px 11px; border-radius: 9px; font-size: 13px; }
  .proto-nav button.sub { min-height: 34px; }
  .proto-nav button.on { box-shadow: inset 3px 0 0 var(--accent); }
  .proto-side { flex-basis: var(--proto-side, 228px); width: var(--proto-side, 228px); min-width: 216px; padding: 12px 13px 16px; gap: 8px; }
  .proto-side.collapsed { flex-basis: 42px; width: 42px; min-width: 42px; max-width: 42px; padding: 9px 5px; }
  .proto-grip { flex-basis: 8px; width: 8px; min-width: 8px; }
  .proto-grip::before { left: 3px; }

  .proto-main { padding: 18px 20px 24px; }
  .proto-main h2 { margin-bottom: 10px; font-size: 21px; }
  .proto-card, .panel, .list-frame, .task-workspace-list > .list-frame,
  .measure-workspace-list > .list-frame, .ticket-workspace-list > .list-frame { border-radius: 14px; }
  .proto-card { padding: 14px 16px; box-shadow: var(--shadow-xs); }
  .proto-side .proto-card { padding: 12px 13px; border-radius: 12px; }
  .proto-side .rail-bubble { padding: 9px 11px; border-radius: 11px; }
  .proto-side .rail-bubble .hint { font-size: 11.5px; line-height: 1.4; }

  .file-tabs { gap: 4px; }
  .file-tabs button { min-height: 36px; border-radius: 9px; }
  .ticket-filter, .doc-controls, .mailbox-filter { border-radius: 12px; }
  .ticket-filter input, .ticket-filter select, .doc-controls input, .doc-controls select,
  .mailbox-filter input, .mailbox-filter select { min-height: 38px; border-radius: 9px; }
  .ticket-table-wrap, .doc-table-wrap, .list-scroll { border-radius: 12px; box-shadow: var(--shadow-xs); }
  .ticket-table thead th, .doc-table thead th, .list-scroll thead th { padding-top: 10px; padding-bottom: 10px; font-size: 11px; letter-spacing: .035em; }
  .ticket-table tbody tr:hover > td, .doc-table tbody tr:hover > td, .list-scroll tbody tr:hover > td { background: var(--card-subtle); }
  .ticket-table tbody tr.on > td, .doc-table tbody tr.on > td, .list-scroll tbody tr.on > td { background: var(--highlight); }
  .workspace-splitter::before { height: 52px; }
  .task-workspace-list > .list-frame, .measure-workspace-list > .list-frame,
  .ticket-workspace-list > .list-frame { padding: 12px; }
  .task-workspace #taskBoard.panel, .ticket-workspace-detail #ticketBoard.panel { border-radius: 14px; }
  .task-list-filter .task-scope-note { grid-column: 1 / -1; grid-row: 4; margin: 6px 0 0; font-size: 11.5px; line-height: 1.35; }

  .notice-stack { width: min(420px, calc(100vw - 32px)); gap: 7px; max-height: 38vh; overflow: auto; padding: 2px; }
  .notice-stack .notice-card { padding: 11px 38px 11px 14px; border-radius: 12px; box-shadow: 0 8px 24px rgba(15, 23, 42, .15); }
  .notice-stack .notice-card strong { font-size: 13px; }
  .notice-stack .notice-card p {
    margin: 4px 0 7px; font-size: 12px; line-height: 1.35;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  }
  .notice-foot { gap: 8px; margin-top: 4px; }
  .notice-foot .btn { min-height: 32px; padding: 5px 10px; font-size: 12px; }

  html:not(.is-phone) .survey-body-map > .survey-live.survey-messen {
    grid-template-columns: minmax(280px, 300px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 10px;
  }
  html:not(.is-phone) .survey-messen .survey-live-hud {
    gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  }
  html:not(.is-phone) .survey-messen .survey-method-row { gap: 6px; }
  html:not(.is-phone) .survey-messen .survey-method-row .btn { min-height: 36px; padding: 6px 9px; font-size: 12px; }
  html:not(.is-phone) .survey-messen .survey-map { border-radius: 12px; }
  html:not(.is-phone) .survey-messen .survey-live-pts { grid-column: 1; grid-row: 2; margin: 0; max-height: 30%; overflow: auto; }
}

@media (max-width: 1180px) and (min-width: 861px) {
  .app > header { grid-template-columns: minmax(0, 1fr) minmax(220px, 340px) auto; }
  .app > header .meta { gap: 4px; }
  #tenantLabel { display: none; }
  .proto-side { flex-basis: 206px; width: 206px; min-width: 198px; }
}

@media (prefers-reduced-motion: reduce) {
  .proto-nav, .proto-side, .header-search, .header-search-go, .workspace-splitter::before { transition-duration: .01ms !important; }
}
