/* Shared APP section navigation, 0.22.5. Keep module IDs, routes and permissions intact. */
@media screen {
  .twmio-shell-body header.twmio-section-header {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
    min-height: 78px;
    padding: 14px clamp(18px, 2vw, 34px);
    margin-block: 0;
    border-bottom: 1px solid #dce3ec;
    background: #fff;
    color: #183b68;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  }
  .twmio-shell-body .twmio-page-heading,
  .twmio-shell-body .twmio-section-header > .lp-report-heading {
    display: block;
    margin: 0;
    flex: 1 1 260px;
    min-width: 0;
  }
  .twmio-shell-body .twmio-section-header .twmio-page-heading :is(h1, strong) {
    display: block;
    margin: 0;
    color: #183b68;
    font-size: 22px !important;
    font-weight: 600;
    line-height: 1.4 !important;
    letter-spacing: 0;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  .twmio-shell-body .twmio-section-header .twmio-page-heading :is(small, p) {
    display: block;
    margin: 2px 0 0;
    color: #657084;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
  }
  .twmio-shell-body .twmio-section-header .twmio-section-actions {
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px !important;
    width: auto;
    min-width: 0;
    max-width: 100%;
    margin-left: auto;
  }
  .twmio-shell-body .twmio-section-actions > span {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #657084;
    font-size: 12px;
    font-weight: 400;
  }
  /* Explicit opt-in prevents changes to upload/save/delete controls in module dialogs. */
  .twmio-shell-body .twmio-section-header .twmio-nav-button,
  .twmio-shell-body button.twmio-back,
  .twmio-shell-body #twmio-prospects .prospect-heading [data-action="back-projects"],
  .twmio-shell-body #twmio-prospects .prospect-detail > [data-action="show-list"] {
    box-sizing: border-box;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto !important;
    min-width: 0 !important;
    min-height: 34px !important;
    margin: 0;
    padding: 6px 10px !important;
    border: 1px solid #f6b27f !important;
    border-radius: 10px !important;
    background: #fff8f2 !important;
    color: #a84708 !important;
    font: 700 13px/1.4 system-ui, sans-serif !important;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: none !important;
    cursor: pointer;
    transform: none !important;
  }
  .twmio-shell-body .twmio-section-header .twmio-nav-home {
    padding-inline: 12px !important;
    border-color: #ce6516 !important;
    background: #e87822 !important;
    color: #fff !important;
    box-shadow: 0 2px 5px #70330618 !important;
  }
  .twmio-shell-body .twmio-nav-home::before { content: '⌂'; font-size: 19px; line-height: 1; }
  .twmio-shell-body .twmio-section-header .twmio-nav-button:hover,
  .twmio-shell-body button.twmio-back:hover { background: #ffeddf !important; }
  .twmio-shell-body .twmio-section-header .twmio-nav-home:hover { background: #c65c0e !important; }
  .twmio-shell-body .twmio-nav-button:focus-visible,
  .twmio-shell-body button.twmio-back:focus-visible { outline: 3px solid #2176c1; outline-offset: 3px; }
  .twmio-shell-body .twmio-section-header [hidden] { display: none !important; }
  .twmio-shell-body .twmio-section-header .twmio-nav-button:disabled { opacity: .48; cursor: not-allowed; }
  .twmio-shell-body .twmio-section-tools { padding: 12px clamp(18px, 2vw, 34px); }
  .twmio-shell-body .twmio-section-tools .twmio-ftth-controls {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  }
  .twmio-shell-body .twmio-section-tools .twmio-ftth-actions { display: block; }
  .twmio-shell-body .twmio-section-tools .lp-toolbar { width: auto; display: block; }
  .twmio-shell-body .twmio-section-tools .lp-palette-box { width: fit-content; max-width: 100%; }
  .twmio-shell-body .twmio-section-header .lp-report-subtitle { margin-top: 2px; font-size: 12px; line-height: 18px; gap: 4px 8px; }
  .twmio-shell-body .twmio-section-tools .lp-status-chip { padding: 4px 8px; font-size: 11px; }
  .twmio-shell-body .twmio-section-tools:has(.lp-toolbar) { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
  .twmio-shell-body .twmio-report-status { display: flex; flex-wrap: wrap; gap: 6px; }
}
@media screen and (max-width: 600px) {
  .twmio-shell-body header.twmio-section-header { padding: 12px; gap: 10px; }
  .twmio-shell-body .twmio-section-header > .twmio-page-heading,
  .twmio-shell-body .twmio-section-header > .lp-report-heading { flex-basis: 100%; }
  .twmio-shell-body .twmio-section-header .twmio-page-heading :is(h1, strong) { font-size: 20px !important; }
  .twmio-shell-body .twmio-section-header .twmio-section-actions { width: 100%; gap: 8px; }
  .twmio-shell-body .twmio-section-header .twmio-nav-button,
  .twmio-shell-body button.twmio-back,
  .twmio-shell-body #twmio-prospects .prospect-heading [data-action="back-projects"],
  .twmio-shell-body #twmio-prospects .prospect-detail > [data-action="show-list"] { min-height: 44px !important; }
  .twmio-shell-body .twmio-section-tools { padding: 10px 12px; }
}
@media print {
  .twmio-shell-body .twmio-section-actions,
  .twmio-shell-body .twmio-section-tools { display: none !important; }
  .twmio-shell-body .twmio-section-tools:has(.twmio-report-status) { display: block !important; padding: 0 12px 8px; }
  .twmio-shell-body .twmio-section-tools .lp-toolbar { display: none !important; }
  .twmio-shell-body .twmio-report-status { display: flex !important; gap: 8px; color: #172033; }
}
