/* Responsive application header and progressive first-area setup. */
@media screen {
  .top-project-bar.pro-topbar {
    height: auto !important;
    min-height: 60px !important;
  }
  .top-project-bar.pro-topbar .project-top-row {
    height: auto !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
  }
  .top-project-bar.pro-topbar .project-title-field {
    flex: 1 1 220px !important;
    min-width: 0 !important;
    max-width: 360px !important;
  }
  .top-project-bar.pro-topbar .project-actions.office-actions {
    flex: 1 1 auto !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .top-project-bar.pro-topbar .office-right-actions {
    flex-wrap: wrap;
    min-width: 0;
  }
  body.is-onboarding-only .app.pro-layout-app {
    width: 100%; max-width: none; padding: 0; gap: 0;
    grid-template-rows: auto 1fr;
  }
  body.is-onboarding-only .top-project-bar.pro-topbar {
    margin: 0 !important; width: 100%; border-radius: 0;
    padding: 12px clamp(16px, 3vw, 48px) !important;
  }
  body.is-onboarding-only .top-project-bar .project-top-row::before {
    content: 'demaLoad'; width: auto;
  }
  body.is-onboarding-only .office-menu[data-office-menu="export"],
  body.is-onboarding-only .office-right-actions > :not(#openUserGuideBtn) {
    display: none !important;
  }
  body.is-onboarding-only .top-project-bar .project-actions.office-actions {
    justify-content: flex-end !important;
  }
  body.is-onboarding-only .top-project-bar.pro-topbar .office-right-actions { margin-left: 0; width: auto; flex: 0 0 auto; }
  body.is-onboarding-only .top-project-bar.pro-topbar .office-menu { flex: 0 0 auto; }
  body.is-onboarding-only .main-card.pro-workspace { min-height: 0; }
  body.is-onboarding-only #workspaceGuide {
    min-height: 0; padding: clamp(16px, 3vh, 28px) clamp(16px, 3vw, 40px);
    box-sizing: border-box;
  }
  body.is-onboarding-only .workspace-guide-shell {
    width: min(100%, 1360px); box-sizing: border-box;
    padding: clamp(20px, 2vw, 28px); gap: 18px;
    border-radius: 16px; box-shadow: 0 8px 32px #24334808;
    border-color: #dce2e9; background: #fff;
  }
  body.is-onboarding-only { background: #f3f5f7; }
  body.is-onboarding-only .workspace-guide-copy { text-align: left; justify-items: start; gap: 10px; }
  .workspace-guide-title { margin: 0; font-size: clamp(23px, 3vw, 30px); font-weight: 700; letter-spacing: -.025em; }
  .workspace-guide-kicker { padding: 0; background: none; border-radius: 0; color: #2463a8; }
  .workspace-template-card {
    position: relative; padding: 16px; gap: 6px;
    border-radius: 10px; box-shadow: none; transition: border-color .15s, background .15s;
  }
  .workspace-template-card:hover { transform: none; background: #f6f9fd; box-shadow: none; }
  .workspace-template-card.is-active { background: #edf4fc; border-color: #2463a8; box-shadow: inset 0 0 0 1px #2463a8; }
  .workspace-template-card.is-custom { border-style: dashed; }
  .template-icon { width: 44px; height: 32px; color: #57728e; margin-bottom: 6px; }
  .template-icon.template-icon-vehicle { width: 78px; height: 34px; max-width: 100%; }
  .workspace-template-card .template-selected { visibility: hidden; color: #2463a8; font-weight: 600; font-size: 11px; }
  .workspace-template-card.is-active .template-selected { visibility: visible; }
  body.is-onboarding-only details.workspace-guide-card { display: block; padding: 0; border: 0; border-radius: 0; background: none; }
  .workspace-guide-card summary { cursor: pointer; color: #2463a8; font-weight: 600; font-size: 14px; padding: 4px 0; }
  .workspace-guide-card[open] .workspace-guide-fields { margin-top: 16px; padding: 20px; background: #f6f8fa; border: 1px solid #dce2e9; border-radius: 10px; }
  .workspace-guide-field { min-width: 0; font-size: 12px; }
  .workspace-guide-field input, .workspace-guide-field select { width: 100%; min-width: 0; box-sizing: border-box; }
  .workspace-guide-actions-center { justify-content: space-between; align-items: center; gap: 20px; padding-top: 20px; border-top: 1px solid #e4e9ef; }
  .onboarding-selection { display: grid; gap: 5px; min-width: 0; }
  .onboarding-completion { display: grid; gap: 18px; min-width: 0; align-content: start; }
  .onboarding-project-name .project-title-field {
    display: grid; gap: 8px; width: 100%; max-width: none;
    min-width: 0; color: #5e6d80; font-size: 12px; font-weight: 600;
  }
  .onboarding-project-name .project-title-field input {
    width: 100%; box-sizing: border-box; min-height: 44px;
    background: #f6f8fa; border: 1px solid #dce2e9; border-radius: 8px;
    color: #243348; font-size: 14px; font-weight: 400;
  }
  .onboarding-selection strong { font-size: 14px; color: #243348; }
  .onboarding-selection span { font-size: 12px; color: #5e6d80; line-height: 1.5; }
  .workspace-guide-actions-center #onboardingAddAreaBtn { min-width: 200px; min-height: 46px; margin: 0; border-radius: 8px; background: #2463a8; color: #fff; }
  .workspace-guide-actions-center #onboardingAddAreaBtn:disabled { background: #e5eaf0; color: #677587; opacity: 1; cursor: not-allowed; }
  @media (max-width: 1100px) {
    body:not(.is-onboarding-only) .top-project-bar.pro-topbar .project-actions.office-actions { flex-basis: 100% !important; }
  }
  @media (min-width: 960px) {
    body.is-onboarding-only .workspace-guide-shell { grid-template-columns: minmax(0, 1fr) clamp(320px, 30vw, 410px); column-gap: 24px; align-items: start; }
    .workspace-guide-copy { grid-column: 1 / -1; }
    body.is-onboarding-only .workspace-template-grid { grid-column: 1; grid-row: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    #onboardingDetails { grid-column: 1; grid-row: 3; }
    .onboarding-completion { grid-column: 2; grid-row: 2 / 4; padding: 20px; background: #f6f8fa; border: 1px solid #dce2e9; border-radius: 10px; }
    .onboarding-completion .workspace-guide-actions-center { flex-direction: column; align-items: stretch; gap: 20px; }
    .onboarding-completion #onboardingAddAreaBtn { width: 100%; min-width: 0; }
    .workspace-template-card { padding: 12px; gap: 4px; }
    .workspace-guide-card[open] .workspace-guide-fields { margin-top: 10px; padding: 12px; gap: 10px; }
  }
  @media (min-width: 621px) and (max-width: 959px) {
    body.is-onboarding-only .workspace-template-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .onboarding-completion { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
    .onboarding-completion .workspace-guide-actions-center { flex-direction: column; align-items: stretch; border-top: 0; padding-top: 0; gap: 10px; }
    .onboarding-completion #onboardingAddAreaBtn { min-width: 0; width: 100%; }
  }
  @media (max-width: 620px) {
    .top-project-bar.pro-topbar .project-title-field { max-width: none !important; flex: 1 1 160px !important; }
    body.is-onboarding-only .top-project-bar .project-actions.office-actions { width: 100% !important; justify-content: flex-start !important; }
    body.is-onboarding-only .workspace-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .workspace-template-card { padding: 10px; gap: 4px; }
    .workspace-template-card .template-selected { position: absolute; top: 8px; right: 8px; font-size: 0; }
    .workspace-template-card.is-active .template-selected::after { content: '✓'; font-size: 13px; }
    .workspace-template-card strong { font-size: 13px; }
    .workspace-template-card span { font-size: 11px; }
    .template-icon { width: 36px; height: 26px; margin-bottom: 2px; }
    .template-icon.template-icon-vehicle { width: 68px; height: 30px; }
    .workspace-guide-actions-center { flex-direction: column; align-items: stretch; gap: 14px; }
    body.is-onboarding-only .workspace-guide-actions-center #onboardingAddAreaBtn { width: 100%; min-width: 0; }
    .top-project-bar.pro-topbar .office-menu-panel { min-width: min(220px, calc(100vw - 32px)); }
  }
}
