:root {
  --ink: #20221f;
  --muted: #747970;
  --line: #e5e8e1;
  --paper: #f5f6f2;
  --white: #fff;
  --brand: #07c160;
  --brand-hover: #06ad56;
  --brand-panel: var(--brand);
  --brand-panel-2: var(--brand-hover);
  --brand-soft: #e8f8ef;
  --brand-rgb: 7,193,96;
  --brand-panel-rgb: var(--brand-rgb);
  --green: var(--brand);
  --green-2: var(--brand-soft);
  --orange: #f3a548;
  --red: #bc4b46;
  --shadow: 0 18px 50px rgba(25, 40, 31, .08);
  --control-height: 42px;
  --control-radius: 14px;
  --control-border: rgba(0,0,0,.10);
  --control-bg: rgba(255,255,255,.82);
  --control-hover-bg: rgba(255,255,255,.94);
  --control-focus-ring: rgba(var(--brand-rgb), .10);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Microsoft YaHei", "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); font-size: 14px; }
body.auth-view { overflow: hidden; background: #f7f7f7; }
body.auth-view #appView { display: none !important; }
body.app-view #loginView { display: none !important; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 7px; color: #708077; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.primary, .ghost, .danger { border: 0; border-radius: 9px; padding: 10px 15px; font-weight: 700; white-space: nowrap; transition: .2s; }
.primary { color: #fff; background: var(--green); box-shadow: 0 8px 18px rgba(var(--brand-rgb), .18); }
.primary:hover { background: var(--brand-hover); transform: translateY(-1px); }
.ghost { color: var(--ink); background: #fff; border: 1px solid var(--line); }
.ghost:hover { border-color: #b9c3bb; background: #fafbf9; }
.danger { color: #fff; background: var(--red); }
.text-btn { border: 0; color: var(--green); background: transparent; font-weight: 700; }
.big { width: 100%; padding: 13px; }
label { display: grid; gap: 7px; color: #5d635d; font-size: 12px; font-weight: 700; }
/* Unified control rule: all text inputs, selects, date boxes, and filter fields should share this style. */
input, select, textarea {
  width: 100%;
  min-height: var(--control-height);
  border: 1px solid var(--control-border);
  border-radius: var(--control-radius);
  padding: 10px 12px;
  color: var(--ink);
  background: var(--control-bg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
  outline: none;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
input:hover, select:hover, textarea:hover { background: var(--control-hover-bg); }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--control-focus-ring), inset 0 1px 0 rgba(255,255,255,.8); }
textarea { resize: vertical; min-height: 76px; }
.custom-select {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}
.custom-select select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.custom-select-trigger {
  display: block;
  position: relative;
  width: 100%;
  min-height: var(--control-height);
  border: 1px solid var(--control-border);
  border-radius: var(--control-radius);
  padding: 10px 42px 10px 12px;
  color: var(--ink);
  background: var(--control-bg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
  text-align: left;
  font-weight: 800;
  line-height: 1.25;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.custom-select-trigger::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 0;
  height: 0;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  border-top: 6px solid #8b928d;
  transform: translateY(-50%);
}
.custom-select.open .custom-select-trigger,
.custom-select-trigger:focus-visible {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--control-focus-ring), inset 0 1px 0 rgba(255,255,255,.8);
}
.custom-select-menu {
  position: fixed;
  z-index: 180;
  overflow: auto;
  overscroll-behavior: contain;
  display: none;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 20px 60px rgba(25,40,31,.16);
  backdrop-filter: blur(20px) saturate(170%);
}
.custom-select-menu.open {
  display: block;
}
.custom-select-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-top: 1px solid rgba(0,0,0,.05);
  padding: 10px 12px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  font-weight: 900;
}
.custom-select-option:first-child {
  border-top: 0;
}
.custom-select-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.custom-select-option.selected {
  color: var(--green);
  background: rgba(var(--brand-rgb),.055);
}
.custom-select-option.selected::after {
  content: "✓";
  color: var(--green);
  font-weight: 900;
}
.custom-select-option:hover {
  background: rgba(var(--brand-rgb),.075);
}
.date-control { position: relative; display: block; }
.date-display { padding-right: 43px; cursor: pointer; }
.date-trigger { position: absolute; top: 1px; right: 1px; width: 38px; height: calc(100% - 2px); border: 0; border-left: 1px solid rgba(0,0,0,.08); border-radius: 0 calc(var(--control-radius) - 1px) calc(var(--control-radius) - 1px) 0; color: #8f9691; background: rgba(255,255,255,.72); font-size: 12px; font-weight: 800; }
.date-trigger:hover { color: #5f6661; background: rgba(255,255,255,.92); }
.date-picker { position: fixed; z-index: 50; width: 260px; padding: 12px; border: 1px solid #dfe3dc; border-radius: 13px; background: #fff; box-shadow: 0 18px 50px rgba(25, 40, 31, .16); }
.date-picker-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.date-picker-head button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; color: var(--green); background: #fff; font-size: 18px; line-height: 1; }
.date-picker-head strong { font-size: 13px; }
.date-week, .date-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.date-week span { color: var(--muted); font-size: 11px; font-weight: 700; }
.date-days { margin-top: 6px; }
.date-days button, .date-empty { display: grid; place-items: center; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: 12px; }
.date-days button:hover { background: var(--green-2); color: var(--green); }
.date-days button.today { box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), .25); }
.date-days button.selected { color: #fff; background: var(--green); }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: 0; background: #f7f7f7; }
.login-card { width: min(326px, calc(100vw - 40px)); padding: 24px 0 26px; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.login-card-head { display: grid; justify-items: center; gap: 12px; }
.login-mark { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 15px; color: #fff; background: var(--brand); box-shadow: 0 12px 26px rgba(var(--brand-rgb),.22); font-size: 24px; font-weight: 900; }
.brand-logo { display: block; width: 100%; height: auto; object-fit: contain; }
.login-logo { width: min(240px, 100%); margin: 0 auto 24px; }
.login-card h1 { margin: 0; color: #191919; font-size: 23px; line-height: 1.2; text-align: center; letter-spacing: 0; }
.form-error.is-loading { color: var(--muted); }
.login-view input:-webkit-autofill,
.login-view input:-webkit-autofill:hover,
.login-view input:-webkit-autofill:focus,
.login-view input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  box-shadow: 0 0 0 1000px #fff inset;
  transition: background-color 9999s ease-out 0s;
}
.stack { display: grid; gap: 13px; margin-top: 24px; }
.login-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 3px; background: #f0f1ef; border-radius: 6px; }
.login-tabs button { border: 0; border-radius: 5px; padding: 9px 8px; background: transparent; color: #5f6661; font-weight: 700; cursor: pointer; }
.login-tabs button.active { background: #fff; color: var(--brand-hover); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.login-panel { display: grid; grid-template-rows: 64px 64px 22px; gap: 10px; }
.login-panel label { align-self: start; }
.login-link { justify-self: end; border: 0; padding: 0; background: transparent; color: var(--brand-hover); font-weight: 700; cursor: pointer; }
.login-panel-spacer { display: block; min-height: 22px; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 48px; }
.code-field { display: grid; grid-template-columns: 1fr 112px; gap: 8px; }
.code-field input { min-width: 0; }
.code-field button { min-height: 46px; padding: 0 10px; white-space: nowrap; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 34px;
  height: 30px;
  transform: translateY(-50%);
  border: 1px solid rgba(var(--brand-rgb),.12);
  border-radius: 999px;
  color: var(--green);
  background: rgba(255,255,255,.72);
  box-shadow: 0 8px 22px rgba(25,40,31,.08), inset 0 1px 0 rgba(255,255,255,.68);
  backdrop-filter: blur(14px) saturate(160%);
  font-size: 12px;
  font-weight: 800;
}
.password-toggle.active { color: #fff; background: rgba(var(--brand-rgb),.9); }
.remember-line { display: flex; align-items: center; gap: 8px; min-height: 22px; color: #6b716d; font-size: 12px; }
.remember-line input { width: 17px; height: 17px; }
.desktop-login-tools { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #eef0eb; }
.desktop-login-tools .check { display: flex; align-items: center; gap: 8px; color: #68736b; font-size: 12px; }
.desktop-login-tools input { width: 17px; height: 17px; }
.desktop-login-tools .mini-note { margin: -2px 0 0; color: #9a9f98; font-size: 11px; text-align: center; }
.login-tip { margin: 18px 0 0; color: #878d86; font-size: 11px; text-align: center; }
.form-error { min-height: 18px; margin: 0; color: var(--red); font-size: 12px; text-align: center; }

.app { min-height: 100vh; display: grid; grid-template-columns: 225px 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 225px; z-index: 3; display: flex; flex-direction: column; justify-content: space-between; padding: 25px 17px 18px; color: #fff; background: var(--brand); }
.logo { display: block; padding: 6px 8px 22px; font-size: 18px; }
.sidebar-logo { width: min(118px, 100%); }
.logo strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
nav { display: grid; gap: 4px; }
nav button { display: flex; align-items: center; gap: 11px; border: 0; border-radius: 9px; padding: 10px 12px; color: rgba(255,255,255,.68); background: transparent; text-align: left; font-size: 13px; }
nav button i { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid rgba(255,255,255,.16); border-radius: 7px; font-size: 10px; font-style: normal; }
.nav-icon {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.nav-icon img {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 5px 12px rgba(0,0,0,.10);
}
nav button:hover, nav button.active { color: #fff; background: rgba(255,255,255,.1); }
.mobile-menu-btn { display: none; }
.user-box { display: grid; grid-template-columns: 37px 1fr auto; align-items: center; gap: 9px; padding: 12px 9px; border-top: 1px solid rgba(255,255,255,.12); }
.avatar { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 50%; color: var(--brand); background: #f5b660; font-weight: 800; }
.user-box strong, .user-box span { display: block; }
.user-box strong { font-size: 12px; }
.user-box span { margin-top: 3px; color: rgba(255,255,255,.55); font-size: 10px; }
.user-box button { border: 0; color: rgba(255,255,255,.55); background: transparent; font-size: 11px; }
.mobile-nav-tools { display: none; }
main { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; min-height: 88px; padding: 17px 34px; border-bottom: 1px solid var(--line); background: rgba(245,246,242,.94); backdrop-filter: blur(14px); }
.topbar h2 { min-width: 0; margin: 0; font-size: 23px; }
.top-actions { display: flex; flex: 1 1 620px; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 9px; min-width: 0; max-width: none; overflow: visible; }
.shop-switch { flex: 0 0 130px; min-width: 130px; max-width: 130px; height: var(--control-height); border-color: var(--control-border); border-radius: var(--control-radius); padding: 0 36px 0 12px; background: var(--control-bg); color: var(--ink); }
.shop-switch.hidden { display: none; }
.sync-status { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; margin-right: 0; color: #667068; font-size: 11px; white-space: nowrap; }
.sync-status b { width: 7px; height: 7px; border-radius: 50%; background: #43a174; box-shadow: 0 0 0 4px rgba(67,161,116,.13); }
.sync-status.syncing b { background: var(--orange); }
.page { display: none; padding: 28px 34px 40px; }
.page.active { display: block; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 15px; }
.stat-card { min-height: 135px; padding: 22px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); box-shadow: 0 8px 28px rgba(40,55,45,.03); }
.stat-card[data-dashboard] { cursor: pointer; user-select: none; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.stat-card[data-dashboard]:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(40,55,45,.1); }
.stat-card.accent { color: #fff; border-color: transparent; background: var(--green); box-shadow: 0 15px 30px rgba(var(--brand-rgb),.18); }
.stat-card span, .stat-card small, .stat-card strong { display: block; }
.stat-card span { color: var(--muted); font-size: 12px; }
.stat-card.accent span, .stat-card.accent small { color: rgba(255,255,255,.66); }
.stat-card strong { margin: 18px 0 8px; font-family: "Segoe UI", sans-serif; font-size: 25px; }
.stat-card small { color: #90958e; font-size: 11px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); gap: 16px; margin-top: 17px; }
.panel { padding: 22px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 8px 28px rgba(40,55,45,.03); }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.panel-head h3, .section-intro h3 { margin: 0; font-size: 17px; }
.panel-head p:not(.eyebrow), .section-intro p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.recent-item { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid #eef0eb; }
.recent-item:first-child { border-top: 0; }
.recent-list .recent-item { border-right: 0; border-left: 0; border-bottom: 0; width: 100%; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.recent-list .recent-item:hover { padding-left: 8px; padding-right: 8px; border-radius: 12px; background: rgba(var(--brand-rgb),.055); }
.recent-date { color: #859088; font-size: 11px; text-align: center; }
.recent-date b { display: block; color: var(--ink); font-size: 16px; }
.recent-item strong, .recent-item span { display: block; }
.recent-item span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.recent-amount { color: var(--green); font-family: "Segoe UI", sans-serif; font-weight: 800; }
.rank-row { margin: 16px 0; }
.rank-line { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 7px; font-size: 12px; }
.rank-track { overflow: hidden; height: 6px; border-radius: 99px; background: #edf0eb; }
.rank-track i { display: block; height: 100%; border-radius: 99px; background: var(--green); }

.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; min-width: 0; margin-bottom: 14px; }
.toolbar label { flex: 1 1 150px; width: auto; min-width: 140px; max-width: 210px; }
.search-wrap { position: relative; flex: 2 1 260px; min-width: 220px; }
.search-wrap span { position: absolute; left: 12px; top: 9px; color: #8a928c; font-size: 18px; }
.search-wrap input { padding-left: 37px; }
.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.table-summary { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.table-summary strong { color: var(--green); }
.ledger-summary-left { display: flex; align-items: center; gap: 13px; }
.ledger-summary-left .text-btn { padding: 0; color: var(--green); font-size: 12px; font-weight: 800; }
.recent-deleted-panel { padding: 14px 18px 18px; }
.recent-deleted-panel-head { display: flex; align-items: center; min-height: 26px; margin-bottom: 12px; }
.recent-deleted-panel-head .text-btn { padding: 0; color: var(--green); font-weight: 800; }
.ledger-bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(var(--brand-rgb),.10), rgba(255,255,255,.86));
}
.ledger-bulk-bar span {
  margin-right: auto;
  color: var(--green);
  font-weight: 900;
}
.select-col {
  width: 46px;
  min-width: 46px;
  text-align: center;
}
.select-col input {
  padding: 0;
}
.table-scroll { overflow: auto; max-width: 100%; max-height: calc(100vh - 250px); scrollbar-color: #b8b8b8 #eeeeee; scrollbar-width: thin; }
.recent-deleted-list { display: grid; gap: 12px; }
.recent-deleted-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.recent-deleted-main { min-width: 0; }
.recent-deleted-main > div { display: flex; align-items: baseline; gap: 12px; }
.recent-deleted-main strong { font-size: 15px; }
.recent-deleted-main span, .recent-deleted-main p, .recent-deleted-main small { color: var(--muted); }
.recent-deleted-main p { margin: 7px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-deleted-main small { font-size: 12px; }
.recent-deleted-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.table-scroll::-webkit-scrollbar { width: 14px; height: 14px; }
.table-scroll::-webkit-scrollbar-track { background: #eeeeee; }
.table-scroll::-webkit-scrollbar-thumb { border: 3px solid #eeeeee; border-radius: 999px; background: #b8b8b8; }
.table-scroll::-webkit-scrollbar-thumb:hover { background: #9f9f9f; }
.table-scroll::-webkit-scrollbar-corner { background: #eeeeee; }
.audit-detail-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 360px;
}
.audit-detail-cell span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.text-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.audit-detail-modal {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.audit-detail-modal p {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.audit-detail-modal .span { grid-template-columns: 1fr; }
.audit-detail-modal b { color: var(--muted); font-size: 12px; }
.audit-detail-modal span {
  color: var(--ink);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 12px 14px; border-bottom: 1px solid #eef0eb; text-align: left; font-size: 12px; }
th { position: sticky; top: 0; z-index: 1; color: #747b75; background: #f8f9f6; font-size: 11px; }
th.sticky-actions, td.sticky-actions { position: sticky; right: 0; min-width: 146px; overflow: visible; background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.88) 24%, rgba(255,255,255,.94)); }
th.sticky-actions { z-index: 5; background: linear-gradient(90deg, rgba(248,249,246,0), rgba(248,249,246,.92) 24%, rgba(248,249,246,.98)); }
td.sticky-actions { z-index: 4; }
td.amount { color: var(--green); font-weight: 800; }
td.truncate, td.remark { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
tr.zero-amount-row td {
  background: rgba(255, 159, 10, .075);
}
tr.zero-amount-row td.amount {
  color: #b36b00;
}
tr.zero-amount-row td.sticky-actions { background: linear-gradient(90deg, rgba(255,248,235,0), rgba(255,248,235,.92) 24%, rgba(255,248,235,.98)); }
tr:hover td { background: #fbfcfa; }
tr.zero-amount-row:hover td {
  background: rgba(255, 159, 10, .12);
}
tr:hover td.sticky-actions { background: linear-gradient(90deg, rgba(251,252,250,0), rgba(251,252,250,.92) 24%, rgba(251,252,250,.98)); }
tr.zero-amount-row:hover td.sticky-actions { background: linear-gradient(90deg, rgba(255,248,235,0), rgba(255,248,235,.94) 24%, rgba(255,248,235,1)); }
tr.ledger-row-highlight td {
  animation: ledgerHighlight 2.6s ease;
}
@keyframes ledgerHighlight {
  0%, 55% { background: rgba(var(--brand-rgb),.13); }
  100% { background: transparent; }
}
.row-actions { position: relative; display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: 8px; min-width: max-content; }
#ledgerPage th.sticky-actions, #ledgerPage td.sticky-actions { box-sizing: border-box; padding-right: 8px; padding-left: 8px; }
#ledgerPage .row-actions { width: 100%; min-width: 0; gap: 5px; }
.row-actions.open { z-index: 8; }
.mini {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 999px;
  padding: 6px 10px;
  color: rgba(35,43,38,.86);
  background:
    radial-gradient(circle at 24% 15%, rgba(255,255,255,.92), rgba(255,255,255,.22) 28%, rgba(255,255,255,.06) 62%),
    linear-gradient(145deg, rgba(255,255,255,.48), rgba(255,255,255,.18) 45%, rgba(255,255,255,.34));
  box-shadow:
    0 10px 26px rgba(18,31,26,.12),
    0 2px 8px rgba(255,255,255,.20) inset,
    0 -10px 18px rgba(255,255,255,.16) inset,
    0 0 0 1px rgba(255,255,255,.20) inset;
  backdrop-filter: blur(22px) saturate(190%) contrast(108%);
  transform: translateZ(0);
  backface-visibility: hidden;
  font-size: 11px;
}
.mini::before {
  content: "";
  position: absolute;
  inset: 1px 2px auto;
  height: 45%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.70), rgba(255,255,255,0));
  pointer-events: none;
}
.mini:hover {
  background:
    radial-gradient(circle at 24% 15%, rgba(255,255,255,1), rgba(255,255,255,.32) 30%, rgba(255,255,255,.10) 64%),
    linear-gradient(145deg, rgba(255,255,255,.60), rgba(255,255,255,.24) 45%, rgba(255,255,255,.42));
  transform: translateZ(0);
}
.mini.receive {
  color: var(--green);
  border-color: rgba(var(--brand-rgb),.18);
  background:
    radial-gradient(circle at 24% 15%, rgba(255,255,255,.92), rgba(231,241,235,.32) 34%, rgba(231,241,235,.10) 65%),
    linear-gradient(145deg, rgba(231,241,235,.56), rgba(255,255,255,.22) 48%, rgba(231,241,235,.36));
}
.mini.receive.urgent {
  color: #fff;
  border-color: rgba(var(--brand-rgb),.26);
  background:
    radial-gradient(circle at 24% 15%, rgba(255,255,255,.38), rgba(var(--brand-rgb),.18) 34%, rgba(var(--brand-rgb),.04) 65%),
    linear-gradient(145deg, rgba(var(--brand-panel-rgb),.92), rgba(var(--brand-rgb),.76));
  box-shadow:
    0 12px 28px rgba(var(--brand-rgb),.24),
    0 2px 8px rgba(255,255,255,.22) inset,
    0 0 0 1px rgba(255,255,255,.18) inset;
}
.mini.more { min-width: 50px; }
#ledgerPage .table-scroll {
  contain: layout paint;
}
#ledgerPage .table-scroll .mini {
  border-color: rgba(var(--brand-rgb),.14);
  background: rgba(255,255,255,.92);
  box-shadow: 0 4px 14px rgba(18,31,26,.08), inset 0 1px 0 rgba(255,255,255,.82);
  backdrop-filter: none;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
#ledgerPage .table-scroll .mini::before {
  display: none;
}
#ledgerPage .table-scroll .mini:hover {
  background: #fff;
  border-color: rgba(var(--brand-rgb),.26);
}
#ledgerPage .table-scroll .mini.receive {
  color: var(--green);
  background: rgba(248,253,250,.96);
}
#ledgerPage .table-scroll .mini.receive.urgent {
  color: #fff;
  background: linear-gradient(180deg, var(--brand-panel), var(--brand-panel-2));
  box-shadow: 0 7px 18px rgba(var(--brand-rgb),.18);
}
.row-extra-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  box-shadow: none;
  isolation: isolate;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateX(18px) scale(.98);
  transform-origin: right center;
  transition: max-width .24s ease, opacity .18s ease, transform .24s ease;
  pointer-events: none;
}
.row-actions.open .row-extra-actions {
  max-width: 360px;
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}
.row-actions.open .mini.more { color: var(--green); background:
  radial-gradient(circle at 24% 15%, rgba(255,255,255,1), rgba(231,241,235,.34) 30%, rgba(255,255,255,.10) 64%),
  linear-gradient(145deg, rgba(231,241,235,.62), rgba(255,255,255,.24) 45%, rgba(231,241,235,.42));
}
.mini.delete { color: var(--red); }
.empty { display: grid; place-items: center; gap: 6px; padding: 65px 20px; color: var(--muted); }
.empty b { color: var(--ink); }

.section-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; padding: 3px 2px; }
.section-intro > div:first-child { min-width: 0; }
.section-search { flex: 0 0 auto; width: min(360px, 100%); }
.customer-toolbar { display: flex; align-items: center; gap: 10px; width: min(520px, 100%); }
.customer-toolbar input { min-width: 0; flex: 1; }
.customer-toolbar .primary { flex: 0 0 auto; min-height: 46px; padding: 0 18px; border-radius: 14px; }
.invite-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; }
.invite-row input { min-width: 220px; }
.user-grid, .customer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.user-card, .customer-card { padding: 19px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.user-card-top { display: flex; align-items: center; gap: 11px; }
.user-card .avatar { color: #fff; background: var(--green); }
.user-card h4 { margin: 0; }
.user-card p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.customer-card { display: grid; gap: 16px; }
.customer-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.customer-card-head span { color: var(--muted); font-size: 11px; }
.customer-card h4 { overflow: hidden; max-width: 230px; margin: 4px 0 0; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; letter-spacing: -.03em; }
.customer-info { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.customer-info p { min-width: 0; margin: 0; padding: 10px; border-radius: 12px; background: rgba(var(--brand-rgb),.05); }
.customer-info b, .customer-info span { display: block; min-width: 0; }
.customer-info b { color: var(--muted); font-size: 10px; }
.customer-info span { overflow: hidden; margin-top: 4px; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.customer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.customer-actions .primary, .customer-actions .mini { min-height: 34px; padding: 7px 11px; border-radius: 12px; font-size: 11px; }
.customer-mini-bind {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px dashed rgba(var(--brand-rgb),.24);
  border-radius: 14px;
  background: rgba(var(--brand-rgb),.045);
}
.customer-mini-bind.muted-bind {
  min-height: 68px;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}
.mini-bind-qr {
  flex: 0 0 92px;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 0;
  background: #fff;
  overflow: visible;
}
.mini-bind-qr img,
.mini-bind-qr canvas {
  display: block;
  width: 92px !important;
  height: 92px !important;
}
.mini-bind-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.mini-bind-info b { font-size: 13px; }
.mini-bind-info span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.mini-bind-info .mini { justify-self: start; padding: 6px 10px; }
.customer-stats { display: flex; align-items: center; gap: 10px; padding-top: 2px; }
.customer-stats span { color: var(--muted); font-size: 11px; }
.customer-stats strong { margin-left: auto; color: var(--green); font-size: 17px; }
.customer-stats em { font-style: normal; color: var(--muted); font-size: 11px; }
.customer-stats em.debt { color: var(--red); }

#customersPage .customer-grid {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 12px;
}
#customersPage .customer-card {
  position: relative;
  gap: 10px;
  min-height: 0;
  padding: 16px;
  border-radius: 18px;
  overflow: visible;
  cursor: pointer;
}
#customersPage .customer-card button,
#customersPage .customer-card summary { cursor: pointer; }
#customersPage .customer-card:hover {
  border-color: rgba(var(--brand-rgb),.18);
  box-shadow: 0 16px 34px rgba(15,23,42,.09);
}
#customersPage .customer-card:has(.customer-mini-bind[open]) {
  z-index: 30;
}
#customersPage .customer-card h4 {
  max-width: none;
  font-size: 17px;
}
#customersPage .customer-actions { gap: 6px; }
#customersPage .customer-actions .primary,
#customersPage .customer-actions .mini {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 10px;
}
#customersPage .customer-contact-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 30px;
}
#customersPage .customer-contact-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 6px;
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #4f5752;
  background: rgba(17,24,39,.04);
  font-size: 11px;
  line-height: 1;
}
#customersPage .customer-contact-chip b {
  overflow: hidden;
  max-width: 180px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#customersPage .customer-contact-chip em {
  color: var(--muted);
  font-style: normal;
}
#customersPage .customer-contact-chip.more,
#customersPage .customer-contact-empty {
  color: var(--muted);
  background: rgba(17,24,39,.03);
}
#customersPage .customer-contact-empty {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 5px 9px;
  border-radius: 999px;
  color: rgba(74,84,78,.76);
  background: rgba(17,24,39,.035);
  box-shadow: inset 0 0 0 1px rgba(17,24,39,.025);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
#customersPage .customer-info.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
#customersPage .customer-info.compact p {
  padding: 8px 10px;
  background: rgba(17,24,39,.035);
}
#customersPage .customer-mini-bind {
  position: relative;
  display: block;
  padding: 0;
  border: 1px solid rgba(17,24,39,.06);
  border-radius: 12px;
  background: rgba(255,255,255,.72);
}
#customersPage .customer-mini-bind[open] {
  z-index: 31;
}
#customersPage .customer-mini-bind summary {
  cursor: pointer;
  list-style: none;
  padding: 9px 11px;
  color: #5f6661;
  font-size: 12px;
  font-weight: 800;
}
#customersPage .customer-mini-bind summary::-webkit-details-marker { display: none; }
#customersPage .customer-mini-bind summary::after {
  content: "展开";
  float: right;
  color: var(--muted);
  font-weight: 700;
}
#customersPage .customer-mini-bind[open] summary::after { content: "收起"; }
#customersPage .customer-mini-bind-body {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  z-index: 32;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(17,24,39,.06);
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 18px 42px rgba(25,40,31,.16);
  backdrop-filter: blur(18px) saturate(160%);
}
#customersPage .mini-bind-qr {
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
}
#customersPage .mini-bind-qr img,
#customersPage .mini-bind-qr canvas {
  width: 84px !important;
  height: 84px !important;
}
#customersPage .customer-stats { padding-top: 0; }

.quote-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.quote-admin { grid-column: 1 / -1; }
.quote-categories { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.quote-categories button {
  border: 1px solid rgba(var(--brand-rgb),.12);
  border-radius: 999px;
  padding: 8px 12px;
  color: #526058;
  background: rgba(255,255,255,.74);
  font-weight: 800;
}
.quote-categories button.active { color: #fff; border-color: transparent; background: var(--green); box-shadow: 0 10px 24px rgba(var(--brand-rgb),.18); }
.quote-product-cards { display: grid; gap: 10px; }
.quote-product-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid rgba(var(--brand-rgb),.08);
  border-radius: 18px;
  padding: 12px;
  color: var(--ink);
  background: rgba(255,255,255,.72);
  text-align: left;
  box-shadow: 0 10px 24px rgba(25,40,31,.04);
  cursor: grab;
}
.quote-product-card:active { cursor: grabbing; }
.quote-product-card.dragging {
  opacity: .72;
  transform: scale(.985);
  border-color: rgba(var(--brand-rgb),.28);
  background: rgba(231,241,235,.86);
  box-shadow: 0 20px 48px rgba(var(--brand-rgb),.14);
}
.quote-product-card.active { border-color: rgba(var(--brand-rgb),.22); background: linear-gradient(145deg, rgba(var(--brand-rgb),.12), rgba(255,255,255,.78)); }
.quote-thumb { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: var(--green); font-weight: 900; }
.quote-product-card b, .quote-product-card span { display: block; }
.quote-product-card span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.quote-hero-inner { margin-bottom: 18px; padding: 22px; border-radius: 24px; }
.quote-hero-inner h3 { margin: 0 0 8px; font-size: 24px; letter-spacing: -.04em; }
.quote-hero-inner p { margin: 0 0 10px; color: #617069; line-height: 1.7; }
.quote-hero-inner span { color: var(--green); font-size: 12px; font-weight: 800; }
.quote-calc-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .8fr); gap: 18px; }
.quote-calc-grid h3 { margin: 0 0 14px; font-size: 16px; }
.quote-dynamic-form, .quote-measure-form { display: grid; gap: 14px; }
.quote-param { display: grid; gap: 9px; }
.quote-param > b { color: #444b46; font-size: 12px; }
.quote-option-row { display: flex; flex-wrap: wrap; gap: 8px; }
.quote-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-width: 110px;
  min-height: 42px;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
  padding: 9px 13px;
  color: #3f4641;
  background: rgba(255,255,255,.70);
  line-height: 1;
  cursor: pointer;
}
.quote-chip input {
  position: relative;
  flex: 0 0 auto;
}
.quote-result-card {
  margin-top: 16px;
  padding: 18px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-panel), var(--brand-panel-2));
  box-shadow: 0 22px 50px rgba(var(--brand-rgb),.22);
}
.quote-result-card span, .quote-result-card p { color: rgba(255,255,255,.72); }
.quote-result-card strong { display: block; margin: 8px 0 8px; font-size: 30px; }
.quote-result-card .ghost { margin-top: 8px; color: var(--green); }
.quote-result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.quote-result-actions .primary, .quote-result-actions .ghost { margin-top: 0; }
.quote-admin-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quote-admin-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(var(--brand-rgb),.08);
  border-radius: 20px;
  background: rgba(255,255,255,.62);
  cursor: grab;
}
.quote-admin-card:active { cursor: grabbing; }
.quote-admin-card.dragging {
  opacity: .72;
  transform: scale(.985);
  border-color: rgba(var(--brand-rgb),.28);
  background: rgba(231,241,235,.86);
  box-shadow: 0 20px 48px rgba(var(--brand-rgb),.14);
}
.quote-admin-card .card-actions { cursor: default; }
.quote-admin-card span, .quote-admin-card p { color: var(--muted); font-size: 11px; }
.quote-admin-card h4 { margin: 4px 0; font-size: 17px; }
.matting-layout {
  display: grid;
  grid-template-columns: minmax(320px, .75fr) minmax(0, 1.25fr);
  gap: 18px;
}
.matting-drop {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 245px;
  padding: 28px;
  border: 1px dashed rgba(var(--brand-rgb),.28);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(231,241,235,.58));
  text-align: center;
  transition: .18s ease;
}
.matting-drop.dragover, .matting-drop:hover {
  border-color: rgba(var(--brand-rgb),.55);
  background: linear-gradient(145deg, rgba(239,250,245,.95), rgba(255,255,255,.82));
  box-shadow: 0 18px 45px rgba(var(--brand-rgb),.10);
}
.matting-drop strong { font-size: 18px; }
.matting-drop span, .matting-status { color: var(--muted); font-size: 12px; }
.matting-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.matting-actions a { display: inline-flex; align-items: center; text-decoration: none; }
.matting-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.matting-preview-grid b { display: block; margin: 0 0 10px; font-size: 14px; }
.matting-preview {
  display: grid;
  place-items: center;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 24px;
  background: rgba(255,255,255,.72);
}
.matting-preview.checkerboard {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #e4e7e1 25%, transparent 25%),
    linear-gradient(-45deg, #e4e7e1 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e4e7e1 75%),
    linear-gradient(-45deg, transparent 75%, #e4e7e1 75%);
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
}
.matting-preview img {
  display: block;
  max-width: 100%;
  max-height: 430px;
  object-fit: contain;
}
.matting-editor-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(var(--brand-rgb),.12);
  border-radius: 20px;
  background: rgba(255,255,255,.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78), 0 16px 38px rgba(25,40,31,.06);
}
.matting-editor-head b,
.matting-editor-head span { display: block; }
.matting-editor-head b { font-size: 15px; }
.matting-editor-head span { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.matting-tool-tabs,
.matting-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.matting-tool {
  min-width: 92px;
  border: 1px solid rgba(var(--brand-rgb),.14);
  border-radius: 14px;
  padding: 10px 14px;
  color: var(--ink);
  background: rgba(255,255,255,.78);
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}
.matting-tool.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand-panel), var(--brand-panel-2));
  box-shadow: 0 12px 28px rgba(var(--brand-rgb),.18);
}
.matting-tool.danger-tool.active {
  background: linear-gradient(135deg, #ff4f7b, #e2365f);
  box-shadow: 0 12px 28px rgba(226,54,95,.18);
}
.matting-brush-label {
  padding: 12px;
  border: 1px solid rgba(var(--brand-rgb),.10);
  border-radius: 16px;
  background: rgba(247,250,248,.72);
}
.matting-brush-label span {
  color: var(--green);
  font-weight: 900;
}
.matting-brush-label input {
  padding: 0;
  accent-color: var(--green);
}
.matting-edit-stage {
  position: relative;
  display: grid;
  place-items: center;
  margin-top: 16px;
  min-height: 520px;
  overflow: auto;
  border: 1px solid rgba(var(--brand-rgb),.12);
  border-radius: 24px;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #e4e7e1 25%, transparent 25%),
    linear-gradient(-45deg, #e4e7e1 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e4e7e1 75%),
    linear-gradient(-45deg, transparent 75%, #e4e7e1 75%);
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
}
.matting-edit-tip {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(32,34,31,.72);
  background: rgba(255,255,255,.80);
  box-shadow: 0 10px 24px rgba(25,40,31,.08);
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}
.matting-edit-stage canvas {
  display: block;
  max-width: 100%;
  max-height: 720px;
  cursor: crosshair;
}
.matting-batch-box {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(var(--brand-rgb),.10);
  border-radius: 18px;
  background: rgba(247,250,248,.72);
}
.matting-batch-box > span {
  color: var(--muted);
  font-size: 12px;
}
.matting-batch-list {
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow: auto;
}
.matting-batch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.78);
  font-size: 12px;
}
.matting-batch-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.matting-batch-item a {
  color: var(--green);
  font-weight: 900;
  text-decoration: none;
}
.matting-batch-item em {
  color: var(--muted);
  font-style: normal;
}
.matting-batch-item em.error { color: var(--red); }
.quote-color-field { align-self: end; }
.quote-color-picker {
  --quote-color: #e8f8ef;
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 11px;
  min-height: 39px;
  padding: 6px 12px 6px 7px;
  overflow: hidden;
  border: 1px solid rgba(var(--brand-rgb),.12);
  border-radius: 14px;
  background:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,.92), rgba(255,255,255,.35) 35%, rgba(255,255,255,0) 68%),
    linear-gradient(135deg, var(--quote-color), rgba(255,255,255,.82));
  box-shadow: 0 12px 26px rgba(25,40,31,.06), inset 0 1px 0 rgba(255,255,255,.72);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.quote-color-picker:hover {
  border-color: rgba(var(--brand-rgb),.25);
  box-shadow: 0 16px 34px rgba(25,40,31,.09), inset 0 1px 0 rgba(255,255,255,.78);
  transform: translateY(-1px);
}
.quote-color-picker input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}
.quote-color-preview {
  width: 30px;
  height: 30px;
  border: 2px solid rgba(255,255,255,.88);
  border-radius: 11px;
  background: var(--quote-color);
  box-shadow: 0 9px 18px rgba(16,25,21,.14), inset 0 0 0 1px rgba(0,0,0,.08);
}
.quote-color-meta { min-width: 0; line-height: 1.15; }
.quote-color-meta b, .quote-color-meta em { display: block; }
.quote-color-meta b { color: rgba(32,34,31,.82); font-size: 11px; }
.quote-color-meta em { margin-top: 3px; color: var(--green); font-size: 11px; font-style: normal; font-weight: 800; letter-spacing: .04em; }
.quote-rule-editor { margin: 18px 0; padding: 14px; border: 1px solid rgba(var(--brand-rgb),.08); border-radius: 18px; background: rgba(var(--brand-rgb),.04); }
.quote-rule-editor h4, .quote-param-editor-head h4 { margin: 0 0 12px; }
.quote-tier-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(var(--brand-rgb),.09);
}
.quote-tier-editor-head b, .quote-tier-editor-head span { display: block; }
.quote-tier-editor-head span { margin-top: 4px; color: var(--muted); font-size: 11px; }
#quoteTierEditorList { display: grid; gap: 10px; }
.quote-tier-editor {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 16px;
  background: rgba(255,255,255,.68);
}
.mini-empty { padding: 12px; min-height: auto; }
.quote-param-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; }
#quoteParamEditorList { display: grid; gap: 12px; }
.quote-param-editor {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr) minmax(130px, 1fr) 90px;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 18px;
  background: rgba(255,255,255,.64);
}
.quote-param-editor .span-4 { grid-column: span 4; }
.quote-format-hint { color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.7; }
.quote-option-basis-wrap {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(var(--brand-rgb),.08);
  border-radius: 18px;
  background: rgba(var(--brand-rgb),.045);
}
.quote-option-basis-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.quote-option-basis-title b { color: var(--ink); font-size: 13px; }
.quote-option-basis-title span { color: var(--muted); font-size: 11px; font-weight: 500; }
.quote-option-basis-list { display: grid; gap: 9px; }
.quote-option-basis-row {
  display: grid;
  grid-template-columns: minmax(96px, .6fr) minmax(0, 1.6fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(0,0,0,.05);
  border-radius: 16px;
  background: rgba(255,255,255,.74);
}
.quote-option-basis-row strong { overflow: hidden; color: var(--green); text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.quote-option-basis-row > div { display: flex; flex-wrap: wrap; gap: 8px; }
.quote-option-basis-row .check {
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
}
.customer-suggest-popup {
  position: fixed;
  z-index: 130;
  overflow: auto;
  overscroll-behavior: contain;
  max-height: 310px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 20px 60px rgba(25,40,31,.16);
  backdrop-filter: blur(20px) saturate(170%);
}
.customer-suggest-title { padding: 10px 12px 7px; color: var(--muted); font-size: 11px; font-weight: 800; }
.customer-suggest-popup button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  width: 100%;
  border: 0;
  border-top: 1px solid rgba(0,0,0,.05);
  padding: 10px 12px;
  background: transparent;
  text-align: left;
}
.customer-suggest-popup button:hover { background: rgba(var(--brand-rgb),.07); }
.customer-suggest-popup strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.customer-suggest-popup span { overflow: hidden; grid-column: 1; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.customer-suggest-popup em { grid-column: 2; grid-row: 1 / span 2; align-self: center; border-radius: 999px; padding: 4px 7px; color: var(--green); background: var(--green-2); font-style: normal; font-size: 10px; font-weight: 800; }
.customer-suggest-popup.customer-suggest-compact button {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding-top: 11px;
  padding-bottom: 11px;
}
.customer-suggest-popup.customer-suggest-compact em {
  grid-row: auto;
}
.badge { display: inline-block; margin-left: auto; padding: 4px 7px; border-radius: 99px; color: var(--green); background: var(--green-2); font-size: 10px; }
.badge.off { color: var(--red); background: #fae9e7; }
.permission-summary { min-height: 42px; margin: 17px 0; color: #727a73; font-size: 11px; line-height: 1.8; }
.settings-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 15px; }
.settings-grid .wide { grid-column: span 2; }
.settings-grid .panel > label + label { margin-top: 13px; }
.mini-program-settings { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: stretch; }
.payment-qr-preview {
  display: grid;
  place-items: center;
  min-height: 220px;
  overflow: hidden;
  border: 1px dashed rgba(var(--brand-rgb),.25);
  border-radius: 16px;
  background-color: #fafbf9;
  background-image: linear-gradient(45deg, rgba(var(--brand-rgb),.05) 25%, transparent 25%), linear-gradient(-45deg, rgba(var(--brand-rgb),.05) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(var(--brand-rgb),.05) 75%), linear-gradient(-45deg, transparent 75%, rgba(var(--brand-rgb),.05) 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}
.payment-qr-preview::before { content: "未上传收款码"; color: var(--muted); font-size: 12px; font-weight: 800; }
.payment-qr-preview.has-image::before { content: ""; }
.payment-qr-preview img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 12px; background: rgba(255,255,255,.72); }
.mini-program-settings textarea { min-height: 220px; }
.maintenance-status { padding: 14px; border: 1px solid rgba(var(--brand-rgb),.10); border-radius: 16px; color: var(--muted); background: rgba(var(--brand-rgb),.05); font-size: 12px; line-height: 1.7; word-break: break-all; }
.option-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.option-grid textarea { min-height: 105px; }
.field-list { display: grid; gap: 9px; }
.field-row { display: grid; grid-template-columns: 1fr 110px 1.4fr auto auto auto; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fafbf9; }
.check { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.check input { width: auto; }
.icon-btn { border: 0; padding: 6px; color: var(--red); background: transparent; }
.save-bar { position: sticky; bottom: 14px; display: flex; align-items: center; justify-content: space-between; margin-top: 17px; padding: 13px 16px; border: 1px solid #dce1da; border-radius: 11px; color: var(--muted); background: rgba(255,255,255,.95); box-shadow: var(--shadow); font-size: 11px; }

.modal { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 22px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(17,31,24,.55); backdrop-filter: blur(3px); }
.modal-card { position: relative; overflow: auto; width: min(790px, 100%); max-height: calc(100vh - 44px); padding: 27px; border-radius: 16px; background: #fff; box-shadow: 0 30px 90px rgba(7,24,16,.32); transform: translateZ(0); backface-visibility: hidden; overscroll-behavior: contain; will-change: scroll-position; }
.modal-close { position: absolute; top: 15px; right: 16px; border: 0; color: #7d847e; background: transparent; font-size: 24px; }
.modal-title { margin: 0 0 5px; font-size: 21px; }
.modal-subtitle { margin: 0 0 24px; color: var(--muted); font-size: 12px; }
.copy-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: #fafbf9; }
.copy-box input { font-size: 12px; }
.customer-link-actions { display: flex; gap: 10px; margin-top: 12px; }
.customer-link-actions a { text-decoration: none; }
.customer-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}
.customer-detail-summary p {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid rgba(var(--brand-rgb),.10);
  border-radius: 13px;
  background: rgba(var(--brand-rgb),.035);
}
.customer-detail-summary b { color: var(--muted); font-size: 11px; }
.customer-detail-summary span { color: var(--green); font-size: 17px; font-weight: 900; }
.customer-detail-summary span.debt { color: var(--red); }
.customer-detail-list { display: grid; gap: 8px; }
.customer-detail-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.customer-detail-contact-main {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.customer-detail-contact-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.customer-detail-contact-main span { color: #4f5752; font-size: 12px; font-weight: 800; }
.customer-detail-contact em {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--green);
  background: rgba(var(--brand-rgb),.08);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}
.customer-detail-contact p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.customer-detail-muted {
  color: var(--muted);
  font-size: 12px;
}
.customer-contact-edit-list {
  display: grid;
  grid-column: 1 / -1;
  gap: 11px;
  margin-top: 14px;
}
.customer-contact-edit-list h4 {
  margin: 0;
  color: #222823;
  font-size: 14px;
}
.customer-contact-editor {
  display: grid;
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(var(--brand-rgb),.12);
  border-radius: 14px;
  background: rgba(var(--brand-rgb),.035);
}
.customer-contact-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.customer-contact-editor-head strong { font-size: 13px; }
.customer-contact-editor-head span {
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}
.customer-contact-editor .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.customer-contact-editor .span-2 { grid-column: span 2; }
.member-balance-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(var(--brand-rgb),.12);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(var(--brand-rgb),.09), rgba(255,255,255,.94));
}
.member-balance-card span { color: var(--muted); font-size: 12px; font-weight: 800; }
.member-balance-card strong { grid-row: 2; color: var(--green); font-size: 28px; }
.member-balance-card em { grid-column: 2; grid-row: 1 / span 2; align-self: center; border-radius: 999px; padding: 7px 10px; color: var(--green); background: #fff; font-style: normal; font-size: 12px; font-weight: 900; }
.member-balance-use,
.member-balance-project,
.payment-unknown-line {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 11px 14px;
  border: 1px solid rgba(var(--brand-rgb),.15);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(var(--brand-rgb),.055), rgba(255,255,255,.92));
  color: var(--text);
}
.member-balance-use input,
.member-balance-project input,
.payment-unknown-line input {
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  margin: 0;
  accent-color: var(--green);
}
.member-balance-use b,
.member-balance-project b,
.member-balance-use small,
.member-balance-project small,
.payment-unknown-line b,
.payment-unknown-line small { display: block; }
.member-balance-use b,
.member-balance-project b,
.payment-unknown-line b { font-size: 13px; line-height: 1.35; }
.member-balance-use small,
.member-balance-project small,
.payment-unknown-line small { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.member-balance-deduct {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 180px;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid rgba(var(--brand-rgb),.14);
  border-radius: 17px;
  background: rgba(var(--brand-rgb),.05);
}
.member-balance-deduct b, .member-balance-deduct span { display: block; }
.member-balance-deduct span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.member-balance-deduct input[type="number"] { width: 100%; min-height: 42px; }
.auto-payment-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(var(--brand-rgb),.12);
  border-radius: 16px;
  background: rgba(var(--brand-rgb),.045);
}
.auto-payment-summary p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 13px;
  background: #fff;
}
.auto-payment-summary span,
.auto-payment-summary b {
  display: block;
}
.auto-payment-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.auto-payment-summary b {
  margin-top: 4px;
  color: var(--ink);
  font-size: 15px;
}
.payment-history {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.payment-history-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.payment-history-head b { font-size: 14px; }
.payment-history-head span { color: var(--muted); font-size: 12px; }
.payment-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #eef0eb;
}
.payment-history-row strong,
.payment-history-row span,
.payment-history-row em {
  display: block;
}
.payment-history-row strong { color: var(--green); font-size: 15px; }
.payment-history-row span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.payment-history-row em { margin-top: 3px; color: var(--text); font-size: 12px; font-style: normal; }
.payment-history-row.reversed { opacity: .52; }
.payment-history-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.payment-history-actions small { color: var(--muted); font-size: 12px; }
.danger-text { color: #f02b3a; }
.recharge-history { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.recharge-history h4 { margin: 0 0 10px; font-size: 13px; }
.recharge-history article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; padding: 12px 0; border-top: 1px solid #eef0eb; }
.recharge-history article:first-of-type { border-top: 0; }
.recharge-history b, .recharge-history span, .recharge-history strong { display: block; }
.recharge-history b { font-size: 13px; }
.recharge-history span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.recharge-history strong { color: var(--green); font-size: 14px; }
.recharge-history p { grid-column: 1 / -1; margin: 0; color: #667068; font-size: 12px; line-height: 1.55; }
.recharge-history article .mini { grid-column: 2; justify-self: end; min-height: 28px; padding: 5px 9px; border-radius: 9px; font-size: 11px; }
.recharge-record-reversed { opacity: .58; }
.recharge-record-reversed strong { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; padding-top: 16px; border-top: 1px solid var(--line); }
.modal-actions .danger { margin-right: auto; }
.permission-box { margin-top: 17px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #fafbf9; }
.permission-box h4 { margin: 0 0 11px; font-size: 13px; }
.message-list { display: grid; gap: 10px; }
.message-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fafbf9; }
.message-item b, .message-item span, .message-item small { display: block; }
.message-item span { margin-top: 4px; color: var(--text); line-height: 1.5; }
.message-item small { margin-top: 6px; color: var(--muted); }
.check-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.export-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 14px; }
.export-box { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: rgba(250,251,249,.82); }
.export-box h4 { margin: 0 0 12px; font-size: 13px; }
.export-customer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 8px; }
.export-customer-head input { max-width: 210px; padding: 8px 10px; }
.export-field-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.export-field-head h4 { margin: 0; }
.export-check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow: auto;
  max-height: 185px;
  padding: 10px;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  background: rgba(255,255,255,.72);
}
.export-check-list.fields { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 260px; }
.export-check-list .check { overflow: hidden; min-width: 0; padding: 7px 9px; border-radius: 12px; background: rgba(var(--brand-rgb),.045); text-overflow: ellipsis; }
.export-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.export-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 13px 15px; border-radius: 16px; color: var(--green); background: rgba(var(--brand-rgb),.08); font-size: 12px; }
.export-summary strong { font-size: 14px; }
.export-zero { align-self: end; min-height: 40px; }
.file-picker { padding: 15px; border: 1px dashed #b9c8bd; border-radius: 10px; background: #f7faf8; }
.file-picker span { color: var(--muted); font-size: 11px; font-weight: 400; }
.file-picker:hover { border-color: rgba(var(--brand-rgb),.58); background: rgba(var(--brand-rgb),.045); box-shadow: 0 10px 28px rgba(25,40,31,.06), inset 0 0 0 1px rgba(var(--brand-rgb),.06); }
.file-picker:hover span { color: var(--green); }
.file-picker.dragging { border-color: var(--green); background: rgba(var(--brand-rgb),.08); box-shadow: inset 0 0 0 2px rgba(var(--brand-rgb),.12); }
.file-picker.dragging span { color: var(--green); font-weight: 700; }
.file-picker.paste-ready { border-color: rgba(var(--brand-rgb),.55); box-shadow: 0 0 0 3px rgba(var(--brand-rgb),.08); }
.file-picker.paste-ready span { color: var(--green); }
.file-picker-row { display: flex; align-items: center; gap: 12px; }
.file-picker-row .ghost { flex: 0 0 auto; }
.pending-files { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pending-file {
  position: relative;
  display: grid;
  gap: 5px;
  width: 78px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  padding: 6px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 8px 24px rgba(25,40,31,.07);
  text-align: center;
}
.pending-file img, .pending-file b { display: grid; place-items: center; width: 64px; height: 50px; border-radius: 9px; background: var(--green-2); color: var(--green); object-fit: cover; font-size: 11px; }
.pending-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.pending-file i {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  box-shadow: 0 6px 16px rgba(188,75,70,.22);
  font-style: normal;
  font-weight: 800;
}
.attachment-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.attachment-section h4 { margin: 0 0 11px; font-size: 13px; }
.attachment-empty { margin: 0; padding: 17px; border-radius: 9px; color: var(--muted); background: #f8f9f6; font-size: 11px; text-align: center; }
.attachment-list { display: grid; gap: 8px; }
.attachment-item { display: grid; grid-template-columns: 48px 1fr auto auto; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: #fafbf9; }
.attachment-item strong, .attachment-item span { display: block; min-width: 0; }
.attachment-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.attachment-item span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.attachment-preview, .attachment-icon { display: grid; place-items: center; overflow: hidden; width: 48px; height: 42px; border: 0; border-radius: 7px; background: var(--green-2); color: var(--green); font-size: 10px; font-weight: 700; }
.attachment-preview { padding: 0; cursor: zoom-in; box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb),.08); }
.attachment-preview:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(25,40,31,.10), inset 0 0 0 1px rgba(var(--brand-rgb),.18); }
.attachment-preview img { width: 100%; height: 100%; object-fit: cover; }
.attachment-item a.mini { color: #566058; text-decoration: none; }
.payment-proof-list { display: grid; gap: 10px; }
.payment-proof-card { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: #fafbf9; }
.payment-proof-img { display: block; overflow: hidden; width: 90px; height: 90px; padding: 0; border: 0; border-radius: 12px; background: var(--green-2); cursor: zoom-in; }
.payment-proof-img img { width: 100%; height: 100%; object-fit: cover; }
.payment-proof-info { min-width: 0; }
.payment-proof-info b, .payment-proof-info span, .payment-proof-info em { display: block; }
.payment-proof-info b { color: var(--green); font-size: 18px; }
.payment-proof-info span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.payment-proof-info p { margin: 7px 0; color: #59635d; font-size: 12px; line-height: 1.55; }
.payment-proof-info em { color: var(--red); font-style: normal; font-size: 11px; font-weight: 800; }
.payment-proof-info em.ok { color: var(--green); }
.image-viewer { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 28px; }
.image-viewer-backdrop { position: absolute; inset: 0; background: rgba(245,245,247,.62); backdrop-filter: blur(18px); }
.image-viewer-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1120px, calc(100vw - 56px));
  height: min(780px, calc(100vh - 56px));
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 24px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 30px 90px rgba(0,0,0,.20);
  backdrop-filter: blur(28px) saturate(170%);
}
.image-viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid rgba(0,0,0,.07); }
.image-viewer-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.image-viewer-actions { display: flex; align-items: center; gap: 8px; }
.image-viewer-actions button {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--green);
  background: rgba(255,255,255,.74);
  box-shadow: 0 8px 22px rgba(25,40,31,.08), inset 0 1px 0 rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 800;
}
.image-viewer-stage {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 24px;
  background: rgba(248,249,246,.42);
  overscroll-behavior: contain;
  cursor: grab;
  user-select: none;
}
.image-viewer-stage.dragging { cursor: grabbing; }
.image-viewer-stage img {
  display: block;
  flex: 0 0 auto;
  margin: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.switch-line { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: #fafbf9; }
.switch-line .check { color: var(--ink); }
.batch-shared { margin-bottom: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: #fafbf9; }
.batch-shared h4, .batch-project h4 { margin: 0 0 13px; }
.batch-list { display: grid; gap: 12px; }
.batch-project { position: relative; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: #fff; transform: translateZ(0); backface-visibility: hidden; }
.batch-project .remove-project { position: absolute; top: 10px; right: 10px; }
.customer-price-reference {
  display: block;
  min-height: 0;
  padding: 6px 10px;
  border: 1px solid #dbe5dd;
  border-radius: 9px;
  background: #f8fbf8;
  color: #4f5d52;
  font-size: 12px;
  line-height: 1.45;
}
.customer-price-reference.is-exact { border-color: rgba(var(--brand-rgb), .25); background: rgba(var(--brand-rgb), .055); }
.customer-price-reference.is-review { border-color: #efd9b4; background: #fffaf0; }
.customer-price-reference.is-loading { color: var(--muted); }
.customer-price-reference-details { position: relative; display: block; }
.customer-price-reference-details summary { display: flex; align-items: center; min-height: 24px; gap: 8px; list-style: none; cursor: pointer; user-select: none; }
.customer-price-reference-details summary::-webkit-details-marker { display: none; }
.customer-price-reference-title { color: var(--ink); font-weight: 800; }
.customer-price-reference-value { color: var(--green); font-size: 13px; font-weight: 900; }
.customer-price-reference-state { padding: 2px 6px; border-radius: 999px; color: #8a6d35; background: rgba(239, 217, 180, .45); font-size: 10px; font-style: normal; }
.customer-price-reference-summary-hint { margin-left: auto; padding: 3px 7px; border: 1px solid #dbe4db; border-radius: 5px; color: #617067; background: #fff; font-size: 10px; font-weight: 700; line-height: 1.2; }
.customer-price-reference-details:hover .customer-price-reference-summary-hint { border-color: rgba(var(--brand-rgb), .32); color: var(--green); }
.customer-price-reference-popover { position: absolute; top: calc(100% + 7px); left: 0; z-index: 14; display: none; width: min(390px, calc(100vw - 80px)); max-height: min(380px, 50vh); overflow: auto; padding: 10px; border: 1px solid rgba(40, 55, 45, .14); border-radius: 8px; background: #fff; box-shadow: 0 12px 28px rgba(30, 45, 36, .15); }
.customer-price-reference-details[open] .customer-price-reference-popover { display: grid; gap: 7px; }
@media (hover: hover) { .customer-price-reference-details:hover .customer-price-reference-popover { display: grid; gap: 7px; } }
.customer-price-reference-detail { color: #4f5d52; font-size: 12px; font-weight: 700; }
.customer-price-reference-history { color: var(--muted); font-size: 12px; }
.customer-price-reference-choices { display: grid; gap: 5px; }
.customer-price-reference-choice { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px; width: 100%; border: 0; border-radius: 6px; padding: 7px 8px; color: var(--ink); background: #f6f8f5; text-align: left; cursor: pointer; }
.customer-price-reference-choice:hover { background: rgba(var(--brand-rgb), .09); }
.customer-price-reference-choice b { color: var(--green); font-size: 10px; }
.customer-price-reference-choice span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.customer-price-reference-choice em { color: var(--muted); font-size: 10px; font-style: normal; }
.customer-price-reference-order { display: grid; gap: 7px; padding: 8px; border: 1px solid #e5e9e3; border-radius: 8px; background: #fbfcfa; }
.customer-price-reference-order + .customer-price-reference-order { margin-top: 7px; }
.customer-price-reference-order header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.customer-price-reference-order header div { min-width: 0; }
.customer-price-reference-order header b, .customer-price-reference-order header span { display: block; }
.customer-price-reference-order header b { color: var(--ink); font-size: 13px; }
.customer-price-reference-order header span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.customer-price-reference-order dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px 7px; margin: 0; }
.customer-price-reference-order dl div { min-width: 0; }
.customer-price-reference-order dl div:nth-child(2) { grid-column: span 3; }
.customer-price-reference-order dt { color: var(--muted); font-size: 11px; }
.customer-price-reference-order dd { overflow: hidden; margin: 1px 0 0; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.customer-price-reference-attachments > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.customer-price-reference-attachments > div { display: flex; flex-wrap: wrap; gap: 6px; }
.customer-price-reference-thumb { width: 42px; height: 42px; padding: 0; overflow: hidden; border: 1px solid #dfe6de; border-radius: 5px; background: #fff; cursor: pointer; }
.customer-price-reference-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.customer-price-reference-file { max-width: 150px; overflow: hidden; padding: 5px 7px; border-radius: 5px; color: var(--green); background: #eef7f0; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; text-decoration: none; }
.customer-price-reference-actions { display: inline-flex; flex-wrap: wrap; gap: 9px; }
.customer-price-reference .text-btn { padding: 0; font-size: 12px; }
@media (max-width: 640px) {
  .customer-price-reference-popover { width: min(360px, calc(100vw - 62px)); }
  .customer-price-reference-order dl { grid-template-columns: 1fr; }
}
.batch-sticky-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 14px;
  padding: 0;
}
.batch-sticky-bar .ghost { white-space: nowrap; }
.batch-total { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 210px; margin: 0; padding: 12px 15px; border-radius: 16px; color: #fff; background: linear-gradient(145deg, var(--brand), var(--brand-hover)); font-weight: 700; box-shadow: 0 12px 28px rgba(var(--brand-rgb),.20); }
.batch-total span { opacity: .82; }
.batch-actions { align-items: center; }
.batch-actions .batch-total { margin-right: auto; }
.print-frame { position: fixed; right: 0; bottom: 0; width: 1px; height: 1px; border: 0; opacity: 0; pointer-events: none; }
.print-preview-wrap {
  overflow: hidden;
  height: min(70vh, 780px);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 18px;
  background: linear-gradient(180deg, #eef1f3, #e8ecef);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.print-preview-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #eef1f3;
}
.modal-card.print-modal-card {
  width: min(900px, calc(100vw - 44px));
}
.print-note { color: var(--muted); font-size: 11px; }
.toast { position: fixed; z-index: 30; right: 25px; bottom: 25px; opacity: 0; transform: translateY(15px); pointer-events: none; padding: 12px 17px; border-radius: 9px; color: #fff; background: #213d31; box-shadow: var(--shadow); transition: .25s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--red); }

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .user-grid, .customer-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-grid .wide { grid-column: span 1; }
  .mini-program-settings { grid-template-columns: 1fr; }
  .option-grid { grid-template-columns: repeat(2, 1fr); }
  .quote-layout, .quote-calc-grid { grid-template-columns: 1fr; }
  .quote-admin-list { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app { display: block; }
  .sidebar { position: sticky; top: 0; z-index: 20; display: block; width: auto; padding: 10px 12px; background: rgba(255,255,255,.94); box-shadow: 0 10px 30px rgba(0,0,0,.08); backdrop-filter: blur(18px); }
  .sidebar > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; overflow: visible; }
  .logo { display: flex; align-items: center; gap: 10px; padding: 0 15px 0 0; }
  .sidebar-logo { width: 96px; }
  .mobile-menu-btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--control-border);
    border-radius: var(--control-radius);
    color: var(--ink);
    background: var(--control-bg);
  }
  .mobile-menu-btn::before {
    content: "";
    width: 17px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
  }
  .mobile-menu-btn:hover { background: var(--control-hover-bg); }
  .user-box { display: none; }
  nav {
    position: absolute;
    top: calc(100% + 6px);
    right: 12px;
    left: auto;
    width: min(220px, calc(100vw - 24px));
    display: none;
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 6px;
    max-height: calc(100vh - 140px);
    padding: 10px;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 18px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 22px 60px rgba(0,0,0,.16);
    overflow-y: auto;
  }
  .sidebar.mobile-open nav { display: grid; }
  .mobile-nav-tools {
    display: grid;
    gap: 8px;
    padding-bottom: 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(0,0,0,.08);
  }
  .mobile-nav-label {
    display: grid;
    gap: 6px;
    color: #5f6661;
    font-size: 11px;
    font-weight: 700;
  }
  .mobile-shop-switch {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--control-border);
    border-radius: 12px;
    padding: 0 10px;
    background: var(--control-bg);
    color: var(--ink);
  }
  .mobile-nav-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .mobile-nav-actions button {
    min-height: 38px;
    padding: 0 8px;
    border-radius: 12px;
    font-size: 12px;
    justify-content: center;
    text-align: center;
  }
  nav button {
    width: 100%;
    min-height: 42px;
    padding: 8px 11px;
    color: #4f5752;
    background: rgba(247,248,247,.72);
    white-space: nowrap;
  }
  nav button.active { color: #fff; background: var(--brand); }
  nav button:hover { color: var(--ink); background: rgba(var(--brand-rgb),.08); }
  nav button i { display: none; }
  .user-box { display: none; }
  main { width: 100%; }
  .topbar { position: static; flex-wrap: wrap; gap: 10px; padding: 13px 15px; }
  .top-actions { width: 100%; justify-content: flex-end; }
  #shopSwitch { display: none; }
  .sync-status, #exportBtn, #importBtn { display: none; }
  .page { padding: 15px; }
  .content-grid, .user-grid, .customer-grid { grid-template-columns: 1fr; }
  .toolbar { flex-wrap: wrap; }
  .search-wrap { flex-basis: 100%; }
  .section-intro { align-items: stretch; flex-direction: column; gap: 12px; }
  .section-search { width: 100%; }
  .customer-toolbar { width: 100%; }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .span-3 { grid-column: span 2; }
  .check-grid { grid-template-columns: repeat(2, 1fr); }
  .quote-param-editor { grid-template-columns: 1fr; }
  .quote-tier-editor { grid-template-columns: 1fr; }
  .quote-param-editor .span-4 { grid-column: span 1; }
  .export-layout { grid-template-columns: 1fr; }
  .export-check-list, .export-check-list.fields { grid-template-columns: 1fr; }
  .option-grid { grid-template-columns: 1fr; }
  .modal { padding: 0; }
  .modal-card { width: 100%; max-height: 100vh; min-height: 100vh; border-radius: 0; padding: 22px 15px; }
  .attachment-item { grid-template-columns: 42px 1fr; }
  .attachment-item .mini { justify-self: start; }
  .field-row { grid-template-columns: 1fr; }
  .batch-sticky-bar { flex-direction: column; align-items: stretch; }
  .batch-actions { flex-wrap: wrap; }
  .batch-actions .batch-total { flex: 1 1 100%; min-width: 0; }
  .batch-total { min-width: 0; }
}

@media (min-width: 560px) and (max-width: 820px) {
  .topbar {
    flex-wrap: nowrap;
    align-items: flex-end;
  }
  .top-actions {
    flex: 0 1 auto;
    width: auto;
    margin-left: 20px;
    justify-content: flex-start;
  }
}

/* Apple-like visual refresh: presentation only, no business logic changes. */
:root {
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0,0,0,.08);
  --paper: #f5f5f7;
  --white: rgba(255,255,255,.82);
  --brand: #07c160;
  --brand-hover: #06ad56;
  --brand-panel: var(--brand);
  --brand-panel-2: var(--brand-hover);
  --brand-soft: rgba(var(--brand-rgb),.10);
  --brand-rgb: 7,193,96;
  --brand-panel-rgb: var(--brand-rgb);
  --green: var(--brand);
  --green-2: var(--brand-soft);
  --orange: #ff9f0a;
  --red: #d70015;
  --shadow: 0 18px 45px rgba(0,0,0,.08);
}
body {
  background:
    radial-gradient(circle at 18% 10%, rgba(255,255,255,.9), transparent 28%),
    radial-gradient(circle at 82% 0%, rgba(218,233,226,.8), transparent 26%),
    #f5f5f7;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.primary, .ghost, .danger, .mini {
  border-radius: 14px;
  font-weight: 700;
}
.primary {
  background: linear-gradient(180deg, var(--brand), var(--brand-hover));
  box-shadow: 0 10px 24px rgba(var(--brand-rgb),.18);
}
.primary:hover { background: linear-gradient(180deg, var(--brand-panel), var(--brand-panel-2)); }
.ghost, .mini {
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(18px);
}
input, select, textarea {
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(var(--brand-rgb),.45);
  box-shadow: 0 0 0 4px rgba(var(--brand-rgb),.10);
}
.login-view {
  background: #f7f7f7;
}
.login-card, .panel, .table-card, .stat-card, .user-card, .customer-card, .modal-card, .batch-shared, .batch-project, .save-bar {
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 24px;
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}
.login-card {
  width: min(326px, calc(100vw - 40px));
  padding: 24px 0 26px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.login-card h1 { letter-spacing: 0; }
.login-card h1, .topbar h2, .modal-title {
  letter-spacing: -.04em;
}
.login-logo { width: min(220px, 100%); }
.app { grid-template-columns: 238px 1fr; }
.sidebar {
  width: 238px;
  color: #1d1d1f;
  background: rgba(255,255,255,.70);
  border-right: 1px solid rgba(0,0,0,.08);
  box-shadow: 12px 0 36px rgba(0,0,0,.04);
  backdrop-filter: blur(24px);
}
.logo strong { color: #1d1d1f; }
nav button {
  color: #6e6e73;
  border-radius: 16px;
}
nav button i {
  border-color: rgba(0,0,0,.08);
  color: var(--brand);
  background: rgba(var(--brand-rgb),.08);
}
.nav-icon img {
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
}
nav button:hover, nav button.active {
  color: #1d1d1f;
  background: rgba(var(--brand-rgb),.10);
}
.user-box {
  border-top: 1px solid rgba(0,0,0,.08);
}
.user-box span, .user-box button { color: #6e6e73; }
.avatar {
  color: #fff;
  background: linear-gradient(180deg, var(--brand), var(--brand-hover));
}
main { background: transparent; }
.topbar {
  min-height: 92px;
  border-bottom: 1px solid rgba(0,0,0,.07);
  background: rgba(245,245,247,.72);
  backdrop-filter: blur(24px);
}
.page { padding: 30px 36px 44px; }
.stat-card { min-height: 142px; }
.stat-card.accent {
  background: linear-gradient(145deg, var(--brand-panel), var(--brand-panel-2));
  box-shadow: 0 22px 50px rgba(var(--brand-rgb),.22);
}
.content-grid, .stat-grid, .user-grid, .settings-grid {
  gap: 18px;
}
.table-card { overflow: hidden; }
th {
  background: rgba(250,250,250,.88);
}
tr:hover td { background: rgba(var(--brand-rgb),.035); }
.date-picker {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 20px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 20px 60px rgba(0,0,0,.16);
  backdrop-filter: blur(22px);
}
.date-picker-head button, .date-days button {
  border-radius: 12px;
}
.modal-backdrop {
  background: rgba(245,245,247,.58);
  backdrop-filter: blur(10px);
}
.modal-card {
  box-shadow: 0 30px 90px rgba(0,0,0,.18);
}
.toast {
  border-radius: 16px;
  background: rgba(29,29,31,.86);
  backdrop-filter: blur(18px);
}
@media (max-width: 820px) {
  .app { display: block; }
  .sidebar { width: auto; }
}

#ledgerPage.active {
  display: block;
}
body.ledger-page-active {
  overflow: hidden;
}
body.ledger-page-active main {
  height: 100vh;
  overflow: hidden;
}
body.ledger-page-active #ledgerPage.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: calc(100vh - 92px);
  min-height: 0;
  overflow: hidden;
  padding-bottom: 18px;
}
body.ledger-page-active #ledgerPage .toolbar {
  flex: 0 0 auto;
  margin-bottom: 0;
}
body.ledger-page-active #ledgerPage .table-card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}
body.ledger-page-active #ledgerPage #ledgerListContent {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}
body.ledger-page-active #ledgerPage .table-summary {
  flex: 0 0 auto;
}
#ledgerPage .table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100vh - 260px);
}
body.ledger-page-active #ledgerPage .table-scroll {
  max-height: none;
  overflow: auto;
}

/* Unified visual interaction polish: CSS-only, keeps data and business logic unchanged. */
:root {
  --glass: rgba(255,255,255,.72);
  --glass-strong: rgba(255,255,255,.88);
  --hairline: rgba(0,0,0,.075);
  --focus-ring: 0 0 0 4px rgba(var(--brand-rgb),.12);
}
::selection { color: #fff; background: rgba(var(--brand-rgb),.82); }
button, .text-btn, .quote-product-card, .quote-categories button, .quote-chip, .customer-suggest-popup button, .attachment-preview {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease, opacity .18s ease;
}
button:active, .quote-product-card:active, .quote-chip:active { transform: scale(.985); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .attachment-preview:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), inset 0 1px 0 rgba(255,255,255,.72);
}
.primary, .danger {
  border: 1px solid rgba(255,255,255,.26);
  color: #fff;
}
.primary:hover {
  box-shadow: 0 16px 34px rgba(var(--brand-rgb),.26), inset 0 1px 0 rgba(255,255,255,.20);
  transform: translateY(-1px);
}
.ghost:hover, .mini:hover {
  border-color: rgba(var(--brand-rgb),.20);
  background: rgba(255,255,255,.92);
  box-shadow: 0 12px 28px rgba(25,40,31,.08), inset 0 1px 0 rgba(255,255,255,.82);
  transform: translateY(-1px);
}
.danger {
  background: linear-gradient(180deg, #ee3142, #d70015);
  box-shadow: 0 10px 24px rgba(215,0,21,.18);
}
.danger:hover { box-shadow: 0 16px 34px rgba(215,0,21,.25); transform: translateY(-1px); }
input:hover, select:hover, textarea:hover {
  border-color: rgba(var(--brand-rgb),.22);
  background: rgba(255,255,255,.92);
}
input::placeholder, textarea::placeholder { color: rgba(110,110,115,.58); }
.top-actions .ghost, .top-actions .primary {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  text-align: center;
  word-break: keep-all;
  min-height: 42px;
  border-radius: 16px;
  padding-right: 18px;
  padding-left: 18px;
}
#messageBtn { min-width: 66px; }
#exportBtn, #importBtn { min-width: 104px; }
#newEntryBtn { min-width: 112px; }
.sync-status {
  border: 1px solid rgba(67,161,116,.12);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255,255,255,.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}
.page.active { animation: pageIn .22s ease both; }
#ledgerPage.active, #customersPage.active { animation: none; }
#customersPage .customer-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 240px;
}
@keyframes pageIn {
  from { opacity: .72; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.panel, .stat-card, .user-card, .customer-card, .quote-admin-card, .quote-product-card, .table-card {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.user-card:hover, .customer-card:hover, .quote-admin-card:hover, .quote-product-card:hover {
  border-color: rgba(var(--brand-rgb),.13);
  box-shadow: 0 24px 58px rgba(25,40,31,.10);
  transform: translateY(-2px);
}
.panel:hover {
  border-color: rgba(var(--brand-rgb),.10);
  box-shadow: 0 20px 52px rgba(25,40,31,.08);
}
#quotesPage .panel:hover {
  transform: none;
}
.stat-card[data-dashboard]:hover {
  border-color: rgba(var(--brand-rgb),.14);
  box-shadow: 0 24px 58px rgba(25,40,31,.11);
}
.stat-card strong, .quote-result-card strong, .customer-stats strong, .recent-amount, td.amount {
  letter-spacing: -.03em;
}
.toolbar {
  align-items: end;
  flex-wrap: wrap;
  min-width: 0;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.70);
  border-radius: 24px;
  background: rgba(255,255,255,.56);
  box-shadow: 0 14px 42px rgba(25,40,31,.055);
  backdrop-filter: blur(20px) saturate(165%);
}
.search-wrap span {
  top: 50%;
  transform: translateY(-50%);
  color: rgba(var(--brand-rgb),.48);
}
#ledgerPage .toolbar .search-wrap {
  flex: 2 1 260px;
  min-width: 220px;
}
#ledgerPage .toolbar label {
  flex: 1 1 150px;
  width: auto;
  min-width: 140px;
  max-width: 210px;
}
#ledgerPage .toolbar #clearFilter {
  flex: 0 0 auto;
}
@media (min-width: 821px) and (max-width: 1320px) {
  .topbar {
    align-items: flex-start;
  }
  .top-actions {
    flex-basis: 100%;
    justify-content: flex-start;
  }
  #ledgerPage .toolbar {
    gap: 12px;
  }
  #ledgerPage .toolbar .search-wrap {
    flex-basis: 100%;
  }
  #ledgerPage .toolbar label {
    flex: 1 1 210px;
    max-width: none;
  }
}
@media (max-width: 640px) {
  .toolbar label,
  #ledgerPage .toolbar label,
  .search-wrap,
  #ledgerPage .toolbar .search-wrap {
    flex-basis: 100%;
    max-width: none;
  }
}
.table-card {
  border-color: rgba(255,255,255,.70);
  background: rgba(255,255,255,.76);
}
.table-summary {
  background: linear-gradient(180deg, rgba(255,255,255,.80), rgba(255,255,255,.56));
}
th {
  color: rgba(29,29,31,.64);
  backdrop-filter: blur(18px);
}
td { transition: background .16s ease, color .16s ease; }
tr:hover td {
  background: rgba(var(--brand-rgb),.045);
}
tr:hover td.sticky-actions { background: linear-gradient(90deg, rgba(247,251,249,0), rgba(247,251,249,.94) 24%, rgba(247,251,249,.98)); }
.date-trigger {
  background: rgba(255,255,255,.74);
  transition: background .16s ease, color .16s ease;
}
.date-trigger:hover { color: #5f6661; background: rgba(255,255,255,.92); }
.date-days button.selected {
  box-shadow: 0 8px 18px rgba(var(--brand-rgb),.18);
}
.modal { animation: modalFade .16s ease both; }
.modal-card {
  animation: modalPop .20s cubic-bezier(.2,.8,.2,1) both;
  border-color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.84);
}
@keyframes modalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalPop {
  from { opacity: .8; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 22px;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.modal-close:hover {
  color: var(--ink);
  background: rgba(0,0,0,.055);
  transform: rotate(90deg);
}
.modal-actions {
  position: sticky;
  bottom: -27px;
  margin-right: -27px;
  margin-left: -27px;
  padding-right: 27px;
  padding-left: 27px;
  background: linear-gradient(180deg, rgba(255,255,255,.62), rgba(255,255,255,.92));
  backdrop-filter: blur(18px);
}
input[type="checkbox"],
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  min-width: 17px;
  min-height: 17px;
  max-width: 17px;
  max-height: 17px;
  margin: 0;
  padding: 0;
  border: 1.4px solid rgba(var(--brand-rgb),.42);
  border-radius: 5px;
  background: rgba(255,255,255,.92);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.74), 0 3px 8px rgba(25,40,31,.04);
  vertical-align: middle;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
input[type="radio"] {
  border-radius: 50%;
}
input[type="checkbox"]::after,
input[type="radio"]::after {
  content: "";
  opacity: 0;
}
input[type="checkbox"]::after {
  width: 8px;
  height: 5px;
  border: 2px solid #fff;
  border-top: 0;
  border-right: 0;
  transform: translateY(-1px) rotate(-45deg);
}
input[type="radio"]::after {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
}
input[type="checkbox"]:checked,
input[type="radio"]:checked {
  border-color: rgba(var(--brand-rgb),.95);
  background: linear-gradient(135deg, var(--brand-panel), var(--brand-panel-2));
  box-shadow: 0 8px 16px rgba(var(--brand-rgb),.16), inset 0 0 0 1px rgba(255,255,255,.22);
}
input[type="checkbox"]:checked::after,
input[type="radio"]:checked::after {
  opacity: 1;
}
.check-grid .check, .export-check-list .check, .switch-line .check {
  min-height: 34px;
  border: 1px solid rgba(0,0,0,.045);
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(255,255,255,.58);
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.check-grid .check:hover, .export-check-list .check:hover, .switch-line .check:hover {
  border-color: rgba(var(--brand-rgb),.15);
  background: rgba(255,255,255,.88);
  transform: translateY(-1px);
}
.quote-categories button:hover, .quote-product-card:hover {
  border-color: rgba(var(--brand-rgb),.22);
}
.quote-chip:hover {
  border-color: rgba(var(--brand-rgb),.18);
  background: rgba(255,255,255,.88);
  box-shadow: 0 12px 26px rgba(25,40,31,.07);
}
@supports selector(.quote-chip:has(input:checked)) {
  .quote-chip:has(input:checked) {
    border-color: rgba(var(--brand-rgb),.30);
    color: var(--green);
    background: linear-gradient(145deg, rgba(var(--brand-rgb),.12), rgba(255,255,255,.86));
    box-shadow: 0 12px 28px rgba(var(--brand-rgb),.09);
  }
}
.file-picker, .smart-order-drop, .attachment-item, .pending-file, .permission-box, .export-box, .quote-rule-editor, .quote-param-editor, .quote-tier-editor {
  border-color: rgba(255,255,255,.72);
  border-radius: 20px;
  background: rgba(255,255,255,.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.70);
}
.file-picker {
  padding: 15px;
  border: 1px dashed rgba(var(--brand-rgb),.28);
  background:
    linear-gradient(180deg, rgba(var(--brand-rgb),.05), rgba(255,255,255,.58)),
    rgba(255,255,255,.58);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.smart-order-drop {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px dashed rgba(var(--brand-rgb),.28);
  background:
    linear-gradient(180deg, rgba(var(--brand-rgb),.045), rgba(255,255,255,.58)),
    rgba(255,255,255,.58);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.file-picker:hover, .file-picker.paste-ready, .file-picker.dragging,
.smart-order-drop:hover,
.smart-order-drop:focus-within,
.smart-order-drop.paste-ready {
  transform: translateY(-1px);
  border-color: rgba(var(--brand-rgb),.48);
  background:
    linear-gradient(180deg, rgba(var(--brand-rgb),.075), rgba(255,255,255,.86)),
    rgba(255,255,255,.58);
  box-shadow: 0 12px 30px rgba(var(--brand-rgb),.10), inset 0 0 0 1px rgba(var(--brand-rgb),.10);
}
.file-picker.dragging,
.smart-order-drop.dragging,
.smart-order-drop.loading {
  border-color: var(--brand);
  background: linear-gradient(135deg, rgba(var(--brand-rgb),.14), rgba(255,255,255,.90));
  box-shadow: 0 18px 42px rgba(var(--brand-rgb),.18), inset 0 0 0 2px rgba(var(--brand-rgb),.18);
  transform: translateY(-2px);
}
.smart-order-main {
  display: flex;
  align-items: center;
  gap: 10px;
}
.smart-order-main .ghost {
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.smart-order-drop:hover .smart-order-main .ghost,
.smart-order-drop.dragging .smart-order-main .ghost {
  border-color: rgba(var(--brand-rgb),.28);
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 24px rgba(var(--brand-rgb),.12);
  transform: translateY(-1px);
}
.smart-order-drop.dragging .smart-order-main .ghost {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-hover));
}
.smart-order-copy {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  transition: color .18s ease;
}
.smart-order-drop:hover .smart-order-copy,
.smart-order-drop.dragging .smart-order-copy {
  color: #4f5a53;
}
.smart-order-copy em {
  display: block;
  margin-top: 6px;
  color: #7a6a34;
  font-style: normal;
}
.smart-order-result {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}
.smart-order-result b {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--green);
  background: rgba(var(--brand-rgb),.08);
  font-size: 11px;
}
.smart-order-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--green);
  background: rgba(var(--brand-rgb),.10);
  font-size: 12px;
  font-weight: 700;
}
.smart-order-loading i {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(var(--brand-rgb),.20);
  border-top-color: var(--green);
  border-radius: 999px;
  animation: smart-spin .72s linear infinite;
}
@keyframes smart-spin {
  to { transform: rotate(360deg); }
}
.customer-suggest-popup, .date-picker, .image-viewer-card {
  border-color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.82);
  box-shadow: 0 26px 70px rgba(0,0,0,.16);
}
.customer-suggest-popup button:hover {
  color: var(--green);
  background: rgba(var(--brand-rgb),.075);
}
.toast {
  right: 28px;
  bottom: 28px;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 18px 48px rgba(0,0,0,.18);
}

/* Even border visibility for glass cards and pill controls. */
.quote-categories button,
.quote-product-card,
.quote-chip,
.quote-option-basis-row,
.quote-option-basis-row .check,
.check-grid .check,
.export-check-list .check,
.switch-line .check,
.ghost,
.mini,
input,
select,
textarea {
  border-color: rgba(var(--brand-rgb),.14);
  box-shadow:
    inset 0 0 0 1px rgba(var(--brand-rgb),.045),
    inset 0 1px 0 rgba(255,255,255,.70);
}
.quote-categories button:hover,
.quote-product-card:hover,
.quote-chip:hover,
.quote-option-basis-row .check:hover,
.check-grid .check:hover,
.export-check-list .check:hover,
.switch-line .check:hover,
.ghost:hover,
.mini:hover {
  border-color: rgba(var(--brand-rgb),.24);
  box-shadow:
    0 12px 26px rgba(25,40,31,.07),
    inset 0 0 0 1px rgba(var(--brand-rgb),.08),
    inset 0 1px 0 rgba(255,255,255,.76);
}
.quote-categories button.active,
.quote-product-card.active,
.quote-chip:has(input:checked) {
  box-shadow:
    0 10px 24px rgba(var(--brand-rgb),.16),
    inset 0 0 0 1px rgba(255,255,255,.22),
    inset 0 1px 0 rgba(255,255,255,.30);
}

/* Final hard border layer: keep all four sides equally visible on quote pills/cards. */
#quotesPage .quote-categories button,
#quotesPage .quote-product-card,
#quotesPage .quote-chip {
  border-color: transparent !important;
  background-clip: padding-box;
  box-shadow:
    inset 0 0 0 1.4px rgba(var(--brand-rgb),.22),
    0 8px 20px rgba(25,40,31,.035) !important;
}
#quotesPage .quote-categories button:hover,
#quotesPage .quote-product-card:hover,
#quotesPage .quote-chip:hover {
  box-shadow:
    inset 0 0 0 1.4px rgba(var(--brand-rgb),.32),
    0 12px 26px rgba(25,40,31,.07) !important;
}
#quotesPage .quote-categories button.active,
#quotesPage .quote-product-card.active,
#quotesPage .quote-chip:has(input:checked) {
  box-shadow:
    inset 0 0 0 1.4px rgba(var(--brand-rgb),.38),
    inset 0 0 0 999px rgba(var(--brand-rgb),.035),
    0 12px 28px rgba(var(--brand-rgb),.12) !important;
}
#quotesPage .quote-categories button.active {
  box-shadow:
    inset 0 0 0 1.4px rgba(255,255,255,.34),
    0 12px 28px rgba(var(--brand-rgb),.18) !important;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Ledger selection polish: floating bar and even checkbox borders. */
#ledgerPage .table-card {
  position: relative;
}
#ledgerPage .ledger-bulk-bar {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: auto;
  min-height: 46px;
  padding: 7px 8px 7px 14px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.82), rgba(235,247,242,.66)),
    rgba(255,255,255,.72);
  box-shadow:
    0 18px 46px rgba(var(--brand-rgb),.13),
    inset 0 1px 0 rgba(255,255,255,.88);
  backdrop-filter: blur(22px) saturate(170%);
  animation: ledgerBulkFloatIn .18s ease both;
}
#ledgerPage .ledger-bulk-bar.hidden {
  display: none;
}
#ledgerPage .ledger-bulk-bar span {
  margin: 0 6px 0 0;
  color: rgba(var(--brand-rgb),.92);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
