:root {
  --ink: #17211b;
  --muted: #68746d;
  --line: #dfe6de;
  --paper: #f7f3e9;
  --panel: #fffdf6;
  --green: #2f8d59;
  --green-soft: #dff0e4;
  --red: #c85046;
  --red-soft: #f5ddd8;
  --blue: #1f5f7a;
  --blue-soft: #dcecf2;
  --gold: #a77d2a;
  --shadow: 0 10px 30px rgba(31, 45, 37, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(242, 228, 190, 0.72), rgba(214, 233, 221, 0.76)),
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.85), transparent 32%),
    var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

button {
  font: inherit;
}

.date-chip {
  text-decoration: none;
  text-align: center;
}

.staffing-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 18px 0; padding: 17px; border: 1px solid rgba(40, 73, 54, .3); border-radius: 12px; background: linear-gradient(130deg, #e7f3e7, #f9f0d8); box-shadow: var(--shadow); }
.staffing-hero h2 { margin: 2px 0 7px; font-size: 22px; }
.staffing-hero p { margin: 0; color: #395145; font-size: 14px; line-height: 1.55; }
.staffing-kicker, .section-eyebrow { color: var(--gold) !important; font-size: 12px !important; font-weight: 900; letter-spacing: .04em; }
.staffing-badge { flex: 0 0 auto; padding: 6px 8px; border: 1px solid rgba(40, 73, 54, .24); border-radius: 99px; background: rgba(255,255,255,.6); color: #284936; font-size: 12px; font-weight: 900; }
.entry-context { display: grid; gap: 12px; }
.entry-context .section-eyebrow { margin: 0; }
.staffing-form label { display: grid; gap: 7px; font-weight: 800; }
.staffing-form label > span { color: var(--ink); }
.entry-note, .submit-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.shift-heading { margin-top: 6px; }
.shift-heading .section-eyebrow { margin: 0 0 3px; }
.shift-heading h2 { margin: 0; font-size: 18px; }
.shift-heading p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.staffing-form select, .staffing-form input {
  min-height: 46px; padding: 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #fffdf6; color: var(--ink); font: inherit;
}
.shift-stack { display: grid; gap: 10px; }
.shift-card { display: grid; gap: 8px; margin: 0; padding: 14px; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 10px; background: var(--panel); }
.shift-card legend { padding: 0 4px; font-weight: 900; font-size: 16px; }
.shift-hint { margin: 0; color: var(--muted); font-size: 13px; }
.employee-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.employee-option { display: grid; gap: 6px; }
.employee-checklist label { display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fffdf6; font-weight: 700; }
.employee-checklist input { min-height: auto; width: 17px; height: 17px; margin: 0; accent-color: var(--green); }
.person-hours { display: grid; grid-template-columns: 30px 1fr 30px; align-items: center; gap: 5px; padding: 5px 6px; border-radius: 7px; background: #edf5ec; color: #355542; font-size: 12px; font-weight: 800; }
.person-hours[hidden] { display: none; }
.person-hours input { width: 100%; min-height: 30px; padding: 3px; border: 0; border-radius: 5px; background: #fffdf6; color: var(--ink); text-align: center; font-weight: 900; }
.hours-step { min-height: 30px; border: 0; border-radius: 5px; background: #28563a; color: #fff; font-size: 18px; font-weight: 900; cursor: pointer; }
.temporary-workers { display: grid; gap: 8px; margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--line); }
.temporary-workers h3 { margin: 0; font-size: 14px; }
.temporary-workers p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.temporary-worker-list { display: grid; gap: 8px; }
.temporary-worker-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, 0.8fr) auto; gap: 7px; align-items: center; }
.temporary-worker-name { min-width: 0; min-height: 40px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: #fffdf6; color: var(--ink); font: inherit; }
.temporary-worker-row .person-hours { min-width: 0; }
.overtime-hours-list { display: grid; gap: 7px; }
.overtime-person-hours { grid-template-columns: minmax(72px, 1fr) minmax(120px, .9fr); padding: 7px 8px; }
.overtime-person-hours > .person-hours { padding: 0; background: transparent; }
.temporary-worker-add, .temporary-worker-remove { min-height: 38px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fffdf6; color: var(--green); font: inherit; font-weight: 800; cursor: pointer; }
.temporary-worker-remove { color: var(--red); }
@media (max-width: 430px) {
  .temporary-worker-row { grid-template-columns: 1fr auto; }
  .temporary-worker-row .person-hours { grid-column: 1 / -1; }
}
.form-message { min-height: 20px; margin: 0; color: var(--blue); font-weight: 800; }
.form-message.is-error { color: var(--red); }\n.form-message.is-success { color: #1a7f37; font-weight: 700; }
.submission-success-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(23, 33, 27, .48); }
.submission-success-dialog { width: min(100%, 390px); padding: 26px 22px 20px; border: 1px solid rgba(37, 91, 59, .22); border-radius: 18px; background: #fffdf6; box-shadow: 0 24px 70px rgba(18, 32, 23, .28); text-align: center; }
.submission-success-mark { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 50%; background: var(--green); color: #fff; font-size: 31px; font-weight: 900; }
.submission-success-dialog h2 { margin: 0; font-size: 23px; }
.submission-success-copy { margin: 10px 0 16px; color: #4d5c51; font-size: 14px; line-height: 1.55; }
.submission-success-detail { display: grid; gap: 7px; margin: 0; padding: 12px; border-radius: 10px; background: #edf5ec; text-align: left; }
.submission-success-detail div { display: flex; justify-content: space-between; gap: 12px; }
.submission-success-detail dt { color: var(--muted); font-size: 13px; }
.submission-success-detail dd { margin: 0; color: var(--ink); font-size: 13px; font-weight: 900; text-align: right; }
.submission-success-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }
.submission-success-actions .action { display: grid; place-items: center; min-height: 46px; text-decoration: none; }
.submission-success-actions .action:only-child { grid-column: 1 / -1; }
.clear-day-button { min-height: 42px; border: 1px solid #d87269; border-radius: 8px; background: #fff7f4; color: #af3d35; font: inherit; font-size: 13px; font-weight: 900; cursor: pointer; }
.clear-day-button:disabled { cursor: not-allowed; opacity: .45; }
.clear-confirmation-dialog { border-color: rgba(177, 61, 53, .3); }
.clear-confirmation-action { border: 0; background: #b3473f; color: #fff; font-weight: 900; }
.submission-success-copy.is-error { color: var(--red); font-weight: 800; }
.staffing-submit { width: 100%; min-height: 52px; border-radius: 10px; }
.entry-summary { margin-top: 12px; background: #f4f8f1; border-color: #c9ddcb; }
.entry-summary h2 { margin: 2px 0 7px; font-size: 16px; }
.entry-summary p { margin: 4px 0; color: #4d5c51; font-size: 14px; }
.entry-summary strong { color: #21643f; }
.expense-context { grid-template-columns: 1fr 1fr; gap: 10px; }
.expense-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 10px; }
.expense-heading .section-eyebrow { margin: 0; }
.expense-stack { display: grid; gap: 10px; }
.expense-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.expense-row-heading { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.expense-row label { display: grid; gap: 7px; font-weight: 800; }
.expense-description-label, .expense-attachment-label { grid-column: 1 / -1; }
.expense-row select, .expense-row input { width: 100%; min-height: 46px; border: 1px solid #cdd9d0; border-radius: 8px; padding: 10px; background: #fffdf7; font: inherit; }
.expense-row input[type="file"] { min-height: 42px; padding: 7px; color: var(--muted); font-size: 13px; }
.attachment-status { grid-column: 1 / -1; min-height: 18px; margin: -5px 0 0; color: #356845; font-size: 12px; font-weight: 800; }
.remove-expense { border: 0; background: transparent; color: #9b4036; font: inherit; font-size: 13px; font-weight: 800; }
.expense-summary { margin-top: 14px; }

@media (max-width: 370px) {
  .expense-context { grid-template-columns: 1fr; }
}

@media (max-width: 370px) {
  .employee-checklist { grid-template-columns: 1fr; }
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: 0;
}

.date-chip,
.role-tab {
  border: 1px solid var(--line);
  background: rgba(255, 253, 246, 0.84);
  color: var(--ink);
}

.date-chip {
  min-width: 82px;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.role-switch {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 18px 0 12px;
  padding: 4px;
  border: 1px solid rgba(223, 230, 222, 0.85);
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.62);
}

.role-tab {
  min-height: 38px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
}

.role-tab.is-active {
  border-color: #284936;
  background: #284936;
  color: #fffdf6;
}

.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.72);
  color: var(--muted);
  font-size: 13px;
}

.status-strip div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.ask-panel {
  display: grid;
  gap: 9px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(31, 95, 122, .24);
  border-radius: 12px;
  background: linear-gradient(125deg, rgba(220, 236, 242, .92), rgba(255, 253, 246, .96));
}

.ask-form { display: grid; gap: 8px; }
.ask-label { color: #1f5f7a; font-size: 14px; font-weight: 900; }
.ask-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.ask-input-row input {
  min-width: 0;
  min-height: 44px;
  padding: 10px 11px;
  border: 1px solid rgba(31, 95, 122, .3);
  border-radius: 8px;
  background: #fffdf6;
  color: var(--ink);
  font: inherit;
}
.ask-submit {
  min-width: 58px;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: #1f5f7a;
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.ask-submit:disabled { cursor: wait; opacity: .64; }
.ask-hint { margin: 0; color: #536c75; font-size: 12px; line-height: 1.45; }
.ask-examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.ask-example {
  padding: 4px 7px;
  border: 1px solid rgba(31, 95, 122, .2);
  border-radius: 99px;
  background: rgba(255, 253, 246, .76);
  color: #1f5f7a;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.ask-answer { padding: 11px; border-radius: 8px; background: rgba(255, 253, 246, .9); }
.ask-answer-title { color: #1f5f7a; font-size: 13px; font-weight: 900; }
.ask-answer-copy { margin: 6px 0 8px; color: var(--ink); font-size: 14px; line-height: 1.58; }
.ask-answer-meta { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(47, 141, 89, 0.16);
}

.screen {
  display: grid;
  gap: 12px;
  animation: page-in 240ms ease-out;
}

.hero-panel,
.panel {
  border: 1px solid rgba(213, 221, 211, 0.92);
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.88);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(40, 73, 54, 0.96), rgba(31, 95, 122, 0.88)),
    var(--panel);
  color: #fffdf6;
}

.hero-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.hero-title p,
.panel-title p {
  margin: 0;
  color: inherit;
}

.hero-title .hero-summary {
  margin-top: 7px;
  color: rgba(255, 253, 246, 0.82);
  font-size: 14px;
  font-weight: 800;
}

.hero-title small {
  color: rgba(255, 253, 246, 0.72);
  font-weight: 700;
}

.hero-number {
  font-size: 36px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}

.trend-good,
.trend-bad,
.trend-flat {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.trend-good {
  background: var(--green-soft);
  color: #176139;
}

.trend-bad {
  background: var(--red-soft);
  color: #96342e;
}

.trend-flat {
  background: var(--blue-soft);
  color: #174f68;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.metric {
  min-height: 74px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.14);
}

.metric span {
  display: block;
  color: rgba(255, 253, 246, 0.72);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 19px;
  line-height: 1.1;
}

.metric small {
  display: block;
  margin-top: 5px;
  color: rgba(255, 253, 246, 0.72);
  font-size: 11px;
  line-height: 1.25;
}

.panel {
  padding: 14px;
}

.panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-title h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.panel-title p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.rank-list,
.alert-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-item,
.alert-item {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px;
  border-radius: 8px;
  background: #f5f1e7;
}

.store-link {
  width: 100%;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.store-link:hover,
.store-link:focus-visible {
  background: #e8f1e7;
  outline: 2px solid rgba(47, 141, 89, 0.42);
  outline-offset: 2px;
}

.rank-num {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #284936;
  color: #fffdf6;
  font-size: 12px;
  font-weight: 900;
}

.rank-name,
.alert-main {
  font-weight: 900;
}

.rank-sub,
.alert-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.value,
.rank-value {
  text-align: right;
  font-weight: 900;
}

.rank-value strong,
.rank-value span {
  display: block;
}

.rank-value span {
  margin-top: 2px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.spark {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 7px;
  height: 92px;
  padding: 8px 2px 0;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.comparison-item {
  min-height: 104px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f1e7;
}

.comparison-item span,
.comparison-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.comparison-item strong {
  margin: 8px 0 7px;
}

.bar {
  min-height: 14px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #2f8d59, #1f5f7a);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.action {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f1e7;
  color: var(--ink);
  font-weight: 900;
}

.action-primary {
  border-color: #284936;
  background: #284936;
  color: #fffdf6;
  cursor: pointer;
}

.action-primary:hover,
.action-primary:focus-visible {
  background: #1f5f7a;
  outline: 2px solid rgba(31, 95, 122, 0.42);
  outline-offset: 2px;
}

.store-action-panel { border-color: rgba(47, 141, 89, .35); background: linear-gradient(125deg, rgba(223, 240, 228, .92), rgba(255, 253, 246, .95)); }
.store-action-link { display: grid; place-items: center; text-decoration: none; }
.store-daily-entry-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.daily-reminder-panel { border-color: rgba(47, 141, 89, .34); background: linear-gradient(125deg, rgba(223, 240, 228, .94), rgba(255, 253, 246, .96)); }
.daily-reminder-copy { display: grid; gap: 3px; margin: 2px 0 11px; color: #355542; font-size: 14px; line-height: 1.5; }
.daily-reminder-copy strong { color: var(--ink); font-size: 15px; }
.daily-entry-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.daily-entry-actions .action-primary { background: #284936; }
.weekly-reimbursement-link { display: block; margin-top: 10px; text-align: center; text-decoration: none; border-color: #284936; color: #fffdf6; background: #284936; }
.weekly-reimbursement-next { margin-top: 14px; }
.weekly-reimbursement-next h2 { margin: 0 0 6px; }
.weekly-reimbursement-next p { color: var(--muted); line-height: 1.6; }
.weekly-reimbursement-next .action:disabled { background: #aab4ad; border-color: #aab4ad; color: #f8faf8; cursor: not-allowed; opacity: 1; }
.weekly-reimbursement-next .action-secondary { width: 100%; min-height: 46px; border-color: #3f7d63; background: #3f7d63; color: #fffdf6; margin-bottom: 14px; }
.basket-group-title { margin: 14px 0 8px; font-size: 15px; color: #355542; }
.quota-line { margin: 6px 0 0; color: #355542; font-size: 13px; line-height: 1.5; }
.overdue-tag { display: inline-block; padding: 0 6px; border-radius: 6px; background: #fde8e4; color: #b3402a; font-size: 12px; font-weight: 800; }
.weekly-reimbursement-next .action-secondary:disabled { background: #aab4ad; border-color: #aab4ad; color: #f8faf8; cursor: not-allowed; }
.action-secondary { border-color: #284936; color: #284936; background: #fffdf6; cursor: pointer; display: grid; place-items: center; }
.modal-overlay { position: fixed; inset: 0; background: rgba(22, 30, 24, 0.48); display: grid; place-items: center; z-index: 60; padding: 24px; }
.modal-overlay[hidden] { display: none; }
.modal-card { background: #fffdf6; border-radius: 14px; padding: 24px 20px; width: min(340px, 100%); display: grid; gap: 10px; text-align: center; box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2); }
.modal-card h3 { margin: 0; }
.modal-card .modal-instance { word-break: break-all; font-weight: 800; color: #1a7f37; }
.modal-card .modal-note { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0; }
.daily-reminder-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.business-disclosure { display: block; margin-top: 12px; border: 1px solid rgba(47, 78, 60, .18); border-radius: 11px; background: rgba(255, 253, 246, .76); overflow: hidden; }
.business-disclosure > summary { position: relative; display: grid; gap: 3px; padding: 15px; color: var(--ink); cursor: pointer; list-style: none; }
.business-disclosure > summary::-webkit-details-marker { display: none; }
.business-disclosure > summary::after { content: "展开"; position: absolute; right: 16px; color: var(--blue); font-size: 12px; font-weight: 900; }
.business-disclosure[open] > summary::after { content: "收起"; }
.business-disclosure > summary span { font-size: 16px; font-weight: 900; }
.business-disclosure > summary small { color: var(--muted); font-size: 12px; }
.business-disclosure-body { display: grid; gap: 12px; padding: 0 0 12px; }
.business-disclosure-body > .hero-panel,
.business-disclosure-body > .panel { margin: 0 12px; }

.managed-store-list { display: grid; gap: 10px; }
.manager-entry-list { display: grid; gap: 9px; }
.manager-entry-card { display: grid; gap: 9px; padding: 12px; border: 1px solid rgba(47, 78, 60, .18); border-radius: 10px; background: rgba(255, 253, 246, .78); }
.manager-entry-card h3 { margin: 0; font-size: 15px; }
.manager-entry-card p { margin: 4px 0 0; font-size: 12px; font-weight: 800; }
.manager-entry-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.managed-store-card {
  padding: 13px;
  border: 1px solid rgba(47, 78, 60, 0.2);
  border-radius: 10px;
  background: linear-gradient(135deg, #fffdf6, #edf4f0);
}
.managed-store-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.managed-store-heading h3 { margin: 0; color: var(--ink); font-size: 16px; line-height: 1.35; }
.managed-store-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.managed-store-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
.managed-store-metrics > div { min-width: 0; padding: 9px; border-radius: 7px; background: rgba(36, 73, 54, 0.08); }
.managed-store-metrics span,
.managed-store-metrics small { display: block; color: var(--muted); font-size: 11px; }
.managed-store-metrics strong { display: block; margin: 5px 0 3px; color: var(--ink); font-size: 18px; line-height: 1.1; }
.managed-store-metrics small.trend-good,
.managed-store-metrics small.trend-bad,
.managed-store-metrics small.trend-flat { display: inline-flex; min-height: 0; padding: 0; background: transparent; font-size: 11px; }
.managed-store-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }

.text-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: #1f5f7a;
  font-weight: 900;
  cursor: pointer;
}

.category-list,
.product-list {
  display: grid;
  gap: 8px;
}

.category-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f1e7;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.category-item > span {
  font-weight: 900;
}

.category-item small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.category-item.is-active,
.category-item:hover,
.category-item:focus-visible {
  border-color: #2f8d59;
  background: #e8f1e7;
  outline: none;
}

.product-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  background: #f5f1e7;
}

.product-item strong,
.product-item small,
.product-value strong,
.product-value small {
  display: block;
}

.product-item small,
.product-value small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.product-value {
  min-width: 92px;
  text-align: right;
}

.data-note {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.store-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.store-picker-item {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f5f1e7;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.store-picker-item.is-active,
.store-picker-item:hover,
.store-picker-item:focus-visible {
  border-color: #2f8d59;
  background: #e8f1e7;
  outline: none;
}

.alert-item {
  grid-template-columns: 1fr auto;
}

.alert-item.is-warning {
  background: var(--red-soft);
}

.alert-item.is-info {
  background: var(--blue-soft);
}

.empty-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.market-filter-panel {
  padding: 14px;
}

.market-filter-panel .panel-title {
  margin-bottom: 10px;
}

.market-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.market-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.market-filters input,
.market-filters select {
  min-width: 0;
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf6;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 680px) {
  .app-shell {
    width: min(100%, 760px);
    padding-inline: 22px;
  }

  .screen {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }

  .hero-panel,
  .wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 360px) {
  .expense-row { grid-template-columns: 1fr; }
  .expense-row label:last-child { grid-column: auto; }
  .expense-heading { align-items: flex-start; flex-direction: column; }
  .store-daily-entry-actions { grid-template-columns: 1fr; }
  .managed-store-actions, .daily-entry-actions, .manager-entry-actions { grid-template-columns: 1fr; }
  .market-filters {
    grid-template-columns: 1fr;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 679px) {
  .expense-row { grid-template-columns: 1fr; }
  .expense-row label:last-child { grid-column: auto; }
  .expense-heading { align-items: flex-start; flex-direction: column; }
  .store-daily-entry-actions { grid-template-columns: 1fr; }
  .managed-store-actions { grid-template-columns: 1fr; }
}

/* Internal pilot login. It stays deliberately separate from dashboard cards. */
.login-body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 12% 8%, rgba(208, 152, 39, 0.22), transparent 31%),
    radial-gradient(circle at 91% 91%, rgba(47, 141, 89, 0.18), transparent 36%),
    #f5f1e7;
}

.login-shell {
  width: min(100%, 470px);
}

.login-card {
  padding: 38px 30px 30px;
  border: 1px solid rgba(35, 48, 39, 0.16);
  border-radius: 18px;
  background: rgba(255, 253, 246, 0.94);
  box-shadow: 0 22px 70px rgba(35, 48, 39, 0.16);
}

.login-card h1 {
  max-width: 360px;
  margin: 11px 0 18px;
  color: var(--ink);
  font-size: clamp(30px, 7vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.login-copy,
.login-status {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.dingtalk-login {
  width: 100%;
  min-height: 50px;
  margin: 28px 0 14px;
  border: 0;
  border-radius: 9px;
  background: #1677ff;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
}

.dingtalk-login:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.login-footnote {
  margin: 16px 0 0;
  color: #6b726a;
  text-align: center;
  font-size: 12px;
}

/* ===== 杂费申报订单卡片 + 退货详情弹窗（2026-08-28） ===== */
.expense-summary-total { margin: 4px 0 8px; color: #4a4f48; font-size: 14px; }
.expense-cards-title { margin: 12px 0 6px; font-size: 14px; color: #6b726a; }
.expense-cards { display: flex; flex-direction: column; gap: 10px; }
.expense-card {
  display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left;
  background: #fff; border: 1px solid #e4e7e2; border-radius: 12px;
  padding: 12px 14px; font: inherit; color: inherit;
}
.expense-card:hover { border-color: #bcdcc6; box-shadow: 0 2px 8px rgba(47,141,89,0.10); }
.expense-card.is-returned { opacity: 0.6; background: #f6f7f5; }
.expense-card-body { cursor: pointer; }
.expense-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.expense-card-cat { font-weight: 700; font-size: 15px; }
.expense-card-amt { font-weight: 700; color: #2f8d59; }
.expense-card-desc { margin: 4px 0 0; color: #4a4f48; font-size: 13px; word-break: break-word; }
.expense-card-time { margin: 2px 0 0; color: #9aa09a; font-size: 12px; }
.expense-card .returned-tag {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: #ffe9e9; color: #d4380d; font-size: 12px; font-weight: 700; align-self: flex-start;
}
.expense-card-return {
  width: 100%; min-height: 42px; border: 1px solid #c85046; border-radius: 8px;
  background: #fff; color: #c85046; font: inherit; font-weight: 800; cursor: pointer;
}
.expense-card-return:hover { background: #fdecea; }
.expense-card-return:active { background: #f8d9d4; }

/* 弹窗 */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,0.45); padding: 0;
}
.modal-backdrop[hidden] { display: none; }
.modal-dialog {
  width: 100%; max-width: 520px; background: #fff; border-radius: 16px 16px 0 0;
  max-height: 88vh; display: flex; flex-direction: column; overflow: hidden;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #eee; }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-close { border: 0; background: transparent; font-size: 24px; line-height: 1; color: #9aa09a; cursor: pointer; }
.modal-body { padding: 16px; overflow-y: auto; }
.modal-foot { padding: 12px 16px; border-top: 1px solid #eee; display: flex; gap: 10px; justify-content: flex-end; }
.expense-detail-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.expense-detail-cat { font-weight: 800; font-size: 16px; }
.expense-detail-amt { font-weight: 800; color: #2f8d59; }
.expense-detail-desc { margin: 4px 0; color: #4a4f48; word-break: break-word; }
.expense-detail-time { margin: 0 0 8px; color: #9aa09a; font-size: 12px; }
.expense-detail-subtitle { margin: 10px 0 6px; color: #6b726a; font-size: 13px; }
.expense-detail-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.expense-detail-receipt { width: 100%; border-radius: 8px; border: 1px solid #eee; }
.expense-detail-returned { margin: 0; color: #d4380d; font-weight: 700; }
.expense-return-label { display: block; margin: 8px 0 4px; color: #4a4f48; font-size: 13px; }
.expense-return-reason { width: 100%; border: 1px solid #d9dde8; border-radius: 10px; padding: 10px; font: inherit; resize: vertical; box-sizing: border-box; }

/* 危险操作按钮（退货）：全站统一红，与“清当天数据”一致，给足警示 */
.action-danger { border-color: #b3473f; background: #b3473f; color: #fff; cursor: pointer; }
.action-danger:hover, .action-danger:focus-visible { background: #9c3a33; outline: 2px solid rgba(179,71,63,.4); outline-offset: 2px; }
.action-danger:disabled { cursor: wait; opacity: .7; }

/* 今天 / 近7天 查看范围切换 */
.expense-range { display: flex; gap: 6px; margin: 4px 0 10px; padding: 4px; width: fit-content; border: 1px solid rgba(213,221,211,.85); border-radius: 8px; background: rgba(255,253,246,.62); }
.expense-range-btn { min-height: 34px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }
.expense-range-btn.is-active { border-color: #284936; background: #284936; color: #fffdf6; }

/* 退货表单底部按钮等宽、明确可点 */
.expense-return-foot .action { flex: 1 1 0; min-height: 46px; }
.expense-detail-return-btn { width: 100%; }

@media (min-width: 600px) {
  .modal-backdrop { align-items: center; }
  .modal-dialog { border-radius: 16px; }
}
