:root {
  --bg: #05030a;
  --panel: rgba(20, 12, 36, 0.92);
  --panel2: rgba(31, 18, 55, 0.96);
  --gold: #f7df8a;
  --goldDark: #b98c38;
  --purple: #6e43ff;
  --deepPurple: #150b29;
  --text: #fff7dc;
  --muted: #c8bde9;
  --border: rgba(247, 223, 138, 0.28);
  --danger: #ff6b8a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Papyrus, fantasy;
  background:
    radial-gradient(circle at top left, rgba(110, 67, 255, 0.34), transparent 34%),
    radial-gradient(circle at bottom right, rgba(247, 223, 138, 0.16), transparent 28%),
    linear-gradient(135deg, #05030a, #0d071a 55%, #030208);
}

.appShell {
  width: min(1180px, 92%);
  margin: 0 auto;
  padding: 34px 0 70px;
}

.hero {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 30px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(31,18,55,0.97), rgba(7,5,18,0.96));
  box-shadow: 0 24px 72px rgba(0,0,0,0.48);
}

.logo {
  width: 145px;
  height: 145px;
  object-fit: contain;
  filter: drop-shadow(0 0 26px rgba(247, 223, 138, 0.3));
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Papyrus, fantasy;
  color: var(--gold);
}

h1 {
  font-size: clamp(2.4rem, 5vw, 5rem);
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.45rem;
}

p {
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  font-weight: bold;
}

.tagline {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.statsGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.statCard,
.panel,
.portalCard,
.formBox {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 26px;
  box-shadow: 0 18px 46px rgba(0,0,0,0.3);
}

.statCard {
  padding: 20px;
}

.statCard span {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
}

.statCard strong {
  display: block;
  margin-top: 8px;
  color: var(--gold);
  font-size: 2.35rem;
}

.panel {
  padding: 26px;
  margin-bottom: 24px;
}

.sectionHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.searchInput,
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,0.07);
  color: var(--text);
  padding: 14px 16px;
  outline: none;
  font-family: Papyrus, fantasy;
  font-size: 1rem;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255,247,220,0.55);
}

select option {
  background: #120d23;
  color: var(--text);
}

.searchInput {
  max-width: 360px;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.quickActions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

button {
  border: 1px solid rgba(247, 223, 138, 0.52);
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--gold), var(--goldDark));
  color: #170f24;
  font-family: Papyrus, fantasy;
  font-weight: bold;
  font-size: 1rem;
  transition: 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(247, 223, 138, 0.18);
}

button.secondary {
  background: transparent;
  color: var(--gold);
}

button.danger {
  background: linear-gradient(135deg, #ff8aa0, #9a1f45);
  color: white;
}

.dashboardGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.portalCard {
  position: relative;
  overflow: hidden;
  min-height: 200px;
  padding: 28px;
  cursor: pointer;
  transition: 0.22s ease;
}

.portalCard:hover {
  transform: translateY(-5px);
  border-color: rgba(247, 223, 138, 0.7);
  box-shadow: 0 24px 72px rgba(110, 67, 255, 0.25);
}

.portalCard::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: linear-gradient(var(--gold), var(--purple));
}

.portalCard span {
  display: inline-block;
  padding: 7px 12px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(255,255,255,0.04);
  font-size: 0.85rem;
}

.portalCard p,
#activityFeed p {
  color: var(--muted);
}

#pageContent {
  margin-top: 24px;
}

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

.formGrid .full {
  grid-column: 1 / -1;
}

.formBox {
  padding: 26px;
  margin-bottom: 24px;
}

.tableWrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

th,
td {
  text-align: left;
  padding: 14px;
  border-bottom: 1px solid rgba(247, 223, 138, 0.14);
}

th {
  color: var(--gold);
}

.badge {
  display: inline-block;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(247, 223, 138, 0.14);
  color: var(--gold);
  font-size: 0.86rem;
}

.adminModal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
  background:
    radial-gradient(circle at center, rgba(110, 67, 255, 0.25), transparent 40%),
    rgba(0,0,0,0.86);
  backdrop-filter: blur(8px);
}

.adminModalCard {
  width: 430px;
  max-width: 100%;
  padding: 32px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(31,18,55,0.98), rgba(7,5,18,0.98));
  border: 1px solid rgba(247,223,138,0.35);
  box-shadow: 0 30px 80px rgba(0,0,0,0.65);
}

