/* I Love You From... - mobile-first app shell styles.
   No external CSS framework dependency: kept compact and self-contained
   so the PWA works fully offline once the shell is cached. */

/* Warm-editorial palette (2026 refresh). Variable NAMES are kept as-is
   (--ilyf-red etc.) even though the values are no longer literally red -
   dozens of templates reference these by name, and repointing the value
   is much lower-risk than a global rename. --ilyf-danger used to be an
   exact duplicate of --ilyf-red; they're now distinct so destructive
   actions (delete, restrict, errors) read differently from the brand
   colour used for primary actions. */
:root {
  --ilyf-red: #5c1220; /*#0d4e7e*/
  --ilyf-red-dark: #3e0c16;
  --ilyf-pink-bg: #f6f1e7;
  --ilyf-ink: #444444; /*#33241c*/
  --ilyf-muted: #8c7f72;
  --ilyf-border: #e4d8c6;
  --ilyf-white: #ffffff;
  --ilyf-success: #4b7a2f;
  --ilyf-warning: #a8720a;
  --ilyf-danger: #a6341c;
  --ilyf-gold: #c99a2e;
  --ilyf-mustard: #e1ad01;
  --ilyf-olive: #6b7f27;
  --ilyf-bg-subtle: #ede2d0;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --nav-height: 62px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ilyf-pink-bg);
  color: var(--ilyf-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

body {
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 12px);
}

a { color: inherit; text-decoration: none; }
/* height:auto is the important part here, not just max-width. The HTML
   width/height attributes (used deliberately in several places to
   reserve space and avoid layout shift before an image loads) map to a
   presentational height:<px> hint, which - with no author height rule
   to beat it - wins the cascade over the UA stylesheet and pins the
   image at that literal pixel height regardless of how much max-width
   has shrunk its rendered width. That stretches/squishes any image
   whose HTML attributes don't match its final on-screen width 1:1
   (e.g. QR codes on narrow viewports, and message-gallery photos in
   the masonry grid - see .masonry-gallery .grid-item img below, which
   needs the same override since it also sets its own width). */
img { max-width: 100%; height: auto; display: block; }

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ilyf-red);
  color: #fff;
  padding: calc(14px + var(--safe-top)) 16px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 10px rgba(51,36,28,0.10);
}

