/* Shared color tokens for the auth, dashboard, and lesson pages. */
:root {
  --page: #f7f8f5;
  --panel: #ffffff;
  --ink: #0c3322;
  --strong: #111815;
  --body: #3f4744;
  --muted: #69716d;
  --line: #cfd8d2;
  --line-dark: #7d9187;
  --panel-border: #204e3a;
  --soft: #f1f4f0;
  --accent: #0b4c2f;
  --accent-bright: #14683f;
  --field: #fbfcfb;
}

/* Base page setup. */
* {
  box-sizing: border-box;
}

[hidden] { display: none !important; }

/* This lets the page fill the whole browser height. */
html, body {
  min-height: 100%;
}

/* This sets the normal page background, text color, and font. */
body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--body);
  font-family: Arial, Helvetica, sans-serif;
}

/* These items all need their content centered both ways. */
.page, .icon-box, .password-toggle, .icon-button, .course-icon, .avatar, .soft-icon, .progress-ring, .lesson-progress-ring {
  display: grid;
  place-items: center;
}

/* This wraps the auth pages and keeps space around the outside. */
.page {
  min-height: 100vh;
  min-height: 100svh;
  padding: 30px;
}

/* Auth page shell and brand header. */
.frame {
  width: 100%;
  max-width: 1360px;
  border: 2px solid var(--panel-border);
  background: var(--panel);
  box-shadow: none;
}

/* This is the top row with the logo and account link. */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 42px 14px;
}

/* This keeps the logo square and business name beside each other. */
.brand {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: center;
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
}

/* This is the green square logo mark. */
.brand-mark {
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #ffffff;
  font-size: 24px;
  padding: 10px;
  box-shadow: none;
}

/* This stacks the two brand text lines. */
.brand-name {
  display: grid;
  gap: 3px;
}

/* This is the small login/signup link area in the auth header. */
.new-account {
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

/* These buttons are made to look like plain icon/text links. */
.link-button, .password-toggle, .icon-button, .profile-button {
  border: 0;
  background: transparent;
}

/* This styles the small text-only auth link button. */
.link-button {
  color: var(--ink);
  font: 700 14px Arial, Helvetica, sans-serif;
}

/* Two-column auth layout: marketing content beside the form card. */
.main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(390px, 520px);
  gap: 38px;
  align-items: stretch;
  padding: 16px 42px 28px;
}

/* This is the thin vertical line between the two auth columns. */
.divider-vertical {
  background: var(--line);
}

/* This is the small uppercase text above the main headline. */
.eyebrow {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

/* This styles the big headline used on the auth pages. */
h1 {
  margin: 0;
  max-width: 720px;
  color: var(--ink);
  font-size: 40px;
  line-height: 1.25;
  letter-spacing: 0;
}

/* This is the small green line under the headline. */
.title-rule {
  width: 50px;
  height: 3px;
  margin: 22px 0 20px;
  background: var(--accent);
}

/* This styles the paragraph under the auth headline. */
.intro {
  max-width: 600px;
  margin: 0 0 28px;
  color: var(--body);
  font-size: 16px;
  line-height: 1.55;
}

/* Auth page benefits and stats. */
.feature-list {
  display: grid;
  gap: 0;
  max-width: 640px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

/* This is one row in the feature list. */
.feature-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

/* This avoids adding a top border to the first feature row. */
.feature-item:first-child {
  border-top: 0;
}

/* This is the outlined square around feature icons. */
.icon-box {
  width: 48px;
  height: 48px;
  border: 2px solid var(--line-dark);
  color: var(--accent);
}

/* This sizes the Iconify icon inside the square box. */
.icon-box iconify-icon {
  width: 24px;
  height: 24px;
  font-size: 24px;
}

/* This is the bold title in each feature row. */
.feature-title {
  display: block;
  margin: 0 0 4px;
  color: var(--strong);
  font-size: 14px;
  font-weight: 700;
}

/* This is the smaller description under each feature title. */
.feature-copy {
  display: block;
  color: var(--body);
  font-size: 14px;
  line-height: 1.35;
}

/* This creates the four number boxes under the auth features. */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 2px solid var(--line);
  background: #fafbf9;
}

/* This is one small stat box. */
.stat {
  padding: 14px 16px;
  text-align: center;
  border-right: 1px solid var(--line);
}

/* This removes the extra divider after the last stat box. */
.stat:last-child {
  border-right: 0;
}

/* This is the large number inside a stat box. */
.stat strong {
  display: block;
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

/* This is the smaller label inside a stat box. */
.stat span {
  display: block;
  color: #151b18;
  font-size: 13px;
  line-height: 1.35;
}

/* Shared login/signup form styling. */
.auth-card {
  align-self: center;
  width: 100%;
  border: 2px solid var(--panel-border);
  background: #ffffff;
  padding: 28px;
  box-shadow: none;
}

/* This makes the small green accent line on top of the form card. */
.auth-card::before {
  display: block;
  width: 52px;
  height: 2px;
  margin: -29px 0 24px -28px;
  background: var(--accent);
  content: "";
}

/* This styles the form card title. */
.auth-card h2 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

/* This is the small paragraph below the form title. */
.auth-copy {
  margin: 0 0 28px;
  color: var(--body);
  font-size: 14px;
}

/* These labels sit above the form fields. */
label {
  display: block;
  margin: 0 0 9px;
  color: var(--strong);
  font-size: 14px;
  font-weight: 700;
}

/* This wrapper lets us place icons inside the input field. */
.input-wrap {
  position: relative;
  margin: 0 0 22px;
}

/* This positions the left-side icon inside each input. */
.input-wrap>iconify-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 20px;
  height: 20px;
  color: var(--body);
  font-size: 20px;
  transform: translateY(-50%);
}

/* This positions the eye button inside password inputs. */
.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 32px;
  height: 32px;
  color: var(--body);
  padding: 0;
  transform: translateY(-50%);
}

