/* ===== Google Fonts: Inter ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ===== Design Tokens ===== */
:root {
  --primary: #1971C2;
  --primary-light: #228BE6;
  --primary-dark: #1864AB;
  --primary-muted: rgba(25, 113, 194, 0.1);
  --accent: #228BE6;
  --bg: #f1f3f5;
  --surface: #ffffff;
  --text: #1a1a2e;
  --muted: #868e96;
  --border: #dee2e6;
  --border-light: #e9ecef;
  --shadow: 0 1px 4px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

/* ===== Reset ===== */
* { box-sizing: border-box; }
img, video { max-width: 100%; height: auto; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 0.9375rem;
  line-height: 1.5;
}

body.home-page { background: var(--bg); }
body.dashboard-body { background: var(--bg); }

a { color: inherit; text-decoration: none; }

/* ===== Page Shell ===== */
.page-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.home-page .page-shell { padding: 0; }
.rose-page .page-shell { padding: 0; }
/* Home/rose page: add padding to main content area, not the header */
.home-page .page-shell > main,
.rose-page .page-shell > main { padding: 16px; }
body.home-page.rose-page .page-shell > main { padding: 12px 16px; }
.home-page .page-shell {
  padding-bottom: 148px;
}
.dashboard-shell { width: 100%; max-width: none; }

/* ===== Base Card Styles (shared) ===== */
.masthead-card,
.topbar,
.menu-card,
.organizer-card,
.hero,
.section,
.footer,
.dashboard-panel,
.dashboard-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

/* ===== Topbar / Site Header ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  overflow: visible;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 20px;
  min-height: 50px;
  margin-bottom: 0;
  border: none;
  border-radius: 0;
  background: var(--primary);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex: 1;
}

.topbar-has-banner {
  min-height: auto;
  background: var(--primary);
}

.topbar-banner-image { display: none; }

body.home-page.rose-page .topbar-banner-image {
  display: none;
}

/* ===== Masthead ===== */
.masthead-card {
  overflow: visible;
  margin-bottom: 0;
  border-radius: 0;
  border: none;
  background: var(--primary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.masthead-card .topbar,
.masthead-card .menu-card,
.masthead-card .organizer-card {
  margin-bottom: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.masthead-card .topbar {
  background-color: transparent;
}

/* ===== Brand ===== */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #fff;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.brand-burst {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 36px;
}

.brand-uploaded-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-orb { display: none; }
.orb-a, .orb-b, .orb-c { display: none; }

.home-page .brand-mark { display: none; }

.home-page .brand-text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #fff;
}

.admin-topbar .brand-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}

/* ===== Navigation ===== */
.nav,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav { width: auto; flex-wrap: wrap; justify-content: flex-start; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  color: rgba(255,255,255,0.88);
  font-weight: 500;
  font-size: 0.84rem;
  border-radius: 5px;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover { background: rgba(255,255,255,0.12); color: #fff; }

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-bottom: 0;
  margin-bottom: 0;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  display: none;
  z-index: 30;
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: none;
}

.dropdown-menu::before { display: none; }

.dropdown-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
  white-space: nowrap;
}

.dropdown-menu a:hover { background: var(--primary-muted); color: var(--primary); }

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu { display: block; }

.nav-caret {
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
}

/* Home page nav overrides */
.home-page .topbar { position: sticky; gap: 0; padding: 0 20px; }
body.home-page.rose-page .topbar { gap: 0; padding: 0 20px; }
body.home-page.rose-page .topbar-has-banner { position: relative; overflow: visible; border-radius: 0; background: var(--primary); }
body.home-page.rose-page .topbar-has-banner::before { display: none; }
body.home-page.rose-page .topbar-has-banner::after { display: none; }
.home-page .topbar-has-banner { min-height: 0; margin-top: 0; padding: 0; overflow: visible; background: none; background-color: transparent; }
.home-page .masthead-card { border: none; background: var(--primary); box-shadow: 0 2px 6px rgba(0,0,0,0.15); backdrop-filter: none; }
body.home-page.rose-page .masthead-card { margin-bottom: 0; position: relative; overflow: visible; background: var(--primary); box-shadow: 0 2px 6px rgba(0,0,0,0.15); border-radius: 0; }
body.home-page.rose-page .masthead-card::before { display: none; }
body.home-page.rose-page .masthead-card > * { position: relative; z-index: 1; }
body.home-page.rose-page .organizer-card,
body.home-page.rose-page .topbar,
body.home-page.rose-page .menu-card { background: transparent; }
body.home-page.rose-page .topbar,
body.home-page.rose-page .topbar-has-banner { min-height: 50px; padding: 0 20px; display: flex; align-items: center; gap: 12px; background: var(--primary); }
body.home-page.rose-page .menu-card { border-top: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.08); backdrop-filter: none; overflow: visible; position: relative; z-index: 6; }
body.home-page.rose-page .nav-dropdown { z-index: 7; }
body.home-page.rose-page .dropdown-menu { z-index: 40; background: var(--surface); border: 1px solid var(--border); }
body.home-page.rose-page .nav-link,
body.home-page.rose-page .topbar-actions a,
body.home-page.rose-page .topbar-actions span { color: rgba(255,255,255,0.88); }
body.home-page.rose-page .nav-link:hover,
body.home-page.rose-page .content-link:hover { color: #fff; }
body.home-page.rose-page .ghost-btn { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.12); color: #fff; }
body.home-page.rose-page .btn { background: rgba(255,255,255,0.9); color: var(--primary); }
body.home-page.rose-page .topbar-actions a[href="/auth/logout"] {
  border: 1px solid rgba(185, 28, 28, 0.28);
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.98), rgba(255, 255, 255, 0.98));
  color: #b91c1c;
}
body.home-page.rose-page .topbar-actions a[href="/auth/logout"]:hover {
  border-color: rgba(185, 28, 28, 0.42);
  background: linear-gradient(135deg, rgba(254, 202, 202, 1), rgba(255, 255, 255, 1));
  color: #991b1b;
}
body.home-page.rose-page .organizer-card { padding-top: 8px; }
body.home-page.rose-page .organizer-image-wrap { padding: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
body.home-page.rose-page .organizer-image { filter: none; }
body.home-page.rose-page .brand-burst { padding: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
body.home-page.rose-page .brand-uploaded-logo { filter: none; }
body.home-page.rose-page .topbar-banner-image { display: none; }

.home-page .menu-card,
.home-page .organizer-card { border: none; background: transparent; box-shadow: none; backdrop-filter: none; }

.menu-card { padding: 0 16px; border-top: 1px solid rgba(255,255,255,0.12); }
.rose-page .menu-card { padding: 0 16px; }

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-weight: 600;
}

.mobile-menu-toggle-icon {
  position: relative; width: 18px; height: 2px;
  border-radius: 999px; background: currentColor;
}
.mobile-menu-toggle-icon::before,
.mobile-menu-toggle-icon::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px;
  border-radius: 999px; background: currentColor;
}
.mobile-menu-toggle-icon::before { top: -6px; }
.mobile-menu-toggle-icon::after { top: 6px; }

