:root {
  color: #2b160d;
  background: #fff8ea;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 1100px;
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 212, 119, 0.28), transparent 30%),
    linear-gradient(180deg, #fff8ea 0%, #fff3d9 100%);
}

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

.app-shell {
  min-height: 100vh;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(124, 61, 5, 0.1);
}

.eyebrow {
  margin: 0 0 4px;
  color: #a36100;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 40px;
}

h2 {
  font-size: 20px;
  line-height: 30px;
}

.api-box {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #7c3d05;
  font-size: 13px;
  font-weight: 800;
}

.api-box input {
  width: 280px;
}

.workspace {
  padding: 28px;
}

.login-panel,
.admin-panel {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
}

.login-panel {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: center;
  min-height: 360px;
  padding: 36px;
  border: 1px solid rgba(124, 61, 5, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 28px rgba(102, 66, 15, 0.07);
}

.login-copy h2 {
  font-size: 32px;
  line-height: 42px;
}

.login-copy p {
  margin-top: 10px;
  color: #7c3d05;
  font-size: 15px;
  line-height: 24px;
}

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

.admin-panel {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.editor-pane,
.list-pane {
  border: 1px solid rgba(124, 61, 5, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(102, 66, 15, 0.06);
}

.editor-pane {
  padding: 22px;
}

.list-pane {
  min-height: 600px;
  padding: 22px;
}

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

.list-head {
  align-items: flex-start;
}

.filters {
  display: flex;
  gap: 10px;
}

.filters input {
  width: 230px;
}

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

label {
  display: grid;
  gap: 7px;
  color: #6d3a12;
  font-size: 13px;
  font-weight: 900;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(124, 61, 5, 0.16);
  border-radius: 6px;
  background: #fffdfa;
  color: #2b160d;
  outline: none;
}

input,
select {
  height: 40px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 10px 12px;
  line-height: 22px;
}

input[type="file"] {
  height: auto;
  padding: 9px 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #f3b21b;
  box-shadow: 0 0 0 3px rgba(243, 178, 27, 0.18);
}

.primary-button,
.ghost-button {
  height: 40px;
  border: 0;
  border-radius: 6px;
  font-weight: 900;
  cursor: pointer;
}

.primary-button {
  background: #ffbd00;
  color: #321900;
}

.ghost-button {
  padding: 0 14px;
  border: 1px solid rgba(124, 61, 5, 0.16);
  background: #fff9e8;
  color: #7c3d05;
}

.image-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
  align-items: center;
}

.image-preview {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 10px;
  border: 1px solid rgba(124, 61, 5, 0.1);
  border-radius: 8px;
  background: #fffdfa;
}

.image-preview img {
  width: 96px;
  height: 64px;
  border-radius: 6px;
  object-fit: cover;
}

.image-preview span {
  color: #8c5500;
  font-size: 12px;
  line-height: 18px;
}

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

.deal-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 132px;
  gap: 18px;
  align-items: start;
  padding: 16px;
  border: 1px solid rgba(124, 61, 5, 0.08);
  border-radius: 8px;
  background: #fffdfa;
}

.deal-cover {
  width: 118px;
  height: 88px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff2c5;
}

.deal-cover.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9a7a5e;
  font-size: 12px;
  font-weight: 900;
}

.deal-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.source-dot {
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: #f6b21a;
}

.deal-title {
  color: #2b160d;
  font-size: 16px;
  font-weight: 900;
  line-height: 24px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  background: #fff2c5;
  color: #8c5500;
  font-size: 12px;
  font-weight: 900;
}

.status-pill.online {
  background: #e7f8df;
  color: #4f8500;
}

.status-pill.offline {
  background: #f2f2f2;
  color: #777;
}

.deal-meta,
.deal-desc {
  margin-top: 7px;
  color: #7c3d05;
  font-size: 13px;
  line-height: 21px;
}

.deal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.deal-tag {
  padding: 3px 8px;
  border-radius: 4px;
  background: #fff2c5;
  color: #8c5500;
  font-size: 12px;
  font-weight: 800;
}

.row-actions {
  display: grid;
  gap: 8px;
  align-content: start;
}

.row-actions button {
  height: 32px;
  border: 1px solid rgba(124, 61, 5, 0.14);
  border-radius: 6px;
  background: #fff9e8;
  color: #6d3a12;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.row-actions button.danger {
  color: #b9501c;
}

.empty-state {
  padding: 72px 0;
  color: #9a7a5e;
  text-align: center;
}

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  min-width: 220px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #2b160d;
  color: #fff;
  box-shadow: 0 10px 22px rgba(43, 22, 13, 0.22);
}

.hidden {
  display: none;
}
