* {
  box-sizing: border-box;
}

:root {
  --green: #006241;
  --green-dark: #003d32;
  --green-soft: #d8efe4;
  --mint: #b7dfcf;
  --cream: #f7f1df;
  --paper: #fffefa;
  --text: #14211c;
  --muted: #62706a;
  --coffee: #6f4e37;
  --amber: #c9892b;
  --red: #b42318;
  --line: #d7e1d9;
  --shadow: 0 14px 34px rgba(0, 61, 50, .13);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Segoe UI, Arial, sans-serif;
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.desktop-only {
  display: none;
}

.desktop-message {
  width: min(560px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
  text-align: center;
}

.desktop-logo {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  border-radius: 50%;
  object-fit: contain;
}

.desktop-message span {
  color: var(--green);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.desktop-message h1 {
  margin: 10px 0 12px;
  color: var(--green-dark);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

.desktop-message p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.hidden {
  display: none !important;
}

.app-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(247, 241, 223, .88), rgba(247, 241, 223, .88)),
    repeating-linear-gradient(135deg, #f4ead0 0 18px, #e6f0e8 18px 36px);
}

.mobile-app {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 12px 12px 34px;
}

#portalPage {
  padding-bottom: 128px;
}

.manager-only {
  display: none !important;
}

body.manager-mode button.manager-only {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

body.manager-mode section.manager-only {
  display: block !important;
}

body.manager-mode form.manager-only,
body.manager-mode div.manager-only {
  display: grid !important;
}

body.manager-mode .manager-only.hidden {
  display: none !important;
}

.app-hero {
  position: relative;
  min-height: 520px;
  border-radius: 34px;
  border: 2px solid var(--mint);
  background:
    linear-gradient(120deg, rgba(255, 254, 250, .98), rgba(232, 246, 238, .92)),
    repeating-linear-gradient(45deg, rgba(0, 98, 65, .06) 0 12px, transparent 12px 24px);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 22px 18px;
  display: grid;
  grid-template-columns: minmax(0, 43%) minmax(0, 57%);
  grid-template-rows: 1fr auto;
  align-items: center;
}

.portal-hero {
  min-height: 460px;
}

.login-hero {
  min-height: calc(100vh - 24px);
}

.coffee-visual {
  position: relative;
  z-index: 2;
  width: min(320px, 58vw);
  height: min(320px, 58vw);
  justify-self: center;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 6px solid var(--green);
  box-shadow: 0 20px 38px rgba(0, 61, 50, .16);
}

.brand-logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
}

.hero-text {
  position: relative;
  z-index: 2;
  min-width: 0;
  padding: 0 4px 48px;
}

.hero-text span {
  display: block;
  color: var(--green);
  font-weight: 900;
  font-size: clamp(20px, 4.8vw, 30px);
}

.hero-text h1 {
  margin: 4px 0 12px;
  max-width: 100%;
  color: var(--green-dark);
  font-size: clamp(38px, 8vw, 68px);
  line-height: .96;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hero-text p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 4vw, 22px);
  line-height: 1.36;
}

.login-copy {
  padding-bottom: 14px;
}

.login-card {
  grid-column: 1 / -1;
  position: relative;
  z-index: 3;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 10px 22px rgba(0, 61, 50, .10);
}

.login-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.login-role,
.primary-btn,
.secondary-btn,
.danger-btn,
.soft-link,
.add-btn,
.logout-btn {
  border: 0;
  border-radius: 18px;
  font-weight: 900;
}

.login-role {
  min-height: 46px;
  color: var(--green-dark);
  background: var(--green-soft);
}

.login-role.active {
  color: #fff;
  background: var(--green);
}

.input-label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: #fff;
  outline: none;
}

input,
select {
  min-height: 46px;
  padding: 0 14px;
}

textarea {
  min-height: 92px;
  padding: 12px 14px;
  resize: vertical;
}

.login-message {
  min-height: 18px;
  margin: 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.primary-btn {
  min-height: 48px;
  padding: 0 18px;
  color: #fff;
  background: var(--green);
}

.secondary-btn {
  min-height: 42px;
  padding: 0 15px;
  color: var(--green-dark);
  background: var(--green-soft);
}

.danger-btn {
  min-height: 42px;
  padding: 0 15px;
  color: var(--red);
  background: #fff0ed;
  border: 1px solid #f2c7bd;
}

.hero-pills-mobile {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  position: relative;
  z-index: 3;
}

.hero-pills-mobile div {
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px 10px;
  box-shadow: 0 10px 22px rgba(0, 61, 50, .08);
  text-align: center;
}

.hero-pills-mobile small {
  display: block;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-pills-mobile strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(17px, 4.7vw, 28px);
  line-height: 1.1;
}

.app-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  width: min(880px, calc(100% - 20px));
  margin: 0;
  background: rgba(255, 255, 255, .96);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--line);
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 50;
  backdrop-filter: blur(8px);
}

