﻿:root{
  --navy:#0d2f66;
  --blue:#2369c9;
  --gold:#f5c84c;
  --bg:#eef3f8;
  --card:#ffffff;
  --text:#1f2937;
  --muted:#667085;
  --border:#d9e2ec;
  --danger:#b42318;
  --success:#157347;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  background:var(--bg);
  color:var(--text);
}
a{color:var(--blue)}
.site-header{
  background:linear-gradient(135deg,#07111f,#0d3b7a);
  color:#fff;
  box-shadow:0 8px 20px rgba(0,0,0,.18);
}
.header-inner{
  max-width:1100px;
  margin:auto;
  padding:16px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}
.brand{
  color:#fff;
  text-decoration:none;
  display:flex;
  align-items:center;
  gap:12px;
}
.brand-mark{
  width:46px;height:46px;
  display:grid;place-items:center;
  border-radius:14px;
  background:rgba(255,255,255,.12);
  font-size:25px;
}
.brand strong{display:block;font-size:20px}
.brand small{display:block;color:#cfe1ff;margin-top:2px}
nav{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
nav a{
  color:#fff;
  text-decoration:none;
  padding:9px 11px;
  border-radius:9px;
}
nav a:hover{background:rgba(255,255,255,.12)}
.button-link{background:var(--blue)}
.user-chip{
  padding:8px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  font-size:13px;
}
.page-shell{
  max-width:1000px;
  margin:28px auto;
  padding:0 18px;
  min-height:68vh;
}
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:0 6px 18px rgba(13,47,102,.07);
  padding:22px;
  margin-bottom:18px;
}
.hero{
  background:linear-gradient(135deg,#fff,#f4f8ff);
}
.hero h1{margin-top:0;color:var(--navy)}
.grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.category{
  text-decoration:none;
  color:var(--text);
  transition:.18s;
}
.category:hover{transform:translateY(-2px)}
.category h3{margin:0 0 7px;color:var(--navy)}
.meta{color:var(--muted);font-size:13px}
.topic-row{
  display:flex;
  justify-content:space-between;
  gap:18px;
  padding:16px 0;
  border-bottom:1px solid var(--border);
}
.topic-row:last-child{border-bottom:0}
.topic-row h3{margin:0 0 6px}
.topic-row h3 a{text-decoration:none;color:var(--navy)}
.badge{
  display:inline-block;
  padding:3px 8px;
  border-radius:999px;
  background:#e8f1ff;
  color:#184d91;
  font-size:12px;
  font-weight:700;
}
form{display:grid;gap:14px}
label{font-weight:700}
input,select,textarea{
  width:100%;
  padding:12px 13px;
  border:1px solid #c8d3df;
  border-radius:10px;
  font:inherit;
  background:#fff;
}
.password-field{
  position:relative;
  width:100%;
}
.password-field input{
  padding-right:52px;
}
.password-toggle{
  position:absolute;
  top:50%;
  right:6px;
  transform:translateY(-50%);
  width:42px;
  height:42px;
  min-width:42px;
  padding:0;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#344054;
  font-size:20px;
  line-height:1;
  cursor:pointer;
}
.password-toggle:hover,
.password-toggle:focus-visible{
  background:#e8f1ff;
  outline:2px solid transparent;
}
textarea{min-height:140px;resize:vertical}
button,.btn{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  width:auto;
  border:0;
  border-radius:10px;
  padding:11px 16px;
  background:var(--blue);
  color:#fff;
  font-weight:700;
  cursor:pointer;
  text-decoration:none;
}
.btn.secondary{background:#556273}
.btn.danger{background:var(--danger)}
.form-actions{display:flex;gap:10px;flex-wrap:wrap}
.alert{
  padding:13px 15px;
  border-radius:10px;
  margin-bottom:15px;
  background:#e8f1ff;
}
.alert.error{background:#fdecec;color:#8a1c13}
.alert.success{background:#e9f7ef;color:#135c35}
.post{
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  padding:18px;
  margin:14px 0;
}
.post-header{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.post-body{white-space:pre-wrap;line-height:1.6}
.site-footer{
  max-width:1000px;
  margin:40px auto 20px;
  padding:18px;
  color:var(--muted);
  display:flex;
  justify-content:space-between;
  gap:15px;
  border-top:1px solid var(--border);
}
.site-footer a{margin-left:12px}
.admin-table{width:100%;border-collapse:collapse}
.admin-table th,.admin-table td{padding:10px;border-bottom:1px solid var(--border);text-align:left}
@media(max-width:760px){
  .header-inner{align-items:flex-start;flex-direction:column}
  .grid{grid-template-columns:1fr}
  .topic-row{flex-direction:column}
  .site-footer{flex-direction:column}
}
