:root{
  --bg:#0b0f19;
  --surface:#111827;
  --surface2:#0f172a;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --primary:#60a5fa;
  --danger:#fb7185;
  --border:rgba(255,255,255,.10);
  --radius:14px;
  --shadow: 0 12px 30px rgba(0,0,0,.35);
  --font: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font);
  background: radial-gradient(900px 600px at 10% 0%, rgba(96,165,250,.15), transparent 60%),
              radial-gradient(700px 500px at 90% 10%, rgba(251,113,133,.12), transparent 60%),
              var(--bg);
  color:var(--text);
}
a{color:inherit}
.btn{
  display:inline-flex; gap:8px; align-items:center; justify-content:center;
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
  background:rgba(255,255,255,.03);
  color:var(--text);
  text-decoration:none;
  cursor:pointer;
}
.btn--primary{
  background: linear-gradient(135deg, rgba(96,165,250,.95), rgba(96,165,250,.65));
  border-color: rgba(96,165,250,.45);
  color:#061022;
  font-weight:700;
}
.btn--ghost{background:transparent}
.btn--danger{border-color: rgba(251,113,133,.45); color: #fecdd3}
.input, .textarea, .select{
  width:100%;
  border:1px solid var(--border);
  background: rgba(17,24,39,.55);
  color: var(--text);
  border-radius:12px;
  padding:10px 12px;
  outline:none;
}
.textarea{min-height:160px; resize:vertical}
.label{display:block; margin-top:10px; margin-bottom:6px; color:var(--muted); font-size:13px}
.seo-reload-wrap{margin-top:4px}
.seo-reload-inline{margin-left:6px}
.seo-reload{
  color:#86efac !important;
  text-decoration:none;
  font-size:13px;
  font-weight:800;
}
.seo-reload:hover{text-decoration:underline}
.muted{color:var(--muted); font-size:13px}
.mt8{margin-top:8px}
.flash{
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  padding:10px 12px;
  border-radius:12px;
  margin-bottom:12px;
}
.flash--error{border-color: rgba(251,113,133,.35); color:#fecdd3}

.top{
  position:sticky; top:0; z-index:5;
  background: rgba(11,15,25,.55);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.top__inner{
  max-width:1200px;
  margin:0 auto;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.brand{font-weight:800; letter-spacing:.5px}
.top__right{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.shell{
  max-width:1200px;
  margin:16px auto;
  padding:0 16px 40px;
  display:grid;
  grid-template-columns: 240px 1fr;
  gap:16px;
}
.nav{
  border:1px solid var(--border);
  background: rgba(17,24,39,.45);
  border-radius: var(--radius);
  padding:12px;
  box-shadow: var(--shadow);
  height: fit-content;
}
.nav__a{
  display:block;
  padding:10px 10px;
  border-radius: 12px;
  text-decoration:none;
  color: var(--text);
  border: 1px solid transparent;
}
.nav__a:hover{background: rgba(255,255,255,.03)}
.nav__a--active{
  border-color: rgba(96,165,250,.35);
  background: rgba(96,165,250,.10);
}
.main__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin: 6px 0 12px;
}
.h1{font-size:20px; margin:0}
.actions{display:flex; gap:8px; flex-wrap:wrap}
.card{
  border:1px solid var(--border);
  background: rgba(17,24,39,.45);
  border-radius: var(--radius);
  padding:14px;
  box-shadow: var(--shadow);
}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:12px}
[data-html-box-row="1"]{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  justify-content:center;
  gap:12px;
  width:100%;
  margin:0;
}
[data-html-box-row="1"] > [data-html-box="1"]{
  flex:0 0 auto;
}
[data-html-box-row="1"][data-html-box-stack="1"]{
  flex-direction:column;
  flex-wrap:nowrap;
  align-items:stretch;
  justify-content:flex-start;
}
[data-html-box-row="1"][data-html-box-stack="1"] > [data-html-box="1"]{
  width:100% !important;
  max-width:100% !important;
}
.row{display:flex; gap:10px; align-items:center; justify-content:space-between; padding:10px 0; border-bottom:1px solid var(--border)}
.row:last-child{border-bottom:none}
.table{width:100%; border-collapse:collapse}
.table th,.table td{padding:10px 8px; border-bottom:1px solid var(--border); text-align:left; vertical-align:top}
.pill{display:inline-block; padding:2px 8px; border-radius:999px; border:1px solid var(--border); color:var(--muted); font-size:12px}
.pill-action{
  text-decoration:none;
  cursor:pointer;
  background:rgba(255,255,255,.03);
  font-family:inherit;
  font-size:12px;
  line-height:1.3;
}
.pill-action:hover{
  text-decoration:none;
  background:rgba(255,255,255,.06);
}
.pill-action--danger{
  border-color: rgba(251,113,133,.45);
  color: #fecdd3;
}
.pill--green{
  color:#bbf7d0;
  border-color: rgba(34,197,94,.45);
  background: rgba(34,197,94,.18);
}

.toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 104px;
  padding:8px 10px;
  border-radius: 999px;
  border:1px solid var(--border);
  cursor:pointer;
  user-select:none;
  font-weight:800;
}
.toggle--on{
  background: rgba(34,197,94,.18);
  border-color: rgba(34,197,94,.35);
  color: #bbf7d0;
}
.toggle--off{
  background: rgba(239,68,68,.18);
  border-color: rgba(239,68,68,.35);
  color: #fecaca;
}
.toggle__dot{
  width:10px;
  height:10px;
  border-radius:999px;
  margin-right:8px;
  background: currentColor;
  opacity: .85;
}

.tiles{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:10px;
}
.tile{
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:stretch;
  border:1px solid var(--border);
  background: rgba(17,24,39,.45);
  border-radius: var(--radius);
  padding:10px;
}
.tile__img{
  width:132px;
  height:132px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  object-fit:contain;
  background: rgba(255,255,255,.04);
  flex: 0 0 auto;
  margin: 0 auto;
}
.tile__body{min-width:0}
.tile__title{font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-align:center}
.tile__meta{margin-top:2px}
.tile__actions{display:flex; gap:8px; flex-wrap:wrap; justify-content:center}
.image-actions{
  display:flex;
  gap:8px;
  flex-wrap:nowrap;
  align-items:center;
}
.image-actions .btn{
  white-space:nowrap;
}

.login{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.login__box{
  width:min(420px, 100%);
  border:1px solid var(--border);
  background: rgba(17,24,39,.55);
  border-radius: var(--radius);
  padding:18px;
  box-shadow: var(--shadow);
}
.login__brand{font-weight:900; font-size:18px; margin-bottom:12px}

@media (max-width: 900px){
  .shell{grid-template-columns: 1fr}
  .tiles{grid-template-columns: 1fr}
}
@media (max-width: 620px){
  [data-html-box-row="1"] > [data-html-box="1"]{
    width:min(100%, var(--html-box-target-width, 100%)) !important;
    max-width:100% !important;
  }
}

.align-icon{
  display:inline-block;
  width:18px;
  height:14px;
  border-radius:4px;
  background-repeat:no-repeat;
  background-image:
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor);
  background-size:14px 2px, 10px 2px, 12px 2px;
  background-position:0 1px, 0 6px, 0 11px;
  opacity:.9;
}
.align-icon--center{
  background-position:2px 1px, 4px 6px, 3px 11px;
}
.align-icon--right{
  background-position:4px 1px, 8px 6px, 6px 11px;
}

