.account-app {
    min-height: 100vh;
    padding: 24px 0 96px;
}

.account-topbar {
    position: sticky;
    top: 0;
    z-index: 70;
    padding: 12px 0 0;
    margin-bottom: 16px;
}

.account-topbar__inner {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.dark .account-topbar__inner {
    background: rgba(2, 6, 23, 0.88);
}

.account-topbar__back,
.account-topbar__home {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(37, 99, 235, 0.06);
    color: hsl(var(--primary));
    font-size: 1.2rem;
    font-weight: 900;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.account-topbar__back:hover,
.account-topbar__home:hover {
    transform: translateY(-1px);
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
}

.account-topbar__title-wrap {
    min-width: 0;
    text-align: center;
    flex: 1 1 auto;
}

.account-topbar__eyebrow {
    margin: 0;
    color: hsl(var(--muted));
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
}

.account-topbar__title {
    margin: 4px 0 0;
    color: hsl(var(--foreground));
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.3;
}

.account-app__layout {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.account-app__sidebar {
    position: sticky;
    top: 24px;
}

.account-app__content {
    min-width: 0;
}

.account-app--compact {
    padding: 0;
}

.account-app--compact .account-app__layout {
    width: min(100%, calc(100% - 16px));
    min-height: calc(100vh - 32px);
    grid-template-columns: 1fr;
    align-items: start;
    padding-top: 8px;
}

.account-app--compact .account-app__content--compact {
    width: 100%;
    display: flex;
    justify-content: center;
}

.account-app--compact .account-app__sidebar,
.account-app--compact .account-topbar,
.account-app--compact .account-bottom-nav {
    display: none;
}

.account-page-panel,
.account-panel,
.account-card,
.auth-card,
.auth-shell {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.dark .account-page-panel,
.dark .account-panel,
.dark .account-card,
.dark .auth-card,
.dark .auth-shell {
    background: rgba(2, 6, 23, 0.76);
    border-color: rgba(148, 163, 184, 0.12);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.account-sidebar {
    padding: 20px;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.account-user {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.account-user__avatar {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(22, 163, 74, 0.08));
    flex: 0 0 auto;
}

.account-user__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-user__meta {
    min-width: 0;
}

.account-user__meta h2,
.account-user__meta p {
    margin: 0;
}

.account-user__phone {
    margin-top: 4px;
    color: hsl(var(--muted));
    font-size: 0.9rem;
}

.account-user__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.account-user__badges span,
.account-sidebar__status span,
.account-nav__item,
.account-bottom-nav__label,
.auth-meta,
.dashboard-stat__label,
.account-chip {
    font-size: 0.82rem;
}

.account-user__badges span,
.account-sidebar__status span,
.account-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: hsl(var(--primary));
    font-weight: 700;
}

.account-chip.is-active {
    background: rgba(22, 163, 74, 0.1);
    color: #166534;
}

.account-sidebar__status {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
}

.account-sidebar__status > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    border-radius: 20px;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.14);
    min-width: 0;
}

/* Match both status chips to the same size regardless of label length. */
.account-sidebar__status > div span {
    display: flex;
    width: 100%;
    justify-content: center;
    text-align: center;
}

.dark .account-sidebar__status > div {
    background: rgba(15, 23, 42, 0.75);
}

.account-sidebar__status strong {
    display: block;
    margin-top: 0;
    font-size: 0.95rem;
    text-align: center;
    color: hsl(var(--foreground));
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.account-nav__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.74);
    color: hsl(var(--foreground));
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.account-nav__item:hover,
.account-nav__item.is-active {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.24);
    background: rgba(37, 99, 235, 0.08);
}

.account-nav__item.is-active {
    font-weight: 800;
    color: hsl(var(--primary));
}

.account-nav__item.is-danger {
    color: #dc2626;
}

.account-bottom-nav {
    position: fixed;
    inset-inline: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    display: none;
    gap: 8px;
    padding: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.dark .account-bottom-nav {
    background: rgba(2, 6, 23, 0.9);
}

.account-bottom-nav__item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 62px;
    padding: 8px 6px;
    border-radius: 16px;
    color: hsl(var(--muted));
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.account-bottom-nav__item.is-active {
    background: rgba(37, 99, 235, 0.1);
    color: hsl(var(--primary));
    font-weight: 800;
}

.account-bottom-nav__icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.account-bottom-nav__icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.account-bottom-nav__label {
    line-height: 1;
}

.account-page-header,
.account-section,
.account-summary-grid,
.account-grid,
.course-library-grid,
.profile-form-grid,
.stack-form {
    display: grid;
    gap: 16px;
}

.profile-screen,
.analysis-screen,
.metric-screen,
.account-mobile-screen {
    width: 100%;
    max-width: none;
    margin: 0;
    display: grid;
    gap: 14px;
}

.profile-screen__header,
.analysis-screen__header {
    display: none;
}

.profile-screen__title,
.analysis-screen__title {
    margin: 0;
    color: var(--account-text, #111827);
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1.3;
}

.profile-screen__analysis-link,
.analysis-screen__back-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: hsl(var(--primary));
    font-size: 0.82rem;
    font-weight: 800;
}

.analysis-screen__header {
    justify-content: flex-end;
    align-items: center;
}

.analysis-screen__back-link {
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    border-radius: 999px;
    justify-content: center;
    background: transparent;
    color: var(--account-text, #111827);
    font-size: 1.1rem;
    font-weight: 900;
}

.profile-identity-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.dark .profile-identity-card,
.dark .analysis-summary-card,
.dark .analysis-metric-card,
.dark .analysis-chart-card,
.dark .analysis-empty,
.dark .analysis-measurements,
.dark .profile-metric-card,
.dark .profile-blood-card,
.dark .metric-sheet {
    background: rgba(2, 6, 23, 0.82);
    border-color: rgba(148, 163, 184, 0.12);
}

.dark .analysis-summary-card__content strong,
.dark .analysis-summary-card__content p,
.dark .analysis-metric-card__top strong,
.dark .analysis-metric-card__top span,
.dark .analysis-chart-card__head strong,
.dark .analysis-chart-card__head span,
.dark .analysis-empty strong,
.dark .analysis-empty p,
.dark .analysis-filter-field > span,
.dark .analysis-summary-card__ring {
    color: #f8fafc;
}

.profile-identity-card__meta {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.profile-identity-card__label,
.profile-metric-card__label,
.profile-blood-card__label {
    color: hsl(var(--muted));
    font-size: 0.8rem;
    font-weight: 700;
}

.profile-identity-card__meta strong {
    font-size: 0.98rem;
    font-weight: 900;
}

.profile-identity-card__phone {
    color: hsl(var(--foreground));
    font-size: 0.86rem;
    font-weight: 700;
}

.profile-identity-card__avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(37, 99, 235, 0.1);
    flex: 0 0 auto;
}

.profile-identity-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.profile-metric-card,
.profile-blood-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.profile-metric-card--wide,
.profile-blood-card {
    grid-column: 1 / -1;
}

.profile-metric-card__icon,
.profile-blood-card__icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.1);
    color: hsl(var(--primary));
    font-size: 1rem;
    flex: 0 0 auto;
}

.profile-metric-card__content,
.profile-blood-card__content {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.profile-metric-card__value,
.profile-blood-card__value {
    font-size: 0.92rem;
    font-weight: 900;
    color: hsl(var(--foreground));
}

.profile-actions {
    display: grid;
    gap: 10px;
}

.profile-actions__primary,
.profile-actions__secondary {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 99999px;
    font-weight: 800;
}

.profile-actions__primary {
    background: linear-gradient(180deg, #3454d1 0%, #2f4ecc 100%);
    color: #fff;
    box-shadow: 0 16px 28px rgba(47, 78, 204, 0.24);
}

.profile-actions__secondary {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.14);
    color: hsl(var(--primary));
}

.secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: hsl(var(--primary));
    font-size: 0.78rem;
    font-weight: 800;
}

.analysis-filters {
    display: grid;
    gap: 10px;
}

.analysis-select,
.analysis-date {
    width: 100%;
    min-height: 46px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.92);
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    color: hsl(var(--foreground));
    font-weight: 700;
}

.analysis-filters__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.analysis-filters__row--stack {
    grid-template-columns: 1fr;
}

@media (max-width: 767px) {
    .analysis-filters__row {
        grid-template-columns: 1fr;
    }
}

.analysis-filter-field {
    display: grid;
    gap: 6px;
}

.analysis-filter-field > span {
    font-size: 0.82rem;
    font-weight: 700;
    color: hsl(var(--muted-foreground));
}

.analysis-select--native {
    appearance: auto;
    cursor: pointer;
    justify-content: flex-start;
}

.admin-panel-card {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.92);
}

