/* Section pages + notifications — same apoc atmosphere as Hub */
:root {
  --apoc-ash: #c9b59a;
  --apoc-ember: #ff6a2a;
  --apoc-rad: #9dff6a;
  --apoc-blood: #8b1e1e;
  --apoc-steel: #6a7a72;
}

body.page-section,
body.notif-page {
  background: #0a0806;
  color: var(--fg, #f0e6d4);
  min-height: 100%;
  min-height: 100dvh;
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
}

body.page-section {
  /* bottom tabs on Ignore need room */
}

body.page-section.has-tabs {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

body.page-section .apoc-stage,
body.notif-page .apoc-stage {
  z-index: 0;
}

.section-page,
.notif-shell {
  position: relative;
  z-index: 1;
}

/* ===== Section hero (replaces flat combry-brand look) ===== */
body.page-section .combry-hero {
  margin-bottom: 14px;
}

body.page-section .combry-brand-block,
body.page-section .combry-brand-block.theme-ignore,
body.page-section .combry-brand-block.theme-farm,
body.page-section .combry-brand-block.theme-dig,
body.page-section .combry-brand-block.theme-newbie {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(232,165,75,0.28);
  background:
    linear-gradient(165deg, rgba(48,36,26,0.88), rgba(18,13,10,0.94)),
    repeating-linear-gradient(135deg, transparent, transparent 10px, rgba(0,0,0,0.04) 11px);
  box-shadow:
    0 18px 48px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,220,160,0.1);
  backdrop-filter: blur(8px);
  padding: 18px 16px 14px;
}

body.page-section .combry-brand-block::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 40%, rgba(255,180,80,0.05) 50%, transparent 60%);
  animation: apocSheen 7s ease-in-out infinite;
}

body.page-section .combry-brand-block::after {
  right: -30px;
  top: -30px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255,106,42,0.18), transparent 70%);
}

.sec-stamp {
  display: inline-block;
  margin: 0 0 8px;
  padding: 3px 10px;
  border: 1px dashed rgba(232,165,75,0.45);
  color: var(--apoc-rad);
  font-family: var(--font-stamp, "Special Elite", monospace);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.25);
  transform: rotate(-1deg);
}

.sec-kicker {
  margin: 0 48px 4px 0;
  font-family: var(--font-stamp, "Special Elite", monospace);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--apoc-rad);
}

body.page-section .combry-brand {
  margin: 0 48px 6px 0;
  font-family: var(--font-display, "Oswald", sans-serif);
  font-weight: 700;
  font-size: clamp(1.45rem, 5vw, 2rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand, #e8a54b);
  text-shadow:
    0 0 18px rgba(255,106,42,0.28),
    0 2px 0 #3a1808;
  position: relative;
  z-index: 1;
}

body.page-section .combry-sub {
  margin: 0;
  max-width: 38em;
  color: var(--apoc-ash);
  font-family: var(--font-stamp, "Special Elite", monospace);
  font-size: 0.88rem;
  line-height: 1.45;
  position: relative;
  z-index: 1;
}

body.page-section .section-brand-actions {
  margin-top: 14px;
  gap: 8px;
  position: relative;
  z-index: 2;
}

body.page-section .combry-brand-block .notif-chat-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(232,165,75,0.4);
  color: var(--apoc-ash);
}