/* This changes the eye icon color when the user hovers it. */
.password-toggle:hover {
  color: var(--accent);
}

/* This keeps the password eye icon at the right size. */
.password-toggle iconify-icon {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

/* This is the main visual style for text, email, and password fields. */
input[type="text"], input[type="email"], input[type="password"] {
  display: block;
  width: 100%;
  height: 50px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: var(--field);
  color: #101612;
  font: 15px Arial, Helvetica, sans-serif;
  padding: 0 48px;
  outline: none;
}

/* This controls the light gray placeholder text in inputs. */
input::placeholder {
  color: #858b88;
}

/* This adds a green highlight when an input is selected. */
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(11, 76, 47, 0.1);
}

/* This row holds things like Remember me and Forgot password. */
.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -2px 0 26px;
  font-size: 14px;
}

/* This is the default message box shown under the form fields. */
.form-message {
  margin: -8px 0 18px;
  border: 1px solid var(--line);
  background: #f4f7f5;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
  padding: 10px 12px;
}

/* This makes error messages red. */
.form-message.error {
  border-color: #b4443f;
  background: #fff6f5;
  color: #84241f;
}

/* This makes success messages green. */
.form-message.success {
  border-color: var(--accent);
  background: #f1f8f4;
  color: var(--ink);
}

/* This keeps the remember checkbox and text on one row. */
.remember {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--body);
}

/* This gives all checkboxes the same size and green check color. */
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
}

/* These are green text links used in the forms. */
.text-link, .auth-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

/* This sets the shared defaults for all buttons. */
button {
  border-radius: 0;
  font-family: Arial, Helvetica, sans-serif;
  cursor: pointer;
}

/* This underlines text-style buttons when the user hovers them. */
.link-button:hover, .auth-link:hover, .text-link:hover, .secondary:hover {
  text-decoration: underline;
}

/* This keeps the primary button green on hover. */
.primary:hover {
  background: var(--accent);
}

/* This is the big green submit button. */
.primary {
  display: grid;
  grid-template-columns: 1fr 22px;
  align-items: center;
  width: 100%;
  height: 52px;
  border: 2px solid #083b24;
  background: var(--accent);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  padding: 0 20px;
}

/* This pushes the arrow icon to the right side of the primary button. */
.primary iconify-icon {
  justify-self: end;
  width: 22px;
  height: 22px;
  font-size: 22px;
}

/* This is the "or" divider between the two auth buttons. */
.or {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin: 24px 0;
  color: var(--muted);
  font-size: 14px;
}

/* These are the horizontal lines on both sides of the word "or". */
.or::before, .or::after {
  height: 1px;
  background: var(--line);
  content: "";
}

/* This is the white outline button under the main button. */
.secondary {
  width: 100%;
  height: 50px;
  border: 2px solid var(--accent);
  background: #ffffff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

/* This is the privacy/security note at the bottom of forms. */
.privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 0;
  color: var(--body);
  font-size: 13px;
}

/* This sizes the small lock icon in the privacy note. */
.privacy iconify-icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
  font-size: 14px;
}

