:root {
  --green-950: #10281f;
  --green-900: #12382a;
  --green-800: #194a37;
  --green-700: #23664b;
  --green-600: #2b7a58;
  --mint-100: #e7f2eb;
  --mint-50: #f3f8f5;
  --cream: #f4f1e9;
  --surface: #ffffff;
  --surface-soft: #f8faf8;
  --ink: #15221b;
  --muted: #6e7c74;
  --muted-light: #94a099;
  --line: #d9e1dc;
  --line-soft: #e9eeeb;
  --profit: #07834a;
  --profit-bg: #ddf5e7;
  --loss: #d13f36;
  --loss-bg: #fde7e4;
  --warning: #a26b18;
  --warning-bg: #fff3d6;
  --sidebar-width: 220px;
  --shadow: 0 18px 50px rgb(21 45 34 / 9%);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--cream);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 75% -10%, rgb(255 255 255 / 72%), transparent 30%),
    var(--cream);
  color: var(--ink);
  font-family:
    Inter, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.app-shell[aria-hidden="true"] {
  visibility: hidden;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  padding: 28px 18px 20px;
  color: #f3f8f5;
  background:
    linear-gradient(160deg, rgb(33 83 62 / 35%), transparent 45%),
    var(--green-950);
  box-shadow: 10px 0 35px rgb(16 40 31 / 8%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 7px 30px;
}

.brand-mark,
.login-mark {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  place-items: center;
  border-radius: 11px;
  color: #123e2c;
  background: #d3eadb;
  font-family: Georgia, "Noto Serif SC", serif;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 48%);
}

.brand strong {
  display: block;
  font-size: 16px;
  letter-spacing: 0.01em;
}

.brand small {
  display: block;
  margin-top: 5px;
  color: #7f9c8f;
  font-size: 8px;
  letter-spacing: 0.22em;
}

.main-nav {
  display: grid;
  gap: 5px;
}

.main-nav button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border: 0;
  border-radius: 9px;
  color: #9eb2a8;
  background: transparent;
  text-align: left;
  font-size: 13px;
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.main-nav button:hover {
  color: #f5faf7;
  background: rgb(255 255 255 / 6%);
}

.main-nav button.active {
  color: #fff;
  background: #2b5141;
  box-shadow:
    inset 3px 0 #99d2b0,
    0 8px 20px rgb(0 0 0 / 12%);
}

.nav-icon {
  width: 15px;
  color: #83aa98;
  text-align: center;
  font-size: 12px;
}

.main-nav button.active .nav-icon {
  color: #bde7ce;
}

.nav-count {
  min-width: 21px;
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 99px;
  color: #123b2b;
  background: #cbe9d6;
  text-align: center;
  font-size: 9px;
}

.sidebar-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 14px 10px;
  border-top: 1px solid rgb(255 255 255 / 9%);
  color: #d7e6df;
}

.sidebar-status strong,
.sidebar-status small {
  display: block;
}

.sidebar-status strong {
  font-size: 10px;
}

.sidebar-status small {
  margin-top: 3px;
  color: #789487;
  font-size: 8px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6bd397;
  box-shadow: 0 0 0 4px rgb(107 211 151 / 12%);
}

.account-card {
  display: grid;
  grid-template-columns: 33px 1fr auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin-top: 3px;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  color: #eaf4ee;
  background: transparent;
  text-align: left;
}

.account-card:hover {
  background: rgb(255 255 255 / 6%);
}

.account-card > span:nth-child(2) strong,
.account-card > span:nth-child(2) small {
  display: block;
}

.account-card > span:nth-child(2) strong {
  max-width: 105px;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
}

.account-card > span:nth-child(2) small {
  margin-top: 2px;
  color: #789487;
  font-size: 8px;
}

.account-card > b {
  color: #69887a;
  font-size: 11px;
}

.account-avatar {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border-radius: 9px;
  color: #163b2c;
  background: #cfad82;
  font-size: 11px;
  font-weight: 800;
}

