/* CC Salt Admin — styled like the main site (dark, clean, mobile-first) */

.is-admin {
  background: #0b0b0b;
  color: #f2f2f2;
  font-size: 18px;
}

/* ===============================
   TOP BAR
   =============================== */

.admin-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px 14px;
  margin: 14px 0 22px;
  border-radius: 16px;
  background: rgba(18,18,18,.95);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}

.admin-brand{
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .3px;
}

.admin-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

/* ===============================
   BUTTON SYSTEM
   =============================== */

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #f5f5f5;
  text-decoration:none;
  cursor:pointer;
  user-select:none;
  font-weight: 600;
  font-size: 16px;
}

.btn:hover{ background: rgba(255,255,255,.12); }
.btn:active{ transform: translateY(1px); }

.btn-primary{
  background: rgba(0,180,255,.18);
  border-color: rgba(0,180,255,.45);
}

.btn-primary:hover{
  background: rgba(0,180,255,.28);
}

.btn-ghost{
  background: rgba(255,255,255,.05);
}

/* ===============================
   CARDS / GRID
   =============================== */

.admin-card{
  background: rgba(18,18,18,.95);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.admin-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 900px){
  .admin-grid{ grid-template-columns: 360px 1fr; }
}

/* ===============================
   LISTS
   =============================== */

.admin-list a{
  display:block;
  padding:14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  margin-bottom: 12px;
  font-size: 18px;
}

.admin-list a:hover{
  background: rgba(255,255,255,.10);
}

.admin-list .is-active{
  border-color: rgba(0,180,255,.55);
  box-shadow: 0 0 0 3px rgba(0,180,255,.18);
}

/* ===============================
   FORMS / INPUTS (KEY FIX)
   =============================== */

.admin label{
  display:block;
  margin: 18px 0 8px;
  font-size: 20px;
  color: #e6e6e6;
}

.admin input[type="text"],
.admin input[type="url"],
.admin input[type="password"],
.admin input[type="email"],
.admin input[type="search"],
.admin input[type="number"],
.admin input[type="date"],
.admin select,
.admin textarea{
  width: 100%;
  background: #0f1216;
  color: #ffffff;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 20px;
  outline: none;
}

.admin textarea{
  min-height: 320px;
  line-height: 1.6;
}

.admin input::placeholder,
.admin textarea::placeholder{
  color: #9aa3ad;
}

.admin input:focus,
.admin select:focus,
.admin textarea:focus{
  border-color: rgba(0,180,255,.65);
  box-shadow: 0 0 0 3px rgba(0,180,255,.25);
}

/* ===============================
   EDITOR
   =============================== */

.toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding:12px;
  border-radius: 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  margin-bottom: 14px;
}

.toolbar .btn{
  padding:10px 14px;
  border-radius: 999px;
}

textarea.editor{
  width:100%;
  min-height: 420px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.18);
  background: #0c0f14;
  color: #f5f7fa;
  font-size: 20px;
  line-height: 1.65;
}

textarea.editor:focus{
  border-color: rgba(0,180,255,.65);
  box-shadow: 0 0 0 4px rgba(0,180,255,.22);
}

/* ===============================
   PREVIEW
   =============================== */

.preview{
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.30);
  font-size: 18px;
  line-height: 1.6;
}

/* ===============================
   MESSAGES
   =============================== */

.notice{
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(0,180,255,.45);
  background: rgba(0,180,255,.12);
  margin: 12px 0 18px;
}

.error{
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,80,80,.45);
  background: rgba(255,80,80,.14);
  margin: 12px 0 18px;
}

/* =========================================================
   ABSOLUTE ADMIN FORM OVERRIDE (FINAL FIX)
   Targets ALL inputs on edit screens regardless of wrapper
   ========================================================= */

/* Only affect edit/create pages */
body.is-admin input,
body.is-admin textarea,
body.is-admin select {

  /* Kill browser defaults */
  -webkit-appearance: none !important;
  appearance: none !important;

  /* Sizing */
  font-size: 24px !important;
  line-height: 1.4 !important;

  /* Dark theme */
  background-color: #0f1216 !important;
  color: #f5f7fa !important;

  /* Box model */
  padding: 18px 20px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(255,255,255,0.25) !important;

  /* Prevent OS styles */
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.4) !important;
}

/* Make excerpt clearly larger */
body.is-admin textarea:not(.editor) {
  min-height: 160px !important;
}

/* Focus state */
body.is-admin input:focus,
body.is-admin textarea:focus,
body.is-admin select:focus {
  outline: none !important;
  border-color: rgba(0,180,255,0.8) !important;
  box-shadow:
    0 0 0 4px rgba(0,180,255,0.25),
    inset 0 0 0 1px rgba(0,0,0,0.5) !important;
}

/* Placeholder text */
body.is-admin ::placeholder {
  color: #9aa3ad !important;
}

/* Kill browser autofill white */
body.is-admin input:-webkit-autofill,
body.is-admin textarea:-webkit-autofill,
body.is-admin select:-webkit-autofill {
  -webkit-text-fill-color: #f5f7fa !important;
  box-shadow: 0 0 0px 1000px #0f1216 inset !important;
}