/* Rose page: topbar title */
.rose-topbar-title {
  color: rgba(255,255,255,0.92);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* Rose page: compact hamburger trigger in topbar */
.rose-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
  margin-left: auto;
}

/* ===== Pillar Marquee ===== */
.pillar-marquee-section { overflow: hidden; padding: 8px 16px 16px; }
.pillar-marquee-surface { padding: 8px 0 4px; }
.pillar-marquee-standalone {
  margin-bottom: 16px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow);
}
.pillar-marquee-track {
  display: flex; gap: 16px; width: max-content;
  animation: pillarScroll 28s linear infinite;
}
.pillar-card {
  display: grid; gap: 10px; width: 240px; padding: 16px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.pillar-card-compact { width: clamp(280px, 16vw, 320px); align-content: start; }
.pillar-card-image-wrap {
  display: block; height: 120px; border-radius: var(--radius);
  background: var(--bg); overflow: hidden;
}
.pillar-card-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.pillar-card h3 { margin: 0; font-size: 1rem; line-height: 1.3; color: var(--primary-dark); }
.pillar-card-summary {
  display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted);
  line-height: 1.6; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
}

/* ===== Content Link ===== */
.content-link {
  display: inline-flex; align-items: center; gap: 6px;
  width: fit-content; color: var(--primary); font-weight: 600; text-decoration: none;
}
.content-link::after { content: "›"; font-size: 1.1em; line-height: 1; }
.content-link:hover { text-decoration: underline; }

@keyframes pillarScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== Organizer Card ===== */
.organizer-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(16px, 3vw, 48px); padding: 6px 16px 4px;
  border-bottom: none; background: transparent;
}
.rose-page .organizer-card { padding: 4px 16px 0; }
.masthead-card .topbar { background-color: transparent; }
.organizer-image-wrap { flex: 0 1 clamp(480px, 52vw, 860px); min-width: 0; max-width: 100%; }
.organizer-image {
  display: block; width: auto; max-width: 100%; height: auto;
  max-height: clamp(60px, 6vw, 100px);
  object-fit: contain; border-radius: 0; background: transparent; box-shadow: none;
}
.rose-page .organizer-image { max-height: clamp(56px, 6.5vw, 92px); }

/* ===== Brand Layout ===== */
.home-brand { gap: 12px; }
.menu-brand, .organizer-brand { flex: 0 0 auto; }

/* ===== Home nav ===== */
.home-page .nav { justify-content: flex-start; gap: 4px; }
.rose-page .nav { gap: 4px; }
.home-page .topbar-main { align-items: center; }

.menu-card-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 10px; min-height: 44px;
}
.rose-page .menu-card-inner { min-height: 40px; }
.topbar-nav-row { padding-top: 0; border-top: none; }
.menu-card .nav { justify-content: flex-start; }

.home-page .nav-link { font-size: 0.84rem; }
.rose-page .nav-link { font-size: 0.82rem; }
.rose-page .topbar-actions a { padding: 0.32rem 0.7rem; font-size: 0.78rem; }
.menu-actions { justify-content: flex-end; flex-wrap: wrap; }

.home-page .nav-link { font-size: 0.84rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: rgba(255,255,255,0.9); }
.home-page .nav-link:hover { color: #fff; background: rgba(255,255,255,0.12); }
.home-page .topbar-actions a { font-size: 0.82rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.home-page .topbar-actions { gap: 8px; }
.home-page .topbar-actions a[href="/auth/logout"] {
  border: 1px solid rgba(185, 28, 28, 0.28);
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.98), rgba(255, 255, 255, 0.98));
  color: #b91c1c;
}
.home-page .topbar-actions a[href="/auth/logout"]:hover {
  border-color: rgba(185, 28, 28, 0.42);
  background: linear-gradient(135deg, rgba(254, 202, 202, 1), rgba(255, 255, 255, 1));
  color: #991b1b;
}
.home-page .dropdown-menu { left: 0; min-width: 200px; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: 0 4px 16px rgba(0,0,0,0.12); transform: none; }
.home-page .dropdown-menu a { padding: 10px 12px; border-radius: 6px; color: var(--text); font-size: 0.9rem; font-weight: 500; text-transform: none; }
.home-page .dropdown-menu a:hover { background: var(--primary-muted); color: var(--primary); }
.nav-dropdown.is-open .dropdown-menu { display: block; }

/* ===== Buttons ===== */
.home-page .btn { background: rgba(255,255,255,0.9); color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.home-page .ghost-btn { border-color: rgba(255,255,255,0.35); background: rgba(255,255,255,0.12); color: #fff; }

/* ===== Hero ===== */
.hero-showcase {
  position: relative; overflow: hidden;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.95fr);
  gap: 20px; padding: 40px 36px 32px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow);
}
.rose-page .hero-showcase { grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.72fr); gap: 16px; }
.hero-showcase::before { display: none; }
.hero-showcase::after { display: none; }
.home-page .hero-copy { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.home-page .hero h1 { max-width: 14ch; font-size: clamp(2.4rem, 4.8vw, 4rem); }
.rose-page .hero h1 { max-width: 24ch; font-size: clamp(2rem, 3.4vw, 3.2rem); line-height: 1; }
.rose-page .hero-copy { max-width: min(88ch, 100%); }
.home-page .eyebrow { color: var(--primary); }
.home-page .date-line { color: var(--text); }
.home-page .subtitle { max-width: 58ch; font-size: 1rem; }
.rose-page .subtitle { max-width: 72ch; }
.hero-single-column { grid-template-columns: minmax(0, 1fr); }
.hero-single-column .hero-copy { max-width: min(78ch, 100%); }
.hero-single-column h1 { max-width: 14ch; }
.rose-page .hero-single-column h1 { max-width: 24ch; }
.hero-single-column .subtitle { max-width: 68ch; }
.hero-visual-panel { display: grid; gap: 20px; padding: 0; background: transparent; }
.hero-visual { position: relative; min-height: 520px; padding: 0; border-radius: 0; background: transparent; overflow: hidden; }
.hero-image-card {
  position: absolute; inset: 16px 16px 32px 80px;
  display: grid; place-items: center; padding: 16px;
  border-radius: var(--radius-xl); background: var(--surface);
  box-shadow: var(--shadow); overflow: hidden;
}
.hero-panel-image { width: 100%; height: 100%; object-fit: contain; object-position: center; border-radius: var(--radius); display: block; }
.hero-image-card-journal { background: #f0f4f8; background-size: cover; background-position: center; }
.hero-image-copy { display: none; }
.hero-image-copy h2 { margin: 8px 0 0; font-size: clamp(1.9rem, 3.6vw, 3.2rem); line-height: 0.98; font-family: 'Inter', sans-serif; font-weight: 800; letter-spacing: -0.04em; text-wrap: balance; overflow-wrap: anywhere; }
.hero-sphere, .sphere-a, .sphere-b, .sphere-c { display: none; }

.hero-stat-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 20px 0 0; }
.hero-stat-list li { padding: 0; border: none; border-radius: 0; background: transparent; box-shadow: none; }
.hero-stat-list strong { font-size: 1.6rem; line-height: 1; letter-spacing: -0.03em; }
.hero-stat-list span { display: block; margin-top: 6px; max-width: 14ch; color: var(--muted); line-height: 1.3; }

.home-page-intro {
  display: grid;
  gap: 0.7rem;
  padding: 20px 32px 0;
  margin: 12px 16px 0;
  border: 1px solid rgba(25, 113, 194, 0.12);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.96));
  box-shadow: var(--shadow);
}