.adminModalCard h2 {
  margin-bottom: 20px;
  text-align: center;
}

.adminModalCard input {
  margin-bottom: 12px;
}

.adminModalCard button {
  width: 100%;
  margin-top: 8px;
}

@media (max-width: 900px) {
  .statsGrid,
  .dashboardGrid,
  .formGrid {
    grid-template-columns: 1fr;
  }

  .hero,
  .sectionHeader {
    flex-direction: column;
    align-items: flex-start;
  }

  .searchInput {
    max-width: none;
  }

  .logo {
    width: 110px;
    height: 110px;
  }
}
.centeredHero {
  flex-direction: column;
  text-align: center;
}

.bigLogo {
  width: 190px;
  height: 190px;
}

.simpleHomeGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 28px;
}

.homeChoiceCard {
  min-height: 330px;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0,0,0,0.34);
  cursor: pointer;
  transition: 0.22s ease;
}

.homeChoiceCard:hover {
  transform: translateY(-6px);
  border-color: rgba(247, 223, 138, 0.72);
}

.homeChoiceCard span {
  display: inline-block;
  padding: 8px 14px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--gold);
}

.homeChoiceCard p {
  color: var(--muted);
  font-size: 1.08rem;
}

.homeChoiceCard button {
  margin-top: 18px;
}

.adminChoice {
  background:
    radial-gradient(circle at top right, rgba(110,67,255,0.26), transparent 34%),
    var(--panel);
}

.clientChoice {
  background:
    radial-gradient(circle at top left, rgba(247,223,138,0.14), transparent 34%),
    var(--panel);
}

.adminMenuGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 20px;
}

.adminMenuCard {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel);
  cursor: pointer;
  transition: 0.2s ease;
}

.adminMenuCard:hover {
  transform: translateY(-4px);
  border-color: rgba(247,223,138,0.65);
}

.adminMenuCard p {
  color: var(--muted);
}

@media (max-width: 900px) {
  .simpleHomeGrid,
  .adminMenuGrid {
    grid-template-columns: 1fr;
  }

  .bigLogo {
    width: 135px;
    height: 135px;
  }
}
/* =========================
   DOTI CLIENT FORM UPGRADES
========================= */

.formGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

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

.panel {
  background: rgba(15,15,30,.6);
  border: 1px solid rgba(255,214,94,.15);
  border-radius: 18px;
  padding: 24px;
}

.panel h2 {
  margin-bottom: 16px;
}

.panel p {
  line-height: 1.7;
}

.healthGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 30px;
  margin-top: 20px;
}

.healthItem {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .95rem;
}

.healthItem input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #d6a932;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.signatureBox {
  min-height: 140px;
}

@media (max-width: 768px) {

  .formGrid {
    grid-template-columns: 1fr;
  }

  .healthGrid {
    grid-template-columns: 1fr;
  }

}
/* =========================
   STEP FORM POLISH
========================= */

.formBox form section.panel {
  margin-top: 10px;
}

.formBox form section.panel h2 {
  margin-bottom: 14px;
}

.formBox form section.panel p {
  color: var(--muted);
  font-size: 1.03rem;
}

.healthGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 24px;
  margin-top: 18px;
}

.healthItem {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(247, 223, 138, 0.16);
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.healthItem input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: #f7df8a;
}

.textLink {
  color: var(--gold);
  font-weight: bold;
  text-decoration: none;
}

.textLink:hover {
  text-decoration: underline;
}

@media (max-width: 800px) {
  .healthGrid {
    grid-template-columns: 1fr;
  }
}
.signatureArea {
  margin-top: 18px;
}

#signatureCanvas {
  width: 100%;
  height: 250px;
  background: white;
  border-radius: 16px;
  border: 3px solid rgba(247,223,138,.35);
  touch-action: none;
}
.signatureArea {
  margin-top: 18px;
}

#signatureCanvas {
  width: 100%;
  height: 250px;
  display: block;
  background: #ffffff;
  border-radius: 16px;
  border: 3px solid rgba(247,223,138,.35);
  touch-action: none;
}
.signaturePreview {
  width: 320px;
  max-width: 100%;
  background: #ffffff;
  border-radius: 14px;
  border: 2px solid rgba(247,223,138,.35);
  padding: 10px;
  margin-top: 10px;
}