:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1f2328;
  --muted: #6b7280;
  --border: rgba(0, 0, 0, 0.08);
  --primary: #ff9800;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
}

.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar__brand {
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.topbar__nav {
  display: flex;
  gap: 12px;
}

.topbar__link {
  text-decoration: none;
  color: var(--text);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 16px 32px;
}

.container--fluid {
  max-width: none;
}

.h1 {
  font-size: 22px;
  margin: 0 0 14px;
}

.h2 {
  font-size: 16px;
  margin: 0 0 12px;
}

.row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.row__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  text-align: left;
}

.table th {
  font-weight: 600;
  color: #374151;
}

.table tr:last-child td {
  border-bottom: none;
}

.right {
  text-align: right;
}

.muted {
  color: var(--muted);
}

.link {
  color: var(--primary);
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn--ghost {
  background: transparent;
  color: var(--primary);
}

.btn--danger {
  border-color: #ee0a24;
  background: #ee0a24;
}

.btn--secondary {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.form-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.label {
  color: var(--muted);
  padding-top: 8px;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  outline: none;
}

.textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

.qrcode {
  margin-top: 14px;
  display: grid;
  gap: 8px;
  justify-items: start;
}

.qrcode__img {
  width: 180px;
  height: 180px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.kv {
  display: grid;
  gap: 10px;
}

.kv__row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
}

.kv__k {
  color: var(--muted);
}

.kv__v {
  color: var(--text);
}

.file-group {
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.file-group:first-of-type {
  border-top: none;
  padding-top: 0;
}

.file-group__title {
  font-weight: 600;
  margin-bottom: 10px;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.file-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  background: #f3f4f6;
}

.thumb--file {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--muted);
}

.file-name {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}
