:root {
  --ink: #172b3a;
  --ink-soft: #536876;
  --navy: #11374a;
  --teal: #277d7c;
  --teal-dark: #1f6567;
  --mint: #dcefe8;
  --cream: #f8f7f2;
  --paper: #fffefa;
  --line: #dbe5e4;
  --gold: #e7b454;
  --error: #b6474b;
  --shadow: 0 24px 70px rgba(20, 56, 73, 0.1);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--cream); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(231, 180, 84, .16), transparent 28rem),
    var(--cream);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { cursor: pointer; }

.app-shell {
  display: grid;
  grid-template-columns: minmax(310px, .82fr) minmax(500px, 1.18fr);
  min-height: 100vh;
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 46px clamp(34px, 5vw, 82px);
  overflow: hidden;
  color: #f6f7ef;
  background:
    radial-gradient(circle at 20% 78%, rgba(39, 125, 124, .55), transparent 23rem),
    var(--navy);
}

.brand-panel::after {
  position: absolute;
  right: -150px;
  bottom: 10%;
  width: 480px;
  height: 480px;
  content: "";
  border: 1px solid rgba(220, 239, 232, .16);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(220, 239, 232, .04), 0 0 0 90px rgba(220, 239, 232, .025);
}

.brand-panel__topline, .mobile-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: -.04em;
}

.brand-name { font-size: 20px; }

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--navy);
  font-size: 23px;
  border-radius: 13px 13px 13px 4px;
  background: var(--gold);
  box-shadow: 7px 7px 0 rgba(231, 180, 84, .12);
}

.brand-panel__copy {
  position: relative;
  z-index: 1;
  max-width: 510px;
  margin: 8vh 0;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .17em;
  line-height: 1.3;
  text-transform: uppercase;
}

.eyebrow--dark { color: var(--teal); }

.brand-panel h1 {
  max-width: 570px;
  margin: 20px 0 24px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(46px, 5.5vw, 78px);
  font-weight: 800;
  letter-spacing: -.075em;
  line-height: .98;
}

.brand-panel h1 em {
  color: var(--gold);
  font-style: normal;
}

.brand-panel__description {
  max-width: 350px;
  margin: 0;
  color: rgba(246, 247, 239, .7);
  font-size: 16px;
  line-height: 1.7;
}

.brand-panel__footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(246, 247, 239, .58);
  font-size: 12px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(231, 180, 84, .12);
  animation: pulse 2.4s ease-in-out infinite;
}

.content-panel { background: var(--cream); }

.content-panel__inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 620px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 56px clamp(30px, 7vw, 94px) 28px;
}

.mobile-brand { display: none; }

.auth-card, .dashboard {
  width: 100%;
  animation: rise-in .65s cubic-bezier(.2, .8, .2, 1) both;
}

.auth-card__intro h2, .dashboard h2 {
  margin: 15px 0 10px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(30px, 4vw, 43px);
  font-weight: 800;
  letter-spacing: -.07em;
  line-height: 1;
}

.auth-card__intro p:not(.eyebrow) {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

.auth-tabs {
  display: flex;
  gap: 22px;
  margin: 38px 0 24px;
  border-bottom: 1px solid var(--line);
}

.auth-tab {
  position: relative;
  padding: 0 0 13px;
  color: #9baab0;
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
}

.auth-tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  content: "";
  background: transparent;
}

.auth-tab.is-active { color: var(--teal); }
.auth-tab.is-active::after { background: var(--teal); }

.account-form { display: grid; gap: 15px; }

.field { display: grid; gap: 7px; }
.field span { color: var(--ink); font-size: 12px; font-weight: 700; }

