/* ============================================================
   God Lives in Me!! - Admin area styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&display=swap');

:root {
  --paper: #F5F9FB;
  --ink:   #17303F;
  --ink-2: #1F4A5E;
  --gold:  #1F6B8A;
  --rose:  #C0392B;
  --green: #2E7D32;
  --line:  #D0E4EE;
  --white: #FDFEFF;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Top bar ---------- */
.adminbar {
  background: #122533;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.adminbar .brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 700;
  padding: 14px 0;
  color: #fff;
}
.adminbar nav a {
  color: #E9E2F2;
  padding: 18px 14px;
  display: inline-block;
  font-size: .92rem;
}
.adminbar nav a:hover,
.adminbar nav a.active { background: rgba(255,255,255,.1); text-decoration: none; }

/* ---------- Layout ---------- */
.admin-wrap { max-width: 980px; margin: 36px auto; padding: 0 20px; }

h1.page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.1rem;
  margin-bottom: 22px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(56,41,75,.05);
}

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; margin: 18px 0 6px; }
label:first-child { margin-top: 0; }
.hint { font-size: .83rem; color: #7A6F8C; font-weight: 400; margin-top: 3px; }

input[type=text], input[type=password], input[type=url],
input[type=datetime-local], textarea, select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--gold);
  border-color: var(--gold);
}
textarea { min-height: 320px; resize: vertical; line-height: 1.7; }
textarea.short { min-height: 90px; }

/* ---------- Editor toolbar ---------- */
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  background: #EDF4F9;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  padding: 8px 10px;
}
.editor-toolbar + textarea { border-radius: 0 0 8px 8px; }
.tb {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 12px;
  font: inherit;
  font-size: .86rem;
  cursor: pointer;
  color: var(--ink);
}
.tb:hover { border-color: var(--gold); color: var(--gold); }
.tb.lifewave {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
  font-weight: 600;
}
.tb.lifewave:hover { background: #A98430; color: #fff; }
.tb-sep {
  width: 1px;
  height: 22px;
  background: var(--line);
  margin: 0 4px;
}

.btn {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 12px 26px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  margin-top: 22px;
}
.btn:hover { background: #1F6486; }
.btn.small { padding: 7px 14px; margin: 0; font-size: .85rem; }
.btn.danger { background: var(--rose); }
.btn.danger:hover { background: #962D22; }

/* ---------- Messages ---------- */
.msg {
  border-radius: 8px;
  padding: 13px 16px;
  margin-bottom: 20px;
  font-size: .93rem;
}
.msg.ok    { background: #E5F1E6; color: var(--green); border: 1px solid #BCD9BE; }
.msg.error { background: #F9E4E1; color: var(--rose);  border: 1px solid #ECC4BE; }

/* ---------- Posts table ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #7A6F8C; }
td .title-link { font-weight: 600; color: var(--ink); }
td .title-link:hover { color: var(--gold); }

.badge {
  display: inline-block;
  font-size: .73rem;
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 600;
}
.badge.published { background: #E5F1E6; color: var(--green); }
.badge.draft     { background: #F2EBDC; color: #8C7430; }
.badge.video     { background: #F0E0EE; color: #7A3B72; }

.row-actions { white-space: nowrap; }
.row-actions a { margin-right: 12px; font-size: .88rem; }
.row-actions .delete { color: var(--rose); }

/* ---------- Login ---------- */
.login-box {
  max-width: 400px;
  margin: 9vh auto;
  padding: 0 20px;
}
.login-box .card { padding: 36px; }
.login-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  text-align: center;
  margin-bottom: 4px;
}
.login-sub { text-align: center; color: #7A6F8C; margin-bottom: 22px; font-size: .9rem; }
.login-box .btn { width: 100%; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }

img.thumb { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; }

@media (max-width: 640px) {
  .adminbar { flex-direction: column; align-items: flex-start; }
  th:nth-child(3), td:nth-child(3) { display: none; }
}

/* ---------- Rich text editor (Quill) ---------- */
.ql-toolbar.ql-snow {
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: #EDF4F9;
  font-family: inherit;
}
.ql-container.ql-snow {
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
}
.ql-editor {
  min-height: 320px;
  line-height: 1.7;
}
.ql-editor img { max-width: 100%; border-radius: 10px; }

/* The one-click Lifewave Store button (sun gold so it stands out) */
button.ql-lifewave {
  width: auto !important;
  padding: 2px 12px !important;
  background: #C9A24B !important;
  color: #fff !important;
  border-radius: 6px;
  font-weight: 600;
}
button.ql-lifewave::before {
  content: '\2726\00a0 Lifewave Store';
  font-size: .82rem;
  font-family: 'Segoe UI', system-ui, sans-serif;
}
button.ql-lifewave:hover { background: #A98430 !important; }
