:root{
  --bg: #f5f0e7;
  --card: #fffaf2;
  --ink: #0f2742;
  --muted: #5a6a7a;
  --line: rgba(15,39,66,.12);
  --accent: #0f2742;
  --accent2: #1f4b7a;
  --shadow: 0 12px 30px rgba(0,0,0,.10);
  --radius: 18px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, -apple-system, system-ui, "Segoe UI", Roboto, Arial, "Noto Sans";
  background: radial-gradient(1200px 700px at 20% 0%, #fff 0%, var(--bg) 55%, #efe7da 100%);
  color: var(--ink);
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 30;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(245,240,231,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand__title{ font-weight: 900; letter-spacing: .2px; }
.brand__title span{ color: var(--accent2); }
.brand__sub{ font-size: 12px; color: var(--muted); margin-top: 2px; }
.topbar__actions{ display:flex; gap:10px; flex-wrap:wrap; }

.wrap{ max-width: 1120px; margin: 16px auto; padding: 0 14px 40px; }

.grid{
  display:grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 14px;
}
@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
  .topbar{ position: static; }
}

.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.card--preview{ position: relative; overflow:hidden; }

.h{
  margin: 0 0 12px;
  font-size: 15px;
  letter-spacing: .2px;
}

.form{ display:flex; flex-direction:column; gap: 12px; }

.field span{
  display:block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 800;
}
input, textarea, select{
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.75);
  border-radius: 14px;
  padding: 12px 12px;
  color: var(--ink);
  outline: none;
  font-size: 15px;
}
input:focus, textarea:focus, select:focus{
  border-color: rgba(31,75,122,.45);
  box-shadow: 0 0 0 4px rgba(31,75,122,.12);
}

.row2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 420px){
  .row2{ grid-template-columns: 1fr; }
}

.btn{
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 14px;
  cursor:pointer;
  font-weight: 900;
  letter-spacing: .2px;
  background: rgba(255,255,255,.6);
  color: var(--ink);
}
.btn:active{ transform: translateY(1px); }
.btn--primary{
  background: linear-gradient(180deg, var(--accent2), var(--accent));
  color: #fff;
  border-color: rgba(0,0,0,.08);
}
.btn--ghost{ background: rgba(255,255,255,.55); }

.previewActions{ display:flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

.toast{
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15,39,66,.92);
  color: #fff;
  font-weight: 900;
  opacity: 0;
  transform: translateY(6px);
  transition: .18s ease;
  pointer-events:none;
}
.toast.show{ opacity:1; transform: translateY(0); }
.toast--viewer{
  position: fixed;
  left: 16px;
  bottom: 18px;
  z-index: 50;
}

.history{ display:flex; flex-direction:column; gap: 10px; }
.histItem{
  border: 1px solid rgba(15,39,66,.12);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255,255,255,.55);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}
.histMeta{ display:flex; flex-direction:column; gap: 3px; }
.histTitle{ font-weight: 1000; }
.histSub{ font-size: 12px; color: var(--muted); }
.histActions{ display:flex; gap: 8px; flex-wrap:wrap; }

.viewer{
  max-width: 820px;
  margin: 0 auto;
  padding: 14px;
}
.viewer__card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.viewer__card--clean{
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* ===== Classic announcement look ===== */
.classic{
  padding: 18px 12px 10px;
  text-align: center;
  color: #000;
  background: rgba(255,255,255,.72);
  border-radius: 16px;
  border: 1px solid rgba(15,39,66,.10);
}
.cMain{ font-family: Georgia, "Times New Roman", serif; }
.cTitle{
  font-weight: 900;
  font-size: 38px;
  letter-spacing: .03em;
  margin-top: 6px;
}
.cDed{ font-weight: 900; font-size: 16px; letter-spacing: .02em; margin-top: 10px; }
.cRoles{ font-weight: 900; font-size: 20px; margin-top: 2px; }
.cName{
  font-weight: 1000;
  font-size: 44px;
  margin-top: 20px;
  letter-spacing: .02em;
}
.cProf{ font-size: 17px; margin-top: 4px; font-weight: 800; }

.cWhen{
  margin-top: 22px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.55;
}
.cWhen b{ font-weight: 1000; }

.cPlace{
  margin-top: 14px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.55;
}
/* μπλε clickable όπως στη φωτό */
.cPlace a{
  color: #0b4bd6;
  text-decoration: underline;
  font-weight: 1000;
}

.cNote{
  margin-top: 14px;
  font-size: 14px;
  font-weight: 800;
  color: #222;
  line-height: 1.5;
}

/* Relatives centered block */
.cRelCenter{
  margin-top: 22px;
  display:flex;
  flex-direction:column;
  gap: 14px;
  align-items:center;
}
.cRelCenter .grp{
  text-align:center;
}
.cRelCenter .role{
  font-weight: 1000;
  font-size: 18px;
  letter-spacing: .02em;
}
.cRelCenter .names{
  margin-top: 2px;
  font-weight: 1000;
  font-size: 18px;
  line-height: 1.55;
}

/* Discreet-but-bolder office footer */
.cOffice{
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,.12);
  font-size: 13px;
  color: rgba(0,0,0,.70);
  line-height: 1.55;
  font-weight: 850;
}
.cOffice b{ font-weight: 1000; color: rgba(0,0,0,.80); }
.cOffice a{
  color: rgba(0,0,0,.70);
  text-decoration: underline;
  text-decoration-style: dotted;
  font-weight: 850;
}

/* relatives editor */
.relHead{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom: 12px; }
.relGroups{ display:flex; flex-direction:column; gap: 12px; }
.relCard{
  border: 1px solid rgba(15,39,66,.12);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,.55);
}
.relRow{ display:grid; grid-template-columns: 1fr auto; gap:10px; align-items:center; }
.relRow .btn{ padding: 9px 10px; }
.mutedSmall{ margin-top: 10px; font-size: 12px; color: var(--muted); }

/* Floating share button for recipients */
.fab{
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.90);
  box-shadow: 0 10px 25px rgba(0,0,0,.18);
  font-size: 22px;
  font-weight: 1000;
  cursor: pointer;
}
.fab:active{ transform: translateY(1px); }