:root{
  --ink:#0a0a0b;
  --paper:#f2efe8;
  --acid:#d9ff3f;
  --soft:#b8b4ad;
  --panel:rgba(18,18,19,.9);
  --line:rgba(242,239,232,.16);
  --muted:#c9c5bf;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(circle at top, rgba(217,255,63,.14), transparent 28%),
    linear-gradient(180deg, #090909 0%, #121212 100%);
  color:var(--paper);
  font-family:'Manrope',Arial,sans-serif;
}

button,input{font:inherit}

.admin-shell{
  max-width:1200px;
  margin:0 auto;
  padding:28px 24px 80px;
}

.admin-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:30px;
  padding:0 4px;
}

.brand-block{display:flex;align-items:center;gap:10px;letter-spacing:.12em;font-family:'DM Mono',monospace;font-size:11px}
.brand-block i{display:block;width:5px;height:5px;background:var(--acid);border-radius:50%}
.admin-badge{
  padding:8px 12px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--acid);
  font:10px 'DM Mono',monospace;
  letter-spacing:.16em;
  text-transform:uppercase;
  background:rgba(255,255,255,.02);
}

.admin-root{max-width:980px;margin:0 auto}

.panel{
  background:linear-gradient(180deg, rgba(17,17,18,.96), rgba(10,10,11,.9));
  border:1px solid var(--line);
  border-radius:22px;
  padding:24px;
  margin:18px 0;
  box-shadow:0 18px 50px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.04);
  position:relative;
  overflow:hidden;
}

.panel::before{
  content:'';
  position:absolute;
  inset:0 auto auto 0;
  width:100%;
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(217,255,63,.8), transparent);
  opacity:.7;
}

.auth-card{padding:32px 28px}

.eyebrow{font:10px 'DM Mono',monospace;letter-spacing:.12em;text-transform:uppercase;color:var(--soft);display:flex;gap:9px;align-items:center;margin:0 0 20px}
.eyebrow span{width:26px;height:1px;background:var(--acid)}

h1,h2,h3{margin:0 0 12px}
h1{font-size:clamp(32px,4vw,54px);letter-spacing:-.06em;line-height:1}
h2{font-size:clamp(20px,2.3vw,28px);letter-spacing:-.04em}

.panel-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:18px;
}

.panel-head h2{
  margin:0;
  color:var(--paper);
  letter-spacing:-.04em;
}

#nav-list,#shorts-list,#guests-list{display:grid;gap:16px}

.entry-card{
  display:grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap:16px;
  align-items:start;
  padding:18px;
  background:linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.015));
  border:1px solid rgba(242,239,232,.14);
  border-radius:18px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
  transition:transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.entry-card:hover{
  transform:translateY(-2px);
  border-color:rgba(217,255,63,.4);
  box-shadow:0 18px 30px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.04);
}

.entry-grid{
  display:grid;
  gap:12px;
  min-width:0;
}

.entry-grid-2{grid-template-columns:repeat(2,minmax(160px,1fr));}
.entry-grid-3{grid-template-columns:repeat(3,minmax(140px,1fr));}

.entry-field{
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
  font:10px 'DM Mono',monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--soft);
}

.entry-field input,
.upload-input{
  width:100%;
  background:rgba(255,255,255,.02);
  border:1px solid var(--line);
  border-radius:12px;
  color:var(--paper);
  padding:12px 14px;
  outline:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}

.field-with-actions{
  display:flex;
  align-items:center;
  gap:8px;
}

.field-with-actions input{flex:1}

.inline-actions{display:flex;gap:8px}

.clear-btn,
.upload-button{
  border:1px solid rgba(242,239,232,.16);
  background:rgba(255,255,255,.03);
  color:var(--paper);
  border-radius:10px;
  padding:10px 12px;
  font:10px 'DM Mono',monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
  cursor:pointer;
  transition:all .2s ease;
}

.clear-btn:hover,
.upload-button:hover{border-color:rgba(217,255,63,.45); background:rgba(217,255,63,.06)}

.file-picker{
  display:flex;
  gap:8px;
  align-items:center;
}

.hidden-file-input{display:none}

.upload-button{display:inline-flex;align-items:center;justify-content:center;min-width:86px}

.entry-field input:focus,
.upload-input:focus,
input[type="text"]:focus,input[type="password"]:focus,input[type="url"]:focus{border-color:rgba(217,255,63,.8);box-shadow:0 0 0 2px rgba(217,255,63,.12)}

.entry-card .entry-field span,
.field-wrap span,
.import-wrap span{
  opacity:.82;
}

.section-tag{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border-radius:999px;
  background:rgba(217,255,63,.08);
  border:1px solid rgba(217,255,63,.2);
  font:10px 'DM Mono',monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--acid);
  margin-bottom:10px;
}

.section-tag::before{
  content:'';
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--acid);
}

.row-actions{display:flex;align-items:flex-start;justify-content:flex-end}

