* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  background: #f4f7f5;
  color: #14231d;
}

body {
  min-height: 100vh;
}

.link-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.amazon-page {
  max-width: 1600px;
  margin: 0 auto;
}

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

.amazon-period {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.amazon-period label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #637168;
}

.amazon-period input,
.amazon-period button {
  height: 40px;
  border: 1px solid #d9e2dd;
  border-radius: 9px;
  background: white;
  padding: 0 12px;
}

.amazon-period button {
  cursor: pointer;
  color: #0f4f3f;
  font-weight: 700;
}

.amazon-period .primary-action {
  background: #0f4f3f;
  color: white;
  border-color: #0f4f3f;
}

.amazon-connection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.connection-pill {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 13px;
  border: 1px solid #dce5e0;
  background: white;
}

.connection-pill.ready { border-color: #83c9ad; background: #effaf5; }
.connection-pill.pending { border-color: #e6b746; background: #fff8e5; }
.connection-pill.neutral { background: #f1f5f3; }
.small-value { font-size: 29px; }
.status-badge { padding: 4px 8px; border-radius: 999px; font-size: 12px; }
.status-badge.success { color: #086542; background: #e6f6ef; }
.status-badge.failed { color: #9b2525; background: #fdecec; }
.status-badge.running { color: #7b5c0b; background: #fff4cf; }

@media (max-width: 900px) {
  .amazon-controls { align-items: stretch; flex-direction: column; }
  .amazon-connection-grid, .amazon-cards { grid-template-columns: 1fr; }
  .topbar { height: auto; padding: 18px; gap: 14px; flex-wrap: wrap; }
  .page { padding: 18px; }
}

.topbar {
  height: 78px;
  background: #0f4f3f;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px 0 54px;
}

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

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #efb52f;
  color: #0f4f3f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
}

.brand h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.brand p {
  margin: 4px 0 0;
  font-size: 13px;
  opacity: 0.82;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-actions select {
  background: rgba(255,255,255,0.08);
  color: white;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 10px;
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
}

.top-actions option {
  color: #222;
}

.period {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  line-height: 1.4;
}

.period span {
  opacity: 0.8;
}

.sync-btn {
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: white;
  color: #0f4f3f;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.nav {
  height: 61px;
  background: white;
  border-bottom: 1px solid #e3e9e5;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 60px;
}

.nav a {
  color: #637168;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  height: 61px;
  display: flex;
  align-items: center;
  position: relative;
}

.nav a.active {
  color: #16241e;
  font-weight: 700;
}

.nav a.active:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #16241e;
}

.page {
  padding: 26px 54px 50px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.card {
  position: relative;
  background: white;
  min-height: 184px;
  border-radius: 16px;
  padding: 34px 22px 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.card-primary {
  background: #efb52f;
}

.card-label {
  font-size: 14px;
  color: #26392f;
  margin-bottom: 10px;
}

.card-value {
  font-size: 36px;
  font-weight: 700;
  color: #07120d;
  margin-bottom: 10px;
}

.card-note {
  font-size: 14px;
  color: #526159;
}

.card-symbol {
  position: absolute;
  right: 22px;
  top: 34px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e8f2ed;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #17684e;
}

.card-primary .card-symbol {
  background: rgba(255,255,255,0.52);
  color: #22352c;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  background: white;
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.panel h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.muted {
  margin: 0;
  font-size: 13px;
  color: #67766e;
}

.chart {
  display: flex;
  margin-top: 28px;
  height: 280px;
}

.ylabels {
  width: 70px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 12px;
  color: #5c6d64;
  padding-bottom: 28px;
}

.chart-area {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.grid-line {
  height: 1px;
  background: #dfe6e2;
  width: 100%;
}

.xlabels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 12px;
  color: #4f6258;
  text-align: center;
  margin-top: 8px;
}

.check-panel {
  min-height: 350px;
}

.check-item {
  background: #f3f7f5;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 11px;
  color: #26372f;
  font-size: 14px;
}

.check-item::first-letter {
  color: #16865f;
}

.warning-box {
  margin-top: 18px;
  border: 1px solid #e6b746;
  background: #fff8e5;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.warning-box strong {
  font-size: 14px;
}

.warning-box span {
  font-size: 13px;
  color: #6c6044;
}

.warning-box .connected {
  color: #0e7753;
}

.table-panel {
  margin-bottom: 18px;
  overflow-x: auto;
}

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

.panel-title span {
  font-size: 13px;
  color: #6a7a71;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  text-align: left;
  color: #607169;
  font-weight: 600;
  background: #f4f7f5;
  padding: 11px 10px;
  border-bottom: 1px solid #dde5e1;
}

tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid #e5ebe8;
  color: #2a3b32;
}

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

.tag {
  background: #dff3ea;
  color: #137854;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
}

.tag-blue {
  background: #e3efff;
  color: #2e67aa;
}

.view-btn {
  border: 0;
  background: #daf1e6;
  color: #11734f;
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: 600;
  cursor: pointer;
}

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

.tool-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.tool-buttons button,
.settings-panel button {
  border: 0;
  background: #16243b;
  color: white;
  border-radius: 9px;
  padding: 11px 18px;
  cursor: pointer;
  font-size: 13px;
}

#out {
  margin-top: 14px;
  padding: 14px;
  background: #111d31;
  color: #f2f5fa;
  border-radius: 10px;
  min-height: 48px;
  overflow-x: auto;
  font-size: 12px;
}

.settings-panel form {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-top: 18px;
}

.settings-panel label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  color: #506058;
}

.settings-panel input {
  height: 38px;
  border: 1px solid #cad5cf;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 14px;
}

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

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

  .settings-panel form {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .topbar {
    height: auto;
    padding: 18px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .top-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .nav {
    overflow-x: auto;
    padding: 0 18px;
  }

  .page {
    padding: 18px;
  }

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

  .settings-panel form {
    grid-template-columns: 1fr;
  }
}
/* ===== 90仓登录页面 ===== */

body.login-page {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f4f43;
    font-family: Arial, "Microsoft YaHei", sans-serif;
}

.login-card {
    width: 390px;
    max-width: calc(100% - 48px);
    background: #ffffff;
    padding: 45px 42px 38px;
    border-radius: 18px;
    box-shadow: 0 20px 55px rgba(0,0,0,0.22);
    text-align: center;
}

.login-logo {
    width: 66px;
    height: 66px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: #f2b72e;
    color: #0f4f43;
    font-size: 34px;
    font-weight: bold;
}

.login-card h1 {
    margin: 0;
    color: #123f36;
    font-size: 28px;
    font-weight: 700;
}

.login-subtitle {
    margin: 8px 0 30px;
    color: #7a8985;
    font-size: 14px;
}

.login-card form {
    text-align: left;
}

.login-card label {
    display: block;
    margin-bottom: 18px;
    color: #344d47;
    font-size: 14px;
    font-weight: 600;
}

.login-card input {
    width: 100%;
    height: 48px;
    margin-top: 8px;
    padding: 0 14px;
    border: 1px solid #d5dfdc;
    border-radius: 9px;
    background: #fafcfb;
    font-size: 16px;
}

.login-card input:focus {
    outline: none;
    border-color: #176957;
    box-shadow: 0 0 0 3px rgba(23,105,87,0.12);
}

.login-card button {
    width: 100%;
    height: 50px;
    margin-top: 5px;
    border: 0;
    border-radius: 9px;
    background: #125847;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.login-card button:hover {
    background: #0d493b;
}

.login-footer {
    margin-top: 24px;
    color: #8a9693;
    font-size: 13px;
}

.login-error {
    margin: 18px 0;
    padding: 11px;
    border-radius: 8px;
    background: #fff1ee;
    color: #b33a2d;
    font-size: 14px;
}
