* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif; background: #f5f7fa; color: #333; min-height: 100vh; }
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.auth-card { background: #fff; border-radius: 18px; padding: 36px 26px; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.auth-card h1 { font-size: 22px; margin-bottom: 24px; text-align: center; color: #333; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; color: #666; margin-bottom: 6px; }
.form-group input { width: 100%; padding: 12px 14px; font-size: 16px; border: 1.5px solid #ddd; border-radius: 10px; outline: none; transition: border-color .2s; }
.form-group input:focus { border-color: #667eea; }
.auth-link { text-align: center; margin-top: 16px; font-size: 14px; color: #888; }
.auth-link a { color: #667eea; text-decoration: none; }
button, .btn-edit { font-family: inherit; cursor: pointer; border: none; border-radius: 10px; font-weight: 500; transition: opacity .15s; }
button:hover, .btn-edit:hover { opacity: .88; }
.btn-primary { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; padding: 13px; font-size: 16px; font-weight: 600; min-height: 48px; }
.btn-block { width: 100%; }
.btn-outline { background: #fff; color: #667eea; border: 1.5px solid #667eea; padding: 10px 18px; font-size: 14px; min-height: 42px; }
.btn-danger { background: #e53e3e; color: #fff; padding: 8px 16px; font-size: 13px; min-height: 38px; }
.btn-edit { background: #ebf4ff; color: #3182ce; padding: 8px 16px; font-size: 13px; text-decoration: none; display: inline-block; min-height: 38px; line-height: 22px; }
.container { max-width: 900px; margin: 0 auto; padding: 14px; }
.topbar { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; padding: 16px 20px; border-radius: 14px; margin-bottom: 14px; }
.topbar h2 { font-size: 18px; margin-bottom: 2px; }
.topbar .sub { font-size: 12px; opacity: .85; }
.topbar .logout { color: #fff; text-decoration: none; font-size: 13px; padding: 8px 14px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 8px; }
.flash { background: #ebf8ff; color: #2b6cb0; padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 12px; border-left: 4px solid #4299e1; }
.toolbar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.search-form { flex: 1; display: flex; gap: 8px; min-width: 200px; }
.search-form input { flex: 1; padding: 10px 14px; font-size: 15px; border: 1.5px solid #ddd; border-radius: 10px; outline: none; }
.search-form input:focus { border-color: #667eea; }
.inline-form { display: inline; }
.add-panel { background: #fff; border-radius: 14px; padding: 0; margin-bottom: 16px; box-shadow: 0 2px 10px rgba(0, 0, 0, .05); overflow: hidden; }
.add-panel summary { padding: 14px 20px; font-size: 15px; font-weight: 600; color: #444; cursor: pointer; list-style: none; user-select: none; }
.add-panel summary::-webkit-details-marker { display: none; }
.add-panel[open] summary { border-bottom: 1px solid #f0f0f0; }
.add-form { padding: 16px 20px 20px; display: grid; gap: 10px; }
.add-form input { width: 100%; padding: 11px 14px; font-size: 15px; border: 1.5px solid #ddd; border-radius: 10px; outline: none; }
.add-form input:focus { border-color: #667eea; }
.record-list { list-style: none; }
.record-item { background: #fff; border-radius: 14px; padding: 16px 18px; margin-bottom: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, .05); }
.record-item .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.record-item .info { flex: 1; min-width: 160px; }
.record-item .title { font-size: 16px; font-weight: 600; color: #333; margin-bottom: 4px; }
.record-item .meta { font-size: 13px; color: #999; }
.record-item .actions { display: flex; gap: 8px; align-items: center; }
.empty { text-align: center; color: #aaa; padding: 60px 0; font-size: 15px; }
@media (max-width: 500px) {
    .container { padding: 10px; }
    .topbar { padding: 14px 16px; border-radius: 12px; }
    .topbar h2 { font-size: 16px; }
    .record-item .row { flex-direction: column; align-items: stretch; }
    .record-item .actions { justify-content: flex-end; }
    .search-form { min-width: 100%; }
}