/* Account pages (profile, community, news, admin, legal).
   Loaded after /home/style.css: same topbar, colours and buttons. */

/* hidden elements stay hidden even when a class sets display */
[hidden] {
  display: none !important;
}

.app-page .logo-link {
  color: inherit;
  text-decoration: none;
}

.app-main {
  max-width: 980px;
  margin: 18px auto 0;
}

.page-head {
  position: relative;
  overflow: hidden;
  padding: 34px 38px;
  border-radius: 22px;
  color: #3a1d47;
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.7), transparent 40%),
    linear-gradient(220deg, #e4c1f9, #cdb4db, #ffc8dd, #ffafcc, #bde0fe, #a2d2ff);
  box-shadow: 0 10px 30px rgba(170, 70, 170, 0.18);
}

.page-head h1 {
  margin: 0 0 6px;
  font-size: clamp(30px, 4vw, 44px);
}

.page-head p {
  margin: 0;
  max-width: 640px;
  opacity: 0.85;
}

.page-head .head-link {
  display: inline-block;
  margin-top: 12px;
  color: #b0164f;
  font-weight: 600;
}

.card {
  margin-top: 18px;
  padding: 22px 24px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(170, 70, 170, 0.12);
  border: 1px solid rgba(212, 115, 212, 0.18);
}

.card h2 {
  margin: 0 0 14px;
  font-size: 19px;
  color: #3a1d47;
}

.muted {
  color: #8a6f93;
  font-size: 13px;
}

.notice {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  color: #fff;
  background: #b0164f;
}

.notice.ok {
  background: #2b8a5c;
}

.notice[hidden] {
  display: none;
}

/* ---------- forms ---------- */
.field {
  display: block;
  margin-bottom: 12px;
}

.field > span {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 600;
  color: #5b3a66;
}

.app-input,
.app-textarea,
.app-select {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #e3c9ea;
  font: inherit;
  font-size: 15px;
  color: #3a1d47;
  background: #fdf8ff;
}

.app-textarea {
  min-height: 90px;
  resize: vertical;
}

.app-input:focus,
.app-textarea:focus,
.app-select:focus {
  outline: 2px solid #ff74b2;
  outline-offset: 1px;
}

.btn-app {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg, #ff74b2, #c77dff);
  cursor: pointer;
  text-decoration: none;
}

.btn-app:hover {
  filter: brightness(1.06);
}

.btn-app:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-app.light {
  color: #6b2d73;
  background: #f6e8fb;
}

.btn-app.danger {
  background: #c0164f;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ---------- people ---------- */
.avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ff9fd0, #c77dff);
}

.avatar.big {
  width: 120px;
  height: 120px;
  font-size: 44px;
  box-shadow: 0 8px 24px rgba(170, 70, 170, 0.25);
  border: 4px solid #fff;
}

