/* ========================================================================
   Profile Page Styles
   ======================================================================== */

header {
    background: var(--brand-navy);
    color: var(--text-on-brand);
    padding: var(--space-4) var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

header a {
    color: oklch(0.70 0.01 250);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: color var(--duration-fast);
}

header a:hover { color: var(--text-on-brand); }

/* Theme toggle in profile header */
header .theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-left: auto;
    padding: var(--space-2) var(--space-4);
    border: 1px solid oklch(1 0 0 / 0.25);
    border-radius: var(--radius-full);
    background: oklch(1 0 0 / 0.08);
    color: oklch(0.92 0.005 250);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: color var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out),
                background var(--duration-fast) var(--ease-out);
}
header .theme-toggle:hover {
    color: var(--text-on-brand);
    border-color: oklch(1 0 0 / 0.40);
    background: oklch(1 0 0 / 0.12);
}
header .theme-toggle .theme-icon {
    font-size: var(--text-lg);
}

header h1 {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex: 1;
}

main {
    max-width: 600px;
    margin: var(--space-7) auto;
    padding: 0 var(--space-5);
}

.card {
    background: var(--bg-raised);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.card h2 {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: var(--lh-tight);
    margin-bottom: var(--space-4);
}

.field {
    margin-bottom: var(--space-3);
}

.field label {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: var(--lh-snug);
    margin-bottom: var(--space-1);
}

.field .value {
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--text);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: var(--lh-snug);
}

.status-badge.ok {
    background: var(--surface-success);
    color: var(--text-success);
}

.status-badge.warn {
    background: var(--surface-warning);
    color: var(--text-warning);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
}

.status-dot.ok { background: var(--brand-green); }
.status-dot.warn { background: var(--brand-orange); }

.warning-box {
    background: var(--surface-warning);
    border: 1px solid oklch(0.72 0.17 70 / 0.25);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    color: var(--text-warning);
    margin-top: var(--space-3);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 700;
    font-family: var(--font-display);
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: opacity var(--duration-fast),
                transform var(--duration-fast) var(--ease-out);
}

.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--brand-blue);
    color: var(--text-on-brand);
}

.btn-secondary {
    background: var(--bg-sunken);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-connected {
    background: var(--surface-success);
    color: var(--text-success);
}

.gitlab-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.identity-row {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    margin-bottom: var(--space-4);
}

.avatar {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-sunken);
}

.avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    background: var(--brand-navy);
    color: var(--text-on-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 0.05em;
}

.identity-text { flex: 1; min-width: 0; }

.identity-name {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.identity-email {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.loading {
    color: var(--text-muted);
    font-style: italic;
}

.error-msg {
    color: var(--brand-red);
    font-size: var(--text-sm);
    margin-top: var(--space-2);
}

/* Phone responsive */
@media (max-width: 480px) {
    header {
        padding: var(--space-3) var(--space-4);
        flex-wrap: wrap;
        gap: var(--space-2);
    }
    header h1 {
        font-size: var(--text-lg);
        flex: unset;
    }
    main {
        margin: var(--space-5) auto;
        padding: 0 var(--space-3);
    }
    .card {
        padding: var(--space-4);
    }
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    .gitlab-section {
        flex-direction: column;
        align-items: flex-start;
    }
}
