/* ── Account Layout ─────────────────────────────────── */
.account-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: start;
    margin-bottom: 60px;
}

/* ── Profile Card (left) ────────────────────────────── */
.profile-card {
    background: linear-gradient(145deg, var(--primary) 0%, #17357a 100%);
    border-radius: 20px;
    padding: 36px 24px 28px;
    text-align: center;
    color: #fff;
    position: sticky;
    top: 24px;
    box-shadow: 0 12px 32px rgba(10, 28, 78, 0.22);
}

.profile-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 18px;
}

.profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    border: 3px solid rgba(255,255,255,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-brand);
    letter-spacing: 1px;
}

.profile-avatar-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 26px;
    height: 26px;
    background: #27ae60;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
    border: 2px solid #17357a;
}

.profile-name {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-ui);
    margin-bottom: 4px;
}

.profile-email {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 6px;
    word-break: break-all;
}

.profile-since {
    font-size: 11px;
    opacity: 0.55;
    margin-bottom: 24px;
}

.profile-stats {
    display: flex;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.15);
    border-bottom: 1px solid rgba(255,255,255,0.15);
    margin-bottom: 22px;
}

.profile-stat {
    flex: 1;
    padding: 14px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.profile-stat + .profile-stat {
    border-left: 1px solid rgba(255,255,255,0.15);
}

.profile-stat-value {
    font-size: 22px;
    font-weight: 700;
    font-family: var(--font-brand);
}

.profile-stat-label {
    font-size: 11px;
    opacity: 0.65;
}

.profile-courses-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-ui);
    transition: background 0.2s;
    width: 100%;
    justify-content: center;
}

.profile-courses-btn:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* ── Account Cards (right) ──────────────────────────── */
.account-forms {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.account-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    padding: 28px 28px 24px;
}

.account-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.account-card-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    background: rgba(10, 28, 78, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary);
}

.account-card-icon--orange {
    background: rgba(230, 126, 34, 0.1);
    color: #e67e22;
}

.account-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px;
    font-family: var(--font-ui);
}

.account-card-desc {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
}

/* ── Form Elements ──────────────────────────────────── */
.account-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    font-family: var(--font-ui);
}

.form-group input {
    height: 44px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 0 14px;
    font-size: 14px;
    color: var(--text);
    background: var(--surface-muted);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: var(--font-body);
    width: 100%;
    box-sizing: border-box;
}

.form-group input:focus {
    border-color: var(--secondary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 135, 212, 0.12);
}

.form-group input[readonly] {
    color: var(--text-light);
    cursor: not-allowed;
    background: #f0f2f7;
}

.input-readonly-wrap {
    position: relative;
}

.input-readonly-badge {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
    pointer-events: none;
}

.input-password-wrap {
    position: relative;
}

.input-password-wrap input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 14px;
    padding: 0;
    display: flex;
    align-items: center;
}

.toggle-password:hover {
    color: var(--secondary);
}

/* Password Strength */
.password-strength {
    height: 4px;
    border-radius: 999px;
    background: var(--border);
    overflow: hidden;
    transition: 0.3s;
}

.password-strength::after {
    content: '';
    display: block;
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s, background 0.3s;
}

.password-strength[data-level="1"]::after { width: 25%; background: #e74c3c; }
.password-strength[data-level="2"]::after { width: 50%; background: #e67e22; }
.password-strength[data-level="3"]::after { width: 75%; background: #f1c40f; }
.password-strength[data-level="4"]::after { width: 100%; background: #27ae60; }

/* Feedback */
.form-feedback {
    font-size: 13px;
    font-weight: 600;
    min-height: 20px;
    display: none;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    padding: 10px 14px;
}

.form-feedback.visible {
    display: flex;
}

.form-feedback.success {
    background: rgba(39, 174, 96, 0.1);
    color: #1d9165;
}

.form-feedback.error {
    background: rgba(231, 76, 60, 0.1);
    color: #c0392b;
}

/* Buttons */
.account-btn {
    height: 46px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-ui);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    align-self: flex-start;
    padding: 0 24px;
    transition: opacity 0.2s, transform 0.15s;
}

.account-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.account-btn:active {
    transform: translateY(0);
}

.account-btn--orange {
    background: #e67e22;
}

.account-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
    .account-layout {
        grid-template-columns: 1fr;
    }

    .profile-card {
        position: static;
    }

    .profile-stats {
        max-width: 280px;
        margin: 0 auto 22px;
    }
}

@media (max-width: 600px) {
    .account-card {
        padding: 20px 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .account-btn {
        width: 100%;
    }
}