#ledgerPage .ledger-bulk-bar .primary,
#ledgerPage .ledger-bulk-bar .ghost {
  min-height: 34px;
  padding: 8px 15px;
  border-radius: 999px;
  transform: none;
  white-space: nowrap;
}
#ledgerPage .ledger-bulk-bar .primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-hover));
  box-shadow: 0 12px 24px rgba(var(--brand-rgb),.20);
}
#ledgerPage .ledger-bulk-bar .ghost {
  color: rgba(32,34,31,.78);
  background: rgba(255,255,255,.72);
}
@keyframes ledgerBulkFloatIn {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
#ledgerPage .select-col {
  width: 42px;
  min-width: 42px;
  padding-right: 8px;
  padding-left: 8px;
  text-align: center;
  cursor: default;
}
#ledgerPage .select-col input[type="checkbox"] {
  cursor: default;
  transition: none !important;
  transform: none !important;
}
#ledgerPage #ledgerBody tr {
  user-select: none;
}
#ledgerPage #ledgerBody td {
  transition: none;
}

/* Ledger filter polish: keep utility controls neutral and visually consistent. */
#ledgerPage .toolbar .date-trigger {
  color: #8f9691;
  border-left-color: rgba(0,0,0,.08);
  background: rgba(255,255,255,.72);
}
#ledgerPage .toolbar .date-trigger:hover {
  color: #5f6661;
  background: rgba(255,255,255,.92);
}
#ledgerPage .toolbar #ledgerSortSelect {
  height: 42px;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
