.auth-page,
.account-page {
    background: #f5f7f8;
    min-height: 620px;
    padding: 70px 0;
}

.auth-card {
    width: min(980px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: .85fr 1fr;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .12);
}

.auth-card-wide {
    width: min(1120px, calc(100% - 32px));
}

.auth-card-small {
    width: min(760px, calc(100% - 32px));
}

.auth-panel {
    background: linear-gradient(135deg, #008f8b, #005f6b);
    color: #fff;
    padding: 54px 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-panel h1 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 14px;
}

.auth-panel p {
    font-size: 1.05rem;
    line-height: 1.55;
    margin: 0;
    color: rgba(255, 255, 255, .88);
}

.auth-icon {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 22px;
}

.auth-form {
    padding: 42px;
}

.auth-form label {
    font-weight: 700;
    color: #1e2b32;
    margin-bottom: 7px;
}

.auth-form input,
.auth-form select {
    width: 100%;
    height: 50px;
    border: 1px solid #d9e2e6;
    border-radius: 8px;
    padding: 0 14px;
    margin-bottom: 18px;
    background: #fff;
}

.auth-form input:focus,
.auth-form select:focus {
    outline: none;
    border-color: #00a19c;
    box-shadow: 0 0 0 3px rgba(0, 161, 156, .14);
}

.auth-form button {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 8px;
    background: #00a19c;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
    margin-top: 8px;
}

.auth-form button:hover {
    background: #008d89;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.auth-row a,
.auth-switch a {
    color: #008f8b;
    font-weight: 800;
    text-decoration: none;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600 !important;
    color: #4c5a62 !important;
    margin: 4px 0 12px;
}

.auth-check input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.auth-switch {
    text-align: center;
    margin: 22px 0 0;
    color: #5d6a72;
}

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

.auth-grid-full {
    grid-column: 1 / -1;
}

.auth-form .iti {
    width: 100%;
    margin-bottom: 18px;
}

.auth-form .iti input {
    margin-bottom: 0;
    padding-left: 88px !important;
}

.auth-form .iti__selected-country {
    border-radius: 8px 0 0 8px;
}

.auth-form .iti__country-list {
    max-width: min(430px, calc(100vw - 42px));
    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, .18);
    z-index: 1200;
}

.verification-code-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.verification-code-grid input {
    height: 58px;
    padding: 0;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0;
}

.account-heading {
    text-align: center;
    margin-bottom: 32px;
}

.account-heading h1 {
    font-size: 2.3rem;
    font-weight: 800;
}

.account-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 26px;
}

.account-grid-dashboard {
    grid-template-columns: 430px 1fr;
    align-items: start;
}

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

.account-alert {
    width: min(960px, 100%);
    margin: 0 auto 22px;
}

.account-box {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
}

.account-box h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 18px;
}

.account-profile-summary {
    display: flex;
    align-items: center;
    gap: 18px;
}

.account-profile-summary h2 {
    margin-bottom: 6px;
}

.account-profile-summary p,
.account-muted {
    color: #5d6a72;
    margin-bottom: 18px;
}

.account-avatar {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #008f8b, #4f9d60);
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    flex: 0 0 auto;
}

.account-detail-row {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #dfe7eb;
}

.account-detail-row:first-of-type {
    border-top: 0;
}

.account-detail-row strong {
    color: #111a20;
}

.account-detail-row span {
    color: #28343b;
    overflow-wrap: anywhere;
}

.account-edit-btn,
.account-save-btn,
.account-cancel-btn,
.account-danger-btn {
    border-radius: 6px;
    min-height: 42px;
    padding: 0 18px;
    font-weight: 700;
}

.account-edit-btn {
    border: 1px solid #d9e2e6;
    background: #fff;
    color: #0070d9;
}

.account-save-btn {
    border: 0;
    background: #00a19c;
    color: #fff;
}

.account-cancel-btn {
    border: 1px solid #d9e2e6;
    background: #fff;
    color: #333;
}

.account-danger-btn {
    border: 1px solid #ff4d4f;
    background: #fff;
    color: #ff3b3f;
}

.account-inline-form {
    display: none;
    margin-top: 16px;
    padding: 18px;
    border: 1px solid #e1e9ed;
    border-radius: 10px;
    background: #f8fbfc;
}

.account-inline-form.is-open {
    display: block;
}

.account-inline-form label {
    display: block;
    font-weight: 700;
    color: #1e2b32;
    margin-bottom: 7px;
}

.account-inline-form input {
    width: 100%;
    height: 48px;
    border: 1px solid #d9e2e6;
    border-radius: 8px;
    padding: 0 14px;
    margin-bottom: 14px;
    background: #fff;
}

.account-inline-form .iti {
    width: 100%;
    margin-bottom: 14px;
}

.account-inline-form .iti input {
    margin-bottom: 0;
    padding-left: 88px !important;
}

.account-form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.account-danger-row form {
    margin: 0;
}

@media (max-width: 900px) {
    .auth-card,
    .account-grid {
        grid-template-columns: 1fr;
    }

    .auth-panel,
    .auth-form {
        padding: 32px 24px;
    }

    .account-detail-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .account-edit-btn,
    .account-danger-btn {
        justify-self: start;
    }
}

@media (max-width: 576px) {
    .auth-grid {
        grid-template-columns: 1fr;
    }

    .auth-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}
