/* ===========================
   Ella Rises Brand Variables
   =========================== */

:root {
  --er-blue:    #99B7C6;
  --er-lilac:   #978EC4;
  --er-cream:   #F9F5EA;
  --er-blush:   #FFD8D1;
  --er-pink:    #F9AFB1;
  --er-sage:    #9AB59D;
  --er-charcoal:#3A3F3B;
  --er-peach:   #F4B092;
  --er-rasp:    #CE325B;

  --er-bg:      var(--er-cream);
  --er-surface: #FFFFFF;
  --er-text:    var(--er-charcoal);
  --er-primary: var(--er-rasp);
  --er-primary-soft: var(--er-pink);
  --er-accent:  var(--er-sage);
}

/* ==============
   Reset and base
   ============== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--er-text);
  background-color: var(--er-bg);
}

/* Layout wrappers */

.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.page {
  background-color: var(--er-surface);
  border-radius: 18px;
  padding: 1.75rem 1.5rem 2rem;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.06);
  margin-top: 1.5rem;
}

/* Headings */

h1,
h2,
h3,
h4 {
  font-family: "DM Serif Display", "Times New Roman", serif;
  margin-top: 0;
  color: var(--er-charcoal);
}

h1 {
  font-size: 2.3rem;
  letter-spacing: 0.04em;
}

h2 {
  font-size: 1.7rem;
}

/* =========================
   Two tone navigation bar
   ========================= */

.er-nav {
  background-color: var(--er-blush);
  padding: 1.1rem 1.4rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
}

.er-nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.55rem;
  background-color: var(--er-cream);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-left,
.nav-middle,
.nav-right {
  position: relative;
  z-index: 1;
}

/* left brand */

.nav-left {
  display: flex;
  align-items: center;
}

/* middle navigation links */

.nav-middle {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

/* right actions */

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* subtle divider before manager links */

.nav-divider {
  width: 1px;
  height: 22px;
  background: rgba(0, 0, 0, 0.12);
}

/* Brand logo text and image */

.nav-logo {
  display: flex;
  align-items: center;
  font-family: "DM Serif Display", serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--er-charcoal);
  text-decoration: none;
  margin-right: 1.5rem;
}

.nav-logo-img {
  height: 48px;
  width: 48px;
  border-radius: 50%;
  object-fit: contain;
  margin-right: 0.55rem;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.15));
}

.er-nav a {
  color: var(--er-charcoal);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.er-nav a:hover {
  color: var(--er-rasp);
}

.er-nav button {
  background-color: var(--er-rasp);
  color: #ffffff;
  border: none;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
}

.er-nav button:hover {
  background-color: #b22347;
}

/* ===========
   Buttons etc
   =========== */

a.button-link {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--er-primary);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
}

a.button-link:hover {
  background: #b22347;
}

button,
input[type="submit"] {
  font-family: inherit;
  border-radius: 999px;
  border: none;
  padding: 0.55rem 1.2rem;
  background: var(--er-primary);
  color: #ffffff;
  font-size: 0.95rem;
  cursor: pointer;
}

button:hover,
input[type="submit"]:hover {
  background: #b22347;
}

.button-secondary {
  background: var(--er-accent);
  color: var(--er-charcoal);
}

.button-secondary:hover {
  background: #7c9d80;
}

/* Participants page specific buttons */

.btn-add {
  display: inline-block;
  background-color: var(--er-accent);
  color: var(--er-charcoal);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-add:hover {
  background-color: #7c9d80;
}

/* Edit is green accent */

.btn-edit {
  display: inline-block;
  background-color: var(--er-accent);
  color: var(--er-charcoal);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 500;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.btn-edit:hover {
  background-color: #7c9d80;
}

/* Delete is primary raspberry */

.btn-delete {
  background-color: var(--er-primary);
  color: #ffffff;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
}

.btn-delete:hover {
  background-color: #b22347;
}

.btn-primary {
  background-color: var(--er-primary);
  color: #ffffff;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.btn-primary:hover {
  background-color: #b22347;
}

.link-back {
  text-decoration: underline;
  color: var(--er-blue);
  font-size: 0.9rem;
}

.link-back:hover {
  color: var(--er-lilac);
}

/* inline form so Edit and Delete sit on one line */

.inline-form {
  display: inline;
  margin: 0;
}

/* ======
   Forms
   ====== */

form {
  max-width: 520px;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-family: inherit;
  font-size: 0.95rem;
  background-color: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--er-pink);
  border-color: var(--er-pink);
}

textarea {
  resize: vertical;
  min-height: 90px;
}

.form-row {
  margin-bottom: 1rem;
}

/* ======
   Tables
   ====== */

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
}

