﻿:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  background: #eef3f8;
  color: #1e293b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

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

button {
  border: 0;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  padding: 10px 14px;
}

button.secondary {
  background: #64748b;
}

button.danger {
  background: #dc2626;
}

button.danger.ban {
  background: #ef4444;
}

button.danger.delete {
  background: #991b1b;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

input,
select,
textarea {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 12px;
  width: 100%;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  outline: none;
}

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

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

.login-panel {
  max-width: 420px;
  margin: 80px auto;
  padding: 30px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

.login-panel form,
.form-grid,
.filter-form {
  display: grid;
  gap: 12px;
}

.app-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
  min-height: calc(100vh - 36px);
}

.sidebar {
  position: sticky;
  top: 18px;
  align-self: start;
  height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

.brand h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.brand p {
  margin: 8px 0 0;
  color: #64748b;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.nav-item,
.logout-button {
  width: 100%;
  text-align: left;
}

.nav-item {
  background: #f1f5f9;
  color: #334155;
}

.nav-item.active {
  background: #2563eb;
  color: #fff;
}

.logout-button {
  margin-top: auto;
  background: #64748b;
}

.content-area {
  min-width: 0;
}

.tab-panel {
  display: none;
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

.tab-panel.active {
  display: block;
}

.page-head {
  margin-bottom: 18px;
}

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

.page-head h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.page-head p {
  max-width: 850px;
  margin: 0;
  color: #64748b;
  line-height: 1.7;
}

.form-grid.two {
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
}

.info-strip {
  margin: 16px 0;
  padding: 12px 14px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  line-height: 1.7;
}

.filter-form {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  align-items: center;
  margin: 12px 0 16px;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  white-space: nowrap;
}

.checkline input {
  width: auto;
}

.table {
  overflow-x: auto;
}

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

th,
td {
  border-bottom: 1px solid #e2e8f0;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #475569;
  font-size: 13px;
  background: #f8fafc;
}

small {
  color: #64748b;
}

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

.status {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-active {
  background: #dcfce7;
  color: #166534;
}

.status-new {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-banned {
  background: #fee2e2;
  color: #b91c1c;
}

.status-used_up {
  background: #fef3c7;
  color: #92400e;
}

.status-expired {
  background: #ffedd5;
  color: #c2410c;
}

.status-deleted {
  background: #e5e7eb;
  color: #4b5563;
}


.result-actions {
  margin: 14px 0 10px;
}

.batch-detail {
  display: grid;
  gap: 10px;
  margin: 12px 0 16px;
  padding: 14px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
}

.batch-detail strong {
  margin-right: 10px;
}

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

.summary-grid span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.settings-form {
  max-width: 520px;
}

.muted {
  color: #94a3b8;
  background: #f8fafc;
}

.hidden {
  display: none;
}

pre {
  overflow: auto;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 14px;
  min-height: 120px;
}

@media (max-width: 980px) {
  .shell {
    padding: 12px;
  }

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

  .sidebar {
    position: static;
    height: auto;
  }

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

  .page-head.split,
  .form-grid.two,
  .filter-form {
    grid-template-columns: 1fr;
    display: grid;
  }
}



.note-input {
  min-width: 160px;
}

.card-events {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #f8fafc;
}

.card-events h3 {
  margin: 0;
  font-size: 18px;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
}

.confirm-dialog {
  width: min(560px, 100%);
  padding: 22px;
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
}

.confirm-dialog h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.confirm-dialog p {
  margin: 0 0 14px;
  color: #475569;
  line-height: 1.7;
}

.confirm-dialog label {
  display: grid;
  gap: 8px;
  color: #334155;
}

.confirm-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  min-height: 116px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.stat-card span {
  color: #475569;
  font-size: 14px;
}

.stat-card strong {
  color: #0f172a;
  font-size: 34px;
  line-height: 1;
}

.stat-card small {
  min-height: 18px;
}

.stat-card.blue {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.stat-card.green {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.stat-card.red {
  background: #fef2f2;
  border-color: #fecaca;
}

.stat-card.orange {
  background: #fff7ed;
  border-color: #fed7aa;
}

.overview-section h3 {
  margin: 6px 0 12px;
  font-size: 20px;
}

@media (max-width: 1180px) {
  .overview-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

.client-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(260px, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.client-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #f8fafc;
}

.client-panel h3 {
  margin: 0;
  font-size: 20px;
}

.client-saved p {
  margin: 0;
  color: #64748b;
}

.client-saved dl {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
}

.client-saved dt {
  color: #64748b;
}

.client-saved dd {
  margin: 0;
  min-width: 0;
  word-break: break-all;
}

@media (max-width: 980px) {
  .client-layout {
    grid-template-columns: 1fr;
  }
}