.main-content {
  grid-column: 2;
  width: 100%;
  max-width: 1740px;
  min-width: 0;
  margin: 0 auto;
  padding: 34px clamp(24px, 3.3vw, 56px) 70px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--green-600);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.topbar h1 {
  margin: 0 0 7px;
  font-family: Georgia, "Noto Serif SC", "Microsoft YaHei", serif;
  font-size: clamp(27px, 3vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.page-description {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sync-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
}

.sync-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #50b47b;
  box-shadow: 0 0 0 4px rgb(80 180 123 / 10%);
}

.sync-state.loading i {
  background: #d99f3f;
}

.sync-state.error i {
  background: var(--loss);
}

.primary-button,
.secondary-button,
.danger-button {
  border-radius: 8px;
  padding: 10px 15px;
  font-size: 11px;
  font-weight: 750;
}

.primary-button {
  border: 1px solid var(--green-800);
  color: #fff;
  background: var(--green-800);
  box-shadow: 0 8px 18px rgb(25 74 55 / 17%);
}

.primary-button:hover {
  background: var(--green-700);
}

.secondary-button {
  border: 1px solid var(--line);
  color: #365047;
  background: #fff;
}

.secondary-button:hover {
  border-color: #b9c9c0;
  background: var(--mint-50);
}

.danger-button {
  border: 1px solid #efc6c2;
  color: #bb3c34;
  background: #fff6f5;
}

.danger-button:hover {
  background: #fee9e7;
}

.daily-banner,
.period-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
  margin-bottom: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgb(255 255 255 / 82%);
  box-shadow: 0 5px 18px rgb(23 49 37 / 3%);
}

.daily-banner {
  overflow: hidden;
  border-color: #cddfd4;
  background:
    radial-gradient(circle at 85% 25%, rgb(166 214 184 / 23%), transparent 28%),
    linear-gradient(100deg, #fff 0%, #f1f8f3 100%);
}

.daily-date {
  display: flex;
  align-items: center;
  gap: 14px;
}

.calendar-chip {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--green-800);
  box-shadow: 0 7px 14px rgb(25 74 55 / 18%);
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
}

.daily-date strong,
.daily-date small,
.archive-clock strong,
.archive-clock small {
  display: block;
}

.daily-date strong {
  font-size: 12px;
}

.daily-date small,
.archive-clock small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.archive-clock {
  text-align: right;
}

.archive-clock strong {
  color: var(--green-700);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.period-bar {
  font-size: 11px;
}

.period-bar b {
  color: var(--ink);
}

.period-bar span {
  color: var(--muted);
}

.period-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box,
.select-box {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #89958f;
  background: #fff;
}

.search-box input,
.select-box select {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 10px;
}

.search-box input {
  width: 190px;
}

.select-box select {
  cursor: pointer;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 16px;
}

.metric-card {
  position: relative;
  min-height: 134px;
  overflow: hidden;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 7px 22px rgb(23 49 37 / 3%);
}

.metric-card.featured {
  border-color: #214837;
  color: #fff;
  background:
    radial-gradient(circle at 90% 15%, rgb(140 201 165 / 22%), transparent 35%),
    #214837;
}

.metric-card > span {
  color: #7a8880;
  font-size: 10px;
}

.metric-card.featured > span {
  color: #b9cec4;
}

.metric-card > strong {
  display: block;
  margin: 13px 0 8px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(21px, 2.4vw, 28px);
  letter-spacing: -0.035em;
}

.metric-card > small {
  color: #909b95;
  font-size: 9px;
}

.metric-card.featured > small {
  color: #a9c0b5;
}

.metric-accent {
  position: absolute;
  top: 17px;
  right: 17px;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 8px;
  color: var(--green-700);
  background: var(--mint-100);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.featured .metric-accent {
  color: #d3eadc;
  background: rgb(255 255 255 / 9%);
}

.profit {
  color: var(--profit) !important;
}

.loss {
  color: var(--loss) !important;
}

.neutral {
  color: var(--muted) !important;
}

.notice {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
  padding: 12px 15px;
  border: 1px solid #d4e5da;
  border-radius: 9px;
  color: #557166;
  background: #eef6f0;
  font-size: 10px;
}

.notice b {
  color: var(--green-700);
}

.notice-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 50%;
  color: var(--green-700);
  background: #d8ecdf;
  font-size: 11px;
}

.panel {
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 10px 28px rgb(21 45 34 / 4%);
}

.panel-head {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 13px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-head h2 {
  margin: 0 0 4px;
  font-family: Georgia, "Noto Serif SC", "Microsoft YaHei", serif;
  font-size: 17px;
  letter-spacing: -0.015em;
}

.panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  scrollbar-color: #a8b1ac #eef1ef;
  scrollbar-width: thin;
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 10px;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 11px 10px;
  border-bottom: 1px solid #b9cdbf;
  color: #2f493c;
  background: #eaf3e7;
  text-align: left;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 760;
}

td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line-soft);
  color: #58675f;
  background: #fff;
  white-space: nowrap;
  transition: background 120ms ease;
}

