:root {
  --account-dark: #292723;
  --account-deep: #40372e;
  --account-green: #4f7858;
  --account-danger: #a54828;
}

.account-page { min-width: 0; }
.account-main { min-height: calc(100svh - 240px); overflow: hidden; }

.account-intro {
  position: relative;
  overflow: hidden;
  padding: 166px 0 76px;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, .22) 0 57%, rgba(244, 189, 24, .22) 57% 100%),
    var(--bg);
}
.account-intro-inner { position: relative; z-index: 1; }
.account-intro h1 { max-width: 850px; margin-top: 14px; font-size: clamp(48px, 7vw, 82px); }
.account-lead { max-width: 640px; margin: 20px 0 0; color: var(--muted); font-size: clamp(18px, 2vw, 22px); }
.account-eyebrow {
  margin: 0;
  color: #9c4e00;
  font-size: 13px;
  font-weight: 840;
  letter-spacing: .1em;
  line-height: 1.35;
  text-transform: uppercase;
}
.account-shape { position: absolute; pointer-events: none; }
.account-shape-one { width: 250px; height: 250px; right: 8%; top: 104px; border: 1px solid rgba(40, 35, 29, .12); border-radius: 76px 16px 76px 16px; transform: rotate(13deg); }
.account-shape-two { width: 116px; height: 116px; right: 24%; bottom: -42px; border-radius: 12px 44px 12px 44px; background: rgba(242, 138, 17, .18); transform: rotate(-12deg); }

.account-workspace { padding: 46px 0 104px; }
.account-panel {
  width: min(100%, 1020px);
  min-height: 390px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 42px 10px 42px 10px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.account-state { min-height: 390px; padding: 54px; }
.account-state h2, .account-dashboard h2 { margin-top: 12px; font-size: clamp(32px, 4vw, 48px); }
.account-state p { color: var(--muted); }
.account-loading, .account-error { display: grid; place-items: center; align-content: center; text-align: center; }
.account-loading h2, .account-error h2 { margin-top: 22px; }
.account-loading p, .account-error p { margin: 10px 0 0; }
.account-error .button { margin-top: 24px; }
.account-state-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px 5px 18px 5px;
  background: var(--orange-soft);
  color: #9c4e00;
  font-size: 24px;
  font-weight: 900;
}
.account-spinner {
  display: block;
  width: 42px;
  height: 42px;
  border: 4px solid rgba(242, 138, 17, .18);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: account-spin .8s linear infinite;
}
@keyframes account-spin { to { transform: rotate(360deg); } }

.account-login { display: grid; grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr); gap: 52px; align-items: center; }
.account-login-copy { min-width: 0; }
.account-login-copy > p:last-child { margin: 18px 0 0; }
.account-login-icon { margin-bottom: 30px; }
.account-login-form {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px 8px 28px 8px;
  background: #fffaf0;
}
.account-login-form label { margin-top: 9px; font-weight: 760; }
.account-login-form input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 12px 4px 12px 4px;
  outline: 0;
  background: #fff;
  color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.account-login-form input:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(242, 138, 17, .14); }
.account-login-form .button { width: 100%; margin-top: 4px; }
.account-form-status { min-height: 24px; margin: 4px 0 0; color: var(--account-danger) !important; font-size: 14px; font-weight: 680; }

.button-account-solid {
  border-radius: 14px 4px 14px 4px;
  background: linear-gradient(100deg, var(--yellow), var(--orange));
  color: #fff;
  box-shadow: 0 12px 26px rgba(149, 82, 7, .16);
}
.button-account-solid:hover, .button-account-solid:focus-visible { box-shadow: 0 15px 32px rgba(149, 82, 7, .22); }