.app-nav-btn {
  border: 0;
  background: transparent;
  padding: 14px 4px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #4b5d54;
  font-size: 18px;
  font-weight: 900;
}

.app-nav-btn span:last-child {
  font-size: 12px;
}

.nav-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: var(--green-soft);
}

.app-nav-btn.active {
  color: var(--green);
  background: linear-gradient(180deg, #ecf8f2, #fff);
}

.mobile-page {
  display: none;
  animation: fadeUp .25s ease;
  margin-top: 20px;
}

/* spacing after hero */

.mobile-page.active {
  display: block;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-card {
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
  backdrop-filter: blur(4px);
}

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

.app-card h2 {
  margin: 0;
  color: var(--green);
  font-size: clamp(20px, 5.4vw, 28px);
  text-transform: uppercase;
  letter-spacing: 0;
}

.app-card p {
  color: var(--muted);
  margin: 4px 0 0;
}

.soft-link {
  min-height: 36px;
  padding: 0 12px;
  color: var(--green);
  background: var(--green-soft);
}

.add-btn {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  color: #fff;
  background: var(--green);
  font-size: 28px;
  line-height: 1;
}

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

.photo-card,
.focus-card,
.value-card,
.event-card,
.validity-card,
.partner-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  overflow: hidden;
}

.photo-frame {
  height: 170px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(0, 98, 65, .14), rgba(183, 223, 207, .55)),
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(0, 98, 65, .07) 12px 24px);
  color: var(--green);
  font-size: 34px;
  font-weight: 900;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-body,
.focus-card,
.value-card,
.event-card,
.validity-card,
.partner-card {
  padding: 16px;
}

.photo-body h3,
.focus-card h3,
.value-card h3,
.event-card h3,
.validity-card h3,
.partner-card h3 {
  margin: 0 0 7px;
  font-size: 18px;
  color: var(--text);
}

.photo-body p,
.focus-card p,
.value-card li,
.event-card p,
.validity-card p,
.partner-card p,
.partner-meta {
  color: var(--muted);
  line-height: 1.45;
}

.mission-callout {
  padding: 22px;
  border-radius: 24px;
  color: #fff;
  background: var(--green);
}

.mission-callout h3 {
  margin: 0 0 10px;
  font-size: clamp(24px, 6vw, 38px);
  line-height: 1.04;
}

.mission-callout p {
  color: #effaf4;
  font-size: 17px;
  line-height: 1.55;
}

.values-intro {
  margin: 18px 0 12px;
  color: var(--green-dark);
  font-size: 20px;
  font-weight: 900;
}

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

.value-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.value-card li + li {
  margin-top: 8px;
}

.day-label,
.date-label,
.status-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.focus-card h3 {
  margin-top: 10px;
}

.simple-list,
.validity-list,
.admin-list {
  display: grid;
  gap: 10px;
}

.event-card {
  display: grid;
  grid-template-columns: 122px 1fr;
  gap: 12px;
}

.status-pill.urgent {
  color: #fff;
  background: var(--red);
}

.status-pill.soon {
  color: #573600;
  background: #ffe1a3;
}

.validity-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.validity-main {
  min-width: 0;
}

.validity-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.admin-card {
  border: 1px dashed var(--mint);
  background: rgba(244, 250, 246, .88);
}

.stack-form {
  display: grid;
  gap: 14px;
}

.editor-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, .82);
}

.editor-title {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--green);
  font-weight: 900;
}

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

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-form {
  display: grid;
  grid-template-columns: 160px 1fr 1fr auto;
  gap: 10px;
  margin: 16px 0;
}

.admin-line {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.partner-card {
  display: grid;
  gap: 12px;
}

.partner-head {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
}

.avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--coffee);
  font-size: 22px;
  font-weight: 900;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.partner-meta {
  display: grid;
  gap: 7px;
  font-size: 14px;
}

.partner-meta strong {
  color: var(--text);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-state {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, .72);
}

.logout-btn {
  width: calc(100% - 20px);
  max-width: 880px;
  min-height: 46px;
  display: block;
  margin: 6px 10px 0;
  color: var(--green-dark);
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--line);
}

