/* 交接班页面专用样式，保留各机场原有记录与流转规则。 */
@media screen {
  .handover-page, .handover-list-page { --primary: #285780; --primary-soft: #edf3fa; gap: 20px; }
  .handover-cover {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36%;
    min-height: 156px;
    overflow: hidden;
    border: 1px solid #dbe5ef;
    border-radius: 12px;
    background: #f0f5fa;
  }
  .handover-cover-copy { align-self: center; min-width: 0; padding: 24px 28px; }
  .handover-airport-label { display: flex; gap: 7px; align-items: center; color: #46627d; font-size: 13px; font-weight: 600; }
  .handover-airport-label .ui-icon { width: 16px; height: 16px; }
  .handover-cover h2 { margin: 8px 0 6px; color: #203d5b; font-size: 26px; font-weight: 700; line-height: 1.4; }
  .handover-cover p { margin: 0; color: #52677d; font-size: 14px; line-height: 1.8; }
  .handover-airport-visual { position: relative; min-width: 0; margin: 0; overflow: hidden; background: #d9e5ec; }
  .handover-airport-visual img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
  .handover-cover-xichang .handover-airport-visual img { object-position: center 65%; }
  .handover-airport-visual figcaption { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 5px; color: #fff; background: #243e55e8; font-size: 13px; font-weight: 700; letter-spacing: 1px; }
  .handover-airport-visual figcaption span { font-size: 11px; font-weight: 400; letter-spacing: 0; }

  .handover-page > .duty-hero.handover-toolbar {
    position: sticky;
    top: var(--sticky-topbar-height);
    z-index: 12;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 12px;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 12px #243e5508;
  }
  .handover-section-links { display: flex; flex: 1 1 300px; align-items: center; gap: 3px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
  .handover-section-links button { display: inline-flex; flex-shrink: 0; align-items: center; gap: 6px; min-height: 36px; padding: 7px 9px; border: 0; border-radius: 6px; color: #354d67; background: transparent; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
  .handover-section-links button > span { color: #8192a5; font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
  .handover-section-links button:hover { color: var(--primary); background: #edf3fa; }
  .handover-section-links button:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
  .handover-toolbar .duty-hero-actions { flex: 0 1 auto; justify-content: flex-end; gap: 8px; width: auto; margin-left: auto; }
  .handover-toolbar .status-pill { max-width: 180px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .handover-toolbar .btn { min-height: 36px; font-size: 13px; }
  .handover-toolbar .mode-switch { padding: 2px; }
  .handover-toolbar .mode-switch .btn { min-height: 30px; padding-inline: 9px; }
  .handover-toolbar .mode-switch [data-action] { margin-left: 8px; }

  .handover-page .handover-section {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dfe6ee;
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
    scroll-margin-top: calc(var(--sticky-topbar-height) + var(--handover-toolbar-height, 120px) + 16px);
  }
  .handover-section:focus { outline: none; }
  .handover-section:focus-visible { outline: 2px solid #7598c3; outline-offset: 3px; }
  .handover-page .handover-section-heading { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid #e7edf3; background: #fff; }
  .handover-page .handover-section-heading::before { display: none; }
  .handover-page .handover-section-heading h3 { color: #263e56; font-size: 20px; font-weight: 700; }
  .handover-section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
  .handover-page .handover-section-number { display: grid; flex: 0 0 34px; place-items: center; height: 34px; border-radius: 8px; color: #416894; background: #edf3fa; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .handover-page .duty-meta-grid, .handover-page .duty-read-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 20px; border: 0; background: #fff; }
  .handover-page .duty-meta-grid .field, .handover-page .duty-read-meta .read-field { min-width: 0; padding: 14px; border: 1px solid #e5ebf2; border-radius: 8px; background: #f8fafc; }
  .handover-page .duty-fill-note { padding: 0 20px 18px; border: 0; background: #fff; }
  .handover-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .handover-page textarea { border-color: #cad6e3; border-radius: 7px; background: #fff; font-size: 18px; font-weight: 600; }
  .handover-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus, .handover-page textarea:focus { border-color: #5288bd; box-shadow: 0 0 0 3px #3269a012; }
  .handover-page input::placeholder, .handover-page textarea::placeholder { color: #8593a2; font-size: 16px; font-weight: 400; }
  .handover-page .handover-content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 20px; border: 0; }
  .handover-content-grid > .duty-field, .handover-content-grid > .read-field { min-width: 0; align-content: start; gap: 10px; padding: 16px; border: 1px solid #e2e9f0; border-radius: 8px; background: #fff; overflow-wrap: anywhere; }
  .handover-content-grid > .duty-field:nth-child(2n) { border-right: 1px solid #e2e9f0; }
  .handover-page .handover-metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 0; }
  .handover-metrics-grid > .read-field, .handover-metrics-grid > .duty-field { background: #f4f8fc; border-color: #e1eaf4; }
  .handover-metrics-grid > .read-field > span:last-child { color: #244f7d; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .handover-content-grid > .duty-image-field, .handover-content-grid > .read-field-image, .handover-content-grid > .handover-task-field, .handover-content-grid > .handover-task-read-field { grid-column: 1 / -1; }
  .handover-content-grid .duty-field textarea { min-height: 96px; }
  .handover-metrics-grid .duty-field textarea { min-height: 64px; }
  .handover-content-grid .duty-field-heading { align-items: baseline; margin-bottom: 10px; }
  .handover-page .handover-task-heading > div > label, .handover-page .read-field-heading > span { color: #263e56; font-size: 16px; font-weight: 700; }
  .handover-page .muted-value { font-size: 16px; font-weight: 400; }
  .handover-tasks-section .handover-task-read-row { padding-block: 12px; }
  .handover-tasks-section .handover-task-read-row.completed > strong { color: #6c7d74; }
  .handover-page .handover-task-row { border-radius: 7px; }

  .handover-page .gy-duty-sheet { padding: 0; }
  .handover-page .gy-sheet-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 20px; border-bottom: 1px solid #e7edf3; background: #fff; }
  .handover-page .gy-sheet-heading > div:first-child { flex: 1 1 260px; }
  .handover-page .gy-sheet-heading h3 { color: #263e56; font-size: 20px; font-weight: 700; }
  .gy-readiness-meta { display: flex; flex: 1 1 350px; justify-content: flex-end; gap: 12px; min-width: 0; }
  .gy-readiness-meta > .field, .gy-readiness-meta > .read-field { flex: 1 1 140px; width: auto; min-width: 0; }
  .gy-readiness-meta > .gy-date-field { flex: 1.2 1 180px; }
  .handover-page .gy-readiness-meta .read-field { min-height: auto; padding: 10px 14px; background: #f8fafc; }
  .gy-readiness-meta > .field > label, .gy-readiness-meta > .field > span { color: #263e56; font-size: 16px; font-weight: 700; }
  .gy-readiness-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; padding: 20px; }
  .gy-readiness-card { min-width: 0; padding: 14px; border: 1px solid #e2e9f0; border-radius: 8px; background: #f8fafc; }
  .gy-readiness-card h4 { margin: 0 0 12px; color: #263e56; font-size: 16px; }
  .gy-readiness-times { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .gy-readiness-times > label { display: grid; align-content: start; gap: 6px; min-width: 0; }
  .gy-readiness-times > label > span:first-child { color: #53677d; font-size: 14px; font-weight: 500; }
  .gy-readiness-times > label > span:last-child { color: var(--ink); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
  .gy-readiness-times input { min-width: 0; padding: 7px; }
  .handover-page .gy-shift-number { width: 32px; height: 32px; border-radius: 8px; font-size: 16px; }
  .handover-page .gy-shift-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 20px; border: 0; }
  .handover-page .gy-shift-meta > * { padding: 14px; border: 1px solid #e5ebf2; border-radius: 8px; background: #f8fafc; }
  .handover-page .gy-handover-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 20px; border: 0; }
  .handover-page .gy-detail-field, .handover-page .gy-handover-detail-grid > .readonly-field { align-content: start; padding: 16px; border: 1px solid #e2e9f0; border-radius: 8px; background: #fff; overflow-wrap: anywhere; }
  .handover-page .gy-detail-field > span b { color: #486c94; background: #edf3fa; }
  .handover-page .gy-duty-sheet > .duty-section-title { align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin: 0 20px; padding: 12px 14px; border: 0; border-left: 3px solid #6b91bb; border-radius: 0 6px 6px 0; background: #f4f7fb; }
  .handover-page .gy-duty-sheet > .duty-section-title h3 { color: #304d6b; font-size: 18px; }
  .handover-page .gy-transfer-list, .handover-page .gy-transfer-read { display: grid; gap: 10px; padding: 20px; }
  .handover-page .gy-transfer-read-item { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; padding: 14px; border-color: #e5d6b7; border-radius: 8px; background: #fffbf2; }
  .handover-page .gy-transfer-read-item > span { color: var(--ink); font-size: 18px; font-weight: 600; line-height: 1.8; overflow-wrap: anywhere; }
  .handover-page .gy-transfer-read-item > strong { color: #926422; font-size: 13px; white-space: nowrap; }
  .handover-page .gy-transfer-read-item.done { border-color: #cfe3d8; background: #f3f9f6; }
  .handover-page .gy-transfer-read-item.done > strong { color: #327055; }
  .handover-page .gy-transfer-item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; border: 1px solid #e2e9f0; border-radius: 8px; background: #fff; }
  .handover-page .gy-transfer-item > input:not([type="checkbox"]) { flex: 1 1 260px; width: auto; min-width: 0; }
  .handover-page .gy-transfer-check { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
  .handover-page .gy-transfer-check input { width: 18px; height: 18px; min-height: 18px; margin: 0; padding: 0; accent-color: var(--primary); }
  .handover-page .gy-transfer-check > span { font-size: 14px; font-weight: 500; }
}

@media screen and (max-width: 1199px) {
  .handover-page .duty-meta-grid, .handover-page .duty-read-meta, .handover-page .gy-shift-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .handover-page .gy-handover-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .handover-cover-copy { padding: 22px; }
  .handover-airport-visual figcaption span { display: none; }
}

@media screen and (max-width: 860px) {
  .handover-page > .duty-hero.handover-toolbar { gap: 8px; padding: 10px; }
  .handover-section-links { flex-basis: 100%; }
  .handover-toolbar .duty-hero-actions { flex: 1 1 100%; justify-content: flex-start; margin: 0; }
  .handover-toolbar .status-pill { margin-right: auto; }
}

@media screen and (max-width: 600px) {
  .handover-page, .handover-list-page { gap: 14px; }
  .handover-cover { grid-template-columns: minmax(0, 1fr); }
  .handover-cover-copy { padding: 20px; }
  .handover-cover h2 { font-size: 24px; }
  .handover-airport-visual { height: 110px; }
  .handover-airport-visual img { object-position: center 58%; }
  .handover-airport-visual figcaption { right: 10px; bottom: 10px; }
  .handover-section-links { gap: 0; }
  .handover-section-links button { gap: 4px; padding-inline: 7px; font-size: 13px; }
  .handover-toolbar .status-pill { flex-basis: 100%; max-width: 100%; padding: 3px 6px; }
  .handover-toolbar .mode-switch { flex: 1; flex-wrap: nowrap; gap: 2px; }
  .handover-toolbar .mode-switch .btn { flex: 1; min-height: 34px; padding: 5px 6px; font-size: 12px; white-space: nowrap; }
  .handover-toolbar .mode-switch [data-action] { margin-left: 0; }
  .handover-toolbar .duty-hero-actions > .btn { padding-inline: 6px; font-size: 12px; white-space: nowrap; }
  .handover-page .handover-section-heading { padding: 16px; }
  .handover-page .duty-meta-grid, .handover-page .duty-read-meta, .handover-page .gy-shift-meta { gap: 10px; padding: 14px; }
  .handover-page .duty-meta-grid { grid-template-columns: minmax(0, 1fr); }
  .handover-page .duty-meta-grid .field, .handover-page .duty-read-meta .read-field, .handover-page .gy-shift-meta > * { padding: 10px; }
  .handover-page .handover-content-grid, .handover-page .handover-metrics-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px; }
  .handover-page .handover-metrics-grid { padding-bottom: 0; }
  .handover-page .gy-handover-detail-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 14px; }
  .handover-page .gy-sheet-heading { padding: 16px; }
  .gy-readiness-meta { flex-basis: 100%; gap: 10px; }
  .gy-readiness-meta:has(.field) { flex-wrap: wrap; }
  .gy-readiness-meta > .field, .gy-readiness-meta > .gy-date-field { flex-basis: 100%; }
  .gy-readiness-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px; }
  .handover-page .gy-duty-sheet > .duty-section-title { margin-inline: 14px; }
  .handover-page .gy-transfer-list, .handover-page .gy-transfer-read { padding: 14px; }
  .handover-page .gy-transfer-read-item { grid-template-columns: 18px minmax(0, 1fr); }
  .handover-page .gy-transfer-read-item > strong { grid-column: 2; }
  .handover-page .gy-transfer-item .gy-transfer-check { order: 1; }
  .handover-page .gy-transfer-item > .btn { order: 2; margin-left: auto; }
  .handover-page .gy-transfer-item > input:not([type="checkbox"]) { order: 3; flex-basis: 100%; }
  .handover-page .gy-transfer-item .carried-badge { order: 4; }
  .handover-page .handover-task-heading, .handover-page .read-field-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .handover-page .handover-task-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0; }
  .handover-page .handover-task-row .handover-task-number { flex: 0 0 24px; }
  .handover-page .handover-task-row .handover-task-text { flex: 1 1 calc(100% - 36px); width: 0; min-width: 0; }
  .handover-page .handover-task-row .handover-task-check { margin-left: auto !important; }
  .handover-page .handover-task-row .carried-badge { margin-left: 32px; }
  .handover-page .handover-task-read-row { grid-template-columns: 20px 24px minmax(0, 1fr); gap: 8px; align-items: start; }
  .handover-page .handover-task-read-row .carried-badge { grid-column: 3; justify-self: start; }
}

@media print {
  .handover-cover, .handover-toolbar { display: none !important; }
  .gy-readiness-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .gy-readiness-card { break-inside: avoid; padding: 8px; border: 1px solid #ccc; }
  .gy-readiness-times { display: grid; gap: 6px; }
  .gy-readiness-times > label { display: flex; justify-content: space-between; gap: 8px; }
}
