/* ==========================================================================
   Key Vault — Admin Product Editor
   Requires tokens.css + admin-dashboard.css (for sidebar/topbar) first.
   ========================================================================== */

.form-shell{
  max-width:820px;
}
.form-section{
  background:var(--bg-panel);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  padding:22px 22px 20px;
  margin-bottom:16px;
}
.form-section-title{
  font-family:var(--font-display);
  font-size:14.5px;
  font-weight:600;
  margin:0 0 4px;
}
.form-section-hint{
  font-size:12px;
  color:var(--text-faint);
  margin:0 0 18px;
}
.field{margin-bottom:16px;}
.field:last-child{margin-bottom:0;}
.field label{
  display:block;
  font-size:12px;
  font-weight:600;
  color:var(--text-muted);
  margin-bottom:7px;
}
.field input[type="text"],
.field input[type="url"],
.field select{
  width:100%;
  background:var(--bg-void);
  border:1px solid var(--line);
  color:var(--text-primary);
  font-family:var(--font-body);
  font-size:13.5px;
  padding:10px 12px;
  border-radius:var(--radius-sm);
  outline:none;
  transition:border-color .12s ease;
}
.field input:focus,
.field select:focus{border-color:var(--signal-dim);}
.field-row{display:grid; grid-template-columns:1fr 1fr; gap:14px;}

/* Rich text toolbar (visual only) */
.rte{
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  overflow:hidden;
}
.rte-toolbar{
  display:flex;
  gap:2px;
  padding:7px 8px;
  background:var(--bg-panel-2);
  border-bottom:1px solid var(--line);
}
.rte-btn{
  width:28px;height:26px;
  display:flex;align-items:center;justify-content:center;
  border-radius:6px;
  color:var(--text-muted);
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}
.rte-btn:hover{background:var(--line-soft); color:var(--text-primary);}
.rte-body{
  min-height:110px;
  background:var(--bg-void);
  padding:12px 14px;
  font-size:13.5px;
  line-height:1.6;
  color:var(--text-primary);
}
.rte-body[contenteditable]:focus{outline:none;}
.rte-body p{margin:0 0 8px;}
.rte-body p:last-child{margin-bottom:0;}

/* Cover upload */
.cover-upload{
  aspect-ratio:16/9;
  border:1.5px dashed var(--line);
  border-radius:var(--radius-md);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  color:var(--text-faint);
  font-size:12.5px;
  cursor:pointer;
  background:
    linear-gradient(135deg, rgba(90,168,221,0.05), rgba(148,201,61,0.04));
  transition:border-color .12s ease;
}
.cover-upload:hover{border-color:var(--signal-dim); color:var(--text-muted);}
.cover-upload svg{width:26px;height:26px;}

/* Screenshot grid */
.shot-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:10px;
}
.shot-slot{
  aspect-ratio:16/9;
  border-radius:var(--radius-sm);
  border:1px solid var(--line);
  background:var(--bg-void);
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
}
.shot-slot.filled{
  background:linear-gradient(135deg, rgba(90,168,221,0.14), rgba(148,201,61,0.08));
  border-style:solid;
}
.shot-slot .num{
  font-family:var(--font-mono);
  font-size:10px;
  color:var(--text-faint);
  position:absolute;
  top:6px; left:8px;
}
.shot-slot.add{
  border-style:dashed;
  color:var(--text-faint);
  cursor:pointer;
  font-size:22px;
  font-weight:300;
}
.shot-slot.add:hover{border-color:var(--signal-dim); color:var(--signal);}

/* Youtube list */
.yt-row{
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom:10px;
}
.yt-row:last-child{margin-bottom:0;}
.yt-row input{flex:1;}
.yt-remove{
  flex-shrink:0;
  width:32px;height:32px;
  border-radius:var(--radius-sm);
  border:1px solid var(--line);
  color:var(--text-faint);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;
}
.yt-remove:hover{border-color:var(--danger); color:var(--danger);}
.add-link{
  font-size:12.5px;
  color:var(--signal);
  cursor:pointer;
  font-weight:500;
  display:inline-flex;
  align-items:center;
  gap:5px;
  margin-top:4px;
}

/* Footer actions */
.form-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:6px;
  padding-bottom:20px;
}
.btn{
  font-family:var(--font-body);
  font-size:13px;
  font-weight:600;
  padding:10px 18px;
  border-radius:var(--radius-sm);
  cursor:pointer;
  border:1px solid var(--line);
}
.btn-ghost{background:transparent; color:var(--text-muted);}
.btn-ghost:hover{color:var(--text-primary); border-color:var(--text-muted);}
.btn-primary{background:var(--signal); color:var(--bg-void); border-color:var(--signal);}
.btn-primary:hover{background:#5ff0cf;}

.status-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  font-weight:600;
  padding:4px 10px;
  border-radius:99px;
  background:rgba(90,168,221,0.12);
  color:var(--signal);
}

@media (max-width:640px){
  .field-row{grid-template-columns:1fr;}
  .shot-grid{grid-template-columns:repeat(2, 1fr);}
}
