* { box-sizing: border-box; }
body {
  margin: 0;
  background: #f5f6f8;
  color: #222;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}
a { color: #1f5fbf; text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #111827;
  color: #fff;
}
.brand { font-weight: 700; }
.topbar nav a { color: #fff; margin-left: 16px; }
.container {
  width: min(1120px, calc(100% - 32px));
  margin: 24px auto;
}
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 18px;
}
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }
label {
  display: block;
  margin: 12px 0 6px;
  font-weight: 600;
}
input[type="text"], input[type="password"], textarea, select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
}
textarea { min-height: 220px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
button, .button {
  display: inline-block;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  background: #1f2937;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}
button:hover, .button:hover { background: #374151; text-decoration: none; }
.muted { color: #6b7280; font-size: 13px; }
.alert {
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
}
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
th, td {
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 8px;
  vertical-align: top;
}
th { color: #374151; font-size: 13px; background: #f9fafb; }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #eef2ff;
  color: #3730a3;
}
.footer {
  width: min(1120px, calc(100% - 32px));
  margin: 24px auto;
  color: #6b7280;
  font-size: 12px;
}
.inline-form { display: inline; }

.search-note { margin-top: 8px; }


.note-input {
  min-width: 180px;
  height: 34px;
  padding: 6px 8px;
}




.filter-row {
  display: flex;
  gap: 14px;
  align-items: end;
  flex-wrap: wrap;
}

.filter-row > div {
  min-width: 160px;
}

.note-col {
  min-width: 360px;
}

.note-edit {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.note-edit .note-input {
  width: 260px !important;
  min-width: 180px;
  max-width: 320px;
  height: 36px;
  padding: 6px 8px;
  flex: 0 0 auto;
}

.small-button {
  display: inline-block !important;
  width: auto !important;
  min-width: 54px;
  height: 36px;
  padding: 7px 10px;
  border-radius: 7px;
  white-space: nowrap;
  flex: 0 0 auto;
}


/* v9：备注框和保存按钮强制同一行 */
.note-col {
  min-width: 390px !important;
  width: 390px;
}

.note-edit {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

.note-edit .note-input {
  width: 240px !important;
  min-width: 220px !important;
  max-width: 260px !important;
  flex: 0 0 auto !important;
  height: 36px !important;
}

.note-edit .small-button,
.small-button {
  display: inline-block !important;
  width: auto !important;
  min-width: 54px !important;
  height: 36px !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}
