/* Investor Profile - Page-Specific Styles */

/* The `:root` block that stood here redeclared the brand palette with slightly
   different values. Because index.html links every stylesheet on every page, it
   overrode main.css app-wide. All of its tokens now resolve from main.css;
   --color-bg-secondary and --color-border moved there as real additions. */

/* Profile Header */
.profile-header {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding: 2rem;
    background: radial-gradient(circle at top left, rgba(59, 97, 177, 0.2), transparent 60%);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a5f, #3b61b1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 600;
    color: white;
    border: 3px solid rgba(235, 209, 161, 0.3);
    position: relative;
    flex-shrink: 0;
}

.profile-avatar-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    background: var(--color-success);
    border-radius: 50%;
    border: 2px solid var(--color-bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: white;
}

.profile-info {
    flex: 1;
}

.profile-info h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    color: var(--color-text-main);
}

.profile-alias {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.profile-badge {
    padding: 0.35rem 0.75rem;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    color: #60a5fa;
}

.profile-badge.green {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.profile-badge.gold {
    background: rgba(235, 209, 161, 0.15);
    border-color: rgba(235, 209, 161, 0.3);
    color: #ebd1a1;
}

.profile-bio {
    font-size: 0.9rem;
    color: var(--color-text-soft);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.profile-completion {
    margin-top: 1rem;
}

.completion-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.completion-percent {
    color: var(--color-info);
}

.completion-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.completion-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b61b1, #60a5fa);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Desktop / Mobile visibility helpers */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* Profile Tabs - Desktop */
.profile-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.profile-tabs::-webkit-scrollbar {
    display: none;
}

.profile-tab {
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    transition: all 0.2s ease;
    font-family: inherit;
}

.profile-tab:hover {
    color: var(--color-text-main);
}

.profile-tab.active {
    color: var(--color-info);
    border-bottom-color: var(--color-info);
}

/* Card */
.card {
    background: var(--color-bg-panel);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
}

/* Form Sections */
.form-section {
    display: block;
    margin-bottom: 2rem;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: var(--color-gold-soft);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(235, 209, 161, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: block;
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-soft);
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 22, 51, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--color-text-main);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.5);
    background-color: rgba(15, 22, 51, 0.8);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2360a5fa' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.form-select option {
    background: #0a1628;
    color: #e5e7eb;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.35rem;
}

/* Form Checkboxes */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(15, 22, 51, 0.4);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.form-check:hover {
    background: rgba(15, 22, 51, 0.6);
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    margin-top: 0.2rem;
    accent-color: var(--color-info);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.form-check-label {
    flex: 1;
}

.form-check-title {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: var(--color-text-main);
}

.form-check-description {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-info {
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: #60a5fa;
}

.alert-warning {
    background: rgba(235, 209, 161, 0.1);
    border: 1px solid rgba(235, 209, 161, 0.3);
    color: #ebd1a1;
}

.alert strong {
    display: block;
    margin-bottom: 0.25rem;
}

.alert p {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

.mt-2 {
    margin-top: 0.5rem;
}

/* Accreditation Cards */
.accreditation-card {
    padding: 1.25rem;
    background: rgba(15, 22, 51, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.accreditation-card:hover {
    border-color: rgba(96, 165, 250, 0.3);
}

.accreditation-card.selected {
    border-color: var(--color-success);
    background: rgba(34, 197, 94, 0.08);
}

.accreditation-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.accreditation-icon {
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Range Display */
.range-display {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.range-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-info);
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    appearance: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--color-info);
    border-radius: 50%;
    cursor: pointer;
}

/* Experience Tags */
.experience-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.experience-tag {
    padding: 0.5rem 1rem;
    background: rgba(15, 22, 51, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--color-text-soft);
}

.experience-tag:hover {
    border-color: rgba(96, 165, 250, 0.5);
}

.experience-tag.selected {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--color-info);
    color: var(--color-info);
}

/* Tag (for resume) */
.tag {
    padding: 0.35rem 0.75rem;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--color-info);
}

/* Resume Grid - Two column layout */
.resume-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* AI Interview Card */
.ai-interview-card {
    background: radial-gradient(circle at top right, rgba(168, 85, 247, 0.15), transparent 60%);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.ai-interview-icon {
    width: 80px;
    height: 80px;
    background: rgba(168, 85, 247, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1rem;
    border: 2px solid rgba(168, 85, 247, 0.3);
}

.ai-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 1.5rem 0;
}

.topics-list {
    display: grid;
    gap: 0.75rem;
}

.topic-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(15, 22, 51, 0.4);
    border-radius: 8px;
}

.topic-icon {
    font-size: 1.25rem;
}

/* Resume Header Row */
.resume-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.resume-actions {
    display: flex;
    gap: 0.5rem;
}

/* Resume Preview */
.resume-preview {
    background: rgba(15, 22, 51, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
}

.resume-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.resume-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.resume-section-title {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.resume-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.resume-list {
    margin: 0;
    padding-left: 1.25rem;
    line-height: 1.8;
    color: var(--color-text-soft);
}

/* Privacy Toggle */
.privacy-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(235, 209, 161, 0.08);
    border: 1px solid rgba(235, 209, 161, 0.2);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.privacy-toggle-content h4 {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    color: var(--color-text-main);
}

.privacy-toggle-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.toggle-switch.active {
    background: var(--color-success);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-switch.active::after {
    transform: translateX(22px);
}

/* Mobile Accordion Styles */
.mobile-accordions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.accordion-item {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: rgba(15, 22, 51, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
}

.accordion-header:hover {
    background: rgba(15, 22, 51, 0.8);
}

.accordion-header.active {
    background: rgba(59, 130, 246, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.accordion-icon {
    font-size: 1.1rem;
}

.accordion-arrow {
    transition: transform 0.3s ease;
    color: var(--color-text-muted);
}

.accordion-header.active .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 1.25rem;
    background: var(--color-bg-panel);
}

.accordion-content.active {
    display: block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .profile-avatar-large {
        width: 100px;
        height: 100px;
        font-size: 2rem;
    }

    .profile-info {
        text-align: center;
    }

    .profile-badges {
        justify-content: center;
    }

    .profile-actions {
        flex-direction: row;
        width: 100%;
        justify-content: center;
    }

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

    .resume-grid {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .ai-interview-card {
        padding: 1.25rem;
    }

    .ai-interview-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .ai-buttons {
        flex-direction: column;
    }

    .ai-buttons .btn {
        width: 100%;
    }

    .resume-preview {
        padding: 1rem;
    }

    .resume-section {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }

    .resume-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .resume-actions {
        width: 100%;
        flex-direction: column;
    }

    .resume-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Ensure desktop styles at larger screens */
@media (min-width: 769px) {
    .desktop-only {
        display: block !important;
    }

    .mobile-only {
        display: none !important;
    }

    .mobile-accordions {
        display: none !important;
    }
}