/* Trust strip shown at the bottom of the auth pages. */
.bottom-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 2px solid var(--line);
  background: #f3f6f3;
  padding: 18px 42px;
}

/* This is one item in the bottom trust strip. */
.strip-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: center;
  padding: 0 26px;
  border-right: 1px solid var(--line);
}

/* This removes extra left padding from the first trust item. */
.strip-item:first-child {
  padding-left: 0;
}

/* This removes the divider and extra padding from the last trust item. */
.strip-item:last-child {
  border-right: 0;
  padding-right: 0;
}

/* This sizes the large icon in each trust strip item. */
.strip-icon {
  width: 34px;
  height: 34px;
  color: var(--accent);
  font-size: 34px;
}

/* This is the bold text in each trust strip item. */
.strip-title {
  display: block;
  margin: 0 0 3px;
  color: var(--strong);
  font-size: 14px;
  font-weight: 700;
}

/* This is the smaller helper text in each trust strip item. */
.strip-copy {
  color: var(--body);
  font-size: 13px;
}

/* Shared Iconify sizing and dashboard top navigation. */
iconify-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  line-height: 1;
  vertical-align: middle;
}

/* This is the main background for dashboard-style pages. */
.dashboard-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #fbfcfb;
}

/* This is the sticky header used on dashboard and lesson pages. */
.dashboard-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  padding: 16px 28px;
}

/* This removes link styling from the logo in the app header. */
.dashboard-brand {
  color: var(--ink);
  text-decoration: none;
}

/* This keeps the header icons and profile button in one row. */
.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* This gives the header icon buttons their text/icon color. */
.icon-button, .profile-button {
  color: #0e1b15;
}

/* This is the clickable square area around header icons. */
.icon-button {
  width: 38px;
  height: 38px;
}

/* This sizes the icons inside the header icon buttons. */
.icon-button iconify-icon {
  width: 24px;
  height: 24px;
  font-size: 24px;
}

/* This lays out the avatar, email, and dropdown arrow. */
.profile-button {
  display: grid;
  grid-template-columns: 42px minmax(0, auto) 20px;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* This is the circular default avatar. */
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #dceee4;
  color: var(--accent);
}

/* This sizes the person icon inside the avatar circle. */
.avatar iconify-icon {
  width: 30px;
  height: 30px;
  font-size: 30px;
}

