:root {
  --accent-rgb: 117 251 144;
  --accent: #75fb90;
  --teal: #0f766e;
  --background: #f5f7fb;
  --foreground: #0f172a;
  --muted: #556071;
  --danger: #dc2626;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--foreground);
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  background-color: var(--background);
  background-image:
    radial-gradient(820px 460px at 16% -12%, rgb(var(--accent-rgb) / 0.32) 0%, transparent 72%),
    radial-gradient(860px 440px at 88% -8%, rgb(var(--accent-rgb) / 0.2) 0%, transparent 76%),
    linear-gradient(180deg, #eeeff2 0%, #d7d9df 100%);
}

button,
input,
textarea {
  font: inherit;
}

button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.lookup-card {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 28px;
  border-radius: 32px;
}

.glass-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.56) 0%, rgba(255, 255, 255, 0.34) 100%),
    radial-gradient(220px 130px at 18% 0%, rgb(var(--accent-rgb) / 0.2) 0%, transparent 78%);
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.9),
    inset 0 -18px 30px rgba(255, 255, 255, 0.14),
    0 22px 44px rgba(10, 14, 20, 0.18);
  backdrop-filter: blur(22px) saturate(155%);
}

.page-head,
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

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

.section-head {
  align-items: center;
  margin: 22px 0 14px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin: 0 0 10px;
  padding: 0 14px;
  color: #1d4b38;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(199, 244, 219, 0.88), rgba(223, 234, 119, 0.74));
  border-radius: 999px;
}

.kicker.compact {
  min-height: 28px;
  margin-bottom: 6px;
  font-size: 0.74rem;
}

h1,
h2 {
  margin: 0;
  color: #10243c;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.08;
}

h2 {
  font-size: 1.35rem;
}

.subtle {
  margin: 10px 0 0;
  color: #5f7185;
  line-height: 1.65;
}

.head-actions,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.lookup-input,
.table-textarea {
  width: 100%;
  color: #10243c;
  border: 1px solid rgba(255, 255, 255, 0.84);
  outline: none;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(245, 250, 247, 0.7)),
    radial-gradient(180px 100px at 12% 0%, rgb(var(--accent-rgb) / 0.24), transparent 80%);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.9);
}

.lookup-input {
  min-height: 52px;
  padding: 0 16px;
  border-radius: 18px;
}

.table-textarea {
  min-height: 112px;
  padding: 14px 16px;
  border-radius: 18px;
  resize: vertical;
}

.lookup-input:focus,
.table-textarea:focus {
  border-color: rgba(142, 216, 179, 0.86);
  box-shadow: 0 0 0 4px rgba(142, 216, 179, 0.18), inset 0 1px rgba(255, 255, 255, 0.92);
}

.glass-button,
.primary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 0.16s, box-shadow 0.16s, background-color 0.16s;
}

.glass-button {
  color: #1f3149;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.9), 0 10px 18px rgba(16, 36, 60, 0.08);
}

.primary-button {
  color: #173521;
  background: linear-gradient(135deg, #b9efc5, #dfea77);
  border: 0;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.84), 0 16px 26px rgba(16, 36, 60, 0.12);
}

.danger-button {
  color: #8a2f2f;
  background: rgba(255, 233, 233, 0.88);
}

.glass-button:active,
.primary-button:active,
.danger-button:active {
  transform: translateY(1px);
}

.icon-button {
  width: 38px;
  min-height: 38px;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
}

.records-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.calendar-panel,
.upload-panel {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.72);
}

.calendar-panel {
  position: sticky;
  top: 18px;
  padding: 14px;
}

.records-panel {
  min-width: 0;
}

.records-panel .section-head {
  margin-top: 0;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  text-align: center;
}

.month-title {
  color: #10243c;
  font-size: 1.02rem;
  font-weight: 900;
}

.selected-date {
  margin-top: 2px;
  color: #5f7185;
  font-size: 0.78rem;
}

.weekday-grid,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.weekday-grid {
  margin-bottom: 6px;
  color: #66788d;
  font-size: 0.74rem;
  font-weight: 800;
  text-align: center;
}

.calendar-day {
  position: relative;
  min-height: 44px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 12px;
  color: #24364f;
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  text-align: left;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.84);
}

.calendar-day.is-muted {
  color: #9aa8b8;
  background: rgba(255, 255, 255, 0.32);
}