tbody tr:hover td {
  background: #f8faf8;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td b {
  color: #203028;
}

td small {
  display: block;
  margin-top: 3px;
  color: #96a19b;
  font-size: 8px;
}

.operator-cell {
  min-width: 94px;
}

.platform-tag,
.status-pill,
.archive-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  font-weight: 750;
}

.platform-tag {
  min-width: 64px;
  padding: 4px 8px;
  border: 0;
  color: #385045;
  background: #edf2ef;
}

button.platform-tag:hover {
  color: var(--green-700);
  background: #dfeae4;
  box-shadow: inset 0 0 0 1px #c6d7cd;
}

.status-pill {
  min-width: 42px;
  padding: 4px 9px;
}

.status-pill.profit {
  background: var(--profit-bg);
}

.status-pill.loss {
  background: var(--loss-bg);
}

.archive-pill {
  gap: 5px;
  padding: 5px 9px;
  color: #566c61;
  background: #edf2ef;
  font-size: 8px;
}

.archive-pill.today {
  color: var(--warning);
  background: var(--warning-bg);
}

.group-start td {
  border-top: 1px solid #cbd9d0;
}

.merged-cell {
  vertical-align: middle;
  border-right: 1px solid #dce5df;
  background: #fafcfa;
}

.daily-profit-cell {
  min-width: 105px;
  text-align: center;
}

.daily-profit-cell b {
  font-size: 11px;
}

.finance-table-wrap {
  max-height: min(70vh, 850px);
}

.finance-ledger {
  min-width: 1440px;
  table-layout: fixed;
  color: #23372d;
  font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
}

.finance-ledger .col-date {
  width: 105px;
}

.finance-ledger .col-region {
  width: 82px;
}

.finance-ledger .col-operator {
  width: 92px;
}

.finance-ledger .col-platform {
  width: 94px;
}

.finance-ledger .col-money {
  width: 92px;
}

.finance-ledger .col-orders,
.finance-ledger .col-ratio {
  width: 62px;
}

.finance-ledger .col-aov {
  width: 88px;
}

.finance-ledger .col-profit {
  width: 96px;
}

.finance-ledger .col-net {
  width: 104px;
}

.finance-ledger .col-status {
  width: 86px;
}

.finance-ledger .col-daily,
.finance-ledger .col-region-daily {
  width: 125px;
}

.finance-ledger .col-note {
  width: 140px;
}

.finance-ledger th,
.finance-ledger td {
  height: 48px;
  padding: 8px 10px;
  border-right: 1px solid #cddbd2;
  border-bottom: 1px solid #cddbd2;
  text-align: center;
}

.finance-ledger th {
  z-index: 4;
  height: 42px;
  border-bottom: 2px solid #94b5a2;
  color: #183b2c;
  background: #e7f1e4;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 10px;
}

.finance-ledger td:first-child,
.finance-ledger th:first-child {
  border-left: 0;
}

.finance-ledger td:last-child,
.finance-ledger th:last-child {
  border-right: 0;
}

.finance-ledger tbody tr:hover td:not(.merged-cell) {
  background: #f5f9f6;
}

.finance-ledger .merged-cell {
  vertical-align: middle;
  background: #fbfcfb;
}

.finance-ledger .date-cell {
  color: #30453a;
  font-size: 10px;
  font-weight: 450;
}

.finance-ledger .region-cell b,
.finance-ledger .operator-cell b {
  color: #0f261c;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.finance-ledger .grouped-profit b {
  color: currentColor;
  font-size: 11px;
}

.finance-ledger .grouped-profit small {
  color: #78887f;
}

.finance-ledger .note-cell {
  overflow: hidden;
  color: #405249;
  text-overflow: ellipsis;
}

.finance-ledger .region-start td {
  border-top: 1px solid #a9c0b2;
}