.avatar.small {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.who {
  display: flex;
  align-items: center;
  gap: 10px;
}

.who-name {
  font-weight: 700;
  color: #3a1d47;
}

.badge-role {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 2px;
  color: #6b2d73;
  background: #f1dcf7;
}

.badge-role.admin {
  color: #fff;
  background: linear-gradient(90deg, #ff74b2, #b0164f);
}

/* ---------- community ---------- */
.post {
  margin-top: 16px;
}

.post-body,
.comment-body,
.news-body {
  margin: 10px 0 0;
  white-space: pre-wrap; /* line breaks typed by people */
  overflow-wrap: anywhere;
  color: #3a1d47;
  line-height: 1.55;
}

.post-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.link-button {
  border: none;
  background: none;
  padding: 4px 6px;
  font: inherit;
  font-size: 13px;
  color: #b0164f;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

.comments {
  margin: 14px 0 0;
  padding: 12px 0 0;
  border-top: 1px dashed #ecd5f2;
}

.comment {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.comment-box {
  flex: 1;
  padding: 8px 12px;
  border-radius: 14px;
  background: #fbf3fd;
}

.comment-box .comment-body {
  margin-top: 4px;
  font-size: 14px;
}

.comment-form {
  display: flex;
  gap: 8px;
}

.comment-form .app-input {
  flex: 1;
}

.compose .app-textarea {
  min-height: 100px;
}

.compose-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

/* ---------- news ---------- */
.news-item {
  position: relative;
}

.news-item h2 {
  margin: 8px 0 0;
  font-size: 22px;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: #c77dff;
}

.tag.game { background: #ff74b2; }
.tag.site { background: #7aa8f7; }
.tag.anime { background: #b0164f; }
.tag.event { background: #e0a43c; }
.tag.chapters { background: #8e5bd8; }

.pill-status {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.post-head .pill-status {
  margin: 0 auto 0 8px; /* right after the category, the date stays on the right */
}

.post-head .pill-status + .muted {
  margin-left: 0;
}

.pill-status.pending {
  color: #7a4b00;
  background: #ffe9b8;
}

.pill-status.rejected {
  color: #fff;
  background: #c0164f;
}

.news-item.is-pending,
.news-item.is-rejected {
  border-style: dashed;
}

.news-author {
  margin-top: 12px;
}

.review-box {
  border: 2px solid #ffb3d4;
}

.review-box .news-item {
  margin-top: 12px;
  box-shadow: none;
  background: #fff8fc;
}

.codes-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.filters button {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #e3c9ea;
  font: inherit;
  font-size: 13px;
  color: #6b2d73;
  background: #fff;
  cursor: pointer;
}

.filters button[aria-pressed="true"] {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(90deg, #ff74b2, #c77dff);
}

/* =====================================================================
   NEWS HERO — pastel "GFX landing page" look (news/index.htm).
   Penelope stands on the left over big flat shapes; title, live figures and
   the two latest announcements on the right. Colours from her picture:
   magenta hair, lavender dress, a touch of the green of her eyes.
   ===================================================================== */
@font-face {
  font-family: "Poppins";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/poppins-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/poppins-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/poppins-latin-600-normal.woff2") format("woff2");
}

.news-hero {
  /* the palette of the story: rose of her hair, lilac of the dress, the
     gold of the Eckhart crest and the emerald of her eyes */
  --pk: #f0489b;
  --pk-soft: #ffd9ea;
  --lav: #d9c8ff;
  --lav-soft: #f1e9ff;
  --vio: #8a4fd6;
  --mint: #3fc7a2;
  --gold: #f2b84b;
  --ink: #4a2360;
  position: relative;
  height: 540px;
  border-radius: 26px;
  overflow: hidden;
  font-family: "Poppins", "Segoe UI", "Trebuchet MS", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(120deg, #fff7fb 0%, #fff 45%, #fbf3ff 100%);
  box-shadow: 0 10px 30px rgba(170, 70, 170, 0.16);
}

.nh-shapes,
.nh-shapes > * {
  position: absolute;
}

.nh-shapes {
  inset: 0;
}

/* soft brush of colour behind her */
.nh-glow {
  left: 3%;
  top: 14%;
  width: 46%;
  height: 62%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 190, 222, 0.85), rgba(255, 190, 222, 0));
  filter: blur(6px);
}

.nh-circle {
  left: 27%;
  top: 30%;
  width: 32%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(160deg, #ff8cc0, var(--pk));
  box-shadow: 0 0 0 10px rgba(255, 217, 234, 0.7);
}

.nh-slab {
  inset: 0;
  background: var(--lav);
  -webkit-clip-path: polygon(37% 64%, 56% 50%, 68% 100%, 27% 100%);
  clip-path: polygon(37% 64%, 56% 50%, 68% 100%, 27% 100%);
}

.nh-dot {
  border-radius: 50%;
}

.nh-dot-1 { left: 59.500%; top: 50%; width: 24px; height: 24px; width: 30px; height: 30px; background: var(--vio); }
.nh-dot-2 { left: 16%; top: 59%; width: 10px; height: 10px; background: var(--vio); }
.nh-dot-3 { left: 80.500%; top: 61%; width: 11px; height: 11px; background: var(--pk); }
.nh-dot-4 { left: 36%; top: 12%; width: 10px; height: 10px; background: var(--mint); }

.nh-ring {
  right: 2.500%;
  top: 53%;
  width: 22px;
  height: 22px;
  border: 4px solid var(--gold);
  border-radius: 50%;
}

.nh-cloud {
  right: 9%;
  top: 43%;
  width: 34px;
  fill: var(--pk-soft);
}

/* pastel bar of the model, across the top */
.nh-bar {
  position: absolute;
  left: 3%;
  right: 3%;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5.500%;
  height: 40px;
  padding: 0 7% 0 0;
  border-radius: 0 0 22px 22px;
  background: linear-gradient(90deg, var(--pk-soft), var(--lav));
}

.nh-bar-dots {
  position: absolute;
  left: 7%;
  display: flex;
  gap: 12px;
}

.nh-bar-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--vio);
}

.nh-bar-dots i:nth-child(2) {
  background: var(--pk);
}

.nh-bar-dots i:nth-child(3) {
  background: var(--gold);
}

.nh-bar a {
  padding: 2px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--vio);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.nh-bar a:hover,
.nh-bar a[aria-current="page"] {
  border-bottom-color: var(--vio);
}

/* her crown, where the model has its little gift */
.nh-crown {
  left: 2.500%;
  top: 83%;
  z-index: 3;
  width: 50px;
  transform: rotate(-12deg);
  filter: drop-shadow(0 5px 8px rgba(242, 184, 75, 0.45));
}

.nh-crown .a { fill: var(--gold); }
.nh-crown .b { fill: #e09a2b; }
.nh-crown .c { fill: var(--pk); }

/* gold sparkles */
.nh-star {
  fill: var(--gold);
  animation: nh-twinkle 2.600s ease-in-out infinite;
}

.nh-star-1 { left: 2.500%; top: 13%; width: 20px; }
.nh-star-2 { left: 45%; top: 10%; width: 26px; animation-delay: 0.700s; }
.nh-star-3 { left: 61%; top: 80%; width: 16px; fill: var(--pk); animation-delay: 1.300s; }
.nh-star-4 { left: 93%; top: 86%; width: 18px; animation-delay: 1.900s; }

@keyframes nh-twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(0.55) rotate(45deg); opacity: 0.45; }
}

/* the sound that comes out of her two megaphones */
.nh-wave {
  width: 34px;
  fill: none;
  stroke: var(--vio);
  stroke-width: 3.500;
  stroke-linecap: round;
  opacity: 0.75;
}

.nh-wave path {
  stroke-dasharray: 90;
  animation: nh-shout 1.800s ease-out infinite;
}

.nh-wave-1 { left: 0.200%; top: 36%; transform: rotate(182deg); }
.nh-wave-2 { left: 59.800%; top: 8%; transform: rotate(18deg); stroke: var(--pk); }

@keyframes nh-shout {
  0% { stroke-dashoffset: 90; opacity: 0; }
  40% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .nh-star,
  .nh-wave path {
    animation: none;
  }
}

/* favourability gauge, as in the game of the story */
.nh-fav {
  position: absolute;
  left: 4%;
  top: 21%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 6px;
  border: 2px solid var(--gold);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--pk);
  background: #fff;
}

.nh-fav i {
  font-style: normal;
  font-size: 13px;
}

.nh-fav b {
  width: 54px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pk), var(--gold));
}

.nh-fav em {
  font-style: normal;
}

.nh-site {
  position: absolute;
  left: 4%;
  top: 12%;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--pk);
  max-width: 120px;
  line-height: 1.5;
}

.nh-figure {
  position: absolute;
  /* same place as the girl of the model: big, on the left, head up to the
     bar, cut at the bottom */
  left: 3.500%;
  top: 9%;
  height: 97%;
  z-index: 2;
  filter: drop-shadow(0 10px 22px rgba(122, 86, 224, 0.28));
  pointer-events: none;
}

.nh-update {
  position: absolute;
  z-index: 3;
  left: 3%;
  top: 66%;
  padding: 9px 30px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: var(--vio);
  box-shadow: 0 8px 18px rgba(122, 86, 224, 0.35);
  transition: transform 0.25s ease;
}

.nh-update:hover {
  transform: scale(1.06);
}

/* right column */
.nh-side {
  position: absolute;
  right: 8%;
  top: 14%;
  bottom: 4%;
  z-index: 3;
  width: 28%;
  display: flex;
  flex-direction: column;
}

.nh-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nh-title-row h1 {
  margin: 0;
  padding-left: 14px;
  border-left: 9px solid var(--pk-soft);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--pk);
}

.nh-plus {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  background: var(--pk);
  box-shadow: 0 0 0 6px var(--pk-soft);
  transition: transform 0.25s ease;
}

.nh-plus:hover {
  transform: rotate(90deg);
}

.nh-figures {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.nh-figures b {
  font-size: 56px;
  font-weight: 500;
  line-height: 1;
  color: var(--vio);
}

.nh-figures span {
  max-width: 110px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--vio);
}

.nh-actions {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  width: 78%;
}

.nh-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--vio);
  text-decoration: none;
  background: var(--lav-soft);
}

.nh-mini i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 22px;
  border-radius: 6px;
  font-style: normal;
  font-size: 13px;
  color: #fff;
  background: var(--vio);
}