.home-page-intro h1 {
  margin: 0;
  max-width: 18ch;
  color: #0d2038;
  font-size: clamp(1.6rem, 4vw, 2.9rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.home-page-intro-summary {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.home-page-intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.home-page-intro-actions > * {
  min-width: 0;
}

/* ===== Section Styles ===== */
.home-page .section { padding: 32px; }
.home-page .section,
.home-page .footer {
  border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); backdrop-filter: none;
}
.home-page .topbar { position: sticky; gap: 0; padding: 0 20px; background: var(--primary); backdrop-filter: none; }
.home-page .section h2,
.home-page .footer h3 { color: var(--text); }
.home-page .section-copy p,
.home-page .footer p,
.home-page .date-card p,
.home-page .feature-card p,
.home-page .committee-card p,
.home-page .program-card li,
.home-page .venue-card p,
.home-page .registration-card p { color: var(--muted); }
.home-page .date-card,
.home-page .feature-card,
.home-page .committee-card,
.home-page .program-card,
.home-page .venue-card,
.home-page .registration-card { border: none; background: transparent; box-shadow: none; }
.home-page .date-grid,
.home-page .committee-grid { gap: 18px; }
.home-page .split-section { gap: 18px; }

.section-hero .hero-image-copy h2 { max-width: 12ch; font-size: clamp(1.8rem, 2.8vw, 2.8rem); }
.section-hero-panel .hero-stat-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.section-hero-visual { min-height: 320px; }
.section-hero .hero-copy h1 { max-width: none; font-size: clamp(2rem, 3.2vw, 3.2rem); white-space: nowrap; }
.section-hero-copy-card { left: 20px; right: 20px; top: auto; bottom: 22px; max-width: 300px; padding: 18px 20px; border-radius: var(--radius-xl); background: rgba(255,255,255,0.92); box-shadow: 0 4px 16px rgba(0,0,0,0.12); backdrop-filter: none; }
.section-hero-copy-card p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 0.94rem; line-height: 1.55; }
.section-hero-panel .hero-stat-list li { min-height: 110px; }
.section-hero-panel .hero-stat-list strong { display: block; font-size: clamp(1.4rem, 1.8vw, 2rem); line-height: 1.05; letter-spacing: -0.03em; }
.section-hero-panel .hero-stat-list span { display: block; margin-top: 8px; color: var(--muted); }

.hero {
  display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(240px, 0.95fr);
  gap: 20px; padding: 32px; margin-bottom: 16px;
}

.hero h1,
.section h2,
.dashboard-panel h1 {
  margin: 8px 0 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
}

.hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.8rem); line-height: 0.96; max-width: 12ch; }
.section h2, .dashboard-panel h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); }

.eyebrow,
.section-kicker,
.panel-label,
.role,
.profile-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.74rem;
  color: var(--primary);
  font-weight: 700;
}

.date-line { margin: 14px 0 0; font-size: 1rem; font-weight: 600; }
.subtitle { margin: 0.9rem 0 1.5rem; color: var(--muted); font-size: 1rem; line-height: 1.65; max-width: 60ch; }

.hero-panel { padding: 0; border-radius: 0; background: transparent; }
.stat-list, .highlight-list, .contact-list { list-style: none; padding: 0; margin: 0; }
.stat-list li { padding: 14px 0; border-bottom: 1px solid var(--border); }
.stat-list li:last-child, .highlight-list li:last-child, .contact-list li:last-child { border-bottom: 0; }
.stat-list strong { display: block; font-size: 1.8rem; margin-bottom: 4px; }

/* ===== Buttons ===== */
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn,
.ghost-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.42rem 0.9rem; border-radius: 6px;
  font-weight: 500; font-size: 0.86rem;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
  line-height: 1.4;
  min-height: 40px;
  touch-action: manipulation;
}

.btn {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 3px rgba(25,113,194,0.2);
}

.btn:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 2px 6px rgba(25,113,194,0.3);
}

.ghost-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.ghost-btn:hover { background: var(--bg); border-color: #adb5bd; }

/* Compact nav-tab pills (used in form/section navigation) */
.nav-tab-group { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.nav-tab {
  display: inline-flex; align-items: center;
  padding: 5px 14px; border: 1.5px solid var(--border);
  border-radius: 999px; background: var(--surface);
  color: var(--muted); font-weight: 500; font-size: 0.82rem;
  cursor: pointer; transition: all 0.15s;
}
.nav-tab:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-muted); }
.nav-tab.is-active { border-color: var(--primary); color: var(--primary); background: var(--primary-muted); font-weight: 600; }

/* ===== Section ===== */
.section { padding: 28px; margin-bottom: 16px; }
.section-heading { margin-bottom: 16px; }
.date-grid, .committee-grid, .speaker-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.date-card,
.feature-card,
.committee-card,
.speaker-card,
.program-card,
.venue-card,
.registration-card {
  padding: 12px 4px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.date-card,
.submission-summary-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 18px 16px 16px;
  border: 1px solid rgba(25, 113, 194, 0.14);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 8px 20px rgba(25, 113, 194, 0.06);
  overflow: hidden;
}
.date-card::before,
.submission-summary-card::before {
  content: attr(data-icon);
  display: inline-grid;
  place-items: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-muted);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}
.date-card p, .committee-card p, .feature-card p, .speaker-card p, .program-card li, .venue-card p, .registration-card p { color: var(--muted); line-height: 1.6; }
.date-card h3, .committee-card h3, .feature-card h3, .speaker-card h3, .program-card h3, .venue-card h2, .registration-card h2 { margin: 0; }
.date-card h3, .submission-summary-card strong { font-size: 1.1rem; line-height: 1.25; letter-spacing: -0.02em; }
.submission-summary-card strong { color: var(--text); }
.submission-summary-card span { color: var(--muted); line-height: 1.45; font-size: 0.9rem; }
.submission-summary-card .content-link { margin-top: 2px; }

.speaker-card { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 16px; align-items: center; padding: 14px; }
.speaker-card-image { width: 96px; height: 110px; border-radius: var(--radius); object-fit: cover; background: var(--bg); order: 2; }
.speaker-card-image-placeholder { display: grid; place-items: center; width: 96px; height: 110px; border-radius: var(--radius); background: var(--bg); color: var(--muted); order: 2; }
.speaker-card-image-placeholder svg { width: 36px; height: 36px; }
.speaker-card-copy { min-width: 0; order: 1; }
.speaker-card-copy h3 { margin-top: 0; font-size: 0.98rem; line-height: 1.2; }