.calendar-day.is-selected {
  border-color: rgba(117, 251, 144, 0.86);
  background: linear-gradient(135deg, rgba(199, 244, 219, 0.88), rgba(255, 255, 255, 0.74));
  box-shadow: 0 0 0 4px rgba(117, 251, 144, 0.16), inset 0 1px rgba(255, 255, 255, 0.9);
}

.calendar-day.has-record::after {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

.calendar-count {
  display: block;
  margin-top: 3px;
  color: #1d4b38;
  font-size: 0.64rem;
  font-weight: 800;
}

.status-pill {
  min-height: 36px;
  padding: 8px 12px;
  color: #1b4c37;
  font-weight: 800;
  background: rgba(199, 244, 219, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 999px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.record-card,
.admin-item {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.78), 0 14px 26px rgba(16, 36, 60, 0.08);
}

.record-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.5);
  cursor: zoom-in;
}

.record-info,
.admin-info {
  padding: 14px;
}

.record-title {
  margin: 0;
  color: #10243c;
  font-weight: 900;
}

.record-meta,
.record-note {
  margin: 8px 0 0;
  color: #5f7185;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.upload-panel {
  margin-bottom: 22px;
}

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 190px;
  margin-bottom: 16px;
  padding: 24px;
  border: 2px dashed rgba(15, 118, 110, 0.42);
  border-radius: 24px;
  color: #1f3149;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  text-align: center;
}

.drop-zone.is-dragging {
  border-color: var(--teal);
  background: rgba(199, 244, 219, 0.56);
}

.drop-zone input {
  display: none;
}

.paste-zone {
  display: grid;
  place-items: center;
  min-height: 88px;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 20px;
  color: #1f3149;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(245, 250, 247, 0.52)),
    radial-gradient(180px 100px at 12% 0%, rgb(var(--accent-rgb) / 0.22), transparent 80%);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.86);
  cursor: text;
  outline: none;
  text-align: center;
}

.paste-zone:focus {
  border-color: rgba(142, 216, 179, 0.86);
  box-shadow: 0 0 0 4px rgba(142, 216, 179, 0.18), inset 0 1px rgba(255, 255, 255, 0.92);
}

.drop-title,
.drop-subtitle,
.paste-title,
.paste-subtitle {
  display: block;
}

.drop-title,
.paste-title {
  font-size: 1.22rem;
  font-weight: 900;
}

.drop-subtitle,
.paste-subtitle {
  margin-top: 8px;
  color: #5f7185;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid label span {
  display: block;
  margin: 0 0 8px;
  color: #526175;
  font-weight: 800;
}

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

.file-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0 0;
}

.preview-item {
  min-height: 42px;
  padding: 10px 12px;
  color: #24364f;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 16px;
  overflow-wrap: anywhere;
}

.form-actions {
  margin-top: 16px;
}

.date-filter {
  max-width: 220px;
}

.admin-list {
  display: grid;
  gap: 14px;
}

.admin-item {
  display: grid;
  grid-template-columns: 170px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
}

.admin-thumb {
  width: 170px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
}

.empty-card,
.status-text {
  margin-top: 16px;
  padding: 16px;
  color: #526175;
  text-align: center;
}

.empty-card {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.5);
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 48px));
  padding: 12px 16px;
  color: #173521;
  font-weight: 800;
  background: linear-gradient(135deg, #b9efc5, #dfea77);
  border-radius: 18px;
  box-shadow: 0 16px 30px rgba(16, 36, 60, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.18s, transform 0.18s;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 64px 24px 24px;
  background: rgba(10, 14, 20, 0.78);
}

.image-viewer img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 18px;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.28);
}

.viewer-close {
  position: absolute;
  top: 18px;
  right: 18px;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 16px;
  color: #10243c;
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  font-weight: 800;
}

@media (max-width: 760px) {
  .lookup-shell {
    padding: 14px;
  }

  .lookup-card {
    padding: 18px;
    border-radius: 24px;
  }

  .page-head,
  .section-head {
    display: block;
  }

  .records-layout {
    display: block;
  }

  .calendar-panel {
    position: static;
    margin-bottom: 18px;
  }

  .head-actions,
  .form-actions {
    justify-content: flex-start;
    margin-top: 14px;
  }

  .calendar-day {
    min-height: 42px;
    padding: 8px;
    border-radius: 14px;
  }

  .calendar-count {
    font-size: 0.7rem;
  }

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

  .date-filter {
    max-width: none;
    margin-top: 12px;
  }

  .admin-item {
    grid-template-columns: 96px 1fr;
  }

  .admin-thumb {
    width: 96px;
  }

  .admin-item .danger-button {
    grid-column: 1 / -1;
  }
}