.nh-mini:hover {
  background: var(--pk-soft);
}

.nh-lead {
  margin: 14px 0 0;
  font-size: 11.500px;
  line-height: 1.55;
  color: var(--pk);
}

.nh-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

.nh-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 96px;
  padding: 10px;
  border: 2px solid var(--gold);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  transition: transform 0.25s ease;
}

.nh-card:hover {
  transform: translateY(-4px);
}

.nh-card .tag {
  align-self: flex-start;
  padding: 2px 8px;
  font-size: 9px;
}

.nh-card b {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.3;
}

.nh-card small {
  margin-top: auto;
  font-size: 9.500px;
  color: #9a82b5;
}

/* half disc on the right edge: down to the announcements */
.nh-next {
  position: absolute;
  right: -62px;
  top: 34%;
  display: flex;
  align-items: center;
  width: 124px;
  height: 124px;
  box-sizing: border-box;
  padding-left: 22px;
  border-radius: 50%;
  font-size: 22px;
  color: #fff;
  text-decoration: none;
  background: var(--vio);
  transition: transform 0.25s ease;
}

.nh-next:hover {
  transform: translateX(-6px);
}

/* ---------------------------------------------------------------------
   News page: the hero is the background of the whole first screen and the
   menu of the site itself is the pastel bar of the model (only one menu).
   --------------------------------------------------------------------- */