th,
td {
  padding: 0.6rem 0.75rem;
  text-align: left;
}

th {
  background-color: var(--er-charcoal);
  color: var(--er-cream);
  font-weight: 600;
}

tbody tr:nth-child(odd) {
  background-color: var(--er-cream);
}

tbody tr:nth-child(even) {
  background-color: #ffffff;
}

tbody tr:hover {
  background-color: var(--er-blush);
}

/* actions cell */

td.actions,
.action-cell {
  white-space: nowrap;
}

td.actions form {
  display: inline;
}

/* ===============
   Flash messages
   =============== */

.flash {
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  margin: 0.75rem 0;
  font-size: 0.9rem;
}

.flash.success {
  background-color: var(--er-accent);
  color: var(--er-charcoal);
}

.flash.error {
  background-color: var(--er-rasp);
  color: #ffffff;
}

/* =========================
   Landing page hero section
   ========================= */

.landing-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0;
}

.hero-left {
  flex: 1 1 260px;
  text-align: center;
}

.hero-right {
  flex: 1 1 300px;
}

.hero-logo {
  width: 230px;
  max-width: 90%;
  border-radius: 50%;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.08));
}

.hero-text {
  font-size: 1.1rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  color: var(--er-charcoal);
}

/* =======================
   Dashboard summary cards
   ======================= */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.card {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 1rem 1.1rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.card-value {
  font-size: 1.3rem;
  font-weight: 700;
}

/* ===============
   Responsive tweaks
   =============== */

@media (max-width: 700px) {
  .er-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .nav-left {
    margin-bottom: 0.25rem;
  }

  .nav-middle {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.9rem;
  }

  .nav-right {
    align-self: flex-end;
  }

  .page-wrap {
    padding: 1rem 0.75rem 2rem;
  }

  .page {
    padding: 1.25rem 1rem 1.75rem;
  }

  .landing-hero {
    flex-direction: column;
  }
}

/* ===========================
   Wider container for Surveys
   =========================== */

.survey-wide {
  max-width: 1650px !important;
}

.survey-wide-page {
  width: 100%;
  max-width: 1650px;
  margin: 0 auto;
}

/* ====== Ella Rises Homepage Image Strip ====== */

.hero-gallery {
  width: 100%;
  padding: 20px 0;
  background-color: #fdfdfd;
}

.hero-gallery-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  overflow-x: auto;
  padding: 10px;
}

.hero-gallery-row img {
  height: 150px;
  border-radius: 6px;
  object-fit: cover;
}

/* =======================
   Home and dashboard layout
   ======================= */

.home-page {
  padding-top: 2.2rem;
}

.home-hero h1 {
  font-size: 2.4rem;
  margin-bottom: 0.6rem;
}

.home-subtitle {
  font-size: 1rem;
  max-width: 720px;
  line-height: 1.6;
  color: #555a55;
}

/* cards grid */

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.admin-grid {
  margin-top: 2.4rem;
}

/* card styling */

.home-card {
  background-color: #ffffff;
  border-radius: 20px;
  padding: 1.5rem 1.6rem 1.4rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.home-card-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.75rem;
}

.home-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background-color: var(--er-cream);
}

.home-card-eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
  color: #777d77;
}

.home-card-title {
  font-size: 1.2rem;
  margin: 0.15rem 0 0;
}

