/* ============================================================
   account.css — My Account page design system
   Covers: page layout, avatar, tabs, profile form, security
   Follows the same design language as billing.css / reports.css
   ============================================================ */

/* ── Page shell ─────────────────────────────────────────────── */
.account-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 780px;
}

/* ── Avatar block ────────────────────────────────────────────── */
.account-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 32px;
    background: #1a1f2e;
    border: 1px solid #252c3e;
    border-radius: 12px;
}

.account-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c63ff, #48b9ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    user-select: none;
    letter-spacing: 0.5px;
}

.account-hero-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.account-hero-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e8eaf0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-hero-email {
    font-size: 0.85rem;
    color: #8892a4;
}

.account-hero-meta {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.account-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.account-badge--verified {
    background: rgba(72, 200, 140, 0.15);
    color: #48c88c;
    border: 1px solid rgba(72, 200, 140, 0.25);
}

.account-badge--unverified {
    background: rgba(255, 186, 82, 0.15);
    color: #ffba52;
    border: 1px solid rgba(255, 186, 82, 0.25);
}

.account-badge--oauth {
    background: rgba(108, 99, 255, 0.15);
    color: #a79fff;
    border: 1px solid rgba(108, 99, 255, 0.25);
}

.account-member-since {
    font-size: 0.8rem;
    color: #6872a0;
    margin-left: auto;
    align-self: flex-end;
    white-space: nowrap;
}

/* ── Tabs ────────────────────────────────────────────────────── */
.account-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #252c3e;
    padding-bottom: 0;
    margin-bottom: 0;
}

.account-tab-btn {
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #8892a4;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.account-tab-btn:hover {
    color: #c8d0e0;
}

.account-tab-btn.active {
    color: #a79fff;
    border-bottom-color: #6c63ff;
}

/* ── Card sections ───────────────────────────────────────────── */
.account-card {
    background: #1a1f2e;
    border: 1px solid #252c3e;
    border-radius: 12px;
    overflow: hidden;
}

.account-card-header {
    padding: 20px 28px 16px;
    border-bottom: 1px solid #252c3e;
}

.account-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #c8d0e0;
    margin: 0 0 4px;
}

.account-card-sub {
    font-size: 0.8rem;
    color: #6872a0;
    margin: 0;
}

.account-card-body {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Field rows (read-only display) ──────────────────────────── */
.account-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.account-field-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #6872a0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.account-field-value {
    font-size: 0.92rem;
    color: #c8d0e0;
}

.account-field-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ── Inline edit form ────────────────────────────────────────── */
.account-edit-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.account-input {
    width: 100%;
    max-width: 380px;
    padding: 9px 14px;
    background: #0f1320;
    border: 1px solid #2e364d;
    border-radius: 8px;
    color: #c8d0e0;
    font-size: 0.9rem;
    transition: border-color 0.15s;
    outline: none;
    box-sizing: border-box;
}

.account-input:focus {
    border-color: #6c63ff;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

.account-input::placeholder {
    color: #414d66;
}

.account-input-hint {
    font-size: 0.78rem;
    color: #6872a0;
}

.account-btn-row {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.account-btn {
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 7px;
    border: none;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.account-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.account-btn--primary {
    background: #6c63ff;
    color: #fff;
}

.account-btn--primary:not(:disabled):hover {
    background: #7c74ff;
}

.account-btn--ghost {
    background: transparent;
    color: #8892a4;
    border: 1px solid #2e364d;
}

.account-btn--ghost:not(:disabled):hover {
    background: rgba(255,255,255,0.04);
    color: #c8d0e0;
}

.account-edit-trigger {
    font-size: 0.8rem;
    color: #6c63ff;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.account-edit-trigger:hover {
    color: #a79fff;
}

/* ── Alert messages ──────────────────────────────────────────── */
.account-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.45;
}

.account-alert--success {
    background: rgba(72, 200, 140, 0.1);
    border: 1px solid rgba(72, 200, 140, 0.25);
    color: #48c88c;
}

.account-alert--error {
    background: rgba(255, 95, 95, 0.1);
    border: 1px solid rgba(255, 95, 95, 0.25);
    color: #ff6b6b;
}

.account-alert--info {
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.25);
    color: #a79fff;
}

/* ── Password form ───────────────────────────────────────────── */
.account-pwd-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 380px;
}

.account-pwd-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.account-pwd-field label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #8892a4;
}

/* ── Divider ─────────────────────────────────────────────────── */
.account-divider {
    border: none;
    border-top: 1px solid #252c3e;
    margin: 4px 0;
}

/* ── Loading skeleton ────────────────────────────────────────── */
.account-skeleton {
    height: 18px;
    border-radius: 6px;
    background: linear-gradient(90deg, #1a1f2e 25%, #252c3e 50%, #1a1f2e 75%);
    background-size: 200% 100%;
    animation: accountSkeletonAnim 1.4s infinite;
}

@keyframes accountSkeletonAnim {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── OAuth notice ─────────────────────────────────────────────── */
.account-oauth-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(108, 99, 255, 0.08);
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: 10px;
}

.account-oauth-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.account-oauth-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.account-oauth-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #c8d0e0;
}

.account-oauth-desc {
    font-size: 0.8rem;
    color: #8892a4;
    line-height: 1.45;
}
