:root {
  color-scheme: light;
  --bg: #f3f6fb;
  --bg-soft: #eef3fa;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --line: #dfe6ef;
  --line-strong: #c8d3e2;
  --text: #1b2538;
  --muted: #67758a;
  --muted-2: #8b98aa;
  --accent: #0891b2;
  --accent-2: #2563eb;
  --violet: #7c3aed;
  --danger: #dc2626;
  --success: #059669;
  --radius: 16px;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(circle at 90% -10%, rgba(56, 189, 248, 0.12), transparent 34%),
    radial-gradient(circle at 5% 100%, rgba(99, 102, 241, 0.07), transparent 30%),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: var(--accent-2);
}

.hidden {
  display: none !important;
}

/* ------------------------------ Login ------------------------------ */

.login-view {
  position: relative;
  display: grid;
  min-height: 100vh;
  padding: 28px;
  overflow: hidden;
  place-items: center;
}

.login-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 42%, #000 0, transparent 72%);
  pointer-events: none;
}

.login-bg::before,
.login-bg::after {
  position: absolute;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  content: "";
  filter: blur(10px);
}

.login-bg::before {
  top: -180px;
  left: -140px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.2), transparent 65%);
}

.login-bg::after {
  right: -160px;
  bottom: -190px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.14), transparent 65%);
}

.login-card {
  position: relative;
  z-index: 2;
  width: min(410px, 100%);
  padding: 36px 36px 27px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 26px 70px rgba(30, 41, 59, 0.12);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
}

.brand-mark i {
  display: block;
  width: 13px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 3px;
  background: #2563eb;
}

.brand-mark i:first-child {
  width: 22px;
  height: 15px;
  border-radius: 4px;
  background: #0891b2;
}

.brand-mark i:last-child {
  width: 9px;
  height: 8px;
  opacity: 0.65;
}

.brand-name {
  color: #0f172a;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 1;
}

.brand-name span {
  color: var(--accent);
}

.login-caption {
  margin: 10px 0 28px;
  color: var(--muted);
  font-size: 12px;
}

.login-card .field {
  display: block;
  margin-bottom: 14px;
}

.login-card .btn-wide {
  width: 100%;
  margin-top: 5px;
}

.login-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.5;
}

.login-footer a {
  color: #2563eb;
  font-size: 11px;
  text-decoration: none;
}

.login-footer a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* ------------------------------- Shell ------------------------------ */

.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex: 0 0 248px;
  flex-direction: column;
  height: 100vh;
  padding: 24px 17px 18px;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.brand-sidebar {
  margin: 0 8px 30px;
}