#ledgerPage .table-summary strong {
  color: #6e6e73;
}

/* Quote workbench refresh: practical calculator layout inspired by print quoting pages. */
#ledgerPage .toolbar #ledgerSortSelect {
  appearance: none;
  -webkit-appearance: none;
  min-height: 42px;
  padding: 10px 36px 10px 12px;
  color: #1d1d1f;
  background:
    linear-gradient(45deg, transparent 50%, #8f9691 50%) calc(100% - 18px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, #8f9691 50%, transparent 50%) calc(100% - 13px) 50% / 6px 6px no-repeat,
    rgba(255,255,255,.82);
}
.top-actions .shop-switch {
  appearance: none;
  -webkit-appearance: none;
  min-height: 42px;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 14px;
  padding: 10px 36px 10px 12px;
  color: #1d1d1f;
  background:
    linear-gradient(45deg, transparent 50%, #8f9691 50%) calc(100% - 18px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, #8f9691 50%, transparent 50%) calc(100% - 13px) 50% / 6px 6px no-repeat,
    rgba(255,255,255,.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
.top-actions .shop-switch:hover {
  border-color: rgba(var(--brand-rgb),.22);
  background:
    linear-gradient(45deg, transparent 50%, #8f9691 50%) calc(100% - 18px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, #8f9691 50%, transparent 50%) calc(100% - 13px) 50% / 6px 6px no-repeat,
    rgba(255,255,255,.92);
}
.custom-select.shop-switch,
.top-actions .custom-select.shop-switch,
.custom-select.mobile-shop-switch {
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.custom-select.shop-switch,
.top-actions .custom-select.shop-switch {
  flex: 0 0 130px;
  min-width: 130px;
  max-width: 130px;
  height: auto;
}
.toolbar label.sort-field,
#ledgerPage .toolbar label.sort-field {
  flex: 0 0 130px;
  min-width: 130px;
  max-width: 130px;
}
@media (max-width: 640px) {
  #ledgerPage .toolbar label.sort-field {
    flex-basis: 100%;
    max-width: none;
  }
}
.custom-select.shop-switch.hidden,
.custom-select.mobile-shop-switch.hidden {
  display: none;
}
#quotesPage .quote-layout {
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
}
#quotesPage .quote-catalog {
  position: sticky;
  top: 108px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255,255,255,.84);
}
#quotesPage .quote-catalog .panel-head {
  margin-bottom: 16px;
}
#quotesPage .quote-catalog .panel-head h3 {
  font-size: 18px;
}
#quotesPage .quote-categories {
  gap: 10px;
  margin-bottom: 18px;
}
#quotesPage .quote-categories button {
  min-height: 38px;
  padding: 8px 15px;
  border-radius: 999px;
  color: #4d5550;
  background: rgba(255,255,255,.74);
}
#quotesPage .quote-categories button.active {
  min-height: 42px;
  padding: 9px 18px;
  color: #fff;
  border-color: transparent !important;
  background: linear-gradient(180deg, var(--brand), var(--brand-hover));
  box-shadow: 0 12px 24px rgba(var(--brand-rgb),.20) !important;
  transform: translateY(-1px);
}
#quotesPage .quote-product-cards {
  gap: 10px;
}
#quotesPage .quote-product-card {
  grid-template-columns: 42px 1fr;
  min-height: 70px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04), 0 8px 18px rgba(25,40,31,.035) !important;
}
#quotesPage .quote-product-card.active {
  background: rgba(var(--brand-rgb),.055);
  box-shadow: inset 0 0 0 1.5px rgba(var(--brand-rgb),.34), 0 10px 22px rgba(var(--brand-rgb),.08) !important;
}
#quotesPage .quote-thumb {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--brand);
  background: var(--brand-soft) !important;
}
#quotesPage .quote-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
  min-height: 540px;
  padding: 24px;
  border-radius: 24px;
}
#quotesPage .quote-hero {
  grid-column: 1 / -1;
}
#quotesPage .quote-hero-inner {
  margin: 0;
  padding: 20px 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(var(--brand-rgb),.08), rgba(255,255,255,.82)) !important;
}
#quotesPage .quote-hero-inner h3 {
  margin-bottom: 8px;
  font-size: 22px;
  letter-spacing: 0;
}
#quotesPage .quote-hero-inner p {
  max-width: 760px;
  color: #626a65;
}
#quotesPage .quote-hero-inner span {
  color: var(--brand);
}
#quotesPage .quote-calc-grid {
  display: contents;
}
#quotesPage .quote-calc-grid > div {
  min-width: 0;
  border-radius: 22px;
}
#quotesPage .quote-calc-grid > div:first-child {
  grid-column: 1;
  padding: 4px 0 10px;
}
#quotesPage .quote-calc-grid > div:last-child {
  position: sticky;
  top: 108px;
  grid-column: 2;
  padding: 18px;
  border: 1px solid rgba(0,0,0,.06);
  background: rgba(255,255,255,.86);
  box-shadow: 0 16px 38px rgba(25,40,31,.055);
}
#quotesPage .quote-calc-grid h3 {
  position: relative;
  margin: 0 0 16px;
  padding-left: 13px;
  font-size: 17px;
}
#quotesPage .quote-calc-grid h3::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 4px;
  border-radius: 999px;
  background: var(--brand);
}
#quotesPage .quote-dynamic-form {
  gap: 14px;
}
#quotesPage .quote-param {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  min-height: 46px;
}
#quotesPage .quote-param > b {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 8px;
  color: #4f5752;
  background: rgba(0,0,0,.035);
  font-size: 13px;
}
#quotesPage .quote-option-row {
  gap: 10px 12px;
}
#quotesPage .quote-chip {
  min-width: 104px;
  min-height: 42px;
  border-radius: 8px;
  color: #515852;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.07) !important;
}
#quotesPage .quote-chip:has(input:checked) {
  color: #1d1d1f;
  background: rgba(var(--brand-rgb),.055);
  box-shadow: inset 0 0 0 1.5px rgba(var(--brand-rgb),.32), 0 8px 18px rgba(var(--brand-rgb),.07) !important;
}
#quotesPage .quote-measure-form {
  gap: 12px;
}
#quotesPage .quote-measure-form .form-grid {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
#quotesPage .quote-measure-form label {
  gap: 8px;
}
#quotesPage .quote-result-card {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 18px;
  color: var(--ink);
  background: #f8faf9;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.72), 0 12px 28px rgba(25,40,31,.055);
}
#quotesPage .quote-result-card span {
  color: #7b827d;
}
#quotesPage .quote-result-card strong {
  margin: 7px 0;
  color: var(--brand);
  font-size: 32px;
  letter-spacing: 0;
}
#quotesPage .quote-result-card p {
  color: #626a65;
  line-height: 1.65;
}
#quotesPage .quote-result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
#quotesPage .quote-result-actions .ghost,
#quotesPage .quote-result-actions .primary {
  min-height: 42px;
  border-radius: 10px;
}
#quotesPage .quote-admin {
  margin-top: 2px;
  border-radius: 24px;
}
#quotesPage .quote-admin-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#quotesPage .quote-admin-card {
  min-height: 82px;
  border-radius: 16px;
  background: #fff;
}
@media (max-width: 1250px) {
  #quotesPage .quote-layout,
  #quotesPage .quote-workbench {
    grid-template-columns: 1fr;
  }
  #quotesPage .quote-catalog,
  #quotesPage .quote-calc-grid > div:last-child {
    position: static;
  }
  #quotesPage .quote-calc-grid > div:first-child,
  #quotesPage .quote-calc-grid > div:last-child {
    grid-column: 1;
  }
}

