.admin-body {
  min-width: 320px;
  color: var(--ink);
  background: #eef2f6;
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  word-break: keep-all;
}

.admin-topbar {
  position: sticky;
  z-index: 35;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 12px max(24px, calc((100vw - 1480px) / 2));
  color: #fff;
  background: rgba(16, 36, 62, .97);
  box-shadow: 0 8px 24px rgba(9, 23, 40, .16);
  backdrop-filter: blur(14px);
}
.admin-brand { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; }
.admin-brand > span:last-child { display: grid; }
.admin-brand strong { font-size: 1rem; }
.admin-brand small { margin-top: 1px; color: #b9c6d3; font-size: .78rem; }
.admin-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.local-badge { display: inline-flex; align-items: center; gap: 7px; margin-right: 3px; color: #d5dee7; font-size: .82rem; font-weight: 700; }
.local-badge > span:first-child { width: 8px; height: 8px; border-radius: 50%; background: #4fce8a; box-shadow: 0 0 0 4px rgba(79,206,138,.13); }
.outline-link { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 14px; border: 1px solid rgba(255,255,255,.24); border-radius: 10px; color: #fff; background: transparent; text-decoration: none; font-size: .85rem; font-weight: 800; }

.admin-view-nav { border-bottom: 1px solid #dce3eb; background: #fff; box-shadow: 0 4px 14px rgba(16,36,62,.045); }
.admin-view-tabs { display: flex; width: min(1480px, calc(100% - 40px)); margin: 0 auto; gap: 5px; padding: 8px 0; overflow-x: auto; scrollbar-width: thin; }
.admin-view-tabs button { flex: 0 0 auto; min-height: 44px; padding: 0 22px; border: 0; border-radius: 10px; color: #667387; background: transparent; font-size: .93rem; font-weight: 850; }
.admin-view-tabs button.active { color: #fff; background: var(--navy); box-shadow: 0 6px 16px rgba(16,36,62,.16); }
.admin-view-tabs button:focus-visible { outline: 3px solid rgba(243,111,33,.25); outline-offset: 2px; }

.admin-login { display: grid; min-height: 100vh; min-height: 100dvh; place-items: center; padding: 24px; background: radial-gradient(circle at top, #203b5e 0, var(--navy) 45%, #091728 100%); }
.admin-login-card { display: grid; width: 100%; max-width: 430px; gap: 18px; padding: 32px; border-radius: 22px; background: #fff; box-shadow: 0 28px 70px rgba(0,0,0,.25); }
.admin-login-card h1 { margin: 0; font-size: 1.75rem; letter-spacing: -.02em; }
.admin-login-card > p { margin: 0; color: var(--muted); }
.admin-login-card label span { display: block; margin-bottom: 7px; color: #4f5b6e; font-size: .88rem; font-weight: 800; }
.admin-login-card input { width: 100%; height: 50px; padding: 0 14px; border: 1px solid #d8dfe8; border-radius: 11px; outline: 0; }
.admin-login-card input:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(28,56,91,.09); }
.admin-login-card .outline-link { color: var(--navy); border-color: #ced6df; }
.login-error { min-height: 22px; color: #b33f3f !important; font-size: .88rem; font-weight: 750; }

.admin-startup-notice { position: fixed; z-index: 1200; right: 16px; bottom: 16px; left: 16px; max-width: 600px; margin: 0 auto; padding: 18px; border: 1px solid #d6dfe9; border-radius: 14px; color: #10243e; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.admin-startup-notice[hidden] { display: none; }
.admin-startup-notice strong, .admin-startup-notice small { display: block; margin-bottom: 10px; }
.admin-startup-notice small { color: #64748b; }
.admin-startup-notice a { text-decoration: none; }
.admin-startup-notice button { margin-right: 8px; }
/* Unknown <dialog> elements otherwise display all closed popups at once. */
dialog:not([open]) { display: none; }
dialog.admin-legacy-dialog[open] { position: fixed; top: 50%; left: 50%; width: calc(100vw - 32px); max-width: 540px; max-height: 85vh; margin: 0; overflow-y: auto; transform: translate(-50%, -50%); }
.admin-legacy-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(7,18,31,.55); }

.admin-main { width: min(1480px, calc(100% - 40px)); max-width: none; margin: 0 auto; padding: 26px 0 48px; }
#deliveryAdminView { display: flex; flex-direction: column; }
#deliveryAdminView > .admin-intro { order: 1; }
#deliveryAdminView > .delivery-quick-nav { order: 2; }
#deliveryAdminView > .orders-panel { order: 3; }
#deliveryAdminView > .map-panel { order: 4; }
#deliveryAdminView > .driver-board-panel { order: 5; }
#deliveryAdminView > .order-form-panel { order: 6; }
#deliveryAdminView > .setup-grid { order: 7; }
#deliveryAdminView > .handoff-panel { order: 8; }
.admin-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; margin-bottom: 20px; padding: 25px 27px; border-radius: 20px; color: #fff; background: linear-gradient(130deg, var(--navy), #1d426b); box-shadow: 0 16px 40px rgba(16,36,62,.16); }
.admin-intro .eyebrow { color: #f7a16d; }
.admin-intro h1 { margin: 3px 0 8px; font-size: clamp(1.45rem, 2vw, 2rem); letter-spacing: -.02em; }
.admin-intro > div:first-child > p:last-child { max-width: 760px; margin: 0; color: #c7d3df; font-size: .95rem; }
.admin-stats { display: grid; grid-template-columns: repeat(6, minmax(84px, 1fr)); min-width: min(100%, 620px); overflow: hidden; border: 1px solid rgba(255,255,255,.15); border-radius: 15px; background: rgba(255,255,255,.07); }
.admin-stats > div, .admin-stats > button { min-width: 84px; padding: 13px 15px; text-align: center; border-right: 1px solid rgba(255,255,255,.12); }
.admin-stats > button { appearance: none; min-height: 78px; border: 0; border-right: 1px solid rgba(255,255,255,.12); background: transparent; color: inherit; font: inherit; cursor: pointer; touch-action: manipulation; }
.admin-stats > button:hover, .admin-stats > button:focus-visible { background: rgba(255,255,255,.12); }
.admin-stats > button:focus-visible { outline: 2px solid #ffb078; outline-offset: -3px; }
.admin-stats > :last-child { border-right: 0; }
.admin-stats span { display: block; margin-bottom: 4px; color: #c9d4df; font-size: .78rem; font-weight: 750; }
.admin-stats strong { font-size: 1.48rem; }
.admin-stats .warning-stat strong { color: #ffb078; }
.delivery-quick-nav { display: flex; gap: 7px; margin: -5px 0 18px; padding: 8px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 7px 20px rgba(16,36,62,.045); scrollbar-width: thin; }
.delivery-quick-nav a { display: inline-flex; flex: 0 0 auto; min-height: 42px; align-items: center; justify-content: center; padding: 0 15px; border-radius: 9px; color: #526176; font-size: .86rem; font-weight: 850; text-decoration: none; white-space: nowrap; }
.delivery-quick-nav a:hover, .delivery-quick-nav a:focus-visible { color: var(--navy); background: #edf2f7; outline: 0; }
.delivery-quick-nav a.active { color: #fff; background: var(--navy); }
#ordersTitle, #driverBoardTitle, #mapTitle, #formTitle, #driverAccountsTitle { scroll-margin-top: 92px; }

.panel, .driver-board-panel, .handoff-panel { border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(16,36,62,.055); }
.panel { padding: 21px 23px; }
.panel-head, .driver-board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.panel-head h2, .driver-board-head h2 { margin: 0; font-size: 1.22rem; letter-spacing: -.015em; }
.panel-head p, .driver-board-head p { max-width: 560px; margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.step-label { display: block; margin-bottom: 4px; color: var(--orange); font-size: .76rem; font-weight: 900; letter-spacing: .04em; }
.setup-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: start; gap: 18px; margin-bottom: 18px; }
.setup-tools-stack { display: grid; min-width: 0; gap: 12px; }
.settings-fold { min-width: 0; padding: 0; overflow: hidden; }
.settings-fold > summary { display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 21px; cursor: pointer; list-style: none; }
.settings-fold > summary::-webkit-details-marker { display: none; }
.settings-fold > summary:focus-visible { outline: 3px solid rgba(243,111,33,.25); outline-offset: -3px; }
.settings-fold[open] > summary { border-bottom: 1px solid var(--line); background: #fbfcfd; }
.settings-fold-heading { display: grid; min-width: 0; }
.settings-fold-heading strong { overflow: hidden; color: var(--ink); font-size: 1.12rem; letter-spacing: -.015em; text-overflow: ellipsis; white-space: nowrap; }
.settings-fold-state { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; color: var(--muted); }
.settings-fold-state small { font-size: .78rem; font-weight: 750; }
.settings-fold-toggle { position: relative; width: 34px; height: 34px; border-radius: 10px; background: var(--navy); }
.settings-fold-toggle::before, .settings-fold-toggle::after { position: absolute; top: 50%; left: 50%; width: 14px; height: 2px; border-radius: 999px; background: #fff; content: ""; transform: translate(-50%, -50%); }
.settings-fold-toggle::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .16s ease; }
.settings-fold[open] .settings-fold-toggle::after { transform: translate(-50%, -50%) rotate(0); }
.settings-fold-content { padding: 18px 21px 21px; }
.settings-fold-description { margin: 0 0 16px; color: var(--muted); font-size: .86rem; line-height: 1.5; }

.driver-account-form { display: grid; grid-template-columns: minmax(140px, .75fr) minmax(190px, 1fr) minmax(155px, .7fr); gap: 10px; align-items: end; }
.driver-account-form label > span, .admin-form label > span { display: block; margin-bottom: 6px; color: #4f5b6e; font-size: .86rem; font-weight: 800; }
.driver-account-form label > span small { margin-left: 3px; color: var(--muted); font-size: .75rem; font-weight: 700; }
.driver-account-form input, .admin-form input, .admin-form select, .list-controls input, .list-controls select, .batch-toolbar select, .map-controls select { width: 100%; height: 46px; min-width: 0; padding: 0 12px; border: 1px solid #d7dee7; border-radius: 10px; outline: 0; color: var(--ink); background: #fbfcfd; font-size: .93rem; }
.driver-account-form input:focus, .admin-form input:focus, .admin-form select:focus, .list-controls input:focus, .list-controls select:focus, .batch-toolbar select:focus, .map-controls select:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(28,56,91,.08); }
.driver-account-form input[aria-invalid="true"] { border-color: #c45151; box-shadow: 0 0 0 3px rgba(196,81,81,.09); }
.driver-account-form .field-hint { display: block; margin-top: 5px; color: var(--muted); font-size: .74rem; line-height: 1.35; }
.driver-account-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.driver-account-actions button:disabled { cursor: wait; opacity: .55; }
.driver-account-error { grid-column: 1 / -1; min-height: 18px; margin: 0; color: #b23b3b; font-size: .82rem; font-weight: 750; }
.save-order-button, .secondary-button, .assign-button, .export-button, .file-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 16px; border: 0; border-radius: 10px; color: #fff; background: var(--navy); font-weight: 850; text-decoration: none; white-space: nowrap; }
.save-order-button:hover, .assign-button:hover { background: #1a385c; }
.save-order-button:disabled, .assign-button:disabled, .secondary-button:disabled { cursor: not-allowed; opacity: .45; }
.secondary-button { color: var(--navy); border: 1px solid #cbd4df; background: #fff; }
.secondary-button.compact { min-height: 42px; font-size: .86rem; }
.assign-button, .export-button, .file-button { background: var(--orange); }
.file-button { position: relative; cursor: pointer; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.text-button { min-height: 40px; padding: 0 8px; border: 0; color: var(--navy-2); background: transparent; font-size: .86rem; font-weight: 800; }

.driver-account-list { display: grid; gap: 8px; margin-top: 15px; }
.driver-account-row { display: grid; grid-template-columns: minmax(150px,1fr) auto auto auto; gap: 9px; align-items: center; padding: 11px 12px; border: 1px solid #e7ebf0; border-radius: 11px; background: #fafbfd; }
.driver-account-row.inactive { opacity: .6; }
.driver-account-row > div { display: grid; min-width: 0; }
.driver-account-row strong { font-size: .93rem; }
.driver-account-row span { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.driver-account-row .account-pin-warning { color: #a34b16; font-weight: 850; }
.driver-account-row button { min-height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--navy-2); background: #fff; font-size: .8rem; font-weight: 800; }
.account-state { padding: 4px 8px; border-radius: 999px; color: #177048 !important; background: var(--green-soft); font-weight: 800; }
.account-empty { margin: 0; padding: 14px; color: var(--muted); text-align: center; font-size: .88rem; }

.excel-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.excel-panel .panel-head { display: block; }
.excel-panel .panel-head h2 { white-space: nowrap; }
.excel-panel .panel-head p { margin-top: 7px; }
.excel-guide { display: grid; gap: 4px; margin-top: 14px; padding: 13px 14px; border-radius: 11px; color: #34536f; background: #edf5fc; }
.excel-guide strong { font-size: .9rem; }
.excel-guide span, .excel-file-status { color: #637487; font-size: .83rem; }
.excel-file-status { margin: 12px 0 0; overflow-wrap: anywhere; }

.calculator-settings-panel { min-width: 0; }
.calculator-item-form { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(145px, 190px) minmax(150px, 190px) auto auto; gap: 10px; align-items: end; }
.calculator-item-form small { display: block; margin-top: 6px; color: var(--muted); font-size: .8rem; }
.calculator-item-form label > span { display: block; margin-bottom: 6px; color: #4f5b6e; font-size: .86rem; font-weight: 800; }
.calculator-item-form input { width: 100%; height: 46px; min-width: 0; padding: 0 12px; border: 1px solid #d7dee7; border-radius: 10px; outline: 0; color: var(--ink); background: #fbfcfd; font-size: .93rem; }
.calculator-item-form input:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(28,56,91,.08); }
.calculator-stock-settings { min-width: 0; }
.calculator-stock-settings > label:first-child > span { display: block; margin-bottom: 6px; color: #4f5b6e; font-size: .86rem; font-weight: 800; }
.calculator-item-form .calculator-sold-out { display: flex; align-items: center; gap: 7px; margin-top: 10px; cursor: pointer; }
.calculator-item-form .calculator-sold-out input { flex: 0 0 20px; width: 20px; height: 20px; padding: 0; accent-color: var(--orange); }
.calculator-item-form .calculator-sold-out > span { margin: 0; color: #a84d12; font-size: .8rem; }
.calculator-item-form button { min-width: 105px; }
.calculator-item-error { min-height: 18px; margin: 7px 0 0; color: #b23b3b; font-size: .82rem; font-weight: 750; }
.calculator-item-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; margin-top: 8px; }
.calculator-batch-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; }
.calculator-batch-toolbar label { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; font-weight: 800; }
.calculator-batch-toolbar input, .calculator-item-checkbox { width: 20px; height: 20px; accent-color: var(--orange); }
.calculator-batch-toolbar strong { font-size: .875rem; }
.calculator-batch-toolbar small { color: var(--muted); font-size: .78rem; }
.calculator-settings-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 11px 12px; border: 1px solid #e7ebf0; border-radius: 11px; background: #fafbfd; }
.calculator-settings-row > div { display: grid; min-width: 0; }
.calculator-settings-row strong { overflow: hidden; font-size: .93rem; text-overflow: ellipsis; white-space: nowrap; }
.calculator-settings-row span { color: var(--orange); font-size: .84rem; font-weight: 850; }
.calculator-settings-row button { min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--navy-2); background: #fff; font-size: .8rem; font-weight: 800; }
.calculator-settings-row .delete-calculator-item { color: #a54040; }
.calculator-item-empty { grid-column: 1 / -1; margin: 0; padding: 14px; color: var(--muted); text-align: center; font-size: .88rem; }
.calculator-settings-row small { color: var(--muted); font-size: .8rem; }
.calculator-settings-row .calculator-sold-out-badge { justify-self: start; margin: 4px 0; padding: 3px 6px; border-radius: 5px; color: #99430e; background: #fff0df; font-size: .75rem; font-weight: 800; }
.inventory-panel { min-width: 0; padding: 24px; }
.inventory-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.inventory-heading h2 { margin: 5px 0 8px; font-size: 1.4rem; }
.inventory-heading p:not(.step-label) { margin: 0; color: var(--muted); font-size: .95rem; }
.inventory-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 24px 0 20px; }
.inventory-toolbar label { display: grid; gap: 6px; font-weight: 800; font-size: .9rem; }
.inventory-toolbar input, .inventory-card input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 1rem; }
.inventory-toolbar [role=status] { color: var(--muted); font-size: .9rem; align-self: center; }
.inventory-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.inventory-summary > div { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #f6f8fb; }
.inventory-summary span { display: block; font-size: .9rem; color: var(--muted); }
.inventory-summary strong { display: block; font-size: 1.8rem; margin-top: 8px; }
.inventory-summary small { font-size: 1rem; margin-left: 4px; }
.inventory-help { color: #52667d; line-height: 1.65; font-size: .9rem; }
.inventory-error { color: #a62d2d; font-weight: 750; font-size: 1rem; }
.inventory-items { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr)); gap: 16px; margin-top: 24px; }
.inventory-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.inventory-card.shortage { border-color: #e29988; background: #fff8f5; }
.inventory-card-heading h3 { margin: 0 0 6px; overflow-wrap: anywhere; font-size: 1.15rem; }
.inventory-card-heading > span { font-size: .85rem; color: var(--muted); }
.inventory-breakdown { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 20px 0 14px; }
.inventory-breakdown div { border-radius: 8px; padding: 10px 4px; text-align: center; background: #f2f5f8; }
.inventory-breakdown dt { font-size: .85rem; color: var(--muted); }
.inventory-breakdown dd { margin: 5px 0 0; font-size: 1.15rem; font-weight: 850; }
.inventory-remaining { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding-bottom: 18px; }
.inventory-remaining > span { font-size: .9rem; }
.inventory-remaining strong { margin-left: auto; font-size: 1.6rem; }
.inventory-remaining small { flex-basis: 100%; text-align: right; color: #a62d2d; font-size: .9rem; font-weight: 850; }
.inventory-card form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: end; }
.inventory-card label { font-weight: 750; font-size: .9rem; }
.inventory-card label small { font-weight: 400; color: var(--muted); }
.inventory-card input { margin-top: 8px; }
.inventory-card input:focus-visible, .inventory-toolbar input:focus-visible { outline: 3px solid #ff792f; outline-offset: 2px; }
.inventory-card-note { margin: 10px 0 0; min-height: 20px; color: var(--muted); font-size: .85rem; }
.inventory-unresolved { margin-top: 24px; padding: 16px; border: 1px solid #eacac0; border-radius: 12px; background: #fff8f5; }
.inventory-unresolved summary { font-weight: 850; cursor: pointer; }
.inventory-unresolved p { font-size: .9rem; line-height: 1.6; }
.inventory-unresolved ul { padding: 0; list-style: none; }
.inventory-unresolved li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 12px 0; border-top: 1px solid #ebd7d0; }
.inventory-unresolved li span { color: var(--muted); font-size: .9rem; }
.inventory-empty { color: var(--muted); }
@media (max-width: 600px) {
  .inventory-panel { padding: 16px; }
  .inventory-toolbar label { flex-basis: 100%; }
  .inventory-summary { gap: 8px; }
  .inventory-summary > div { padding: 12px 10px; }
  .inventory-summary strong { font-size: 1.4rem; }
  .inventory-card { padding: 16px; }
  .inventory-toolbar [role=status] { flex-basis: 100%; }
}
.calculator-deletion-blockers { margin: 12px 0; padding: 16px; border: 1px solid #e3ac60; border-radius: 12px; color: #653b14; background: #fff7e9; font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; }
.calculator-deletion-blockers p { margin: 6px 0; }
.calculator-deletion-blockers ul { margin: 8px 0; padding-left: 22px; }

.delivery-area-main { padding-top: 22px; }
.delivery-area-intro { background: linear-gradient(130deg, #10243e, #17466f 68%, #23658d); }
.delivery-area-summary { display: grid; min-width: 250px; gap: 4px; padding: 16px 18px; border: 1px solid rgba(255,255,255,.16); border-radius: 15px; background: rgba(255,255,255,.08); }
.delivery-area-summary span { color: #c9d4df; font-size: .78rem; font-weight: 750; }
.delivery-area-summary strong { font-size: 1.45rem; }
.delivery-area-summary small { color: #bac8d6; font-size: .78rem; }
.delivery-area-workspace { display: grid; grid-template-columns: minmax(390px, .72fr) minmax(520px, 1.28fr); align-items: start; gap: 18px; }
.delivery-area-selector-panel, .delivery-area-map-panel { min-width: 0; }
.delivery-area-selectors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.delivery-area-selectors label > span { display: block; margin-bottom: 6px; color: #4f5b6e; font-size: .82rem; font-weight: 850; }
.delivery-area-selectors select, .delivery-area-search input { width: 100%; height: 44px; min-width: 0; padding: 0 11px; border: 1px solid #d7dee7; border-radius: 10px; outline: 0; color: var(--ink); background: #fbfcfd; font-size: .88rem; }
.delivery-area-selectors select:focus, .delivery-area-search input:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(28,56,91,.08); }
.delivery-area-selectors select:disabled, .delivery-area-search input:disabled { color: #9aa5b2; background: #f1f3f6; }
.delivery-area-level-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 9px; }
.delivery-area-level-actions button { min-width: 0; padding: 0 8px; }
.delivery-area-dong-head, .delivery-area-picked-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 19px; }
.delivery-area-dong-head > div, .delivery-area-picked-head > div { display: grid; min-width: 0; gap: 2px; }
.delivery-area-dong-head strong, .delivery-area-picked-head strong { color: var(--navy); font-size: .95rem; }
.delivery-area-dong-head small, .delivery-area-picked-head small { color: var(--muted); font-size: .76rem; line-height: 1.4; }
.delivery-area-search { width: min(190px, 42%); }
.delivery-area-search input { height: 40px; }
.delivery-area-dong-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 9px; padding: 8px 10px; border-radius: 9px; background: #f3f6f9; }
.delivery-area-dong-tools label { display: inline-flex; align-items: center; gap: 7px; color: #445367; font-size: .82rem; font-weight: 800; }
.delivery-area-dong-tools input, .delivery-area-dong-check { width: 20px; height: 20px; accent-color: #2563eb; }
.delivery-area-dong-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: 360px; margin-top: 8px; padding: 8px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fafbfd; }
.delivery-area-dong-option { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 46px; padding: 8px 9px; border: 1px solid #e3e8ee; border-radius: 9px; background: #fff; cursor: pointer; }
.delivery-area-dong-option:hover { border-color: #9eb9e2; background: #f5f9ff; }
.delivery-area-dong-option.selected { border-color: #79a5e6; background: #edf5ff; }
.delivery-area-dong-option span { min-width: 0; overflow: hidden; font-size: .86rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.delivery-area-picked-list { display: flex; flex-wrap: wrap; gap: 7px; min-height: 54px; max-height: 210px; margin-top: 9px; padding: 9px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fafbfd; }
.delivery-area-chip { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; min-height: 36px; padding: 6px 7px 6px 11px; border: 1px solid #b9cfeb; border-radius: 999px; color: #174d88; background: #edf5ff; font-size: .78rem; font-weight: 850; }
.delivery-area-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delivery-area-chip button { flex: 0 0 auto; width: 25px; height: 25px; padding: 0; border: 0; border-radius: 50%; color: #174d88; background: #d9e9fb; font-size: 1rem; font-weight: 900; line-height: 1; }
.delivery-area-empty { grid-column: 1 / -1; align-self: center; width: 100%; margin: 0; padding: 18px 8px; color: var(--muted); text-align: center; font-size: .82rem; }
.delivery-area-error { min-height: 20px; margin: 9px 0 0; color: #b23b3b; font-size: .82rem; font-weight: 750; }
.delivery-area-save-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 7px; }
.delivery-area-save-row > span { color: var(--muted); font-size: .78rem; }
.delivery-area-map-panel { position: sticky; top: 94px; }
.delivery-area-map-status { min-height: 22px; margin: -4px 0 10px; color: #526276; font-size: .82rem; font-weight: 750; }
.delivery-area-map-status.error { color: #aa3d3d; }
.delivery-area-map { width: 100% !important; height: 640px !important; min-height: 0; max-height: 640px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #e7edf3; }
.delivery-area-map-panel .map-privacy a { color: #315f8f; font-weight: 800; }

.ai-settings-main { padding-top: 22px; }
.ai-settings-intro { background: linear-gradient(130deg, #10243e, #1e466f 68%, #2e6488); }
.ai-settings-summary { display: grid; min-width: 270px; gap: 4px; padding: 16px 18px; border: 1px solid rgba(255,255,255,.16); border-radius: 15px; background: rgba(255,255,255,.08); }
.ai-settings-summary span { color: #c9d4df; font-size: .78rem; font-weight: 750; }
.ai-settings-summary strong { font-size: 1.12rem; }
.ai-settings-summary strong.ready { color: #83e1ad; }
.ai-settings-summary strong.off { color: #ffd09f; }
.ai-settings-summary small { color: #bac8d6; font-size: .78rem; }
.ai-settings-summary .integration-status-label { margin-top: 11px; padding-top: 11px; border-top: 1px solid rgba(255,255,255,.15); }
.ai-settings-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr); gap: 18px; }
.tmap-settings-panel, .message-settings-panel { grid-column: 1 / -1; }
.ai-settings-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .55fr); gap: 14px; }
.ai-settings-form .full { grid-column: 1 / -1; }
.ai-settings-form label > span { display: block; margin-bottom: 6px; color: #4f5b6e; font-size: .86rem; font-weight: 800; }
.ai-settings-form input:not([type="checkbox"]), .ai-settings-form select, .ai-settings-form textarea { width: 100%; height: 48px; min-width: 0; padding: 0 12px; border: 1px solid #d7dee7; border-radius: 10px; outline: 0; color: var(--ink); background: #fbfcfd; font-size: .93rem; }
.ai-settings-form textarea { height: auto; min-height: 132px; padding: 13px 14px; resize: vertical; font-size: 1.03rem; line-height: 1.6; }
.ai-settings-form input:not([type="checkbox"]):focus, .ai-settings-form select:focus, .ai-settings-form textarea:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(28,56,91,.08); }
.ai-settings-form label > small { display: block; margin-top: 6px; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.ai-enabled-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px; border: 1px solid #dce4ec; border-radius: 12px; background: #f7fafc; cursor: pointer; }
.ai-enabled-row input { width: 22px; height: 22px; accent-color: var(--orange); }
.ai-enabled-row > span { display: grid !important; gap: 2px; margin: 0 !important; }
.ai-enabled-row small { color: var(--muted); font-size: .78rem; font-weight: 600; }
.ai-settings-actions { display: flex; justify-content: flex-end; gap: 9px; }
.ai-settings-actions button:disabled { cursor: wait; opacity: .55; }
.ai-settings-error { min-height: 21px; margin: -2px 0 0; color: #b23b3b; font-size: .84rem; font-weight: 750; }
.message-settings-preview { padding: 14px 16px; border: 1px solid #dfe7ef; border-radius: 12px; background: #f7fafc; }
.message-settings-preview strong { display: block; margin-bottom: 7px; color: #536276; font-size: .8rem; }
.message-settings-preview p { min-height: 48px; margin: 0; color: var(--ink); font-size: 1.08rem; font-weight: 700; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.tmap-key-notice { margin: 14px 0 0; padding: 11px 13px; border-radius: 10px; color: #6f5830; background: #fff8e8; font-size: .79rem; line-height: 1.5; }
.ai-safety-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ai-safety-list li { display: grid; gap: 3px; padding: 12px 13px; border: 1px solid #e4e9ef; border-radius: 11px; background: #fafbfd; }
.ai-safety-list strong { color: var(--navy); font-size: .88rem; }
.ai-safety-list span { color: var(--muted); font-size: .79rem; line-height: 1.48; }
.ai-test-status { margin-top: 13px; padding: 11px 12px; border-radius: 10px; color: #4e6073; background: #edf3f8; font-size: .82rem; font-weight: 750; line-height: 1.5; }
.ai-test-status.success { color: #176944; background: var(--green-soft); }
.ai-test-status.failed { color: #9d3838; background: #fff0f0; }
.ai-limit-note { margin: 12px 0 0; color: #72512d; font-size: .78rem; line-height: 1.55; }

.reservation-main { padding-top: 22px; }
.reservation-intro { background: linear-gradient(130deg, #10243e, #244d75 72%, #315e83); }
.reservation-stats { grid-template-columns: repeat(5, minmax(76px, 1fr)); min-width: min(100%, 480px); }
.reservation-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 7px 20px rgba(16,36,62,.05); }
.reservation-toolbar > div:first-child { display: grid; }
.reservation-toolbar > div:first-child strong { font-size: 1rem; }
.reservation-toolbar-actions, .reservation-list-controls { display: flex; align-items: center; gap: 8px; }
.reservation-toolbar input, .reservation-toolbar select, .reservation-list-controls input, .reservation-list-controls select { width: 100%; height: 44px; min-width: 0; padding: 0 11px; border: 1px solid #d7dee7; border-radius: 9px; outline: 0; color: var(--ink); background: #fbfcfd; font-size: 1rem; }
.reservation-toolbar-actions { flex-wrap: wrap; }
.reservation-filter-notice { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; padding: 14px; border: 1px solid #bdd0e5; border-radius: 12px; color: var(--navy); background: #eef5fc; font-size: 1rem; }
.reservation-filter-notice strong { flex: 1 1 220px; overflow-wrap: anywhere; }
.reservation-load-error { color: #a03232; font-size: 1rem; }
.reservation-pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.pickup-reservation-date { margin: 5px 0; font-size: .875rem; font-weight: 800; }
.pickup-reservation-date.overdue { color: #ac3827; }
.reservation-toolbar input:focus, .reservation-list-controls input:focus, .reservation-list-controls select:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(28,56,91,.08); }
.reservation-work-grid { display: grid; grid-template-columns: minmax(320px, .82fr) minmax(0, 1.18fr); gap: 18px; margin-bottom: 18px; }
.reservation-form-panel, .reservation-summary-panel { min-width: 0; }
.pickup-reservation-form { display: grid; gap: 14px; }
.reservation-form-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pickup-reservation-form label > span { display: block; margin-bottom: 6px; color: #4f5b6e; font-size: .86rem; font-weight: 800; }
.pickup-reservation-form input { width: 100%; height: 46px; min-width: 0; padding: 0 12px; border: 1px solid #d7dee7; border-radius: 10px; outline: 0; color: var(--ink); background: #fbfcfd; font-size: .95rem; }
.pickup-reservation-form input:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(28,56,91,.08); }
.pickup-item-fieldset { min-width: 0; margin: 0; padding: 13px; border: 1px solid var(--line); border-radius: 13px; }
.pickup-item-fieldset legend { padding: 0 5px; color: var(--navy); font-size: .92rem; font-weight: 900; }
.pickup-item-fieldset > p { margin: 0 0 10px; color: var(--muted); font-size: .8rem; }
.pickup-item-picker { display: grid; gap: 8px; max-height: 390px; overflow: auto; }
.pickup-item-choice { display: grid; grid-template-columns: minmax(0, 1fr) 140px; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid #e2e7ed; border-radius: 11px; background: #fafbfd; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.pickup-item-choice.selected { border-color: rgba(243,111,33,.55); background: var(--orange-soft); box-shadow: inset 3px 0 0 var(--orange); }
.pickup-item-choice.unavailable { border-style: dashed; }
.pickup-item-choice > label:first-child { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; }
.pickup-item-choice .pickup-item-check { flex: 0 0 auto; width: 22px; height: 22px; padding: 0; accent-color: var(--orange); }
.pickup-item-choice label span { display: grid; min-width: 0; margin: 0; }
.pickup-item-choice strong { overflow: hidden; color: var(--ink); font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.pickup-item-choice small { color: var(--muted); font-size: .76rem; font-weight: 700; }
.pickup-item-choice .pickup-item-line-total { margin-top: 2px; color: var(--orange); font-weight: 850; }
.pickup-quantity-stepper { display: grid; grid-template-columns: 44px 44px 44px; align-items: center; gap: 4px; justify-self: end; }
.pickup-quantity-button { display: grid; width: 44px; height: 44px; padding: 0; place-items: center; border: 1px solid #d5dde6; border-radius: 10px; color: var(--navy); background: #fff; font-size: 1.25rem; font-weight: 900; line-height: 1; user-select: none; -webkit-user-select: none; }
.pickup-quantity-button:hover:not(:disabled) { border-color: var(--orange); color: var(--orange); }
.pickup-quantity-button:active:not(:disabled) { color: #fff; background: var(--orange); transform: translateY(1px); }
.pickup-quantity-button:disabled { color: #aeb6c1; background: #eef1f4; cursor: default; }
.pickup-item-choice .pickup-item-quantity { width: 44px; height: 44px; padding: 0 3px; text-align: center; font-size: 16px; font-weight: 850; appearance: textfield; }
.pickup-item-choice .pickup-item-quantity::-webkit-inner-spin-button, .pickup-item-choice .pickup-item-quantity::-webkit-outer-spin-button { margin: 0; appearance: none; }
.pickup-item-choice .pickup-item-quantity:disabled { color: #9aa3af; background: #eef1f4; }
.order-item-picker [data-order-catalog-item] { cursor: pointer; touch-action: manipulation; }
.order-item-picker .pickup-item-choice { position: relative; display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 10px; padding: 12px; background: #f8fafc; }
.order-item-picker .pickup-item-choice.selected { border-color: #e55e15; background: #fff0df; box-shadow: inset 0 0 0 1px #e55e15; }
.order-catalog-main { position: relative; min-width: 0; }
.order-catalog-main .order-catalog-toggle { position: absolute; top: -8px; right: -8px; z-index: 1; display: grid; width: 44px; height: 44px; margin: 0; place-items: center; cursor: pointer; }
.order-catalog-main .order-catalog-add { display: grid; flex: 1; width: 100%; min-width: 0; min-height: 44px; gap: 3px; padding: 6px 4px; border: 0; border-radius: 7px; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; }
.order-item-picker .order-catalog-add { min-height: 102px; padding: 0; align-content: start; gap: 5px; }
.order-item-picker .order-catalog-add strong { overflow: visible; white-space: normal; overflow-wrap: anywhere; font-size: 1rem; line-height: 1.4; }
.order-catalog-icon { display: block; width: fit-content; margin: 0 0 6px; font-size: 2rem; font-style: normal; line-height: 1.2; }
.order-item-picker .order-catalog-add small { font-size: .875rem; line-height: 1.4; }
.order-item-picker .pickup-quantity-stepper { width: 100%; grid-template-columns: 44px minmax(44px, 1fr) 44px; gap: 4px; justify-self: stretch; }
.order-item-picker .pickup-item-quantity { width: 100%; min-width: 0; }
.order-catalog-add:focus-visible { outline: 3px solid var(--navy-2); outline-offset: 2px; }
.order-catalog-add:active:not(:disabled) { background: rgba(243,111,33,.12); }
.order-catalog-add:disabled { cursor: default; }
.pickup-payment-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; border: 1px solid #f2c9ad; border-radius: 12px; background: var(--orange-soft); }
.pickup-payment-total span { color: #704426; font-size: .88rem; font-weight: 850; }
.pickup-payment-total strong { color: var(--orange); font-size: 1.35rem; font-weight: 950; }
.reservation-form-error { min-height: 20px; margin: -3px 0 0; color: #b23b3b; font-size: .84rem; font-weight: 750; }
.reservation-form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.reservation-aggregate-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 9px; }
.reservation-aggregate-card { padding: 13px 14px; border: 1px solid #e5eaf0; border-radius: 12px; background: #fafbfd; }
.reservation-aggregate-card > strong { display: block; overflow: hidden; margin-bottom: 10px; font-size: .92rem; text-overflow: ellipsis; white-space: nowrap; }
.reservation-aggregate-card dl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; overflow: hidden; border: 1px solid #e5e9ee; border-radius: 9px; background: #fff; }
.reservation-aggregate-card dl div { padding: 8px 5px; border-right: 1px solid #e5e9ee; text-align: center; }
.reservation-aggregate-card dl div:last-child { border-right: 0; }
.reservation-aggregate-card dt { color: var(--muted); font-size: .7rem; font-weight: 750; }
.reservation-aggregate-card dd { margin: 1px 0 0; color: var(--navy); font-size: 1.05rem; font-weight: 900; }
.reservation-aggregate-card .remaining dd { color: var(--orange); }
.reservation-summary-empty { grid-column: 1 / -1; margin: 0; padding: 38px 14px; color: var(--muted); text-align: center; font-size: .86rem; }
.reservation-list-panel { min-width: 0; }
.reservation-list-controls input { min-width: 210px; }
.reservation-result-count { margin: -5px 0 11px; color: var(--muted); font-size: .8rem; font-weight: 750; }
.reservation-list { display: grid; gap: 9px; }
.pickup-reservation-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 15px; border: 1px solid #e4e9ef; border-radius: 13px; background: #fff; }
.pickup-reservation-card.picked_up { border-color: #cfe7da; background: #f8fcfa; }
.pickup-reservation-card.cancelled { opacity: .68; background: #f7f8fa; }
.pickup-reservation-card.approval_pending { border-color: #91ace0; background: #f3f7ff; }
.pickup-approve-button { min-height: 40px; padding: 8px 17px; border: 0; border-radius: 9px; color: #fff; background: #176944; font-size: .9rem; font-weight: 850; }
.pickup-approve-button:disabled { opacity: .5; cursor: wait; }
.pickup-reservation-main { display: grid; grid-template-columns: 132px minmax(0, 1fr) 118px; align-items: center; gap: 16px; min-width: 0; }
.pickup-phone { display: grid; }
.pickup-phone span { color: var(--muted); font-size: .72rem; font-weight: 750; }
.pickup-phone strong { color: var(--navy); font-size: 1.32rem; letter-spacing: .06em; }
.pickup-reservation-items { display: grid; min-width: 0; gap: 6px; color: #344154; font-size: .9rem; line-height: 1.4; overflow-wrap: anywhere; }
.pickup-reservation-items b { color: var(--orange); }
.pickup-reservation-item-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 5px; border-bottom: 1px dashed #e1e6ec; }
.pickup-reservation-item-row > span { display: grid; min-width: 0; }
.pickup-reservation-item-row strong { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.pickup-reservation-item-row small { color: var(--muted); font-size: .74rem; font-weight: 700; }
.pickup-reservation-item-row b { flex: 0 0 auto; white-space: nowrap; }
.pickup-reservation-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2px; padding: 8px 10px; border-radius: 9px; background: var(--orange-soft); }
.pickup-reservation-total span { color: #704426; font-size: .78rem; font-weight: 850; }
.pickup-reservation-total strong { color: var(--orange); font-size: 1.05rem; font-weight: 950; white-space: nowrap; }
.pickup-reservation-meta { display: grid; justify-items: start; gap: 4px; }
.pickup-status { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: #82521c; background: #fff1d7; font-size: .76rem; font-weight: 900; }
.pickup-status.picked_up { color: #176944; background: var(--green-soft); }
.pickup-status.cancelled { color: #8a4a4a; background: #f8e8e8; }
.pickup-status.approval_pending { color: #194d96; background: #e1ebff; }
.pickup-reservation-meta small { color: var(--muted); font-size: .74rem; }
.pickup-reservation-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.pickup-reservation-actions button { min-height: 42px; padding: 0 12px; border-radius: 9px; font-size: .82rem; font-weight: 850; white-space: nowrap; }
.pickup-complete-button { border: 0; color: #fff; background: var(--green); }
.pickup-cancel-button { border: 1px solid #e2caca; color: #9a4040; background: #fff; }
.pickup-reservation-actions button:disabled { cursor: wait; opacity: .5; }

.driver-board-panel { margin-bottom: 18px; padding: 21px 23px; }
.driver-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; }
.driver-status-card { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfd; }
.driver-status-card.inactive { opacity: .62; }
.driver-status-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.driver-status-top > div { display: grid; min-width: 0; }
.driver-status-top strong { font-size: 1rem; }
.driver-account-phone { color: var(--muted); font-size: .8rem; }
.driver-live-badge { padding: 5px 8px; border-radius: 999px; color: #177048; background: var(--green-soft); font-size: .76rem; font-weight: 850; white-space: nowrap; }
.driver-live-badge.stale { color: #746b5c; background: #f1eee8; }
.driver-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 13px 0 9px; }
.driver-counts button { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 8px 4px; border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: #f0f3f7; font-size: .875rem; white-space: nowrap; cursor: pointer; }
.driver-counts button:hover, .driver-counts button:focus-visible { border-color: var(--orange); background: #fff4eb; outline-offset: 2px; }
.driver-counts b { color: var(--ink); font-variant-numeric: tabular-nums; }
.driver-app-picker-list { display: grid; gap: 10px; max-height: 60vh; overflow: auto; }
.driver-app-choice { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; background: #fbfcfd; }
.driver-app-choice:hover, .driver-app-choice:focus-visible { border-color: var(--orange); background: #fff4eb; }
.driver-app-choice strong { display: block; font-size: 1rem; }
.driver-app-choice small { display: block; margin-top: 4px; color: var(--muted); font-size: .875rem; }
.driver-progress { height: 7px; overflow: hidden; border-radius: 999px; background: #e3e8ef; }
.driver-progress span { display: block; height: 100%; border-radius: inherit; background: var(--orange); }
.driver-progress-label { display: flex; justify-content: space-between; margin: 6px 1px 11px; color: var(--muted); font-size: .78rem; }
.driver-destination { min-height: 44px; margin: 0 0 10px; font-size: .86rem; line-height: 1.5; }
.driver-destination strong { overflow-wrap: anywhere; }
.driver-location { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: .79rem; }
.driver-location a, .driver-filter-link { color: var(--navy-2); font-weight: 800; }
.driver-filter-link { padding: 0; border: 0; background: transparent; text-decoration: underline; }

.map-panel { margin-bottom: 18px; }
.map-controls, .list-controls { display: flex; align-items: center; gap: 9px; }
.map-controls select { min-width: 230px; }
.map-filter-control { display: grid; gap: 5px; color: #4f5b6e; font-size: .875rem; font-weight: 800; }
.map-admin-controls { display: grid; gap: 12px; flex: 1 1 620px; min-width: 0; max-width: 760px; margin-left: auto; }
.map-panel .map-head { align-items: flex-start; }
.map-panel .map-display-controls { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(190px, 1fr) auto; justify-self: end; align-items: end; width: 100%; }
.map-panel .map-assignment-controls { display: grid; grid-template-columns: minmax(170px, 1fr) auto auto auto; align-items: end; gap: 9px; }
.map-panel .map-assignment-controls button, .map-panel .map-display-controls button { min-height: 46px; white-space: nowrap; }
.map-panel .map-controls select { min-width: 0; }
.map-selection-count { display: flex; align-items: center; min-height: 46px; color: var(--navy); font-size: .95rem; font-weight: 850; white-space: nowrap; }
#mapMultiSelect[aria-pressed="true"] { border-color: #c55b12; color: #883c09; background: #fff0df; box-shadow: inset 0 0 0 1px #c55b12; }
.map-assignment-feedback { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 16px; padding: 10px 12px; border: 1px solid #dde5ed; border-radius: 10px; background: #f6f8fb; }
.map-assignment-feedback p { margin: 0; color: #465a72; font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; }
.map-assignment-feedback button { flex-shrink: 0; min-height: 44px; }
.map-assignment-feedback.has-selection { border-color: #e3a16e; background: #fff7ef; }
.map-list-item.map-assignment-selected { background: #fff1df; box-shadow: inset 0 0 0 2px #c45c12; }
.map-list-item .map-order-select { grid-column: 1; grid-row: 1; min-width: 44px; min-height: 44px; padding: 5px; border: 1px solid transparent; border-radius: 10px; background: transparent; }
.map-order-select[aria-pressed="true"] { border-color: #c45c12; background: #fff; }
.map-order-select[aria-pressed="true"]::after { content: '✓'; position: absolute; top: -5px; right: -4px; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; color: #fff; background: #a84a09; font-size: 11px; }
.map-list-item .map-order-select { position: relative; }
.map-list-item.map-selected:not(.map-assignment-selected) { background: #eef4fa; outline-color: #6a8da5; }
.map-order-select:disabled { cursor: default; opacity: .6; }
.map-order-select:focus-visible, .tmap-marker-button:focus-visible { outline: 3px solid #e07121; outline-offset: 3px; }
.map-list-item:has(.map-order-select) { grid-template-columns: 44px minmax(0, 1fr) auto; }
.map-list-item .map-order-select .map-route-number { margin: auto; }
.tmap-marker-button.map-pin-selected .map-pin { outline: 3px solid #c45c12; outline-offset: 2px; box-shadow: 0 0 0 5px white, 0 4px 13px #10243e47; opacity: 1; }
.tmap-marker-button.map-pin-partial .map-pin { outline-style: dashed; }
.tmap-marker-button.map-pin-selected::after { content: '✓'; position: absolute; right: -9px; top: -10px; display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; color: white; background: #a84a09; border: 2px solid white; font-size: 12px; font-weight: 900; pointer-events: none; }
.map-cluster-order { text-align: left; line-height: 1.55; }
.map-cluster-order[aria-pressed="true"] { border-color: #c45c12; background: #fff1df; }
.map-cluster-order .cluster-selection-label { display: block; color: #91430d; font-weight: 850; }
@media (max-width: 720px) {
  .map-admin-controls { flex-basis: auto; width: 100%; }
  .map-panel .map-display-controls { width: 100%; grid-template-columns: minmax(0, 1fr) auto; }
  .map-panel .map-display-controls .map-filter-control { grid-column: 1 / -1; }
  .map-panel .map-display-controls #fitMapMarkers { grid-column: 2; }
  .map-panel .map-assignment-controls { grid-template-columns: minmax(0, 1fr) auto; }
  .map-panel .map-assignment-controls .map-filter-control { grid-column: 1; }
  .map-selection-count { justify-content: center; }
  .map-panel .map-assignment-controls #assignMapOrders { grid-column: 1; }
  .map-assignment-feedback { align-items: flex-start; }
  .map-assignment-feedback p { font-size: .875rem; }
}
.map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: -4px 0 12px; color: var(--muted); font-size: .8rem; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-driver-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.map-driver-legend-item { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 3px 9px; border: 1px solid #dce3eb; border-radius: 999px; color: var(--ink); background: #fff; font-size: .875rem; font-weight: 750; }
.legend-dot { width: 11px; height: 11px; flex: 0 0 11px; border-radius: 50%; background: var(--map-pin-color, var(--orange)); }
#mapCoordinateNotice { margin-left: auto; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, .75fr); gap: 14px; }
.delivery-map { position: relative; width: 100% !important; height: 470px !important; min-height: 0; max-height: 470px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #e7edf3; }
.map-list { max-height: 470px; overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: #fafbfd; }
.map-route-status { margin: -3px 0 12px; padding: 9px 12px; border-radius: 10px; color: #526276; background: #f4f7fa; font-size: .79rem; }
.map-route-status.dirty { color: #8f430f; background: var(--orange-soft); font-weight: 800; }
.map-list-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 9px; width: 100%; padding: 10px 11px; border-bottom: 1px solid var(--line); color: inherit; background: transparent; text-align: left; }
.map-list-item:hover { background: #fff; }
.map-list-item.active-stop { background: #fff8f3; }
.map-list-item:last-child { border-bottom: 0; }
.map-route-number { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; color: #fff !important; background: var(--map-pin-color, var(--orange)); font-size: .78rem !important; font-weight: 900; }
.map-list-main { display: grid; min-width: 0; gap: 4px; padding: 2px; border: 0; color: inherit; background: transparent; text-align: left; }
.map-list-main strong { overflow: hidden; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.map-list-item span { color: var(--muted); font-size: .8rem; line-height: 1.45; }
.map-list-item .map-list-status { color: var(--navy-2); font-weight: 800; }
.map-list-item .map-list-location { color: #526276; font-weight: 750; }
.map-route-actions { display: grid; grid-template-columns: repeat(2, 34px); gap: 5px; }
.map-route-actions button { width: 34px; height: 34px; padding: 0; border: 1px solid #d5dde6; border-radius: 9px; color: var(--navy); background: #fff; font-size: 1rem; font-weight: 900; }
.map-route-actions button:disabled { cursor: default; opacity: .3; }
.map-empty { display: grid; place-items: center; min-height: 180px; padding: 20px; color: var(--muted); text-align: center; font-size: .86rem; }
.map-privacy { margin: 12px 2px 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.route-sequence-field { grid-column: 1 / -1; }
.ack-warning { color: #b42318 !important; font-weight: 800; }
.map-pin { display: grid; place-items: center; width: 30px; height: 30px; border: 3px solid #fff; border-radius: 50% 50% 50% 8px; color: #fff; background: var(--map-pin-color, var(--orange)); box-shadow: 0 4px 13px rgba(16,36,62,.28); font-size: .72rem; font-weight: 900; transform: rotate(-45deg); }
.map-pin span { transform: rotate(45deg); }
.map-pin.driver { background: var(--map-pin-color, var(--navy)); }
.map-pin.stale { opacity: .68; }
.tmap-marker-button { position: relative; display: block; padding: 0; border: 0; background: transparent; cursor: pointer; }

.order-form-panel { margin-bottom: 18px; }
.admin-form { display: grid; gap: 13px; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: 1.15fr .85fr .7fr; }
.field-hint { display: block; margin-top: 6px; color: var(--muted); font-size: .78rem; }
.admin-form label > .address-search-row { display: flex; gap: 9px; margin: 0; color: inherit; }
.address-search-row input { flex: 1; }
.address-search-button { flex: 0 0 auto; min-width: 112px; }
.coordinate-fields { padding: 0 13px 13px; border: 1px solid var(--line); border-radius: 11px; background: #fafbfd; }
.coordinate-fields summary { padding: 12px 0; color: var(--navy-2); cursor: pointer; font-size: .86rem; font-weight: 800; }
.coordinate-fields summary small { color: var(--muted); font-weight: 600; }
.coordinate-actions { display: flex; align-items: center; gap: 12px; margin-top: 11px; }
.coordinate-actions small { color: var(--muted); font-size: .78rem; line-height: 1.45; }
.item-editor { margin: 1px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 13px; }
.item-editor legend { padding: 0 7px; font-size: .9rem; font-weight: 850; }
.item-editor-help { margin: 0 0 11px; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.order-item-picker { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); max-height: 440px; align-content: start; margin-bottom: 14px; padding: 3px; }
.order-catalog-search-bar { display: flex; align-items: end; gap: 8px; }
.order-catalog-search-bar .order-catalog-search { flex: 1; min-width: 0; margin: 0; }
.order-catalog-search input { min-width: 0; width: 100%; min-height: 44px; }
.order-catalog-search-bar > button { flex: 0 0 auto; min-height: 44px; }
.order-catalog-search-help { margin: 7px 0 4px; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.order-catalog-search-status { min-height: 20px; margin: 0 0 7px; color: var(--navy-2); font-size: .8rem; }
#aiSettingsError { white-space: pre-wrap; overflow-wrap: anywhere; }
.order-item-picker [data-order-catalog-item][hidden] { display: none !important; }
.manual-item-editor { padding-top: 12px; border-top: 1px solid var(--line); }
.manual-item-editor > strong { display: block; margin-bottom: 8px; color: var(--navy); font-size: .84rem; }
.item-head, .item-row { display: grid; grid-template-columns: minmax(180px, 1fr) 90px 140px 42px; gap: 8px; }
.item-head { margin-bottom: 6px; padding: 0 3px; color: var(--muted); font-size: .78rem; font-weight: 750; }
.item-row { margin-bottom: 8px; }
.item-row input { height: 42px; }
.remove-item { border: 0; border-radius: 9px; color: #a44; background: #fff0f0; font-size: 1.18rem; }
.add-item-button { min-height: 38px; padding: 0 12px; border: 1px dashed #b7c2ce; border-radius: 9px; color: var(--navy-2); background: #f7f9fb; font-size: .84rem; font-weight: 800; }
.form-total { display: flex; justify-content: flex-end; gap: 12px; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); }
.form-total span { color: var(--muted); font-size: .86rem; }
.form-total strong { color: var(--orange); }
.form-submit { justify-self: end; min-width: 240px; }

.orders-panel { display: flex; flex-direction: column; margin-bottom: 18px; padding-right: 0; padding-left: 0; overflow: hidden; }
.orders-panel > .panel-head { padding: 0 23px; }
.orders-panel > .panel-head { order: 1; }
.orders-panel > .batch-toolbar { order: 2; }
.orders-panel > .order-table-wrap { order: 3; }
.orders-panel > .delivery-item-summary { order: 4; }
.orders-panel > .phone-audit-panel { order: 5; }
.list-head { align-items: flex-start; }
.list-controls { display: flex; align-items: end; flex-wrap: wrap; justify-content: flex-end; max-width: 1040px; }
.list-controls label { display: grid; gap: 5px; }
.list-control-label { color: #637084; font-size: .72rem; font-weight: 800; }
.list-controls select { min-width: 170px; }
.list-controls input[type="date"] { min-width: 155px; }
.order-period-actions, .map-period-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.order-period-actions button { min-height: 46px; }
.map-period-status { padding: 12px; background: #fff4e9; border-radius: 10px; line-height: 1.65; }
.map-panel.period-mode .map-display-controls,
.map-panel.period-mode .map-assignment-controls,
.map-panel.period-mode .map-assignment-feedback,
.map-panel.period-mode .map-tools,
.map-panel.period-mode .map-scope-note,
.map-panel.period-mode .map-legend-hint { display: none; }
.map-density-pin { display: grid; place-items: center; width: var(--density-size, 42px); height: var(--density-size, 42px); border: 3px solid white; border-radius: 50%; color: white; background: var(--density-color, #c2410c); font-weight: 900; font-size: 15px; box-shadow: 0 2px 7px #10243b66; }
.map-density-area { width: 100%; padding: 15px; border: 0; border-bottom: 1px solid #dce4ee; background: transparent; color: var(--ink); text-align: left; cursor: pointer; line-height: 1.65; }
.map-density-area strong, .map-density-area span { display: block; }
.map-density-area span { color: #5e718b; font-size: .85rem; }
@media (max-width: 760px) {
  .order-period-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .list-controls .order-date-control input { width: 100%; min-width: 0; }
  .map-period-controls { width: 100%; }
  .map-period-controls button { flex: 1; }
}
.admin-search input { min-width: 250px; }
.delivery-item-summary { margin: 16px 23px; padding: 15px; border: 1px solid #dce5ee; border-radius: 14px; background: #f7fafc; }
.delivery-item-summary-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 11px; }
.delivery-item-summary-head h3 { margin: 0; color: var(--navy); font-size: 1rem; }
.delivery-item-summary-head small { display: block; margin-top: 4px; color: var(--muted); font-size: .75rem; }
.delivery-item-summary-actions { display: grid; justify-items: end; gap: 6px; }
.delivery-item-summary-scope-row { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.delivery-item-summary-actions span { color: var(--muted); font-size: .78rem; font-weight: 750; }
.delivery-item-aggregate-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.delivery-item-aggregate-card { display: block; width: 100%; min-width: 0; padding: 11px; border: 1px solid #e1e7ee; border-radius: 11px; background: #fff; color: inherit; font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; }
.delivery-item-aggregate-card:hover { border-color: var(--orange); background: #fffaf5; }
.delivery-item-aggregate-card:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.delivery-item-aggregate-card[aria-pressed="true"] { border-color: var(--orange); background: #fff4e9; box-shadow: inset 0 0 0 1px var(--orange); }
.delivery-item-aggregate-card > strong { display: block; overflow: hidden; margin-bottom: 8px; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.delivery-item-aggregate-counts { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid #e5e9ee; border-radius: 9px; }
.delivery-item-aggregate-counts > span { min-width: 0; padding: 6px 3px; border-right: 1px solid #e5e9ee; text-align: center; }
.delivery-item-aggregate-counts > span:last-child { border-right: 0; }
.delivery-item-aggregate-counts small { display: block; color: var(--muted); font-size: .66rem; font-weight: 750; }
.delivery-item-aggregate-counts b { display: block; margin-top: 1px; color: var(--navy); font-size: .95rem; font-weight: 900; }
.delivery-item-aggregate-counts .remaining b { color: var(--orange); }
.delivery-item-summary-empty { grid-column: 1 / -1; margin: 0; padding: 13px 8px; color: var(--muted); font-size: .82rem; text-align: center; }
.phone-audit-panel { margin: 0 23px 18px; overflow: hidden; border: 1px solid #dce5ee; border-radius: 14px; background: #fff; }
.order-query-panel .phone-audit-panel { margin: 12px 0 4px; }
.order-query-panel .phone-audit-panel > summary strong { font-size: 1rem; }
.order-query-panel .phone-audit-panel > summary small { font-size: .875rem; line-height: 1.5; }
.phone-audit-panel > summary { display: flex; min-height: 58px; padding: 12px 15px; align-items: center; justify-content: space-between; gap: 14px; color: var(--navy); background: #f7fafc; cursor: pointer; list-style: none; touch-action: manipulation; }
.phone-audit-panel > summary::-webkit-details-marker { display: none; }
.phone-audit-panel > summary::after { content: "+"; display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 50%; color: var(--navy-2); background: #e8eef5; font-size: 1.15rem; font-weight: 900; }
.phone-audit-panel[open] > summary::after { content: "−"; }
.phone-audit-panel > summary > span:first-child { display: grid; gap: 3px; }
.phone-audit-panel > summary small { color: var(--muted); font-size: .76rem; font-weight: 650; }
.phone-audit-summary-state { margin-left: auto; color: var(--muted); font-size: .76rem; font-weight: 750; text-align: right; }
.phone-audit-content { display: grid; grid-template-columns: minmax(260px, .75fr) minmax(0, 1.6fr); gap: 16px; padding: 16px; border-top: 1px solid var(--line); }
.phone-audit-input-block, .phone-audit-results { min-width: 0; }
.phone-audit-input-block label, .phone-audit-result-head { display: grid; gap: 3px; margin-bottom: 7px; }
.phone-audit-input-block label strong, .phone-audit-result-head strong { font-size: .88rem; }
.phone-audit-input-block label small, .phone-audit-result-head small { color: var(--muted); font-size: .73rem; }
.phone-audit-input-block textarea, .phone-audit-result-grid textarea { width: 100%; min-height: 154px; padding: 11px 12px; resize: vertical; border: 1px solid #d7dee7; border-radius: 10px; color: var(--ink); background: #fbfcfd; font: 500 .88rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; box-sizing: border-box; }
.phone-audit-input-block textarea:focus { border-color: var(--navy-2); outline: 0; box-shadow: 0 0 0 3px rgba(28,56,91,.08); }
.phone-audit-result-grid textarea[readonly] { background: #f7fafc; }
.phone-audit-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.phone-audit-error { min-height: 20px; margin: 7px 0 0; color: #a23c3c; font-size: .78rem; font-weight: 750; }
.phone-audit-results { display: grid; align-content: start; gap: 12px; }
.phone-audit-stats { display: grid; grid-template-columns: repeat(4, minmax(90px, 1fr)); gap: 7px; }
.phone-audit-stat { display: grid; gap: 2px; padding: 10px; border: 1px solid #e1e7ee; border-radius: 10px; background: #f8fafc; }
.phone-audit-stat span { color: var(--muted); font-size: .69rem; font-weight: 750; }
.phone-audit-stat strong { color: var(--navy); font-size: 1.05rem; }
.phone-audit-stat.warning strong { color: var(--orange); }
.phone-audit-result-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 12px; }
.phone-audit-result-grid section { min-width: 0; }
.database-duplicate-list { max-height: 190px; overflow: auto; border: 1px solid #dfe5ec; border-radius: 10px; background: #fbfcfd; }
.database-duplicate-row { display: grid; grid-template-columns: minmax(120px, 1fr) auto auto; align-items: center; gap: 8px; padding: 9px 10px; border-bottom: 1px solid #e8edf2; font-size: .79rem; }
.database-duplicate-row:last-child { border-bottom: 0; }
.database-duplicate-row strong { color: var(--navy); }
.database-duplicate-row b { color: var(--orange); }
.database-duplicate-row small { color: var(--muted); }
.database-duplicate-empty { margin: 0; padding: 24px 12px; color: var(--muted); font-size: .8rem; text-align: center; }
.phone-match-row { display: grid; gap: 4px; padding: 12px; border-bottom: 1px solid var(--line); font-size: .875rem; overflow-wrap: anywhere; }
.phone-match-row strong { color: var(--navy); }
.phone-match-row small { color: var(--muted); font-size: .875rem; }
#registeredPhoneMatches > summary { cursor: pointer; padding: 8px 0; font-size: .875rem; font-weight: 750; }
.phone-audit-notice { margin: 0; padding: 9px 11px; border-radius: 9px; color: #6f552f; background: #fff8e8; font-size: .78rem; line-height: 1.5; }
.phone-audit-notice.invalid { color: #963b3b; background: #fff2f2; }
.duplicate-phone-badge { display: inline-flex !important; width: fit-content; margin-top: 4px; padding: 2px 6px; border-radius: 999px; color: #9b460e !important; background: var(--orange-soft); font-size: .7rem !important; font-weight: 850; }
.batch-toolbar { display: grid; grid-template-columns: auto minmax(190px, 260px) auto auto auto auto 1fr; gap: 9px; align-items: center; padding: 12px 23px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f7f9fb; }
.batch-toolbar strong { min-width: 62px; font-size: .9rem; }
.batch-toolbar small { color: var(--muted); font-size: .78rem; text-align: right; }
.order-table-wrap { overflow-x: auto; }
.order-table { width: 100%; min-width: 1120px; border-collapse: collapse; table-layout: fixed; font-size: .875rem; }
.order-table th { padding: 12px 11px; border-bottom: 1px solid var(--line); color: #5d6879; background: #fbfcfd; text-align: left; font-size: .78rem; letter-spacing: .01em; }
.order-table td { padding: 14px 11px; border-bottom: 1px solid #edf0f4; vertical-align: top; }
.order-table tbody tr:hover { background: #fafbfd; }
.order-table tbody tr.deleted-order-row { color: #6d7480; background: #fafafa; }
.order-table th:nth-child(1) { width: 50px; text-align: center; }
.order-table th:nth-child(2) { width: 190px; }
.order-table th:nth-child(3) { width: 145px; }
.order-table th:nth-child(4) { width: auto; }
.order-table th:nth-child(5) { width: 210px; }
.order-table th:nth-child(6) { width: 250px; }
.select-column input, .order-checkbox { width: 20px; height: 20px; accent-color: var(--orange); }
.order-table td:first-child { text-align: center; }
.order-primary strong, .order-address strong { display: block; margin-bottom: 4px; font-size: .9rem; }
.order-primary span, .order-address span, .order-value span { display: block; color: var(--muted); font-size: .8rem; line-height: 1.45; overflow-wrap: anywhere; }
.order-primary .delivery-schedule { margin-top: 6px; color: var(--navy-2); font-weight: 800; }
.order-primary .deleted-detail { color: #a24545; }
.driver-identity { display: grid; gap: 5px; justify-items: start; }
.driver-tag { display: inline-flex; padding: 5px 8px; border-radius: 7px; color: var(--navy-2); background: #e8eef5; font-weight: 850; }
.driver-tag.unassigned { color: #9a4d1f; background: #fff0e5; }
.driver-identity small { color: var(--muted); font-size: .78rem; }
.order-value strong { display: block; margin-bottom: 3px; color: var(--orange); font-size: .9rem; }
.order-value-head { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 6px; }
.order-value-head strong { margin-bottom: 0; }
.order-value-head .order-payment-state { display: inline-flex; padding: 2px 5px; border-radius: 5px; color: #596679; background: #eef1f4; font-size: .82rem; font-weight: 800; white-space: nowrap; }
.order-value-head .order-payment-state.payment-needed { color: #9b460e; background: var(--orange-soft); }
.order-value-head .order-payment-state.payment-done { color: #177048; background: var(--green-soft); }
.order-item-list { display: grid; gap: 2px; margin-top: 6px; }
.order-value .order-item-line { color: var(--navy-2); font-size: .875rem; font-weight: 700; line-height: 1.4; }
.order-item-toggle { justify-self: start; min-height: 36px; padding: 2px 0; border: 0; color: var(--navy-2); background: transparent; font: inherit; font-size: .875rem; font-weight: 800; text-align: left; text-decoration: underline; cursor: pointer; }
.order-item-toggle:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.order-status { display: inline-flex; margin-top: 6px; padding: 5px 8px; border-radius: 7px; color: #687385; background: #eef1f4; font-size: .76rem; font-style: normal; font-weight: 850; }
.order-status.moving { color: #9b460e; background: var(--orange-soft); }
.order-status.completed { color: #177048; background: var(--green-soft); }
.order-status.deleted { color: #934545; background: #faeaea; }
.order-status.exception { color: #983f23; background: #fff0e5; }
.order-status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.order-status-line .order-status { margin-top: 0; flex-shrink: 0; }
.customer-history-open { min-height: 44px; padding: 5px 9px; border: 1px solid #cbd4df; border-radius: 8px; color: var(--navy); background: #fff; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.customer-history-open:disabled { opacity: .5; cursor: not-allowed; }
.customer-history-open:focus-visible,.customer-history-order:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.completion-detail { display: grid; gap: 2px; margin-top: 7px; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.proof-link { display: inline-flex; margin-top: 7px; color: var(--navy-2); font-size: .78rem; font-weight: 800; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 8px; }
.row-actions button { min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--navy-2); background: #fff; font-size: .8rem; font-weight: 800; }
.row-actions .completion-message-order { border-color: #a9d8bf; color: #176a45; background: #eef9f3; }
.row-actions .delete-order { color: #a24545; }
.danger-outline-button { min-height: 40px; padding: 0 10px; border: 1px solid #c97878; border-radius: 9px; color: #a24545; background: #fff; font-size: .84rem; font-weight: 850; cursor: pointer; }
.danger-outline-button:hover:not(:disabled) { background: #fff2f2; }
.danger-outline-button:disabled { cursor: not-allowed; opacity: .5; }
.row-actions button:disabled { cursor: not-allowed; opacity: .46; }
.admin-empty { padding: 46px 20px; color: var(--muted); text-align: center; }
.admin-empty strong { display: block; margin-bottom: 5px; color: var(--ink); }
.admin-empty span { font-size: .88rem; }

.handoff-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px 22px; }
.handoff-panel h2 { margin: 0; font-size: 1.08rem; }
.handoff-panel p { margin: 5px 0 0; color: var(--muted); font-size: .86rem; }

.import-dialog { width: min(1180px, calc(100vw - 30px)); max-height: 90dvh; padding: 0; border: 0; border-radius: 19px; background: #fff; box-shadow: 0 24px 80px rgba(7,18,31,.34); }
.import-dialog::backdrop, .postcode-dialog::backdrop, .operation-dialog::backdrop { background: rgba(7,18,31,.55); backdrop-filter: blur(2px); }
.import-dialog-card { display: grid; gap: 14px; padding: 22px; }
.dialog-head { display: flex; justify-content: space-between; gap: 18px; }
.dialog-head h2 { margin: 0; font-size: 1.35rem; }
.icon-button { width: 42px; height: 42px; border: 0; border-radius: 50%; color: var(--muted); background: #f0f3f6; font-size: 1.55rem; }
.import-summary { display: flex; justify-content: space-between; gap: 18px; padding: 12px 14px; border-radius: 10px; background: #f3f6f9; }
.import-summary span { color: var(--muted); }
.import-error { margin: 0; padding: 11px 13px; border: 1px solid #efcaca; border-radius: 10px; color: #9f3030; background: #fff3f3; font-size: .86rem; font-weight: 750; line-height: 1.5; }
.import-preview-wrap { max-height: 52dvh; overflow: auto; border: 1px solid var(--line); border-radius: 11px; }
.import-preview-table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: .82rem; }
.import-preview-table th { position: sticky; z-index: 1; top: 0; padding: 10px; color: #596477; background: #f5f7fa; text-align: left; }
.import-preview-table td { padding: 10px; border-top: 1px solid var(--line); vertical-align: top; }
.import-preview-table tr.invalid { background: #fff4f4; }
.import-state { font-weight: 850; }
.import-state.ok { color: var(--green); }
.import-state.error { color: #b23b3b; }
.import-limit-note { margin: 0; color: var(--muted); font-size: .8rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
.postcode-dialog { width: min(560px, calc(100vw - 20px)); max-height: 94dvh; padding: 0; overflow: hidden; border: 0; border-radius: 19px; background: #fff; box-shadow: 0 24px 80px rgba(7,18,31,.34); }
.postcode-dialog-card { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 12px; height: min(760px, 94dvh); padding: 18px; box-sizing: border-box; }
.postcode-dialog .dialog-head h2 { margin: 0; font-size: 1.25rem; }
.postcode-dialog .dialog-head p { margin: 0 0 3px; }
.postcode-status { min-height: 44px; margin: 0; padding: 10px 12px; border: 1px solid #d9e1ea; border-radius: 10px; color: #526074; background: #f5f7fa; font-size: .82rem; font-weight: 750; line-height: 1.45; }
.postcode-status[data-state="success"] { border-color: #b9decf; color: #176944; background: #effaf5; }
.postcode-status[data-state="empty"], .postcode-status[data-state="error"], .postcode-status[data-state="delayed"] { border-color: #efcaca; color: #9f3030; background: #fff3f3; }
.postcode-container { position: relative; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #eef2f6; }
.postcode-container.is-unavailable::after { content: "주소 검색 화면을 표시하지 못했습니다. 아래 버튼으로 다시 불러오거나 카카오 새 창 검색을 이용해 주세요."; position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; padding: 28px; color: #7b4650; background: #fff7f7; font-size: .88rem; font-weight: 800; line-height: 1.65; text-align: center; }
.postcode-dialog-actions { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 9px; }
.postcode-dialog-actions button { width: 100%; min-width: 0; }
.postcode-dialog-actions #openPostcodePopup:not([hidden]) + #confirmAddressWithTmap { grid-column: 1 / -1; }

.operation-dialog { width: min(540px, calc(100vw - 24px)); max-height: 90dvh; padding: 0; border: 0; border-radius: 19px; background: #fff; box-shadow: 0 24px 80px rgba(7,18,31,.34); }
.operation-dialog.history-dialog { width: min(720px, calc(100vw - 24px)); }
.operation-dialog.geocode-review-dialog { width: min(760px, calc(100vw - 24px)); overflow-y: auto; }
.geocode-review-list { display: grid; gap: 12px; }
.geocode-review-card { padding: 14px; border: 1px solid #e0e7ef; border-radius: 12px; background: #fbfcfe; min-width: 0; }
.geocode-review-header { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 8px; }
.geocode-review-customer { font-weight: 800; color: #17334f; overflow-wrap: anywhere; }
.geocode-review-customer h3 { margin: 0; font-size: 1rem; }
.geocode-review-customer p { margin: 5px 0 0; font-size: .85rem; font-weight: 600; }
.geocode-review-address { margin: 9px 0; color: #172f46; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.geocode-review-address strong, .geocode-review-address span { display: block; }
.geocode-review-reason { margin: 8px 0 0; color: #a34b16; font-size: .86rem; font-weight: 750; }
.geocode-review-hint { margin: 6px 0; font-size: .82rem; line-height: 1.6; color: #617184; }
.geocode-review-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
#geocodeReviewStatus { margin: 0; color: #a34b16; font-size: .85rem; line-height: 1.6; }
#geocodeReviewStatus:empty { display: none; }
@media (max-width: 600px) { .geocode-review-dialog .operation-dialog-card { padding: 16px; } .geocode-review-actions button { width: 100%; } }
.operation-dialog.customer-history-dialog { width: min(760px, calc(100vw - 24px)); overflow-y: auto; }
.customer-history-list { display: grid; gap: 10px; }
.customer-history-totals { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.customer-history-totals > div { display: grid; gap: 6px; min-width: 0; padding: 12px 14px; border-radius: 10px; background: #f0f5fa; }
.customer-history-totals span { color: var(--muted); font-size: .78rem; }
.customer-history-totals strong { color: var(--ink); font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; }
.customer-history-order:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.customer-history-order { display: grid; width: 100%; gap: 7px; padding: 16px; border: 1px solid #dce5ee; border-radius: 12px; color: var(--ink); background: #f8fafc; text-align: left; overflow-wrap: anywhere; font: inherit; }
.customer-history-order:hover { border-color: #e4a06c; background: #fff8f2; }
.customer-history-order > span:first-child { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.customer-history-order small { color: var(--muted); font-size: .85rem; line-height: 1.5; }
.customer-history-pages { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; margin-top: 16px; }
.customer-order-detail { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.customer-order-detail > div { min-width: 0; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.customer-order-detail dt { margin-bottom: 6px; color: var(--muted); font-size: .85rem; }
.customer-order-detail dd { margin: 0; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.customer-history-items { list-style: none; margin: 0; padding: 0; }
.customer-history-items li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.customer-history-items li strong { flex: 1 1 150px; overflow-wrap: anywhere; }
.customer-order-total { display: flex; justify-content: space-between; font-size: 1.2rem; }
@media (max-width: 540px) {
  .customer-history-dialog .operation-dialog-card { padding: 16px; }
  .customer-order-detail { grid-template-columns: 1fr; }
}
.operation-dialog-card { display: grid; gap: 15px; padding: 22px; }
.operation-dialog-card > label > span { display: block; margin-bottom: 6px; color: #4f5b6e; font-size: .86rem; font-weight: 800; }
.operation-dialog-card select, .operation-dialog-card textarea { width: 100%; padding: 11px 12px; border: 1px solid #d7dee7; border-radius: 10px; color: var(--ink); background: #fbfcfd; font: inherit; }
.operation-dialog-card textarea { min-height: 86px; resize: vertical; }
.admin-completion-dialog .operation-dialog-card { max-height: 90dvh; overflow-y: auto; box-sizing: border-box; }
.admin-completion-dialog input { width: 100%; min-height: 44px; padding: 11px 12px; border: 1px solid #d7dee7; border-radius: 10px; color: var(--ink); background: #fbfcfd; font: inherit; box-sizing: border-box; }
.admin-completion-dialog .operation-summary { white-space: pre-line; overflow-wrap: anywhere; }
.admin-completion-dialog .import-error:empty { display: none; }
.delivery-item-copy-dialog .operation-dialog-card { max-height: 90dvh; overflow-y: auto; box-sizing: border-box; }
.delivery-item-copy-dialog textarea { min-height: min(240px, 42dvh); max-height: 48dvh; resize: vertical; font: 650 1rem/1.75 ui-monospace, SFMono-Regular, Consolas, monospace; }
.operation-summary, .dialog-notice { margin: 0; padding: 12px 13px; border-radius: 10px; background: #f3f6f9; font-size: .86rem; line-height: 1.55; }
.geocode-candidate-summary { white-space: pre-line; }
.geocode-candidate-list { display: grid; gap: 9px; max-height: 48dvh; overflow: auto; }
.geocode-candidate { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 62px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: #fafbfd; text-align: left; }
.geocode-candidate:hover, .geocode-candidate:focus-visible { border-color: var(--orange); outline: 0; background: var(--orange-soft); }
.geocode-candidate span { display: grid; min-width: 0; gap: 3px; }
.geocode-candidate strong { font-size: .88rem; line-height: 1.45; }
.geocode-candidate small { color: var(--muted); font-size: .76rem; }
.geocode-candidate em { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: #87501c; background: #fff1d7; font-size: .8rem; font-style: normal; font-weight: 850; }
.geocode-candidate.exact em { color: #176944; background: var(--green-soft); }
.dialog-notice { color: #7a5a31; background: #fff8e8; }
.danger-button { min-height: 46px; padding: 0 16px; border: 0; border-radius: 10px; color: #fff; background: #a74040; font-weight: 850; }
.danger-button:disabled { cursor: wait; opacity: .55; }
.audit-list { display: grid; gap: 9px; max-height: 56dvh; overflow: auto; }
.audit-event { display: grid; gap: 4px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; background: #fafbfd; }
.audit-event > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.audit-event strong { font-size: .9rem; }
.audit-event time, .audit-event span, .audit-event p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.audit-empty { margin: 0; padding: 24px; color: var(--muted); text-align: center; }
.undo-delete { position: fixed; z-index: 1050; right: 22px; bottom: 22px; display: flex; align-items: center; gap: 16px; max-width: min(520px, calc(100vw - 28px)); padding: 13px 15px; border-radius: 12px; color: #fff; background: #10243e; box-shadow: 0 14px 40px rgba(7,18,31,.3); font-size: .88rem; font-weight: 750; }
.undo-delete button { min-height: 36px; padding: 0 11px; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; color: #fff; background: transparent; font-weight: 850; white-space: nowrap; }
.undo-delete > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.undo-delete #dismissUndoDelete { flex-shrink: 0; min-width: 40px; min-height: 40px; padding: 0; border: 0; font-size: 1.4rem; }

.toast { z-index: 1000; }
[hidden] { display: none !important; }

@media (max-width: 1100px) {
  .admin-intro { grid-template-columns: 1fr; }
  .admin-stats { width: 100%; }
  .setup-grid { grid-template-columns: 1fr; }
  .map-layout { grid-template-columns: 1fr; }
  .map-list { max-height: 280px; }
  .delivery-map { height: 420px !important; max-height: 420px; }
  .batch-toolbar { grid-template-columns: auto minmax(180px, 1fr) auto auto auto auto; }
  .batch-toolbar small { grid-column: 1 / -1; text-align: left; }
  .reservation-work-grid { grid-template-columns: 1fr; }
  .ai-settings-grid { grid-template-columns: 1fr; }
  .delivery-area-workspace { grid-template-columns: 1fr; }
  .delivery-area-map-panel { position: static; }
  .delivery-area-map { height: 480px !important; max-height: 480px; }
}

@media (max-width: 760px) {
  .admin-topbar { position: static; align-items: flex-start; padding: 10px 14px; }
  .admin-view-nav { position: sticky; z-index: 34; top: 0; }
  .admin-head-actions { flex-wrap: wrap; }
  .local-badge { order: 4; width: 100%; justify-content: flex-end; }
  .admin-main { width: min(100% - 20px, 1480px); padding-top: 12px; }
  .admin-view-tabs { width: min(100% - 20px, 1480px); overflow-x: auto; scrollbar-width: thin; }
  .admin-view-tabs button { flex: 0 0 auto; padding: 0 14px; }
  .admin-intro, .panel, .driver-board-panel { padding: 16px; border-radius: 15px; }
  .admin-intro { gap: 14px; margin-bottom: 13px; }
  .admin-intro > div:first-child > p:last-child { display: none; }
  .admin-intro h1 { margin-bottom: 0; }
  .delivery-quick-nav { margin: 0 0 12px; padding: 6px; border-radius: 12px; }
  .delivery-quick-nav a { min-height: 40px; padding: 0 13px; font-size: .82rem; }
  .settings-fold { padding: 0; }
  .settings-fold > summary { min-height: 72px; padding: 13px 16px; }
  .settings-fold-content { padding: 16px; }
  .admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; }
  .admin-stats > div, .admin-stats > button { min-width: 0; padding: 9px 6px; border-right: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.12); }
  .admin-stats > :nth-child(3n) { border-right: 0; }
  .admin-stats > :nth-last-child(-n+3) { border-bottom: 0; }
  .admin-stats strong { font-size: 1.25rem; }
  .panel-head, .driver-board-head { align-items: flex-start; flex-direction: column; gap: 7px; }
  .driver-account-form { grid-template-columns: 1fr; }
  .calculator-item-form { grid-template-columns: 1fr 1fr; }
  .calculator-item-form label:first-of-type { grid-column: 1 / -1; }
  .driver-account-actions { justify-content: stretch; }
  .driver-account-actions > button { flex: 1; }
  .form-grid.three, .form-grid.two { grid-template-columns: 1fr; }
  .admin-form label > .address-search-row { align-items: stretch; flex-direction: column; }
  .address-search-button { width: 100%; }
  .coordinate-actions { align-items: stretch; flex-direction: column; }
  .item-head, .item-row { grid-template-columns: minmax(0, 1fr) 60px 92px 38px; gap: 6px; }
  .item-head { font-size: .72rem; }
  .form-submit { width: 100%; min-width: 0; }
  .map-head .map-controls, .list-head .list-controls { width: 100%; }
  .map-controls, .list-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 8px; }
  .map-filter-control, .admin-search { grid-column: 1 / -1; }
  .map-controls label, .map-controls select, .map-controls button, .list-controls label, .list-controls select, .list-controls button, .admin-search input { width: 100%; min-width: 0; }
  .list-controls label { gap: 4px; }
  .list-control-label { font-size: .69rem; }
  .delivery-map { height: 360px !important; max-height: 360px; }
  #mapCoordinateNotice { width: 100%; margin-left: 0; }
  .orders-panel { padding: 15px 0 0; }
  .orders-panel > .panel-head { padding: 0 16px; }
  .delivery-item-summary { margin: 14px 12px; }
  .delivery-item-summary-head { align-items: flex-start; flex-direction: column; gap: 5px; }
  .delivery-item-summary-actions { justify-items: start; }
  .delivery-item-summary-scope-row { justify-content: flex-start; }
  .phone-audit-panel { margin: 0 12px 14px; }
  .phone-audit-content { grid-template-columns: 1fr; }
  .phone-audit-result-grid { grid-template-columns: 1fr; }
  .batch-toolbar { grid-template-columns: 1fr 1fr; padding: 11px 16px; }
  .batch-toolbar select { grid-column: 1 / -1; }
  .batch-toolbar small { grid-column: 1 / -1; }
  .batch-toolbar button { min-height: 44px; min-width: 0; }
  .order-table-wrap { overflow: visible; background: #eef2f6; }
  .order-table { display: block; min-width: 0; background: transparent; }
  .order-table thead { display: none; }
  .order-table tbody { display: grid; gap: 11px; padding: 12px; }
  .order-table tbody tr { position: relative; display: grid; overflow: hidden; border: 1px solid #dce3eb; border-radius: 14px; background: #fff; box-shadow: 0 5px 15px rgba(16,36,62,.055); }
  .order-table tbody tr:hover { background: #fff; }
  .order-table tbody tr.deleted-order-row { background: #fafafa; }
  .order-table td { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-bottom: 1px solid #edf0f4; }
  .order-table td::before { color: #718095; font-size: .72rem; font-weight: 850; content: attr(data-label); }
  .order-table td:last-child { border-bottom: 0; }
  .order-table .order-select-cell { position: absolute; z-index: 2; top: 12px; right: 12px; display: block; width: auto; padding: 0; border: 0; }
  .order-table .order-select-cell::before { display: none; }
  .order-table .order-customer-cell { padding-top: 13px; padding-right: 48px; background: #fbfcfd; }
  .order-table .order-action-content { display: grid; min-width: 0; gap: 8px; justify-items: start; }
  .order-table .order-status { margin-top: 0; }
  .order-table .row-actions { width: 100%; }
  .order-table .row-actions button { min-height: 44px; flex: 1 1 auto; }
  .admin-empty { background: #fff; }
  .handoff-panel { align-items: stretch; flex-direction: column; }
  .handoff-panel button { width: 100%; }
  .reservation-stats { grid-template-columns: repeat(5, minmax(60px, 1fr)); }
  .reservation-toolbar, .reservation-list-head { align-items: stretch; flex-direction: column; }
  .ai-settings-form { grid-template-columns: 1fr; }
  .ai-settings-form .full { grid-column: auto; }
  .ai-settings-actions { justify-content: stretch; }
  .ai-settings-actions button { flex: 1; }
  .delivery-area-selectors { grid-template-columns: 1fr; }
  .delivery-area-level-actions { grid-template-columns: 1fr; }
  .delivery-area-dong-head, .delivery-area-picked-head, .delivery-area-save-row { align-items: stretch; flex-direction: column; }
  .delivery-area-search { width: 100%; }
  .delivery-area-save-row button { width: 100%; }
  .delivery-area-map { height: 390px !important; max-height: 390px; }
  .reservation-toolbar-actions, .reservation-list-controls { width: 100%; }
  .reservation-toolbar-actions label, .reservation-toolbar-actions input, .reservation-list-controls label, .reservation-list-controls input, .reservation-list-controls select { width: 100%; min-width: 0; }
  .pickup-reservation-card { grid-template-columns: 1fr; }
  .pickup-reservation-main { grid-template-columns: 112px minmax(0, 1fr); gap: 11px; }
  .pickup-reservation-meta { grid-column: 1 / -1; display: flex; align-items: center; }
  .pickup-reservation-actions { justify-content: stretch; }
  .pickup-reservation-actions button { flex: 1; }
  .postcode-dialog { width: min(100% - 12px, 560px); max-height: 98dvh; }
  .postcode-dialog-card { height: 98dvh; padding: 13px; }
  .postcode-status { min-height: 40px; padding: 8px 10px; font-size: .78rem; }
  .postcode-dialog-actions button { min-height: 44px; padding: 0 8px; font-size: .82rem; }
  .undo-delete { right: 14px; bottom: 14px; left: 14px; justify-content: space-between; }
}

@media (max-width: 440px) {
  .admin-topbar { align-items: stretch; flex-direction: column; gap: 9px; }
  .admin-brand strong { font-size: .9rem; }
  .admin-brand small { display: none; }
  .admin-head-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .admin-head-actions .local-badge { grid-column: 1 / -1; order: 0; width: 100%; justify-content: flex-start; }
  .admin-head-actions .outline-link { width: 100%; min-height: 40px; padding: 0 6px; font-size: .75rem; }
  .admin-intro h1 { font-size: 1.35rem; }
  .settings-fold-heading strong { font-size: 1rem; }
  .settings-fold-state small { display: none; }
  .delivery-item-aggregate-list { grid-template-columns: 1fr; }
  .phone-audit-panel > summary { align-items: flex-start; }
  .phone-audit-summary-state { display: none; }
  .phone-audit-stats { grid-template-columns: 1fr 1fr; }
  .phone-audit-actions > button { flex: 1; }
  .database-duplicate-row { grid-template-columns: minmax(0, 1fr) auto; }
  .database-duplicate-row small { grid-column: 1 / -1; }
  .driver-account-row { grid-template-columns: 1fr auto; }
  .calculator-item-form { grid-template-columns: 1fr; }
  .calculator-item-form label:first-of-type { grid-column: auto; }
  .calculator-item-form button { width: 100%; }
  .reservation-form-fields { grid-template-columns: 1fr; }
  .reservation-toolbar-actions, .reservation-list-controls { display: grid; grid-template-columns: 1fr 1fr; }
  .reservation-toolbar-actions label, .reservation-list-controls label { grid-column: 1 / -1; }
  .pickup-item-choice { grid-template-columns: 1fr; }
  .pickup-quantity-stepper { justify-self: end; }
  .pickup-reservation-main { grid-template-columns: 1fr; }
  .pickup-reservation-meta { grid-column: auto; }
  .pickup-reservation-actions { flex-wrap: wrap; }
  .pickup-reservation-actions button { min-width: calc(50% - 4px); }
  .driver-account-row button { width: 100%; }
  .driver-board { grid-template-columns: 1fr; }
  .item-head { display: none; }
  .item-row { grid-template-columns: minmax(0, 1fr) 56px 78px 36px; }
  .item-row input { padding: 0 7px; }
  .excel-actions > * { width: 100%; }
  .import-dialog-card { gap: 11px; padding: 15px; }
  .import-summary { align-items: flex-start; flex-direction: column; gap: 3px; }
  .dialog-actions > * { flex: 1; min-width: 0; padding: 0 8px; }
  .postcode-dialog-actions { grid-template-columns: 1fr; }
  .geocode-candidate { align-items: flex-start; flex-direction: column; gap: 8px; }
}
#smsOpen { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; cursor:pointer; }
#smsOpen[aria-disabled="true"] { opacity:.55; cursor:default; }
.catalog-alias-settings { grid-column:1/-1; padding:0; min-width:0; }
.admin-version-settings { min-width: 0; }
.admin-version-numbers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
.admin-version-numbers > div { min-width: 0; padding: 12px 14px; border: 1px solid var(--line, #dce5ef); border-radius: 12px; background: #f6f9fd; }
.admin-version-numbers dt { color: var(--muted, #64748b); font-size: .78rem; }
.admin-version-numbers dd { margin: 5px 0 0; color: var(--ink, #10243e); font-size: 1.05rem; font-weight: 850; overflow-wrap: anywhere; }
.admin-version-settings .admin-version-status { min-height: 1.5em; margin: 0 0 14px; color: var(--muted, #64748b); font-size: .82rem; line-height: 1.6; }
.admin-version-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-version-actions > button { flex: 1 1 150px; min-width: 0; }
.admin-version-actions > button[hidden] { display: none; }
.catalog-alias-settings > summary { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 22px; cursor:pointer; list-style:none; }
.catalog-alias-settings > summary::-webkit-details-marker { display:none; }
.catalog-alias-settings > summary > span:first-child { display:grid; gap:4px; }
.catalog-alias-settings > summary strong { font-size:1rem; }
.catalog-alias-settings > summary small, .catalog-alias-meta { color:var(--muted,#6b7c93); font-size:.78rem; }
.catalog-alias-settings > summary::after { content:"펼치기 +"; font-size:.78rem; white-space:nowrap; color:#112a45; }
.catalog-alias-settings[open] > summary::after { content:"접기 −"; }
.catalog-alias-meta { margin-left:auto; text-align:right; }
.catalog-alias-content { display:grid; gap:14px; padding:0 22px 22px; border-top:1px solid #e0e7f0; }
.catalog-alias-content > p { margin:14px 0 0; font-size:.82rem; line-height:1.6; color:#64748b; }
.catalog-alias-content form { display:grid; gap:8px; min-width:0; }
.catalog-alias-label { font-size:.85rem; font-weight:700; }
.catalog-alias-content textarea { width:100%; min-width:0; box-sizing:border-box; resize:vertical; border:1px solid #ccd8e8; border-radius:10px; padding:12px; font:inherit; font-size:.88rem; line-height:1.7; }
.catalog-alias-content small { font-size:.76rem; line-height:1.6; color:#64748b; }
.catalog-alias-content [data-alias-error] { white-space:pre-wrap; overflow-wrap:anywhere; margin:0; }
.catalog-alias-actions { display:flex; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.catalog-alias-actions button, .catalog-alias-suggestions button { min-height:44px; }
.catalog-alias-suggestions { padding:15px; border:1px solid #d6e2f2; border-radius:12px; background:#f6f9fd; }
.catalog-alias-suggestions[hidden] { display:none; }
.catalog-alias-suggestions h3 { margin:0; font-size:.9rem; }
.catalog-alias-suggestions p { font-size:.78rem; line-height:1.6; color:#64748b; }
.catalog-alias-suggestion { display:flex; align-items:center; gap:9px; padding:10px 0; overflow-wrap:anywhere; }
.catalog-alias-suggestion input { width:20px; height:20px; flex-shrink:0; }
#orderCatalogPicker [data-catalog-search-suggestion="true"] { border-color:#d5a64d; }
[data-catalog-search-suggestion="true"] .order-catalog-add::after { content:"유사 품목 · 확인 후 선택"; display:block; margin-top:5px; font-size:.7rem; color:#98620c; }
@media (max-width:600px) {
  .catalog-alias-settings > summary { padding:15px; gap:8px; flex-wrap:wrap; }
  .catalog-alias-settings > summary small { display:none; }
  .catalog-alias-content { padding:0 15px 15px; }
  .catalog-alias-actions { display:grid; grid-template-columns:1fr 1fr; }
  .catalog-alias-actions button { width:100%; min-width:0; padding:0 8px; font-size:.77rem; }
}
