/* ===== Profile Page ===== */
.profile-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

/* ===== Header ===== */
.profile-header {
    background: linear-gradient(135deg, #4A3A6B 0%, #6B5B8B 50%, #4A3A6B 100%);
    border-radius: 16px;
    padding: 32px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    color: #fff;
    gap: 24px;
    flex-wrap: wrap;
}

.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 3px solid #D4AF37;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    font-size: 28px;
    font-weight: 700;
    color: #D4AF37;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.profile-email {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

.profile-affiliation {
    font-size: 13px;
    color: #D4AF37;
    margin: 0;
}

.profile-joined {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin: 0;
}

.profile-total-stats {
    display: flex;
    gap: 32px;
}

.total-stat {
    text-align: center;
}

.total-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #D4AF37;
}

.total-stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== Quick Actions ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.quick-action-card {
    background: #fff;
    border: 1px solid #E8E0F0;
    border-radius: 12px;
    padding: 18px 12px;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 1px 4px rgba(74,58,107,0.06);
}

.quick-action-card:hover {
    border-color: #D4AF37;
    box-shadow: 0 4px 14px rgba(74,58,107,0.12);
    transform: translateY(-2px);
}

.quick-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

.quick-label {
    font-size: 13px;
    font-weight: 600;
    color: #4A3A6B;
}

/* ===== Profile Grid ===== */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.profile-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px 28px;
    box-shadow: 0 2px 8px rgba(74,58,107,0.06);
    border: 1px solid #E8E0F0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.card-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: #4A3A6B;
    margin: 0;
}

.card-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #4A3A6B;
    margin: 0;
}

/* ===== Platform Stats ===== */
.platform-stats {
    grid-column: 1 / -1;
}

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

.platform-block {
    background: #FAFAFC;
    border-radius: 10px;
    padding: 16px 20px;
    border: 1px solid #E8E0F0;
}

.platform-name {
    font-size: 13px;
    font-weight: 700;
    color: #4A3A6B;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #E8E0F0;
}

.platform-stats-row {
    display: flex;
    gap: 20px;
}

.pstat {
    text-align: center;
    flex: 1;
}

.pstat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #D4AF37;
}

.pstat-label {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

/* ===== Activity List ===== */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 360px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background 0.15s;
}

.activity-item:hover {
    background: #FAFAFC;
}

.activity-platform {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.platform-ai_studio {
    background: #EDE7F6;
    color: #4A3A6B;
}

.platform-nexus {
    background: #E3F2FD;
    color: #1565C0;
}

.platform-scholars {
    background: #E8F5E9;
    color: #2E7D32;
}

.platform-integrity {
    background: #FFF3E0;
    color: #E65100;
}

.activity-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.activity-action {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.activity-detail {
    font-size: 12px;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-time {
    font-size: 11px;
    color: #aaa;
    white-space: nowrap;
}

.activity-empty {
    text-align: center;
    padding: 40px 20px;
    color: #aaa;
    font-size: 14px;
}

/* ===== Info Display ===== */
.profile-display {
    margin-bottom: 16px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 14px;
    color: #333;
}

/* ===== Compact Form ===== */
.compact-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.compact-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #4A3A6B;
}

.compact-form input,
.compact-form textarea,
.compact-form select {
    padding: 8px 12px;
    border: 1px solid #D4D0E0;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.compact-form input:focus,
.compact-form textarea:focus,
.compact-form select:focus {
    border-color: #D4AF37;
    box-shadow: 0 0 0 2px rgba(212,175,55,0.15);
}

.form-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.button-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.form-message {
    font-size: 12px;
    margin: 0;
    min-height: 18px;
}

.form-message.success {
    color: #2E7D32;
}

.form-message.error {
    color: #C62828;
}

/* ===== Ghost Button ===== */
.ghost-button {
    background: transparent;
    border: 1px solid #D4D0E0;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 12px;
    color: #4A3A6B;
    cursor: pointer;
    transition: all 0.2s;
}

.ghost-button:hover {
    border-color: #D4AF37;
    color: #D4AF37;
}

.ghost-button.compact {
    padding: 4px 12px;
    font-size: 11px;
}

/* ===== Solid Button ===== */
.solid-button {
    background: linear-gradient(135deg, #4A3A6B, #6B5B8B);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.solid-button:hover {
    background: linear-gradient(135deg, #5B4B7B, #7B6B9B);
    box-shadow: 0 2px 8px rgba(74,58,107,0.25);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-avatar-section {
        flex-direction: column;
    }

    .profile-total-stats {
        justify-content: center;
    }

    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .platform-grid {
        grid-template-columns: 1fr;
    }

    .form-two-col {
        grid-template-columns: 1fr;
    }
}
/* ===== Platform Header with Icon ===== */
.platform-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

/* Hand-drawn platform icon base */
.platform-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    flex-shrink: 0;
    border: 2px solid #4A3A6B;
    position: relative;
    background: #F5F0FF;
}

/* Nexus Research icon — magnifying glass over document */
.nr-icon::before {
    content: '';
    position: absolute;
    width: 13px;
    height: 13px;
    border: 2px solid #4A3A6B;
    border-radius: 50%;
    top: 5px;
    left: 7px;
}

.nr-icon::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 9px;
    background: #D4AF37;
    transform: rotate(-45deg);
    top: 16px;
    left: 20px;
    border-radius: 1px;
}

.platform-title-group {
    flex: 1;
    min-width: 0;
}

.platform-desc {
    font-size: 11px;
    color: #999;
    margin: 3px 0 0;
    line-height: 1.4;
}

/* Platform entry button */
.platform-entry-btn {
    display: inline-block;
    margin-top: 14px;
    padding: 7px 18px;
    background: #4A3A6B;
    color: #D4AF37;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #4A3A6B;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.platform-entry-btn:hover {
    background: #D4AF37;
    color: #4A3A6B;
    border-color: #D4AF37;
}

/* Adjust platform-name inside header */
.platform-title-group .platform-name {
    margin: 0 0 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Platform header gets the border instead */
.platform-header {
    padding-bottom: 10px;
    border-bottom: 1px solid #E8E0F0;
}
