﻿:root {
  color-scheme: light;
  --bg: #f8f5ef;
  --card: rgba(255, 255, 255, 0.82);
  --card-solid: #ffffff;
  --text: #1f2933;
  --muted: #77808c;
  --line: rgba(31, 41, 51, 0.1);
  --accent: #8b5e34;
  --accent-dark: #6f4726;
  --accent-soft: #f0e2d2;
  --danger: #b42318;
  --shadow: 0 24px 80px rgba(96, 67, 39, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(139, 94, 52, 0.16), transparent 32rem),
    linear-gradient(135deg, #fbf8f1 0%, #f4efe7 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.auth-card {
  width: min(460px, 100%);
  margin: min(9vh, 90px) auto 0;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand-block {
  margin-bottom: 26px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1;
  letter-spacing: -0.06em;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.subtitle {
  margin-bottom: 0;
  color: var(--muted);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  margin-bottom: 22px;
  border-radius: 999px;
  background: rgba(139, 94, 52, 0.08);
}

.tab {
  border: 0;
  border-radius: 999px;
  padding: 11px 12px;
  color: var(--muted);
  background: transparent;
}

.tab.active {
  color: var(--text);
  background: var(--card-solid);
  box-shadow: 0 8px 24px rgba(96, 67, 39, 0.1);
}

.stack,
.transfer-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.78);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input:focus,
select:focus {
  border-color: rgba(139, 94, 52, 0.48);
  box-shadow: 0 0 0 4px rgba(139, 94, 52, 0.1);
  background-color: #fff;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 12px) 19px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}


.date-control {
  position: relative;
}

.date-control input[name="date"] {
  padding-right: 52px;
}

.date-picker {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 2;
  width: 46px;
  min-height: 46px;
  opacity: 0.01;
  pointer-events: auto;
}

.date-picker-btn {
  position: absolute;
  right: 4px;
  top: 4px;
  z-index: 1;
  width: 38px;
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  pointer-events: none;
  background: rgba(139, 94, 52, 0.12);
}
input[readonly] {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.primary-btn,
.ghost-btn,
.text-btn,
.danger-btn {
  border: 0;
  border-radius: 14px;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 700;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 14px 30px rgba(111, 71, 38, 0.22);
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ghost-btn,
.text-btn {
  color: var(--accent-dark);
  background: rgba(139, 94, 52, 0.1);
}

.danger-btn {
  color: var(--danger);
  background: rgba(180, 35, 24, 0.08);
}

.message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.message.error {
  color: var(--danger);
}

.app {
  display: grid;
  gap: 20px;
}

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

.account-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1.4fr;
  gap: 14px;
}

.summary-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 16px 60px rgba(96, 67, 39, 0.08);
  backdrop-filter: blur(18px);
}

.summary-card {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.summary-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.summary-card strong {
  font-size: clamp(22px, 4vw, 34px);
  letter-spacing: -0.04em;
}

.summary-card.highlight {
  color: #fff;
  background: linear-gradient(135deg, #9a6a3d, #6f4726);
}

.summary-card.highlight span {
  color: rgba(255, 255, 255, 0.76);
}

.summary-card.currencies strong {
  font-size: clamp(18px, 3vw, 26px);
  line-height: 1.3;
}

.panel {
  padding: 22px;
}

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

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

.transfer-form .wide {
  grid-column: span 2;
}

.table-wrap {
  overflow-x: auto;
}

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

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

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

td {
  font-size: 14px;
}

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

.empty-state {
  padding: 30px;
  border: 1px dashed rgba(139, 94, 52, 0.28);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.45);
}

.mobile-list {
  display: none;
}

@media (max-width: 860px) {
  .shell {
    padding: 22px 14px 34px;
  }

  .topbar,
  .account-box,
  .panel-title {
    align-items: stretch;
    flex-direction: column;
  }

  .account-box {
    padding-top: 0;
  }

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

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

  .transfer-form .wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body {
    background: linear-gradient(180deg, #fbf8f1 0%, #f3ece2 100%);
  }

  .auth-card,
  .panel,
  .summary-card {
    border-radius: 22px;
  }

  .auth-card {
    margin-top: 20px;
    padding: 24px;
  }

  h1 {
    font-size: 40px;
  }

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

  .table-wrap {
    display: none;
  }

  .mobile-list {
    display: grid;
    gap: 12px;
  }

  .mobile-item {
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.72);
  }

  .mobile-item > summary {
    list-style: none;
  }

  .mobile-item > summary::-webkit-details-marker {
    display: none;
  }

  .mobile-summary {
    display: grid;
    gap: 10px;
    padding: 14px 14px 12px;
    cursor: pointer;
  }

  .mobile-summary-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .mobile-summary-head {
    display: grid;
    gap: 4px;
  }

  .mobile-summary-date {
    font-size: 16px;
    letter-spacing: -0.02em;
  }

  .mobile-summary-route,
  .mobile-summary-bottom,
  .mobile-field span {
    color: var(--muted);
    font-size: 12px;
  }

  .mobile-summary-cny {
    font-size: 18px;
    letter-spacing: -0.03em;
    white-space: nowrap;
  }

  .mobile-summary-bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 2px;
    border-top: 1px solid rgba(31, 41, 51, 0.06);
  }

  .mobile-body {
    display: grid;
    gap: 12px;
    padding: 0 14px 14px;
  }

  .mobile-grid {
    display: grid;
    gap: 10px;
    padding-top: 2px;
  }

  .mobile-field {
    display: grid;
    gap: 4px;
  }

  .mobile-field strong {
    font-size: 14px;
    font-weight: 650;
    word-break: break-word;
  }

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

  .mobile-actions button {
    flex: 1;
  }
}








