.theme-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 18px;
  align-items: start;
}
.theme-actions { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 14px; }
.theme-config-form { display:grid; gap:16px; }
.theme-icon-editor { border-top:1px solid var(--line); padding-top:14px; }
.theme-icon-editor h3 { margin:0 0 4px; }
.theme-icon-editor p { margin:0 0 12px; color:var(--muted); }
.theme-icon-row { display:grid; grid-template-columns:44px 100px minmax(0,1fr) 76px; gap:10px; align-items:center; margin:8px 0; }
.theme-icon-row img { width:40px; height:40px; object-fit:contain; background:#f6f7f9; border:1px solid var(--line); border-radius:6px; }
.theme-icon-row label { margin:0; }

.theme-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.theme-option {
  min-height: 84px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.theme-option-wrap { position:relative; min-width:0; }
.theme-option-wrap .theme-option { width:100%; }
.theme-export-check { position:absolute; z-index:2; top:8px; right:8px; width:22px; height:22px; margin:0; display:grid; place-items:center; border:1px solid #d8dee7; border-radius:5px; background:#fff; cursor:pointer; }
.theme-export-check input { position:absolute; opacity:0; pointer-events:none; }
.theme-export-check span { width:12px; height:12px; margin:0; border-radius:3px; background:#eef1f5; }
.theme-export-check input:checked + span { background:var(--orange); box-shadow:inset 0 0 0 3px #fff; }
.theme-folder-toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:0 0 14px; padding:10px; border:1px solid var(--line); border-radius:7px; background:#fafbfc; }
.theme-folders,.theme-folder-actions { display:flex; align-items:center; flex-wrap:wrap; gap:7px; }
.theme-folders button { height:34px; padding:0 11px; border:1px solid transparent; border-radius:5px; background:transparent; color:#596579; cursor:pointer; }
.theme-folders button.active { border-color:#ffd3b7; background:var(--orange-soft); color:#d9580e; font-weight:700; }
.theme-folders button span { color:#9aa3af; font-size:11px; }
.theme-folder-actions select { width:150px; height:38px; }
.theme-empty { grid-column:1/-1; padding:42px 18px; border:1px dashed var(--line); border-radius:7px; color:var(--muted); text-align:center; }
.btn:disabled,select:disabled { opacity:.45; cursor:not-allowed; }

.theme-option span {
  width: 28px;
  height: 28px;
  display: inline-block;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
  vertical-align: top;
}

.theme-option strong,
.theme-option small {
  display: block;
  margin-left: 40px;
}

.theme-option strong {
  margin-top: -30px;
  color: var(--text);
}

.theme-option small {
  margin-top: 4px;
  white-space: normal;
  line-height: 1.35;
}

.theme-option.selected {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
}

.theme-phone {
  min-height: 440px;
  padding: 14px;
  border: 1px solid var(--tb);
  border-radius: 24px;
  background: linear-gradient(180deg, var(--tbg), #fff);
  box-shadow: 0 16px 40px rgba(25,37,58,.08);
}

.theme-phone-hero {
  min-height: 138px;
  padding: 18px;
  border-radius: 18px;
  background: var(--hero);
}

.theme-phone-hero span,
.theme-phone-hero b,
.theme-phone-hero em {
  display: block;
}

.theme-phone-hero span {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--ts);
  color: var(--tp);
  font-size: 12px;
}

.theme-phone-hero b {
  margin-top: 18px;
  color: #172033;
  font-size: 24px;
}

.theme-phone-hero em {
  margin-top: 5px;
  color: var(--tp);
  font-style: normal;
  font-weight: 700;
}

.theme-phone-section,
.theme-phone-grid > div {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--tb);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
}

.theme-phone-section {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.theme-phone-section strong,
.theme-phone-section small,
.theme-phone-grid span {
  display: block;
}

.theme-phone-section small {
  margin-top: 4px;
}

.theme-phone-section i {
  height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--ts);
  color: var(--tp);
  font-style: normal;
  font-size: 12px;
}

.theme-phone-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.theme-phone-grid b,
.theme-phone-grid img {
  width: 38px;
  height: 38px;
  display: block;
  border-radius: 12px;
  background: var(--tp);
  box-shadow: 0 0 0 8px var(--ts);
  object-fit: contain;
}

.theme-phone-grid span {
  margin-top: 14px;
  font-weight: 700;
}

.theme-phone button {
  width: 100%;
  height: 42px;
  margin-top: 14px;
  border: 0;
  border-radius: 14px;
  background: var(--tp);
  color: #fff;
  font-weight: 800;
}

@media (max-width: 1000px) {
  .theme-editor {
    grid-template-columns: 1fr;
  }
  .theme-icon-row { grid-template-columns:44px minmax(0,1fr) 76px; }
  .theme-icon-row label { grid-column:2 / 4; }
}
