:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #1d2733;
  --muted: #667789;
  --line: #dfe6ee;
  --primary: #0f6f8f;
  --primary-dark: #0a4e67;
  --danger: #c83333;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--primary); text-decoration: none; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.button.secondary { background: #e8eef4; color: #243746; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 232px;
  background: #152333;
  color: #fff;
  padding: 24px 18px;
}
.brand strong { display: block; font-size: 20px; margin-bottom: 6px; }
.brand span { color: #9db1c5; font-size: 13px; }
nav { display: grid; gap: 8px; margin-top: 34px; }
nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 6px;
  color: #dce8f2;
}
nav a:hover { background: rgba(255,255,255,0.08); }
nav a.active { background: rgba(255,255,255,0.13); color: #fff; }
.client-sidebar nav {
  gap: 7px;
}
.nav-section {
  padding: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
}
.nav-section-title {
  padding: 3px 6px 8px;
  color: #9db1c5;
  font-size: 12px;
  font-weight: 700;
}
.nav-submenu {
  display: grid;
  gap: 5px;
}
.nav-submenu a {
  padding: 10px 12px;
  font-size: 14px;
}
.nav-section.open {
  background: rgba(255,255,255,0.06);
}
.main { margin-left: 232px; padding: 28px; }
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 24px;
  gap: 14px;
}
.main-header h1 { margin: 0 0 6px; font-size: 26px; }
.main-header p { margin: 0; color: var(--muted); }
.logout { color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stats article, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.stats article { padding: 20px; }
.stats span { display: block; color: var(--muted); margin-bottom: 10px; }
.stats strong { font-size: 32px; }
.panel { padding: 20px; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
}
.panel-head h2 { margin: 0; font-size: 22px; }
.panel-head p { margin: 6px 0 0; color: var(--muted); }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.status-toggle-form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
}
.status-toggle-form > span {
  display: grid;
  gap: 2px;
  line-height: 1.2;
}
.status-toggle-form small {
  color: var(--muted);
  font-size: 12px;
}
.switch {
  position: relative;
  display: block;
  width: 46px;
  height: 26px;
  cursor: pointer;
}
.switch input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  opacity: 0;
}
.switch span {
  position: absolute;
  inset: 0;
  border-radius: 13px;
  background: #aebbc5;
  transition: background .2s ease;
}
.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform .2s ease;
}
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(20px); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 13px 10px;
  text-align: left;
  vertical-align: middle;
}
th { color: var(--muted); font-weight: 600; background: #f8fafc; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.actions form { margin: 0; }
.actions button {
  min-height: auto;
  padding: 0;
  background: transparent;
  color: var(--danger);
}
.actions .renew-button { color: var(--primary); }
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
}
.status-badge.active { color: #176f3b; background: #e8f7ee; }
.status-badge.disabled { color: #8b3940; background: #faecee; }
.muted { color: var(--muted); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-panel { max-width: 980px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
label {
  display: grid;
  gap: 8px;
  color: #344455;
  font-weight: 600;
}
input, select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cfd9e3;
  border-radius: 6px;
  padding: 0 12px;
  font: inherit;
  color: var(--text);
  background: #fff;
}
.compact-input { min-width: 96px; }
.sort-input { width: 82px; min-width: 82px; }
textarea {
  width: 100%;
  border: 1px solid #cfd9e3;
  border-radius: 6px;
  padding: 12px;
  font: inherit;
  color: var(--text);
  background: #fff;
  resize: vertical;
}
.wide { grid-column: 1 / -1; }
.section-title {
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: #1f3546;
  font-weight: 800;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
}
.check input { width: 18px; min-height: 18px; }
.form-actions { display: flex; justify-content: flex-start; }
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #eef4f7;
}
.login-card {
  width: min(420px, calc(100vw - 32px));
  padding: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(31,54,71,0.13);
}
.login-card h1 { margin: 0 0 8px; font-size: 28px; }
.login-card p { margin: 0 0 22px; color: var(--muted); }
.login-card form { display: grid; gap: 16px; }
.alert, .success {
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
}
.alert { background: #fff0f0; color: #a92d2d; border: 1px solid #ffd1d1; }
.success { background: #eef9f1; color: #1f7a3b; border: 1px solid #bfe9c8; }
.install-card { width: min(520px, calc(100vw - 32px)); }
.client-sidebar { background: #17302f; }
.client-main { padding: 22px; }
.client-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 18px;
  align-items: start;
}
.client-editor { min-width: 0; }
.client-editor .panel { max-width: none; }
.client-editor .form-grid { grid-template-columns: 1fr; }
.client-editor .wide { grid-column: auto; }
.client-content-only { max-width: 980px; }
.client-content-only .panel { max-width: none; }
.admin-display-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 18px;
  align-items: start;
}
.admin-display-workspace .display-settings-panel { max-width: none; }
.display-settings-panel { max-width: none; width: 100%; min-width: 0; }
.setting-groups {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.setting-group-card {
  border: 1px solid rgba(32, 67, 91, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,249,251,0.96)),
    radial-gradient(circle at top right, rgba(207, 188, 161, 0.2), transparent 32%);
  box-shadow: 0 12px 30px rgba(28, 45, 59, 0.06);
  padding: 14px;
}
.setting-group-head {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
  padding: 4px 2px 10px;
  border-bottom: 1px solid rgba(32, 67, 91, 0.08);
}
.setting-group-mark {
  width: 8px;
  min-height: 56px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--group-accent), rgba(255, 255, 255, 0.92));
}
.setting-group-head h3 {
  margin: 0;
  font-size: 18px;
  color: #1a3345;
}
.setting-group-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.setting-group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(32, 67, 91, 0.08);
  color: #355168;
  font-size: 12px;
  font-weight: 600;
}
.visibility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  min-width: 0;
}
.visibility-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid rgba(79, 109, 130, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
  cursor: pointer;
}
.visibility-card input {
  width: 18px;
  height: 18px;
  margin: 0;
}
.visibility-copy {
  display: grid;
  gap: 4px;
}
.visibility-copy strong {
  color: #1a3345;
  font-size: 14px;
}
.visibility-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.display-setting-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.display-setting-list.compact { gap: 10px; }
.display-setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(79, 109, 130, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
}
.display-setting-row.compact {
  grid-template-columns: minmax(0, 1.05fr) minmax(220px, 1.15fr) minmax(200px, 1fr) minmax(160px, .82fr) auto;
  padding: 12px;
}
.display-setting-row > *,
.display-setting-row label,
.setting-name,
.setting-preview,
.setting-hint,
.preview-toolbar > div {
  min-width: 0;
}
.display-setting-row.compact .setting-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  align-self: center;
}
.display-setting-row.compact input[type="number"] {
  min-height: 36px;
}
.setting-name {
  display: grid;
  gap: 4px;
}
.setting-name span {
  color: var(--muted);
  font-size: 12px;
}
.setting-name strong {
  color: #1a3345;
}
.display-setting-row label {
  gap: 7px;
}
.display-setting-row input[type="range"] {
  padding: 0;
}
.display-setting-row input[type="number"] {
  margin-top: 6px;
}
.display-setting-row select {
  min-height: 36px;
}
.display-setting-row .checkbox-inline {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  color: var(--text);
  white-space: normal;
  min-height: 42px;
}
.display-setting-row .checkbox-inline input {
  width: auto;
  min-height: 0;
}
.color-control {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
.color-control input[type="color"] {
  min-height: 42px;
  padding: 4px;
}
.display-settings-panel .panel-head {
  margin-bottom: 14px;
}
.display-settings-panel .panel-head h2 {
  margin-bottom: 4px;
}
.setting-preview {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #cbd6e0;
  border-radius: 6px;
  background: #fff;
  white-space: normal;
  text-align: center;
  padding: 8px 10px;
}
.display-setting-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}
.live-preview {
  position: sticky;
  top: 22px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.home-preview { position: static; }
.client-home-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}
.client-support-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}
.support-card,
.apk-card,
.client-changelog-card {
  border: 1px solid rgba(33, 61, 70, .12);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #f7fafb);
  box-shadow: 0 16px 36px rgba(21, 42, 52, .08);
}
.support-card {
  display: grid;
  gap: 18px;
  padding: 20px;
}
.support-copy span,
.apk-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.support-copy strong,
.apk-card strong {
  display: block;
  color: #17302f;
  font-size: 24px;
  line-height: 1.2;
}
.support-copy p,
.apk-card p {
  margin: 8px 0 0;
  color: #5f7180;
  line-height: 1.55;
}
.support-qrcode {
  display: grid;
  place-items: center;
  width: min(100%, 250px);
  aspect-ratio: 1;
  justify-self: center;
  padding: 12px;
  border: 1px solid #dfe8ed;
  border-radius: 14px;
  background: #fff;
}
.support-qrcode img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.support-qrcode-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 1px dashed #b9c8d2;
  border-radius: 10px;
  color: #78909f;
  background: #f7fafc;
  font-weight: 700;
}
.apk-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
}
.apk-download-button {
  white-space: nowrap;
}
.client-changelog-card {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
}
.client-changelog-head span,
.client-changelog-meta,
.changelog-meta {
  color: var(--muted);
  font-size: 12px;
}
.client-changelog-head strong {
  display: block;
  margin-top: 6px;
  color: #17302f;
  font-size: 20px;
}
.client-changelog-list {
  display: grid;
  gap: 10px;
}
.client-changelog-item {
  padding: 12px;
  border: 1px solid rgba(31, 55, 70, .1);
  border-radius: 10px;
  background: rgba(248, 251, 252, .88);
}
.client-changelog-meta,
.changelog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.client-changelog-meta span,
.changelog-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(23, 48, 47, .08);
}
.client-changelog-item strong {
  display: block;
  color: #213642;
  font-size: 14px;
}
.client-changelog-item p {
  margin: 7px 0 0;
  color: #516676;
  font-size: 13px;
  line-height: 1.55;
}
.client-changelog-empty,
.empty-state {
  padding: 14px;
  border: 1px dashed #cbd8e0;
  border-radius: 10px;
  color: var(--muted);
  background: #f8fafc;
  text-align: center;
}
.client-home-preview {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.preview-stage-large { padding: 16px; }
.preview-stage-large iframe { min-height: min(70vh, 760px); }
.preview-toolbar {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.preview-toolbar strong, .preview-toolbar span { display: block; }
.preview-toolbar span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.preview-stage { padding: 12px; background: #dce3e8; }
.preview-stage iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: min(52vh, 640px);
  border: 0;
  background: #081c31;
  box-shadow: 0 8px 22px rgba(24, 40, 52, .18);
}
.template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.template-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.template-filters button {
  min-height: 36px;
  padding: 0 16px;
}
.template-filters button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.template-card[hidden] { display: none; }
.template-card {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.template-card.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(15,111,143,.12); }
.template-card small { min-height: 32px; color: var(--muted); line-height: 1.45; }
.template-card button { width: 100%; }
.template-card.active button { background: #496268; }
.template-thumbnail {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #dce3e8;
}
.template-admin-note {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #d9e6f1;
  border-radius: 8px;
  background: #f7fbff;
  color: #355168;
  line-height: 1.6;
}
.template-row-disabled {
  background: #faf7f7;
}
.template-row-disabled td {
  color: #7f6570;
}
.template-row-disabled strong {
  color: #5e4850;
}
.template-row-disabled input[type="text"],
.template-row-disabled input[type="number"] {
  background: #fffafb;
  border-color: #ead7db;
}
.template-status-copy {
  margin-top: 6px;
  white-space: normal;
}
.template-thumbnail.portrait {
  width: min(46%, 190px);
  aspect-ratio: 9 / 16;
  justify-self: center;
}
.template-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preview-stage.portrait {
  display: flex;
  justify-content: center;
}
.preview-stage.portrait iframe {
  width: min(100%, 430px);
  aspect-ratio: 9 / 16;
}
.preview-stage-large.portrait iframe {
  min-height: 0;
  height: min(74vh, 800px);
  width: auto;
  max-width: 100%;
}
.portrait-preview .preview-stage {
  display: flex;
  justify-content: center;
}
.portrait-preview .preview-stage iframe {
  min-height: 0;
  height: min(74vh, 800px);
  width: auto;
  max-width: 100%;
  aspect-ratio: 9 / 16;
}
.preview-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.preview-grid figure {
  width: 150px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.preview-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  display: block;
  background: #f5f7fb;
  border-radius: 6px;
}
.file-preview {
  display: grid;
  align-content: start;
}
.apk-preview-icon {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 6px;
  background: linear-gradient(135deg, #17302f, #0f6f8f);
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .08em;
}
.changelog-create-form {
  margin-bottom: 18px;
}
.changelog-admin-list {
  display: grid;
  gap: 12px;
}
.changelog-admin-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.changelog-admin-item.disabled {
  background: #f8fafc;
  opacity: .72;
}
.changelog-admin-item strong {
  display: block;
  color: #1a3345;
  font-size: 17px;
}
.changelog-admin-item p {
  margin: 8px 0 0;
  color: #475b6b;
  line-height: 1.65;
}
.changelog-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #e5b9bd;
  border-radius: 6px;
  background: #fff;
  color: var(--danger);
  cursor: pointer;
}
.preview-grid figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.membership-list {
  display: grid;
  gap: 12px;
}
.membership-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.3fr) minmax(130px, 1fr) 90px 92px 120px auto auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
}
.membership-row .check {
  align-self: end;
  white-space: nowrap;
}
.membership-row button {
  min-height: 42px;
  white-space: nowrap;
}
.membership-row .danger-button {
  background: #fff;
  color: var(--danger);
  border: 1px solid #e6b9bd;
}
.membership-create { margin-top: 18px; }
.price-panel-admin {
  width: min(1320px, calc(100vw - 300px));
  max-width: none;
}
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}
.price-table {
  min-width: 720px;
}
.price-table th:first-child,
.price-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 150px;
  background: #fff;
}
.price-table th:first-child {
  background: #f8fafc;
}
.price-table input {
  min-width: 112px;
}
.price-save {
  margin-top: 18px;
}
.linen-page {
  display: grid;
  gap: 16px;
}
.linen-page-head {
  margin-bottom: 0;
}
.linen-workspace {
  display: grid;
  grid-template-columns: minmax(420px, .88fr) minmax(0, 1.12fr);
  gap: 18px;
  align-items: start;
}
.linen-entry-panel,
.linen-side,
.linen-side .panel {
  min-width: 0;
}
.linen-side {
  display: grid;
  gap: 18px;
}
.date-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef7fa;
  color: #0a5f7c;
  font-weight: 700;
  white-space: nowrap;
}
.linen-date-field {
  margin-bottom: 14px;
}
.linen-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.linen-remark {
  margin-top: 14px;
}
.linen-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.linen-filter-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}
.linen-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.linen-stat-grid article {
  padding: 13px;
  border: 1px solid #e1e9ef;
  border-radius: 8px;
  background: #f8fbfc;
}
.linen-stat-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.linen-stat-grid strong {
  display: block;
  margin-top: 8px;
  color: #17302f;
  font-size: 24px;
}
.linen-history-table table {
  min-width: 820px;
}
.linen-mobile-records {
  display: none;
}
.linen-mobile-record {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.linen-mobile-record header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.linen-mobile-record header strong {
  color: #1a3345;
  font-size: 16px;
}
.linen-mobile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.linen-mobile-grid div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #f8fafc;
  color: #536676;
}
.linen-mobile-grid b {
  color: #17302f;
}
.linen-mobile-record p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}
.feedback-public-body {
  min-height: 100vh;
  margin: 0;
  background: #f2f2f2;
  color: #222;
}
.feedback-public-wrap {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 18px 14px 34px;
}
.feedback-help {
  display: block;
  margin-top: 7px;
  color: #7b8d98;
  font-size: 12px;
}
.feedback-success,
.feedback-error {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 8px;
}
.feedback-success {
  display: grid;
  gap: 2px;
  background: #e9f8ef;
  color: #176137;
}
.feedback-error {
  background: #fff2f2;
  color: #b42318;
}
.feedback-public-body .feedback-mobile-top {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 76px;
  padding: max(18px, env(safe-area-inset-top)) 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .55);
  background: #26c3a0;
  color: #fff;
  text-align: center;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .05);
}
.feedback-public-body .feedback-mobile-top h1 {
  margin: 0;
  font-size: clamp(24px, 7vw, 34px);
  font-weight: 700;
  letter-spacing: 0;
}
.feedback-public-body .feedback-mobile-form {
  display: grid;
  gap: 16px;
}
.feedback-public-body .feedback-mobile-card {
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .03);
}
.feedback-public-body .feedback-fields-card {
  padding: 24px 26px 18px;
}
.feedback-public-body .feedback-field-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 62px;
  border-bottom: 1px solid #eeeeee;
  font-size: 18px;
}
.feedback-public-body .feedback-field-row:first-child {
  min-height: 52px;
}
.feedback-public-body .feedback-field-row span,
.feedback-public-body .feedback-field-row label,
.feedback-public-body .feedback-content-row span {
  color: #333;
  font-weight: 500;
}
.feedback-public-body .feedback-field-row strong {
  min-width: 0;
  color: #999;
  font-weight: 400;
}
.feedback-public-body .feedback-field-row input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #333;
  font-size: 18px;
}
.feedback-public-body .feedback-field-row input::placeholder,
.feedback-public-body .feedback-content-row textarea::placeholder {
  color: #c4c4c4;
}
.feedback-public-body .feedback-content-row {
  position: relative;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 18px;
  min-height: 152px;
  padding: 20px 0 34px;
  border-bottom: 1px solid #eeeeee;
}
.feedback-public-body .feedback-content-row textarea {
  width: 100%;
  min-height: 116px;
  padding: 0;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #333;
  font-size: 18px;
  line-height: 1.65;
}
.feedback-public-body .feedback-content-row b {
  position: absolute;
  right: 0;
  bottom: 12px;
  color: #333;
  font-size: 18px;
  font-weight: 400;
}
.feedback-public-body .feedback-content-row em {
  font-style: normal;
}
.feedback-public-body .feedback-time-row {
  border-bottom: 0;
  min-height: 46px;
}
.feedback-public-body .feedback-upload-card {
  padding: 22px 24px 30px;
  border-radius: 12px;
}
.feedback-public-body .feedback-upload-card h2 {
  margin: 0;
  color: #222;
  font-size: 22px;
  font-weight: 600;
}
.feedback-public-body .feedback-upload-card p {
  margin: 8px 0 24px;
  color: #8d8d8d;
  font-size: 18px;
}
.feedback-public-body .feedback-upload-button {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 10px 0 0;
  cursor: pointer;
  text-align: center;
}
.feedback-public-body .feedback-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}
.feedback-public-body .feedback-camera-icon {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: #e5f8f3;
}
.feedback-public-body .feedback-camera-icon::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 27px;
  width: 43px;
  height: 31px;
  border-radius: 7px;
  background: #26c3a0;
}
.feedback-public-body .feedback-camera-icon::after {
  content: "";
  position: absolute;
  left: 36px;
  top: 34px;
  width: 20px;
  height: 20px;
  border: 4px solid #fff;
  border-radius: 50%;
}
.feedback-public-body .feedback-upload-button strong {
  color: #555;
  font-size: 19px;
  font-weight: 500;
}
.feedback-public-body .feedback-upload-button small {
  color: #9aa3a8;
  font-size: 13px;
}
.feedback-public-body .feedback-submit-button {
  min-height: 62px;
  border-radius: 2px;
  background: #26c3a0;
  color: #fff;
  font-size: 22px;
  font-weight: 600;
}
.feedback-admin-page {
  display: grid;
  gap: 16px;
}
.feedback-admin-grid {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.feedback-qr-panel {
  position: sticky;
  top: 18px;
}
.feedback-qr-preview {
  display: grid;
  gap: 12px;
  justify-items: center;
  margin-top: 14px;
  padding: 18px;
  border: 1px dashed #cbd9df;
  border-radius: 14px;
  background: #f8fbfc;
}
.feedback-qr-preview img {
  width: 220px;
  height: 220px;
  max-width: 100%;
  border-radius: 10px;
  background: #fff;
}
.feedback-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.feedback-stat-grid a {
  display: block;
  padding: 13px;
  border: 1px solid #dde8ed;
  border-radius: 10px;
  background: #f8fbfc;
  color: inherit;
  text-decoration: none;
}
.feedback-stat-grid a.active {
  border-color: #0d7187;
  background: #eaf7fa;
}
.feedback-stat-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.feedback-stat-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
}
.feedback-filter-form {
  display: grid;
  grid-template-columns: minmax(120px, .7fr) minmax(120px, .8fr) repeat(2, minmax(140px, .8fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}
.feedback-table table {
  min-width: 1080px;
}
.feedback-content-cell {
  max-width: 360px;
  white-space: normal;
  line-height: 1.55;
}
.feedback-image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.feedback-image-list img {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #dde6eb;
}
.feedback-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.feedback-status.status-new {
  background: #fff1e6;
  color: #a44804;
}
.feedback-status.status-processing {
  background: #e8f3ff;
  color: #1760a8;
}
.feedback-status.status-done {
  background: #e9f8ef;
  color: #176137;
}
.feedback-update-form {
  display: grid;
  gap: 8px;
  min-width: 190px;
}
.feedback-update-form input,
.feedback-update-form select {
  min-height: 34px;
}
.feedback-update-form button {
  min-height: 34px;
  padding: 0 12px;
}
.feedback-mobile-list {
  display: none;
}
.feedback-mobile-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.feedback-mobile-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.feedback-mobile-card header div {
  display: grid;
  gap: 4px;
}
.feedback-mobile-card header strong {
  color: #17302f;
  font-size: 18px;
}
.feedback-mobile-card header span:not(.feedback-status) {
  color: var(--muted);
  font-size: 12px;
}
.feedback-mobile-card p {
  margin: 0 0 12px;
  line-height: 1.65;
}

@media (max-width: 1180px) {
  .client-workspace,
  .admin-display-workspace,
  .client-home-grid,
  .linen-workspace,
  .feedback-admin-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .live-preview {
    position: static;
  }

  .feedback-qr-panel {
    position: static;
  }
}

@media (max-width: 1220px) {
  .display-setting-row.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .changelog-admin-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .display-setting-row.compact .setting-name {
    grid-column: 1 / -1;
  }

  .display-setting-row.compact .checkbox-inline,
  .display-setting-row.compact .setting-hint {
    grid-column: auto;
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .main,
  .client-main {
    padding: 16px;
  }

  .panel {
    padding: 16px;
  }

  .setting-group-head {
    grid-template-columns: 8px minmax(0, 1fr);
  }

  .setting-group-count {
    grid-column: 2;
    justify-self: start;
  }

  .display-setting-row.compact {
    grid-template-columns: minmax(0, 1fr);
  }

  .display-setting-row.compact .setting-name {
    grid-column: auto;
  }

  .visibility-grid,
  .template-grid,
  .linen-input-grid,
  .linen-filter-form,
  .feedback-public-form,
  .feedback-filter-form {
    grid-template-columns: 1fr;
  }

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

  .linen-history-table,
  .feedback-table {
    display: none;
  }

  .price-table-scroll {
    overflow: visible;
  }

  .price-table {
    border-collapse: separate;
    border-spacing: 0 12px;
  }

  .price-table thead {
    display: none;
  }

  .price-table,
  .price-table tbody,
  .price-table tr,
  .price-table td {
    display: block;
    width: 100%;
  }

  .price-table tr {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(19, 36, 52, 0.05);
  }

  .price-table td {
    display: grid;
    grid-template-columns: minmax(88px, 34%) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #edf2f6;
  }

  .price-table td:last-child {
    border-bottom: 0;
  }

  .price-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
  }

  .price-table td:first-child::before {
    content: "";
    display: none;
  }

  .price-table td:first-child {
    grid-template-columns: 1fr;
    padding: 0 0 10px;
    color: #17302f;
    font-size: 17px;
  }

  .price-table input {
    width: 100%;
    min-height: 42px;
    font-size: 16px;
  }

  .linen-mobile-records,
  .feedback-mobile-list {
    display: grid;
    gap: 10px;
  }

  .preview-stage {
    padding: 8px;
  }

  .preview-stage iframe {
    min-height: min(58vh, 520px);
  }
}

@media (max-width: 900px) {
  .sidebar { position: static; width: auto; }
  .main,
  .client-main {
    margin-left: 0;
    padding: 16px;
  }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .client-workspace { grid-template-columns: 1fr; }
  .live-preview { position: static; }
  .template-grid { grid-template-columns: 1fr; }
  .membership-row { grid-template-columns: 1fr 1fr; }
  .price-panel-admin { width: 100%; }
}

@media (max-width: 420px) {
  .linen-stat-grid,
  .linen-mobile-grid,
  .feedback-stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