#avatar,
#currentName {
  cursor: pointer;
}

.profile-modal-card {
  width: min(470px, calc(100vw - 28px));
  padding: 22px;
}
.profile-modal-card .modal-subtitle {
  margin-bottom: 14px;
  line-height: 1.55;
}
.profile-modal-card .modal-actions {
  bottom: -22px;
  margin: 14px -22px -22px;
  padding: 12px 22px;
}
.profile-section {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(25,40,31,.045);
}
.profile-section h4 {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--ink);
}
.profile-section + .profile-section {
  margin-top: 14px;
}
.profile-section input[readonly] {
  background: #f7f8f7;
  color: #6f766f;
}
.profile-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.profile-basic-grid,
.profile-password-grid {
  grid-template-columns: 1fr;
  gap: 10px;
}
.profile-action-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(247,250,248,.86);
  text-align: left;
  font-size: 14px;
  font-weight: 900;
}
.profile-action-btn b {
  color: #8a918c;
  font-size: 22px;
  line-height: 1;
}
.profile-action-btn.active {
  border-color: rgba(var(--brand-rgb),.24);
  color: var(--green);
  background: rgba(var(--brand-rgb),.06);
}
.profile-subdialog {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 18px;
}
.profile-subdialog-backdrop {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(245,247,246,.68);
  backdrop-filter: blur(7px);
}
.profile-subdialog-card {
  position: relative;
  width: min(390px, 100%);
  padding: 20px;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 24px 70px rgba(7,24,16,.22);
}
.profile-subdialog-card .modal-subtitle {
  margin-bottom: 14px;
}
.profile-subdialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  color: #7d847e;
  background: transparent;
  font-size: 22px;
}
.profile-subdialog-close:hover {
  color: var(--ink);
  background: rgba(0,0,0,.055);
}
.profile-action-panel {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,.06);
}
.profile-inline-head {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
}
.profile-inline-head b {
  font-size: 14px;
}
.profile-inline-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.profile-inline-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.phone-change-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
  align-items: end;
}
.phone-change-row button {
  grid-column: 1 / -1;
}
.phone-change-row button {
  min-height: 46px;
  padding: 0 12px;
  white-space: nowrap;
}
.phone-change-code input {
  text-align: center;
}
@media (max-width: 760px) {
  .phone-change-row {
    grid-template-columns: 1fr;
  }
}