@media (max-width: 680px) {
  .mobile-app {
    padding: 0 0 28px;
  }

  .app-hero {
    border-radius: 0 0 34px 34px;
    border-left: 0;
    border-right: 0;
    min-height: 500px;
    grid-template-columns: minmax(0, 38%) minmax(0, 62%);
  }

  .login-hero {
    min-height: 100vh;
  }

  .coffee-visual {
    width: min(210px, 42vw);
    height: min(210px, 42vw);
    margin-left: clamp(-46px, -8vw, -18px);
  }


  .hero-text {
    padding-bottom: 42px;
  }

  .app-card {
    margin-left: 10px;
    margin-right: 10px;
  }

  .week-photo-grid,
  .values-grid,
  .focus-grid,
  .partner-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .app-hero {
    min-height: 500px;
    padding: 18px 14px;
  }

  .portal-hero {
    min-height: 480px;
    grid-template-columns: minmax(0, 34%) minmax(0, 66%);
  }

  .coffee-visual {
    width: min(176px, 39vw);
    height: min(176px, 39vw);
    margin-left: clamp(-36px, -7vw, -14px);
  }

  .hero-text h1 {
    font-size: clamp(32px, 10vw, 44px);
  }

  .hero-text span {
    font-size: clamp(17px, 4vw, 22px);
  }

  .hero-text p {
    font-size: clamp(15px, 3.7vw, 18px);
  }

  .hero-pills-mobile {
    gap: 8px;
  }

  .hero-pills-mobile div {
    padding: 12px 6px;
  }

  .app-nav {
    width: calc(100% - 18px);
    bottom: 9px;
  }

  .app-nav-btn {
    font-size: 15px;
  }

  .app-nav-btn span:last-child {
    font-size: 10px;
  }

  .nav-icon {
    width: 27px;
    height: 27px;
  }

  .card-head,
  .event-card,
  .validity-card,
  .editor-box,
  .inline-form,
  .admin-line {
    grid-template-columns: 1fr;
  }

  .card-head {
    display: grid;
  }

  .validity-meta,
  .login-tabs {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 901px) {
  body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
  }

  .mobile-app {
    display: none !important;
  }

  .desktop-only {
    display: block;
  }
}


.edit-card {
  border-color: var(--mint);
  background: rgba(244, 250, 246, .95);
}

.photo-edit,
.edit-card {
  display: grid;
  gap: 12px;
}

.photo-edit h3 {
  margin-bottom: 0;
  color: var(--green);
}


.inline-event-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--mint);
  border-radius: 20px;
  background: rgba(244, 250, 246, .95);
}

.inline-event-form strong {
  color: var(--green);
  font-size: 16px;
}

.event-edit-card {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.event-edit-card .full-field {
  grid-column: 1 / -1;
}


::placeholder {
  color: #7a8781;
  opacity: .72;
  font-weight: 700;
}


.course-progress {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(244, 250, 246, .82);
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--green-dark);
  font-size: 14px;
}

.progress-row span {
  font-weight: 900;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe9e2;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--mint));
}

.missing-courses {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.missing-courses strong {
  color: var(--text);
}

.missing-courses ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.complete-courses {
  color: var(--green) !important;
  font-size: 13px;
  font-weight: 900;
}

.course-checks {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.course-checks-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--green-dark);
  font-size: 14px;
}

.course-checks-head span {
  color: var(--muted);
  font-weight: 800;
}

.course-check {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(244, 250, 246, .6);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.course-check input {
  width: 18px;
  min-height: 18px;
  margin: 1px 0 0;
  accent-color: var(--green);
}


.partner-card-clickable {
  cursor: pointer;
}

.partner-card-clickable:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 3px;
}

.partner-head {
  grid-template-columns: 58px 1fr auto;
}

.partner-cue {
  align-self: center;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.compact-meta {
  padding-top: 2px;
}

@media (max-width: 430px) {
  .partner-head {
    grid-template-columns: 52px 1fr;
  }

  .partner-cue {
    grid-column: 1 / -1;
    justify-self: start;
  }
}


.partner-inline-form {
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.partner-inline-form .editor-box {
  background: rgba(244, 250, 246, .95);
}


@media (max-width: 380px) {
  .portal-hero {
    min-height: 560px;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    align-items: start;
    row-gap: 12px;
  }

  .portal-hero .coffee-visual {
    width: min(160px, 44vw);
    height: min(160px, 44vw);
    margin-left: 0;
    justify-self: center;
  }

  .portal-hero .hero-text {
    padding: 0 8px 8px;
    text-align: center;
  }

  .portal-hero .hero-text h1 {
    font-size: clamp(31px, 11vw, 40px);
  }

  .portal-hero .hero-pills-mobile {
    align-self: end;
  }
}
