/* ================================
   Beadlight Base Styles
   ================================ */

:root {
  --ink: #172035;
  --muted: rgba(23, 32, 53, 0.68);
  --gold: #bd8a34;
  --gold-dark: #9c6d21;
  --cream: #fff8ee;
  --soft-cream: #f6eadb;
  --panel: rgba(255, 252, 247, 0.78);
  --line: rgba(156, 109, 33, 0.2);
  --shadow: 0 18px 54px rgba(80, 55, 24, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: #fff8ee;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, #fffaf3 0%, #fff7ec 46%, #f6eadb 100%);
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background:
    linear-gradient(90deg, rgba(156, 109, 33, 0.08), transparent 32%, rgba(23, 32, 53, 0.05)),
    radial-gradient(rgba(112, 78, 29, 0.16) 1px, transparent 1px);
  background-size: auto, 22px 22px;
}

h1,
h2,
h3,
.brand span,
.mini-roadmap strong {
  font-family: Georgia, "Times New Roman", serif;
}

a {
  color: inherit;
}

.page-glow {
  position: fixed;
  inset: auto -20% -30% auto;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(189, 138, 52, 0.15);
  filter: blur(80px);
  pointer-events: none;
}

/* ================================
   Header
   ================================ */

.site-header {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 72px;
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 2;
  border-bottom: 1px solid rgba(23, 32, 53, 0.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 900;
}

.brand img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: 0 10px 26px rgba(91, 63, 30, 0.12);
}

.brand span {
  display: grid;
  gap: 2px;
  line-height: 1;
}

.brand strong {
  font-size: 1.5rem;
  font-weight: 500;
}

.brand small {
  color: var(--gold-dark);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 28px);
}

.site-header nav a {
  color: rgba(23, 32, 53, 0.82);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  color: var(--gold-dark);
}

.nav-pill {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #c69a51, #a9782e);
  border: 1px solid rgba(139, 91, 24, 0.18);
  box-shadow: 0 12px 26px rgba(121, 82, 30, 0.16);
  color: #fffaf2 !important;
}

/* ================================
   Buttons
   ================================ */

.primary-button,
.secondary-button {
  min-height: 54px;
  padding: 0 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  text-decoration: none;
  font-weight: 950;
  font-size: 0.95rem;
  cursor: pointer;
}