.brand-sidebar .brand-name {
  font-size: 19px;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav-item {
  display: flex;
  gap: 11px;
  align-items: center;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #536277;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}

.nav-item:hover {
  background: #f3f7fc;
  color: #1e293b;
}

.nav-item.is-active {
  border-color: #bae6fd;
  background: #e8f7fc;
  color: #0e7490;
}

.nav-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 7px;
  background: #eef4fb;
  color: #0e7490;
  font-size: 12px;
}

.sidebar-spacer {
  flex: 1;
}

.sidebar-actions {
  display: grid;
  gap: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.sidebar-link {
  display: block;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5d6c83;
  font-size: 11px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.sidebar-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.sidebar-link-muted {
  color: #8b98aa;
}

.sidebar-user {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 10px;
  padding: 10px 9px 3px;
  color: #6b7a90;
  font-size: 10px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.45);
}

.main {
  flex: 1;
  min-width: 0;
  max-width: 1180px;
  padding: 28px 38px 70px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #7c8ba1;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  color: #0f172a;
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.page-subtitle {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.topbar-status {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 17px;
}

.save-status {
  min-width: 88px;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.save-status.is-saved {
  color: var(--success);
}

.save-status.is-error {
  color: var(--danger);
}

/* ------------------------------ Components -------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 39px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.14s, filter 0.14s, background 0.14s, border-color 0.14s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  cursor: default;
  filter: saturate(0.5) brightness(0.95);
  opacity: 0.6;
  transform: none;
}

.btn-primary {
  border-color: #2563eb;
  background: #2563eb;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
  color: #ffffff;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-ghost {
  border-color: var(--line-strong);
  background: #ffffff;
  color: #334155;
}

.btn-ghost:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.btn-small {
  min-height: 32px;
  padding: 0 11px;
  font-size: 10px;
}

.btn-danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.btn-danger:hover {
  background: #fee2e2;
}

.btn-wide {
  min-height: 46px;
}

.icon-btn {
  display: grid;
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  place-items: center;
}

.icon-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.field {
  display: block;
  margin: 0;
}

.field-label {
  display: block;
  margin: 0 0 7px 1px;
  color: #526176;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.field input,
.field select {
  width: 100%;
  height: 41px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: none;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.field input:focus,
.field select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.field input[type="color"] {
  padding: 4px;
  cursor: pointer;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.field-hint {
  margin: 8px 0 0;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.5;
}

.check-field {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: 14px;
  color: #475569;
  font-size: 11px;
  cursor: pointer;
}

.check-field input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #2563eb;
}

.form-error {
  min-height: 17px;
  margin: 9px 0 0;
  color: #b91c1c;
  font-size: 11px;
  line-height: 1.45;
}

.notice {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding: 13px 16px;
  border: 1px solid #fde68a;
  border-radius: 12px;
  background: #fffbeb;
}

.notice strong {
  display: block;
  color: #92400e;
  font-size: 11px;
}

.notice span {
  display: block;
  margin-top: 2px;
  color: #a16207;
  font-size: 10px;
}

/* ------------------------------ Settings ---------------------------- */

.settings-groups {
  display: grid;
  gap: 16px;
}

.settings-group {
  padding: 20px 22px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.group-head {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 17px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.group-head h2 {
  margin: 0;
  color: #1e293b;
  font-size: 14px;
  font-weight: 700;
}

.group-head p {
  margin: 0;
  color: var(--muted-2);
  font-size: 10px;
}

.group-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 18px;
}

.settings-field {
  min-width: 0;
}

.settings-field .field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.settings-field .field-unit {
  color: #94a3b8;
  font-size: 9px;
  font-weight: 600;
}

.settings-field .field-hint {
  min-height: 0;
  margin-top: 5px;
}

.settings-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  accent-color: #2563eb;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 -8px 24px rgba(30, 41, 59, 0.05);
  backdrop-filter: blur(12px);
}

.dirty-hint {
  color: var(--muted-2);
  font-size: 10px;
}

.dirty-hint.is-dirty {
  color: #b45309;
}

/* ------------------------------- Items ------------------------------ */

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 19px;
}

.section-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 14px;
}

.item-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 0.17s, transform 0.17s, box-shadow 0.17s;
}

.item-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transform: translateY(-2px);
}

.item-card.is-disabled {
  opacity: 0.55;
}

.item-thumb {
  display: grid;
  height: 116px;
  background: #f1f5fb;
  place-items: center;
}

.item-thumb img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  filter: drop-shadow(0 5px 8px rgba(15, 23, 42, 0.12));
}

.item-thumb .thumb-fallback {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(8, 145, 178, 0.2);
}

.item-body {
  padding: 12px 14px 14px;
}