.app-topbar .heart { font-size: 20px; }
.heart-logo { display: inline-block; vertical-align: -4px; flex-shrink: 0; }
.place-thumb .heart-logo { vertical-align: 0; }
.app-topbar h1 {
  font-size: 18px;
  margin: 0;
  font-weight: 700;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-topbar a.back { color: #fff; font-size: 20px; padding: 4px 6px; margin-inline-start: -6px; }

/* Reusable utility for directional glyphs (back arrows, list chevrons):
   in RTL layouts these conventionally point the other way, so mirror the
   character itself rather than shipping separate left/right icon sets. */
[dir="rtl"] .rtl-mirror { display: inline-block; transform: scaleX(-1); }

.lang-switcher { margin-inline-start: auto; }
.lang-switcher select {
  width: auto;
  padding: 6px 8px;
  font-size: 13px;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.lang-switcher select option { color: var(--ilyf-ink); }

.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
}

.hero-card {
  background: linear-gradient(160deg, var(--ilyf-red), var(--ilyf-red-dark));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.hero-card h2 { margin: 0 0 6px; font-size: 20px; }
.hero-card p { margin: 0; opacity: 0.92; font-size: 14px; line-height: 1.5; }

.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.search-bar input[type=search],
.search-bar input[type=text] {
  flex: 1;
}

.card {
  background: var(--ilyf-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--ilyf-border);
  padding: 16px;
  margin-bottom: 12px;
}

.place-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}
.place-card .place-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--ilyf-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
}
.place-card .place-thumb picture { display: block; width: 100%; height: 100%; }
.place-card .place-thumb img { width: 100%; height: 100%; object-fit: cover; }
.place-card .place-info { flex: 1; min-width: 0; }
.place-card .place-info h3 { margin: 0 0 2px; font-size: 16px; }
.place-card .place-info p { margin: 0; font-size: 13px; color: var(--ilyf-muted); }
.place-card .chevron { color: var(--ilyf-muted); font-size: 18px; }
.place-card .place-message-count { margin-top: 3px !important; font-size: 12px !important; font-weight: 600; color: var(--ilyf-gold) !important; }

.message-card { padding: 16px; }
.message-card .msg-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.message-card .msg-author { font-weight: 600; font-size: 14px; }
.message-card .msg-time { font-size: 12px; color: var(--ilyf-muted); }
.message-card .msg-text { font-size: 15px; line-height: 1.5; margin: 0 0 10px; white-space: pre-wrap; word-wrap: break-word; }
.message-card mark { background: var(--ilyf-mustard); color: var(--ilyf-ink); padding: 0 2px; border-radius: var(--radius-sm); }
.message-card .msg-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.message-card .msg-images.count-1 { grid-template-columns: 1fr; }
.message-card .msg-images.count-2 { grid-template-columns: repeat(2, 1fr); }
.message-card .msg-images img,
.message-card .msg-images picture,
.message-card .msg-images .more-overlay {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--ilyf-bg-subtle);
}
.message-card .msg-images picture { display: block; overflow: hidden; }
.message-card .msg-images .more-overlay {
  position: relative;
}
.message-card .msg-images .more-overlay img,
.message-card .msg-images .more-overlay picture { position: absolute; inset: 0; }
.message-card .msg-images .more-overlay span {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600;
  border-radius: var(--radius-sm);
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: 999px;
}
.badge-pending { background: #fbeecb; color: var(--ilyf-warning); }
.badge-approved { background: #e6ecd6; color: var(--ilyf-success); }
.badge-rejected { background: #f3e0d5; color: var(--ilyf-danger); }
.badge-super { background: #ede4fb; color: #6b3fc4; }
.badge-moderator { background: #e3f1fc; color: #1467b0; }
.badge-suspended { background: #eee; color: #777; }
.badge-restricted { background: var(--ilyf-danger); color: #fff; }
.badge-featured { background: var(--ilyf-mustard); color: var(--ilyf-ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius-md);
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: transform .05s ease, opacity .15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--ilyf-red); color: #fff; }
.btn-secondary { background: #fff; color: var(--ilyf-red); border: 1.5px solid var(--ilyf-red); }
.btn-ghost { background: transparent; color: var(--ilyf-ink); }
.btn-sm { width: auto; padding: 8px 14px; font-size: 13px; }
.btn-danger { background: var(--ilyf-danger); color: #fff; }
.btn-success { background: var(--ilyf-success); color: #fff; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { width: auto; flex: 1; }

/* Compact icon-only action row (e.g. category.php: leave a message,
   follow, gallery, donate) - each action is a single glyph with the
   accessible/hover label carried entirely by title+aria-label rather
   than visible text, for a tidier row than four full-width buttons. */
.icon-btn-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.icon-btn-row form { display: contents; }
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border: 1.5px solid var(--ilyf-border);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--ilyf-red);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: transform .05s ease, background .15s ease;
}
.btn-icon:active { transform: scale(0.94); }
.btn-icon-primary { background: var(--ilyf-red); border-color: var(--ilyf-red); color: #fff; }

/* Generic centered modal (search/date filter on category.php; reusable
   for any future form-in-a-modal). Toggled via the "show" class, same
   convention as .lightbox-overlay - see assets/js/modal.js. */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(51,36,28,0.55);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px 20px 20px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 50px rgba(51,36,28,0.25);
}
.modal-close {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--ilyf-bg-subtle);
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--ilyf-ink);
}

label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
label:first-child { margin-top: 0; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=tel],
textarea, select {
  width: 100%;
  border: 1.5px solid var(--ilyf-border);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--ilyf-ink);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--ilyf-red);
}
textarea { resize: vertical; min-height: 110px; }
.hint { font-size: 12px; color: var(--ilyf-muted); margin-top: 4px; }
.form-error { color: var(--ilyf-danger); font-size: 12.5px; margin-top: 4px; }

.file-drop {
  border: 2px dashed var(--ilyf-border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  color: var(--ilyf-muted);
  font-size: 14px;
  cursor: pointer;
  background: #fff;
}

/* Visually hides the real <input type="file"> behind a styled .file-drop
   label, WITHOUT display:none. A display:none (or visibility:hidden)
   form control can't receive focus, and a required field that can't be
   focused makes the browser abort the whole form submit with a console
   error ("An invalid form control ... is not focusable") instead of
   showing any validation message - silently blocking submission whenever
   no photo was chosen yet. Clipping to 1px keeps the input focusable (and
   part of the accessibility tree) while staying invisible. */
.file-input-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Same visually-hidden technique, used for anti-spam honeypot fields.
   Deliberately NOT a fixed "left:-9999px" offset - that only hides the
   field in left-to-right layouts and would sit visibly on screen (or at
   least on the wrong side) once dir="rtl" is in play for Arabic. Clipping
   works the same regardless of text direction. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Logical inset so a photo's remove/delete button sits at the
   trailing corner regardless of text direction (top-right in LTR
   languages, automatically top-left under dir="rtl"). */
.photo-remove-btn {
  position: absolute;
  top: 4px;
  inset-inline-end: 4px;
}
.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.image-preview-grid .preview-thumb {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--ilyf-bg-subtle);
}
.image-preview-grid .preview-thumb picture,
.image-preview-grid .preview-thumb > a {
  display: block;
  width: 100%;
  height: 100%;
}
.image-preview-grid .preview-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* A .preview-thumb that's also a lightbox trigger is a <button>, not a
   <div> (needs to be a real, keyboard-focusable control) - reset the
   default button chrome so it looks identical to the plain div version. */
.image-preview-grid .preview-thumb.lightbox-trigger {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

/* Full-screen photo viewer modal - see assets/js/lightbox.js. */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(20,12,9,0.92);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.lightbox-overlay.show { display: flex; }
.lightbox-image {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  border-radius: 50%;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close {
  top: calc(var(--safe-top) + 12px);
  inset-inline-end: 16px;
  width: 40px;
  height: 40px;
  font-size: 22px;
}
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  font-size: 24px;
}
.lightbox-prev { inset-inline-start: 12px; }
.lightbox-next { inset-inline-end: 12px; }
.lightbox-counter {
  position: absolute;
  bottom: calc(var(--safe-bottom) + 14px);
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.flash-stack { position: fixed; top: calc(var(--safe-top) + 8px); left: 0; right: 0; z-index: 50; padding: 0 12px; }
.flash {
  max-width: 560px;
  margin: 0 auto 8px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(51,36,28,0.14);
}
.flash-success { background: #e6ecd6; color: #3f6526; }
.flash-error { background: #f3e0d5; color: #8a2a12; }
.flash-info { background: #e3f1fc; color: #12588f; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--ilyf-muted); }
.empty-state .heart-icon { font-size: 40px; margin-bottom: 10px; }

.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 30;
  background: #fff;
  border-top: 1px solid var(--ilyf-border);
  display: flex;
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -2px 10px rgba(51,36,28,0.08);
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 9px 4px 8px;
  font-size: 11px;
  color: var(--ilyf-muted);
}
.bottom-nav a .icon { font-size: 20px; line-height: 1; }
.bottom-nav a.active { color: var(--ilyf-red); font-weight: 700; }

.install-banner {
  display: none;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid var(--ilyf-red);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
}
.install-banner.show { display: flex; }
.install-banner button { flex-shrink: 0; }

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 18px 0; }
.pagination-disabled { opacity: 0.4; cursor: not-allowed; }
.pagination-ellipsis { padding: 0 2px; color: var(--ilyf-muted); font-weight: 700; }

.qr-box { text-align: center; }
.qr-box img { margin: 0 auto 12px; border: 8px solid #fff; border-radius: var(--radius-sm); box-shadow: 0 2px 10px rgba(51,36,28,0.10); }
.qr-link { font-size: 12px; word-break: break-all; color: var(--ilyf-muted); background: var(--ilyf-bg-subtle); padding: 8px 10px; border-radius: var(--radius-sm); }

table.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.admin-table th, table.admin-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--ilyf-border); vertical-align: top; }
table.admin-table th { color: var(--ilyf-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; white-space: nowrap; }
table.admin-table tbody tr:hover { background: var(--ilyf-bg-subtle); }

/* Wraps every admin list table so it scrolls horizontally on a narrow
   phone screen instead of squeezing columns unreadably - the table
   itself stays a real <table> at every width. */
.admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 12px; }

/* Compact action buttons/forms inside a table cell (as opposed to the
   full-width .btn-row used in the old card layout) - lets Edit/Toggle/
   Delete etc. sit side by side instead of stacking full-width. */
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.table-actions form { display: inline-flex; }
.table-actions .btn { width: auto; }

/* Icon-only action buttons inside admin table rows - compact square
   buttons that carry their label via title/aria-label rather than
   visible text, so an Actions column stays narrow even with several
   actions. Reuses the existing color classes (btn-secondary/btn-danger/
   btn-success/btn-ghost/btn-primary) for meaning; this modifier only
   overrides size/shape/padding. Icons come from the self-hosted
   Bootstrap Icons font (assets/vendor/bootstrap-icons). */
.btn.btn-icon-sm {
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 15px;
  border-radius: var(--radius-sm);
  gap: 0;
  flex-shrink: 0;
}

.table-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; display: block; }
.admin-table td picture { display: block; width: 48px; height: 48px; }

.tabs { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; }
.tabs a { padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #fff; border: 1px solid var(--ilyf-border); white-space: nowrap; }
.tabs a.active { background: var(--ilyf-red); color: #fff; border-color: var(--ilyf-red); }

.masonry-gallery {
  margin: 0 -4px;
}
.masonry-gallery .grid-sizer,
.masonry-gallery .grid-item {
  width: 50%;
}
.masonry-gallery .grid-item {
  padding: 4px;
}
.masonry-gallery .grid-item a {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--ilyf-bg-subtle);
}
.masonry-gallery .grid-item picture {
  display: block;
}
.masonry-gallery .grid-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity .2s ease;
}
@media (min-width: 480px) {
  .masonry-gallery .grid-sizer,
  .masonry-gallery .grid-item {
    width: 33.333%;
  }
}
@media (min-width: 700px) {
  .masonry-gallery .grid-sizer,
  .masonry-gallery .grid-item {
    width: 25%;
  }
}
@media (min-width: 900px) {
  .masonry-gallery .grid-sizer,
  .masonry-gallery .grid-item {
    width: 20%;
  }
}

@media (min-width: 640px) {
  .container { padding: 24px; }
}

/* -----------------------------------------------------------------
   Admin/moderator interface - desktop-friendly, still responsive.
   Mobile keeps the existing single-column look (sidebar collapses to
   the familiar horizontal scrolling tab bar at the top). From 900px
   up, the nav becomes a persistent left sidebar and the content area
   widens well past the mobile 560px container, so tables, message
   queues and dashboards can use the extra screen space admins get on
   a desktop.
   ----------------------------------------------------------------- */
.admin-body { padding-bottom: 0; }

.admin-topbar-signout { display: none; color: #fff; font-size: 13px; font-weight: 600; }

.admin-shell {
  display: block;
}

.admin-sidebar.tabs {
  margin: 0;
  padding: 10px 16px;
  background: var(--ilyf-white);
  border-bottom: 1px solid var(--ilyf-border);
}

.admin-sidebar-signout { color: var(--ilyf-danger); }

.admin-content {
  max-width: 560px;
}

.admin-panel {
  max-width: 720px;
}

.admin-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-dashboard-charts {
  display: block;
}

@media (min-width: 900px) {
  body.admin-body { padding-bottom: 0; }

  .admin-topbar-signout { display: inline-block; }

  .admin-shell {
    display: flex;
    align-items: flex-start;
    /*max-width: 1400px;*/
    margin: 0 auto;
  }

  .admin-sidebar.tabs {
    position: sticky;
    top: 0;
    flex-shrink: 0;
    width: 220px;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 20px 12px;
    border-bottom: none;
    border-right: 1px solid var(--ilyf-border);
  }
  .admin-sidebar.tabs a {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    background: transparent;
    border: none;
    white-space: nowrap;
  }
  .admin-sidebar.tabs a.active {
    background: var(--ilyf-red);
    color: #fff;
    border-color: var(--ilyf-red);
  }
  .admin-sidebar-signout {
    margin-top: auto;
    padding-top: 14px !important;
    border-top: 1px solid var(--ilyf-border);
  }

  .admin-content {
    flex: 1;
    min-width: 0;
    max-width: none;
    padding: 28px 36px;
  }

  .admin-dashboard-charts {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 16px;
    align-items: start;
  }
  .admin-dashboard-charts > div {
    min-width: 0;
  }

  table.admin-table {
    font-size: 14px;
  }
}

/* ---------------------------------------------------------------------
   Static content pages (About, Guide, FAQ, Terms, Privacy) - readable
   long-form text: generous line-height, clear heading hierarchy, no
   card chrome needed since these aren't data cards.
--------------------------------------------------------------------- */
.content-page { max-width: 640px; margin: 0 auto; line-height: 1.65; }
.content-page h2 { font-size: 20px; margin: 28px 0 10px; }
.content-page h2:first-child { margin-top: 0; }
.content-page h3 { font-size: 16px; margin: 20px 0 8px; }
.content-page p { margin: 0 0 14px; }
.content-page ul, .content-page ol { margin: 0 0 14px; padding-inline-start: 22px; }
.content-page li { margin-bottom: 6px; }
.content-page .updated-note { color: var(--ilyf-muted); font-size: 13px; margin-bottom: 22px; }
.content-page a { color: var(--ilyf-red); font-weight: 600; }

.faq-item {
  background: var(--ilyf-white);
  border: 1px solid var(--ilyf-border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  padding: 4px 16px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 0;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  float: inline-end;
  color: var(--ilyf-red);
  font-weight: 700;
}
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { padding-bottom: 14px; color: var(--ilyf-ink); }

/* Small muted text-link row above the bottom nav, linking to the static
   content pages - part of includes/footer.php on every public page. */
.content-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  padding: 18px 16px 6px;
  text-align: center;
}
.content-links a { color: var(--ilyf-muted); font-size: 13px; text-decoration: none; }
.content-links a:hover { text-decoration: underline; }

/* Mandatory checkbox rows (e.g. "I agree to the Terms" on register.php) -
   checkbox + wrapped label text side by side, logical spacing so it
   mirrors correctly under RTL locales. */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
}
.checkbox-row input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
  flex-shrink: 0;
}
.checkbox-row label {
  margin: 0;
  font-weight: normal;
  font-size: 14px;
  line-height: 1.4;
}
.checkbox-row a { color: var(--ilyf-red); font-weight: 600; }
