/* ============================================
   GENEVASSKILLS - COMPLETE CSS REBUILD
   ============================================ */

/* CSS Variables - Light Theme */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-light: #adb5bd;

    --primary: #4361ee;
    --primary-hover: #3651d4;
    --primary-light: #e7eafd;

    --success: #06d6a0;
    --success-light: #d4f6ed;
    --danger: #ef476f;
    --danger-light: #fde8ed;

    --border: #dee2e6;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);

    --radius: 0.5rem;
    --radius-sm: 0.25rem;
    --radius-lg: 1rem;

    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
}

/* Dark Theme */
html.dark-theme {
    --bg-primary: #1a1d29;
    --bg-secondary: #242938;
    --bg-tertiary: #2d3348;
    --text-primary: #e9ecef;
    --text-secondary: #adb5bd;
    --text-light: #6c757d;
    --border: #3d4254;
    --primary-light: #2d3348;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

h1,
h2,
h3,
h4 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
header {
    background: var(--bg-primary);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), #5b7cff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-center {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

.nav-right {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
}

.nav-center a,
.nav-right a {
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.nav-center a:hover {
    background: var(--bg-secondary);
}

.btn-logout {
    background: var(--danger);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
}

.btn-logout:hover {
    background: #d63654;
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.theme-toggle:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Cards */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    color: white;
}

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

.btn-secondary:hover {
    background: var(--bg-secondary);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #d63654;
    color: white;
}

.btn-xs {
    padding: 0.2rem 0.5rem;
    font-size: 0.813rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-category {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-count {
    background: var(--danger);
    color: white;
    border-radius: 999px;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 1.25rem;
    text-align: center;
}

/* Forms */
.form-control,
input,
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    transition: border 0.2s;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Profile Layout */
.profile-layout {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.profile-sidebar {
    width: 240px;
    flex-shrink: 0;
}

.sidebar-menu {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.sidebar-item:hover {
    background: var(--bg-secondary);
}

.sidebar-item.active {
    background: var(--primary);
    color: white;
}

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

.sidebar-text {
    font-weight: 500;
}

.sidebar-item .badge-count {
    margin-left: auto;
}

.profile-main {
    flex: 1;
    min-width: 0;
}

.profile-section {
    display: none;
}

.profile-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.profile-info {
    margin-bottom: 1.5rem;
}

.profile-info h3 {
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.profile-block {
    margin-bottom: 1.5rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.project-item {
    padding: 1rem;
}

.project-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

/* Messaging */
.messaging-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
    height: 600px;
}

.conversations-panel,
.chat-panel {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-title {
    padding: 1rem 1.5rem;
    margin: 0;
    border-bottom: 1px solid var(--border);
    font-size: 1.25rem;
}

.conversations-list {
    overflow-y: auto;
    height: calc(100% - 60px);
}

.conversation-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.conversation-item:hover {
    background: var(--bg-secondary);
}

.conv-info {
    flex: 1;
}

.conv-title {
    font-size: 1rem;
    margin: 0 0 0.25rem 0;
}

.conv-with {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.chat-panel {
    display: flex;
    flex-direction: column;
}

.chat-view-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--bg-secondary);
    min-height: 0;
}

.message {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
}

.message p {
    margin: 0 0 0.25rem 0;
    line-height: 1.5;
}

.message small {
    font-size: 0.75rem;
    opacity: 0.8;
}

.message-me {
    align-self: flex-end;
    background: var(--primary);
    color: white;
}

.message-me small {
    color: rgba(255, 255, 255, 0.9);
}

.message-other {
    align-self: flex-start;
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.message-other small {
    color: var(--text-light);
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid var(--border);
    background: var(--bg-primary);
}

.chat-input form {
    display: flex;
    gap: 0.75rem;
}

.chat-input input {
    flex: 1;
}

.text-light {
    color: var(--text-light);
}

.text-muted {
    color: var(--text-secondary);
}

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

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

/* Search Box */
.search-box {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    width: 100%;
}

.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    min-height: 50px;
}

.custom-select-trigger:hover {
    border-color: var(--primary);
}

.custom-select-trigger::after {
    content: '▼';
    font-size: 0.8rem;
    color: var(--text-light);
    margin-left: 0.5rem;
}

.custom-options {
    position: absolute;
    box-shadow: var(--shadow-lg);
}

.custom-select-wrapper.open .custom-options {
    display: block;
}

.custom-select-wrapper.open .custom-select-trigger {
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: var(--primary);
}

.custom-option {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid var(--bg-secondary);
}

.custom-option:last-child {
    border-bottom: none;
}

footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 992px) {
    .search-form {
        grid-template-columns: 1fr 1fr;
    }

    .search-form button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-center {
        flex-direction: column;
        gap: 0.5rem;
    }

    .profile-layout {
        flex-direction: column;
    }

    .profile-sidebar {
        width: 100%;
    }

    .sidebar-menu {
        display: flex;
        overflow-x: auto;
    }

    .sidebar-item {
        flex-direction: column;
        text-align: center;
        min-width: 100px;
    }

    .messaging-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .project-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .search-form {
        grid-template-columns: 1fr;
    }
}