/* This shows the signed-in email and cuts it off if it is too long. */
.profile-email {
  max-width: 280px;
  overflow: hidden;
  color: #0e1b15;
  font-size: 16px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* This sizes the small dropdown arrow beside the email. */
.chevron {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

/* Shared course icon, progress bar, and button primitives. */
.course-icon {
  width: 62px;
  height: 62px;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
}

/* This sizes the icon inside a green course square. */
.course-icon iconify-icon {
  width: 34px;
  height: 34px;
  font-size: 34px;
}

/* This is the gray progress bar track. */
.bar {
  width: 100%;
  max-width: 220px;
  height: 5px;
  margin: 10px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe4e1;
}

/* This is the green filled part of a progress bar. */
.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

/* This is the circular progress ring used on dashboard and lesson pages. */
.progress-ring, .lesson-progress-ring {
  width: var(--ring-size, 42px);
  height: var(--ring-size, 42px);
  border: 0;
  border-radius: 50%;
  background: radial-gradient(farthest-side, #ffffff calc(100% - var(--ring-thickness, 6px)), transparent 0), conic-gradient(var(--accent) 0 var(--ring-progress, 68%), #d7e6dd var(--ring-progress, 68%) 100%);
  color: var(--accent);
  font-size: var(--ring-font, 12px);
  font-weight: var(--ring-weight, 700);
  line-height: 1;
  text-align: center;
}

/* This makes lesson progress rings larger than the small dashboard rings. */
.lesson-progress-ring {
  --ring-size: 58px;
  --ring-thickness: 7px;
  --ring-progress: 75%;
  --ring-font: 15px;
  --ring-weight: 800;
}

/* This centers the percent text inside the circular progress ring. */
.progress-ring>span, .lesson-progress-ring>span {
  display: block;
  margin: 0;
  color: var(--accent);
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
}

/* This is a reusable pale green circle for support icons. */
.soft-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #dceee4;
  color: var(--accent);
}

/* This sizes icons inside the pale green icon circle. */
.soft-icon iconify-icon {
  width: 26px;
  height: 26px;
  font-size: 26px;
}

/* These are shared white cards used by dashboard and lesson pages. */
.course-card, .widget-card, .lesson-card, .lesson-stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

/* This helper makes buttons, links, or panels stretch to full width. */
.full-width {
  width: 100%;
}

/* This is the shared white button with a green border. */
.outline-button {
  display: grid;
  place-items: center;
  min-height: 40px;
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  background: #ffffff;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  padding: 0 20px;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.outline-button:hover, .outline-button:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

/* Responsive auth and shared app-shell adjustments. */
@media (max-width: 980px) {
  /* This reduces the outside page padding on tablets. */
  .page {
    padding: 18px;
  }
  /* This keeps the auth content lined up with smaller side padding. */
  .topbar, .main, .bottom-strip {
    padding-left: 26px;
    padding-right: 26px;
  }
  /* This changes the auth page from two columns to one column. */
  .main {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  /* This hides the vertical divider when the columns stack. */
  .divider-vertical {
    display: none;
  }
  /* This lets the text use the full available width on smaller screens. */
  h1, .intro {
    max-width: none;
  }
  /* This changes the stats and trust strip into two columns. */
  .stats, .bottom-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  /* This removes the right border from every second item in the two-column layout. */
  .stat:nth-child(2), .strip-item:nth-child(2) {
    border-right: 0;
  }
  /* This adds a bottom border below the first row of stats. */
  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  /* This adds spacing around each trust strip item on tablets. */
  .strip-item {
    padding: 16px;
    border-bottom: 1px solid var(--line);
  }
  /* This removes the bottom border from the last row of trust strip items. */
  .strip-item:nth-child(3), .strip-item:nth-child(4) {
    border-bottom: 0;
  }
}

@media (max-width: 620px) {
  /* This prevents app pages from creating sideways scrolling on phones. */
  .dashboard-page {
    overflow-x: hidden;
  }
  /* This removes outside padding so the mobile page starts at the edge. */
  .page {
    padding: 0;
    place-items: start;
  }
  /* This stacks the dashboard header content on small screens. */
  .dashboard-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    min-height: auto;
    padding: 16px;
  }
  /* This keeps header icons aligned on mobile. */
  .dashboard-actions {
    justify-content: flex-start;
    width: 100%;
    gap: 8px;
  }
  /* This hides the profile text and keeps only the avatar on mobile. */
  .profile-button {
    grid-template-columns: 38px;
    max-width: 100%;
  }
  /* This makes the avatar slightly smaller on mobile. */
  .avatar {
    width: 38px;
    height: 38px;
  }
  /* This keeps the mobile avatar icon proportional. */
  .avatar iconify-icon {
    width: 28px;
    height: 28px;
    font-size: 28px;
  }
  /* This hides the email because it is too wide for phone screens. */
  .profile-email {
    display: none;
  }
  /* This hides the dropdown arrow when the email is hidden. */
  .profile-button .chevron {
    display: none;
  }
  /* This keeps auth pages narrow and centered like the design. */
  .frame {
    width: 100%;
    max-width: 360px;
    min-height: 100vh;
  }
  /* This reduces left and right padding on auth content. */
  .topbar, .main, .bottom-strip {
    padding-left: 22px;
    padding-right: 22px;
  }
  /* This stacks the auth header logo and account link. */
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
    padding-top: 24px;
  }
  /* This lets the top auth link wrap instead of overflowing. */
  .new-account {
    display: grid;
    grid-template-columns: auto 1fr;
    width: 100%;
    gap: 12px;
    white-space: normal;
  }
  /* This moves the login/signup link to the right on mobile. */
  .new-account .link-button {
    justify-self: end;
    text-align: right;
  }
  /* This makes the main headline smaller on phones. */
  h1 {
    font-size: 32px;
  }
  /* This stacks stats and trust items into one column. */
  .stats, .bottom-strip {
    grid-template-columns: 1fr;
  }
  /* This removes side borders because items are stacked vertically. */
  .stat, .stat:nth-child(2), .strip-item, .strip-item:nth-child(2) {
    border-right: 0;
  }
  /* This adds a divider between stacked stats and trust items. */
  .stat:not(:last-child), .strip-item:not(:last-child) {
    border-bottom: 1px solid var(--line);
  }
  /* This makes the auth card padding fit smaller screens. */
  .auth-card {
    padding: 24px 20px;
  }
  /* This keeps the small green accent line aligned after mobile padding changes. */
  .auth-card::before {
    margin: -25px 0 24px -20px;
  }
  /* This stacks checkbox/link rows so they do not feel squeezed. */
  .form-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}