.remove-btn{
  min-width:110px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:transparent;
  color:var(--paper);
  font:10px 'DM Mono',monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.media-panel{
  display:flex;
  flex-direction:column;
  gap:12px;
  min-width:200px;
  max-width:220px;
}

.short-card,
.guest-card{
  grid-template-columns: 220px minmax(0, 1fr) auto;
}

.short-thumb,
.guest-photo{
  width:100%;
  height:120px;
  object-fit:cover;
  background:#111;
  border-radius:16px;
  border:1px solid var(--line);
  display:block;
}

.guest-photo{height:100px; width:100px; border-radius:16px; margin:0 auto}

.panel-note{color:var(--muted);font-size:13px;line-height:1.6;margin:-4px 0 18px}
#stories-list{display:grid;gap:16px}
.story-card{grid-template-columns:220px minmax(0,1fr) auto;}
.story-media-panel{max-width:none}
.story-preview{height:150px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(135deg,rgba(217,255,63,.18),rgba(255,255,255,.03));display:grid;place-items:center;overflow:hidden;position:relative}
.story-preview img{width:100%;height:100%;object-fit:cover}
.story-preview img[hidden]{display:none}
.story-emoji-preview{position:absolute;right:12px;bottom:10px;font-size:28px;filter:drop-shadow(0 2px 4px rgba(0,0,0,.55))}
.story-fields{grid-template-columns:repeat(2,minmax(130px,1fr));align-content:start}
.story-message{grid-column:2}
.entry-field textarea{width:100%;resize:vertical;background:rgba(255,255,255,.02);border:1px solid var(--line);border-radius:12px;color:var(--paper);padding:12px 14px;outline:none;font:13px Manrope,sans-serif;line-height:1.5}
.entry-field textarea:focus{border-color:rgba(217,255,63,.8);box-shadow:0 0 0 2px rgba(217,255,63,.12)}
@media(max-width:780px){.story-card{grid-template-columns:1fr}.story-message{grid-column:auto}.story-fields{grid-template-columns:1fr}.story-media-panel{max-width:none}.story-preview{height:190px}.story-card .row-actions{justify-content:flex-start}}

.avatar-panel{align-items:center;max-width:200px}

.field-wrap{
  display:flex;
  flex-direction:column;
  gap:8px;
  font:10px 'DM Mono',monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--soft);
}

.image-grid{display:grid;gap:18px}

.media-field-block{
  display:grid;
  gap:10px;
  padding:14px;
  border:1px solid rgba(242,239,232,.08);
  border-radius:16px;
  background:rgba(255,255,255,.015);
}

input[type="text"],input[type="password"],input[type="url"],input[type="file"],textarea,select{
  width:100%;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:var(--paper);
  outline:none;
}
input::placeholder{color:rgba(242,239,232,.48)}
input[type="file"]{padding:10px 12px;cursor:pointer}

button{
  border:1px solid var(--line);
  border-radius:999px;
  cursor:pointer;
  transition:transform .2s ease, border-color .2s ease, background .2s ease;
}
button:hover{transform:translateY(-1px)}
.primary-btn,
.secondary-btn,
.ghost-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 18px;
  font:10px 'DM Mono',monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.primary-btn{
  background:var(--acid);
  color:#101010;
  border-color:var(--acid);
  font-weight:700;
}
.secondary-btn{
  background:rgba(255,255,255,.02);
  color:var(--paper);
  border-color:rgba(242,239,232,.2);
}
.ghost-btn{
  background:transparent;
  color:var(--paper);
}

#nav-add,#short-add,#guest-add{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}

.note{margin-top:14px;color:var(--soft);font-size:13px}
#status{
  margin-top:14px;
  color:var(--acid);
  font:10px 'DM Mono',monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
  display:inline-block;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(217,255,63,.25);
  background:rgba(217,255,63,.06);
}

.actions{padding-top:18px}
.action-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:flex-end;
}
.import-wrap{display:flex;flex-direction:column;gap:8px;font:10px 'DM Mono',monospace;letter-spacing:.12em;text-transform:uppercase;color:var(--soft)}
.import-wrap input{max-width:220px}

.guest-photo,
.short-thumb{
  width:80px;
  height:80px;
  object-fit:cover;
  border-radius:12px;
  border:1px solid var(--line);
  background:#111;
  display:block;
}

.short-thumb{width:100%;max-width:180px;height:110px;border-radius:12px}

#nav-list>div input,
#shorts-list>div input,
#guests-list>div input{
  min-width:0;
}

@media (max-width:980px){
  .entry-grid-2,.entry-grid-3{grid-template-columns:1fr 1fr}
  .short-card,.guest-card{grid-template-columns:1fr}
  .media-panel{max-width:none;min-width:0}
}

@media (max-width:780px){
  .admin-shell{padding:20px 14px 60px}
  .admin-header{padding:0}
  .panel{padding:18px 14px}
  .entry-card{grid-template-columns:1fr; padding:16px}
  .entry-grid-2,.entry-grid-3{grid-template-columns:1fr}
  .action-row{flex-direction:column;align-items:stretch}
  .import-wrap input{max-width:none}
}