.home-card-body {
  font-size: 0.95rem;
  color: #555a55;
  margin: 0.6rem 0 1.1rem;
}

.home-card-btn {
  align-self: flex-start;
}

/* dashboard stats */

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin: 2rem 0 0.5rem;
}

.stat-card {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 0.9rem 1rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.03);
}

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.15rem;
  color: #777d77;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
}

/* responsive tweaks for home and dashboard */

@media (max-width: 700px) {
  .home-hero h1 {
    font-size: 2rem;
  }

  .home-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* Modal scroll fix */

.er-modal-box::-webkit-scrollbar {
  width: 8px;
}

.er-modal-box::-webkit-scrollbar-thumb {
  background: var(--er-blue);
  border-radius: 4px;
}

/* Milestones table shell */
.table-shell {
  margin-top: 0.75rem;
  border-radius: 16px;
  background-color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.03);
  overflow: hidden;              /* keeps the dark header inside rounded corners */
}

/* inner area can scroll horizontally if needed */
.table-shell-inner {
  overflow-x: auto;
}

/* table inside the shell: no extra top margin, slight min width for breathing room */
.table-shell-inner .data-table {
  margin-top: 0;
  min-width: 1050px;            /* gives columns space, creates a subtle inner scroll on small screens */
}

/* slightly tighter cell padding so the row height feels balanced */
.data-table th,
.data-table td {
  padding: 0.55rem 0.7rem;
}

/* right align numeric columns so the zeros line up */
.data-table th.numeric,
.data-table td.numeric {
  text-align: right;
}

/* center the action column */
.data-table .action-cell {
  text-align: center;
  white-space: nowrap;
}

/* Nav icons inside links */
.nav-middle a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-icon {
  font-size: 1rem;
}

/* Manager links have a soft pill background to stand out */
.nav-manager-link {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.5);
}

.nav-manager-link:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

/* Admin dropdown */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.nav-caret {
  font-size: 0.7rem;
}

/* Dropdown menu */
.nav-dropdown-menu {
  position: absolute;
  top: 110%;
  left: 0;
  min-width: 190px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  padding: 0.4rem 0;
  display: none;
  z-index: 20;
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--er-charcoal);
}

.nav-dropdown-menu a:hover {
  background-color: var(--er-cream);
}

/* Show dropdown on hover or focus within */
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

/* Small tweak on narrow screens */
@media (max-width: 700px) {
  .nav-dropdown-menu {
    left: auto;
    right: 0;
  }
}

/* ============================
   Global Footer (updated)
============================ */

.er-footer {
  background-color: #ffffff;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin-top: 3rem;
  padding: 1.5rem 0;
  display: flex;
  justify-content: center;
}

.footer-inner {
  width: 100%;
  max-width: 1100px;
  text-align: center;
  color: var(--er-charcoal);
  font-size: 0.9rem;
}

.footer-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  font-family: "DM Serif Display", serif;
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
}

/* Fix: let logo keep its natural aspect ratio */
.footer-logo {
  height: 44px;            /* control height only */
  width: auto;             /* let width follow image ratio */
  object-fit: contain;
  border-radius: 50%;      /* keeps it round without squashing */
}

/* Social row */
.footer-social {
  margin-bottom: 0.8rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

/* Remove underline “dash” between icons */
.footer-social a {
  text-decoration: none;
}

.social-icon {
  width: 26px;
  height: 26px;
  transition: opacity 0.2s ease;
  filter: invert(0); /* keep icons black */
}

.social-icon:hover {
  opacity: 0.6;
}

.footer-copy {
  color: #555a55;
  font-size: 0.85rem;
}

/* Prevent wrapping */
.no-wrap {
  white-space: nowrap;
}

/* Manager dropdown wrapper */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-btn {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  padding: 0.4rem 0.6rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown-content {
  display: none;
  position: absolute;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.5rem;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 50;
}

.nav-dropdown-content a {
  display: block;
  padding: 0.35rem 0.5rem;
  white-space: nowrap;
}

.nav-dropdown:hover .nav-dropdown-content {
  display: block;
}
