* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  line-height: 1.5;
}
a {
  color: #5a67d8;
}
.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(102, 126, 234, 0.1);
  padding: 28px 32px;
}
h1 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}
.sub {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 24px;
}
label {
  display: block;
  font-size: 0.85rem;
  color: #444;
  margin-bottom: 6px;
}
input[type='text'],
input[type='password'],
input[type='number'],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d8dce6;
  border-radius: 8px;
  font-size: 0.95rem;
}
textarea {
  min-height: 72px;
  resize: vertical;
}
.row {
  margin-bottom: 16px;
}
.row--2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
}
.btn--primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}
.btn--ghost {
  background: #eef0f6;
  color: #333;
}
.btn--danger {
  background: #e85d4c;
  color: #fff;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}
.toolbar-spacer {
  flex: 1;
}
.msg {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.msg--err {
  background: #ffe8e6;
  color: #c0392b;
}
.msg--ok {
  background: #e6ffef;
  color: #1e7e34;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
th,
td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}
th {
  color: #666;
  font-weight: 600;
}
.thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: #e8eaf0;
}
.badge-off {
  color: #999;
  font-size: 0.8rem;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  z-index: 100;
}
.modal-backdrop.open {
  display: flex;
}
.modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  padding: 24px 28px 28px;
  margin-bottom: 40px;
}
.modal h2 {
  margin: 0 0 20px;
  font-size: 1.15rem;
}
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}
.preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.preview-row img {
  max-width: 120px;
  max-height: 120px;
  border-radius: 8px;
  object-fit: cover;
}
