.account-page {
    padding-top: 72px;
}

.account-auth-wrap {
    max-width: 560px;
    margin: 0 auto;
}

.account-card,
.account-panel,
.account-top-card,
.account-stat-card {
    min-height: auto;
}

.auth-card {
    padding: 32px;
    border-radius: 30px;
}

.account-auth-card-modern {
    position: relative;
    overflow: hidden;
}

.account-auth-card-modern::before,
.account-dashboard-shell::before {
    content: '';
    position: absolute;
    inset: -120px auto auto -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,193,7,.18), rgba(255,193,7,0) 70%);
    pointer-events: none;
}

.auth-icon-orb {
    width: 54px;
    height: 54px;
    margin-bottom: 18px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffe7a3, #ffc107 58%, #9d6f00);
    color: #111;
    font-size: 24px;
    font-weight: 900;
    box-shadow: 0 18px 42px rgba(255,193,7,.22);
}

.account-subtitle {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
    margin: 0 0 22px;
}

.account-alert {
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 193, 7, 0.18);
    background: rgba(255, 193, 7, 0.08);
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
}

.account-alert-error {
    border-color: rgba(211, 47, 47, 0.25);
    background: rgba(211, 47, 47, 0.10);
    color: #ffcdcd;
}

.account-alert-warning {
    border-color: rgba(255, 179, 0, 0.28);
    background: rgba(255, 179, 0, 0.10);
    color: #ffe4a3;
}

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

.compact-form {
    gap: 12px;
}

.account-field {
    display: grid;
    gap: 7px;
}

.account-field label {
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
}

.account-field input {
    width: 100%;
    height: 48px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.10);
    padding: 0 15px;
    font-size: 15px;
    color: var(--text);
    background: rgba(255,255,255,0.025);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.account-field input:focus {
    border-color: rgba(255, 193, 7, 0.45);
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.08);
    background: rgba(255,255,255,0.04);
}

.account-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
}

.account-check input {
    width: 16px;
    height: 16px;
    accent-color: #ffc107;
}

.account-submit {
    width: 100%;
}

.account-meta-links {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 14px;
}

.account-meta-links a {
    color: var(--primary);
    font-weight: 700;
}

.social-auth-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.social-auth-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.social-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 14px;
    border-radius: 17px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.045);
    color: var(--text);
    text-decoration: none;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.social-auth-btn:hover {
    border-color: rgba(255,193,7,.35);
    background: rgba(255,193,7,.065);
    transform: translateY(-1px);
}

.social-auth-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    font-size: 15px;
    font-weight: 950;
    background: #fff;
    color: #111;
}

.social-auth-icon-google { color: #4285f4; }
.social-auth-icon-yandex { color: #fc3f1d; }

.account-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 18px;
    color: var(--text-muted);
    font-size: 13px;
}

.account-divider::before,
.account-divider::after {
    content: '';
    height: 1px;
    flex: 1;
    background: rgba(255,255,255,.08);
}

.account-mail-help {
    margin: 0 0 18px;
    padding: 13px 15px;
    border-radius: 16px;
    color: var(--text-muted);
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    font-size: 14px;
}

.header-logout-form { margin: 0; }
.header-logout-form .btn { cursor: pointer; }

.account-dashboard-shell {
    position: relative;
    display: grid;
    gap: 18px;
}

.account-top-card,
.account-stat-card,
.account-panel {
    border: 1px solid rgba(255,255,255,.08);
    background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.022));
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(14px);
}

.account-top-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px;
    border-radius: 28px;
}

.account-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.account-avatar {
    width: 56px;
    height: 56px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 56px;
    color: #111;
    font-weight: 900;
    font-size: 24px;
    background: linear-gradient(135deg, #ffe7a3, #ffc107 58%, #9d6f00);
    box-shadow: 0 18px 42px rgba(255,193,7,.18);
}

.account-user-chip h1 {
    margin: 0 0 4px;
    font-size: clamp(22px, 3vw, 34px);
    letter-spacing: -0.04em;
}

.account-user-chip p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.account-top-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.account-status-pill {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.035);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.account-status-pill i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ffb300;
    box-shadow: 0 0 16px rgba(255, 179, 0, .6);
}

.account-status-pill.is-ok i {
    background: #30d158;
    box-shadow: 0 0 16px rgba(48, 209, 88, .6);
}

.account-usage-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.account-stat-card {
    min-width: 0;
    padding: 16px;
    border-radius: 24px;
}

.account-stat-card.is-accent {
    border-color: rgba(255,193,7,.22);
    background: linear-gradient(180deg, rgba(255,193,7,.13), rgba(255,255,255,.025));
}

.account-stat-card span,
.account-panel-head span {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.account-stat-card strong {
    display: block;
    color: var(--text);
    font-size: clamp(20px, 2.4vw, 28px);
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.account-stat-card small {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 12px;
}

.account-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(300px, .82fr);
    gap: 18px;
    align-items: start;
}

.account-panel-stack {
    display: grid;
    gap: 18px;
}

.account-panel {
    padding: 20px;
    border-radius: 28px;
}

.account-panel-small {
    padding: 18px;
}

.account-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.account-panel-head.compact {
    margin-bottom: 12px;
}

.account-panel-head h2 {
    margin: 0;
    font-size: clamp(20px, 2.2vw, 28px);
    letter-spacing: -0.03em;
}

.account-panel-head small {
    color: var(--text-muted);
    white-space: nowrap;
}

.forecast-history-list {
    display: grid;
    gap: 10px;
}

.forecast-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.026);
    color: var(--text);
    text-decoration: none;
    transition: border-color .2s ease, transform .2s ease, background .2s ease;
}

.forecast-history-item:hover {
    border-color: rgba(255,193,7,.35);
    background: rgba(255,193,7,.045);
    transform: translateY(-1px);
}

.forecast-history-main {
    min-width: 0;
}

.forecast-history-item strong,
.forecast-history-item small {
    display: block;
}

.forecast-history-item strong {
    font-size: 15px;
}

.forecast-history-item strong em {
    font-style: normal;
    margin-left: 6px;
    color: var(--primary);
}

.forecast-history-item small {
    color: var(--text-muted);
    margin-top: 4px;
    font-size: 12px;
}

.forecast-history-meta {
    color: var(--primary);
    font-weight: 850;
    white-space: nowrap;
    font-size: 13px;
}

.account-empty-state {
    padding: 26px;
    border-radius: 24px;
    text-align: center;
    background: rgba(255,255,255,.026);
    border: 1px solid rgba(255,255,255,.07);
}

.account-empty-state > div {
    font-size: 34px;
    margin-bottom: 10px;
}

.account-empty-state h3 {
    margin: 0 0 8px;
}

.account-empty-state p {
    margin: 0;
    color: var(--text-muted);
}

.account-pagination {
    margin-top: 16px;
}

@media (max-width: 1080px) {
    .account-usage-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .account-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .account-page {
        padding-top: 52px;
    }

    .account-top-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .account-top-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .account-usage-strip,
    .social-auth-grid--two {
        grid-template-columns: 1fr;
    }

    .forecast-history-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .forecast-history-meta {
        white-space: normal;
    }

    .account-meta-links {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-logout-form,
    .header-logout-form .btn {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .auth-card,
    .account-top-card,
    .account-panel,
    .account-stat-card {
        border-radius: 22px;
    }

    .auth-card,
    .account-panel {
        padding: 18px;
    }

    .account-user-chip {
        align-items: flex-start;
    }
}