.finance-ledger .operator-start td {
  border-top-color: #c3d3c9;
}

.finance-ledger .date-start td {
  border-top: 2px solid #86a994;
}

.finance-ledger .day-total-row td {
  position: sticky;
  bottom: 0;
  z-index: 3;
  height: 50px;
  border-top: 2px solid #668c76;
  border-bottom: 0;
  color: #153627;
  background: #dfecd9;
  font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
  font-weight: 700;
}

.finance-ledger .day-total-row td:first-child {
  z-index: 4;
}

.finance-ledger .day-total-label {
  padding-left: 25px;
  text-align: left;
}

.finance-ledger .day-total-label b {
  display: block;
  color: #123526;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 11px;
}

.finance-ledger .day-total-label small {
  margin-top: 2px;
  color: #698174;
  font-size: 8px;
}

.action-button {
  border: 0;
  color: var(--green-700);
  background: transparent;
  font-size: 9px;
  font-weight: 750;
}

.action-button:hover {
  text-decoration: underline;
}

.empty-state {
  display: grid;
  min-height: 210px;
  place-items: center;
  padding: 30px;
  text-align: center;
}

.empty-state .empty-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  place-items: center;
  border-radius: 14px;
  color: var(--green-700);
  background: var(--mint-100);
  font-size: 17px;
}

.empty-state h3 {
  margin: 0 0 6px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 15px;
}

.empty-state p {
  max-width: 340px;
  margin: 0 auto 15px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.loading-state {
  display: grid;
  min-height: 280px;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
}

.loading-state::before {
  width: 24px;
  height: 24px;
  margin: 0 auto 10px;
  border: 2px solid #dbe5df;
  border-top-color: var(--green-700);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  content: "";
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.entry-dialog {
  width: min(820px, calc(100% - 30px));
  max-height: calc(100vh - 34px);
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: 16px;
  color: var(--ink);
  background: #fbfcfb;
  box-shadow: 0 30px 90px rgb(9 30 21 / 36%);
}

.entry-dialog::backdrop {
  background: rgb(8 26 18 / 65%);
  backdrop-filter: blur(3px);
}

.entry-dialog form {
  padding: 24px;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.dialog-head h2 {
  margin: 0 0 5px;
  font-family: Georgia, "Noto Serif SC", "Microsoft YaHei", serif;
  font-size: 23px;
  letter-spacing: -0.025em;
}

.dialog-head p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.icon-button {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #5f6d66;
  background: #edf1ef;
  font-size: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.form-grid label,
.note-field,
.platform-row label {
  color: #46574e;
  font-size: 9px;
  font-weight: 750;
}

.form-grid input,
.form-grid textarea,
.note-field textarea,
.platform-row input,
.platform-row select {
  display: block;
  width: 100%;
  min-height: 38px;
  margin-top: 6px;
  padding: 9px 10px;
  border: 1px solid #d7e0db;
  border-radius: 7px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font-size: 10px;
  font-weight: 450;
}

.form-grid input:focus,
.form-grid textarea:focus,
.note-field textarea:focus,
.platform-row input:focus,
.platform-row select:focus {
  border-color: #5a8d73;
  box-shadow: 0 0 0 3px rgb(90 141 115 / 11%);
}

.form-grid input:disabled {
  color: #5d6e65;
  background: #f0f3f1;
}

.form-grid label > small {
  display: block;
  margin-top: 5px;
  color: var(--muted-light);
  font-size: 8px;
  font-weight: 450;
}

.platform-section {
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 10px;
}

.section-label strong,
.section-label small {
  display: block;
}

.section-label strong {
  font-size: 10px;
}

.section-label small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.platform-list {
  display: grid;
  gap: 8px;
}

.platform-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 0.8fr 34px;
  gap: 9px;
  align-items: end;
  padding: 11px;
  border: 1px solid #dce5df;
  border-radius: 9px;
  background: #f4f8f5;
}

.remove-platform {
  display: grid;
  width: 34px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #b6423a;
  background: #fde8e5;
  font-size: 16px;
}

.remove-platform:disabled {
  visibility: hidden;
}

.note-field {
  display: block;
  margin-top: 14px;
}

.note-field textarea,
.form-grid textarea {
  min-height: 66px;
  resize: vertical;
}

.fixed-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-span {
  grid-column: 1 / -1;
}

.form-error {
  min-height: 14px;
  margin: 10px 0 0;
  color: var(--loss);
  font-size: 9px;
}

.dialog-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 9px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 23% 16%, rgb(111 169 136 / 16%), transparent 28%),
    radial-gradient(circle at 83% 80%, rgb(199 171 127 / 16%), transparent 27%),
    #eef2ed;
}

.login-screen.hidden {
  display: none;
}

.login-card {
  width: min(390px, 100%);
  padding: 31px;
  border: 1px solid #d7e2db;
  border-radius: 17px;
  background: rgb(255 255 255 / 94%);
  box-shadow: var(--shadow);
}

.login-card .login-mark {
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
}

.login-card h1 {
  margin: 0 0 7px;
  font-family: Georgia, "Noto Serif SC", "Microsoft YaHei", serif;
  font-size: 23px;
}

.login-copy {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 10px;
}

.login-card label {
  display: block;
  margin-top: 12px;
  color: #4a5c52;
  font-size: 9px;
  font-weight: 750;
}

.login-card input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid #d6e0da;
  border-radius: 8px;
  outline: 0;
  font-size: 11px;
}

