:root {
  --ink: #26352f;
  --muted: #6f7d73;
  --paper: rgba(255, 252, 238, 0.94);
  --line: #d9c996;
  --green: #4f8a63;
  --blue: #628fa5;
  --sun: #e7aa4f;
  --red: #b9574d;
  --shadow: 0 16px 40px rgba(70, 83, 61, 0.16);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 225, 142, .6), transparent 22rem),
    radial-gradient(circle at 88% 18%, rgba(142, 199, 186, .46), transparent 26rem),
    linear-gradient(180deg, #cee5dc 0%, #f7ecd0 50%, #dce7c4 100%);
  letter-spacing: 0;
}
.wash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(100deg, rgba(255,255,255,.15) 0 2px, transparent 2px 30px),
    linear-gradient(135deg, transparent 0 72%, rgba(72, 112, 70, .08) 72% 74%, transparent 74%);
}
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; color: inherit; }
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  position: relative;
  z-index: 1;
}
.login-card {
  width: min(430px, 100%);
  background: var(--paper);
  border: 2px solid rgba(217, 201, 150, .9);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
}
.login-card h1 { margin: 0 0 8px; font-size: 26px; }
.login-card p { margin: 0 0 20px; color: var(--muted); }
.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 246px 1fr;
  min-height: 100vh;
}
.sidebar {
  margin: 18px 0 18px 18px;
  padding: 18px 14px;
  height: calc(100vh - 36px);
  position: sticky;
  top: 18px;
  background: rgba(61, 92, 68, .92);
  color: #fffdf0;
  border: 2px solid rgba(255, 253, 239, .58);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.brand { padding: 8px 10px 18px; border-bottom: 1px dashed rgba(255,253,239,.45); }
.brand h1 { margin: 0 0 8px; font-size: 22px; }
.brand p { margin: 0; font-size: 12px; color: rgba(255,253,239,.78); }
.nav { display: grid; gap: 8px; margin-top: 16px; }
.nav button {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 15px;
  background: transparent;
  color: rgba(255,253,239,.8);
  text-align: left;
}
.nav button.active { background: #fff7cf; color: #36513c; box-shadow: inset 0 -2px 0 rgba(178,137,55,.28); }
.main { padding: 22px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.topbar h2 { margin: 0 0 6px; font-size: 26px; }
.topbar p { margin: 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 14px;
  background: #f5e8b8;
  border: 1px solid #d8bd77;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease, opacity .12s ease;
  white-space: nowrap;
}
.btn.primary { background: var(--green); border-color: #3f714f; color: white; }
.btn.danger { background: #f5d4cc; border-color: #d89b90; color: var(--red); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(69, 83, 61, .14); filter: brightness(1.02); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn:disabled { cursor: not-allowed; opacity: .62; transform: none; box-shadow: none; }
.panel, .card {
  background: var(--paper);
  border: 2px solid rgba(217,201,150,.9);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.panel { padding: 16px; }
.grid { display: grid; gap: 14px; }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: 14px; }
.metric { padding: 16px; }
.metric span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 9px; }
.metric strong { font-size: 27px; }
.metric p { color: var(--muted); line-height: 1.7; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.section-title h3 { margin: 0; font-size: 17px; }
.seat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.seat {
  min-height: 122px;
  padding: 13px;
  border: 2px solid #d9c895;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf0, #f7edc8);
  display: grid;
  align-content: space-between;
  gap: 8px;
}
.seat.occupied { background: linear-gradient(180deg, #ecf6d7, #d7ebc5); border-color: #91b779; }
.seat.reserved { background: linear-gradient(180deg, #fff1c4, #f5daa0); border-color: #dbb569; }
.seat.maintenance { background: linear-gradient(180deg, #f7d7d0, #efc0b6); border-color: #ce8e82; }
.seat-head, .row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.seat-name { font-weight: 700; }
.tag {
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #efe7c5;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.tag.green { background: #ddefce; color: #3f714f; }
.tag.blue { background: #d9edf1; color: #447e92; }
.tag.amber { background: #f6e0a7; color: #875f1e; }
.tag.red { background: #f5d5cd; color: #9d493f; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 10px; border-bottom: 1px dashed var(--line); text-align: left; font-size: 14px; vertical-align: middle; }
th { color: var(--muted); font-weight: 700; background: rgba(255,247,207,.52); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 12px; }
input, select, textarea {
  min-height: 39px;
  border: 1px solid #ceb97c;
  border-radius: 13px;
  background: #fffdf0;
  color: var(--ink);
  padding: 8px 10px;
}
textarea { min-height: 78px; resize: vertical; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(49, 67, 54, .48);
  display: grid;
  place-items: center;
  padding: 18px;
}
.modal {
  width: min(780px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fffaf0;
  border: 2px solid #f8e8ad;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(48,62,47,.28);
}
.modal header, .modal footer {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px dashed var(--line);
}
.modal footer { border-top: 1px dashed var(--line); border-bottom: 0; justify-content: flex-end; }
.modal h3 { margin: 0; }
.modal .body { padding: 16px; }
.perm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 12px;
}
.perm-grid label {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #d8bd77;
  border-radius: 14px;
  background: #fffdf0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}
.perm-grid input {
  min-height: auto;
}
.notice {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #e0c577;
  background: rgba(255,244,202,.82);
  color: #70541f;
}
.empty { padding: 22px; text-align: center; color: var(--muted); }
.error { color: var(--red); min-height: 22px; }
@media (max-width: 920px) {
  .app { display: block; }
  .sidebar { position: static; height: auto; margin: 12px; }
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main { padding: 14px; }
  .topbar, .split { display: grid; grid-template-columns: 1fr; }
  .cols-4, .cols-3, .cols-2, .form-grid { grid-template-columns: 1fr; }
  .perm-grid { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
}
