.admin-body { min-height: 100vh; background: #efede7; }
.admin-topbar { height: 72px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); background: rgba(255,253,248,.94); backdrop-filter: blur(15px); }
.admin-top-actions { display: flex; align-items: center; gap: 10px; }
.admin-top-actions > span { margin-right: 8px; color: var(--muted); font-size: 9px; }
.ghost-admin-button,.primary-admin-button { min-height: 38px; padding: 0 14px; border-radius: 9px; font-size: 10px; font-weight: 800; cursor: pointer; }
.ghost-admin-button { border: 1px solid var(--line); background: #fffdf8; }
.primary-admin-button { border: 1px solid var(--ink); color: white; background: var(--ink); box-shadow: 3px 3px 0 var(--purple); }
.ghost-admin-button.full { width: 100%; }
.admin-shell { width: min(1400px,calc(100% - 40px)); margin: 0 auto; padding: 42px 0 80px; }
.admin-hero { display: grid; grid-template-columns: 1.2fr .8fr; align-items: end; gap: 30px; padding: 40px; border: 1px solid var(--ink); border-radius: 22px; color: white; background: var(--purple); overflow: hidden; position: relative; }
.admin-hero::after { content:""; position:absolute; width:360px; height:360px; right:-110px; top:-180px; border: 1px solid rgba(255,255,255,.3); border-radius:50%; box-shadow: 0 0 0 50px rgba(255,255,255,.06),0 0 0 100px rgba(255,255,255,.04); }
.admin-hero .section-index { color: var(--acid); }
.admin-hero h1 { margin: 12px 0; font-size: clamp(38px,5vw,65px); line-height: .98; letter-spacing: -.07em; }
.admin-hero p { max-width: 610px; margin: 0; color: rgba(255,255,255,.65); font-size: 11px; line-height: 1.8; }
.admin-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; position: relative; z-index: 2; }
.admin-kpis article { min-height: 105px; padding: 17px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid rgba(255,255,255,.26); border-radius: 13px; background: rgba(20,12,47,.18); }
.admin-kpis span { color: rgba(255,255,255,.55); font-size: 8px; }
.admin-kpis b { font-size: 30px; }
.admin-warning { margin: 16px 0; padding: 14px 18px; display: flex; gap: 16px; border: 1px solid #d6c450; border-radius: 11px; background: #fff7bb; font-size: 9px; line-height: 1.7; }
.admin-warning b { flex: 0 0 auto; }
.admin-warning span { color: #6e6331; }
.admin-workspace { display: grid; grid-template-columns: 210px 1fr; gap: 16px; }
.admin-sidebar,.admin-content { border: 1px solid var(--line); border-radius: 16px; background: #fffdf8; }
.admin-sidebar { padding: 13px; align-self: start; position: sticky; top: 88px; }
.admin-nav { display: grid; gap: 4px; }
.admin-nav button { min-height: 42px; padding: 0 11px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 700; cursor: pointer; }
.admin-nav button span { min-width: 23px; height: 20px; display: grid; place-items: center; border-radius: 99px; background: var(--paper); font-size: 8px; }
.admin-nav button.selected { color: white; background: var(--ink); }
.admin-nav button.selected span { color: var(--ink); background: var(--acid); }
.admin-data-actions { display: grid; gap: 7px; margin-top: 17px; padding-top: 17px; border-top: 1px solid var(--line); }
.admin-data-actions b { margin-bottom: 4px; font-size: 9px; }
.admin-data-actions button,.admin-data-actions label { min-height: 36px; padding: 0 10px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 8px; cursor: pointer; }
.admin-data-actions input { display: none; }
.admin-data-actions .danger-admin { color: #b52d4b; }
.admin-content { min-width: 0; padding: 18px; }
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.admin-toolbar > span { color: var(--muted); font-size: 9px; }
.admin-search { width: min(420px,100%); height: 42px; padding: 0 13px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.admin-search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 10px; }
.admin-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.admin-card { min-width: 0; padding: 10px; position: relative; border: 1px solid var(--line); border-radius: 13px; background: white; }
.admin-card.is-disabled { opacity: .5; filter: grayscale(.7); }
.admin-card-photo { height: 205px; position: relative; overflow: hidden; border-radius: 9px; background: linear-gradient(145deg,var(--guest),#7652e5); background-size: cover; }
.admin-card-photo > span { position: absolute; left: 12px; bottom: 10px; padding: 5px 7px; border: 1px solid var(--ink); background: var(--acid); font-size: 9px; font-weight: 900; }
.admin-card-badge { position: absolute; left: 17px; top: 17px; padding: 4px 6px; border-radius: 5px; color: white; background: rgba(23,19,38,.8); font-size: 7px; font-weight: 900; }
.admin-card-body { padding: 11px 2px 3px; }
.admin-card-body h3 { margin: 0 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.admin-card-body p { height: 30px; margin: 0; overflow: hidden; color: var(--muted); font-size: 8px; line-height: 1.8; }
.admin-card-meta { display: flex; justify-content: space-between; margin: 11px 0; color: #9a94a2; font-size: 7px; }
.admin-card-actions { display: grid; grid-template-columns: 30px 30px 1fr; gap: 6px; }
.admin-card-actions button { min-height: 32px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); font-size: 8px; cursor: pointer; }
.admin-card-actions .edit-actor { color: white; background: var(--ink); }
.admin-empty { padding: 80px 20px; text-align: center; color: var(--muted); font-size: 11px; }
.actor-editor { width: min(1080px,calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; border: 1px solid var(--ink); border-radius: 18px; background: #fffdf8; box-shadow: 12px 14px 0 rgba(23,19,38,.85); }
.actor-editor::backdrop { background: rgba(18,13,35,.78); backdrop-filter: blur(8px); }
.editor-header { height: 74px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.editor-header h2 { margin: 3px 0 0; font-size: 25px; letter-spacing: -.05em; }
.editor-header > button { border: 0; background: transparent; font-size: 28px; cursor: pointer; }
.actor-editor form { padding: 22px; }
.editor-layout { display: grid; grid-template-columns: 260px 1fr; gap: 22px; }
.photo-editor { padding: 13px; border-radius: 13px; background: var(--paper); }
.admin-photo-preview { height: 320px; margin-bottom: 17px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 11px; background: linear-gradient(145deg,#ff9dcc,#7553df); background-size: cover; color: var(--ink); }
.admin-photo-preview span { padding: 7px 9px; border: 1px solid var(--ink); background: var(--acid); font-weight: 900; }
.editor-fields { min-width: 0; }
.editor-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actor-editor .field-group { margin-bottom: 13px; }
.actor-editor input,.actor-editor select,.actor-editor textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); outline: 0; }
.actor-editor input,.actor-editor select { height: 42px; padding: 0 11px; }
.actor-editor textarea { min-height: 82px; padding: 11px; resize: vertical; }
.actor-editor input[type=file] { height: auto; padding: 8px; font-size: 8px; }
.actor-editor input[type=range] { height: 5px; padding: 0; }
.actor-editor .field-group > small { color: var(--muted); font-size: 7px; line-height: 1.5; }
.choice-editor { display: grid; grid-template-columns: 66px 1fr 1fr 1fr; gap: 9px; align-items: end; padding: 12px; margin-bottom: 13px; border: 1px solid var(--line); border-radius: 11px; background: #f2eeff; }
.choice-editor > b { align-self: center; font-size: 9px; }
.choice-editor .field-group { margin: 0; }
.switch-field { align-content: start; }
.admin-switch { height: 42px; display: flex; align-items: center; gap: 8px; }
.admin-switch input { display: none; }
.admin-switch span { width: 40px; height: 23px; padding: 3px; display: block; border-radius: 99px; background: #bdb8c8; }
.admin-switch span::after { content:""; display:block; width:17px; height:17px; border-radius:50%; background:white; transition:.2s; }
.admin-switch input:checked + span { background:var(--purple); }
.admin-switch input:checked + span::after { transform:translateX(17px); }
.admin-switch b { font-size: 9px; }
.editor-footer { padding-top: 16px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
.editor-footer > div { display: flex; gap: 9px; }
.danger-text-button { border: 0; background: transparent; color: #b52d4b; font-size: 9px; font-weight: 800; cursor: pointer; }
.admin-toast { position: fixed; left: 50%; bottom: 25px; z-index: 100; padding: 10px 14px; border-radius: 8px; color: white; background: var(--ink); font-size: 9px; opacity: 0; transform: translate(-50%,10px); transition: .2s; pointer-events: none; }
.admin-toast.show { opacity: 1; transform: translate(-50%,0); }

@media (max-width: 1050px) { .admin-grid { grid-template-columns: repeat(3,1fr); } .admin-hero { grid-template-columns: 1fr; } }
@media (min-width: 761px) and (max-width: 1024px) {
  .admin-shell { width: min(100% - 24px,1400px); }
  .admin-workspace { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  .admin-nav { grid-template-columns: repeat(4,1fr); }
  .admin-data-actions { grid-template-columns: repeat(3,1fr); }
  .admin-data-actions b { grid-column: 1 / 4; }
  .admin-grid { grid-template-columns: repeat(3,1fr); }
  .editor-layout { grid-template-columns: 220px 1fr; }
  .admin-photo-preview { height: 280px; }
}
@media (max-width: 760px) {
  .admin-topbar { height: auto; min-height: calc(66px + env(safe-area-inset-top)); padding: calc(10px + env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) 10px max(14px,env(safe-area-inset-left)); }
  .admin-top-actions > span,.admin-top-actions .ghost-admin-button { display: none; }
  .admin-shell { width: min(100% - 20px,1400px); padding: 18px 0 calc(80px + env(safe-area-inset-bottom)); }
  .admin-hero { padding: 25px 20px; }
  .admin-kpis { grid-template-columns: 1fr 1fr; }
  .admin-workspace { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  .admin-nav { grid-template-columns: 1fr 1fr; }
  .admin-data-actions { grid-template-columns: 1fr 1fr; }
  .admin-data-actions b { grid-column: 1 / 3; }
  .admin-grid { grid-template-columns: 1fr 1fr; }
  .admin-card-photo { height: 180px; }
  .editor-layout { grid-template-columns: 1fr; }
  .photo-editor { display: grid; grid-template-columns: 160px 1fr; gap: 12px; }
  .admin-photo-preview { height: 210px; grid-row: 1 / 5; }
  .editor-row,.choice-editor { grid-template-columns: 1fr; }
  .choice-editor > b { margin-bottom: 5px; }
}
@media (max-width: 480px) { .admin-grid { grid-template-columns: 1fr; } .admin-kpis { grid-template-columns: 1fr 1fr; } .photo-editor { display:block; } }
