:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: #f4f7f6;
  color: #19211f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(30, 117, 97, 0.14), transparent 38%),
    linear-gradient(315deg, rgba(54, 105, 170, 0.13), transparent 36%),
    #f4f7f6;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.panel {
  width: min(760px, 100%);
  background: #ffffff;
  border: 1px solid #dfe8e4;
  border-radius: 8px;
  box-shadow: 0 18px 55px rgba(31, 52, 48, 0.12);
  padding: clamp(24px, 5vw, 44px);
}

.heading {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #1d755f;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.15;
}

.subhead {
  margin: 14px 0 0;
  max-width: 620px;
  color: #52605c;
  line-height: 1.7;
}

.upload-form {
  display: grid;
  gap: 20px;
}

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 28px;
  text-align: center;
  border: 2px dashed #8bb9ac;
  border-radius: 8px;
  background: #f7fbfa;
  cursor: pointer;
}

.drop-zone input {
  width: 100%;
  max-width: 380px;
  margin-bottom: 18px;
}

.drop-title {
  display: block;
  font-size: 20px;
  font-weight: 700;
}

.drop-copy {
  display: block;
  margin-top: 8px;
  color: #5d6a67;
}

.file-panel {
  border: 1px solid #d9e5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.file-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  background: #f7fbfa;
  border-bottom: 1px solid #d9e5e1;
}

.file-panel h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}

#file-summary {
  flex: 0 0 auto;
  color: #52605c;
  font-size: 14px;
}

.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 260px;
  overflow: auto;
}

.file-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 8px 14px;
  border-bottom: 1px solid #edf3f1;
}

.file-item:last-child {
  border-bottom: 0;
}

.file-order {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e7f2ef;
  color: #1d755f;
  font-size: 12px;
  font-weight: 700;
}

.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.file-size {
  color: #65726f;
  font-size: 13px;
  white-space: nowrap;
}

.remove-file {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #e2b7aa;
  border-radius: 8px;
  background: #fff6f3;
  color: #9d3f24;
  font-size: 13px;
  font-weight: 700;
}

.remove-file:hover {
  background: #ffe8df;
}

.empty-state {
  padding: 18px 14px;
  color: #65726f;
}

.options {
  display: grid;
  gap: 10px;
}

.options label {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #d9e5e1;
  border-radius: 8px;
  background: #ffffff;
}

button {
  border: 0;
  border-radius: 8px;
  min-height: 48px;
  padding: 0 22px;
  background: #1d755f;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: #17604e;
}

.alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #f1b7a1;
  border-radius: 8px;
  background: #fff2ed;
  color: #8f3b22;
}

.alert p {
  margin: 0;
}

.button-group {
  display: flex;
  gap: 12px;
}

.button-group button[type="button"] {
  background: #369;
}

.button-group button[type="button"]:hover {
  background: #2a7;
}

.reset-btn {
  background: #9d3f24 !important;
}

.reset-btn:hover {
  background: #7a2f1a !important;
}

.invoice-result {
  margin-top: 24px;
  border: 1px solid #d9e5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  background: #f7fbfa;
  border-bottom: 1px solid #d9e5e1;
}

.result-header h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}

.invoice-count {
  color: #1d755f;
  font-size: 14px;
  font-weight: 600;
}

.result-content {
  padding: 16px 14px;
}

.result-label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  color: #19211f;
}

.invoice-numbers {
  padding: 12px;
  background: #f7fbfa;
  border: 1px solid #d9e5e1;
  border-radius: 6px;
  font-size: 15px;
  line-height: 1.6;
  color: #19211f;
  word-break: break-all;
  min-height: 44px;
}

.copy-btn {
  margin-top: 12px;
  min-height: 36px;
  padding: 0 16px;
  font-size: 14px;
  background: #1d755f;
}

.copy-btn:hover {
  background: #17604e;
}

.didi-daily {
  margin-bottom: 16px;
}

.didi-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.didi-table th,
.didi-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #edf3f1;
}

.didi-table th {
  background: #f7fbfa;
  font-weight: 600;
  color: #1d755f;
}

.didi-table tr:hover {
  background: #f7fbfa;
}

.didi-table td:nth-child(3),
.didi-table td:nth-child(4) {
  font-weight: 600;
  color: #19211f;
}

.didi-total {
  padding: 12px;
  background: #f7fbfa;
  border: 1px solid #d9e5e1;
  border-radius: 6px;
  margin-bottom: 12px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 15px;
}

.total-row:not(:last-child) {
  border-bottom: 1px solid #edf3f1;
}

.total-row span:last-child {
  font-weight: 700;
  color: #1d755f;
}

.error {
  color: #9d3f24;
  padding: 8px;
  background: #fff2ed;
  border-radius: 4px;
}