body.page-section .combry-brand-block .notif-chat-btn:hover {
  color: var(--brand, #e8a54b);
  border-color: rgba(255,106,42,0.55);
}

/* theme accents */
body.page-section .theme-ignore { border-color: rgba(232,165,75,0.35); }
body.page-section .theme-farm { border-color: rgba(224,176,122,0.35); }
body.page-section .theme-dig { border-color: rgba(157,255,106,0.28); }
body.page-section .theme-dig .combry-brand { color: #b8d49a; }
body.page-section .theme-newbie { border-color: rgba(159,223,138,0.3); }
body.page-section .theme-newbie .combry-brand { color: #9fdf8a; }
body.page-section .theme-combry { border-color: rgba(255,122,24,0.35); }
body.page-section .theme-combry .combry-brand { color: #ff8a2b; }
body.page-section .theme-arena { border-color: rgba(255,106,42,0.4); }
body.page-section .theme-arena .combry-brand { color: #ff7a45; }
body.page-section .theme-promka { border-color: rgba(232, 196, 90, 0.42); }
body.page-section .theme-promka .combry-brand { color: #e8c45a; }
body.page-section .theme-lizards { border-color: rgba(126,207,154,0.35); }
body.page-section .theme-lizards .combry-brand { color: #7ecf9a; }

/* panels / cards / logs — rust terminal */
body.page-section .farm-person-card,
body.page-section .box.panel,
body.page-section .farm-log-wrap,
body.page-section .newbie-log-wrap,
body.page-section .combry-shared-panel,
body.page-section .money-card {
  border-radius: 6px !important;
  border-color: rgba(232,165,75,0.22) !important;
  background:
    linear-gradient(165deg, rgba(40,30,22,0.92), rgba(16,12,10,0.96)) !important;
  box-shadow: 0 14px 36px rgba(0,0,0,0.4);
}

body.page-section .farm-filters,
body.page-section .log-filters {
  gap: 6px;
}

body.page-section .farm-filters button,
body.page-section .log-filters .fchip,
body.page-section .combry-ctrl button,
body.page-section button:not(.farm-modal-close):not(.card-info-btn):not(.card-cfg-btn):not(.card-map-btn):not(.card-gear-btn):not(.card-stream-btn):not(.farm-totals-main):not(.farm-totals-reset) {
  border-radius: 4px;
}

body.page-section .farm-filters button.active,
body.page-section .log-filters .fchip.active {
  border-color: rgba(255,106,42,0.55);
  color: #ffd8b0;
  background: rgba(255,106,42,0.12);
}

body.page-section .combry-status-pill {
  border: 1px solid rgba(232,165,75,0.3);
  background: rgba(0,0,0,0.35);
  font-family: var(--font-stamp, "Special Elite", monospace);
  letter-spacing: 0.04em;
}

body.page-section .wrap,
body.page-section .farm-wrap,
body.page-section .combry-wrap,
body.page-section .newbie-wrap {
  max-width: min(920px, 100%);
  margin: 0 auto;
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
}

body.page-section .tabs {
  background: rgba(12,9,7,0.92);
  border-top: 1px solid rgba(232,165,75,0.22);
  backdrop-filter: blur(10px);
}

/* ===== Notifications page ===== */
body.notif-page {
  padding: calc(12px + env(safe-area-inset-top, 0px)) 12px calc(24px + env(safe-area-inset-bottom, 0px));
}

.notif-shell {
  width: min(720px, 100%);
  margin: 0 auto;
}

.notif-hero {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(232,165,75,0.28);
  background:
    linear-gradient(165deg, rgba(48,36,26,0.9), rgba(18,13,10,0.95));
  box-shadow: 0 18px 48px rgba(0,0,0,0.55);
  padding: 18px 16px 14px;
  margin-bottom: 14px;
}

.notif-hero .sec-stamp { margin-bottom: 10px; }
.notif-hero h1 {
  margin: 0 0 6px;
  font-family: var(--font-display, "Oswald", sans-serif);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand, #e8a54b);
  font-size: clamp(1.4rem, 5vw, 1.9rem);
  text-shadow: 0 0 18px rgba(255,106,42,0.28);
}
.notif-hero .sub {
  margin: 0;
  color: var(--apoc-ash);
  font-family: var(--font-stamp, "Special Elite", monospace);
  font-size: 0.86rem;
  line-height: 1.4;
  max-width: 36em;
}
.notif-hero .top-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notif-page .meta {
  margin-bottom: 12px;
  color: var(--muted, #a8947c);
  font-size: 0.82rem;
  font-family: var(--font-stamp, "Special Elite", monospace);
}

.notif-page .earn-banner,
.notif-page .compare,
.notif-page .card {
  border-radius: 6px;
  border: 1px solid rgba(232,165,75,0.22);
  background: linear-gradient(165deg, rgba(40,30,22,0.94), rgba(16,12,10,0.96));
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

.notif-page .earn-banner {
  margin-bottom: 12px;
  padding: 14px;
  border-color: rgba(157,255,106,0.25);
}
.notif-page .earn-banner .total-label {
  color: var(--muted, #a8947c);
  font-size: 12px;
  margin-bottom: 4px;
}
.notif-page .earn-banner .total-value {
  color: var(--apoc-rad);
  font-size: 28px;
  font-weight: 800;
  font-family: var(--font-display, "Oswald", sans-serif);
  letter-spacing: 0.04em;
}
.notif-page .earn-banner .total-hint {
  margin-top: 4px;
  color: var(--muted, #a8947c);
  font-size: 12px;
}
.notif-page .earn-bots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.notif-page .earn-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 110px;
  padding: 8px 10px;
  border-radius: 4px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(232,165,75,0.18);
}
.notif-page .earn-chip .n { color: var(--muted, #a8947c); font-size: 12px; }
.notif-page .earn-chip .v { color: var(--fg, #f0e6d4); font-size: 15px; font-weight: 700; }
.notif-page .earn-chip .v.na { color: var(--muted, #a8947c); font-weight: 500; font-size: 13px; }

.notif-page .compare {
  display: none;
  margin-bottom: 14px;
  padding: 14px;
  border-color: rgba(126,207,154,0.35);
}
.notif-page .compare.open { display: block; }
.notif-page .list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.notif-page .card {
  padding: 12px 14px;
}
.notif-page .card.farm-clickable { cursor: pointer; transition: border-color .15s, transform .15s; }
.notif-page .card.farm-clickable:hover,
.notif-page .card.farm-clickable.active {
  border-color: rgba(126,207,154,0.5);
  transform: translateY(-1px);
}
.notif-page .card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 6px;
}
.notif-page .title {
  margin: 0;
  color: var(--brand, #e8a54b);
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-display, "Oswald", sans-serif);
  letter-spacing: 0.04em;
}
.notif-page .when { color: var(--muted, #a8947c); font-size: 12px; white-space: nowrap; }
.notif-page .body {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.4;
  font-size: 15px;
}
.notif-page .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.notif-page .tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(224,176,122,0.16);
  color: var(--muted, #a8947c);
  font-family: var(--font-stamp, "Special Elite", monospace);
}
.notif-page .tag.ev-online { color: #7ecf9a; border-color: rgba(126,207,154,0.35); }
.notif-page .tag.ev-offline { color: #d2877a; border-color: rgba(210,135,122,0.35); }
.notif-page .tag.ev-rad { color: #c9b35a; border-color: rgba(201,179,90,0.35); }
.notif-page .tag.ev-farm_start,
.notif-page .tag.ev-farm_status,
.notif-page .tag.ev-repair_ok { color: #8cc5a0; border-color: rgba(140,197,160,0.35); }
.notif-page .tag.ev-arena_break { color: #e0b07a; border-color: rgba(224,176,122,0.4); }
.notif-page .tag.ev-repair_fail { color: #e0a090; border-color: rgba(210,135,122,0.4); }
.notif-page .tag.hint { color: #8cc5a0; border-color: rgba(140,197,160,0.3); }
.notif-page .empty,
.notif-page .error {
  padding: 24px 16px;
  text-align: center;
  color: var(--muted, #a8947c);
  border: 1px dashed rgba(232,165,75,0.28);
  border-radius: 6px;
  background: rgba(0,0,0,0.22);
}
.notif-page .error { color: #e0a090; }
.notif-page a.ghost,
.notif-page button.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(74,58,44,0.95);
  color: var(--muted, #a8947c);
  padding: 8px 12px;
  border-radius: 4px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
.notif-page a.ghost:hover,
.notif-page button.ghost:hover {
  color: var(--fg, #f0e6d4);
  border-color: rgba(232,165,75,0.45);
}
.notif-page .ghost.danger {
  border-color: rgba(210,135,122,0.55);
  color: #e8b4aa;
}

@media (max-width: 640px) {
  body.page-section .combry-brand {
    margin-right: 44px;
    letter-spacing: 0.08em;
  }
  body.page-section .combry-sub {
    font-size: 0.8rem;
  }
  body.page-section .combry-ctrl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  body.page-section .combry-ctrl button {
    width: 100%;
  }
  .notif-hero .top-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .notif-hero .top-actions .ghost {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.page-section .combry-brand-block::before {
    animation: none !important;
  }
}
