@import url("../styles.css");

body { background: var(--paper-dim); }

.admin-shell { max-width: 880px; margin: 0 auto; padding: 40px 20px 100px; }

.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px; gap: 16px; flex-wrap: wrap;
}
.admin-header h1 {
  font-family: var(--font-display); font-size: 24px; font-weight: 600;
  color: var(--navy-950); margin: 0;
}
.admin-header a { font-size: 13px; color: var(--teal-500); text-decoration: none; }
.admin-header a:hover { text-decoration: underline; }

/* ---- gate (token entry) ---- */
.gate {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px; text-align: center; max-width: 480px; margin: 60px auto;
}
.gate h2 { font-family: var(--font-display); font-size: 20px; margin: 0 0 8px; color: var(--navy-950); }
.gate p { color: var(--ink-soft); font-size: 14px; line-height: 1.6; margin: 0 0 24px; }
.gate details {
  text-align: left; font-size: 13px; color: var(--ink-soft);
  background: var(--paper-dim); border-radius: 12px; padding: 14px 16px; margin-bottom: 20px;
}
.gate details summary { cursor: pointer; font-weight: 600; color: var(--navy-950); }
.gate details ol { margin: 10px 0 0; padding-left: 20px; }
.gate details li { margin-bottom: 6px; }

/* ---- cards / sections ---- */
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; margin-bottom: 22px;
}
.panel h2 {
  font-family: var(--font-display); font-size: 18px; font-weight: 600;
  color: var(--navy-950); margin: 0 0 4px;
}
.panel .panel-desc { font-size: 13px; color: var(--ink-soft); margin: 0 0 20px; }

.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13px; font-weight: 600; color: var(--ink);
  margin-bottom: 6px;
}
.field .hint { font-weight: 400; color: var(--ink-soft); font-size: 12px; margin-left: 4px; }
.field input[type="text"],
.field input[type="url"],
.field input[type="datetime-local"],
.field textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper-dim);
  font-family: var(--font-body); font-size: 14px; color: var(--ink);
}
.field input:focus, .field textarea:focus { background: #fff; border-color: var(--teal-500); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

/* ---- image upload ---- */
.img-field { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.img-field__preview {
  width: 72px; height: 72px; border-radius: 10px; object-fit: cover;
  background: var(--paper-dim); border: 1px solid var(--line); flex: none;
}
.img-field__body { flex: 1; }
.img-field__body label { font-size: 13px; font-weight: 600; margin-bottom: 6px; display: block; }
.img-field input[type="file"] { font-size: 13px; }

/* ---- kotak (3 action links) ---- */
.kotak-block + .kotak-block { margin-top: 20px; padding-top: 20px; border-top: 1px dashed var(--line); }
.kotak-block__title { font-weight: 600; font-size: 14px; color: var(--navy-950); margin-bottom: 12px; }

/* ---- info list manager ---- */
.info-row {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px;
  background: var(--paper-dim);
}
.info-row .field { flex: 1; margin-bottom: 0; }
.info-row .field + .field { margin-top: 8px; }
.info-row__actions { display: flex; flex-direction: column; gap: 4px; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); transition: background 0.2s ease, color 0.2s ease;
}
.icon-btn:hover { background: var(--paper-dim); color: var(--ink); }
.icon-btn--danger:hover { background: #fdecea; color: #c0392b; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  padding: 11px 20px; border-radius: 100px; border: none; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary { background: var(--navy-950); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(11,31,58,0.4); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--navy-950); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--paper-dim); }
.btn-sm { padding: 8px 14px; font-size: 13px; }

.save-bar {
  position: sticky; bottom: 16px; z-index: 10;
  background: #fff; border: 1px solid var(--line); border-radius: 100px;
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; box-shadow: 0 24px 48px -20px rgba(11,31,58,0.25);
}
.save-status { font-size: 13px; color: var(--ink-soft); }
.save-status.is-ok { color: var(--teal-500); font-weight: 600; }
.save-status.is-err { color: #c0392b; font-weight: 600; }

.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff;
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
