:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; color: #182b27; background: #f6f8f7; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; border: 1px solid #cad7d2; background: #fff; color: #23483f; border-radius: 6px; min-height: 38px; padding: 7px 14px; font-size: 14px; }
button:hover { background: #f0f6f3; }
button:disabled { opacity: .5; cursor: not-allowed; }
input, select { width: 100%; border: 1px solid #c9d5d0; border-radius: 6px; padding: 10px 11px; min-height: 42px; background: #fff; color: #182b27; font-size: 15px; }
input:focus, select:focus, button:focus-visible { outline: 2px solid #4b9885; outline-offset: 1px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.25; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
small { display: block; font-size: 13px; color: #667872; margin-top: 3px; }
.muted { color: #62736d; font-size: 15px; line-height: 1.5; }
.primary { background: #1f5a50; color: #fff; border-color: #1f5a50; font-weight: 600; }
.primary:hover { background: #194d44; }
.wide { width: 100%; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: #e9f0ed; }
.login-panel { width: min(420px, 100%); padding: 38px; background: #fff; border: 1px solid #d9e3dd; border-radius: 8px; box-shadow: 0 12px 40px #1e4b4030; display: grid; gap: 20px; }
.login-panel h1 { font-size: 30px; }
.login-mark, .brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 7px; background: #1f5a50; color: white; font-weight: 700; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 210px minmax(0, 1fr); }
.sidebar { background: #fff; border-right: 1px solid #e1e9e5; min-height: 100vh; padding: 22px 14px; display: flex; flex-direction: column; gap: 28px; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; white-space: nowrap; font-size: 18px; }
.nav { display: grid; gap: 3px; }
.nav-item { width: 100%; border: 0; text-align: left; background: transparent; color: #41564e; padding: 10px 14px; font-size: 15px; }
.nav-item.active { background: #e3f1eb; color: #14584b; font-weight: 700; }
.identity { margin-top: auto; padding: 14px 12px; border-top: 1px solid #e4ebe6; display: grid; gap: 4px; }
.identity strong { font-size: 15px; }
.identity small { margin: 0; }
.text-button, .link-button { border: 0; padding: 0; background: none; min-height: 26px; color: #176b5a; font-weight: 600; }
.text-button:hover, .link-button:hover { text-decoration: underline; background: none; }
.identity .text-button { justify-self: start; margin-top: 8px; }
.main { padding: 36px clamp(18px, 4vw, 58px); min-width: 0; }
.page-heading { margin-bottom: 26px; }
.page-heading .muted { margin-top: 8px; }
.search-row { display: flex; gap: 10px; margin-bottom: 20px; max-width: 580px; }
.search-row input { flex: 1; min-width: 0; }
.search-row button { min-width: 90px; }
.table-wrap { overflow: auto; width: 100%; background: #fff; border: 1px solid #e0e8e3; border-radius: 6px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: #60736b; font-weight: 600; background: #f1f5f3; white-space: nowrap; }
th, td { padding: 13px 15px; border-bottom: 1px solid #e8eeea; vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdfc; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.pager { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.pager span { margin-right: auto; }
.empty, .loading { padding: 70px 20px; text-align: center; color: #60736b; background: #fff; border: 1px solid #e0e8e3; border-radius: 6px; }
.detail-backdrop { position: fixed; inset: 0; z-index: 10; background: #10221d77; display: flex; justify-content: flex-end; }
.detail-panel { width: min(540px, 100%); overflow: auto; background: #fff; padding: 28px 30px; box-shadow: -12px 0 35px #10221d26; }
.detail-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.detail-top h2 { font-size: 27px; }
.detail-panel > .muted { margin-top: 5px; }
.detail-info { display: grid; grid-template-columns: 95px minmax(0,1fr); gap: 14px 12px; margin: 28px 0 32px; font-size: 15px; }
dt { color: #708179; } dd { margin: 0; overflow-wrap: anywhere; }
.detail-heading { border-bottom: 1px solid #e4ebe6; padding-bottom: 9px; margin: 28px 0 8px; }
.detail-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 10px; border-bottom: 1px solid #edf1ee; padding: 14px 0; font-size: 15px; }
.detail-row strong { overflow-wrap: anywhere; }
.detail-row small { grid-column: 1 / -1; }
.segment { display: inline-flex; border: 1px solid #cbd9d1; border-radius: 6px; overflow: hidden; margin-bottom: 25px; }
.segment button { border: 0; border-radius: 0; min-width: 120px; }
.segment button + button { border-left: 1px solid #cbd9d1; }
.segment .selected { background: #1f5a50; color: #fff; }
.import-content { max-width: 1100px; }
.import-content > .muted { margin: 8px 0 22px; }
.file-field { display: flex; align-items: center; gap: 12px; width: min(520px,100%); padding: 18px; border: 1px dashed #9fbcb0; border-radius: 6px; background: #fff; margin-bottom: 16px; flex-wrap: wrap; }
.file-field input { width: 100%; border: 0; padding: 0; min-height: 26px; }
.import-result { margin-top: 30px; }
.import-result h3 { margin-bottom: 12px; }
.summary { padding: 16px 18px; background: #e7f2ed; color: #174e43; border-left: 4px solid #1f866d; font-weight: 600; margin: 12px 0 16px; }
.import-result .muted { margin: 9px 0 18px; }
.mapping-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; max-width: 800px; margin: 20px 0; }
.field { display: grid; gap: 7px; min-width: 0; }
.field-label { font-size: 14px; font-weight: 600; color: #304941; }
.row-actions { display: flex; gap: 10px; margin: 18px 0; flex-wrap: wrap; }
.customer-id-input { min-width: 180px; }
.user-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; max-width: 750px; background: #fff; padding: 22px; border: 1px solid #e0e8e3; border-radius: 6px; margin-bottom: 32px; }
.user-form button { justify-self: start; align-self: end; }
.section-title { margin: 16px 0 13px; }
.user-actions { white-space: nowrap; }
.user-actions button + button { margin-left: 16px; }
.toast { position: fixed; bottom: 22px; right: 22px; max-width: min(420px,calc(100vw - 44px)); padding: 13px 16px; background: #1f5a50; color: white; border-radius: 6px; box-shadow: 0 12px 28px #10332933; z-index: 30; font-size: 15px; }
.toast.error { background: #a92f29; }
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { min-height: auto; display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px 15px; border-right: 0; border-bottom: 1px solid #e1e9e5; }
  .brand { padding: 0; }
  .nav { grid-column: 1 / -1; grid-row: 2; display: flex; overflow-x: auto; gap: 4px; }
  .nav-item { white-space: nowrap; width: auto; padding: 8px 11px; }
  .identity { margin: 0; border: 0; padding: 0; justify-items: end; gap: 1px; }
  .identity .text-button { margin: 0; }
  .identity small { display: none; }
  .main { padding: 24px 16px; }
  h1 { font-size: 25px; }
  table { min-width: 720px; }
  .mapping-grid, .user-form { grid-template-columns: 1fr; }
  .detail-panel { padding: 22px 18px; }
  .search-row { max-width: none; }
}