.news-page .container {
  position: relative;
  padding: 0 0 28px;
}

.news-page .app-main {
  max-width: none;
  margin: 0;
}

.news-page .app-main > :not(.news-hero) {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.news-page .news-hero {
  height: min(100vh, 58vw);
  min-height: 560px;
  margin-bottom: 26px;
  border-radius: 0 0 34px 34px;
}

.news-page .topbar {
  position: absolute;
  left: 3%;
  right: 3%;
  top: 0;
  width: auto;
  height: 62px;
  box-sizing: border-box;
  padding: 0 26px 0 92px;
  border-radius: 0 0 26px 26px;
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
  background: linear-gradient(90deg, #ffd9ea, #d9c8ff);
  box-shadow: 0 8px 20px rgba(138, 79, 214, 0.16);
}

/* the three dots of the model */
.news-page .topbar::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -5px;
  border-radius: 50%;
  background: #8a4fd6;
  box-shadow: 18px 0 0 #f0489b, 36px 0 0 #f2b84b;
}

.news-page .topbar .logo {
  font-size: 11px;
  line-height: 1.15;
  color: #4a2360;
}

.news-page .topbar .logo .icon {
  width: 40px;
  height: 40px;
}

.news-page .topbar .nav-link {
  font-size: 14px;
  color: #8a4fd6;
}

.news-page .topbar .nav-link:hover,
.news-page .topbar .nav-link.active {
  color: #f0489b;
}

.news-page .topbar .nav-link::after {
  background: #f0489b;
}

.news-page .topbar .auth .btn {
  padding: 6px 12px;
  font-size: 13px;
}

/* the texts of the hero follow its size */
.news-page .nh-side,
.news-page .nh-update,
.news-page .nh-site,
.news-page .nh-fav {
  zoom: 1.25;
}

.news-item,
#composer,
#news-list {
  scroll-margin-top: 20px;
}

html[lang="ar"] .nh-title-row h1 {
  padding-left: 0;
  padding-right: 14px;
  border-left: none;
  border-right: 9px solid var(--pk-soft);
}

