/* Beacon House CMS — admin styles */
* { box-sizing: border-box; }
body {
  margin: 0; background: #ECEAE3; color: #1C1C20;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px; line-height: 1.55;
}
a { color: #0080B0; }

/* ---- Top bar ---- */
.a-top { background: #0F2D4B; color: #fff; }
.a-top__inner {
  max-width: 1100px; margin: 0 auto; padding: 0 1.2rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem;
}
.a-top__brand { font-size: 1.1rem; font-weight: 700; padding: 1rem 0; }
.a-top__brand span { color: #6FC7E6; font-weight: 400; }
.a-nav { display: flex; flex-wrap: wrap; }
.a-nav a {
  color: #D7E3EC; text-decoration: none; padding: 1rem .9rem;
  font-size: .92rem; border-bottom: 3px solid transparent;
}
.a-nav a:hover { color: #fff; }
.a-nav a.is-active { color: #fff; border-bottom-color: #0080B0; }
.a-nav__out { color: #F2B8B8 !important; }

/* ---- Layout ---- */
.a-main { max-width: 1100px; margin: 0 auto; padding: 1.8rem 1.2rem 3rem; }
.a-foot { text-align: center; color: #8a8a82; font-size: .8rem; padding: 1.5rem; }
h1 { font-size: 1.55rem; color: #0F2D4B; margin: 0 0 .3rem; }
h2 { font-size: 1.15rem; color: #0F2D4B; margin: 1.8rem 0 .8rem; }
.muted { color: #5F6469; }
.a-intro { color: #5F6469; margin: 0 0 1.6rem; }

/* ---- Flash messages ---- */
.a-flash { padding: .8rem 1.1rem; border-radius: 6px; margin: 0 0 1.4rem; font-weight: 600; }
.a-flash--ok  { background: #E7F4EC; color: #1d6b3a; }
.a-flash--bad { background: #F7E6E6; color: #8A2A2A; }

/* ---- Cards ---- */
.card {
  background: #fff; border: 1px solid #E2DECF; border-radius: 8px;
  padding: 1.4rem 1.5rem; margin-bottom: 1.2rem;
}
.a-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.6rem; }
@media (max-width: 720px) { .a-grid { grid-template-columns: 1fr; } }
.stat { background: #fff; border: 1px solid #E2DECF; border-radius: 8px; padding: 1.3rem 1.4rem; }
.stat__num { font-size: 2rem; font-weight: 700; color: #0080B0; line-height: 1; }
.stat__label { color: #5F6469; font-size: .9rem; margin-top: .35rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-block; background: #0080B0; color: #fff; border: 0;
  border-radius: 6px; padding: .62rem 1.15rem; font-size: .92rem; font-weight: 700;
  cursor: pointer; text-decoration: none; line-height: 1.3;
}
.btn:hover { background: #006e98; }
.btn--navy { background: #0F2D4B; }
.btn--navy:hover { background: #1a3f63; }
.btn--ghost { background: #fff; color: #0F2D4B; border: 1px solid #C9C2B0; }
.btn--ghost:hover { background: #f4f1e8; }
.btn--danger { background: #fff; color: #8A2A2A; border: 1px solid #E0B4B4; }
.btn--danger:hover { background: #F7E6E6; }
.btn--sm { padding: .4rem .75rem; font-size: .82rem; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: 1.2rem; }

/* ---- Tables ---- */
.a-table { width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid #E2DECF; border-radius: 8px; overflow: hidden; }
.a-table th, .a-table td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid #ECE8DA; }
.a-table th { background: #F6F4EC; color: #0F2D4B; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .05em; }
.a-table tr:last-child td { border-bottom: 0; }
.a-table td.actions { white-space: nowrap; text-align: right; }
.tag { display: inline-block; font-size: .73rem; font-weight: 700; padding: .15rem .55rem;
  border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.tag--published { background: #E7F4EC; color: #1d6b3a; }
.tag--draft     { background: #F0EEE4; color: #6b6453; }

/* ---- Forms ---- */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; color: #0F2D4B; margin-bottom: .35rem; }
.field .hint { font-weight: 400; color: #5F6469; font-size: .85rem; }
input[type=text], input[type=password], input[type=file], select, textarea {
  width: 100%; padding: .65rem .75rem; border: 1px solid #C9C2B0; border-radius: 6px;
  font-size: .95rem; font-family: inherit; background: #fff; color: #1C1C20;
}
textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
textarea.tall { min-height: 320px; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: #0080B0; box-shadow: 0 0 0 3px rgba(0,128,176,.15);
}
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.4rem; }
@media (max-width: 640px) { .form-2col { grid-template-columns: 1fr; } }

/* ---- Image manager ---- */
.img-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
@media (max-width: 640px) { .img-grid { grid-template-columns: 1fr; } }
.img-slot { background: #fff; border: 1px solid #E2DECF; border-radius: 8px; padding: 1.1rem 1.2rem; }
.img-slot__preview { width: 100%; aspect-ratio: 4/3; background: #F0EEE4; border-radius: 6px;
  overflow: hidden; display: flex; align-items: center; justify-content: center; margin-bottom: .8rem; }
.img-slot__preview img { width: 100%; height: 100%; object-fit: cover; }
.img-slot__preview .empty { color: #9a948a; font-size: .85rem; }
.img-slot h3 { margin: 0 0 .15rem; font-size: 1rem; color: #0F2D4B; }
.img-slot .where { color: #5F6469; font-size: .82rem; margin: 0 0 .7rem; }
.img-thumb { width: 84px; height: 60px; object-fit: cover; border-radius: 4px;
  border: 1px solid #E2DECF; vertical-align: middle; }

/* ---- Login ---- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem; }
.login-box { background: #fff; border-radius: 10px; border-top: 5px solid #0080B0;
  padding: 2rem 2.2rem; max-width: 380px; width: 100%;
  box-shadow: 0 10px 40px rgba(15,45,75,.14); }
.login-box h1 { font-size: 1.3rem; margin-bottom: .2rem; }
.login-box p.sub { color: #5F6469; margin: 0 0 1.4rem; font-size: .92rem; }
.login-box .btn { width: 100%; text-align: center; margin-top: .6rem; padding: .75rem; }
.login-inline-form { margin-top: .55rem; }
.login-links { text-align: center; font-size: .88rem; margin: 1rem 0 0; color: #5F6469; }
.login-links a { font-weight: 600; }
.q-row { border: 1px solid #E2DECF; border-radius: 8px; padding: 1rem 1.1rem; margin-bottom: 1rem; }
.q-row h3 { margin: 0 0 .6rem; font-size: .98rem; color: #0F2D4B; }
.a-note { background: #FBF6E9; border: 1px solid #E7DDBF; color: #6b5d2f;
  padding: .8rem 1.1rem; border-radius: 6px; margin: 0 0 1.4rem; font-size: .92rem; }
.a-note strong { color: #5a4d22; }

/* ---- Built-in rich-text editor ---- */
.rte { border: 1px solid #C9C2B0; border-radius: 6px; background: #fff; }
.rte-toolbar { display: flex; flex-wrap: wrap; gap: 3px; padding: 6px;
  background: #F6F4EC; border-bottom: 1px solid #E2DECF; border-radius: 6px 6px 0 0; }
.rte-btn { background: #fff; border: 1px solid #D8D2C2; border-radius: 4px;
  padding: 4px 9px; font-size: 13px; line-height: 1.3; color: #0F2D4B; cursor: pointer; }
.rte-btn:hover { background: #ECE9DD; }
.rte-area { min-height: 150px; padding: 10px 13px; font-size: .95rem;
  line-height: 1.6; outline: none; }
.rte--tall .rte-area { min-height: 320px; }
.rte-area:focus { box-shadow: inset 0 0 0 2px rgba(0,128,176,.15); }
.rte-area p { margin: 0 0 .8rem; }
.rte-area h2 { font-size: 1.2rem; color: #0F2D4B; margin: .3rem 0 .5rem; }
.rte-area h3 { font-size: 1.05rem; color: #0F2D4B; margin: .3rem 0 .5rem; }
.rte-area ul, .rte-area ol { margin: 0 0 .8rem 1.4rem; }
