﻿:root {
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(120deg, #7dd3fc, #a5b4fc, #fda4af, #fbbf24, #34d399, #60a5fa);
  background-size: 400% 400%;
  background-position: 0% 50%;
  background-attachment: fixed;
  color: #1a1a1a;
  position: relative;
  overflow-x: hidden;
  animation: bgFlow 20s ease-in-out infinite;
}
@keyframes bgFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.app {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px 40px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}
.input, .select, textarea {
  border: 1px solid #d9d9df;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.input { min-width: 180px; }
.btn {
  border: 1px solid #c7c7d1;
  background: white;
  color: #1a1a1a;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(47, 111, 235, 0.12);
}
.btn.primary {
  background: linear-gradient(135deg, #2f6feb 0%, #4f7cff 100%);
  color: white;
  border-color: #2f6feb;
  box-shadow: 0 10px 20px rgba(47, 111, 235, 0.25);
}
.hidden-input {
  display: none;
}
.table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(19, 20, 24, 0.18);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.table th, .table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid #ececf2;
  font-size: 13px;
  vertical-align: top;
}
.table th {
  background: rgba(255, 255, 255, 0.35);
  font-weight: 600;
}
.table tr:last-child td { border-bottom: none; }
.table .note { max-width: 220px; }
.table .latest-event { min-width: 220px; }
.event-text { font-size: 13px; color: #1a1a1a; }
.event-time { font-size: 12px; color: #6b7280; margin-top: 4px; }
.password { margin-right: 6px; }
.link {
  background: none;
  border: none;
  color: #2f6feb;
  cursor: pointer;
  padding: 0;
  margin-right: 6px;
  font-size: 12px;
}
.link.danger { color: #d64545; }
.status { min-width: 88px; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 20, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal.hidden { display: none; }
.modal-card {
  width: min(520px, 92vw);
  background: rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 16px;
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.modal-title { font-weight: 700; margin-bottom: 12px; }
.form { display: grid; gap: 10px; }
.field { display: grid; gap: 6px; font-size: 13px; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .actions {
    width: 100%;
  }
  .input { min-width: 0; flex: 1; }
  .table {
    display: block;
    box-shadow: none;
  }
  .table thead { display: none; }
  .table tbody, .table tr, .table td {
    display: block;
    width: 100%;
  }
  .table tr {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(19, 20, 24, 0.08);
    margin-bottom: 12px;
    padding: 8px 10px;
  }
  .table td {
    border-bottom: none;
    padding: 6px 0;
  }
  .table td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
  }
  .table .latest-event,
  .table .note {
    max-width: none;
  }
}
.event-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.2);
}
.event-item {
  display: grid;
  gap: 4px;
  font-size: 13px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.35);
}
.event-item:last-child { border-bottom: none; padding-bottom: 0; }
.event-time {
  font-size: 12px;
  color: #5a6472;
}
.event-empty {
  font-size: 13px;
  color: #8c93a3;
}