.venue-map-card { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.venue-map-heading { margin-bottom: 14px; }
.venue-map-heading h2 { margin-top: 6px; }
.venue-map-frame { overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); aspect-ratio: 16 / 7; }
.venue-map-frame iframe { display: block; width: 100%; height: 100%; min-height: 380px; border: 0; }

.speaker-card-role { margin: 4px 0 2px; color: var(--primary); font-weight: 600; line-height: 1.35; }
.pillar-marquee-track:hover { animation-play-state: paused; }
.section-card-image-wrap { display: grid; place-items: center; min-height: 160px; margin-bottom: 12px; border-radius: var(--radius); background: var(--bg); overflow: hidden; }
.section-card-image { width: 100%; max-height: 140px; object-fit: contain; }
.split-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.feature-stack, .program-list { display: grid; gap: 16px; }
.program-card ul, .dashboard-card ul { margin: 10px 0 0; padding-left: 18px; }
.highlight-list li, .contact-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.address { font-weight: 600; color: var(--text); }

/* ===== Footer ===== */
.footer {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 22px; padding: 24px 28px 36px; margin-bottom: 24px; color: var(--muted);
}
.home-page .footer {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 35;
  margin: 0;
  max-width: none;
}
.contact-list li { display: flex; justify-content: space-between; gap: 12px; }