.login-card input:focus {
  border-color: #56876f;
  box-shadow: 0 0 0 3px rgb(86 135 111 / 11%);
}

.login-button {
  width: 100%;
  margin-top: 2px;
  padding: 11px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  max-width: min(360px, calc(100% - 44px));
  padding: 11px 14px;
  border-radius: 9px;
  color: #fff;
  background: #1f4938;
  box-shadow: 0 12px 35px rgb(9 30 21 / 25%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(9px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  font-size: 10px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: #9f332d;
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 78px;
  }

  .sidebar {
    padding-inline: 12px;
  }

  .brand {
    justify-content: center;
    padding-inline: 0;
  }

  .brand > div,
  .main-nav button > span:not(.nav-icon),
  .nav-count,
  .sidebar-status > div,
  .account-card > span:nth-child(2),
  .account-card > b {
    display: none;
  }

  .main-nav button {
    justify-content: center;
    padding: 13px;
  }

  .nav-icon {
    width: auto;
    font-size: 14px;
  }

  .sidebar-status {
    justify-content: center;
  }

  .account-card {
    display: flex;
    justify-content: center;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
    padding-bottom: 66px;
  }

  .sidebar {
    inset: auto 0 0;
    width: 100%;
    height: 64px;
    padding: 7px 10px;
    flex-direction: row;
    align-items: center;
    border-top: 1px solid rgb(255 255 255 / 10%);
  }

  .brand,
  .sidebar-status,
  .account-card {
    display: none;
  }

  .main-nav {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
  }

  .main-nav button {
    display: grid;
    gap: 2px;
    justify-items: center;
    padding: 7px 3px;
    font-size: 8px;
  }

  .main-nav button > span:not(.nav-icon) {
    display: block;
  }

  .main-nav button.active {
    box-shadow: inset 0 2px #99d2b0;
  }

  .nav-icon {
    font-size: 11px;
  }

  .main-content {
    padding: 22px 14px 35px;
  }

  .topbar {
    align-items: flex-end;
    margin-bottom: 18px;
  }

  .page-description,
  .sync-state {
    display: none;
  }

  .primary-button,
  .secondary-button,
  .danger-button {
    padding: 9px 11px;
  }

  .daily-banner,
  .period-bar {
    align-items: flex-start;
  }

  .period-bar {
    flex-direction: column;
  }

  .period-controls {
    width: 100%;
    flex-wrap: wrap;
  }

  .search-box {
    flex: 1;
  }

  .search-box input {
    width: 100%;
  }

  .form-grid,
  .fixed-form-grid {
    grid-template-columns: 1fr;
  }

  .form-span {
    grid-column: auto;
  }

  .platform-row {
    grid-template-columns: 1fr 1fr;
  }

  .remove-platform {
    width: 100%;
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .metrics {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 112px;
  }

  .archive-clock small {
    max-width: 130px;
  }

  .entry-dialog form {
    padding: 19px;
  }

  .dialog-actions {
    grid-template-columns: 1fr 1fr;
  }

  .dialog-actions > span {
    display: none;
  }

  .dialog-actions button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