.field input {
  width: 100%;
  padding: 13px 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: rgba(255, 254, 250, .75);
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.field input::placeholder { color: #aab8bc; }
.field input:focus { border-color: var(--teal); background: var(--paper); box-shadow: 0 0 0 4px rgba(39, 125, 124, .11); }
.field input[aria-invalid="true"] { border-color: var(--error); }

.primary-button {
  display: flex;
  min-height: 51px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  color: #fffef8;
  border: 0;
  border-radius: 11px;
  background: var(--teal);
  box-shadow: 0 8px 18px rgba(39, 125, 124, .2);
  font-weight: 700;
  transition: background .2s, transform .2s, box-shadow .2s;
}

.primary-button:hover { background: var(--teal-dark); transform: translateY(-2px); box-shadow: 0 12px 24px rgba(39, 125, 124, .25); }
.primary-button:active { transform: translateY(0); }
.primary-button:disabled { cursor: wait; opacity: .7; transform: none; }

.button-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.primary-button.is-loading .button-spinner { display: block; }
.primary-button.is-loading .button-label { opacity: .7; }

.form-note {
  margin: 1px 0 0;
  color: #91a1a7;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.form-message {
  margin: -6px 0 18px;
  padding: 10px 12px;
  color: var(--error);
  border: 1px solid rgba(182, 71, 75, .18);
  border-radius: 9px;
  background: rgba(182, 71, 75, .06);
  font-size: 12px;
}

.form-message.is-success { color: var(--teal-dark); border-color: rgba(39, 125, 124, .18); background: rgba(39, 125, 124, .07); }

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: auto;
  padding-top: 42px;
  color: #9aa9ad;
  font-size: 11px;
}

.page-footer__mark { color: #b4c0c0; }

.dashboard__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.dashboard__date { margin: 9px 0 0; color: var(--ink-soft); font-size: 12px; }
.text-button { padding: 5px 0; color: var(--teal); border: 0; background: transparent; font-size: 12px; font-weight: 700; }
.text-button:hover { color: var(--teal-dark); }

.welcome-card {
  position: relative;
  min-height: 220px;
  padding: 31px;
  overflow: hidden;
  color: #f6f7ef;
  border-radius: 22px;
  background: var(--navy);
  box-shadow: var(--shadow);
}

.welcome-card__content { position: relative; z-index: 1; }
.welcome-card__label { color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.welcome-card h2 { margin: 19px 0 9px; color: #fffef8; font-size: clamp(29px, 4vw, 42px); }
.welcome-card h2 span { color: var(--gold); }
.welcome-card p { max-width: 310px; margin: 0; color: rgba(246, 247, 239, .7); font-size: 14px; line-height: 1.55; }
.welcome-card__badge { position: absolute; top: 28px; right: 29px; color: var(--gold); font-size: 22px; }
.welcome-card__orb { position: absolute; border: 1px solid rgba(220, 239, 232, .16); border-radius: 50%; }
.welcome-card__orb--one { right: -86px; bottom: -150px; width: 370px; height: 370px; box-shadow: 0 0 0 32px rgba(220, 239, 232, .04); }
.welcome-card__orb--two { right: 30px; top: -130px; width: 230px; height: 230px; border-color: rgba(231, 180, 84, .2); }

.dashboard-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 15px; margin-top: 15px; }
.encouragement-card, .timer-card { min-height: 190px; padding: 23px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255, 254, 250, .64); }
.section-heading { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.section-icon { display: grid; width: 24px; height: 24px; place-items: center; color: var(--gold); border-radius: 7px; background: rgba(231, 180, 84, .14); font-size: 13px; }
.section-icon--blue { color: var(--teal); background: rgba(39, 125, 124, .11); }
.encouragement-word { margin-top: 28px; color: var(--navy); font-family: "Manrope", sans-serif; font-size: clamp(24px, 3vw, 31px); font-weight: 800; letter-spacing: -.07em; }
.encouragement-word.is-bouncing { animation: bounce-word .65s cubic-bezier(.25, .8, .25, 1); }
.encouragement-card p, .timer-card p { margin: 8px 0 0; color: #8a9ba0; font-size: 12px; }
.login-timer { margin-top: 25px; color: var(--teal); font-family: "Manrope", sans-serif; font-size: clamp(35px, 5vw, 48px); font-weight: 800; letter-spacing: -.08em; }
.login-timer.is-ticking { animation: timer-pop .35s ease-out; }
.dashboard-note { display: flex; gap: 15px; margin-top: 29px; color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.dashboard-note__line { display: block; flex: 0 0 30px; height: 1px; margin-top: 9px; background: var(--gold); }
.dashboard-note p { max-width: 370px; margin: 0; }

.portal-section {
  margin-top: 15px;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 254, 250, .64);
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.section-header--stacked { display: block; }
.section-header h3 { margin: 8px 0 0; color: var(--navy); font-family: "Manrope", sans-serif; font-size: 20px; letter-spacing: -.05em; }
.section-description { margin: 7px 0 0; color: #8a9ba0; font-size: 12px; line-height: 1.5; }

.outline-button, .quiet-button {
  min-height: 36px;
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.outline-button { color: var(--teal); border: 1px solid rgba(39, 125, 124, .35); background: transparent; }
.outline-button:hover { color: #fffef8; border-color: var(--teal); background: var(--teal); }
.quiet-button { color: var(--ink-soft); border: 1px solid var(--line); background: transparent; }
.quiet-button:hover { color: var(--ink); border-color: #b9c9c8; background: rgba(219, 229, 228, .3); }

.profile-status {
  margin-top: 15px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 12px;
}

.profile-status.is-success { color: var(--teal-dark); background: rgba(39, 125, 124, .08); }
.profile-status.is-error { color: var(--error); background: rgba(182, 71, 75, .07); }

.profile-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 23px; }
.profile-detail { min-width: 0; }
.profile-detail__label { display: block; margin-bottom: 7px; color: #8a9ba0; font-size: 11px; }
.profile-detail strong { display: block; overflow-wrap: anywhere; color: var(--ink); font-size: 13px; line-height: 1.4; }

.profile-form { margin-top: 23px; }
.profile-form__fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.profile-form .field input { background: var(--paper); }
.profile-form__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.primary-button--compact { min-height: 40px; margin-top: 0; padding: 0 17px; }

.portal-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 15px; margin-top: 15px; }
.portal-grid .portal-section { margin-top: 0; }
.social-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 20px; }
.social-link {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 254, 250, .72);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color .2s, background .2s, transform .2s;
}

.social-link:hover { border-color: var(--teal); background: var(--paper); transform: translateY(-2px); }
.social-link__icon { display: grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; color: #fffef8; border-radius: 8px; font-size: 9px; font-weight: 800; }
.social-link--youtube .social-link__icon { background: #d94b4b; }
.social-link--facebook .social-link__icon { background: #3d65a4; font-family: Arial, sans-serif; font-size: 17px; }
.social-link--tiktok .social-link__icon { background: #1d2932; font-size: 16px; }
.social-link--website .social-link__icon { color: var(--navy); background: var(--gold); font-size: 8px; }
.social-link__arrow { margin-left: auto; color: #91a1a7; font-size: 15px; }

.login-history { display: grid; gap: 0; margin-top: 20px; }
.history-entry { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(219, 229, 228, .75); color: var(--ink-soft); font-size: 12px; }
.history-entry:last-child { border-bottom: 0; }
.history-entry__dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(39, 125, 124, .1); }
.history-entry__time { line-height: 1.4; }
.history-empty { margin: 20px 0 0; color: #8a9ba0; font-size: 12px; }

[hidden] { display: none !important; }

@keyframes rise-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.8); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bounce-word { 0% { opacity: .35; transform: translateY(13px) scale(.97); } 55% { opacity: 1; transform: translateY(-7px) scale(1.02); } 100% { transform: translateY(0) scale(1); } }
@keyframes timer-pop { 50% { transform: translateY(-3px); } }

@media (max-width: 840px) {
  .app-shell { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .content-panel__inner { width: min(100%, 620px); min-height: 100svh; padding-top: 28px; }
  .mobile-brand { display: flex; margin-bottom: 42px; }
}

@media (max-width: 520px) {
  .content-panel__inner { padding: 24px 20px 24px; }
  .mobile-brand { margin-bottom: 34px; }
  .auth-tabs { margin-top: 30px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .portal-grid { grid-template-columns: 1fr; }
  .profile-details, .profile-form__fields { grid-template-columns: 1fr; gap: 15px; }
  .section-header { align-items: stretch; flex-direction: column; gap: 14px; }
  .outline-button { align-self: flex-start; }
  .profile-form__actions { justify-content: stretch; }
  .profile-form__actions button { flex: 1; }
  .social-links { grid-template-columns: 1fr; }
  .welcome-card { min-height: 210px; padding: 25px; }
  .page-footer { flex-direction: column; gap: 6px; padding-top: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}