/* ===== Registration / CTA ===== */
.registration-information-section { display: grid; gap: 22px; }
.registration-cta-panel { padding: 22px 26px 10px; border-top: 2px solid var(--primary-dark); text-align: center; }
.registration-cta-eyebrow { display: inline-block; padding: 6px 12px; margin: -36px auto 16px; background: var(--primary-dark); color: #fff; font-size: 0.84rem; font-weight: 600; letter-spacing: 0.03em; text-transform: none; }
.registration-cta-panel h2, .registration-support-card h2 { margin: 0 0 16px; font-family: 'Inter', sans-serif; font-size: clamp(1.6rem, 2.6vw, 2.4rem); color: var(--primary-dark); text-align: center; }
.registration-cta-panel .content-link { font-size: 1rem; }
.registration-cta-note { margin: 18px 0 0; font-size: 1rem; color: var(--muted); text-align: center; }
.registration-support-card { padding: 24px 22px; border-left: 4px solid var(--primary); border-radius: var(--radius); background: #e8f0fe; }
.registration-support-card p { color: var(--muted); line-height: 1.7; }
.registration-support-meta { margin-top: 16px; }
.registration-support-meta p { margin: 6px 0; color: var(--text); }
.registration-support-meta a { color: #dc3545; text-decoration: none; }
.footer-note { align-self: end; }
.footer-note .content-link { color: var(--primary); }

/* ===== Dashboard Body ===== */
.dashboard-body { min-height: 100vh; }

/* ===== Admin Topbar ===== */
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  margin-bottom: 20px;
  border: none;
  border-radius: 0;
  background: var(--primary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.admin-topbar-main {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 0 20px; min-height: 48px;
}

.admin-nav {
  display: flex; flex-direction: row; flex-wrap: wrap;
  justify-content: flex-start; align-items: center;
  gap: 0; padding: 0 12px;
  border-top: 1px solid rgba(255,255,255,0.15);
  background: var(--primary-dark);
}

.admin-submissions-topbar { margin-bottom: 16px; }

.admin-topbar .brand-text { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; color: #fff; }

.admin-topbar .nav-link {
  font-size: 0.82rem; font-weight: 500; letter-spacing: 0;
  text-transform: none; color: rgba(255,255,255,0.82); justify-content: center;
  padding: 8px 12px; border-radius: 0; border-bottom: 2px solid transparent;
}
.admin-topbar .nav-link:hover { color: #fff; background: rgba(255,255,255,0.08); border-radius: 0; }
.admin-topbar .nav-link.is-active { color: #fff; border-bottom-color: rgba(255,255,255,0.9); }

.admin-topbar .dropdown-menu {
  left: 0; min-width: 200px; padding: 6px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: 0 4px 16px rgba(0,0,0,0.12); transform: none;
}
.admin-topbar .dropdown-menu::before { display: none; }
.admin-topbar .dropdown-menu a { padding: 10px 12px; border-radius: 6px; color: var(--text); font-size: 0.9rem; font-weight: 500; text-transform: none; }
.admin-topbar .dropdown-menu a:hover { background: var(--primary-muted); color: var(--primary); }

.admin-topbar-actions {
  justify-content: flex-end; flex-wrap: wrap; gap: 6px;
}
.admin-topbar-actions .ghost-btn {
  border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9); padding: 0.32rem 0.75rem; font-size: 0.8rem;
  border-radius: 5px;
}
.admin-topbar-actions .ghost-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* ===== Admin Layout ===== */
.admin-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.admin-page-manager-card { margin-top: 0; margin-bottom: 20px; }
.admin-sidebar { position: static; display: grid; gap: 16px; padding: 20px; }
.admin-sidebar-head h2 { margin: 6px 0 0; font-size: 1.2rem; }
.admin-sidebar-nav { display: grid; gap: 4px; }
.admin-sidebar-nav a { display: flex; align-items: center; min-height: 40px; padding: 8px 12px; border-radius: var(--radius); color: var(--text); font-weight: 500; font-size: 0.9rem; }
.admin-sidebar-nav a:hover { background: var(--primary-muted); color: var(--primary); }
.admin-sidebar-nav a.is-active { background: var(--primary-muted); color: var(--primary); font-weight: 600; }
.custom-page-row.is-target { border-color: rgba(21,101,192,0.25); box-shadow: 0 2px 12px rgba(21,101,192,0.08); }

/* ===== Editor Sections ===== */
.speaker-editor-block { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); }
.speaker-editor-list { gap: 10px; }
.speaker-admin-row { gap: 10px; padding: 14px; }
.speaker-admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.speaker-admin-content { display: grid; gap: 12px; }
.custom-program-row { gap: 12px; }
.custom-program-row-head, .custom-program-table-row { display: grid; gap: 12px; }
.custom-program-row-head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.custom-program-table-row { grid-template-columns: minmax(160px, 200px) minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.custom-program-row .custom-program-row-actions { position: static; align-self: end; }
.custom-program-date-field, .custom-program-agenda-field { margin: 0; }
.custom-program-date-field input { min-height: 44px; }
.custom-program-agenda-field textarea { min-height: 110px; }
.custom-program-row .custom-program-delete-btn { width: auto; height: auto; padding: 0.6rem 0.9rem; border-radius: var(--radius); font-size: 0.88rem; color: #dc3545; }
.custom-program-row .custom-program-delete-btn::before { content: none; }

/* ===== Home Layout Drag ===== */
.home-layout-list { display: grid; gap: 8px; margin-top: 8px; }
.home-layout-item { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
.home-layout-item.is-dragging { opacity: 0.55; }
.home-layout-item.drag-before { border-top-color: var(--primary); box-shadow: inset 0 3px 0 rgba(21,101,192,0.25); }
.home-layout-item.drag-after { border-bottom-color: var(--primary); box-shadow: inset 0 -3px 0 rgba(21,101,192,0.25); }
.home-layout-copy { display: grid; gap: 2px; }
.home-layout-meta { color: var(--muted); font-size: 0.88rem; }

/* ===== Pillar Admin ===== */
.pillar-admin-row { gap: 10px; }
.pillar-admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; align-items: start; }
.pillar-admin-content { display: grid; gap: 12px; }
.pillar-admin-preview-card { position: relative; display: grid; place-items: center; min-height: 200px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); }
.pillar-admin-preview-card.is-empty { opacity: 0.6; }
.pillar-image-clear { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; z-index: 2; }
.pillar-image-clear.is-hidden { display: none; }
.pillar-image-clear span { font-size: 1.2rem; line-height: 1; }
.pillar-admin-preview-image { width: 100%; max-height: 160px; object-fit: contain; border-radius: var(--radius); }
.pillar-admin-row .pillar-row-actions { position: static; margin-top: 4px; }
.pillar-admin-row .pillar-row-actions .pillar-delete-btn { width: auto; height: auto; padding: 0.6rem 0.9rem; border-radius: var(--radius); font-size: 0.88rem; color: #dc3545; }
.pillar-admin-row .pillar-row-actions .pillar-delete-btn::before { content: none; }

.speaker-media-field { gap: 8px; }
.media-preview-speaker img { width: 80px; height: 90px; object-fit: cover; border-radius: var(--radius); }
.editor-section[id] { scroll-margin-top: 20px; }

/* ===== Dashboard Card ===== */
.dashboard-panel,
.dashboard-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.dashboard-card { margin-top: 0; }

/* Dashboard shell padding */
.dashboard-body:not(.admin-page) .dashboard-shell { padding: 20px; }
/* Admin shell: no outer padding so topbar fills full width */
.admin-page .dashboard-shell { padding: 0; }
/* Admin content sections: add margin inside shell */
.admin-page .dashboard-shell > .dashboard-card,
.admin-page .dashboard-shell > section.dashboard-card,
.admin-page .dashboard-shell > .admin-page-manager-card,
.admin-page .dashboard-shell > .admin-layout { margin: 0 20px 20px; }

/* ===== Registration Portal ===== */
.registration-portal-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) 300px; gap: 20px; align-items: start; }
.registration-portal-layout-single { grid-template-columns: 1fr; }
.registration-form { padding: 20px; }
.registration-gate { display: grid; gap: 14px; max-width: 460px; }
.registration-qr-panel { padding: 20px; }
.member-submissions-panel { margin-top: 20px; }
.registration-guide-grid { margin-top: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.registration-guide-stack { margin-top: 20px; }
.registration-guide-card h2 { margin: 0; font-size: 1.3rem; }
.registration-guide-list { margin: 0; padding-left: 1.2rem; display: grid; gap: 8px; }
.registration-guide-list li { color: var(--text); }
.registration-guide-table { min-width: 680px; }
.member-submission-table { min-width: 820px; }
.member-submission-table td:last-child { max-width: 260px; white-space: pre-wrap; }

.registration-qr-card { display: grid; place-items: center; padding: 16px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); }
.registration-qr-image { width: min(100%, 200px); height: auto; display: block; }
.dashboard-qr-card { max-width: 240px; }

.registration-lookup-card h1,
.registration-portal-card h1 { margin: 8px 0 0; font-size: clamp(1.8rem, 3vw, 2.8rem); font-family: 'Inter', sans-serif; }

/* ===== Admin Card / Empty ===== */
.admin-card { overflow: visible; }
.admin-empty-state { min-height: 200px; align-content: start; }

/* ===== Editor Section ===== */
.editor-section {
  display: grid; gap: 14px; padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

/* ===== Page Manager ===== */
.page-manager-grid, .page-manager-toolbar { display: grid; gap: 16px; }
.page-manager-block { display: grid; gap: 8px; }
.page-manager-block-current { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.page-manager-label-row { display: grid; gap: 4px; }
.page-manager-label { color: var(--primary-dark); font-weight: 600; }
.page-manager-helper { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.page-manager-controls, .page-create-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.page-create-form { grid-template-columns: minmax(0, 1fr) auto; }
.page-manager-controls-combined { grid-template-columns: minmax(260px, 1fr) auto auto auto; }
.page-select-form { min-width: 0; }
.custom-page-select-form { display: grid; gap: 8px; width: min(100%, 320px); justify-items: stretch; }
.custom-page-select-field { margin: 0; display: grid; gap: 6px; }
.custom-page-select-label { color: var(--primary-dark); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.custom-page-select-helper { margin: 0; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--muted); font-size: 0.9rem; line-height: 1.4; word-break: break-word; }

.page-select-form select,
.page-create-form input,
.page-manager-controls-combined > input {
  width: 100%; min-height: 44px; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; color: var(--text); background: var(--surface); font: inherit;
  box-shadow: var(--shadow-sm);
}

.page-select-form select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding-right: 36px; border-radius: var(--radius); box-shadow: var(--shadow-sm);
  background-image: linear-gradient(45deg, transparent 50%, rgba(47,55,71,0.6) 50%), linear-gradient(135deg, rgba(47,55,71,0.6) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}

.page-create-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin-top: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.page-create-panel[hidden] { display: none; }
.page-create-field { min-width: 0; }
.page-create-actions { align-items: end; }

/* ===== Icon Buttons ===== */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); color: var(--primary);
  box-shadow: var(--shadow-sm); transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { background: var(--primary-muted); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.icon-btn-danger { color: #dc3545; }
.icon-btn-danger:hover { background: rgba(220,53,69,0.08); }

/* ===== Accessibility ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ===== Menu Editor / Nav Tree ===== */
.menu-editor { display: grid; gap: 14px; }
.menu-editor-header { display: flex; justify-content: flex-end; }
.menu-editor-list { display: grid; gap: 14px; }
.nav-tree-root, .nav-tree-list { display: grid; gap: 10px; }
.nav-tree-root { min-height: 100px; padding: 12px; border: 1px dashed var(--border); border-radius: var(--radius-xl); background: rgba(255,255,255,0.6); }
.nav-tree-root.is-empty::before { content: "No menus yet. Click Add Main Menu to start."; color: var(--muted); padding: 6px 4px; }
.nav-tree-item { position: relative; }
.nav-tree-item-card { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.nav-tree-item-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.nav-tree-fields { align-items: start; }
.nav-tree-actions { display: inline-flex; gap: 6px; }
.drag-handle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--primary); background: var(--bg); cursor: grab; }
.drag-handle:active { cursor: grabbing; }
.drag-handle svg { width: 16px; height: 16px; }
.nav-tree-children-wrap { display: grid; gap: 0; padding-left: 50px; }
.nav-tree-children { min-height: 6px; padding: 0; border: none; border-radius: var(--radius); background: transparent; }
.nav-tree-children:not(:empty) { display: grid; gap: 10px; margin-top: 8px; padding: 8px; border: 1px dashed var(--border-light); background: var(--bg); }
.nav-tree-item.is-dragging { opacity: 0.45; }
.nav-tree-item.drag-before::before, .nav-tree-item.drag-after::after { content: ""; position: absolute; left: 8px; right: 8px; height: 3px; border-radius: 999px; background: rgba(21,101,192,0.5); }
.nav-tree-item.drag-before::before { top: -5px; }
.nav-tree-item.drag-after::after { bottom: -5px; }
.nav-tree-children.drag-nest, .nav-tree-root.drag-nest { min-height: 52px; margin-top: 8px; padding: 8px; border-color: rgba(21,101,192,0.4); background: rgba(232,240,254,0.9); }
.menu-row { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.key-value-editor { display: grid; gap: 14px; }
.key-value-row { position: relative; display: grid; gap: 14px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.key-value-row .actions { position: absolute; top: 14px; right: 14px; }
.key-value-row .actions .ghost-btn { width: 36px; height: 36px; padding: 0; border-radius: var(--radius); font-size: 0; color: #dc3545; }
.key-value-row .actions .ghost-btn::before { content: "×"; font-size: 1.3rem; line-height: 1; }
.key-value-row .actions .ghost-btn:hover { background: rgba(220,53,69,0.08); }
.menu-children-input { min-height: 110px; }
.editor-heading h2 { margin: 6px 0 0; }
.form-grid { display: grid; gap: 14px; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ===== Login ===== */
.login-card { display: grid; gap: 20px; max-width: 680px; margin: 0 auto; }
.login-shell { padding-top: 24px; }
.login-shell .dashboard-card { margin-top: 0; }
.login-card { padding: 28px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.login-card-single { position: relative; overflow: hidden; }
.login-card-single::before, .login-card-single::after { display: none; }
.login-card-head h2 { margin: 8px 0 0; font-size: clamp(1.5rem, 2.5vw, 2.2rem); font-family: 'Inter', sans-serif; }
.login-card-head h1 { margin: 8px 0 0; max-width: none; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1; font-family: 'Inter', sans-serif; }
.login-primary-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.login-back-link { display: inline-flex; align-items: center; width: fit-content; color: var(--primary); font-weight: 600; }
.login-back-link:hover { text-decoration: underline; }
.login-google-btn { min-width: 200px; gap: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.google-mark { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); flex-shrink: 0; }
.google-mark svg { width: 15px; height: 15px; }
.login-google-btn:hover { background: var(--bg); }
.login-admin-form { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); }

/* ===== Profile ===== */
.profile-row { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }

code { background: var(--primary-muted); padding: 0.1rem 0.3rem; border-radius: 4px; }

/* ===== Admin Form / Autosave ===== */
.admin-form { display: grid; gap: 16px; }

.autosave-status {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  justify-self: end; position: sticky; top: 14px; z-index: 30;
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); font-weight: 600;
  box-shadow: var(--shadow); backdrop-filter: none;
}

.admin-inline-status { display: inline-flex; align-items: center; width: fit-content; margin-bottom: 12px; padding: 8px 12px; border-radius: 6px; background: rgba(21,101,192,0.1); color: var(--primary-dark); font-weight: 600; }
.admin-inline-status-error { background: rgba(220,53,69,0.1); color: #c82333; }

.autosave-indicator { width: 10px; height: 10px; border-radius: 50%; background: rgba(34,197,94,0.85); box-shadow: 0 0 0 5px rgba(34,197,94,0.12); flex-shrink: 0; }
.autosave-status[data-state="saving"] .autosave-indicator { background: rgba(21,101,192,0.9); box-shadow: 0 0 0 5px rgba(21,101,192,0.14); animation: autosavePulse 1s ease-in-out infinite; }
.autosave-status[data-state="error"] .autosave-indicator { background: rgba(220,53,69,0.88); box-shadow: 0 0 0 5px rgba(220,53,69,0.12); animation: none; }

@keyframes autosavePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.8); opacity: 0.65; }
}

/* ===== Forms ===== */
.field-block { display: grid; gap: 8px; font-weight: 600; }
.field-block span { color: var(--text); font-size: 0.9rem; }
.field-block small { color: var(--muted); font-weight: 400; }
.field-block input, .field-block textarea, .field-block select, .button-reset { font: inherit; }
.field-block input, .field-block textarea, .field-block select {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 9px 12px; color: var(--text); background: var(--surface);
  font-size: 0.9rem; transition: border-color 0.15s, box-shadow 0.15s;
}
.field-block input:focus, .field-block textarea:focus, .field-block select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,101,192,0.1);
}

.media-field { align-content: start; }
.file-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: fit-content; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--primary); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 0.88rem; }
.file-trigger input[type="file"] { display: none; }
.media-preview { display: grid; place-items: center; min-height: 120px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); }
.media-preview.is-hidden { display: none; }
.media-preview img { max-width: 100%; max-height: 120px; display: block; object-fit: contain; border-radius: var(--radius); }
.media-preview-banner img { width: 100%; max-height: 160px; object-fit: cover; }
.inline-form { align-content: start; }

.login-divider { position: relative; text-align: center; color: var(--muted); }
.login-divider::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; border-top: 1px solid var(--border); }
.login-divider span { position: relative; padding: 0 12px; background: var(--surface); }

.field-block textarea { min-height: 110px; overflow: hidden; scrollbar-width: none; resize: none; font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; font-size: 0.9rem; line-height: 1.6; }
.field-block textarea::-webkit-scrollbar { width: 0; height: 0; }
.field-block textarea.menu-children-input { min-height: 110px; }
.key-value-row textarea { min-height: 110px; font-family: inherit; line-height: 1.5; }

/* ===== Status Banners ===== */
.status-banner { margin-bottom: 16px; padding: 12px 14px; border-radius: var(--radius); font-weight: 500; font-size: 0.9rem; }
.success-banner { background: rgba(40,167,69,0.1); color: #155724; border: 1px solid rgba(40,167,69,0.2); }
.error-banner { background: rgba(220,53,69,0.1); color: #721c24; border: 1px solid rgba(220,53,69,0.2); }
.admin-help { color: var(--muted); line-height: 1.7; font-size: 0.9rem; }

/* ===== Submission Summary ===== */
.submission-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.submission-summary-card strong { font-size: 1.6rem; line-height: 1; letter-spacing: -0.03em; color: var(--primary); }
.submission-summary-card span { color: var(--muted); line-height: 1.4; font-size: 0.88rem; }
.submission-review-list { display: grid; gap: 16px; margin-top: 20px; }

/* ===== Submission Table ===== */
.submission-table-wrap { margin-top: 20px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.submission-table { width: 100%; min-width: 940px; border-collapse: collapse; }
.submission-table th, .submission-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-light); text-align: left; vertical-align: middle; }
.submission-table th { color: var(--primary-dark); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; background: var(--bg); }
.submission-table tbody tr:hover { background: var(--bg); }
.submission-code-cell { display: inline-flex; align-items: center; gap: 8px; }

.submission-status-dot { width: 8px; height: 8px; border-radius: 999px; flex: 0 0 auto; }
.submission-status-dot.status-pending { background: #e6a817; }
.submission-status-dot.status-accepted_poster { background: var(--primary); }
.submission-status-dot.status-accepted_oral { background: #1a73e8; }
.submission-status-dot.status-rejected { background: #dc3545; }

.submission-row.status-pending { background: rgba(230,168,23,0.04); }
.submission-row.status-accepted_poster { background: rgba(21,101,192,0.04); }
.submission-row.status-accepted_oral { background: rgba(26,115,232,0.04); }
.submission-row.status-rejected { background: rgba(220,53,69,0.04); }
.submission-row.status-pending:hover { background: rgba(230,168,23,0.08); }
.submission-row.status-accepted_poster:hover { background: rgba(21,101,192,0.08); }
.submission-row.status-accepted_oral:hover { background: rgba(26,115,232,0.08); }
.submission-row.status-rejected:hover { background: rgba(220,53,69,0.08); }

.submission-table tbody tr:last-child td { border-bottom: none; }
.submission-table-action-cell { width: 1%; white-space: nowrap; }
.submission-open-btn { min-width: 76px; justify-content: center; }

/* ===== Submission Toolbar ===== */
.submission-toolbar { margin-top: 20px; }
.submission-toolbar-copy { display: grid; gap: 4px; }
.submission-filter-form { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(200px, 0.9fr) auto; gap: 12px; align-items: end; }
.submission-toolbar-actions { justify-content: flex-start; flex-wrap: wrap; }
.submission-review-card { gap: 16px; }
.submission-detail-card { margin-top: 20px; }
.submission-review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.submission-review-head h2 { margin: 4px 0 0; }

/* ===== Status Chips ===== */
.submission-status-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 130px; padding: 6px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.submission-status-chip.status-pending { background: rgba(230,168,23,0.14); color: #856404; }
.submission-status-chip.status-accepted_poster { background: rgba(21,101,192,0.12); color: var(--primary-dark); }
.submission-status-chip.status-accepted_oral { background: rgba(26,115,232,0.12); color: #1a73e8; }
.submission-status-chip.status-rejected { background: rgba(220,53,69,0.12); color: #c82333; }

/* ===== Submission Meta ===== */
.submission-meta-grid, .submission-body-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.submission-meta-item, .submission-body-card { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.submission-meta-item span { color: var(--muted); font-size: 0.86rem; }
.submission-meta-item strong, .submission-body-card p { margin: 0; }
.submission-body-card p, .submission-body-card span { white-space: pre-wrap; }
.submission-abstract-card { gap: 8px; }
.submission-abstract-body { white-space: pre-wrap; line-height: 1.8; color: var(--text); }

/* ===== Abstract Editor ===== */
.abstract-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.abstract-toolbar-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; min-width: 40px; min-height: 40px; padding: 0; border-radius: var(--radius); font-weight: 700; }
.abstract-toolbar-help { margin: 0 0 8px; }
.abstract-editor { min-height: 240px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); line-height: 1.7; outline: none; box-shadow: inset 0 0 0 1px transparent; }
.abstract-editor:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,101,192,0.1); }
.abstract-editor:empty::before { content: attr(data-placeholder); color: #adb5bd; }

/* ===== Misc ===== */
.submission-decision-grid { align-items: start; }
.submission-review-actions { justify-content: flex-start; }
.button-reset { appearance: none; cursor: pointer; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .autosave-status { justify-self: start; top: 10px; }
  .mobile-menu-toggle { display: inline-flex; margin-bottom: 8px; }
  .rose-menu-btn { display: inline-flex; }
  body.home-page.rose-page .topbar,
  body.home-page.rose-page .topbar-has-banner { min-height: 50px; padding: 6px 16px; display: flex; justify-content: flex-end; align-items: center; }
  .home-page .page-shell, .rose-page .page-shell { padding: 0; }
  .home-page .page-shell { padding-bottom: 140px; }
  .organizer-card { gap: 14px; }
  .organizer-image-wrap { flex-basis: 100%; }
  .brand-burst { width: clamp(40px, 7vw, 60px); height: clamp(40px, 7vw, 60px); }
  .home-page .organizer-card, .rose-page .organizer-card { align-items: center; justify-content: space-between; gap: 10px; padding: 0 4px; }
  .home-page .organizer-image, .rose-page .organizer-image { max-height: clamp(48px, 7vw, 64px); }
  .home-page .organizer-brand, .rose-page .organizer-brand { cursor: pointer; }
  .home-page .menu-card, .rose-page .menu-card { margin-top: 4px; padding: 6px 4px 2px; overflow: hidden; }
  .home-page .menu-card.menu-card-standalone { padding: 8px; }
  .home-page .menu-card.is-collapsed, .rose-page .menu-card.is-collapsed { margin-top: 0; padding: 0 4px; border-top-color: transparent; }
  .home-page .menu-card.is-collapsed .menu-card-inner, .rose-page .menu-card.is-collapsed .menu-card-inner { display: none; }
  .menu-card-inner, .rose-page .menu-card-inner { grid-template-columns: minmax(0, 1fr); gap: 12px; min-height: 0; }
  .home-page .topbar-nav-row, .rose-page .topbar-nav-row, .home-page .menu-card .nav, .rose-page .menu-card .nav {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
  }
  .home-page .nav-link, .rose-page .nav-link {
    width: 100%;
    min-height: 44px;
    justify-content: space-between;
    font-size: 0.95rem;
    padding: 0.8rem 0.95rem;
  }
  .home-page .nav-dropdown, .rose-page .nav-dropdown { display: grid; width: 100%; padding-bottom: 0; margin-bottom: 0; }
  .home-page .dropdown-menu, .rose-page .dropdown-menu {
    position: static;
    left: auto;
    min-width: 0;
    width: 100%;
    margin-top: 6px;
    padding: 4px;
    transform: none;
    box-shadow: none;
  }
  .home-page .dropdown-menu::before, .rose-page .dropdown-menu::before { display: none; }
  .home-page .topbar-actions, .rose-page .topbar-actions, .home-page .menu-actions, .rose-page .menu-actions {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
  }
  .home-page .topbar-actions a, .rose-page .topbar-actions a, .home-page .topbar-actions span, .rose-page .topbar-actions span { width: 100%; }
  .home-page .topbar-actions a[href="/auth/logout"], .rose-page .topbar-actions a[href="/auth/logout"] {
    background: linear-gradient(135deg, rgba(254, 226, 226, 0.98), rgba(255, 255, 255, 0.98));
    color: #b91c1c;
  }
  .topbar-main, .nav, .topbar-actions, .hero, .split-section, .footer, .contact-list li, .profile-row { flex-direction: column; align-items: flex-start; }
  .hero, .split-section, .footer { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr; }
  .nav-tree-item-head { grid-template-columns: 1fr; }
  .nav-tree-children-wrap { padding-left: 0; }
  .page-manager-controls, .page-create-form { grid-template-columns: 1fr; }
  .page-manager-controls-combined { grid-template-columns: 1fr; }
  .page-create-panel { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  .admin-topbar { grid-template-columns: 1fr; justify-items: stretch; gap: 0; }
  .admin-topbar-main { flex-direction: column; align-items: flex-start; padding: 10px 16px; }
  .admin-nav { justify-content: flex-start; flex-direction: row; flex-wrap: wrap; gap: 0; padding: 0 8px 4px; }
  .admin-topbar .nav-dropdown { display: inline-flex; align-items: center; }
  .admin-topbar .nav-link, .admin-topbar .nav-dropdown { width: auto; }
  .admin-topbar-actions { justify-content: flex-start; }
  .submission-summary-grid, .submission-meta-grid, .submission-body-grid { grid-template-columns: 1fr; }
  .submission-filter-form { grid-template-columns: 1fr; }
  .submission-review-head { flex-direction: column; align-items: flex-start; }
  .custom-program-table-row { grid-template-columns: 1fr; }
  .custom-program-row .custom-program-row-actions { align-self: start; }
  .speaker-admin-grid { grid-template-columns: 1fr; }
  .registration-portal-layout { grid-template-columns: 1fr; }
  .topbar { position: static; }
  .hero h1 { max-width: none; }
  .home-page .page-shell { padding: 0; }
  .login-card { padding: 20px 18px; }
  .hero-showcase { padding: 20px 14px; }
  .home-page-intro { margin: 10px 12px 0; padding: 16px 14px 14px; }
  .home-page-intro h1 { max-width: 16ch; font-size: clamp(1.55rem, 8vw, 2.3rem); }
  .home-page-intro-summary { font-size: 0.92rem; line-height: 1.55; }
  .home-page-intro-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero, .hero-showcase, .rose-page .hero-showcase { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .home-page .hero-copy, .rose-page .hero-copy { max-width: none; }
  .rose-page .hero h1, .home-page .hero h1 { max-width: 10ch; font-size: clamp(1.9rem, 9vw, 3rem); line-height: 0.96; letter-spacing: -0.04em; overflow-wrap: anywhere; }
  .date-line { margin-top: 10px; font-size: 0.94rem; }
  .subtitle { margin: 0.75rem 0 0; font-size: 0.95rem; line-height: 1.6; }
  .hero-visual-panel { gap: 14px; }
  .hero-showcase::before, .hero-showcase::after { display: none; }
  .hero-visual { min-height: 0; aspect-ratio: 1 / 1.4; padding: 0; }
  .hero-image-card { inset: 0; padding: 10px; border-radius: var(--radius-lg); }
  .hero-stat-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 0; padding-right: 0; }
  .hero-stat-list li { padding: 0; border-radius: 0; }
  .hero-stat-list strong { font-size: 1.2rem; }
  .hero-stat-list span { margin-top: 4px; max-width: none; font-size: 0.88rem; line-height: 1.3; }
  .speaker-card { grid-template-columns: 1fr; }
  .speaker-card-image, .speaker-card-image-placeholder { width: 100%; max-width: 160px; justify-self: end; }
  .venue-map-frame { aspect-ratio: 4 / 3; }
  .venue-map-frame iframe { min-height: 280px; }
  .btn, .ghost-btn, .icon-btn, .drag-handle, .mobile-menu-toggle { min-height: 44px; }
  .field-block input, .field-block textarea, .field-block select { min-height: 44px; font-size: 16px; }
}

@media (max-width: 640px) {
  .page-shell, .home-page .page-shell, .rose-page .page-shell { padding: 0; }
  .home-page .page-shell { padding-bottom: 136px; }
  .section, .dashboard-panel, .dashboard-card, .registration-form, .registration-qr-panel, .editor-section, .login-card, .hero { padding: 14px 12px; }
  .hero-showcase { padding: 18px 12px; }
  .home-page-intro { margin: 10px 12px 0; padding: 14px 12px 12px; }
  .home-page-intro h1 { max-width: none; font-size: clamp(1.45rem, 7.6vw, 2.1rem); }
  .home-page-intro-actions { grid-template-columns: 1fr; }
  .hero-stat-list, .section-hero-panel .hero-stat-list { grid-template-columns: 1fr; gap: 8px; }
  .speaker-card-image, .speaker-card-image-placeholder { justify-self: start; }
  .home-page .footer {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
  .contact-list li, .actions, .login-primary-actions { width: 100%; }
  .actions > *, .login-primary-actions > * { width: 100%; }
  .submission-status-chip, .login-google-btn { min-width: 0; width: 100%; }
  .dashboard-body:not(.admin-page) .dashboard-shell { padding: 12px; }
  .dashboard-card h1, .dashboard-card h2 { overflow-wrap: anywhere; }
  .admin-topbar-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .admin-topbar-actions a { width: 100%; }
}

/* ===== Plant Variety Table ===== */
.pv-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.pv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.pv-table th,
.pv-table td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light);
}

.pv-table thead th {
  background: var(--bg);
  color: var(--primary-dark);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pv-table tbody tr:last-child td { border-bottom: 1px solid var(--border); }
.pv-table tbody tr:hover td { background: var(--bg); }

.pv-col-stt {
  width: 48px;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.pv-col-action {
  width: 160px;
  text-align: left;
}

.pv-empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 28px 16px !important;
  font-size: 0.88rem;
}

/* Add row (tfoot) */
.pv-add-row td {
  background: #f8f9ff;
  border-top: 2px solid var(--primary-muted);
  border-bottom: none !important;
}

.pv-add-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
}

.pv-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  font: inherit;
  font-size: 0.86rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pv-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(25,113,194,0.1);
}

.pv-input::placeholder { color: #adb5bd; }

.pv-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.pv-add-btn:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 2px 6px rgba(25,113,194,0.25);
}

/* Action cell: history label + delete button */
.pv-col-action { display: table-cell; } /* override for non-tfoot cells */
td.pv-col-action {
  display: table-cell;
}
.pv-col-action > * { vertical-align: middle; }

.pv-history-cell {
  display: inline-block;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.74rem;
  color: var(--muted);
  vertical-align: middle;
  cursor: default;
}

/* Action cell inner layout */
.pv-data-row td.pv-col-action {
  white-space: nowrap;
}

/* Delete button inside table rows */
.pv-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(220,53,69,0.25);
  border-radius: 6px;
  background: transparent;
  color: #dc3545;
  cursor: pointer;
  transition: background 0.15s;
}

.pv-delete-btn:hover { background: rgba(220,53,69,0.08); }

@media (max-width: 640px) {
  .pv-table { min-width: 560px; }
}