.primary-button {
  background: linear-gradient(180deg, #c69a51 0%, #a9782e 100%);
  color: #fffaf2;
  box-shadow: 0 18px 38px rgba(142, 96, 32, 0.23);
}

.secondary-button {
  background: rgba(255, 250, 242, 0.62);
  color: var(--ink);
  border: 1px solid var(--line);
}

/* ================================
   Homepage
   ================================ */

.home-hero-clean {
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.home-hero-inner {
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold-dark);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-hero-clean h1 {
  margin: 0 0 26px;
  color: var(--ink);
  font-size: clamp(3.8rem, 7vw, 6.6rem);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 600;
  text-wrap: balance;
}

.home-hero-clean h1::first-line {
  color: var(--ink);
}

.lead,
.home-hero-clean .lead {
  max-width: 610px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(12px, 2vw, 24px);
  margin-top: 38px;
}

.hero-points span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 800;
}

.hero-points span::before {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: var(--gold-dark);
  font-size: 1.1rem;
}

.hero-points span:nth-child(1)::before { content: "□"; }
.hero-points span:nth-child(2)::before { content: "⌘"; }
.hero-points span:nth-child(3)::before { content: "☼"; }
.hero-points span:nth-child(4)::before { content: "♡"; }

/* ================================
   Cards / Sections
   ================================ */

.feature-strip,
.content-section,
.download-section,
.site-footer {
  width: min(1180px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 24px;
  margin-top: -126px;
  margin-bottom: 78px;
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.feature-strip article,
.content-section,
.download-section {
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.feature-strip article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px 20px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.feature-strip article + article {
  border-left: 1px solid rgba(156, 109, 33, 0.14);
}

.feature-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(189, 138, 52, 0.12);
  color: var(--gold-dark);
  font-size: 1.7rem;
  margin-bottom: 0;
  grid-row: 1 / span 2;
}

.feature-strip h2 {
  grid-column: 2;
  margin: 0 0 6px;
  font-size: 1.1rem;
  letter-spacing: 0;
  font-weight: 600;
}

.feature-strip p {
  grid-column: 2;
}

.feature-strip p,
.content-section p,
.download-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.content-section,
.download-section {
  padding: 42px;
  margin-bottom: 34px;
}

.split-section,
.roadmap-preview {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 42px;
}

.content-section h2,
.download-section h2 {
  margin: 0 0 16px;
  font-size: clamp(2.1rem, 4.6vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: 0;
  font-weight: 600;
}

.mini-roadmap {
  display: grid;
  gap: 14px;
}

.mini-roadmap div {
  padding: 18px;
  border-radius: 12px;
  background: rgba(255, 252, 244, 0.82);
  border: 1px solid var(--line);
}

.mini-roadmap span {
  display: block;
  margin-bottom: 6px;
  color: var(--gold-dark);
  font-size: 0.75rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.download-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 90px;
  background: linear-gradient(135deg, rgba(255, 244, 218, 0.86), rgba(255, 255, 255, 0.54));
}

/* ================================
   Generic Page Shells
   ================================ */

.section-shell,
.support-page,
.roadmap-page {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 70px 0 100px;
  position: relative;
  z-index: 1;
}

.roadmap-hero,
.support-hero {
  max-width: 760px;
  margin-bottom: 34px;
}

.roadmap-hero h1,
.support-hero h1 {
  margin: 0 0 22px;
  font-size: clamp(3.4rem, 8vw, 6.8rem);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 600;
}

/* ================================
   Footer
   ================================ */

.site-footer {
  padding: 34px 0 44px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: rgba(31, 36, 48, 0.56);
}

.site-footer div {
  display: flex;
  gap: 18px;
}

.site-footer a {
  color: rgba(31, 36, 48, 0.66);
  text-decoration: none;
  font-weight: 800;
}

/* ================================
   Forms / Support
   ================================ */

.support-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 24px;
  align-items: start;
}

.support-form-card,
.support-info-card,
.admin-panel,
.roadmap-filter-panel,
.roadmap-table-wrap {
  border-radius: 18px;
  padding: 30px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.form-head h2,
.support-info-card h2 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: 0;
  font-weight: 600;
}

.support-form-grid,
.admin-grid,
.roadmap-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.support-form-grid label,
.admin-grid label,
.roadmap-filters label {
  display: grid;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(31, 36, 48, 0.58);
}

.wide {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 244, 0.92);
  color: var(--ink);
  padding: 14px 15px;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 150px;
  line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(217, 154, 40, 0.72);
  box-shadow: 0 0 0 4px rgba(217, 154, 40, 0.14);
}

.support-actions,
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.support-status,
.admin-status,
.admin-note {
  margin-top: 18px;
  color: var(--muted);
  font-weight: 800;
}

.error-text {
  color: #b91c1c !important;
}

.hidden {
  display: none !important;
}

.admin-save-popup {
  position: fixed;
  left: 50%;
  top: 24px;
  z-index: 50;
  width: min(440px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(22, 163, 74, 0.2);
  background: rgba(247, 255, 250, 0.96);
  color: #14532d;
  box-shadow: 0 18px 52px rgba(34, 70, 45, 0.18);
  transform: translateX(-50%);
}

.admin-save-popup.is-error {
  border-color: rgba(185, 28, 28, 0.22);
  background: rgba(255, 248, 248, 0.97);
  color: #991b1b;
}

.admin-save-popup-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(22, 163, 74, 0.14);
  position: relative;
}

.admin-save-popup-icon::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 10px;
  width: 10px;
  height: 18px;
  border: solid currentColor;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.admin-save-popup.is-error .admin-save-popup-icon {
  background: rgba(185, 28, 28, 0.12);
}

.admin-save-popup.is-error .admin-save-popup-icon::before,
.admin-save-popup.is-error .admin-save-popup-icon::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 20px;
  width: 17px;
  height: 3px;
  border: 0;
  background: currentColor;
  transform: rotate(45deg);
}

.admin-save-popup.is-error .admin-save-popup-icon::after {
  transform: rotate(-45deg);
}

.admin-save-popup strong {
  display: block;
  margin-bottom: 3px;
  font-size: 1rem;
}

.admin-save-popup p {
  margin: 0;
  color: currentColor;
  line-height: 1.45;
}

.admin-save-popup button {
  min-height: 36px;
  border: 1px solid rgba(23, 32, 53, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 900;
}

/* ================================
   Roadmap Board
   ================================ */

.current-sprint-card {
  display: inline-grid;
  gap: 4px;
  margin-top: 28px;
  padding: 18px 22px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 45px rgba(61, 45, 18, 0.1);
}

.current-sprint-card span {
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-dark);
}

.current-sprint-card strong {
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1;
}

.roadmap-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0 24px;
}