/* ---------- profile ---------- */
.profile-top {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.profile-top h2 {
  margin: 0;
  font-size: 26px;
}

.qr {
  display: block;
  width: 200px;
  height: 200px;
  margin: 10px 0;
  border-radius: 12px;
  background: #fff;
}

.codes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin: 10px 0;
  padding: 0;
  list-style: none;
  font-family: Consolas, "Courier New", monospace;
  font-size: 15px;
}

.codes li {
  padding: 6px 10px;
  border-radius: 8px;
  text-align: center;
  background: #fbf3fd;
}

.state-on {
  color: #2b8a5c;
  font-weight: 700;
}

.state-off {
  color: #b0164f;
  font-weight: 700;
}

.danger-zone {
  border-color: rgba(192, 22, 79, 0.35);
}

/* ---------- admin ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.stat {
  padding: 14px;
  border-radius: 16px;
  text-align: center;
  background: #fbf3fd;
}

.stat b {
  display: block;
  font-size: 26px;
  color: #b0164f;
}

.table-wrap {
  overflow-x: auto;
}

.app-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.app-table th,
.app-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1e2f5;
  text-align: left;
  vertical-align: top;
}

.app-table th {
  color: #6b2d73;
}

/* admin page: wider, with tabs */
.admin-main {
  max-width: 1240px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.admin-tabs button {
  padding: 9px 18px;
  border: 1px solid #ecd3f2;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #6b2d73;
  background: #fff;
  cursor: pointer;
}

.admin-tabs button:hover {
  background: #fbf0fd;
}

.admin-tabs button[aria-selected="true"] {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(90deg, #ff74b2, #c77dff);
}

.tab-count {
  display: inline-block;
  min-width: 18px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 18px;
  color: #fff;
  background: #c0164f;
}

.tab-count[hidden] {
  display: none;
}

.admin-panel[hidden] {
  display: none;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-toolbar h2 {
  flex: 1 1 auto;
  margin: 0;
}

.admin-toolbar .app-input,
.admin-toolbar .app-select {
  width: auto;
  min-width: 220px;
  padding: 8px 12px;
  font-size: 14px;
}

.stat.alert b {
  color: #fff;
}

.stat.alert {
  background: #c0164f;
}

.stat.alert .muted {
  color: #ffe1ec;
}

.btn-app.small {
  padding: 5px 12px;
  font-size: 12px;
}

.action-list,
.status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.pill {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.pill.ok {
  color: #1f6b46;
  background: #dcf5e8;
}

.pill.bad {
  color: #fff;
  background: #c0164f;
}

.app-table .row-alert td {
  background: #fff1f5;
}

.app-table td.wrap {
  min-width: 260px;
  white-space: pre-wrap;
  word-break: break-word;
}

.app-table code {
  font-size: 12px;
  color: #6b2d73;
}

/* database explorer */
.db-tables {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.db-table-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #ecd3f2;
  border-radius: 14px;
  font: inherit;
  text-align: left;
  color: #3a1d47;
  background: #fdf8ff;
  cursor: pointer;
}

.db-table-btn:hover {
  background: #f8ebfc;
}

.db-table-btn.is-current {
  border-color: #ff74b2;
  box-shadow: 0 0 0 2px rgba(255, 116, 178, 0.35);
}

.db-table td {
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.db-table th {
  white-space: nowrap;
}

.db-table td.secret {
  color: #a58cad;
  font-style: italic;
}

.db-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.btn-app:disabled.light {
  cursor: default;
}

.backup-list {
  margin: 12px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.8;
  color: #3a1d47;
}

/* ---------- legal pages ---------- */
.legal h2 {
  margin-top: 26px;
}

.legal p,
.legal li {
  line-height: 1.6;
  color: #3a1d47;
}

@media (max-width: 820px) {
  .page-head {
    padding: 24px 20px;
  }

  .card {
    padding: 18px 16px;
  }

  .comment-form {
    flex-direction: column;
  }
}

/* =====================================================================
   PROFILE PAGE — "scrapbook" look: pink grid paper, panels with a dark
   outline, an arched dotted frame for the photo, bows and roses.
   ===================================================================== */
body.profile-page {
  --line: #4a2030; /* dark maroon outline */
  --paper: #f7e7eb;
  --pink: #f1c7d0;
  background:
    linear-gradient(#ecd3da 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(90deg, #ecd3da 1px, transparent 1px) 0 0 / 30px 30px,
    var(--paper);
}

.profile-page .app-main {
  max-width: 1120px;
  margin-top: 30px;
}

/* two columns of panels */
.profile-page #signed-in {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: start;
}

.profile-page .scrap-col > * {
  margin: 0 0 40px;
}

/* ---- arched frame with the photo ---- */
.profile-page .page-head {
  overflow: visible;
  padding: 46px 30px 30px;
  border: 3px solid var(--line);
  border-radius: 240px 240px 26px 26px;
  text-align: center;
  color: var(--line);
  background:
    radial-gradient(#e9c3cd 1.6px, transparent 2.2px) 0 0 / 20px 20px,
    #fbf1f3;
  box-shadow: 6px 6px 0 #e6b7c2;
}

.profile-page .profile-top {
  flex-direction: column;
  gap: 12px;
}

.profile-page .avatar.big {
  width: 150px;
  height: 150px;
  font-size: 56px;
  border: 3px solid var(--line);
  box-shadow: 0 0 0 6px #fff, 0 0 0 9px var(--line);
}

.profile-page .profile-top h2 {
  font-size: 30px;
}

.profile-page .page-head .muted {
  margin: 2px 0;
  color: #7a4a58;
}

/* bow on the arch, roses and a letter on the panels */
.profile-page .page-head::before,
.profile-page .page-head::after,
.profile-page .card::after {
  position: absolute;
  line-height: 1;
  pointer-events: none;
}

.profile-page .page-head::before {
  content: "🎀";
  top: 28px;
  right: -6px;
  font-size: 64px;
  transform: rotate(18deg);
}

.profile-page .page-head::after {
  content: "🌹";
  left: -14px;
  bottom: -16px;
  font-size: 44px;
}

/* ---- panels ---- */
.profile-page .card {
  position: relative;
  padding: 30px 26px 24px;
  border: 3px solid var(--line);
  border-radius: 26px;
  background: #fbf1f3;
  box-shadow: 6px 6px 0 #e6b7c2;
}

.profile-page .card:nth-of-type(odd) {
  background: var(--pink);
}

.profile-page .card::after {
  content: "🌹";
  right: -12px;
  bottom: -14px;
  font-size: 36px;
}

.profile-page .card:nth-of-type(odd)::after {
  content: "💌";
}

.profile-page .card.danger-zone::after {
  content: "🥀";
}

/* section name: a label stuck on the top edge of the panel */
.profile-page .card > h2 {
  position: absolute;
  top: -19px;
  left: 26px;
  margin: 0;
  padding: 5px 18px;
  border: 3px solid var(--line);
  border-radius: 999px;
  font-size: 15px;
  color: var(--line);
  background: #fff;
}

.profile-page .card h3 {
  margin: 20px 0 8px;
  padding-bottom: 6px;
  border-bottom: 2px dashed var(--line);
  font-size: 16px;
  color: var(--line);
}

.profile-page .card h3:first-of-type {
  margin-top: 4px;
}

.profile-page .field > span,
.profile-page .muted {
  color: #6d3a49;
}

.profile-page .app-input,
.profile-page .app-textarea {
  border: 2px solid var(--line);
  background: #fff;
  color: var(--line);
}

.profile-page .btn-app {
  border: 2.5px solid var(--line);
  color: var(--line);
  background: #f4a9bb;
  box-shadow: 3px 3px 0 var(--line);
}

.profile-page .btn-app:hover {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--line);
}

.profile-page .btn-app.light {
  background: #fff;
}

.profile-page .btn-app.danger {
  color: #fff;
  background: #b0164f;
}

.profile-page .codes li {
  border: 2px dashed var(--line);
  background: #fff;
}

.profile-page .qr {
  border: 3px solid var(--line);
}

.profile-page .danger-zone {
  border-color: var(--line);
}

@media (max-width: 900px) {
  .profile-page #signed-in {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .profile-page .page-head {
    border-radius: 160px 160px 26px 26px;
  }
}
