:root { font-family: Pretendard, "Noto Sans KR", system-ui, sans-serif; color: #17212b; background: #f4f7fa; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input { font: inherit; }
.screen { max-width: 560px; min-height: 100vh; margin: auto; background: #f4f7fa; padding-bottom: 84px; }
.header { position: relative; z-index: 10; background: #16324f; color: white; padding: calc(20px + env(safe-area-inset-top)) 20px 24px; }
.header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.header-copy { min-width: 0; }
.header h1 { margin: 0 0 6px; font-size: 22px; }
.header p { margin: 0; color: #cbd9e5; font-size: 14px; }
.menu-toggle { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-content: center; gap: 5px; border: 1px solid rgba(255,255,255,.22); border-radius: 12px; background: rgba(255,255,255,.10); padding: 0; cursor: pointer; }
.menu-toggle span { width: 20px; height: 2px; border-radius: 99px; background: white; }
.menu-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(10,23,36,.38); }
.header-menu { position: absolute; z-index: 21; top: calc(100% - 10px); right: 16px; width: min(310px, calc(100vw - 32px)); overflow: hidden; background: white; color: #17212b; border: 1px solid #dfe7ef; border-radius: 14px; box-shadow: 0 16px 40px rgba(10,23,36,.20); }
.menu-user { display: grid; gap: 4px; padding: 16px; border-bottom: 1px solid #edf2f7; }
.menu-user strong { font-size: 16px; }
.menu-user span { color: #65758b; font-size: 13px; overflow-wrap: anywhere; }
.menu-action { width: 100%; border: 0; background: white; color: #245a83; padding: 15px 16px; text-align: left; font-weight: 800; cursor: pointer; }
.menu-action:active { background: #f4f7fa; }
.menu-action.danger { color: #b42318; }
.content { padding: 16px; }
.card { background: white; border: 1px solid #dfe7ef; border-radius: 14px; padding: 16px; margin-bottom: 12px; box-shadow: 0 5px 16px rgba(22,50,79,.05); }
.order-card { position: relative; }
.order-head { display: flex; justify-content: space-between; gap: 12px; }
.order-no { color: #245a83; font-size: 13px; font-weight: 800; }
.badge { border-radius: 99px; padding: 5px 9px; background: #e6f0f7; color: #245a83; font-size: 12px; font-weight: 800; }
.product { font-weight: 800; font-size: 17px; margin: 11px 0 5px; }
.meta { color: #65758b; font-size: 14px; line-height: 1.6; }
.amount { font-weight: 800; }
.order-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #edf2f7; }
.order-detail-button { min-width: 68px; border: 1px solid #b8c8d8; background: white; color: #245a83; border-radius: 9px; padding: 8px 12px; font-weight: 800; }
.empty-card { color: #65758b; text-align: center; padding: 28px 16px; }
.nav { position: fixed; z-index: 12; left: 50%; bottom: 0; transform: translateX(-50%); width: min(560px,100%); display: grid; grid-template-columns: repeat(4,1fr); background: white; border-top: 1px solid #dfe7ef; padding-bottom: env(safe-area-inset-bottom); }
.nav button { border: 0; background: white; padding: 14px 5px; color: #65758b; }
.nav button.active { color: #245a83; font-weight: 800; }
.nav button:disabled { color: #b3bdc8; }
.login-screen { padding-bottom: 0; }
.login-content { min-height: calc(100vh - 112px); display: grid; place-items: center; padding: 24px; }
.login-content .card { width: 100%; }
.login-content .card h1 { margin-top: 0; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login .card { width: 100%; }
label { display: grid; gap: 7px; margin: 14px 0; font-weight: 700; font-size: 14px; }
input { padding: 12px; border: 1px solid #cbd5e1; border-radius: 9px; }
.primary { width: 100%; border: 0; background: #245a83; color: white; padding: 13px; border-radius: 9px; font-weight: 800; }
.primary:disabled { opacity: .55; }
.error { color: #b42318; min-height: 22px; }

.order-detail-dialog { width: min(560px, 100vw); height: min(92vh, 860px); max-width: 100vw; max-height: 92vh; padding: 0; border: 0; border-radius: 18px 18px 0 0; margin: auto auto 0; background: #f4f7fa; color: #17212b; overflow: hidden; box-shadow: 0 -16px 40px rgba(10,23,36,.20); }
.order-detail-dialog::backdrop { background: rgba(10,23,36,.48); }
.order-detail-shell { height: 100%; display: flex; flex-direction: column; }
.detail-heading { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 18px 14px; background: white; border-bottom: 1px solid #dfe7ef; }
.detail-heading h2 { margin: 2px 0 0; font-size: 19px; color: #16324f; }
.detail-kicker { display: block; color: #738396; font-size: 11px; font-weight: 800; }
.detail-close { width: 40px; height: 40px; border: 0; border-radius: 10px; background: #f3f6f9; color: #526476; font-size: 26px; line-height: 1; }
.order-detail-body { flex: 1 1 auto; overflow-y: auto; padding: 14px 14px calc(26px + env(safe-area-inset-bottom)); }
.detail-loading { padding: 30px 16px; text-align: center; color: #65758b; }
.detail-status-block { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; background: white; border: 1px solid #dfe7ef; border-radius: 14px; }
.detail-status-block > div { display: grid; gap: 7px; }
.detail-status { width: fit-content; }
.detail-label { display: block; margin-bottom: 5px; color: #7a8999; font-size: 11px; font-weight: 800; }
.detail-amount { color: #16324f; font-size: 15px; text-align: right; }
.detail-section { margin-top: 12px; padding: 16px; background: white; border: 1px solid #dfe7ef; border-radius: 14px; }
.detail-section h3 { margin: 0 0 13px; color: #16324f; font-size: 15px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 12px; }
.detail-grid > div { min-width: 0; }
.detail-grid .full { grid-column: 1 / -1; }
.detail-grid strong { display: block; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.detail-link { color: #245a83; font-weight: 800; text-decoration: none; }
.product-list { display: grid; gap: 8px; }
.product-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; padding: 10px 12px; background: #f7f9fb; border-radius: 10px; }
.product-row strong { min-width: 0; overflow-wrap: anywhere; }
.product-row span { color: #65758b; font-size: 12px; }
.product-row span:last-child { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.request-box { margin-top: 12px; padding-top: 12px; border-top: 1px solid #edf2f7; }
.request-box p { margin: 0; color: #435365; font-size: 14px; line-height: 1.55; white-space: pre-wrap; }
.history-list { display: grid; gap: 10px; }
.history-row { display: grid; grid-template-columns: 10px 1fr; gap: 8px; align-items: start; }
.history-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: #4c86ad; }
.history-row strong { display: block; font-size: 13px; }
.history-row small { display: block; margin-top: 2px; color: #8492a1; font-size: 11px; }
.detail-actions { position: sticky; bottom: -1px; margin-top: 12px; padding-top: 6px; background: linear-gradient(to bottom, rgba(244,247,250,0), #f4f7fa 18px); }
.detail-primary-action { min-height: 48px; font-size: 15px; box-shadow: 0 7px 18px rgba(36,90,131,.18); }
.workflow-note { display: grid; gap: 4px; padding: 14px; border: 1px solid #d5e0e8; border-radius: 12px; background: white; }
.workflow-note strong { color: #245a83; }
.workflow-note span { color: #65758b; font-size: 12px; line-height: 1.45; }
.muted-text { color: #7b8998; font-size: 13px; }

@media (min-width: 561px) {
  .order-detail-dialog { margin: auto; border-radius: 18px; }
}

@media (max-width: 420px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid .full { grid-column: auto; }
  .detail-status-block { align-items: flex-start; flex-direction: column; }
  .detail-amount { text-align: left; }
}


.notification-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.notification-toggle-copy { display: grid; gap: 2px; }
.notification-toggle-label { color: #245a83; font-size: 16px; }
.notification-toggle-status { color: #7a8999; font-size: 12px; font-weight: 700; }
.notification-switch { position: relative; flex: 0 0 46px; width: 46px; height: 26px; border-radius: 999px; background: #b7c1ca; transition: background .18s ease; }
.notification-switch > span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(10,23,36,.28); transition: transform .18s ease; }
.notification-switch.is-on { background: #2f7da9; }
.notification-switch.is-on > span { transform: translateX(20px); }
.notification-toggle:disabled { opacity: .6; cursor: wait; }


.empty-card { display: grid; gap: 6px; }
.empty-card span { font-size: 12px; }
.schedule-day { margin-bottom: 22px; }
.schedule-day-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 0 2px 10px; }
.schedule-day-heading strong { color: #16324f; font-size: 18px; }
.schedule-day-heading span { color: #738396; font-size: 12px; }
.schedule-card { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 12px; padding: 14px; }
.schedule-time { color: #245a83; font-size: 15px; font-weight: 900; padding-top: 2px; }
.schedule-main { min-width: 0; }
.schedule-main .product { font-size: 15px; }
.settlement-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1px; margin-bottom: 24px; border: 1px solid #d7e1e9; background: #d7e1e9; }
.settlement-summary-card { min-width: 0; display: grid; gap: 4px; padding: 16px; border-radius: 0; background: #16324f; color: white; box-shadow: none; }
.settlement-summary-card.paid { background: #26715f; }
.settlement-summary-card span { font-size: 12px; font-weight: 700; opacity: .82; }
.settlement-summary-card strong { font-size: 20px; line-height: 1.25; }
.settlement-summary-card small { min-width: 0; overflow: hidden; font-size: clamp(11px, 3.2vw, 13px); font-weight: 800; letter-spacing: -.03em; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tab-section-title { margin: 24px 2px 10px; color: #16324f; font-size: 16px; }
#settlement-content .card { border-radius: 0; box-shadow: none; }
.settlement-card { padding: 16px; }
.settlement-card .order-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.settlement-card .order-no { line-height: 1.45; word-break: keep-all; }
.settlement-card .badge { border-radius: 0; padding: 5px 8px; white-space: nowrap; }
.settlement-amount { max-width: 100%; margin: 15px 0 6px; overflow: hidden; color: #16324f; font-size: clamp(20px, 6.4vw, 28px); font-weight: 900; letter-spacing: -.045em; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.approved-work-card .product { font-size: 15px; }
.approved-work-card .order-footer strong { min-width: 0; font-size: clamp(14px, 4.2vw, 17px); letter-spacing: -.03em; white-space: nowrap; font-variant-numeric: tabular-nums; }

@media (max-width: 380px) {
  .schedule-card { grid-template-columns: 1fr; }
  .schedule-time { padding-bottom: 2px; }
}


.order-card-action { width: auto; min-width: 132px; border: 0; border-radius: 9px; padding: 11px 16px; font-weight: 800; cursor: pointer; }
.order-card-action.waiting { background: #e8eef4; color: #627487; }
.order-card-action.completed { background: #e6f3eb; color: #287044; }
@media (max-width: 420px) {
  .order-footer { align-items: center; }
  .order-card-action { min-width: 132px; }
}


.schedule-view-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 12px; border: 1px solid #c8d4df; background: #fff; }
.schedule-view-tabs button { min-height: 44px; border: 0; border-radius: 0; background: #fff; color: #65758b; font-weight: 800; }
.schedule-view-tabs button + button { border-left: 1px solid #c8d4df; }
.schedule-view-tabs button.active { background: #16324f; color: #fff; }
.schedule-range-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(150px, 1fr) auto; align-items: end; gap: 8px; margin-bottom: 22px; padding: 12px; border: 1px solid #d7e1e9; background: #fff; }
.schedule-range-form label { min-width: 0; margin: 0; color: #65758b; font-size: 11px; }
.schedule-range-form input { min-width: 0; height: 40px; border-radius: 0; font-size: 13px; }
.schedule-range-form button { min-width: 68px; height: 40px; border: 0; border-radius: 0; background: #245a83; color: #fff; font-weight: 800; }
.history-card .schedule-time { color: #65758b; font-size: 13px; }
.history-card .meta { overflow-wrap: anywhere; }
.history-card .order-footer > div { min-width: 0; }

@media (max-width: 420px) {
  .schedule-range-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .schedule-range-form .schedule-order-search,
  .schedule-range-form button { grid-column: 1 / -1; width: 100%; }
}

.history-work-description { display: -webkit-box; overflow: hidden; line-height: 1.5; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.history-work-description span { color: #17212b; font-weight: 900; }

.settlement-card-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}
.settlement-detail-button{flex:0 0 auto;border:1px solid #9bb7c7;border-radius:5px;background:#fff;color:#315f7a;font-size:12px;font-weight:700;line-height:1;padding:7px 9px;cursor:pointer}
.settlement-detail-button:active{background:#eaf3f8}
.settlement-detail-dialog{width:min(94vw,560px);max-height:88vh;margin:auto;padding:0;border:0;border-radius:14px;background:#fff;color:#173b57;box-shadow:0 24px 70px rgba(8,30,48,.28);overflow:hidden}
.settlement-detail-dialog::backdrop{background:rgba(7,25,40,.58)}
.settlement-detail-shell{max-height:88vh;overflow-y:auto;overscroll-behavior:contain}
.settlement-detail-header{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px;background:#173b57;color:#fff}
.settlement-detail-header small{display:block;margin-bottom:4px;color:#c7d9e6;font-size:13px;font-weight:700}
.settlement-detail-header h2{margin:0;font-size:19px;line-height:1.25}
.settlement-detail-close{width:40px;height:40px;padding:0;border:1px solid rgba(255,255,255,.35);border-radius:50%;background:transparent;color:#fff;font-size:30px;line-height:36px;cursor:pointer}
.settlement-detail-summary{display:grid;gap:0;margin:18px;border:1px solid #dce6ec;border-radius:10px;overflow:hidden}
.settlement-detail-summary>div{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;border-bottom:1px solid #e6edf1;font-size:14px}
.settlement-detail-summary>div:last-child{border-bottom:0}
.settlement-detail-summary span{color:#61798a}
.settlement-detail-summary strong{font-size:16px}
.settlement-detail-summary .settlement-detail-final{padding:15px 14px;background:#eef6fa}
.settlement-detail-summary .settlement-detail-final span,.settlement-detail-summary .settlement-detail-final strong{color:#173b57;font-size:18px;font-weight:900}
.settlement-detail-shell>h3{display:flex;align-items:center;gap:7px;margin:22px 18px 10px;font-size:17px}
.settlement-detail-shell>h3 span{color:#2d6788;font-size:14px}
.settlement-detail-lines{display:grid;gap:10px;padding:0 18px 22px}
.settlement-detail-lines article{padding:15px;border:1px solid #dce6ec;border-radius:10px;background:#fff}
.settlement-line-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.settlement-line-head strong{font-size:15px}
.settlement-line-head span{color:#718492;font-size:12px}
.settlement-detail-lines p{margin:7px 0 12px;color:#506979;font-size:13px}
.settlement-detail-lines dl{display:grid;gap:7px;margin:0}
.settlement-detail-lines dl div{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px}
.settlement-detail-lines dt{color:#718492}
.settlement-detail-lines dd{margin:0;font-weight:700}
.settlement-detail-lines .settlement-line-final{margin-top:4px;padding-top:9px;border-top:1px solid #e4ebef;font-size:15px}
.settlement-detail-lines .settlement-line-final dt,.settlement-detail-lines .settlement-line-final dd{color:#173b57;font-weight:900}
.settlement-detail-dialog .plus{color:#147a5a}
.settlement-detail-dialog .minus{color:#c44a42}
.settlement-detail-loading,.settlement-detail-error{padding:44px 24px;text-align:center}
.settlement-detail-error button{margin-top:12px;border:0;border-radius:7px;background:#173b57;color:#fff;font-weight:800;padding:11px 22px}


.settlement-payment-dates{display:grid;gap:0;margin:18px;border:1px solid #dce6ec;border-radius:10px;overflow:hidden;background:#fff}
.settlement-payment-dates>div{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 14px;border-bottom:1px solid #e6edf1}
.settlement-payment-dates>div:last-child{border-bottom:0}
.settlement-payment-dates span{color:#61798a;font-size:14px}
.settlement-payment-dates strong{color:#173b57;font-size:15px;font-weight:900}


.settlement-itemized-title{display:flex;align-items:center;gap:7px;margin:22px 18px 10px;font-size:17px}
.settlement-itemized-title span{color:#2d6788;font-size:14px}
.settlement-itemized-lines{display:grid;gap:10px;padding:0 18px 22px}
.settlement-itemized-lines article{padding:15px;border:1px solid #dce6ec;border-radius:10px;background:#fff}
.settlement-itemized-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.settlement-itemized-head strong{color:#173b57;font-size:15px}
.settlement-itemized-head span{color:#718492;font-size:12px}
.settlement-itemized-lines dl{display:grid;gap:8px;margin:0}
.settlement-itemized-lines dl div{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px}
.settlement-itemized-lines dt{color:#718492}
.settlement-itemized-lines dd{margin:0;color:#173b57;font-weight:700}
.settlement-itemized-lines .plus{color:#147a5a}
.settlement-itemized-lines .minus{color:#c44a42}
.settlement-itemized-lines .settlement-itemized-total{margin-top:3px;padding-top:10px;border-top:1px solid #e4ebef;font-size:15px}
.settlement-itemized-lines .settlement-itemized-total dt,.settlement-itemized-lines .settlement-itemized-total dd{color:#173b57;font-weight:900}

/* EN_ROUTE navigation buttons */
.navigation-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.navigation-button {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #dbe3ea;
  background: #fff;
  box-shadow: 0 2px 7px rgba(0,0,0,.08);
  -webkit-tap-highlight-color: transparent;
}

.navigation-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.navigation-button:active {
  transform: scale(.96);
}

/* Naver map icon optical size adjustment */
.navigation-button img[src*="navericon"] {
  width: 80%;
  height: 80%;
  margin: 10%;
  object-fit: contain;
  border-radius: 8px;
}