.account-dashboard { padding: 44px; }
.account-dashboard-head { display: flex; justify-content: space-between; gap: 28px; align-items: flex-start; }
.account-dashboard-head > div { min-width: 0; }
.account-student-email { margin: 10px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.account-logout { flex: 0 0 auto; border-color: var(--line-strong); border-radius: 12px 4px 12px 4px; background: transparent; color: var(--text); }
.account-dashboard-status { min-height: 26px; margin: 22px 0 0; color: var(--muted); font-weight: 680; }
.account-dashboard-status.is-error { color: var(--account-danger); }
.account-dashboard-status.is-success { color: var(--account-green); }
.account-course-loading { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 190px; color: var(--muted); }
.account-course-loading .account-spinner { width: 30px; height: 30px; border-width: 3px; }
.account-empty { display: grid; place-items: center; min-height: 270px; margin-top: 22px; padding: 36px; border: 1px dashed var(--line-strong); border-radius: 28px 8px 28px 8px; text-align: center; }
.account-empty h3 { margin-top: 20px; }
.account-empty p { margin: 10px 0 0; color: var(--muted); }
.account-courses { display: grid; gap: 24px; margin-top: 26px; }
.student-course {
  min-width: 0;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 30px 8px 30px 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(73, 55, 38, .06);
}
.student-course-head { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 30px; align-items: start; }
.student-course-copy { min-width: 0; }
.student-course h3 { font-size: clamp(25px, 3vw, 34px); }
.student-course-subtitle { margin: 10px 0 0; color: var(--muted); }
.student-course-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.student-course-meta span {
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px 3px 10px 3px;
  background: rgba(255, 226, 160, .28);
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.student-progress { min-width: 0; padding: 18px; border-radius: 18px 5px 18px 5px; background: rgba(255, 226, 160, .36); }
.student-progress-line { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.student-progress-line span { color: var(--muted); font-size: 13px; font-weight: 700; }
.student-progress-line strong { font-size: 20px; }
.student-progress-track { height: 9px; margin-top: 12px; border-radius: 2px 7px 2px 7px; background: rgba(40, 35, 29, .12); overflow: hidden; }
.student-progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--yellow), var(--orange)); transition: width .3s ease; }
.student-modules { list-style: none; display: grid; gap: 10px; margin: 26px 0 0; padding: 0; }
.student-module { border: 1px solid var(--line); border-radius: 16px 4px 16px 4px; background: #fffdf8; transition: border-color .2s ease, background .2s ease; }
.student-module.is-complete { border-color: rgba(79, 120, 88, .32); background: rgba(79, 120, 88, .05); }
.student-module-label { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 14px; align-items: start; padding: 17px 18px; cursor: pointer; }
.student-module-checkbox { width: 19px; height: 19px; margin: 2px 0 0; accent-color: var(--account-green); }
.student-module-checkbox:focus-visible { outline: 3px solid rgba(242, 138, 17, .32); outline-offset: 3px; }
.student-module-checkbox:disabled + .student-module-copy { opacity: .62; }
.student-module-copy { min-width: 0; }
.student-module-title { display: block; font-weight: 790; line-height: 1.35; }
.student-module-description { display: block; margin-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.5; }

@media (max-width: 820px) {
  .account-panel { border-radius: 32px 8px 32px 8px; }
  .account-login { grid-template-columns: 1fr; gap: 32px; }
  .account-login-icon { margin-bottom: 22px; }
  .student-course-head { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 640px) {
  .account-intro { padding: 132px 0 58px; }
  .account-intro h1 { font-size: clamp(40px, 13vw, 56px); }
  .account-shape-one { width: 150px; height: 150px; right: -54px; top: 116px; }
  .account-shape-two { right: 22%; }
  .account-workspace { padding: 28px 0 78px; }
  .account-state, .account-dashboard { padding: 26px 20px; }
  .account-state { min-height: 350px; }
  .account-login { display: block; }
  .account-login-form { margin-top: 30px; padding: 20px 16px; border-radius: 22px 6px 22px 6px; }
  .account-dashboard-head { display: grid; gap: 20px; }
  .account-logout { width: 100%; }
  .student-course { padding: 20px 16px; border-radius: 24px 6px 24px 6px; }
  .student-course-meta { display: grid; grid-template-columns: 1fr; }
  .student-module-label { padding: 15px 13px; gap: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .account-spinner { animation: none; border-top-color: rgba(242, 138, 17, .18); }
}
