:root {
  --ink: #13232b;
  --muted: #6f7e86;
  --navy: #073b4c;
  --navy-2: #0c5366;
  --sea: #0f8295;
  --aqua: #2ca9a1;
  --sand: #f0b35b;
  --danger: #c94b50;
  --success: #18866c;
  --line: #dce5e8;
  --surface: #ffffff;
  --canvas: #f3f7f8;
  --shadow: 0 12px 36px rgba(7, 59, 76, .09);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 14px/1.55 "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 30px; letter-spacing: -.5px; }
h2 { margin-bottom: 4px; font-size: 19px; }
.hidden, [hidden] { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin-bottom: 5px; color: var(--sea); font-size: 11px; font-weight: 800; letter-spacing: 1.8px; }
.card { border: 1px solid rgba(7, 59, 76, .06); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.brand-mark { display: grid; width: 64px; height: 64px; place-items: center; border: 2px solid rgba(255,255,255,.45); border-radius: 18px; background: rgba(255,255,255,.14); color: white; font: 800 23px/1 Georgia, serif; letter-spacing: -2px; }
.brand-mark.small { width: 40px; height: 40px; border: none; border-radius: 12px; background: linear-gradient(145deg, var(--sea), var(--navy)); font-size: 16px; }
.brand-mark img { display: block; width: 86%; height: 86%; object-fit: contain; }
.brand-mark.small img { width: 88%; height: 88%; }
.btn { min-height: 42px; padding: 0 18px; border: 1px solid transparent; border-radius: 11px; font-weight: 700; transition: .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--navy); color: white; box-shadow: 0 7px 18px rgba(7,59,76,.18); }
.btn.secondary { border-color: var(--line); background: #fff; color: var(--navy); }
.btn.danger { background: #fff0f0; color: var(--danger); }
.btn.full { width: 100%; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 12px; }
.text-btn { padding: 4px; border: 0; background: none; color: var(--sea); font-weight: 700; }
.icon-btn { padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: #dcecee; }
.icon-btn:hover { background: rgba(255,255,255,.08); }
label { display: grid; gap: 7px; color: #41535b; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: #fff; transition: border .18s, box-shadow .18s; }
input:focus, select:focus, textarea:focus { border-color: var(--sea); box-shadow: 0 0 0 3px rgba(15,130,149,.11); }
textarea { resize: vertical; }
.stack-lg { display: grid; gap: 19px; }
.form-error { margin: -7px 0 0; color: var(--danger); text-align: center; }

/* 登录 */
.login-page { min-height: 100vh; background: radial-gradient(circle at 12% 12%, #177990 0, #073b4c 42%, #052b39 100%); }
.login-shell { display: grid; width: min(1040px, calc(100% - 40px)); min-height: 100vh; margin: auto; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 80px; }
.login-brand { position: relative; color: white; }
.login-brand .eyebrow { margin-top: 34px; color: #91d6d3; }
.login-brand h1 { margin: 0 0 18px; font-size: clamp(48px, 7vw, 78px); letter-spacing: -4px; }
.login-brand > p:last-of-type { max-width: 560px; color: #c4dfe3; font-size: 18px; }
.route-line { display: flex; width: 320px; margin-top: 55px; align-items: center; }
.route-line span { width: 12px; height: 12px; border: 3px solid #8bd2d0; border-radius: 50%; }
.route-line b { height: 1px; flex: 1; background: linear-gradient(90deg,#8bd2d0,rgba(139,210,208,.15)); }
.login-card { padding: 42px; }
.login-card h2 { font-size: 28px; }
.login-card form { margin-top: 32px; }
.security-note { margin: 26px 0 0; color: #92a0a6; font-size: 11px; text-align: center; }

/* 调度工作台 */
.topbar { position: fixed; z-index: 30; top: 0; right: 0; left: 0; display: flex; height: 66px; padding: 0 26px; align-items: center; justify-content: space-between; background: var(--navy); color: white; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand > span:last-child { display: grid; line-height: 1.2; }
.brand b { font-size: 16px; }
.brand small { margin-top: 4px; color: #9fc1c8; font-size: 10px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.live-dot { position: relative; margin-right: 15px; color: #a7dcd2; font-size: 12px; }
.live-dot::before { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #45d59c; content: ""; box-shadow: 0 0 0 4px rgba(69,213,156,.12); }
.workspace { display: grid; min-height: 100vh; padding-top: 66px; grid-template-columns: 220px 1fr; }
.sidebar { position: fixed; top: 66px; bottom: 0; width: 220px; padding: 24px 15px; border-right: 1px solid var(--line); background: #fff; }
.user-panel { display: flex; padding: 5px 10px 22px; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); }
.user-panel > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: #e4f2f2; color: var(--navy); font-weight: 800; }
.user-panel div { display: grid; }
.user-panel small { color: var(--muted); }
.sidebar nav { display: grid; gap: 5px; margin-top: 22px; }
.sidebar nav button { padding: 12px 14px; border: 0; border-radius: 10px; background: transparent; color: #607079; text-align: left; font-weight: 700; }
.sidebar nav button:hover, .sidebar nav button.active { background: #eaf4f4; color: var(--navy); }
.sidebar-foot { position: absolute; bottom: 18px; left: 25px; color: #98a7ad; font-size: 11px; line-height: 1.7; }
.content { min-width: 0; padding: 32px 36px 60px; grid-column: 2; }
.view { display: none; animation: rise .24s ease; }
.view.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } }
.page-heading { display: flex; margin-bottom: 26px; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-heading p { margin-bottom: 0; }
.stats-grid { display: grid; margin-bottom: 24px; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { display: grid; min-height: 130px; padding: 21px; align-content: space-between; }
.stat span { color: var(--muted); font-weight: 700; }
.stat b { color: var(--navy); font-size: 31px; }
.stat small { color: #93a2a8; }
.stat.accent { background: linear-gradient(145deg,var(--navy-2),var(--navy)); color: white; }
.stat.accent span, .stat.accent small { color: #acd0d5; }
.stat.accent b { color: white; font-size: 23px; }
.dashboard-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; }
.section-card { padding: 23px; }
.section-title { display: flex; margin-bottom: 20px; align-items: center; justify-content: space-between; gap: 15px; }
.section-title p { margin: 0; color: var(--muted); font-size: 12px; }
.list-state { min-height: 90px; color: var(--muted); }
.empty-state { display: grid; min-height: 130px; padding: 25px; place-items: center; border: 1px dashed #cbdadd; border-radius: 13px; color: #87969c; text-align: center; }
.form-row { display: grid; gap: 15px; }
.form-row.three { grid-template-columns: 1fr 1fr 1.6fr; }
.planner-grid { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 18px; }
.plan-input { min-height: 230px; margin-top: 7px; white-space: pre; font-family: Consolas, monospace; font-size: 12px; }
.excel-upload-panel { display: grid; margin-top: 17px; gap: 10px; }
.excel-dropzone { min-height: 150px; padding: 22px; place-content: center; border: 2px dashed #aacbd0; border-radius: 14px; background: #f5faf9; text-align: center; cursor: pointer; }
.excel-dropzone:hover { border-color: var(--sea); background: #eef8f7; }
.excel-drop-title { color: var(--navy); font-size: 17px; font-weight: 900; }
.excel-dropzone small { color: var(--muted); font-weight: 500; }
.excel-dropzone input { max-width: 410px; margin: 8px auto 0; padding: 7px; border: 0; background: transparent; }
.excel-detection { display: flex; min-height: 46px; padding: 10px 13px; align-items: center; border: 1px solid #dbe7e9; border-radius: 10px; background: white; gap: 10px; }
.excel-detection b { color: var(--navy); }
.helper-row, .button-row, .filter-line { display: flex; margin-top: 13px; align-items: center; justify-content: space-between; gap: 12px; }
.helper-row { color: var(--muted); font-size: 12px; }
.button-row { justify-content: flex-end; }
.tip-card { padding: 25px; background: linear-gradient(160deg,#0c5366,#073b4c); color: white; }
.tip-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.12); font-weight: 900; }
.tip-card h3 { margin-top: 24px; font-size: 19px; }
.tip-card ol { padding-left: 20px; color: #bfdae0; line-height: 2.2; }
#preview-card { margin-top: 18px; }
.alert { margin: 12px 0; padding: 12px 14px; border-radius: 10px; }
.alert.error { background: #fff0f0; color: #a3343a; }
.alert.success { background: #e8f7f1; color: #116e59; }
.table-wrap { max-width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 12px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { position: sticky; z-index: 1; top: 0; background: #edf4f5; color: #52666f; font-size: 11px; }
tr:last-child td { border-bottom: 0; }
.plan-admin-list, .announcement-admin-list { display: grid; gap: 14px; }
.admin-plan-card { padding: 19px 21px; }
.admin-plan-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.admin-plan-title { display: flex; align-items: center; gap: 13px; }
.date-block { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 13px; background: #e7f2f3; color: var(--navy); font-size: 12px; line-height: 1.1; }
.date-block b { font-size: 20px; }
.admin-plan-title h3 { margin: 0; }
.admin-plan-title p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.plan-meta-row { display: flex; margin-top: 16px; padding-top: 14px; align-items: center; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.status-pill, .badge { display: inline-flex; padding: 4px 9px; align-items: center; border-radius: 999px; font-size: 11px; font-weight: 800; }
.status-draft { background: #eef1f2; color: #68767b; }
.status-active { background: #e2f5ec; color: #13725c; }
.status-next_published { background: #e5f1fa; color: #27668b; }
.status-archived { background: #f0edf5; color: #69577b; }
.receipt-grid { display: grid; margin-top: 15px; grid-template-columns: repeat(auto-fill,minmax(130px,1fr)); gap: 8px; }
.receipt-chip { padding: 10px; border-radius: 10px; background: #f2f5f6; font-size: 11px; }
.receipt-chip.confirmed { background: #e5f5ee; color: #176d59; }
.receipt-chip b, .receipt-chip small { display: block; }
.receipt-chip small { margin-top: 3px; color: #819097; }
.notice-admin-card { display: grid; padding: 20px 22px; grid-template-columns: 1fr auto; gap: 15px; }
.notice-admin-card p { margin: 8px 0 0; color: var(--muted); white-space: pre-wrap; }
.level-urgent { color: var(--danger); }
.level-important { color: #9a6416; }

/* 弹窗 */
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; padding: 20px; place-items: center; background: rgba(4,28,36,.56); backdrop-filter: blur(4px); }
.modal { width: min(720px,100%); max-height: calc(100vh - 40px); padding: 26px; overflow: auto; border-radius: 20px; background: white; box-shadow: 0 28px 90px rgba(0,0,0,.3); }
.modal.wide { width: min(1120px,100%); }
.modal-head { display: flex; margin-bottom: 20px; align-items: flex-start; justify-content: space-between; gap: 15px; }
.modal-head p { margin: 4px 0 0; color: var(--muted); }
.modal-close { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #edf2f3; font-size: 20px; }
.modal-form { display: grid; gap: 15px; }
.modal-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.modal-actions { display: flex; margin-top: 20px; justify-content: flex-end; gap: 10px; }
.toast-root { position: fixed; z-index: 150; top: 80px; right: 18px; display: grid; width: min(360px,calc(100% - 36px)); gap: 10px; }
.toast { padding: 14px 16px; border: 1px solid rgba(255,255,255,.2); border-radius: 13px; background: #073b4cee; color: white; box-shadow: 0 13px 35px rgba(7,59,76,.24); animation: toast-in .25s ease; }
.toast b, .toast small { display: block; }
.toast small { margin-top: 4px; color: #c3dde1; }
@keyframes toast-in { from { opacity: 0; transform: translateX(15px); } }

/* 拖轮端 */
.mobile-page { min-height: 100vh; padding-bottom: calc(70px + env(safe-area-inset-bottom)); background: #f1f6f7; }
.mobile-header { position: sticky; z-index: 30; top: 0; display: flex; height: 66px; padding: 0 16px; align-items: center; justify-content: space-between; background: var(--navy); color: white; }
.notification-button { position: relative; padding: 8px 11px; border: 1px solid rgba(255,255,255,.15); border-radius: 10px; background: rgba(255,255,255,.08); color: white; }
.notification-button b { position: absolute; top: -7px; right: -6px; display: grid; min-width: 19px; height: 19px; padding: 0 5px; place-items: center; border-radius: 20px; background: #e44e55; font-size: 10px; }
.mobile-content { max-width: 1200px; margin: 0 auto; padding: 19px 14px 30px; }
.mobile-view { display: none; }
.mobile-view.active { display: block; animation: rise .2s ease; }
.mobile-greeting { display: flex; margin: 2px 2px 16px; align-items: center; justify-content: space-between; }
.mobile-greeting p { margin-bottom: 2px; color: var(--muted); }
.mobile-greeting h1 { margin: 0; font-size: 25px; }
.badge.success { background: #e2f5ec; color: #13725c; }
.badge.offline { background: #f4ecec; color: #a23b42; }
.segmented { display: grid; padding: 4px; border-radius: 13px; background: #e1e9eb; grid-template-columns: repeat(3,1fr); }
.segmented button, .category-tabs button { padding: 9px; border: 0; border-radius: 10px; background: transparent; color: #6f8088; font-weight: 800; }
.segmented button.active { background: white; color: var(--navy); box-shadow: 0 3px 10px rgba(7,59,76,.09); }
.category-tabs { display: grid; margin: 12px 0 15px; border-bottom: 1px solid var(--line); grid-template-columns: 1fr 1fr; }
.category-tabs button { border-radius: 0; }
.category-tabs button.active { position: relative; color: var(--navy); }
.category-tabs button.active::after { position: absolute; right: 26%; bottom: -1px; left: 26%; height: 3px; border-radius: 3px; background: var(--sea); content: ""; }
.tug-plan-list { display: grid; gap: 13px; }
.batch-header-card { padding: 16px; }
.batch-title-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.batch-title-line h2 { margin: 0; font-size: 17px; }
.batch-subtitle { display: flex; margin: 7px 0 0; color: var(--muted); font-size: 11px; gap: 12px; }
.receipt-action { display: flex; margin-top: 13px; padding-top: 12px; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.receipt-action p { margin: 0; color: var(--muted); font-size: 11px; }
.plan-card { overflow: hidden; }
.plan-card-main { padding: 16px; }
.plan-time-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.plan-time { color: var(--navy); font-size: 20px; font-weight: 900; }
.direction { padding: 4px 9px; border-radius: 7px; background: #e5f1f3; color: var(--navy); font-size: 11px; font-weight: 900; }
.ship-name { margin: 7px 0 2px; font-size: 19px; }
.ship-en { margin: 0; color: var(--muted); font-size: 12px; }
.assignments { display: flex; margin: 14px 0 9px; gap: 7px; flex-wrap: wrap; }
.tug-tag { padding: 5px 9px; border-radius: 8px; background: var(--navy); color: white; font-size: 11px; font-weight: 800; }
.facts { display: grid; margin: 12px 0; grid-template-columns: 1fr 1fr; gap: 9px; }
.fact { min-width: 0; padding: 9px 10px; border-radius: 9px; background: #f2f6f7; }
.fact small, .fact b { display: block; }
.fact small { color: var(--muted); font-size: 10px; }
.fact b { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.copyable { cursor: pointer; color: var(--sea); }
.remark { margin: 10px 0 0; padding: 10px; border-left: 3px solid var(--sand); border-radius: 0 8px 8px 0; background: #fff8ec; color: #795b2e; font-size: 12px; }
.plan-card-actions { display: grid; border-top: 1px solid var(--line); grid-template-columns: repeat(3,1fr); }
.plan-card-actions button { padding: 11px 6px; border: 0; border-right: 1px solid var(--line); background: white; color: var(--navy); font-size: 11px; font-weight: 800; }
.plan-card-actions button:last-child { border-right: 0; }
.feedback-done { padding: 11px; border-top: 1px solid var(--line); background: #e7f6ef; color: #156d58; font-size: 12px; text-align: center; font-weight: 800; }
.mobile-title { margin: 5px 2px 18px; }
.notice-list { display: grid; gap: 12px; }
.notice-card { padding: 17px; }
.notice-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.notice-card h3 { margin: 0; font-size: 16px; }
.notice-card > p { margin: 10px 0; color: #4e6068; white-space: pre-wrap; }
.notice-meta { display: flex; padding-top: 10px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.profile-hero { display: flex; margin: 8px 2px 22px; align-items: center; gap: 14px; }
.profile-hero > span { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 18px; background: linear-gradient(145deg,var(--sea),var(--navy)); color: white; font-size: 21px; font-weight: 900; }
.profile-hero h1 { margin: 0; font-size: 23px; }
.profile-hero p { margin: 2px 0 0; color: var(--muted); }
.settings-card { overflow: hidden; border-radius: 16px; background: white; box-shadow: var(--shadow); }
.settings-card button { display: flex; width: 100%; padding: 17px 18px; border: 0; border-bottom: 1px solid var(--line); align-items: center; justify-content: space-between; background: white; font-weight: 700; }
.settings-card button:last-child { border-bottom: 0; color: var(--danger); }
.settings-card b { color: #93a2a8; font-size: 20px; }
.version-label { margin-top: 30px; color: #9ba8ad; font-size: 10px; text-align: center; }
.bottom-nav { position: fixed; z-index: 40; right: 0; bottom: 0; left: 0; display: grid; height: calc(63px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); grid-template-columns: repeat(3,1fr); backdrop-filter: blur(12px); }
.bottom-nav button { position: relative; border: 0; background: transparent; color: #89979d; font-size: 12px; font-weight: 800; }
.bottom-nav button.active { color: var(--navy); }
.bottom-nav button.active::before { position: absolute; top: 0; right: 36%; left: 36%; height: 3px; border-radius: 0 0 3px 3px; background: var(--sea); content: ""; }
.bottom-nav b { position: absolute; top: 12px; left: calc(50% + 18px); width: 8px; height: 8px; border-radius: 50%; background: #dc444c; }
.landscape-table { display: none; }

@media (max-width: 1050px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid, .planner-grid { grid-template-columns: 1fr; }
  .tip-card { display: none; }
}

@media (max-width: 760px) {
  .login-shell { width: min(450px,calc(100% - 28px)); grid-template-columns: 1fr; gap: 24px; }
  .login-brand { padding-top: 40px; }
  .login-brand h1 { font-size: 46px; }
  .login-brand > p:last-of-type, .route-line { display: none; }
  .login-brand .eyebrow { margin-top: 18px; }
  .login-card { padding: 28px 24px; }
  .workspace { display: block; }
  .sidebar { display: none; }
  .content { padding: 22px 15px 50px; }
  .topbar { padding: 0 14px; }
  .topbar .brand small, .live-dot { display: none; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { min-height: 110px; padding: 16px; }
  .form-row.three, .modal-form .two { grid-template-columns: 1fr; }
  .notice-admin-card { grid-template-columns: 1fr; }
}

@media (orientation: landscape) and (max-height: 600px) {
  .mobile-header { height: 52px; }
  .mobile-content { max-width: none; padding: 10px; }
  .mobile-greeting { margin-bottom: 8px; }
  .mobile-greeting h1 { font-size: 18px; }
  .segmented { position: fixed; z-index: 35; top: 6px; left: 190px; width: 230px; background: rgba(255,255,255,.12); }
  .segmented button { padding: 6px; color: #bcd5d9; }
  .segmented button.active { background: white; }
  .category-tabs { position: fixed; z-index: 36; top: 6px; right: 92px; width: 230px; margin: 0; border: 0; }
  .category-tabs button { padding: 7px; color: #bcd5d9; }
  .category-tabs button.active { border-radius: 8px; background: rgba(255,255,255,.12); color: white; }
  .category-tabs button.active::after { display: none; }
  .batch-header-card, .plan-card { display: none; }
  .landscape-table { display: block; overflow: auto; border-radius: 12px; background: white; box-shadow: var(--shadow); }
  .landscape-table table { font-size: 10px; }
  .landscape-table th, .landscape-table td { padding: 7px 8px; }
  .landscape-table .row-action { color: var(--sea); font-weight: 800; }
  .bottom-nav { display: none; }
  .mobile-page { padding-bottom: 0; }
}

/* 2026-07：双表编排、主任审核与本地打印 */
:root { --workbook-row-height: 38px; }
.workbook-heading { align-items: flex-end; }
.planner-date-tools { display: flex; align-items: flex-end; gap: 8px; }
.planner-date-tools label { min-width: 170px; }
.planner-date-tools input { min-height: 40px; padding: 8px 10px; }
.workbook-shell { overflow: hidden; border-color: #cddde3; border-radius: 9px; box-shadow: 0 8px 26px rgba(13,61,81,.07); }
.workbook-toolbar { display: flex; min-height: 52px; padding: 8px 12px; align-items: center; justify-content: space-between; border-bottom: 1px solid #d8e5e9; background: #f7fafb; gap: 12px; }
.source-tabs { display: flex; padding: 3px; border-radius: 7px; background: #e5eef1; gap: 3px; }
.source-tabs button { min-height: 34px; padding: 0 16px; border: 0; border-radius: 5px; background: transparent; color: #607986; font-weight: 800; }
.source-tabs button.active { background: #fff; color: #0a5872; box-shadow: 0 2px 8px rgba(17,53,77,.08); }
.review-state-pill { padding: 7px 12px; border: 1px solid #d3e0e5; border-radius: 999px; background: #fff; color: #56717e; font-size: 11px; font-weight: 800; }
.review-state-pill[data-status="pending"] { border-color: #e9ca8d; background: #fff8e9; color: #91641e; }
.review-state-pill[data-status="approved"], .review-state-pill[data-status="published"] { border-color: #a8d8c8; background: #eaf8f2; color: #187257; }
.review-state-pill[data-status="returned"] { border-color: #e8b4b7; background: #fff0f1; color: #a33f49; }
.workbook-shell > .excel-upload-panel { margin: 0; padding: 18px; }
.online-workbook { padding: 12px; background: #edf3f5; }
.sheet-section { overflow: hidden; border: 1px solid #cbdce2; background: #fff; }
.sheet-section + .sheet-section { margin-top: 12px; }
.sheet-title-row { display: flex; min-height: 48px; padding: 6px 9px 6px 14px; align-items: center; justify-content: space-between; border-bottom: 1px solid #b7ccd4; background: linear-gradient(90deg,#0a6d83,#0a536c); color: #fff; }
.port-sheet .sheet-title-row { background: linear-gradient(90deg,#0a765f,#075a55); }
.sheet-title-row > div { display: flex; align-items: center; gap: 9px; }
.sheet-title-row span { color: #90d8df; font-size: 9px; font-weight: 900; letter-spacing: .15em; }
.port-sheet .sheet-title-row span { color: #9be0c7; }
.sheet-title-row h2 { margin: 0; color: #fff; font-size: 16px; }
.sheet-title-row .btn { border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.1); color: #fff; }
.workbook-table-wrap { width: 100%; overflow-x: auto; overflow-y: visible; }
.workbook-table { width: 100%; min-width: 1460px; border-collapse: collapse; table-layout: fixed; background: #fff; }
.workbook-table th, .workbook-table td { height: var(--workbook-row-height); padding: 0; border: 1px solid #b8cbd3; }
.workbook-table th { position: static; height: 36px; padding: 4px; background: #00a651; color: #fff; font-size: 10px; letter-spacing: 0; white-space: nowrap; }
.port-sheet .workbook-table th { background: #008b49; }
.workbook-table .row-number { width: 34px; background: #edf3f5; color: #6d818a; text-align: center; font-size: 9px; }
.workbook-table .row-action { width: 30px; background: #f5f8f9; }
.workbook-table td input { height: calc(var(--workbook-row-height) - 1px); min-height: 0; padding: 4px 5px; border: 0; border-radius: 0; background: transparent; color: #203b48; font-size: 10px; box-shadow: none; }
.workbook-table td input:focus { position: relative; z-index: 2; outline: 2px solid #0586a1; outline-offset: -2px; background: #f5fdff; box-shadow: none; }
.workbook-table td:nth-child(2), .workbook-table td:nth-child(3), .workbook-table td:nth-child(4),
.workbook-table th:nth-child(2), .workbook-table th:nth-child(3), .workbook-table th:nth-child(4) { width: 82px; }
.workbook-table td:nth-child(5), .workbook-table th:nth-child(5) { width: 132px; }
.workbook-table td:nth-child(6), .workbook-table th:nth-child(6) { width: 92px; }
.workbook-table td:nth-child(7), .workbook-table th:nth-child(7) { width: 104px; }
.workbook-table td:nth-child(8), .workbook-table th:nth-child(8) { width: 54px; }
.workbook-table td:nth-child(9), .workbook-table th:nth-child(9) { width: 88px; }
.workbook-table td:nth-child(10), .workbook-table th:nth-child(10) { width: 160px; }
.workbook-table td:nth-child(11), .workbook-table th:nth-child(11) { width: 102px; }
.workbook-table td:nth-child(12), .workbook-table th:nth-child(12) { width: 122px; }
.workbook-table td:nth-child(13), .workbook-table th:nth-child(13) { width: 82px; }
.workbook-table td:nth-child(14), .workbook-table th:nth-child(14) { width: 78px; }
.workbook-table td:nth-child(15), .workbook-table th:nth-child(15) { width: 145px; }
.workbook-table .row-action button { width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; background: transparent; color: #9aaab1; font-size: 17px; }
.workbook-table .row-action button:hover { background: #fff0f0; color: #b9434c; }
.workbook-locked { position: relative; }
.workbook-locked::after { position: absolute; z-index: 3; inset: 0; background: rgba(239,245,247,.48); content: ""; pointer-events: none; }
.workbook-actions { display: flex; min-height: 66px; padding: 11px 14px; align-items: center; justify-content: space-between; border-top: 1px solid #d5e2e7; background: #fff; gap: 16px; }
.workbook-actions p { margin: 0; font-size: 11px; }
.workbook-actions > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.android-client .desktop-plan-tool { display: none !important; }

.review-center-list { display: grid; gap: 14px; }
.review-case { overflow: hidden; border-color: #d5e2e7; border-radius: 10px; box-shadow: 0 7px 24px rgba(12,58,77,.07); font-family: inherit; }
.review-case-summary { display: grid; min-height: 82px; padding: 12px 16px; align-items: center; border-bottom: 1px solid #d9e5e8; background: #fff; grid-template-columns: minmax(360px,1fr) auto auto; gap: 20px; }
.review-case-summary .date-block { flex: 0 0 auto; }
.review-case-summary h3 { margin: 2px 0 3px; color: #153f52; font-size: 16px; font-weight: 800; }
.review-case-summary .admin-plan-title p:last-child { margin: 0; color: #71858d; font-size: 11px; }
.review-case-facts { display: flex; color: #667d87; font-size: 12px; gap: 18px; white-space: nowrap; }
.review-case-facts b { color: #124d64; }
.review-case-actions { display: flex; justify-content: flex-end; gap: 8px; }
.review-case-actions .btn { white-space: nowrap; }
.review-full-plan { border-bottom: 1px solid #d6e2e6; background: #fff; }
.review-full-plan > summary { display: flex; min-height: 56px; padding: 9px 16px; align-items: center; justify-content: space-between; color: #134c63; cursor: pointer; list-style: none; }
.review-full-plan > summary::-webkit-details-marker { display: none; }
.review-full-plan > summary span { display: grid; }
.review-full-plan > summary b { font-size: 14px; }
.review-full-plan > summary small { color: #738890; font-size: 11px; font-weight: 400; }
.review-full-plan > summary i { color: #0c7186; font-size: 12px; font-style: normal; transition: transform .18s ease; }
.review-full-plan[open] > summary i { transform: rotate(180deg); }
.review-table-toolbar { display: grid; min-height: 66px; padding: 10px 14px; align-items: center; border-top: 1px solid #dbe6e9; border-bottom: 1px solid #d4e2e6; background: #f5f9fa; grid-template-columns: auto minmax(320px,1fr) auto; gap: 16px; }
.review-table-toolbar h4 { margin: 0; color: #164c62; font-size: 15px; }
.review-table-toolbar p { margin: 2px 0 0; color: #71858d; font-size: 11px; }
.review-readonly-note { padding: 5px 9px; border: 1px solid #cfe1e5; border-radius: 5px; background: #fff; color: #59737e; font-size: 11px; font-weight: 700; white-space: nowrap; }
.review-tables { padding: 12px; background: #edf3f5; }
.review-plan-table { overflow: hidden; border-color: #c7d9df; border-radius: 0; }
.review-plan-table .sheet-title-row { min-height: 44px; }
.review-plan-table .sheet-title-row b { font-size: 11px; font-weight: 700; }
.review-workbook-wrap { overflow-x: auto; background: #fff; scrollbar-gutter: stable; }
.review-workbook-table { min-width: 1460px; }
.review-workbook-table tbody.review-search-hidden { display: none; }
.review-workbook-table td input { opacity: 1; cursor: text; -webkit-text-fill-color: #203b48; }
.review-workbook-table .col-arrange input { color: #123f52; font-weight: 700; }
.review-workbook-table .col-ship input { color: #0c3f56; font-weight: 800; }
.review-workbook-table .col-time input { color: #0b5371; font-weight: 800; font-variant-numeric: tabular-nums; }
.review-diff-panel { padding: 14px 16px; background: #f7fafb; }
.review-diff-panel h4 { display: flex; margin: 0 0 10px; align-items: center; color: #244c5e; gap: 7px; font-size: 13px; }
.review-diff-panel h4 span { padding: 2px 7px; border-radius: 5px; background: #ffe6c2; color: #98631a; font-size: 10px; }
.review-diff-panel > p { margin: 0; font-size: 12px; }
.review-diff-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.review-diff-list > div { display: grid; min-height: 40px; padding: 8px 10px; align-items: center; border: 1px solid #dbe5e9; border-radius: 6px; background: #fff; grid-template-columns: 1.2fr .8fr 1fr auto 1fr; gap: 8px; font-size: 11px; }
.review-diff-list b { color: #173e52; }
.review-diff-list span { color: #667e89; }
.review-diff-list del { color: #b44a50; }
.review-diff-list ins { color: #14775f; font-weight: 800; text-decoration: none; }
.review-diff-list del + ins::before { margin-right: 7px; color: #7f9098; content: "→"; }
.review-comment { margin: 0; padding: 12px 16px; border-top: 1px solid #ead9b9; background: #fff8e9; color: #795c26; font-size: 12px; }
.status-pill.review-published { background: #e2f4ed; color: #167459; }
.status-pill.review-cancelled { background: #eef2f4; color: #6e7f87; }
.print-options { display: grid; margin-bottom: 14px; grid-template-columns: repeat(4,1fr); gap: 8px; }
.print-options span { display: grid; min-height: 58px; padding: 8px 11px; border: 1px solid #d7e3e7; border-radius: 6px; background: #f7fafb; }
.print-options b { color: #0c516a; }
.print-options small { color: #7f929a; }
.print-sheet-preview { max-height: 52vh; padding: 10px; overflow: auto; border: 1px solid #d7e2e6; background: #edf2f4; }
.print-sheet-preview section { background: #fff; }
.print-sheet-preview h2 { margin: 0; padding: 5px; background: #ffeb3b; color: #c62828; text-align: center; font-size: 12px; }
.print-sheet-preview table { width: 100%; min-width: 1300px; border-collapse: collapse; font-size: 8px; }
.print-sheet-preview th, .print-sheet-preview td { padding: 4px; border: 1px solid #333; }
.print-sheet-preview th { background: #00b050; color: #fff; }
.status-pill.review-pending { background: #fff4d8; color: #89631e; }
.status-pill.review-approved { background: #e2f4ed; color: #167459; }
.status-pill.review-returned { background: #fde9eb; color: #a23c47; }

@media (max-width: 1050px) {
  .workbook-heading { align-items: flex-start; }
  .planner-date-tools { flex-wrap: wrap; justify-content: flex-end; }
  .review-diff-list { grid-template-columns: 1fr; }
  .review-case-summary { grid-template-columns: minmax(0,1fr) auto; }
  .review-case-actions { grid-column: 1 / -1; }
  .review-table-toolbar { grid-template-columns: auto minmax(260px,1fr); }
  .review-readonly-note { display: none; }
}

@media (max-width: 760px) {
  .desktop-plan-tool { display: none !important; }
  .workbook-heading { display: grid; gap: 10px; }
  .planner-date-tools { width: 100%; justify-content: stretch; }
  .planner-date-tools label { min-width: 0; flex: 1; }
  .planner-date-tools .btn { min-height: 40px; padding: 0 10px; }
  .workbook-toolbar { align-items: flex-start; flex-direction: column; }
  .source-tabs { width: 100%; }
  .source-tabs button { flex: 1; }
  .online-workbook { padding: 5px; }
  .sheet-title-row { position: sticky; z-index: 5; left: 0; min-height: 44px; padding-left: 9px; }
  .sheet-title-row .btn { min-height: 32px; padding: 0 8px; }
  .workbook-table { min-width: 1420px; }
  .workbook-table td input { font-size: 11px; }
  .workbook-actions { align-items: stretch; flex-direction: column; }
  .workbook-actions > div { display: grid; grid-template-columns: repeat(2,1fr); }
  .workbook-actions .btn { padding: 0 8px; }
  .review-case-summary { padding: 10px; grid-template-columns: 1fr; gap: 10px; }
  .review-case-facts { justify-content: flex-start; }
  .review-case-actions { display: grid; width: 100%; grid-template-columns: repeat(3,1fr); gap: 6px; }
  .review-case-actions .btn { min-height: 38px; padding: 0 6px; font-size: 11px; }
  .review-full-plan > summary { min-height: 50px; padding: 8px 10px; }
  .review-table-toolbar { padding: 8px; grid-template-columns: 1fr; gap: 8px; }
  .review-table-toolbar > div:first-child { display: none; }
  .review-tables { padding: 5px; }
  .review-diff-panel { padding: 11px 12px; }
  .review-diff-list > div { grid-template-columns: 1fr .7fr 1fr auto 1fr; }
  .print-options { grid-template-columns: repeat(2,1fr); }
  .director-mode #dispatch-bottom-nav button[data-view="overview"] { display: none; }
}

@media (orientation: landscape) and (max-height: 600px) {
  #view-planner .page-heading { margin-bottom: 5px; }
  #view-planner .page-heading > div:first-child p { display: none; }
  #view-planner .page-heading h1 { margin: 0; font-size: 18px; }
  #view-planner .workflow-strip { display: none; }
  .workbook-toolbar { min-height: 38px; padding: 3px 6px; }
  .source-tabs button { min-height: 29px; }
  .online-workbook { padding: 3px; }
  .sheet-section + .sheet-section { margin-top: 4px; }
  .sheet-title-row { min-height: 34px; padding: 2px 6px; }
  .sheet-title-row h2 { font-size: 13px; }
  .sheet-title-row .btn { min-height: 27px; }
  .workbook-actions { min-height: 44px; padding: 4px 6px; }
  .workbook-actions .btn { min-height: 34px; }
}

/* 2026-07 港航指挥舱视觉层：保留原有组件与业务结构 */
:root {
  --ink: #102a35;
  --muted: #61747d;
  --navy: #063d4f;
  --navy-2: #07596b;
  --sea: #087e8b;
  --aqua: #2aa7a1;
  --sand: #e8a73e;
  --danger: #b83e48;
  --success: #14745e;
  --line: #d8e4e7;
  --surface: #ffffff;
  --canvas: #eef4f5;
  --shadow: 0 10px 30px rgba(4, 52, 66, .07);
  --shadow-strong: 0 22px 70px rgba(1, 35, 46, .18);
  --radius: 16px;
}

body { letter-spacing: .01em; }
button, input, select, textarea { min-height: 44px; }
button:disabled { cursor: not-allowed; opacity: .48; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(25, 153, 164, .34);
  outline-offset: 2px;
}
.card { border-color: rgba(5, 72, 90, .08); box-shadow: var(--shadow); }
.btn { border-radius: 10px; letter-spacing: .02em; }
.btn.primary { background: linear-gradient(135deg, #07596b, #063d4f); box-shadow: 0 8px 22px rgba(5, 78, 96, .2); }
.btn.primary:hover { box-shadow: 0 11px 28px rgba(5, 78, 96, .26); }
.btn.secondary:hover { border-color: #9abcc3; background: #f5f9fa; }
.btn.small { min-height: 38px; }
.text-btn { min-height: 36px; }
input, select, textarea { border-color: #cfdde0; border-radius: 9px; background: #fbfdfd; }
input:hover, select:hover, textarea:hover { border-color: #9dbbc1; }

/* 登录入口 */
.login-page { background: radial-gradient(circle at 9% 8%, #168497 0, #075266 26%, #063d4f 58%, #032d3b 100%); }
.login-shell { width: min(1120px, calc(100% - 56px)); grid-template-columns: minmax(0, 1.35fr) minmax(360px, .75fr); gap: 88px; }
.login-brand h1 { max-width: 620px; margin-bottom: 20px; font-size: clamp(54px, 6.4vw, 82px); line-height: 1.03; }
.login-brand > p:last-of-type { max-width: 590px; line-height: 1.8; }
.login-capabilities { display: grid; max-width: 580px; margin-top: 52px; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.login-capabilities span { display: grid; padding: 14px 16px; border: 1px solid rgba(170, 225, 226, .24); border-radius: 12px; background: rgba(255,255,255,.05); color: #d5ecee; font-size: 12px; gap: 5px; }
.login-capabilities b { color: #7ed0ce; font-size: 10px; letter-spacing: .14em; }
.login-card { padding: 44px; border: 1px solid rgba(255,255,255,.72); border-radius: 22px; box-shadow: var(--shadow-strong); }
.login-card h2 { margin-top: 8px; font-size: 30px; }
.login-card form { margin-top: 30px; }
.login-card label { gap: 9px; }
.login-card input { min-height: 48px; background: #fff; }
.login-card .btn { min-height: 48px; }
.security-note { color: #7b8e96; }

/* 电脑调度端 */
.topbar { height: 72px; padding: 0 30px; border-bottom: 1px solid rgba(157, 211, 213, .12); background: linear-gradient(110deg, #063d4f, #06495b); }
.topbar .brand-mark.small, .mobile-header .brand-mark.small { border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.1); }
.top-actions { gap: 4px; }
.icon-btn { min-height: 38px; padding: 8px 12px; }
.workspace { padding-top: 72px; grid-template-columns: 240px 1fr; }
.sidebar { top: 72px; width: 240px; padding: 24px 16px; border-right-color: #dbe7e9; box-shadow: 7px 0 26px rgba(5, 61, 76, .025); }
.user-panel { margin: 0 3px; padding: 5px 8px 22px; }
.user-panel > span { width: 42px; height: 42px; border-radius: 13px; }
.sidebar nav { gap: 7px; }
.sidebar nav button { display: grid; min-height: 47px; padding: 0 13px; align-items: center; border: 1px solid transparent; grid-template-columns: 34px 1fr; gap: 4px; }
.sidebar nav button span { color: #9babb0; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.sidebar nav button b { font-size: 13px; }
.sidebar nav button:hover { border-color: #dcebed; background: #f2f8f8; }
.sidebar nav button.active { border-color: #d1e8e9; background: linear-gradient(90deg, #e6f4f3, #f4f9f9); box-shadow: inset 3px 0 0 var(--sea); }
.sidebar nav button.active span { color: var(--sea); }
.sidebar-foot { right: 20px; bottom: 20px; left: 20px; margin: 0; padding: 12px 13px; border: 1px solid #e1ebed; border-radius: 10px; background: #f6f9fa; color: #75868d; }
.content { padding: 36px 42px 64px; background: radial-gradient(circle at 100% 0, rgba(42,167,161,.06), transparent 360px); }
.page-heading { margin-bottom: 28px; }
.page-heading h1 { margin-bottom: 7px; color: #0a3441; font-size: 32px; line-height: 1.25; }
.page-heading .muted { max-width: 760px; }
.stats-grid { gap: 15px; }
.stat { position: relative; min-height: 136px; padding: 22px; overflow: hidden; }
.stat::after { position: absolute; top: 0; right: 0; left: 0; height: 3px; background: #8faeb5; content: ""; }
.stat[data-tone="today"]::after { background: #0b8794; }
.stat[data-tone="next"]::after { background: #3680a5; }
.stat[data-tone="receipt"]::after { background: #df9b35; }
.stat > span { font-size: 13px; }
.stat > b { font-size: 34px; line-height: 1; }
.stat.accent::after { background: #63d1bc; }
.stat.accent { background: linear-gradient(145deg, #07566a, #063d4f); }
.section-card { padding: 24px; }
.section-title { margin-bottom: 16px; }
.overview-list-row { display: grid; min-height: 50px; padding: 10px 2px; align-items: center; border-bottom: 1px solid #e6edef; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; }
.overview-list-row:last-child { border-bottom: 0; }
.overview-list-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overview-list-row > span:last-child { color: var(--muted); font-size: 12px; }
.overview-list-row.notice { grid-template-columns: minmax(0,1fr) auto; }
.workflow-strip { display: grid; max-width: 760px; margin: -8px 0 22px; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.workflow-strip span { display: flex; min-height: 42px; padding: 0 14px; align-items: center; border: 1px solid #dbe6e8; border-radius: 10px; background: rgba(255,255,255,.66); color: #697b82; font-size: 12px; font-weight: 700; gap: 9px; }
.workflow-strip span b { color: #9aabb0; font-size: 10px; }
.workflow-strip span.active { border-color: #bddfdf; background: #e9f5f4; color: var(--navy); }
.workflow-strip span.active b { color: var(--sea); }
.planner-grid { grid-template-columns: minmax(0,1fr) 286px; }
.plan-input { min-height: 260px; line-height: 1.75; }
.tip-card { border: 0; background: linear-gradient(160deg, #086276, #063d4f); box-shadow: 0 17px 38px rgba(4,56,70,.16); }
.tip-card .eyebrow { color: #7dd3d0; }
.tip-card h3 { margin-top: 22px; }
.tip-card ol { line-height: 2.05; }
.table-wrap { border-color: #d6e3e6; border-radius: 10px; background: #fff; }
th { height: 42px; background: #eaf2f3; color: #415d67; letter-spacing: .03em; }
tbody tr:hover { background: #f7fafb; }
.admin-plan-card { position: relative; padding: 20px 22px 20px 25px; overflow: hidden; }
.admin-plan-card::before { position: absolute; top: 0; bottom: 0; left: 0; width: 4px; background: #3f8ba1; content: ""; }
.admin-plan-card.category-port::before { background: #d89b36; }
.plan-type-label { margin: 0 0 3px !important; color: var(--sea) !important; font-size: 9px !important; font-weight: 900; letter-spacing: .18em; }
.category-port .plan-type-label { color: #a66c15 !important; }
.date-block { width: 56px; height: 56px; border-radius: 12px; }
.admin-plan-title h3 { display: flex; align-items: center; gap: 8px; }
.plan-meta-row { gap: 26px; }
.plan-meta-row b { color: #163f4c; }
.status-pill, .badge { padding: 5px 10px; letter-spacing: .02em; }
.receipt-chip { border: 1px solid #e3ebed; }

/* 已发布计划：页面内展开与整表编辑 */
.plan-toggle span { display: inline-block; width: 15px; font-size: 10px; }
.plan-inline-detail { margin: 18px -22px -20px -25px; border-top: 1px solid #d9e5e7; background: #edf4f5; }
.inline-loading { padding: 28px; color: var(--muted); text-align: center; }
.bulk-plan-form { display: grid; gap: 0; }
.bulk-plan-toolbar { display: flex; position: sticky; z-index: 5; top: 72px; min-height: 76px; padding: 15px 22px 15px 26px; align-items: center; justify-content: space-between; border-bottom: 1px solid #d3e1e4; background: rgba(248,251,251,.97); gap: 20px; backdrop-filter: blur(12px); }
.bulk-plan-toolbar h3 { margin: 0; color: var(--navy); font-size: 18px; }
.bulk-plan-toolbar p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.bulk-toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.bulk-change-reason { display: grid; padding: 14px 24px; border-bottom: 1px solid #d5e3e5; background: #fff8eb; grid-template-columns: 130px minmax(260px, 1fr); align-items: center; gap: 12px; }
.bulk-change-reason span { color: #835d20; font-weight: 800; }
.inline-items { display: grid; padding: 14px; gap: 12px; }
.inline-plan-item { border: 1px solid #d6e3e5; border-radius: 13px; background: #fff; overflow: hidden; }
.inline-plan-item.cancelled { opacity: .66; }
.inline-plan-item > header { display: flex; min-height: 58px; padding: 10px 15px; align-items: center; border-bottom: 1px solid #e0e9eb; background: #f8fbfb; gap: 12px; }
.inline-plan-item > header .item-index { color: #8ca0a7; font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.inline-plan-item > header div { flex: 1; }
.inline-plan-item > header h4 { margin: 0; color: #123d49; font-size: 16px; }
.inline-plan-item > header p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.cancel-switch { display: flex; min-height: 36px; align-items: center; grid-template-columns: none; gap: 7px; }
.cancel-switch input { width: 17px; min-height: 17px; }
.cancel-switch span { font-size: 11px; }
.inline-edit-grid { display: grid; padding: 13px 15px 15px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.inline-field { min-width: 0; gap: 4px; }
.inline-field > span { color: #687b82; font-size: 10px; }
.inline-field input, .inline-field select, .inline-field textarea { min-height: 38px; padding: 8px 9px; border-color: transparent; background: #f3f7f8; color: #193b46; font-size: 12px; }
.inline-field input[readonly], .inline-field textarea[readonly], .inline-field select:disabled { opacity: 1; -webkit-text-fill-color: #193b46; }
.inline-field textarea { min-height: 58px; resize: vertical; }
.inline-field.span-2 { grid-column: span 2; }
.inline-field.span-full { grid-column: 1 / -1; }
.bulk-plan-form.editing .inline-field input, .bulk-plan-form.editing .inline-field select, .bulk-plan-form.editing .inline-field textarea { border-color: #9fc6cb; background: #fff; box-shadow: 0 0 0 2px rgba(15,130,149,.06); }
.inline-feedback { display: flex; min-height: 42px; padding: 9px 15px; align-items: center; border-top: 1px solid #e1eaec; background: #fbfdfd; color: #536870; font-size: 11px; gap: 13px; flex-wrap: wrap; }
.inline-feedback > b { color: var(--navy); }

@media (max-width: 1280px) {
  .inline-edit-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .inline-edit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bulk-plan-toolbar { position: static; align-items: flex-start; flex-direction: column; }
  .bulk-change-reason { grid-template-columns: 1fr; }
}

/* 拖轮端 */
.mobile-page { background: linear-gradient(180deg, #e9f2f3 0, #f3f7f8 230px, #f3f7f8 100%); }
.mobile-header { height: 72px; padding: 0 17px; border-bottom: 1px solid rgba(255,255,255,.12); background: linear-gradient(115deg, #063d4f, #075568); box-shadow: 0 6px 20px rgba(3,45,58,.18); }
.notification-button { min-height: 40px; padding: 8px 13px; border-color: rgba(255,255,255,.24); }
.mobile-content { max-width: 760px; padding: 21px 14px 34px; }
.mobile-greeting { margin: 0 2px 18px; }
.mobile-greeting p { color: #637980; font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.mobile-greeting h1 { color: #0a3947; font-size: 27px; }
.badge.success { border: 1px solid #c9e8dc; }
.segmented { padding: 5px; border: 1px solid #d6e2e4; border-radius: 14px; background: rgba(222,233,235,.9); }
.segmented button, .category-tabs button { min-height: 42px; }
.segmented button.active { box-shadow: 0 5px 14px rgba(5,61,76,.1); }
.category-tabs { margin: 14px 0 16px; border: 1px solid #dbe5e7; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.78); }
.category-tabs button { border-right: 1px solid #dbe5e7; }
.category-tabs button:last-child { border-right: 0; }
.category-tabs button.active { background: #fff; color: var(--navy); }
.category-tabs button.active::after { right: 31%; left: 31%; bottom: 0; }
.tug-plan-list { gap: 14px; }
.batch-header-card { padding: 17px; border-radius: 15px; box-shadow: 0 7px 22px rgba(5,61,76,.06); }
.batch-title-line h2 { color: #103c49; font-size: 17px; }
.receipt-action { margin-top: 14px; padding-top: 13px; }
.receipt-action .btn { min-height: 40px; }
.plan-card { position: relative; border-radius: 18px; box-shadow: 0 9px 26px rgba(4,53,68,.075); }
.plan-card.my-task { border-color: #6bbfc0; box-shadow: 0 10px 30px rgba(8,126,139,.14); }
.plan-card.my-task::before { position: absolute; z-index: 2; top: 0; bottom: 0; left: 0; width: 4px; background: var(--aqua); content: ""; }
.plan-card.cancelled { opacity: .68; }
.plan-card-main { padding: 18px 17px 16px 20px; }
.plan-time-line > div { display: grid; gap: 1px; }
.time-label { color: #798b91; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.plan-time { color: #053b4c; font-size: 24px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.direction { padding: 6px 10px; border: 1px solid #d0e2e5; border-radius: 9px; background: #eaf3f4; }
.direction.inbound { border-color: #c8e4dd; background: #e8f5f0; color: #116d59; }
.direction.outbound { border-color: #d2dfeb; background: #edf3f8; color: #315f80; }
.ship-name { margin: 11px 0 2px; color: #102f3a; font-size: 21px; line-height: 1.35; }
.ship-en { font-size: 11px; letter-spacing: .03em; }
.assignments { margin: 15px 0 11px; }
.tug-tag { border: 1px solid #0d6072; background: #0c5366; }
.tug-tag.mine { border-color: #d39b3f; background: #fff4df; color: #7d5312; }
.facts { margin: 13px 0; gap: 8px; }
.fact { min-height: 52px; padding: 9px 11px; border: 1px solid #e5edef; background: #f5f8f9; }
.fact small { color: #74868d; }
.fact b { margin-top: 3px; color: #213f49; }
.fact.copyable { border-color: #cae4e4; background: #eff8f7; }
.remark { display: grid; margin-top: 13px; padding: 11px 12px; border-left-width: 4px; gap: 3px; }
.remark b { font-size: 10px; letter-spacing: .08em; }
.remark span { line-height: 1.65; }
.plan-card-actions { min-height: 48px; }
.plan-card-actions button { min-height: 48px; background: #fbfdfd; font-size: 12px; }
.plan-card-actions button:hover { background: #f0f7f7; }
.plan-card-actions .primary-action:not(:disabled) { background: #e7f4f2; color: #075e60; }
.feedback-done { padding: 13px; }
.notice-card { border-radius: 16px; box-shadow: 0 8px 24px rgba(4,53,68,.065); }
.profile-hero { padding: 12px 2px 4px; }
.settings-card { border: 1px solid #e0e9eb; }
.settings-card button { min-height: 56px; }
.bottom-nav { height: calc(68px + env(safe-area-inset-bottom)); border-top-color: #d7e3e5; box-shadow: 0 -8px 25px rgba(4,53,68,.06); }
.bottom-nav button { display: grid; min-height: 58px; padding: 9px 0 7px; place-content: center; gap: 1px; }
.bottom-nav button span { font-size: 12px; }
.bottom-nav button small { color: #9caaaf; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.bottom-nav button.active small { color: #5d848e; }

@media (max-width: 1050px) {
  .content { padding-right: 28px; padding-left: 28px; }
  .planner-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .login-page { background: linear-gradient(155deg, #07596b, #063d4f 45%, #032d3b); }
  .login-shell { width: min(460px, calc(100% - 28px)); grid-template-columns: 1fr; gap: 18px; }
  .login-brand { padding-top: 34px; }
  .login-brand h1 { margin-bottom: 6px; font-size: 43px; }
  .login-brand .eyebrow { margin-top: 15px; }
  .login-capabilities { display: none; }
  .login-card { padding: 28px 24px; border-radius: 19px; }
  .topbar { height: 66px; }
  .workspace { padding-top: 66px; }
  .content { padding: 24px 15px 50px; }
  .page-heading h1 { font-size: 27px; }
  .workflow-strip { margin-top: -4px; }
  .workflow-strip span { padding: 0 9px; justify-content: center; }
  .workflow-strip span b { display: none; }
  .admin-plan-head { align-items: flex-start; flex-direction: column; }
  .card-actions { width: 100%; justify-content: flex-start; }
  .plan-meta-row { align-items: flex-start; flex-wrap: wrap; gap: 10px 18px; }
  .excel-dropzone { min-height: 130px; padding: 17px; }
  .plan-inline-detail { margin-right: -22px; margin-left: -25px; }
  .inline-edit-grid { grid-template-columns: 1fr; }
  .inline-field.span-2 { grid-column: auto; }
  .bulk-toolbar-actions { width: 100%; justify-content: flex-start; }
}

@media (orientation: landscape) and (max-height: 600px) {
  .mobile-header { height: 54px; box-shadow: none; }
  .mobile-content { padding: 9px 10px; }
  .landscape-table { border: 1px solid #d5e2e5; }
  .landscape-table table { font-size: 11px; }
  .landscape-table th { z-index: 3; background: #e8f1f2; }
  .landscape-table th:nth-child(4), .landscape-table td:nth-child(4) { position: sticky; z-index: 2; left: 0; min-width: 94px; border-right: 1px solid #cadbde; background: #fff; }
  .landscape-table th:nth-child(4) { z-index: 4; background: #e8f1f2; }
  .landscape-table th, .landscape-table td { padding: 8px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 2026-07 计划表格、历史查询与调度 App 响应式布局 */
.status-withdrawn { background: #fff0e2; color: #9b5b18; }
.status-deleted { background: #f1f2f3; color: #68767b; }
.danger-ghost { border-color: #e7b8bc !important; background: #fff8f8 !important; color: var(--danger) !important; }
.plan-batch-panel { position: relative; overflow: hidden; border: 1px solid #d8e4e8; border-radius: 12px; background: #fff; box-shadow: 0 6px 20px rgba(5,52,65,.05); }
.plan-batch-panel::before { position: absolute; z-index: 1; top: 0; bottom: 0; left: 0; width: 4px; background: #287f9b; content: ""; }
.plan-batch-panel.category-port::before { background: #d8942d; }
.plan-batch-panel.state-withdrawn, .plan-batch-panel.state-deleted { background: #fbfbfb; }
.plan-batch-summary { display: grid; min-height: 82px; padding: 14px 18px 14px 22px; grid-template-columns: minmax(260px, 1fr) auto auto; align-items: center; gap: 24px; }
.plan-batch-facts { display: flex; color: #667a82; font-size: 12px; gap: 22px; }
.plan-batch-facts b { color: #153f4d; }
.removal-note { max-width: 240px; overflow: hidden; color: #a55d23; text-overflow: ellipsis; white-space: nowrap; }
.plan-inline-detail { margin: 0; border-top: 1px solid #d9e5e8; background: #f5f8f9; }
.plan-table-form { min-width: 0; }
.plan-table-toolbar { display: grid; position: sticky; z-index: 8; top: 72px; min-height: 78px; padding: 13px 18px; border-bottom: 1px solid #d8e3e7; background: rgba(246,250,251,.98); grid-template-columns: auto minmax(320px, 1fr) auto; align-items: center; gap: 18px; backdrop-filter: blur(10px); }
.plan-table-heading h3 { margin: 0; color: #0b4660; font-size: 18px; }
.plan-table-heading p { margin: 3px 0 0; color: #71858d; font-size: 11px; white-space: nowrap; }
.plan-table-search { display: grid; min-width: 0; grid-template-columns: minmax(180px, 1fr) 48px; align-items: center; }
.plan-table-search input { min-width: 0; min-height: 44px; padding: 10px 14px; border: 1px solid #d3e0e4; border-radius: 8px 0 0 8px; background: #fff; font-size: 14px; }
.plan-table-search button { height: 44px; border: 1px solid #d3e0e4; border-left: 0; border-radius: 0 8px 8px 0; background: #eef5f7; }
.dispatch-plan-table-wrap { width: 100%; overflow: visible; background: #fff; }
.plan-data-table { width: 100%; table-layout: fixed; border-collapse: collapse; color: #263f48; font-size: 12px; }
.plan-data-table th { position: sticky; z-index: 5; top: 150px; height: 48px; padding: 8px 6px; border-right: 1px solid #dce7ea; border-bottom: 1px solid #d3e0e4; background: #eaf2f7; color: #07537a; text-align: center; font-size: 11px; line-height: 1.25; }
.plan-data-table td { height: 54px; padding: 0; border-right: 1px solid #e1e9ec; border-bottom: 1px solid #e1e9ec; vertical-align: middle; }
.plan-data-table th:first-child, .plan-data-table td:first-child { width: 34px; }
.plan-data-table th:nth-child(2), .plan-data-table th:nth-child(3), .plan-data-table th:nth-child(4) { width: 7.2%; }
.plan-data-table th:nth-child(6) { width: 9.5%; }
.plan-data-table th:nth-child(7) { width: 7.5%; }
.plan-data-table th:nth-child(8) { width: 8.5%; }
.plan-data-table th:nth-child(9) { width: 4.5%; }
.plan-data-table th:nth-child(10) { width: 7.5%; }
.plan-data-table th:nth-child(11) { width: 11.5%; }
.plan-data-table th:nth-child(12) { width: 8.5%; }
.plan-data-table th:nth-child(13) { width: 10%; }
.plan-data-table tbody:hover .plan-primary-row { background: #f6fafc; }
.plan-data-table tbody.cancelled { opacity: .64; }
.plan-data-table tbody.search-hidden { display: none; }
.plan-data-table input, .plan-data-table select, .plan-data-table textarea { width: 100%; min-width: 0; min-height: 52px; padding: 7px 7px; border: 1px solid transparent; border-radius: 0; background: transparent; color: #263f48; font: inherit; line-height: 1.35; text-align: left; }
.plan-data-table select { padding-right: 3px; text-align: center; appearance: none; }
.plan-data-table input[readonly], .plan-data-table textarea[readonly], .plan-data-table select:disabled { opacity: 1; -webkit-text-fill-color: #263f48; }
.plan-data-table .col-ship input { color: #0c3f56; font-weight: 800; }
.plan-data-table .col-time input { color: #0b5371; font-weight: 800; font-variant-numeric: tabular-nums; }
.plan-data-table .row-number { background: #f4f7f8; color: #8a9ca3; text-align: center; font-size: 10px; font-weight: 800; }
.mobile-assignments { display: none; }
.plan-secondary-row td { height: auto; padding: 0; background: #fbfcfd; }
.secondary-fields { display: grid; min-height: 48px; padding: 7px 10px 8px 44px; grid-template-columns: 100px 100px minmax(240px, 1.4fr) minmax(210px, 1fr) 104px; align-items: end; gap: 10px; }
.secondary-fields label { display: grid; color: #71858d; font-size: 9px; gap: 2px; }
.secondary-fields input, .secondary-fields textarea { min-height: 30px; padding: 5px 7px; border-radius: 5px; background: #f1f5f6; font-size: 11px; resize: vertical; }
.secondary-feedback { display: grid; align-self: stretch; align-content: center; color: #71858d; font-size: 9px; gap: 3px; }
.secondary-feedback b { color: #425d67; font-size: 11px; font-weight: 600; }
.secondary-fields .cancel-switch { display: flex; align-self: center; font-size: 10px; }
.secondary-fields .cancel-switch input { width: 17px; min-height: 17px; }
.plan-table-form.editing .plan-data-table input, .plan-table-form.editing .plan-data-table select, .plan-table-form.editing .plan-data-table textarea { border-color: #8bbecb; background: #fff; box-shadow: inset 0 0 0 1px rgba(15,130,149,.05); }
.plan-table-form.editing .plan-data-table select { appearance: auto; }
.plan-table-form.editing .plan-secondary-row td { background: #edf6f7; }
.plan-batch-panel.table-fullscreen { position: fixed; z-index: 90; inset: 0; overflow: auto; border: 0; border-radius: 0; background: #fff; }
.plan-batch-panel.table-fullscreen .plan-batch-summary { display: none; }
.plan-batch-panel.table-fullscreen .plan-inline-detail { border: 0; }
.plan-batch-panel.table-fullscreen .plan-table-toolbar { top: 0; }
.plan-batch-panel.table-fullscreen .plan-data-table th { top: 78px; }
.revision-list { display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.revision-list > div { display: flex; min-height: 48px; padding: 10px 14px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.revision-list > div:last-child { border-bottom: 0; }
.revision-list span { color: var(--muted); font-size: 12px; }

.history-filter-bar { display: grid; margin-bottom: 12px; padding: 16px; grid-template-columns: minmax(260px, 2fr) repeat(6, minmax(118px, 1fr)) auto; align-items: end; gap: 10px; }
.history-filter-bar label { min-width: 0; font-size: 10px; gap: 4px; }
.history-filter-bar input, .history-filter-bar select { min-width: 0; min-height: 42px; padding: 8px 9px; font-size: 12px; }
.history-filter-actions { display: flex; gap: 7px; }
.history-filter-actions .btn { min-height: 42px; padding: 8px 13px; }
.history-result-summary { min-height: 30px; padding: 3px 3px 9px; color: #687d85; font-size: 12px; }
.dispatch-bottom-nav, .mobile-profile-view { display: none; }
.dispatch-profile-card { display: flex; padding: 24px; align-items: center; gap: 16px; }
.dispatch-profile-card > span { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 16px; background: #e3f1f2; color: var(--navy); font-size: 22px; font-weight: 900; }
.dispatch-profile-card h2, .dispatch-profile-card p { margin: 0; }
.dispatch-profile-card p { margin-top: 4px; color: var(--muted); }
.dispatch-profile-actions { display: grid; margin-top: 12px; overflow: hidden; }
.dispatch-profile-actions button { min-height: 58px; padding: 0 18px; border: 0; border-bottom: 1px solid var(--line); background: #fff; color: var(--navy); text-align: left; font-weight: 800; }
.dispatch-profile-actions button:last-child { border: 0; color: var(--danger); }

@media (max-width: 1180px) {
  .plan-batch-summary { grid-template-columns: 1fr auto; }
  .plan-batch-facts { grid-column: 1 / -1; grid-row: 2; }
  .plan-table-toolbar { grid-template-columns: 1fr 1.5fr; }
  .plan-table-toolbar .bulk-toolbar-actions { grid-column: 1 / -1; }
  .history-filter-bar { grid-template-columns: repeat(4, 1fr); }
  .history-search-wide { grid-column: span 2; }
}

@media (max-width: 760px) {
  .app-page { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .app-page .topbar { height: 54px; padding: 0 10px; }
  .app-page .top-actions { gap: 4px; }
  .app-page .top-actions .icon-btn { min-height: 36px; padding: 7px 8px; font-size: 10px; }
  .app-page .workspace { padding-top: 54px; }
  .app-page .content { padding: 15px 9px 24px; }
  .dispatch-bottom-nav { position: fixed; z-index: 70; right: 0; bottom: 0; left: 0; display: grid; height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid #d5e1e4; background: rgba(255,255,255,.98); grid-template-columns: repeat(6, 1fr); box-shadow: 0 -8px 24px rgba(4,52,66,.07); }
  .dispatch-bottom-nav button { display: grid; min-width: 0; padding: 7px 1px 5px; place-content: center; border: 0; background: transparent; color: #7e9097; gap: 1px; }
  .dispatch-bottom-nav button span { font-size: 11px; font-weight: 800; }
  .dispatch-bottom-nav button small { font-size: 7px; letter-spacing: .04em; }
  .dispatch-bottom-nav button.active { color: var(--sea); background: #edf7f7; }
  .mobile-profile-view.active { display: block; }
  .plan-batch-summary { min-height: 0; padding: 12px 11px 12px 15px; grid-template-columns: 1fr; gap: 11px; }
  .plan-batch-summary .card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-batch-summary .card-actions .btn { min-height: 42px; padding: 7px 8px; }
  .plan-batch-facts { grid-column: auto; grid-row: auto; flex-wrap: wrap; gap: 8px 14px; }
  .plan-table-toolbar { position: static; padding: 10px; grid-template-columns: 1fr; gap: 9px; }
  .plan-table-search { grid-template-columns: 1fr 46px; }
  .plan-table-toolbar .bulk-toolbar-actions { grid-column: auto; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-table-toolbar .bulk-toolbar-actions .btn { min-height: 42px; padding: 7px; }
  .plan-data-table { font-size: 10px; }
  .plan-data-table th { position: static; height: 42px; padding: 5px 3px; font-size: 9px; }
  .plan-data-table th:nth-child(2), .plan-data-table th:nth-child(3), .plan-data-table th:nth-child(4), .plan-data-table th:nth-child(10), .plan-data-table th:nth-child(11), .plan-data-table th:nth-child(12), .plan-data-table th:nth-child(13),
  .plan-data-table td:nth-child(2), .plan-data-table td:nth-child(3), .plan-data-table td:nth-child(4), .plan-data-table td:nth-child(10), .plan-data-table td:nth-child(11), .plan-data-table td:nth-child(12), .plan-data-table td:nth-child(13) { display: none; }
  .plan-data-table .mobile-assignments { display: table-cell; width: 24%; padding: 6px; color: #0b5570; font-weight: 800; }
  .plan-data-table th:nth-child(6) { width: 24%; }
  .plan-data-table th:nth-child(7) { width: 16%; }
  .plan-data-table th:nth-child(8) { width: 20%; }
  .plan-data-table th:nth-child(9) { width: 9%; }
  .plan-data-table input { min-height: 48px; padding: 5px; }
  .plan-secondary-row { display: none; }
  .plan-data-table tbody.detail-open .plan-secondary-row, .plan-table-form.editing .plan-secondary-row { display: table-row; }
  .secondary-fields { padding: 9px; grid-template-columns: 1fr 1fr; align-items: stretch; }
  .secondary-remark, .secondary-feedback { grid-column: 1 / -1; }
  .plan-table-form.editing .dispatch-plan-table-wrap { overflow-x: auto; }
  .plan-table-form.editing .plan-data-table { min-width: 1040px; }
  .plan-table-form.editing .plan-data-table th, .plan-table-form.editing .plan-data-table td { display: table-cell; }
  .plan-table-form.editing .plan-data-table .mobile-assignments { display: none; }
  .history-filter-bar { padding: 12px; grid-template-columns: 1fr 1fr; }
  .history-search-wide, .history-filter-actions { grid-column: 1 / -1; }
  .history-filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (orientation: landscape) and (max-height: 600px) {
  html, body { width: 100%; min-width: 0; min-height: 100%; }
  .app-page { padding: 0; }
  .app-page .topbar, .app-page .sidebar, .dispatch-bottom-nav { display: none; }
  .app-page .workspace { display: block; min-height: 100dvh; padding: 0; }
  .app-page .content { width: 100%; min-height: 100dvh; padding: 6px; }
  .app-page #view-plans.active > .page-heading, .app-page #view-history.active > .page-heading { display: none; }
  .app-page .plan-admin-list { gap: 7px; }
  .plan-batch-summary { min-height: 54px; padding: 6px 10px 6px 14px; grid-template-columns: 1fr auto auto; gap: 10px; }
  .plan-batch-summary .date-block { width: 40px; height: 40px; }
  .plan-batch-summary .admin-plan-title p { display: none; }
  .plan-batch-facts { grid-column: auto; grid-row: auto; }
  .plan-batch-summary .card-actions { display: flex; width: auto; }
  .plan-table-toolbar { position: sticky; top: 0; min-height: 54px; padding: 5px 8px; grid-template-columns: auto minmax(260px, 1fr) auto; gap: 8px; }
  .plan-table-heading h3 { font-size: 14px; }
  .plan-table-heading p { display: none; }
  .plan-table-search input, .plan-table-search button { height: 38px; min-height: 38px; }
  .plan-table-toolbar .bulk-toolbar-actions { display: flex; width: auto; grid-column: auto; }
  .plan-table-toolbar .bulk-toolbar-actions .btn { min-height: 38px; padding: 6px 9px; }
  .plan-data-table { min-width: 0 !important; table-layout: fixed; font-size: clamp(8px, 1.25vw, 11px); }
  .plan-data-table th, .plan-data-table td { display: table-cell !important; }
  .plan-data-table .mobile-assignments { display: none !important; }
  .plan-data-table th { position: sticky; top: 54px; height: 38px; padding: 4px 2px; font-size: clamp(7px, 1.1vw, 10px); }
  .plan-data-table td { height: 42px; }
  .plan-data-table input, .plan-data-table select { min-height: 40px; padding: 3px; font-size: inherit; }
  .plan-secondary-row { display: table-row; }
  .secondary-fields { min-height: 38px; padding: 4px 6px 4px 34px; }

  .mobile-page { width: 100%; min-width: 0; min-height: 100dvh; padding-bottom: 0; overflow-x: hidden; }
  .mobile-page .mobile-header { height: 52px; }
  .mobile-page .mobile-content { width: 100%; max-width: none; min-height: calc(100dvh - 52px); margin: 0; padding: 8px; box-sizing: border-box; }
  .mobile-page .landscape-table { width: 100%; max-width: none; min-height: calc(100dvh - 70px); overflow: auto; border-radius: 8px; }
  .mobile-page .landscape-table table { width: 100%; min-width: 100%; table-layout: auto; font-size: clamp(8px, 1.25vw, 11px); }
  .mobile-page .landscape-table th, .mobile-page .landscape-table td { padding: 6px clamp(3px, .75vw, 8px); }
}

.tug-landscape-shell { display: none; }
.tug-table-toolbar { display: grid; min-height: 48px; padding: 6px 8px; border-bottom: 1px solid #d4e1e4; background: #f3f8fa; grid-template-columns: auto minmax(280px, 1fr); align-items: center; gap: 16px; }
.tug-table-toolbar > div { display: grid; color: #0b4860; gap: 2px; }
.tug-table-toolbar small { color: #73878e; font-size: 9px; }
.tug-table-toolbar label { display: grid; grid-template-columns: minmax(180px, 1fr) 48px; }
.tug-table-toolbar input { min-height: 36px; padding: 7px 10px; border: 1px solid #ccdade; border-radius: 7px 0 0 7px; background: #fff; font-size: 11px; }
.tug-table-toolbar button { border: 1px solid #ccdade; border-left: 0; border-radius: 0 7px 7px 0; background: #e7f1f4; color: #0b5b76; font-size: 10px; font-weight: 800; }
.landscape-table tr.search-hidden { display: none; }

@media (orientation: landscape) and (max-height: 600px) {
  .tug-landscape-shell { display: block; width: 100%; min-width: 0; }
  .tug-landscape-shell .landscape-table { display: block; min-height: calc(100dvh - 116px); }
  .mobile-page .tug-plan-list { display: block; width: 100%; }
}

/* 2026-07 外滩晨雾：上海港航桌面视觉系统 */
:root {
  --ink: #193246;
  --muted: #6c7f8e;
  --navy: #062f4f;
  --navy-2: #0b506f;
  --sea: #087b9c;
  --aqua: #21949f;
  --sand: #d99735;
  --danger: #c54d55;
  --success: #168263;
  --line: #d9e3ea;
  --surface: #ffffff;
  --canvas: #f5f8fa;
  --shadow: 0 4px 16px rgba(17, 53, 77, .045);
  --shadow-strong: 0 18px 48px rgba(4, 35, 55, .22);
  --radius: 8px;
}

html { background: var(--canvas); }
body {
  color: var(--ink);
  background: var(--canvas);
  font-family: "Segoe UI Variable", "Microsoft YaHei UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
h1 { color: #102f45; font-size: 28px; line-height: 1.2; letter-spacing: -.03em; }
h2 { color: #18384e; font-size: 18px; }
.eyebrow { color: var(--sea); font-size: 10px; line-height: 1.2; letter-spacing: .16em; }
.muted { color: var(--muted); }
.card {
  border-color: #dfe7ec;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.btn {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 7px;
  font-weight: 750;
  letter-spacing: 0;
  box-shadow: none;
  transform: none;
}
.btn:hover { transform: none; }
.btn.primary,
.btn.primary:hover { background: var(--sea); box-shadow: none; color: #fff; }
.btn.primary:hover { background: #066f8e; }
.btn.secondary { border-color: #cfdbe3; background: #fff; color: #164760; }
.btn.secondary:hover { border-color: #8eb4c3; background: #f7fafc; }
.btn.danger { background: #fff4f4; color: var(--danger); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 11px; }
.text-btn { min-height: 34px; color: #087796; font-weight: 750; }
.icon-btn { min-height: 34px; padding: 7px 10px; border-radius: 6px; color: #dce8ef; }
.icon-btn:hover { background: rgba(255,255,255,.08); }
label { color: #355268; font-size: 12px; gap: 6px; }
input, select, textarea {
  min-height: 40px;
  padding: 9px 11px;
  border-color: #cfdae3;
  border-radius: 6px;
  background: #fff;
}
input:hover, select:hover, textarea:hover { border-color: #9fb8c5; }
input:focus, select:focus, textarea:focus {
  border-color: #4a9bb4;
  box-shadow: 0 0 0 3px rgba(8, 123, 156, .11);
}

/* 登录：深港蓝平面底色、克制的企业工作台 */
.login-page { min-height: 100dvh; background: #06344f; }
.login-shell {
  width: min(1080px, calc(100% - 56px));
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1.35fr) 360px;
  gap: 86px;
}
.login-brand .brand-mark { width: 58px; height: 58px; border-radius: 12px; background: rgba(255,255,255,.09); }
.login-brand .eyebrow { margin-top: 28px; color: #78c2cb; }
.login-brand h1 { max-width: none; margin: 0 0 14px; color: #fff; font-size: clamp(50px, 6vw, 68px); line-height: 1.04; letter-spacing: -.06em; }
.login-brand > p:last-of-type { max-width: 590px; color: #c5d8e2; font-size: 16px; line-height: 1.75; }
.login-capabilities { max-width: 570px; margin-top: 44px; gap: 10px; }
.login-capabilities span {
  min-height: 68px;
  padding: 13px 15px;
  border-color: rgba(184, 215, 227, .22);
  border-radius: 7px;
  background: rgba(255,255,255,.035);
}
.login-capabilities b { color: #6fc0cb; }
.login-card {
  padding: 34px;
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 10px;
  box-shadow: var(--shadow-strong);
}
.login-card h2 { margin-top: 7px; color: #15354b; font-size: 27px; }
.login-card form { margin-top: 26px; }
.login-card input { min-height: 46px; background: #f8fafc; }
.login-card .btn { min-height: 46px; }
.security-note { margin-top: 22px; color: #7a8d9b; }

/* 电脑调度端框架 */
.topbar {
  height: 58px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(190, 214, 224, .14);
  background: var(--navy);
}
.topbar .brand { gap: 10px; }
.topbar .brand-mark.small,
.mobile-header .brand-mark.small {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
}
.brand b { font-size: 15px; }
.brand small { margin-top: 2px; color: #9fbac8; font-size: 9px; }
.top-actions { gap: 2px; }
.live-dot { margin-right: 8px; color: #a8d9d2; font-size: 11px; }
.live-dot::before { width: 6px; height: 6px; margin-right: 6px; box-shadow: 0 0 0 3px rgba(69,213,156,.11); }
.workspace { padding-top: 58px; grid-template-columns: 190px minmax(0, 1fr); }
.sidebar {
  top: 58px;
  width: 190px;
  padding: 18px 10px;
  border-right-color: #dce5ea;
  box-shadow: none;
}
.user-panel { margin: 0 3px; padding: 6px 7px 18px; }
.user-panel > span { width: 36px; height: 36px; border-radius: 8px; background: #eaf2f5; color: #144a64; }
.user-panel b { font-size: 12px; }
.user-panel small { font-size: 9px; }
.sidebar nav { margin-top: 15px; gap: 3px; }
.sidebar nav button {
  min-height: 44px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  grid-template-columns: 30px 1fr;
  color: #607482;
}
.sidebar nav button span { color: #95a6b0; font-size: 9px; letter-spacing: .1em; }
.sidebar nav button b { font-size: 12px; }
.sidebar nav button:hover { border: 0; background: #f2f6f8; }
.sidebar nav button.active {
  border: 0;
  background: #eaf2f6;
  color: #0b5e7e;
  box-shadow: inset 3px 0 0 #1590ac;
}
.sidebar-foot {
  right: 10px;
  bottom: 12px;
  left: 10px;
  padding: 10px 11px;
  border-radius: 7px;
  background: #f7f9fa;
  color: #738794;
  font-size: 10px;
}
.content { padding: 24px 22px 56px; background: var(--canvas); }
.page-heading { margin-bottom: 18px; align-items: center; }
.page-heading h1 { margin-bottom: 5px; color: #102f45; font-size: 27px; }
.page-heading .muted { color: #687d8a; font-size: 12px; }

/* 总览与编排 */
.stats-grid { margin-bottom: 18px; gap: 10px; }
.stat { min-height: 112px; padding: 17px 18px; }
.stat::after { height: 2px; }
.stat > span { font-size: 12px; }
.stat > b { color: #0e425c; font-size: 29px; }
.stat > small { font-size: 10px; }
.stat.accent { background: #083e5b; }
.stat.accent::after { background: #52c4b2; }
.dashboard-grid { gap: 12px; }
.section-card { padding: 19px; }
.section-title { margin-bottom: 12px; }
.section-title h2 { font-size: 17px; }
.overview-list-row { min-height: 46px; padding: 9px 1px; }
.workflow-strip { max-width: 720px; margin: -4px 0 16px; gap: 7px; }
.workflow-strip span {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
}
.workflow-strip span.active { border-color: #a9d4da; background: #edf7f8; }
.planner-grid { grid-template-columns: minmax(0, 1fr) 250px; gap: 12px; }
.excel-upload-panel { margin-top: 14px; }
.excel-dropzone {
  min-height: 128px;
  padding: 18px;
  border: 1px dashed #8ebdca;
  border-radius: 7px;
  background: #f7fbfc;
}
.excel-dropzone:hover { background: #f0f8fa; }
.excel-drop-title { color: #154963; font-size: 16px; }
.excel-detection { min-height: 42px; border-radius: 6px; }
.tip-card { padding: 21px; border: 0; border-radius: 8px; background: #084c67; box-shadow: none; }
.tip-card .eyebrow { color: #7bc8d0; }
.tip-card h3 { margin-top: 20px; }
.tip-card ol { color: #c4dce5; font-size: 12px; line-height: 1.9; }

/* 表格、计划、历史、公告与账号 */
.table-wrap { border-color: #d6e1e8; border-radius: 7px; box-shadow: none; }
th, td { padding: 11px 12px; border-color: #dde6eb; }
th { height: 40px; background: #eaf2f7; color: #1a5370; font-size: 10px; letter-spacing: .02em; }
tbody tr:hover { background: #f7fafc; }
.plan-admin-list, .announcement-admin-list { gap: 10px; }
.plan-batch-panel {
  border-color: #dce5ea;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(17, 53, 77, .04);
}
.plan-batch-panel::before { width: 3px; background: #2790ad; }
.plan-batch-panel.category-port::before { background: var(--sand); }
.plan-batch-summary { min-height: 72px; padding: 11px 14px 11px 18px; gap: 18px; }
.date-block { width: 48px; height: 48px; border-radius: 7px; background: #edf5f7; }
.date-block b { font-size: 18px; }
.admin-plan-title { gap: 11px; }
.admin-plan-title h3 { font-size: 15px; }
.admin-plan-title p { font-size: 10px; }
.plan-batch-facts { gap: 16px; font-size: 11px; }
.status-pill, .badge { padding: 4px 8px; border-radius: 5px; font-size: 10px; }
.notice-admin-card { padding: 17px 18px; border-radius: 8px; box-shadow: var(--shadow); }
.notice-admin-card .plan-meta-row { margin-top: 12px; padding-top: 10px; }
.history-filter-bar {
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 8px;
  box-shadow: none;
  gap: 8px;
}
.history-filter-bar label { font-size: 9px; }
.history-filter-bar input, .history-filter-bar select { min-height: 38px; font-size: 11px; }
.history-filter-actions .btn { min-height: 38px; }
.history-result-summary { color: #6d808d; }

/* 方案 1 的高密度计划工作台 */
.plan-inline-detail { border-top-color: #d8e3e9; background: #fff; }
.plan-table-toolbar {
  top: 58px;
  min-height: 66px;
  padding: 10px 13px;
  border-bottom-color: #d9e3e9;
  background: #f8fafb;
  grid-template-columns: auto minmax(300px, 1fr) auto;
  gap: 12px;
  backdrop-filter: none;
}
.plan-table-heading h3 { color: #153f57; font-size: 16px; }
.plan-table-heading p { color: #748692; font-size: 10px; }
.plan-table-search { grid-template-columns: minmax(180px, 1fr) 46px; }
.plan-table-search input { min-height: 40px; padding: 8px 12px; border-radius: 6px 0 0 6px; font-size: 12px; }
.plan-table-search button { height: 40px; border-radius: 0 6px 6px 0; background: #eef4f7; font-size: 11px; }
.bulk-change-reason { padding: 10px 14px; border-color: #ead7b7; background: #fff8eb; }
.dispatch-plan-table-wrap { overflow: visible; }
.plan-data-table { color: #294252; font-size: 11px; }
.plan-data-table th {
  top: 124px;
  height: 42px;
  padding: 6px 5px;
  border-color: #d7e2e9;
  background: #eaf2f7;
  color: #174d69;
  font-size: 10px;
}
.plan-data-table td { height: 48px; border-color: #dfe7ec; }
.plan-data-table input, .plan-data-table select, .plan-data-table textarea { min-height: 46px; padding: 6px; color: #294252; }
.plan-data-table input[readonly], .plan-data-table textarea[readonly], .plan-data-table select:disabled { -webkit-text-fill-color: #294252; }
.plan-data-table .col-ship input { color: #143e56; }
.plan-data-table .col-time input { color: #0b5574; }
.plan-data-table .row-number { background: #f4f7f9; color: #7f929e; }
.plan-data-table tbody:hover .plan-primary-row { background: #f6fafc; }
.plan-secondary-row td { background: #fafcfd; }
.secondary-fields { min-height: 42px; padding: 5px 8px 6px 40px; }
.secondary-fields input, .secondary-fields textarea { min-height: 28px; border-radius: 4px; background: #f2f6f8; }
.plan-table-form.editing .plan-data-table input,
.plan-table-form.editing .plan-data-table select,
.plan-table-form.editing .plan-data-table textarea { border-color: #78aebf; box-shadow: none; }
.plan-table-form.editing .plan-secondary-row td { background: #edf6f8; }
.plan-batch-panel.table-fullscreen .plan-data-table th { top: 66px; }

/* 弹窗与通知 */
.modal-backdrop { background: rgba(8, 35, 51, .58); backdrop-filter: none; }
.modal {
  padding: 23px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 10px;
  box-shadow: var(--shadow-strong);
}
.modal-head { margin-bottom: 16px; }
.modal-close { width: 32px; height: 32px; min-height: 32px; border-radius: 6px; background: #eef3f6; color: #456270; }
.receipt-chip { border-radius: 6px; }
.toast { border-radius: 7px; background: #073a56; box-shadow: 0 10px 30px rgba(6, 46, 70, .2); }

/* 拖轮端与调度手机端 */
.mobile-page { background: #f3f7f9; }
.mobile-header { height: 60px; padding: 0 13px; border-bottom-color: rgba(255,255,255,.14); background: var(--navy); box-shadow: 0 3px 12px rgba(5,40,61,.16); }
.notification-button { min-height: 36px; padding: 7px 10px; border-radius: 6px; }
.mobile-content { max-width: 760px; padding: 17px 12px 30px; }
.mobile-greeting { margin-bottom: 14px; }
.mobile-greeting h1 { color: #103b54; font-size: 24px; }
.segmented { padding: 4px; border-radius: 8px; background: #e4ebef; }
.segmented button, .category-tabs button { min-height: 38px; border-radius: 6px; }
.segmented button.active { border: 1px solid #d6e1e7; box-shadow: none; }
.category-tabs { margin: 11px 0 13px; border-radius: 8px; background: #fff; }
.batch-header-card, .plan-card, .notice-card { border-radius: 9px; box-shadow: var(--shadow); }
.plan-card.my-task { border-color: #78bac3; box-shadow: 0 5px 16px rgba(8,126,139,.09); }
.plan-card-main { padding: 16px 15px 14px 18px; }
.plan-time { color: #0b4965; font-size: 22px; }
.direction { border-radius: 5px; }
.ship-name { color: #17374b; font-size: 19px; }
.tug-tag { border-radius: 5px; background: #0b526f; }
.fact { min-height: 49px; border-radius: 6px; background: #f4f7f9; }
.remark { border-radius: 0 6px 6px 0; }
.settings-card { border-radius: 8px; box-shadow: var(--shadow); }
.profile-hero > span, .dispatch-profile-card > span { border-radius: 9px; background: #0b526f; }
.bottom-nav, .dispatch-bottom-nav { background: #fff; backdrop-filter: none; box-shadow: 0 -4px 14px rgba(17,53,77,.05); }
.dispatch-bottom-nav button.active { background: #edf5f8; color: #087390; }

@media (max-width: 1180px) {
  .workspace { grid-template-columns: 176px minmax(0, 1fr); }
  .sidebar { width: 176px; }
  .content { padding-right: 16px; padding-left: 16px; }
}

@media (max-width: 760px) {
  .login-page { background: #06344f; }
  .login-shell { width: min(440px, calc(100% - 24px)); grid-template-columns: 1fr; gap: 15px; }
  .login-brand { padding-top: 24px; }
  .login-brand .brand-mark { width: 48px; height: 48px; }
  .login-brand h1 { margin-bottom: 4px; font-size: 40px; }
  .login-brand .eyebrow { margin-top: 12px; }
  .login-card { padding: 25px 21px; border-radius: 9px; }
  .app-page .topbar { height: 52px; padding: 0 9px; }
  .app-page .workspace { padding-top: 52px; }
  .app-page .content { padding: 13px 8px 22px; }
  .page-heading { margin-bottom: 14px; }
  .page-heading h1 { font-size: 24px; }
  .card { border-radius: 8px; }
  .stats-grid { gap: 8px; }
  .stat { min-height: 100px; padding: 14px; }
  .stat > b { font-size: 26px; }
  .plan-batch-summary { padding: 10px 9px 10px 14px; }
  .plan-table-toolbar { padding: 9px; }
  .history-filter-bar { padding: 10px; }
  .dispatch-bottom-nav { height: calc(62px + env(safe-area-inset-bottom)); }
  .dispatch-bottom-nav button.active { box-shadow: inset 0 2px 0 #1689a5; }
  .mobile-header { height: 56px; }
  .mobile-content { padding: 14px 10px 26px; }
}

@media (orientation: landscape) and (max-height: 600px) {
  .app-page .content { padding: 4px; }
  .plan-table-toolbar { min-height: 50px; padding: 4px 7px; }
  .plan-data-table th { top: 50px; }
  .mobile-page .mobile-header { height: 48px; }
  .mobile-page .mobile-content { min-height: calc(100dvh - 48px); padding: 6px; }
  .tug-table-toolbar { min-height: 44px; padding: 4px 7px; background: #eef4f7; }
  .tug-landscape-shell .landscape-table { min-height: calc(100dvh - 98px); }
}

/* 已发布计划与在线编排共用电子表格视觉 */
.published-sheet-section { overflow: visible; border: 0; border-radius: 0; }
.dispatch-plan-table-wrap.published-workbook-wrap { width: 100%; overflow-x: auto; overflow-y: visible; background: #fff; scrollbar-gutter: stable; }
.published-workbook-table { min-width: 1740px; }
.published-workbook-table th { position: static; }
.published-workbook-table tbody.search-hidden { display: none; }
.published-workbook-table tbody.cancelled { opacity: .58; }
.published-workbook-table tbody:hover td { background: #f3fbf7; }
.published-workbook-table td select,
.published-workbook-table td input:not([type="checkbox"]) {
  width: 100%;
  height: calc(var(--workbook-row-height) - 1px);
  min-height: 0;
  padding: 4px 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #203b48;
  font-size: 10px;
  box-shadow: none;
}
.published-workbook-table td select { appearance: none; text-align: left; }
.published-workbook-table td select:disabled,
.published-workbook-table td input[readonly] { opacity: 1; -webkit-text-fill-color: #203b48; }
.published-workbook-table .col-ship input { color: #0c3f56; font-weight: 800; }
.published-workbook-table .col-time input { color: #0b5371; font-weight: 800; font-variant-numeric: tabular-nums; }
.published-workbook-table .published-feedback-head,
.published-workbook-table .published-feedback { width: 178px; }
.published-workbook-table .published-cancel-head,
.published-workbook-table .published-cancel { width: 72px; }
.published-workbook-table .published-feedback { padding: 4px 7px; background: #f7faf9; color: #49636d; font-size: 9px; line-height: 1.35; }
.published-workbook-table .published-feedback span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.published-workbook-table .published-cancel { background: #f8faf9; text-align: center; }
.published-workbook-table .published-cancel label { display: grid; height: 100%; place-content: center; color: #637980; font-size: 9px; gap: 2px; }
.published-workbook-table .published-cancel input { width: 15px; height: 15px; min-height: 15px; margin: auto; accent-color: #c74b55; }
.published-plan-form.editing .published-workbook-table td input:not([type="checkbox"]),
.published-plan-form.editing .published-workbook-table td select { outline: 1px solid #63aeb9; outline-offset: -1px; background: #f8feff; appearance: auto; }
.published-plan-form.editing .published-workbook-table .published-cancel { background: #fff8eb; }
.plan-batch-panel.table-fullscreen .published-workbook-table th { position: sticky; z-index: 6; top: 66px; }

@media (max-width: 760px) {
  .published-workbook-table th { position: static; }
  .published-workbook-table { min-width: 1740px; }
}

@media (orientation: landscape) and (max-height: 600px) {
  .published-workbook-table th { position: sticky; top: 50px; }
}
