/* User Area */
.user-area-entrance .small-title,
.user-area-entrance h1,
.user-area-entrance > p:not(.small-title) {
    animation: userAreaIntroEnter 820ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.user-area-entrance h1 {
    animation-delay: 110ms;
}

.user-area-entrance > p:not(.small-title) {
    animation-delay: 210ms;
}

.dashboard-card-entrance {
    animation: userDashboardCardEnter 560ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.dashboard-card-entrance:nth-child(2) {
    animation-delay: 90ms;
}

.stat-card.dashboard-card-entrance:nth-child(1) {
    animation-delay: 180ms;
}

.stat-card.dashboard-card-entrance:nth-child(2) {
    animation-delay: 240ms;
}

.stat-card.dashboard-card-entrance:nth-child(3) {
    animation-delay: 300ms;
}

.profile-edit-card.dashboard-card-entrance {
    animation-delay: 360ms;
}

.dashboard-summary {
    width: min(1120px, 100%);
    margin: 0 auto 66px;
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
    gap: 24px;
    align-items: start;
}

.profile-summary-card {
    background:
        linear-gradient(160deg, var(--white) 0%, var(--white) 72%, var(--green-soft) 72%),
        var(--white);
}

.profile-summary-card h3 {
    margin-top: 8px;
    font-size: clamp(34px, 4vw, 48px);
}

.dashboard-side {
    display: grid;
    gap: 24px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.stat-card {
    min-height: 118px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    background: var(--cream-light);
}

.profile-summary-card,
.stat-card,
.profile-edit-card {
    transition:
        transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dashboard-summary .profile-summary-card:hover,
.dashboard-summary .stat-card:hover,
.dashboard-summary .profile-edit-card:hover {
    transform: translate3d(0, -4px, 0);
}

.stat-card strong {
    color: var(--navy);
    font-size: 30px;
    line-height: 1.05;
}

.stat-card span {
    color: var(--dark-gray);
    font-weight: 500;
}

.profile-edit-card {
    padding: 28px;
}

.profile-edit-card .primary-button {
    margin-top: 20px;
}

.profile-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.profile-list p {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.profile-list p:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.profile-list strong {
    color: var(--navy);
}

.profile-list span {
    max-width: 60%;
    color: var(--dark-gray);
    text-align: right;
}

.personal-dashboard {
    width: min(1120px, 100%);
    margin: 0 auto 66px;
    display: grid;
    grid-template-columns: minmax(320px, 1.15fr) minmax(300px, 0.85fr);
    gap: 24px;
    align-items: start;
}

.dashboard-welcome-card,
.next-event-card,
.quick-actions-card,
.settings-identity-card,
.settings-card {
    padding: 28px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--soft-shadow);
}

.dashboard-welcome-card {
    min-height: 100%;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 22px;
    background:
        linear-gradient(155deg, var(--white) 0%, var(--white) 74%, var(--green-soft) 74%),
        var(--white);
}

.profile-avatar {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--white);
    font-family: var(--font-title);
    font-size: 29px;
    line-height: 1;
    background: var(--navy);
    border: 4px solid var(--white);
    border-radius: 50%;
    box-shadow: var(--soft-shadow);
}

.profile-avatar-large {
    width: 94px;
    height: 94px;
    margin-bottom: 20px;
    font-size: 36px;
    background: var(--green);
}

.dashboard-welcome-card h2,
.settings-identity-card h2 {
    margin: 8px 0 12px;
    font-size: clamp(34px, 4vw, 56px);
}

.dashboard-welcome-card p:not(.card-label),
.next-event-card p,
.quick-actions-card p:not(.card-label) {
    color: var(--dark-gray);
}

.dashboard-welcome-actions {
    margin-top: 22px;
}

.dashboard-overview {
    display: grid;
    gap: 24px;
}

.personal-dashboard .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.next-event-card h3,
.quick-actions-card h3 {
    margin: 8px 0 14px;
    font-size: 30px;
}

.quick-actions-card {
    grid-column: 1 / -1;
}

.dashboard-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.personal-dashboard .dashboard-card-entrance,
.settings-layout .dashboard-card-entrance {
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.personal-dashboard .dashboard-card-entrance:hover {
    transform: translate3d(0, -4px, 0);
}

.settings-layout {
    width: min(1120px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(280px, 0.78fr) minmax(320px, 1.22fr);
    gap: 24px;
    align-items: start;
}

.settings-identity-card {
    position: sticky;
    top: 104px;
}

.settings-identity-card .secondary-button {
    margin-top: 24px;
}

.settings-forms {
    display: grid;
    gap: 24px;
}

.settings-card h2 {
    margin: 8px 0 20px;
    font-size: clamp(30px, 4vw, 44px);
}

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

.settings-card .primary-button {
    justify-self: start;
    margin-top: 8px;
}

.user-dashboard-band {
    padding-top: 42px;
}

.dashboard-shell {
    width: min(1120px, 100%);
    margin: 0 auto 58px;
    display: grid;
    gap: 26px;
}

.dashboard-top {
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.15fr);
    gap: 24px;
    align-items: stretch;
}

.profile-identity-panel,
.next-event-highlight,
.snapshot-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 30px;
    box-shadow: var(--soft-shadow);
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.profile-identity-panel,
.next-event-highlight {
    padding: 28px;
}

.profile-identity-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 22px;
    background:
        linear-gradient(150deg, var(--white) 0%, var(--white) 76%, var(--rose-soft) 76%),
        var(--white);
}

.profile-identity-header {
    display: flex;
    align-items: center;
    gap: 18px;
}

.profile-identity-header h1 {
    margin: 8px 0 10px;
    font-size: clamp(30px, 4vw, 48px);
}

.role-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 11px;
    color: var(--cream);
    font-family: var(--font-subtitle);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    background: var(--navy);
    border-radius: 999px;
}

.profile-detail-grid {
    display: grid;
    gap: 10px;
}

.profile-detail-grid p {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.profile-detail-grid p:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.profile-detail-grid strong {
    color: var(--navy);
}

.profile-detail-grid span {
    max-width: 60%;
    color: var(--dark-gray);
    font-family: var(--font-secondary);
    text-align: right;
}

.next-event-highlight {
    --next-event-accent: var(--category-color, var(--rose));
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 330px;
    background: var(--navy);
    transition: transform var(--transition-normal);
}

.next-event-highlight::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    right: -58px;
    bottom: -60px;
    background: var(--next-event-accent);
    border-radius: 50%;
    opacity: 0.9;
    transform: translate3d(0, 0, 0) scale(1);
    transition:
        transform 1600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.next-event-highlight:hover::after {
    transform: translate3d(-4px, -4px, 0) scale(1.08);
}

.next-event-highlight > * {
    position: relative;
    z-index: 1;
}

.next-event-highlight .card-label,
.next-event-highlight .event-category {
    color: var(--rose);
}

.next-event-highlight h2 {
    max-width: 720px;
    margin: 8px 0 18px;
    color: var(--white);
    font-size: clamp(36px, 5vw, 62px);
}

.next-event-highlight .subtle-text,
.next-event-highlight .registered-event-meta p,
.next-event-highlight .registered-event-meta strong,
.next-event-highlight .registered-event-meta span {
    color: rgba(255, 255, 255, 0.82);
}

.next-event-highlight .next-event-empty-copy {
    max-width: 560px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.55;
}

.next-event-highlight .registered-event-pills span {
    color: var(--navy);
    background: var(--cream);
    border-color: var(--cream);
}

.next-event-highlight .primary-button {
    width: fit-content;
    color: var(--navy);
    background: var(--white);
    border-color: var(--white);
}

.activity-snapshot {
    display: grid;
    gap: 18px;
}

.dashboard-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.dashboard-section-heading h2 {
    margin-top: 6px;
    font-size: clamp(32px, 4vw, 48px);
}

.snapshot-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.snapshot-card {
    min-height: 172px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        linear-gradient(145deg, var(--white) 0%, var(--white) 78%, var(--green-soft) 78%),
        var(--white);
}

.snapshot-card:nth-child(2) {
    background:
        linear-gradient(145deg, var(--white) 0%, var(--white) 78%, var(--rose-soft) 78%),
        var(--white);
}

.snapshot-card:nth-child(3) {
    background:
        linear-gradient(145deg, var(--white) 0%, var(--white) 78%, var(--navy-soft) 78%),
        var(--white);
}

.snapshot-card p {
    color: var(--green);
    font-family: var(--font-subtitle);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.snapshot-card strong {
    margin: 10px 0;
    color: var(--navy);
    font-family: var(--font-title);
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1;
}

.snapshot-card span {
    color: var(--dark-gray);
    font-family: var(--font-secondary);
    font-size: 14px;
    line-height: 1.45;
}

.profile-identity-panel.dashboard-card-entrance,
.next-event-highlight.dashboard-card-entrance,
.snapshot-card.dashboard-card-entrance,
.dashboard-section-heading.dashboard-card-entrance {
    animation-duration: 620ms;
}

.snapshot-card.dashboard-card-entrance:nth-child(1) {
    animation-delay: 140ms;
}

.snapshot-card.dashboard-card-entrance:nth-child(2) {
    animation-delay: 190ms;
}

.snapshot-card.dashboard-card-entrance:nth-child(3) {
    animation-delay: 240ms;
}

.snapshot-card.dashboard-card-entrance:nth-child(4) {
    animation-delay: 290ms;
}

.profile-identity-panel:hover,
.next-event-highlight:hover,
.snapshot-card:hover {
    transform: translate3d(0, -4px, 0);
}

.user-events-title {
    margin-top: 12px;
}

.registered-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 24px;
}

.registered-event-card {
    --event-card-accent: var(--category-color, var(--category-default));
    --event-card-accent-soft: var(--category-soft, var(--category-default-soft));
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 24px;
    background:
        linear-gradient(145deg, var(--white) 0%, var(--white) 82%, var(--event-card-accent-soft) 82%),
        var(--white);
    transition:
        transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 220ms ease-out;
}

.registered-event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.registered-event-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.registered-event-card h3 {
    margin-bottom: 16px;
    color: var(--navy);
    font-size: 28px;
    line-height: 1.05;
}

.registered-event-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.registered-event-pills span {
    padding: 8px 12px;
    color: var(--cream);
    font-family: var(--font-secondary);
    font-size: 13px;
    background: var(--navy);
    border: 1px solid var(--navy);
    border-radius: 999px;
}

.registered-event-meta {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.registered-event-meta p {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 12px;
    color: var(--dark-gray);
    font-family: var(--font-secondary);
    line-height: 1.45;
}

.registered-event-meta strong {
    color: var(--navy);
}

.registered-event-actions {
    margin-top: auto;
}

.past-events-title {
    margin-top: 58px;
}

.past-events-grid {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.past-event-card {
    opacity: 0.92;
    background:
        linear-gradient(145deg, var(--white) 0%, var(--white) 84%, var(--event-card-accent-soft) 84%),
        var(--white);
}

.su-calendar-layout {
    width: min(1120px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
    gap: 24px;
    align-items: start;
}

.calendar-timeline-card {
    padding: 26px;
    background: var(--white);
}

.calendar-timeline {
    margin-top: 18px;
}

.timeline-month-group {
    margin-bottom: 26px;
}

.timeline-month-group:last-child {
    margin-bottom: 0;
}

.timeline-month-events {
    position: relative;
}

.timeline-month-events::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 28px;
    left: 31px;
    width: 2px;
    background: var(--green-soft);
}

.timeline-month {
    margin: 24px 0 14px;
    color: var(--navy);
    font-family: var(--font-subtitle);
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.timeline-month:first-child {
    margin-top: 0;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 16px;
    margin-bottom: 18px;
    color: inherit;
    text-decoration: none;
    border-radius: 22px;
    transition:
        transform 200ms cubic-bezier(0.22, 1, 0.36, 1),
        background-color 200ms ease-out;
}

.timeline-item:hover,
.timeline-item:focus-visible {
    transform: translateX(5px);
    background: var(--cream-light);
}

.timeline-item:hover .timeline-date,
.timeline-item:focus-visible .timeline-date {
    transform: scale(1.04);
    box-shadow: var(--shadow);
}

.timeline-date {
    width: 64px;
    height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: var(--navy);
    border: 4px solid var(--white);
    border-radius: 20px;
    box-shadow: var(--soft-shadow);
    z-index: 1;
    transition:
        transform 200ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 200ms ease-out;
}

.timeline-date span {
    font-family: var(--font-title);
    font-size: 24px;
    line-height: 1;
}

.timeline-date small {
    margin-top: 3px;
    font-family: var(--font-secondary);
    font-size: 11px;
    text-transform: uppercase;
}

.timeline-content {
    padding: 4px 0 0;
}

.timeline-content h4 {
    margin-bottom: 4px;
    color: var(--navy);
    font-family: var(--font-title);
    font-size: 21px;
    line-height: 1.05;
}

.timeline-content p {
    color: var(--dark-gray);
    font-family: var(--font-secondary);
    font-size: 14px;
    line-height: 1.45;
}

.user-calendar-empty {
    width: min(680px, 100%);
    margin: 0 auto;
    padding: 34px;
    text-align: center;
    background: var(--white);
}

.user-calendar-empty h3 {
    margin: 10px 0 12px;
    font-size: clamp(30px, 4vw, 44px);
}

.user-calendar-empty p {
    max-width: 480px;
    margin: 0 auto 22px;
    color: var(--dark-gray);
}

.user-calendar-message {
    width: min(1120px, 100%);
    margin: 0 auto 22px;
    padding: 15px 18px;
    color: var(--navy);
    font-family: var(--font-secondary);
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 8px solid var(--rose);
    border-radius: 18px;
    box-shadow: var(--soft-shadow);
}

.user-calendar-message.is-error {
    border-left-color: var(--rose);
}

@keyframes userAreaIntroEnter {
    from {
        opacity: 0;
        transform: translate3d(0, 10px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes userDashboardCardEnter {
    from {
        opacity: 0;
        transform: translate3d(0, 12px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@media (max-width: 900px) {
    .dashboard-top,
    .snapshot-grid {
        grid-template-columns: 1fr;
    }

    .personal-dashboard,
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-identity-card {
        position: static;
    }

    .su-calendar-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .user-dashboard-band {
        padding-top: 28px;
    }

    .profile-identity-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-detail-grid p {
        flex-direction: column;
        gap: 4px;
    }

    .profile-detail-grid span {
        max-width: none;
        text-align: left;
    }

    .next-event-highlight {
        min-height: 0;
    }

    .dashboard-welcome-card {
        grid-template-columns: 1fr;
    }

    .personal-dashboard .stat-grid {
        grid-template-columns: 1fr;
    }

    .registered-event-meta p {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .timeline-item {
        grid-template-columns: 56px 1fr;
        gap: 12px;
    }

    .timeline-date {
        width: 56px;
        height: 56px;
        border-radius: 18px;
    }

    .timeline-month-events::before {
        left: 27px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .user-area-entrance .small-title,
    .user-area-entrance h1,
    .user-area-entrance > p:not(.small-title),
    .dashboard-card-entrance {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .registered-event-card:hover {
        transform: none !important;
        box-shadow: var(--soft-shadow);
    }

    .dashboard-summary .profile-summary-card:hover,
    .dashboard-summary .stat-card:hover,
    .dashboard-summary .profile-edit-card:hover,
    .personal-dashboard .dashboard-card-entrance:hover,
    .profile-identity-panel:hover,
    .next-event-highlight:hover,
    .snapshot-card:hover,
    .next-event-highlight:hover::after,
    .timeline-item:hover,
    .timeline-item:focus-visible,
    .timeline-item:hover .timeline-date,
    .timeline-item:focus-visible .timeline-date {
        transform: none !important;
    }
}

.performance-mode .next-event-highlight:hover,
.performance-mode .next-event-highlight:hover::after {
    transform: none !important;
}
