:root {
  --bg: #151515;
  --panel: #232323;
  --ink: #f2f0eb;
  --muted: #9f9b92;
  --line: #403a2e;
  --gold: #d2af5c;
  --green: #35c978;
  --red: #ef5350;
  --blue: #2f6f9f;
  --shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  letter-spacing: 0;
}

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

button {
  border: 0;
  cursor: pointer;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
}

.auth-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: end;
  padding: 56px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(18, 21, 18, 0.28), rgba(18, 21, 18, 0.86)),
    url("https://images.unsplash.com/photo-1610375461246-83df859d849d?auto=format&fit=crop&w=1600&q=80")
      center/cover;
}

.auth-visual h1 {
  margin: 0 0 12px;
  max-width: 640px;
  font-size: clamp(38px, 5vw, 76px);
  line-height: 1;
}

.auth-visual p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.7;
}

.auth-panel {
  display: flex;
  align-items: center;
  padding: 36px;
}

.card {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-card {
  max-width: 460px;
  margin: auto;
  padding: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #1f2b22;
  color: #f2d38b;
  font-weight: 800;
}

.brand strong {
  display: block;
  font-size: 20px;
}

.brand span {
  color: var(--muted);
  font-size: 13px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  background: #1d1d1d;
  border-radius: 8px;
  margin-bottom: 18px;
}

.segmented button {
  min-height: 40px;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
}

.segmented button.active {
  color: var(--ink);
  background: #302a1d;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
}

.form-grid {
  display: grid;
  gap: 14px;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #1b1b1b;
  outline: none;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(198, 146, 40, 0.18);
}

.primary,
.secondary,
.danger,
.ghost,
.icon-btn {
  min-height: 40px;
  border-radius: 6px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.primary {
  color: #1c1710;
  background: var(--gold);
}

.secondary {
  color: #1c1710;
  background: #e2c77d;
}

.danger {
  color: #fff;
  background: var(--red);
}

.ghost,
.icon-btn {
  color: var(--ink);
  background: #303030;
}

.icon-btn {
  width: 38px;
  min-height: 38px;
  padding: 0;
}

.error {
  color: var(--red);
  min-height: 20px;
  font-size: 13px;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.nav {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.nav button {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.nav button.active {
  color: var(--ink);
  background: #f3ead3;
}

.sidebar-footer {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 10px;
}

.account-pill {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fafbf9;
  overflow: hidden;
  text-overflow: ellipsis;
}

.content {
  min-width: 0;
  padding: 24px;
}

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

.topbar h2 {
  margin: 0;
  font-size: 28px;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
}

.mobile-menu {
  display: none;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.record-form {
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.record-form {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 60;
  width: min(620px, calc(100vw - 28px));
  max-height: min(82vh, 760px);
  overflow: auto;
  transform: translate(-50%, -50%);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  border: 0;
  background: rgba(0, 0, 0, 0.58);
}

.stock-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1d1d1d;
}

.stock-selector p {
  margin: 5px 0 0;
  color: var(--muted);
}

.picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(0, 0, 0, 0.62);
}

.picker-sheet {
  width: min(620px, 100%);
  max-height: min(78vh, 720px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.picker-head,
.picker-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.picker-head h3 {
  margin: 0;
}

.picker-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.section-title h3 {
  margin: 0;
  font-size: 18px;
}

.section-title span {
  color: var(--muted);
  font-size: 13px;
}

.metric {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 24px;
}

.split-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.summary-panel h3 {
  margin: 0 0 12px;
}

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

.mini-metric {
  padding: 14px;
  background: #fafbf9;
}

.mini-metric strong {
  font-size: 20px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(330px, 420px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.panel h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-section {
  margin-top: 18px;
}

.search-field {
  width: min(520px, 100%);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--muted);
  background: #fafbf9;
  font-weight: 600;
}

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

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef1ec;
  color: var(--muted);
  font-size: 12px;
}

.badge.green {
  color: var(--green);
  background: #e1f0e8;
}

.badge.red {
  color: var(--red);
  background: #f8e5e4;
}

.photos {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.photos img {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.photos.mini {
  justify-content: flex-end;
}

.photos.mini img {
  width: 34px;
  height: 34px;
}

.photo-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 8px;
}

.photo-preview img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.empty {
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.empty.compact {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.inventory-picker {
  display: grid;
  gap: 10px;
  margin-top: 7px;
  max-height: 340px;
  overflow: auto;
}

.inventory-card {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(95px, 0.8fr) minmax(72px, 0.55fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.inventory-card:hover {
  border-color: var(--gold);
}

.inventory-card.active {
  border-color: var(--gold);
  background: #fff8e8;
  box-shadow: 0 0 0 3px rgba(198, 146, 40, 0.14);
}

.inventory-card strong,
.inventory-card b {
  display: block;
  overflow-wrap: anywhere;
}

.inventory-card em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.allocation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbf9;
}

.profit-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbf9;
}

.profit-preview span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.profit-preview strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--red);
}

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

.backup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.account-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-panel h3 {
  margin-bottom: 8px;
}

.account-panel .danger {
  white-space: nowrap;
}

.soft-list {
  display: grid;
  gap: 10px;
}

.soft-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1d1d1d;
  color: var(--ink);
}

.soft-item span {
  color: #d8d4ca;
}

.soft-item strong {
  color: var(--gold);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  max-width: min(420px, calc(100vw - 40px));
  padding: 14px 16px;
  border-radius: 8px;
  color: #fff;
  background: #1f2b22;
  box-shadow: var(--shadow);
}

.hidden {
  display: none !important;
}

.sidebar,
.panel,
.metric,
.table-wrap,
.card {
  background: var(--panel);
}

.sidebar {
  border-right-color: var(--line);
}

.brand-mark {
  background: #302719;
  color: var(--gold);
}

.nav button.active {
  color: var(--gold);
  background: #302719;
}

.account-pill,
.mini-metric,
.allocation-grid,
.profit-preview {
  background: #1d1d1d;
}

th {
  background: #1d1d1d;
}

.badge {
  background: #303030;
}

.badge.green {
  color: var(--green);
  background: rgba(53, 201, 120, 0.12);
}

.badge.red {
  color: var(--red);
  background: rgba(239, 83, 80, 0.12);
}

.inventory-card {
  background: #1d1d1d;
}

.inventory-card.active {
  border-color: var(--gold);
  background: #2c2517;
  box-shadow: 0 0 0 3px rgba(210, 175, 92, 0.14);
}

.bottom-nav {
  display: none;
}

.mobile-hero-title {
  display: none;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.compact-grid {
  margin-bottom: 14px;
}

.compact-grid .gold-card {
  min-height: 102px;
}

.grid-overview-title {
  margin-top: 2px;
}

.gold-card {
  min-height: 118px;
  display: grid;
  align-content: center;
  text-align: center;
  border-color: rgba(210, 175, 92, 0.62);
  background: linear-gradient(180deg, #272727, #222);
}

.gold-card strong {
  color: var(--gold);
  font-size: 30px;
}

.quick-panel {
  margin-bottom: 18px;
}

.gold-price-panel {
  margin-bottom: 14px;
}

.gold-price-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

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

.gold-price-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1d1d1d;
}

.gold-price-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.gold-price-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--gold);
  font-size: 20px;
}

.gold-price-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.gold-price-form button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.quick-grid button {
  min-height: 110px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 14px 8px;
  border: 1px solid #2f2f2f;
  border-radius: 6px;
  color: var(--ink);
  background: #1d1d1d;
}

.quick-grid span {
  color: #fff;
  font-size: 38px;
  line-height: 1;
}

.round-action {
  width: 42px;
  height: 42px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  background: transparent;
  font-size: 22px;
}

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

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

.inventory-card,
.allocation-grid,
.profit-preview,
.soft-item,
.mini-metric,
.account-pill {
  background: #1d1d1d !important;
  color: var(--ink);
}

.inventory-card.active {
  background: #2c2517 !important;
}

.allocation-grid input,
.profit-preview input {
  background: #151515;
  color: var(--ink);
}

.management-actions {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 14px;
  border: 1px solid #252525;
  border-radius: 8px;
  color: var(--muted);
  background: #202020;
  font-size: 24px;
}

.search-bar input {
  min-height: 54px;
  border: 0;
  background: transparent;
  font-size: 19px;
  box-shadow: none;
}

.add-wide {
  width: 100%;
  min-height: 58px;
  border-radius: 7px;
  font-size: 19px;
}

.record-list {
  display: grid;
  gap: 14px;
}

.record-card {
  padding: 18px;
  border: 1px solid #2f2f2f;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
}

.record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.record-head h3 {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
}

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

.record-head strong {
  color: var(--gold);
  font-size: 25px;
  white-space: nowrap;
}

.record-lines {
  display: grid;
  gap: 8px;
  margin: 18px 0 14px;
  color: #c9c5bc;
  font-size: 17px;
}

.record-lines p {
  margin: 0;
}

.record-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.record-actions button {
  min-width: 76px;
  min-height: 44px;
}

@media (max-width: 1100px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace,
  .backup-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 42vh;
    padding: 28px;
  }

  .auth-panel {
    padding: 18px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: min(82vw, 310px);
    transform: translateX(-102%);
    transition: transform 0.18s ease;
    box-shadow: var(--shadow);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-menu {
    display: inline-flex;
  }

  .content {
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-grid,
  .split-summary,
  .filters,
  .two,
  .allocation-grid,
  .profit-preview {
    grid-template-columns: 1fr;
  }

  .mini-metrics {
    grid-template-columns: 1fr;
  }

  .inventory-card {
    grid-template-columns: 1fr;
  }

  .photos.mini {
    justify-content: flex-start;
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar > * {
    flex: 1 1 150px;
  }
}

@media (max-width: 760px) {
  .content {
    padding: 0 10px 78px;
  }

  .topbar {
    min-height: 48px;
    padding: 8px 10px;
    margin: 0 -10px 0;
  }

  .topbar h2 {
    font-size: 20px;
  }

  .management-actions {
    gap: 8px;
    margin-bottom: 10px;
  }

  .search-bar {
    min-height: 42px;
    padding: 0 10px;
    font-size: 19px;
  }

  .search-bar input {
    min-height: 40px;
    padding: 6px 8px;
    font-size: 16px;
  }

  .add-wide {
    min-height: 44px;
    font-size: 17px;
  }

  .record-list {
    gap: 8px;
  }

  .record-card {
    padding: 12px;
    border-radius: 7px;
  }

  .record-head {
    gap: 8px;
  }

  .record-head h3 {
    font-size: 18px;
  }

  .record-head p {
    margin-top: 4px;
    font-size: 13px;
  }

  .record-head strong {
    font-size: 20px;
  }

  .record-lines {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 10px;
    margin: 10px 0 10px;
    font-size: 14px;
  }

  .record-lines p {
    overflow-wrap: anywhere;
  }

  .record-actions {
    gap: 8px;
  }

  .record-actions button {
    min-width: 58px;
    min-height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }

  .detail-section {
    margin-top: 12px;
  }

  .section-title {
    margin-bottom: 8px;
  }

  .section-title h3 {
    font-size: 16px;
  }

  .toolbar {
    gap: 8px;
    margin-bottom: 10px;
  }

  .search-field input {
    min-height: 40px;
  }

  .metric {
    padding: 12px;
  }

  .metric strong {
    margin-top: 6px;
    font-size: 20px;
  }

  .summary-grid {
    gap: 8px;
  }

  .split-summary {
    gap: 8px;
    margin-bottom: 12px;
  }

  .panel {
    padding: 12px;
  }

  .bottom-nav {
    min-height: 58px;
    padding-top: 4px;
  }

  .bottom-nav button {
    font-size: 11px;
  }

  .bottom-nav button span {
    font-size: 21px;
  }

  .record-form {
    left: 0;
    right: 0;
    top: auto;
    bottom: 58px;
    width: auto;
    max-height: calc(100vh - 96px);
    margin: 0 8px;
    padding: 12px;
    transform: none;
    border-radius: 10px 10px 8px 8px;
  }

  .stock-selector {
    padding: 10px;
  }

  .picker-backdrop {
    align-items: end;
    padding: 0 8px 68px;
  }

  .picker-sheet {
    max-height: min(72vh, 620px);
    border-radius: 10px 10px 8px 8px;
  }

  .picker-sheet .inventory-picker {
    max-height: 52vh;
  }
}

@media (max-width: 760px) {
  body {
    background: #161616;
  }

  .app-shell {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    display: none;
  }

  .content {
    padding: 0 14px 96px;
  }

  .topbar {
    min-height: 58px;
    justify-content: center;
    margin: 0 -14px 0;
    padding: 10px 14px;
    border-bottom: 1px solid #242424;
    background: #191919;
  }

  .topbar .actions,
  .topbar p,
  .mobile-menu {
    display: none;
  }

  .topbar h2 {
    color: var(--gold);
    font-size: 22px;
  }

  .page-dashboard .topbar {
    display: none;
  }

  .mobile-hero-title {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 58px;
  }

  .mobile-hero-title h2 {
    margin: 0;
    color: var(--gold);
    font-size: 23px;
    font-weight: 500;
  }

  .round-action {
    position: absolute;
    right: 0;
  }

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

  .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .gold-card {
    min-height: 92px;
    border-radius: 8px;
  }

  .gold-card strong {
    font-size: 23px;
  }

  .compact-grid .gold-card {
    min-height: 82px;
  }

  .quick-panel,
  .panel {
    border-radius: 8px;
  }

  .quick-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .quick-grid button {
    min-height: 76px;
    font-size: 13px;
  }

  .quick-grid span {
    font-size: 27px;
  }

  .gold-price-panel {
    padding: 12px;
    margin-bottom: 10px;
  }

  .gold-price-form {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .gold-price-form button {
    grid-column: 1 / -1;
    min-height: 34px;
  }

  .gold-price-form input {
    min-height: 36px;
    padding: 6px 8px;
  }

  .gold-price-grid {
    gap: 8px;
  }

  .gold-price-grid div {
    padding: 9px;
  }

  .gold-price-grid strong {
    font-size: 18px;
  }

  .dashboard-lists {
    display: none;
  }

  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    min-height: 68px;
    padding: 6px 4px max(6px, env(safe-area-inset-bottom));
    border-top: 1px solid #303030;
    background: #191919;
  }

  .bottom-nav button {
    display: grid;
    gap: 3px;
    place-items: center;
    padding: 0 2px;
    color: #b9b9b9;
    background: transparent;
    font-size: 12px;
  }

  .bottom-nav button span {
    color: currentColor;
    font-size: 24px;
    line-height: 1;
  }

  .bottom-nav button.active {
    color: var(--gold);
  }

  .split-summary,
  .summary-grid,
  .backup-grid,
  .workspace {
    gap: 12px;
  }

  .account-panel {
    padding: 14px;
  }

  .account-panel .danger {
    min-height: 38px;
    padding: 0 12px;
  }
}