.roadmap-summary-card {
  min-width: 0;
  border-radius: 12px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 40px rgba(61, 45, 18, 0.09);
}

.roadmap-summary-card span {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 6px;
}

.roadmap-summary-card strong {
  display: block;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.roadmap-status-board {
  display: grid;
  gap: 18px;
}

.roadmap-status-group {
  display: grid;
  grid-template-columns: minmax(190px, 0.24fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 22px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 40px rgba(61, 45, 18, 0.08);
}

.roadmap-status-head {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-content: start;
}

.roadmap-status-head h3 {
  margin: 2px 0 0;
  font-size: clamp(1.45rem, 2.5vw, 2.3rem);
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.roadmap-status-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.roadmap-status-head strong {
  width: fit-content;
  margin-top: 4px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.92);
  color: rgba(31, 36, 48, 0.62);
  font-size: 0.78rem;
  font-weight: 900;
}

.roadmap-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.roadmap-item-card {
  min-height: 210px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.9);
  border: 1px solid rgba(156, 109, 33, 0.16);
}

.roadmap-item-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.roadmap-item-card h4 {
  margin: 0;
  font-size: 1.16rem;
  line-height: 1.2;
}

.roadmap-item-card p {
  margin: 0;
  color: rgba(31, 36, 48, 0.74);
  line-height: 1.55;
}

.roadmap-card-meta {
  margin: 4px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(156, 109, 33, 0.14);
}

.roadmap-card-meta div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.roadmap-card-meta dt {
  color: rgba(31, 36, 48, 0.55);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roadmap-card-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 850;
  text-align: right;
}

.roadmap-pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.status-in-progress { background: rgba(59, 130, 246, 0.14); color: #1d4ed8; }
.status-planned { background: rgba(217, 154, 40, 0.18); color: #92400e; }
.status-under-consideration { background: rgba(107, 114, 128, 0.14); color: #4b5563; }
.status-released { background: rgba(22, 163, 74, 0.14); color: #15803d; }
.status-not-planned { background: rgba(180, 83, 9, 0.14); color: #92400e; }

.tag-pill,
.priority-pill {
  background: rgba(231, 166, 55, 0.15);
  color: #8a5b19;
}

.empty-state {
  border-radius: 12px;
  padding: 18px;
  color: rgba(31, 36, 48, 0.55);
  background: rgba(255, 255, 255, 0.36);
  border: 1px dashed var(--line);
  text-align: center;
}

/* ================================
   Mobile
   ================================ */

@media (max-width: 900px) {
  .feature-strip,
  .split-section,
  .roadmap-preview,
  .support-layout {
    grid-template-columns: 1fr;
  }

  .roadmap-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .roadmap-status-group {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    width: calc(100% - 32px);
    padding: 20px 0;
    align-items: center;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .site-header nav a:not(.nav-pill) {
    display: none;
  }

  .feature-strip,
  .content-section,
  .download-section,
  .site-footer,
  .section-shell,
  .support-page,
  .roadmap-page {
    width: calc(100% - 32px);
  }

  .home-hero-clean {
    padding: 44px 0 60px;
  }

  .home-hero-clean h1,
  .roadmap-hero h1,
  .support-hero h1 {
    font-size: clamp(3.2rem, 15vw, 4.8rem);
    line-height: 1;
  }

  .lead,
  .home-hero-clean .lead {
    font-size: 1.03rem;
    line-height: 1.65;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions .primary-button,
  .hero-actions .secondary-button,
  .download-section .primary-button {
    width: 100%;
  }

  .feature-strip {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px;
    margin-top: -74px;
    margin-bottom: 48px;
  }

  .feature-strip article {
    padding: 10px 0;
  }

  .feature-strip article + article {
    border-left: 0;
    border-top: 1px solid rgba(156, 109, 33, 0.14);
  }

  .content-section,
  .download-section,
  .support-form-card,
  .support-info-card,
  .admin-panel,
  .roadmap-filter-panel {
    padding: 24px;
    border-radius: 16px;
  }

  .download-section,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .support-form-grid,
  .admin-grid,
  .roadmap-filters {
    grid-template-columns: 1fr;
  }

  .wide {
    grid-column: auto;
  }

  .roadmap-summary-grid {
    grid-template-columns: 1fr;
  }

  .admin-save-popup {
    top: 14px;
  }

  .admin-save-popup button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* ================================
   Admin Workspace
   ================================ */

.admin-page {
  padding-top: 52px;
}

.admin-hero {
  max-width: 840px;
  margin-bottom: 34px;
}

.admin-hero h1 {
  margin: 0 0 22px;
  font-size: clamp(3.2rem, 7vw, 6.2rem);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 600;
}

.admin-login-panel {
  max-width: 760px;
}

.admin-header-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.admin-header-logout:hover {
  background: rgba(255, 255, 255, 0.9);
}

.admin-workspace-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.admin-workspace-tab {
  min-height: 90px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(177, 122, 35, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.46);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(61, 45, 18, 0.07);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.admin-workspace-tab:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.68);
}

.admin-workspace-tab.is-active {
  background: rgba(255, 252, 244, 0.96);
  border-color: rgba(217, 154, 40, 0.55);
  box-shadow: 0 18px 45px rgba(166, 101, 26, 0.15);
}

.admin-workspace-tab span:last-child {
  display: grid;
  gap: 3px;
}

.admin-workspace-tab strong {
  font-size: 1rem;
}

.admin-workspace-tab small {
  color: var(--muted);
  font-size: 0.8rem;
}

.admin-tab-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(231, 166, 55, 0.15);
  color: var(--gold-dark);
  font-size: 1.2rem;
  font-weight: 950;
}

.admin-workspace-section {
  display: none;
}

.admin-workspace-section.is-active {
  display: block;
}

.admin-section-card {
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.admin-section-card-analytics {
  background: linear-gradient(145deg, rgba(246, 248, 255, 0.78), rgba(255, 255, 255, 0.56));
}

.admin-section-card-roadmap {
  background: linear-gradient(145deg, rgba(255, 248, 230, 0.82), rgba(255, 255, 255, 0.56));
}

.admin-section-card-tickets {
  background: linear-gradient(145deg, rgba(240, 250, 246, 0.82), rgba(255, 255, 255, 0.58));
}

.admin-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.admin-section-heading h2 {
  margin: 0 0 8px;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: 0;
  font-weight: 600;
}

.admin-section-heading p:not(.admin-kicker) {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.admin-kicker {
  margin: 0 0 8px;
  color: var(--gold-dark);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-footer-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}

.items-editor {
  display: grid;
  gap: 18px;
}

.admin-roadmap-tools {
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid rgba(177, 122, 35, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
}

.admin-roadmap-tool-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

.admin-roadmap-tool-grid label {
  display: grid;
  gap: 7px;
}

.admin-roadmap-tool-grid label > span {
  color: rgba(31, 36, 48, 0.62);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-roadmap-tool-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.admin-roadmap-tool-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
}

.admin-roadmap-groups {
  display: grid;
  gap: 18px;
}

.admin-roadmap-group {
  padding: 18px;
  border: 1px solid rgba(177, 122, 35, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.admin-roadmap-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(156, 109, 33, 0.14);
}

.admin-roadmap-group-head h3 {
  margin: 10px 0 5px;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.08;
}

.admin-roadmap-group-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.admin-roadmap-group-head > strong {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.92);
  color: rgba(31, 36, 48, 0.62);
  font-size: 0.78rem;
  font-weight: 900;
}

.admin-roadmap-group-items {
  display: grid;
  gap: 12px;
}

.editor-card {
  padding: 22px;
  border: 1px solid rgba(177, 122, 35, 0.15);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.78);
}

.editor-card-head {
  margin-bottom: 18px;
}

.editor-card-head h3 {
  margin: 10px 0 0;
  font-size: 1.35rem;
}

.editor-card-head p {
  margin: 10px 0 0;
  color: rgba(31, 36, 48, 0.72);
  line-height: 1.55;
}

.editor-card-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.editor-card-compact .editor-card-head {
  margin-bottom: 14px;
}

.editor-card-compact-actions {
  margin-top: 0;
  justify-content: flex-end;
}

.editor-card-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.editor-card-meta div {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(177, 122, 35, 0.1);
}

.editor-card-meta dt {
  margin-bottom: 4px;
  color: rgba(31, 36, 48, 0.52);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.editor-card-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: rgba(31, 36, 48, 0.82);
  font-size: 0.86rem;
  font-weight: 850;
}

.roadmap-editor-open {
  overflow: hidden;
}

.roadmap-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  justify-items: end;
}

.roadmap-editor-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 36, 48, 0.42);
  backdrop-filter: blur(6px);
}

.roadmap-editor-panel {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 24px));
  height: calc(100% - 24px);
  margin: 12px;
  overflow: auto;
  padding: 24px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: rgba(255, 250, 239, 0.98);
  box-shadow: -20px 0 70px rgba(31, 36, 48, 0.22);
}

.roadmap-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(156, 109, 33, 0.14);
}

.roadmap-editor-header h2 {
  margin: 6px 0 0;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1.08;
}

.roadmap-edit-panel {
  border: 0;
  background: transparent;
  padding: 0;
}

.danger-button {
  color: #a61b1b;
  border-color: rgba(185, 28, 28, 0.22);
  background: rgba(255, 244, 244, 0.72);
}

/* Analytics */

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.analytics-card,
.analytics-table-card {
  border: 1px solid rgba(80, 68, 46, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.analytics-card {
  padding: 20px;
}

.analytics-card strong {
  display: block;
  margin-bottom: 7px;
  font-size: 2.15rem;
  line-height: 1;
  color: var(--ink);
}

.analytics-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.analytics-tables {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 14px;
}

.analytics-table-card {
  overflow: hidden;
}

.analytics-table-card h3 {
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(80, 68, 46, 0.12);
  font-size: 1.02rem;
}

.analytics-table-scroll {
  overflow-x: auto;
}

.analytics-table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
}

.analytics-table th,
.analytics-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(80, 68, 46, 0.1);
  text-align: left;
  white-space: nowrap;
}

.analytics-table th {
  color: #736a5c;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.analytics-empty {
  padding: 18px;
  color: var(--muted);
}

/* Tickets */

.ticket-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.ticket-summary-card {
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(43, 82, 64, 0.12);
  background: rgba(255, 255, 255, 0.62);
}

.ticket-summary-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 2rem;
  line-height: 1;
}

.ticket-summary-card span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.ticket-summary-open { border-left: 4px solid #c67b19; }
.ticket-summary-in-progress { border-left: 4px solid #2c6ecb; }
.ticket-summary-waiting { border-left: 4px solid #8055a6; }
.ticket-summary-resolved { border-left: 4px solid #2d8a58; }

.ticket-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px 200px;
  gap: 12px;
  margin-bottom: 18px;
}

.ticket-toolbar label {
  display: grid;
  gap: 7px;
}

.ticket-toolbar label > span {
  color: rgba(31, 36, 48, 0.62);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ticket-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  gap: 16px;
  align-items: start;
}

.ticket-list-card,
.ticket-detail-card {
  border: 1px solid rgba(43, 82, 64, 0.13);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  overflow: hidden;
}

.ticket-list-head {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(43, 82, 64, 0.1);
}

.ticket-list-head span {
  color: var(--muted);
  font-size: 0.84rem;
}

.ticket-table-scroll {
  overflow-x: auto;
}

.ticket-table {
  width: 100%;
  min-width: 830px;
  border-collapse: collapse;
}

.ticket-table th,
.ticket-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(43, 82, 64, 0.09);
  text-align: left;
  vertical-align: top;
}

.ticket-table th {
  color: rgba(31, 36, 48, 0.58);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ticket-row {
  cursor: pointer;
  transition: background 130ms ease;
}

.ticket-row:hover,
.ticket-row.is-selected {
  background: rgba(228, 244, 235, 0.65);
}

.ticket-customer-name,
.ticket-subject {
  display: block;
  margin-bottom: 3px;
  font-weight: 850;
}

.ticket-table small {
  display: block;
  max-width: 220px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-badge {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 900;
  white-space: nowrap;
}

.ticket-status-open { background: rgba(217, 154, 40, 0.17); color: #8b5412; }
.ticket-status-in_progress { background: rgba(59, 130, 246, 0.14); color: #1d4ed8; }
.ticket-status-waiting_for_customer { background: rgba(128, 85, 166, 0.14); color: #6b3e8d; }
.ticket-status-resolved { background: rgba(22, 163, 74, 0.14); color: #15803d; }
.ticket-status-closed { background: rgba(107, 114, 128, 0.14); color: #4b5563; }

.ticket-priority-urgent { background: rgba(220, 38, 38, 0.13); color: #b91c1c; }
.ticket-priority-high { background: rgba(234, 88, 12, 0.13); color: #c2410c; }
.ticket-priority-normal { background: rgba(59, 130, 246, 0.11); color: #1d4ed8; }
.ticket-priority-low { background: rgba(107, 114, 128, 0.12); color: #4b5563; }

.ticket-empty,
.ticket-loading-cell {
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.ticket-detail-card {
  position: sticky;
  top: 20px;
  padding: 22px;
}

.ticket-detail-placeholder {
  min-height: 330px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  color: var(--muted);
  text-align: center;
}

.ticket-detail-placeholder span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(45, 138, 88, 0.1);
  color: #2d8a58;
  font-size: 1.35rem;
}

.ticket-detail-placeholder h3,
.ticket-detail-placeholder p {
  margin: 0;
}

.ticket-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.ticket-detail-head h3 {
  margin: 7px 0 0;
  font-size: 1.55rem;
  line-height: 1.15;
}

.ticket-reference-label {
  color: #2d7b55;
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ticket-reply-button {
  min-height: 42px;
  padding: 0 16px;
  flex: 0 0 auto;
}

.ticket-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.ticket-detail-meta div {
  padding: 12px;
  border-radius: 15px;
  background: rgba(245, 251, 248, 0.88);
  border: 1px solid rgba(43, 82, 64, 0.1);
}

.ticket-detail-meta span,
.ticket-message-block > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.ticket-detail-meta strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.88rem;
}

.ticket-message-block {
  margin-bottom: 17px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 252, 244, 0.9);
  border: 1px solid rgba(177, 122, 35, 0.14);
}

.ticket-message-block p {
  margin: 0;
  color: rgba(31, 36, 48, 0.8);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.ticket-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ticket-edit-grid label {
  display: grid;
  gap: 7px;
  color: rgba(31, 36, 48, 0.62);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .admin-roadmap-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-roadmap-search-label {
    grid-column: 1 / -1;
  }

  .editor-card-compact {
    grid-template-columns: 1fr;
  }

  .editor-card-compact-actions {
    justify-content: flex-start;
  }

  .ticket-workspace {
    grid-template-columns: 1fr;
  }

  .ticket-detail-card {
    position: static;
  }
}

@media (max-width: 860px) {
  .analytics-grid,
  .ticket-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-tables {
    grid-template-columns: 1fr;
  }

  .ticket-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .ticket-search-label {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .admin-workspace-nav {
    grid-template-columns: 1fr;
  }

  .admin-workspace-tab {
    min-height: 74px;
  }

  .admin-section-heading,
  .admin-roadmap-tool-footer,
  .admin-roadmap-group-head,
  .ticket-detail-head {
    display: grid;
  }

  .admin-section-heading .primary-button,
  .admin-section-heading .secondary-button,
  .ticket-reply-button {
    width: 100%;
  }

  .admin-section-card {
    padding: 22px;
    border-radius: 28px;
  }

  .ticket-toolbar,
  .admin-roadmap-tool-grid,
  .editor-card-meta,
  .ticket-detail-meta,
  .ticket-edit-grid {
    grid-template-columns: 1fr;
  }

  .ticket-search-label,
  .admin-roadmap-search-label {
    grid-column: auto;
  }

  .roadmap-editor-modal {
    justify-items: stretch;
  }

  .roadmap-editor-panel {
    width: auto;
    height: calc(100% - 16px);
    margin: 8px;
    padding: 18px;
  }

  .roadmap-editor-header {
    display: grid;
  }

  .roadmap-editor-header .secondary-button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .analytics-grid,
  .ticket-summary-grid {
    grid-template-columns: 1fr;
  }
}


/* ================================
   Ticket Replies
   ================================ */

.ticket-conversation,
.ticket-reply-composer {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid rgba(80, 68, 46, 0.13);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.56);
}

.ticket-reply-composer {
  background: linear-gradient(145deg, rgba(255, 250, 237, 0.9), rgba(255, 255, 255, 0.62));
  border-color: rgba(217, 154, 40, 0.22);
}

.ticket-subsection-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.ticket-subsection-head h4 {
  margin: 3px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  color: var(--ink);
}

.ticket-subsection-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.ticket-subsection-kicker {
  color: var(--gold-dark);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ticket-reply-history {
  display: grid;
  gap: 12px;
}

.ticket-reply-entry {
  padding: 16px;
  border: 1px solid rgba(80, 68, 46, 0.12);
  border-left: 4px solid rgba(45, 138, 88, 0.72);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
}

.ticket-reply-failed {
  border-left-color: rgba(185, 28, 28, 0.72);
}

.ticket-reply-pending {
  border-left-color: rgba(217, 154, 40, 0.82);
}

.ticket-reply-entry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.ticket-reply-entry-head > div:first-child {
  display: grid;
  gap: 4px;
}

.ticket-reply-entry-head strong {
  color: var(--ink);
}

.ticket-reply-entry-head span,
.ticket-reply-entry-head time {
  color: var(--muted);
  font-size: 0.78rem;
}

.ticket-reply-entry-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
  text-align: right;
}

.ticket-reply-entry p {
  margin: 0;
  color: rgba(31, 36, 48, 0.78);
  line-height: 1.65;
}

.ticket-delivery-badge {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.68rem !important;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ticket-delivery-sent {
  background: rgba(22, 163, 74, 0.13);
  color: #15803d !important;
}

.ticket-delivery-failed {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c !important;
}

.ticket-delivery-pending {
  background: rgba(217, 154, 40, 0.16);
  color: #8b5412 !important;
}

.ticket-reply-empty,
.ticket-replies-loading {
  padding: 14px;
  border: 1px dashed rgba(177, 122, 35, 0.2);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

.ticket-reply-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ticket-reply-grid label {
  display: grid;
  gap: 7px;
  color: rgba(31, 36, 48, 0.62);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.ticket-send-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.ticket-send-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.ticket-send-row button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.ticket-edit-divider {
  height: 1px;
  margin: 24px 0;
  background: rgba(177, 122, 35, 0.16);
}

@media (max-width: 720px) {
  .ticket-reply-grid {
    grid-template-columns: 1fr;
  }

  .ticket-reply-entry-head,
  .ticket-send-row {
    display: grid;
  }

  .ticket-reply-entry-meta {
    justify-items: start;
    text-align: left;
  }

  .ticket-send-row .primary-button {
    width: 100%;
  }
}