.admin-panel-card__title {
    margin: 0 0 12px;
    font-size: 1rem;
}

.admin-coach-inline-form {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.analysis-summary-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.analysis-summary-card__ring {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 7px solid #43c59e;
    color: hsl(var(--foreground));
    font-size: 0.92rem;
    font-weight: 900;
    flex: 0 0 auto;
}

.analysis-summary-card__content strong {
    display: block;
    font-size: 0.96rem;
    font-weight: 900;
}

.analysis-summary-card__content p,
.analysis-chart-card__head span,
.analysis-empty p {
    margin: 6px 0 0;
    color: hsl(var(--muted));
    font-size: 0.83rem;
    line-height: 1.8;
}

.analysis-metrics {
    display: grid;
    gap: 10px;
}

.analysis-metric-card {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.analysis-metric-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.analysis-metric-card__top strong {
    font-size: 0.92rem;
    font-weight: 900;
}

.analysis-metric-card__top span {
    color: hsl(var(--muted));
    font-size: 0.8rem;
    font-weight: 700;
}

.analysis-metric-card__bar {
    margin-top: 12px;
    width: 100%;
    height: 14px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    overflow: hidden;
}

.analysis-metric-card__bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.analysis-metric-card__bar .tone-green {
    background: #12b981;
}

.analysis-metric-card__bar .tone-yellow {
    background: #fde047;
}

.analysis-chart-card,
.analysis-empty,
.metric-sheet {
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.analysis-chart-card__head {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.analysis-chart-card__head strong {
    font-size: 0.96rem;
    font-weight: 900;
}

.analysis-chart-card__svg {
    width: 100%;
    height: auto;
    margin-top: 10px;
}

.analysis-empty {
    text-align: center;
}

.analysis-empty--chart {
    margin-bottom: 12px;
}

.analysis-formula-badge {
    margin: 0 0 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(52, 84, 209, 0.1);
    color: #3454d1;
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
}

.analysis-measurements {
    display: grid;
    gap: 14px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.analysis-measurements__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.analysis-measurements__head strong {
    font-size: 0.95rem;
    font-weight: 900;
}

.analysis-measurements__head span,
.analysis-measurements__group h3 {
    color: hsl(var(--muted));
    font-size: 0.8rem;
    font-weight: 700;
}

.analysis-measurements__group {
    display: grid;
    gap: 10px;
}

.analysis-measurements__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.analysis-measurements__item {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.analysis-measurements__item span {
    color: hsl(var(--muted));
    font-size: 0.74rem;
    font-weight: 700;
}

.analysis-measurements__item strong {
    font-size: 0.86rem;
    font-weight: 900;
}

.dark .analysis-measurements,
.dark .analysis-formula-badge {
    background: rgba(15, 23, 42, 0.82);
    border-color: rgba(148, 163, 184, 0.28);
    color: #e2e8f0;
}

.dark .analysis-formula-badge {
    color: #7dd3fc;
}

.dark .analysis-measurements__item {
    background: rgba(2, 6, 23, 0.58);
    border-color: rgba(148, 163, 184, 0.22);
}

.dark .analysis-select,
.dark .analysis-date,
.dark .analysis-select--native {
    background: rgba(2, 6, 23, 0.58);
    border-color: rgba(148, 163, 184, 0.32);
    color: #f8fafc;
}

.dark .analysis-measurements__head strong,
.dark .analysis-measurements__head span,
.dark .analysis-measurements__group h3,
.dark .analysis-measurements__item span,
.dark .analysis-measurements__item strong {
    color: #f8fafc;
}

.analysis-empty strong {
    display: block;
    font-size: 0.98rem;
    font-weight: 900;
}

.metric-screen {
    gap: 0;
}

.account-mobile-screen {
    align-content: start;
}

.metric-sheet {
    display: grid;
    gap: 14px;
}

.metric-sheet__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.metric-sheet__header h1 {
    margin: 6px 0 0;
    font-size: 1.15rem;
    font-weight: 900;
}

.metric-sheet__close {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: hsl(var(--foreground));
    font-size: 1.2rem;
    font-weight: 900;
}

.metric-sheet__description {
    margin: 0;
    color: hsl(var(--muted));
    font-size: 0.85rem;
    line-height: 1.9;
}

.metric-sheet__form {
    display: grid;
    gap: 14px;
}

.metric-sheet__submit {
    min-height: 52px;
    border: 0;
    border-radius: 99999px;
    background: linear-gradient(180deg, #3454d1 0%, #2f4ecc 100%);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 16px 28px rgba(47, 78, 204, 0.24);
}

.blood-group-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.blood-group-chip {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.94);
    color: hsl(var(--foreground));
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}

.blood-group-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.blood-group-chip.is-active,
.blood-group-chip:has(input:checked) {
    background: rgba(37, 99, 235, 0.1);
    color: hsl(var(--primary));
    border-color: rgba(37, 99, 235, 0.22);
}

.metric-sheet--blood .metric-sheet__form {
    gap: 18px;
}

.account-page-header {
    margin-bottom: 20px;
    padding: 0 2px;
}

.account-page-header h1,
.account-page-header h2,
.dashboard-title,
.auth-title {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    font-weight: 900;
    color: hsl(var(--foreground));
}

.account-page-header p,
.auth-lead,
.dashboard-lead {
    margin: 0;
    color: hsl(var(--muted));
    line-height: 1.9;
}

.account-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.account-summary-card {
    padding: 18px 20px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(238, 245, 255, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.dark .account-summary-card {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.86));
}

.account-summary-card__label,
.dashboard-stat__label {
    display: block;
    color: hsl(var(--muted));
    font-weight: 700;
}

.account-summary-card__value,
.dashboard-stat__value {
    display: block;
    margin-top: 12px;
    font-size: 1.6rem;
    font-weight: 900;
}

.account-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    margin-top: 20px;
}

.course-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-group--full {
    grid-column: 1 / -1;
}

.account-card,
.account-panel,
.auth-card,
.auth-shell {
    padding: 24px;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 18px;
    align-items: stretch;
}

.dashboard-hero__card {
    padding: 24px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.9), rgba(236, 253, 245, 0.9));
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.dashboard-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 18px;
}

.account-list,
.timeline-list {
    display: grid;
    gap: 12px;
}

.account-list-item,
.timeline-item {
    padding: 16px;
    border-radius: 20px;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.dark .account-list-item,
.dark .timeline-item {
    background: rgba(15, 23, 42, 0.78);
}

.account-list-item__title,
.timeline-item strong {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.account-list-item__meta,
.timeline-item p,
.timeline-item span {
    color: hsl(var(--muted));
    line-height: 1.8;
}

.auth-page {
    background: linear-gradient(180deg, rgba(241, 245, 249, 0.96), rgba(248, 250, 252, 0.98));
}

.auth-main {
    min-height: calc(100vh - 48px);
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 20px;
    padding: 24px 16px 72px;
}

.auth-mobile-main {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
    background: #f3f4f6;
}

.auth-mobile-screen {
    width: min(393px, 100%);
    min-height: min(852px, 100vh);
    display: grid;
    grid-template-rows: auto auto auto 1fr auto;
    gap: 22px;
    padding: 12px 16px 18px;
    background: #fff;
}

.auth-mobile-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.auth-mobile-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    color: #111827;
    font-size: 1.05rem;
    font-weight: 900;
}

.auth-mobile-logo-wrap {
    display: flex;
    justify-content: center;
    padding-top: 24px;
}

.auth-mobile-logo {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    object-fit: cover;
}

.auth-mobile-copy {
    display: grid;
    gap: 8px;
    text-align: center;
    padding: 0 8px;
}

.auth-mobile-eyebrow {
    margin: 0;
    color: #111827;
    font-size: 1.05rem;
    font-weight: 700;
}

.auth-mobile-title {
    margin: 0;
    color: #111827;
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1.3;
}

.auth-mobile-description {
    margin: 0;
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.8;
}

.auth-mobile-form {
    align-self: end;
    display: grid;
    gap: 12px;
}

.auth-mobile-form__stack {
    gap: 12px;
}

.auth-mobile-links {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    text-align: center;
    font-size: 0.82rem;
}

.auth-mobile-links a {
    color: var(--account-brand);
    font-weight: 700;
}

.auth-mobile-screen .field-group {
    gap: 6px;
}

.auth-mobile-screen .form-input,
.auth-mobile-screen .enterprise-input,
.auth-mobile-screen .account-input,
.auth-mobile-screen .auth-input {
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(209, 213, 219, 1);
    background: #fff;
    padding-inline: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.auth-mobile-screen .form-input:focus,
.auth-mobile-screen .enterprise-input:focus,
.auth-mobile-screen .account-input:focus,
.auth-mobile-screen .auth-input:focus {
    border-color: rgba(52, 84, 209, 0.35);
    box-shadow: 0 0 0 4px rgba(52, 84, 209, 0.08);
}

.auth-mobile-primary,
.auth-mobile-secondary {
    width: 100%;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    font-weight: 800;
    font-size: 1rem;
}

.auth-mobile-primary {
    border: 0;
    background: linear-gradient(180deg, #3454d1 0%, #2f4ecc 100%);
    color: #fff;
    box-shadow: 0 16px 28px rgba(47, 78, 204, 0.22);
}

.auth-mobile-secondary {
    border: 1px solid rgba(229, 231, 235, 1);
    background: #fff;
    color: #3454d1;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.auth-brand {
    display: flex;
    justify-content: center;
    width: min(1060px, 100%);
}

.auth-brand__link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.dark .auth-brand__link {
    background: rgba(2, 6, 23, 0.72);
}

.auth-brand__logo {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 14px;
}

.auth-brand__text {
    font-size: 1rem;
    font-weight: 900;
    color: hsl(var(--foreground));
}

.auth-shell {
    width: min(1060px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1fr);
    gap: 24px;
    align-items: center;
}

.auth-shell__hero {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.auth-shell__hero h1 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 3.4rem);
    line-height: 1.12;
    font-weight: 900;
}

.auth-shell__hero p {
    margin: 0;
    color: hsl(var(--muted));
    line-height: 2;
    max-width: 42ch;
}

.auth-shell__chips,
.auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.auth-shell__chips span {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: hsl(var(--foreground));
    font-size: 0.82rem;
    font-weight: 700;
}

.auth-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-card__head h2,
.auth-card h1 {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 900;
}

.auth-card__head p {
    margin: 8px 0 0;
    color: hsl(var(--muted));
    line-height: 1.8;
}

.stack-form {
    gap: 14px;
}

.field-group {
    display: grid;
    gap: 8px;
}

.field-group label {
    font-size: 0.88rem;
    font-weight: 700;
    color: hsl(var(--foreground));
}

.form-input,
.form-textarea,
.enterprise-input,
.account-input,
.auth-input {
    width: 100%;
    height: 48px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.82);
    padding: 0 16px;
    color: hsl(var(--foreground));
}

.form-textarea {
    min-height: 140px;
    height: auto;
    padding-top: 14px;
    padding-bottom: 14px;
    line-height: 1.9;
    resize: vertical;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.36);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.auth-links,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.auth-links {
    justify-content: center;
}

.auth-links a {
    color: hsl(var(--primary));
    font-weight: 700;
}

.form-messages {
    display: grid;
    gap: 10px;
}

.form-message {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(37, 99, 235, 0.08);
    color: hsl(var(--foreground));
}

.form-message.is-error,
.form-message.is-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}

.form-message.is-success {
    background: rgba(22, 163, 74, 0.1);
    color: #166534;
}

.form-message.is-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.empty-state {
    padding: 20px;
    border-radius: 20px;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    background: rgba(248, 250, 252, 0.8);
    text-align: center;
}

.empty-state h3,
.empty-state p {
    margin: 0;
}

.empty-state p {
    margin-top: 8px;
    color: hsl(var(--muted));
}

.otp-timer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: hsl(var(--primary));
    font-size: 0.82rem;
    font-weight: 800;
}

@media (max-width: 1180px) {
    .account-app__layout {
        grid-template-columns: 280px minmax(0, 1fr);
    }

    .account-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-hero,
    .auth-shell,
    .account-grid {
        grid-template-columns: 1fr;
    }

    .course-library-grid,
    .profile-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .account-app {
        padding-top: 12px;
    }

    .account-topbar {
        padding-top: 8px;
        margin-bottom: 12px;
    }

    .account-topbar__inner {
        width: min(100%, calc(100% - 16px));
        padding: 12px 14px;
        border-radius: 20px;
    }

    .account-app__layout {
        width: min(100%, calc(100% - 16px));
        grid-template-columns: 1fr;
    }

    .account-app__sidebar {
        display: none;
    }

    .account-bottom-nav {
        display: flex;
    }

    .auth-main {
        min-height: calc(100vh - 24px);
        padding: 12px 12px 92px;
    }

    .auth-brand__link {
        width: 100%;
        justify-content: center;
    }

    .auth-shell,
    .account-card,
    .account-panel,
    .auth-card {
        padding: 18px;
        border-radius: 24px;
    }

    .account-summary-grid,
    .account-grid {
        grid-template-columns: 1fr;
    }

    .field-group--full {
        grid-column: auto;
    }

    .profile-screen,
    .analysis-screen,
    .metric-screen {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .account-page-header h1,
    .dashboard-title,
    .auth-title {
        font-size: 1.25rem;
    }

    .account-summary-card__value,
    .dashboard-stat__value {
        font-size: 1.35rem;
    }

    .auth-shell__hero h1 {
        font-size: 1.7rem;
    }
}

/* User section refinements (Figma-aligned) */
:root {
    --account-brand: #3454d1;
    --account-brand-dark: #2f4ecc;
    --account-surface: #ffffff;
    --account-muted: #6b7280;
    --account-border: rgba(209, 213, 219, 0.95);
    --account-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.dark .admin-dashboard,
.dark .account-dashboard {
    --account-surface: rgba(15, 23, 42, 0.95);
    --account-border: rgba(148, 163, 184, 0.28);
    --account-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.auth-page .site-shell,
.auth-page .site-content {
    min-height: 100vh;
}

.auth-mobile-frame {
    width: min(393px, 100%);
}

.auth-mobile-status__icons {
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    color: #111827;
}

.profile-metric-card__icon svg,
.profile-identity-card__avatar svg {
    width: 18px;
    height: 18px;
}

.profile-metric-card--blood .profile-metric-card__icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.analysis-desktop-grid {
    display: grid;
    gap: 14px;
}

.analysis-panel {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.analysis-metric-menu {
    display: grid;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid var(--account-border);
    background: var(--account-surface);
    box-shadow: var(--account-shadow);
}

.analysis-metric-menu__item {
    min-height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border: 0;
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    background: transparent;
    color: #111827;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: right;
}

.analysis-metric-menu__item:last-child {
    border-bottom: 0;
}

.dark .analysis-metric-menu {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(148, 163, 184, 0.28);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.dark .analysis-metric-menu__item {
    color: #e2e8f0;
    border-bottom-color: rgba(148, 163, 184, 0.16);
}

.dark .analysis-metric-menu__item:hover {
    background: rgba(14, 165, 233, 0.16);
    color: #7dd3fc;
}

.dark button.analysis-select[data-analysis-metric-toggle],
.dark .analysis-select[data-analysis-metric-toggle] {
    background: rgba(2, 6, 23, 0.72);
    border-color: rgba(148, 163, 184, 0.32);
    color: #f8fafc;
}

.analysis-calendar {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 22px;
    border: 1px solid var(--account-border);
    background: var(--account-surface);
    box-shadow: var(--account-shadow);
}

.analysis-calendar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.analysis-calendar__head strong {
    font-size: 0.95rem;
    font-weight: 900;
}

.analysis-calendar__nav {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    background: rgba(52, 84, 209, 0.1);
    color: var(--account-brand);
    font-size: 1.1rem;
    font-weight: 900;
    line-height: 1;
}

.analysis-calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.analysis-calendar__day {
    min-height: 36px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #111827;
    font-size: 0.82rem;
    font-weight: 700;
}

.analysis-calendar__day.is-in-range {
    background: rgba(52, 84, 209, 0.12);
    color: var(--account-brand);
}

.analysis-calendar__day.is-start,
.analysis-calendar__day.is-end {
    background: var(--account-brand);
    color: #fff;
}

.analysis-calendar__confirm {
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--account-brand) 0%, var(--account-brand-dark) 100%);
    color: #fff;
    font-weight: 800;
}

.analysis-summary-card__ring {
    background:
        radial-gradient(closest-side, #fff 78%, transparent 80% 100%),
        conic-gradient(#43c59e calc(var(--ring-progress, 23) * 1%), rgba(229, 231, 235, 0.95) 0);
}

.analysis-metric-card__bar {
    position: relative;
    display: flex;
    align-items: stretch;
    overflow: visible;
}

.analysis-metric-card__bar span {
    display: block;
    height: 100%;
}

.analysis-metric-card__bar .tone-orange {
    background: #fb923c;
}

.analysis-metric-card__marker {
    position: absolute;
    top: -5px;
    width: 3px;
    height: 22px;
    border-radius: 999px;
    background: #111827;
    transform: translateX(-50%);
}

.metric-screen--modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    width: 100%;
    max-width: none;
    margin: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.metric-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
}

.metric-screen--modal .metric-sheet {
    position: relative;
    z-index: 1;
    width: min(393px, 100%);
    border-radius: 24px 24px 0 0;
    margin: 0;
    box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.18);
}

.metric-screen--modal .metric-sheet__header h1 {
    margin: 0;
    width: 100%;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 900;
}

.metric-screen--modal .metric-sheet__header {
    align-items: center;
}

.metric-screen--modal .metric-sheet__close {
    position: absolute;
    inset-inline-start: 16px;
    top: 16px;
}

.account-bottom-nav__item.is-active {
    background: transparent;
    color: var(--account-muted);
    font-weight: 700;
}

.account-bottom-nav__item.is-active .account-bottom-nav__icon {
    width: 28px;
    height: 28px;
    border-radius: 12px;
    background: rgba(52, 84, 209, 0.12);
    color: var(--account-brand);
}

.account-bottom-nav__item.is-active .account-bottom-nav__label {
    color: var(--account-brand);
    font-weight: 800;
}

@media (min-width: 901px) {
    .auth-mobile-main {
        align-items: center;
        padding: 32px 20px;
        background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
    }

    .auth-mobile-frame,
    .auth-mobile-screen {
        width: min(420px, 100%);
    }

    .auth-mobile-screen {
        min-height: auto;
        border-radius: 28px;
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
        border: 1px solid rgba(148, 163, 184, 0.14);
    }

    .profile-screen,
    .analysis-screen {
        width: 100%;
        max-width: none;
        gap: 18px;
    }

    .profile-screen {
        max-width: 760px;
    }

    .analysis-desktop-grid {
        grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
        align-items: start;
    }

    .analysis-panel--results {
        gap: 16px;
    }

    .metric-screen--modal {
        align-items: center;
        padding: 24px;
    }

    .metric-screen--modal .metric-sheet {
        width: min(440px, 100%);
        border-radius: 24px;
    }
}

@media (min-width: 1180px) {
    .profile-screen {
        max-width: 860px;
    }

    .profile-screen--wide {
        max-width: 1120px;
    }

    .analysis-desktop-grid {
        grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
        gap: 20px;
    }
}

.profile-settings-hub {
    display: grid;
    gap: 10px;
    margin-top: 8px;
}

.profile-settings-hub__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 900;
    color: var(--account-text, #111827);
}

.profile-settings-hub__list {
    display: grid;
    gap: 8px;
}

.profile-settings-hub__item {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    border-radius: 14px;
    background: var(--account-surface, #fff);
    border: 1px solid var(--account-border, rgba(229, 231, 235, 0.95));
    color: var(--account-text, #111827);
    font-weight: 700;
    font-size: 0.88rem;
}

.profile-settings-hub__item::after {
    content: "‹";
    color: var(--account-muted, #6b7280);
}

.profile-settings-hub__item--danger {
    color: #dc2626;
}

.admin-mobile-status,
.auth-mobile-status[aria-hidden="true"] {
    display: none;
}

.account-toast-stack {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.account-toast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--account-border, rgba(229, 231, 235, 0.95));
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
    color: var(--account-text, #111827);
    font-size: 0.86rem;
    font-weight: 700;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.account-toast.is-dismissed {
    opacity: 0;
    transform: translateY(-6px);
}

.account-toast--success {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(240, 253, 244, 0.98);
}

.account-toast--error {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(254, 242, 242, 0.98);
}

.account-toast__close {
    border: 0;
    background: transparent;
    color: var(--account-muted, #6b7280);
    font-size: 1.2rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.profile-screen__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--account-text, #111827);
}

.profile-screen__lead {
    margin: 0;
    color: var(--account-muted, #6b7280);
    font-size: 0.88rem;
    line-height: 1.8;
}

@media (min-width: 901px) {
    .profile-screen__header,
    .analysis-screen__header {
        display: none;
    }
}

.profile-panel-card {
    padding: 14px;
    border-radius: 18px;
    background: var(--account-surface, #fff);
    border: 1px solid var(--account-border, rgba(229, 231, 235, 0.95));
    box-shadow: var(--account-shadow, 0 10px 22px rgba(15, 23, 42, 0.05));
}

@media (min-width: 901px) {
    .profile-settings-hub {
        display: none;
    }
}