.item-title-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.item-title {
  overflow: hidden;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-id {
  margin: 2px 0 0;
  overflow: hidden;
  color: #94a3b8;
  font-size: 9px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.chip {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #64748b;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.chip-accent {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #0369a1;
}

.item-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.switch {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: #64748b;
  font-size: 9px;
  cursor: pointer;
}

.switch input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: #2563eb;
}

.item-buttons {
  display: flex;
  gap: 4px;
}

.mini-btn {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: #526176;
  font-size: 9px;
  cursor: pointer;
}

.mini-btn:hover {
  border-color: var(--line-strong);
  background: #f8fafc;
  color: #111827;
}

.mini-btn.danger:hover {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.empty-state {
  padding: 58px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: #ffffff;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 13px;
  border: 1px solid #bae6fd;
  border-radius: 14px;
  background: #f0f9ff;
  color: var(--accent);
  font-size: 20px;
  place-items: center;
}

.empty-state h3 {
  margin: 0;
  color: #1e293b;
  font-size: 15px;
}

.empty-state p {
  margin: 7px 0 17px;
  color: var(--muted);
  font-size: 11px;
}

/* ------------------------------- Stats ------------------------------ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  padding: 16px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.stat-card-label {
  display: block;
  color: #7c8ba1;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin: 8px 0 2px;
  color: #0f172a;
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-card small {
  color: #94a3b8;
  font-size: 9px;
}

.stats-columns {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
}

.panel {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #ffffff;
}

.panel h3 {
  margin: 0 0 14px;
  color: #1e293b;
  font-size: 13px;
}

.details-list {
  display: grid;
  gap: 2px;
  margin: 0;
}

.details-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0;
  border-bottom: 1px solid #eef2f7;
}

.details-list div:last-child {
  border-bottom: 0;
}

.details-list dt {
  color: #7c8ba1;
  font-size: 10px;
}

.details-list dd {
  margin: 0;
  color: #334155;
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.panel-text,
.panel-hint {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.panel-hint {
  margin: 12px 0 0;
  color: var(--muted-2);
}

/* ------------------------------- Modal ------------------------------ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  padding: 22px;
  overflow-y: auto;
  place-items: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  z-index: 2;
  width: min(680px, 100%);
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  padding: 24px 26px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.2);
}

.modal-small {
  width: min(410px, 100%);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.modal-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.item-form-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 20px;
}

.image-picker {
  display: block;
  cursor: pointer;
}

.image-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.image-preview {
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: #f8fafc;
  place-items: center;
  transition: border-color 0.16s, background 0.16s;
}

.image-picker:hover .image-preview {
  border-color: #38bdf8;
  background: #f0f9ff;
}

.image-preview img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 8px 15px rgba(15, 23, 42, 0.14));
}

.image-placeholder {
  display: grid;
  gap: 7px;
  justify-items: center;
  color: #94a3b8;
}

.image-placeholder b {
  display: grid;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--accent);
  font-size: 20px;
  font-weight: 400;
  place-items: center;
}

.image-placeholder small {
  font-size: 9px;
  line-height: 1.55;
  text-align: center;
}

.image-picker-caption {
  display: block;
  margin-top: 9px;
  color: #7c8ba1;
  font-size: 9px;
  text-align: center;
}

.item-fields .field {
  margin-bottom: 13px;
}

.power-fields {
  margin: 0 0 13px;
  padding: 12px;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  background: #f0f9ff;
}

.power-fields .field-row {
  margin-bottom: 9px;
}

.power-fields .field-row:last-of-type {
  margin-bottom: 0;
}

.skin-form-layout {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
}

.skin-form-layout .field {
  margin-bottom: 12px;
}

.item-badge-power {
  border-color: #ddd6fe;
  color: #6d28d9;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

#passwordForm .field {
  margin-bottom: 13px;
}

/* ------------------------------- Toast ------------------------------ */

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  max-width: min(380px, calc(100vw - 32px));
  padding: 11px 16px;
  border: 1px solid #334155;
  border-radius: 11px;
  background: #1e293b;
  box-shadow: 0 17px 45px rgba(15, 23, 42, 0.28);
  color: #f8fafc;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.18s, transform 0.18s;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  border-color: #b91c1c;
  background: #7f1d1d;
  color: #fef2f2;
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  background: #f3f6fb;
  color: #0f172a;
  place-items: center;
}

/* ------------------------------ Responsive -------------------------- */

@media (max-width: 1000px) {
  .sidebar {
    flex-basis: 210px;
  }

  .main {
    padding: 24px 25px 60px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app {
    display: block;
  }

  .sidebar {
    position: static;
    flex-direction: row;
    align-items: center;
    width: 100%;
    height: auto;
    padding: 12px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
  }

  .brand-sidebar {
    margin: 0 15px 0 0;
  }

  .brand-sidebar .brand-name {
    display: none;
  }

  .nav {
    display: flex;
  }

  .nav-item {
    width: auto;
    padding: 8px 10px;
    font-size: 10px;
  }

  .nav-icon {
    display: none;
  }

  .sidebar-spacer,
  .sidebar-user,
  .sidebar-actions .sidebar-link:first-child {
    display: none;
  }

  .sidebar-actions {
    display: block;
    margin-left: auto;
    padding: 0;
    border-top: 0;
  }

  .sidebar-link {
    padding: 7px 8px;
    font-size: 10px;
  }

  .main {
    padding: 19px 14px 60px;
  }

  .topbar {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
  }

  .topbar h1 {
    font-size: 23px;
  }

  .topbar-status {
    width: 100%;
    justify-content: space-between;
    padding-top: 0;
  }

  .save-status {
    text-align: left;
  }

  .group-fields,
  .stats-columns,
  .item-form-layout,
  .skin-form-layout {
    grid-template-columns: 1fr;
  }

  .settings-group {
    padding: 16px 14px;
  }

  .group-head {
    display: block;
  }

  .group-head p {
    margin-top: 4px;
  }

  .section-head {
    flex-direction: column;
    gap: 12px;
  }

  .items-grid {
    grid-template-columns: 1fr;
  }

  .item-form-layout {
    gap: 14px;
  }

  .image-picker {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 12px;
    align-items: center;
  }

  .image-preview {
    width: 112px;
  }

  .image-picker-caption {
    margin: 0;
    text-align: left;
  }

  .sticky-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .sticky-actions .btn {
    width: 100%;
  }

  .modal {
    padding: 10px;
  }

  .modal-card {
    max-height: calc(100vh - 20px);
    padding: 18px 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .login-card {
    padding: 28px 23px 23px;
  }

  .login-view {
    padding: 16px;
  }
}
