/* WORTEX-STUDENTS - Main Stylesheet */
/* Студенческий фриланс без лишней бюрократии */

:root {
    /* Colors */
    --primary: #6D5EF7;
    --primary-light: #8A7CFF;
    --primary-dark: #5648d9;
    --success: #16BDCA;
    --danger: #EF476F;
    --warning: #FFB020;
    
    /* Light Theme */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FC;
    --bg-tertiary: #EEF0F5;
    --text-primary: #151823;
    --text-secondary: #5A6178;
    --text-muted: #8B92A5;
    --border-color: #E2E5ED;
    --card-bg: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    
    /* Spacing */
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0B0E14;
    --bg-secondary: #12161F;
    --bg-tertiary: #1A1F2E;
    --text-primary: #E8ECF2;
    --text-secondary: #A0A8B8;
    --text-muted: #6B7280;
    --border-color: #2A3142;
    --card-bg: #151923;
    --glass-bg: rgba(21, 25, 35, 0.85);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    transition: var(--transition);
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-light);
}

img {
    max-width: 100%;
    height: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary-color { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-sm { max-width: 640px; }
.container-md { max-width: 960px; }


/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 15px rgba(109, 94, 247, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(109, 94, 247, 0.45);
    color: white;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: #151823;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 17px;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-body {
    padding: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

/* Glass Effect */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(109, 94, 247, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    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='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Custom file input */
input[type="file"].form-control {
    padding: 0;
    border: 2px dashed var(--border-color);
    background: var(--bg-secondary);
    cursor: pointer;
    position: relative;
}

input[type="file"].form-control::file-selector-button {
    padding: 14px 20px;
    margin-right: 16px;
    background: var(--primary);
    color: white;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

input[type="file"].form-control::file-selector-button:hover {
    background: var(--primary-dark);
}

input[type="file"].form-control:hover {
    border-color: var(--primary);
}

input[type="file"].form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(109, 94, 247, 0.15);
}

/* File upload zone (drag & drop style) */
.file-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(109, 94, 247, 0.05);
}

.file-upload-zone i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.file-upload-zone p {
    color: var(--text-muted);
    margin-bottom: 8px;
}

.file-upload-zone .btn {
    margin-top: 12px;
}

.file-upload-zone input[type="file"] {
    display: none;
}

.form-hint {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.form-error {
    color: var(--danger);
}

.input-group {
    display: flex;
    gap: 0;
}

.input-group .form-control {
    border-radius: var(--radius) 0 0 var(--radius);
}

.input-group .btn {
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-check input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary { background: rgba(109, 94, 247, 0.15); color: var(--primary); }
.badge-success { background: rgba(22, 189, 202, 0.15); color: var(--success); }
.badge-danger { background: rgba(239, 71, 111, 0.15); color: var(--danger); }
.badge-warning { background: rgba(255, 176, 32, 0.15); color: var(--warning); }
.badge-secondary { background: var(--bg-tertiary); color: var(--text-secondary); }

/* Avatar */
.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 64px; height: 64px; font-size: 24px; }
.avatar-xl { width: 100px; height: 100px; font-size: 36px; }

/* Rating Stars */
.rating {
    display: flex;
    align-items: center;
    gap: 2px;
    color: #FFB020;
}

.rating i { font-size: 14px; }


/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
}

.logo span {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 18px;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius);
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: rgba(109, 94, 247, 0.1);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
}

.notification-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    background: var(--bg-secondary);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
}

.user-menu-toggle:hover {
    background: var(--bg-tertiary);
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.user-menu.active .user-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.user-menu-item:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.user-menu-item i {
    width: 20px;
    color: var(--text-muted);
}

.user-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

@media (max-width: 992px) {
    .nav { display: none; }
    .mobile-menu-btn { 
        display: flex; 
        align-items: center; 
        justify-content: center;
        width: 44px;
        height: 44px;
        background: var(--bg-secondary);
        border: none;
        border-radius: 12px;
        color: var(--text-primary);
        font-size: 1.25rem;
        cursor: pointer;
        transition: var(--transition-fast);
    }
    
    .mobile-menu-btn:hover {
        background: var(--bg-tertiary);
    }
    
    .mobile-menu-btn.active {
        background: var(--danger);
        color: white;
    }
}

/* Hero Section */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(109, 94, 247, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-title span {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 50px;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.hero-stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

/* Search Box */
.search-box {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    max-width: 600px;
}

.search-box form {
    display: flex;
    width: 100%;
}

.search-box .form-control {
    flex: 1;
    border: none;
    background: transparent;
    padding: 18px 24px;
    border-radius: 0;
    min-width: 0;
}

.search-box .form-control:focus {
    box-shadow: none;
}

.search-box .btn {
    border-radius: 0;
    padding: 18px 28px;
    flex-shrink: 0;
}

/* Search box mobile */
@media (max-width: 768px) {
    .search-box {
        border-radius: var(--radius);
    }
    
    .search-box form {
        flex-direction: column;
    }
    
    .search-box .form-control {
        padding: 16px;
        border-radius: var(--radius) var(--radius) 0 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .search-box .btn {
        border-radius: 0 0 var(--radius) var(--radius);
        padding: 14px 20px;
    }
}


/* Section */
.section {
    padding: 80px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.category-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(109, 94, 247, 0.1), rgba(138, 124, 255, 0.1));
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 24px;
    color: var(--primary);
}

.category-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.category-count {
    font-size: 13px;
    color: var(--text-muted);
}

/* Task Cards */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.task-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.task-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.task-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.task-category {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 8px 0;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-title:hover {
    color: var(--primary);
}

.task-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.task-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-meta-item i {
    color: var(--text-muted);
}

.task-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.task-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.task-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-author-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Work Cards (Ready Works) */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.work-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.work-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.work-card-image {
    height: 180px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 48px;
}

.work-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-card-body {
    padding: 20px;
}

.work-card-category {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
    text-transform: uppercase;
}

.work-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 8px 0;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}

.work-card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.work-card-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

/* Executor Cards */
.executors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.executor-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
}

.executor-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.executor-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
}

.executor-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.executor-title {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.executor-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.executor-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    font-size: 13px;
    color: var(--text-secondary);
}

.executor-level {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(109, 94, 247, 0.1);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-top: 12px;
}

.executor-level.expert {
    background: rgba(255, 176, 32, 0.15);
    color: var(--warning);
}

.executor-level.pro {
    background: rgba(22, 189, 202, 0.15);
    color: var(--success);
}


/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.footer-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 14px;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    color: white;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 20px;
}

/* Auth Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header .logo {
    justify-content: center;
    margin-bottom: 24px;
}

.auth-title {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-secondary);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
}

/* Profile Page */
.profile-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    padding: 80px 0 100px;
    color: white;
    position: relative;
}

.profile-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--bg-primary);
    border-radius: 40px 40px 0 0;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    background: var(--bg-primary);
    flex-shrink: 0;
    object-fit: cover;
}

.profile-details {
    flex: 1;
    min-width: 0;
}

.profile-details h1 {
    font-size: 1.75rem;
    margin-bottom: 12px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.profile-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.profile-meta-item i {
    opacity: 0.8;
}

@media (max-width: 600px) {
    .profile-header {
        padding: 60px 0 80px;
    }
    
    .profile-info {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .profile-avatar {
        width: 100px;
        height: 100px;
    }
    
    .profile-details h1 {
        font-size: 1.5rem;
    }
    
    .profile-meta {
        justify-content: center;
    }
}

.profile-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-content {
    padding: 40px 0;
}

.profile-sidebar {
    display: grid;
    gap: 24px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.profile-stat {
    text-align: center;
    padding: 12px 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    min-width: 0;
}

.profile-stat-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.profile-stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    padding: 12px 20px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition-fast);
    font-family: inherit;
    font-size: inherit;
}

.tab:hover {
    color: var(--primary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.filter-group {
    flex: 1;
    min-width: 180px;
}

.filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.filter-group .form-control {
    padding: 10px 14px;
    font-size: 14px;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination-item {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-fast);
}

.pagination-item:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Messages */
.messages-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    height: calc(100vh - 150px);
    min-height: 500px;
}

.conversations-list {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.conversations-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.conversations-items {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-fast);
}

.conversation-item:hover,
.conversation-item.active {
    background: var(--bg-secondary);
}

.conversation-item.unread {
    background: rgba(109, 94, 247, 0.05);
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-name {
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.conversation-preview {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-time {
    font-size: 12px;
    color: var(--text-muted);
}

.chat-area {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
}

.message.sent {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.received {
    align-self: flex-start;
    background: var(--bg-secondary);
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
}

.chat-input {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.chat-input .form-control {
    flex: 1;
}

@media (max-width: 768px) {
    .messages-layout {
        grid-template-columns: 1fr;
    }
}


/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary);
    min-width: 300px;
    max-width: 400px;
}

/* Animated toast in container */
.toast-container .toast {
    animation: slideIn 0.3s ease;
}

/* Static toast (inline info blocks) */
.toast[style*="position: static"],
.toast.static {
    position: static !important;
    min-width: auto;
    max-width: 100%;
    box-shadow: none;
    border: 1px solid var(--border-color);
    animation: none;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

.toast-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
}

.toast.success .toast-icon { background: rgba(22, 189, 202, 0.15); color: var(--success); }
.toast.error .toast-icon { background: rgba(239, 71, 111, 0.15); color: var(--danger); }
.toast.warning .toast-icon { background: rgba(255, 176, 32, 0.15); color: var(--warning); }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--danger);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

/* Admin Panel */
.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 24px 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-nav {
    list-style: none;
}

.admin-nav-item {
    margin-bottom: 4px;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-fast);
}

.admin-nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.admin-nav-link.active {
    background: rgba(109, 94, 247, 0.1);
    color: var(--primary);
    border-right: 3px solid var(--primary);
}

.admin-nav-link i {
    width: 20px;
    text-align: center;
}

.admin-nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 16px 24px;
}

.admin-nav-title {
    padding: 8px 24px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.admin-content {
    padding: 32px;
    background: var(--bg-primary);
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.admin-title {
    font-size: 1.75rem;
    font-weight: 700;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: 24px;
}

.stat-icon.primary { background: rgba(109, 94, 247, 0.15); color: var(--primary); }
.stat-icon.success { background: rgba(22, 189, 202, 0.15); color: var(--success); }
.stat-icon.warning { background: rgba(255, 176, 32, 0.15); color: var(--warning); }
.stat-icon.danger { background: rgba(239, 71, 111, 0.15); color: var(--danger); }

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-info p {
    color: var(--text-muted);
    font-size: 14px;
}

.stat-change {
    font-size: 13px;
    margin-top: 8px;
}

.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.data-table th,
.data-table td {
    padding: 16px 20px;
    text-align: left;
}

.data-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: var(--bg-secondary);
}

.table-actions {
    display: flex;
    gap: 8px;
}

.table-action {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.table-action:hover {
    background: var(--primary);
    color: white;
}

.table-action.danger:hover {
    background: var(--danger);
}

/* Inline Admin Panel */
.inline-admin-panel {
    background: linear-gradient(135deg, rgba(109, 94, 247, 0.1), rgba(138, 124, 255, 0.05));
    border: 1px solid rgba(109, 94, 247, 0.3);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
}

.inline-admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.inline-admin-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.inline-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.inline-admin-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.inline-admin-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.inline-admin-btn.danger:hover {
    border-color: var(--danger);
    color: var(--danger);
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 50%;
    font-size: 32px;
    color: var(--text-muted);
}

.empty-state-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.empty-state-text {
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    text-align: center;
    padding: 60px 0;
}

.cta-title {
    font-size: 2rem;
    margin-bottom: 16px;
    color: white;
}

.cta-text {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-cta {
    background: white;
    color: var(--primary);
}

.btn-cta:hover {
    background: var(--bg-secondary);
    color: var(--primary);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .cta-section { padding: 40px 0; }
    .cta-title { font-size: 1.5rem; }
    .cta-text { font-size: 1rem; padding: 0 16px; }
    .cta-actions { padding: 0 16px; }
    .cta-actions .btn { width: 100%; }
}

/* Error Pages */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}

.error-code {
    font-size: 8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 16px;
}

.error-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.error-text {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Utilities */
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-none { display: none; }
.d-block { display: block; }

.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.p-16 { padding: 16px; }
.p-24 { padding: 24px; }

.text-center { text-align: center; }
.text-right { text-align: right; }

.w-100 { width: 100%; }

/* Notifications Dropdown */
.notifications-menu {
    position: relative;
}

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.notifications-menu.active .notifications-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.notifications-header a {
    font-size: 13px;
    font-weight: 500;
}

.notifications-list {
    flex: 1;
    overflow-y: auto;
    max-height: 340px;
}

.notifications-loading {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
    cursor: pointer;
}

.notification-item:hover {
    background: var(--bg-secondary);
}

.notification-item.unread {
    background: rgba(109, 94, 247, 0.05);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

.notification-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 50%;
    color: var(--text-muted);
    flex-shrink: 0;
}

.notification-icon.success { background: rgba(22, 189, 202, 0.15); color: var(--success); }
.notification-icon.warning { background: rgba(255, 176, 32, 0.15); color: var(--warning); }
.notification-icon.danger { background: rgba(239, 71, 111, 0.15); color: var(--danger); }
.notification-icon.primary { background: rgba(109, 94, 247, 0.15); color: var(--primary); }

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-text {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.notification-time {
    font-size: 12px;
    color: var(--text-muted);
}

.notifications-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.notifications-empty i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

.notifications-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.notifications-footer a {
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 480px) {
    .notifications-dropdown {
        width: 300px;
        right: -60px;
    }
}

/* ==================== RESPONSIVE STYLES ==================== */

/* Tablet (768px - 992px) */
@media (max-width: 992px) {
    .container { padding: 0 16px; }
    
    /* Header */
    .header-inner { padding: 12px 0; }
    .header-actions { gap: 8px; }
    .header-actions .btn { padding: 8px 12px; font-size: 13px; }
    
    /* Hero */
    .hero { padding: 60px 0; }
    .hero-title { font-size: 2.25rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-stats { gap: 32px; }
    
    /* Hero actions - side by side on tablet */
    .hero-actions { 
        display: flex;
        flex-wrap: wrap;
        gap: 12px; 
    }
    .hero-actions .btn { 
        flex: 1 1 auto;
        min-width: 180px;
    }
    
    /* Grids */
    .tasks-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .works-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .executors-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    
    /* Task page layout */
    .task-layout,
    [style*="grid-template-columns: 1fr 360px"] {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }
    
    /* Profile */
    .profile-content > div[style*="grid-template-columns: 300px"] {
        grid-template-columns: 1fr !important;
    }
    .profile-sidebar { order: -1; }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
    /* Prevent horizontal overflow */
    * { max-width: 100%; }
    img, video, iframe { max-width: 100%; height: auto; }
    
    /* Base */
    html { font-size: 15px; }
    .container { padding: 0 16px; max-width: 100%; overflow-x: hidden; }
    .section { padding: 40px 0; }
    .section-title { font-size: 1.5rem; margin-bottom: 20px; }
    
    /* Header */
    .logo span { display: none; }
    .logo-icon { width: 36px; height: 36px; }
    
    /* Hide most header actions on mobile - they're in mobile menu */
    .header-actions .btn-secondary:not(.btn-icon):not(.mobile-menu-btn) { display: none; }
    .header-actions .btn-primary { display: none; }
    .header-actions .notification-btn { display: none; }
    .header-actions .notifications-menu { display: none; }
    .header-actions .user-menu { display: none; }
    
    /* Keep only theme toggle and mobile menu button */
    .header-actions .theme-toggle { 
        width: 40px; 
        height: 40px;
        font-size: 1rem;
    }
    .header-actions .mobile-menu-btn {
        display: flex;
    }
    
    /* Hero */
    .hero { padding: 40px 0; }
    .hero-content { max-width: 100%; }
    .hero-title { font-size: 1.75rem; line-height: 1.3; }
    .hero-subtitle { font-size: 0.95rem; margin-bottom: 24px; }
    
    /* Hero actions - stack on mobile */
    .hero-actions { 
        display: flex;
        flex-direction: column;
        gap: 12px; 
        margin-top: 20px;
    }
    .hero-actions .btn { 
        width: 100%;
        justify-content: center;
    }
    .hero-actions .btn-lg {
        padding: 14px 20px;
    }
    
    /* Hero stats */
    .hero-stats { 
        display: flex;
        flex-wrap: wrap; 
        gap: 16px; 
        justify-content: space-between;
        margin-top: 32px;
    }
    .hero-stat {
        flex: 1;
        min-width: 80px;
    }
    .hero-stat-value { font-size: 1.5rem; }
    .hero-stat-label { font-size: 0.75rem; }
    
    /* Cards */
    .card { border-radius: 12px; overflow: hidden; }
    .card-body { padding: 16px; overflow-x: hidden; word-wrap: break-word; }
    .card-header { padding: 16px; flex-wrap: wrap; gap: 8px; }
    
    /* Grids - single column */
    .tasks-grid,
    .works-grid,
    .executors-grid { 
        grid-template-columns: 1fr; 
        gap: 12px; 
    }
    .categories-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 8px; 
    }
    
    /* Task card */
    .task-card { padding: 16px; }
    .task-card-title { font-size: 1rem; }
    .task-card-footer { flex-wrap: wrap; gap: 8px; }
    
    /* Work card */
    .work-card-image { height: 140px; }
    .work-card-body { padding: 12px; }
    .work-card-title { font-size: 0.9rem; }
    
    /* Executor card */
    .executor-card { padding: 16px; }
    
    /* Category card */
    .category-card { padding: 16px; }
    .category-icon { width: 48px; height: 48px; font-size: 20px; }
    .category-name { font-size: 0.9rem; }
    .category-count { font-size: 0.75rem; }
    
    /* Forms */
    .form-control { padding: 12px 14px; font-size: 16px; }
    .form-label { font-size: 0.85rem; }
    .form-group { margin-bottom: 16px; }
    
    /* Buttons */
    .btn { padding: 12px 20px; font-size: 0.9rem; }
    .btn-lg { padding: 14px 24px; }
    .btn-sm { padding: 8px 12px; font-size: 0.8rem; }
    
    /* Filters */
    .filters { 
        flex-direction: column; 
        gap: 12px; 
    }
    .filter-group { width: 100%; }
    
    /* Tabs */
    .tabs { 
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 4px;
    }
    .tabs::-webkit-scrollbar { display: none; }
    .tab { 
        white-space: nowrap; 
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    /* Profile header */
    .profile-header { padding: 30px 0 40px; }
    .profile-info { 
        flex-direction: column; 
        text-align: center; 
        gap: 16px;
    }
    .profile-avatar { width: 100px; height: 100px; }
    .profile-details h1 { font-size: 1.5rem; }
    .profile-meta { 
        justify-content: center; 
        flex-wrap: wrap;
        gap: 8px;
    }
    .profile-meta-item { font-size: 0.8rem; }
    
    /* Profile stats */
    .profile-stats { gap: 8px; }
    .profile-stat { padding: 10px 6px; min-width: 0; }
    .profile-stat-value { font-size: 1.1rem; }
    .profile-stat-label { font-size: 0.65rem; }
    
    /* Task detail page */
    .task-meta { flex-wrap: wrap; gap: 8px; }
    .task-meta-item { font-size: 0.8rem; }
    
    /* Bids */
    .bid-card { padding: 16px; }
    .bid-header { flex-direction: column; gap: 12px; align-items: flex-start; }
    .bid-amount { font-size: 1.25rem; }
    
    /* Messages */
    .messages-layout { height: calc(100vh - 140px); }
    .conversations-list { max-height: 200px; }
    .message-input { padding: 12px; }
    .message-input textarea { font-size: 16px; }
    
    /* Footer */
    .footer { padding: 40px 0 20px; }
    .footer-grid { 
        grid-template-columns: 1fr 1fr; 
        gap: 24px;
    }
    .footer-brand {
        grid-column: span 2;
        text-align: center;
    }
    .footer-brand .logo {
        justify-content: center;
    }
    .footer-title { text-align: left; }
    .footer-links { text-align: left; }
    .footer-bottom { 
        flex-direction: column; 
        gap: 12px;
        text-align: center;
    }
    
    /* Auth pages */
    .auth-card { 
        padding: 24px; 
        margin: 16px;
        border-radius: 16px;
    }
    .auth-title { font-size: 1.5rem; }
    
    /* Modals */
    .modal-content,
    .task-modal-content { 
        margin: 16px; 
        max-height: calc(100vh - 32px);
        overflow-y: auto;
    }
    
    /* Inline admin panel */
    .inline-admin-panel { margin-bottom: 16px; }
    .inline-admin-actions { 
        flex-wrap: wrap; 
        gap: 6px;
    }
    .inline-admin-btn { 
        padding: 8px 12px; 
        font-size: 0.75rem;
    }
    
    /* Tables */
    .data-table { font-size: 0.8rem; }
    .data-table th,
    .data-table td { padding: 10px 8px; }
    
    /* Pagination */
    .pagination { gap: 4px; }
    .pagination-item { 
        width: 36px; 
        height: 36px; 
        font-size: 0.85rem;
    }
    
    /* Badges */
    .badge { padding: 4px 8px; font-size: 0.7rem; }
    
    /* Toasts */
    .toast-container { 
        top: auto;
        bottom: 12px;
        left: 12px; 
        right: 12px; 
    }
    .toast { 
        padding: 12px 16px; 
        font-size: 0.85rem;
        min-width: auto;
        max-width: 100%;
    }
    
    /* User dropdown */
    .user-menu-dropdown { 
        right: 0; 
        min-width: 200px;
    }
    
    /* Notifications dropdown */
    .notifications-dropdown { 
        position: fixed;
        top: 70px;
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
    }
    
    /* CTA section */
    .cta-section { padding: 40px 20px; }
    .cta-section h2 { font-size: 1.5rem; }
    
    /* FAQ */
    .faq-item { padding: 16px; }
    .faq-question { font-size: 0.95rem; }
    
    /* Forum */
    .forum-topic { padding: 16px; }
    .forum-post { padding: 16px; }
    
    /* Wallet */
    .wallet-balance { font-size: 2rem; }
    .wallet-actions { flex-direction: column; }
    .wallet-actions .btn { width: 100%; }
    
    /* Section header */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .section-header .btn {
        align-self: flex-start;
    }
    
    /* Hide on mobile */
    .hide-mobile { display: none !important; }
}

/* Small mobile (max 480px) */
@media (max-width: 480px) {
    html { font-size: 14px; }
    .container { padding: 0 12px; }
    
    .hero { padding: 32px 0; }
    .hero-title { font-size: 1.4rem; }
    .hero-subtitle { font-size: 0.9rem; }
    .hero-stats { 
        gap: 12px; 
        margin-top: 24px;
    }
    .hero-stat { min-width: 70px; }
    .hero-stat-value { font-size: 1.25rem; }
    
    .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .category-card { padding: 12px; }
    .category-icon { width: 40px; height: 40px; font-size: 18px; margin-bottom: 10px; }
    .category-name { font-size: 0.85rem; }
    
    .profile-avatar { width: 80px; height: 80px; }
    .profile-details h1 { font-size: 1.25rem; }
    
    .auth-card { padding: 20px; margin: 12px; }
    
    .btn { padding: 10px 16px; }
    .btn-lg { padding: 12px 20px; font-size: 0.9rem; }
    
    /* Profile stats */
    .profile-stats { 
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    /* Footer single column on very small screens */
    .footer-grid { 
        grid-template-columns: 1fr; 
    }
    .footer-brand {
        grid-column: span 1;
    }
    .footer-title,
    .footer-links { text-align: center; }
    
    /* Task card compact */
    .task-card { padding: 14px; }
    .task-price { font-size: 1.1rem; }
    
    /* Section */
    .section { padding: 32px 0; }
    .section-title { font-size: 1.25rem; }
}

/* Mobile Menu Overlay - Full Screen */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.mobile-menu-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    flex-shrink: 0;
}

.mobile-menu-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-menu-header .logo span {
    display: inline;
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-menu-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: none;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.mobile-menu-close:hover {
    background: var(--danger);
    color: white;
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--bg-secondary);
    border-radius: 14px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition-fast);
    text-decoration: none;
}

.mobile-menu-link:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
}

.mobile-menu-link.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
}

.mobile-menu-link.active i {
    color: white;
}

.mobile-menu-link i {
    width: 24px;
    font-size: 1.1rem;
    color: var(--text-muted);
    text-align: center;
    flex-shrink: 0;
}

.mobile-menu-link span {
    flex: 1;
}

.mobile-menu-badge {
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.mobile-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 16px 0;
    flex-shrink: 0;
}

.mobile-menu-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.mobile-menu-theme {
    margin-top: 16px;
    flex-shrink: 0;
}

.theme-toggle-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.theme-toggle-mobile:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
}

.theme-toggle-mobile i {
    font-size: 1.1rem;
}

/* Hide mobile menu on desktop */
@media (min-width: 993px) {
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn, 
    .tab, 
    .nav-link,
    .task-card,
    .work-card,
    .executor-card {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Larger touch targets */
    .btn-icon { min-width: 44px; min-height: 44px; }
    .form-check input { width: 20px; height: 20px; }
}

/* CTA Section responsive */
@media (max-width: 768px) {
    section[style*="linear-gradient"] .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    section[style*="linear-gradient"] .hero-actions .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Admin panel responsive - see admin-mobile.css for full mobile styles */

/* Responsive tables */
@media (max-width: 768px) {
    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px;
    }
}

/* Fix for inline styles on index page CTA */
@media (max-width: 768px) {
    section[style*="text-align: center"] h2 {
        font-size: 1.5rem !important;
    }
    
    section[style*="text-align: center"] p {
        font-size: 1rem !important;
    }
}


/* ==================== RESPONSIVE LAYOUT CLASSES ==================== */

/* Page layout with sidebar */
.page-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
}

.page-layout-300 {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 32px;
}

.page-layout-320 {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}

@media (max-width: 992px) {
    .page-layout,
    .page-layout-300,
    .page-layout-320 {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .page-layout-300 > *:first-child {
        order: 1;
    }
}

/* Grid columns */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Button grid - always 2 columns */
.btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* Responsive grid that stacks on mobile */
.grid-responsive-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.grid-responsive-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 600px) {
    .grid-responsive-2,
    .grid-responsive-3 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Flex utilities */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.flex-center {
    display: flex;
    align-items: center;
    gap: 12px;
}

.flex-wrap {
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .flex-between {
        flex-direction: column;
        gap: 12px;
    }
    
    .flex-between.mobile-row {
        flex-direction: row;
    }
}

/* Deal/Task stat boxes */
.stat-boxes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.stat-box {
    text-align: center;
    padding: 20px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.stat-box:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.stat-box-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-box-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-box-value.primary {
    color: var(--primary);
}

.stat-box-value.success {
    color: var(--success);
}

.stat-box-value.warning {
    color: var(--warning);
}

@media (max-width: 768px) {
    .stat-boxes {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-box {
        padding: 16px 12px;
    }
    
    .stat-box-value {
        font-size: 1.25rem;
    }
    
    .stat-box-label {
        font-size: 11px;
    }
}

@media (max-width: 400px) {
    .stat-boxes {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .stat-box {
        padding: 12px 8px;
    }
    
    .stat-box-value {
        font-size: 1.1rem;
    }
}

/* Deal page styles */
.deal-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.deal-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.deal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 600px) {
    .deal-header-top {
        flex-direction: column;
        gap: 16px;
    }
    
    .deal-header-top .btn {
        width: 100%;
        justify-content: center;
    }
    
    .deal-actions {
        flex-direction: column;
    }
    
    .deal-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Wallet balance card */
.wallet-balance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    text-align: center;
}

.wallet-balance-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 4px;
    order: 1;
}

.wallet-balance-item span {
    opacity: 0.8;
    order: 2;
}

@media (max-width: 768px) {
    .wallet-balance-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .wallet-balance-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px;
        background: rgba(255,255,255,0.1);
        border-radius: var(--radius);
        text-align: left;
    }
    
    .wallet-balance-item h3 {
        font-size: 1.5rem;
        margin: 0;
        order: 2;
    }
    
    .wallet-balance-item span {
        order: 1;
    }
}

/* Wallet actions */
.wallet-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .wallet-actions {
        flex-direction: column;
    }
    
    .wallet-actions .btn {
        width: 100%;
    }
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* Theme selector */
.theme-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.theme-option {
    padding: 20px;
    cursor: pointer;
    text-align: center;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition-fast);
}

.theme-option:hover {
    border-color: var(--primary);
}

.theme-option.active {
    border-color: var(--primary);
    background: rgba(109, 94, 247, 0.05);
}

.theme-option input {
    display: none;
}

.theme-option i {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

@media (max-width: 480px) {
    .theme-selector {
        grid-template-columns: 1fr;
    }
    
    .theme-option {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px;
        text-align: left;
    }
    
    .theme-option i {
        margin-bottom: 0;
        font-size: 20px;
    }
}

/* ==================== MODAL RESPONSIVE ==================== */

.deal-modal,
.task-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.deal-modal-content,
.task-modal-content {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.deal-modal-header,
.task-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.deal-modal-header h3,
.task-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.deal-modal-close,
.task-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.deal-modal-close:hover,
.task-modal-close:hover {
    background: var(--danger);
    color: white;
}

.deal-modal-body,
.task-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.deal-modal-footer,
.task-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .deal-modal,
    .task-modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .deal-modal-content,
    .task-modal-content {
        max-width: 100%;
        max-height: 85vh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    }
    
    .deal-modal-footer,
    .task-modal-footer {
        flex-direction: column;
    }
    
    .deal-modal-footer .btn,
    .task-modal-footer .btn {
        width: 100%;
    }
}

/* ==================== MESSAGES MOBILE ==================== */

@media (max-width: 768px) {
    .messages-layout {
        display: block;
        height: auto;
        min-height: auto;
    }
    
    .conversations-list {
        display: none;
        border-radius: var(--radius-lg);
        max-height: none;
        height: auto;
    }
    
    .conversations-list.active {
        display: block;
    }
    
    .chat-area {
        display: none;
        border-radius: var(--radius-lg);
        height: calc(100vh - 180px);
        min-height: 400px;
    }
    
    .chat-area.active {
        display: flex;
    }
    
    /* Back button for mobile chat */
    .chat-back-btn {
        display: flex;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        background: var(--bg-secondary);
        border: none;
        border-radius: 50%;
        color: var(--text-secondary);
        cursor: pointer;
        margin-right: 8px;
        flex-shrink: 0;
    }
    
    .chat-back-btn:hover {
        background: var(--bg-tertiary);
        color: var(--primary);
    }
}

@media (min-width: 769px) {
    .chat-back-btn {
        display: none;
    }
    
    .conversations-list,
    .chat-area {
        display: flex !important;
    }
}

/* ==================== MOBILE CARD VIEW FOR TABLES ==================== */

.mobile-table-cards {
    display: none;
}

.desktop-table {
    display: table;
}

@media (max-width: 768px) {
    .desktop-table {
        display: none !important;
    }
    
    .mobile-table-cards {
        display: block;
    }
    
    .mobile-table-card {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: var(--radius);
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .mobile-table-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .mobile-table-card-title {
        font-weight: 600;
        color: var(--text-primary);
    }
    
    .mobile-table-card-title a {
        color: var(--text-primary);
    }
    
    .mobile-table-card-title a:hover {
        color: var(--primary);
    }
    
    .mobile-table-card-row {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        font-size: 14px;
    }
    
    .mobile-table-card-label {
        color: var(--text-muted);
    }
    
    .mobile-table-card-value {
        font-weight: 500;
        text-align: right;
    }
    
    .mobile-table-card-actions {
        display: flex;
        gap: 8px;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border-color);
    }
    
    .mobile-table-card-actions .btn {
        flex: 1;
        justify-content: center;
    }
}

/* ==================== SAFE AREA FOR iOS ==================== */

@supports (padding: max(0px)) {
    .section {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
    
    .footer {
        padding-bottom: max(30px, env(safe-area-inset-bottom));
    }
    
    .toast-container {
        right: max(20px, env(safe-area-inset-right));
    }
}

/* ==================== PROFILE SIDEBAR MOBILE ==================== */

@media (max-width: 992px) {
    .profile-sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 16px;
    }
    
    .profile-sidebar .card {
        margin-bottom: 0;
    }
}

@media (max-width: 600px) {
    .profile-sidebar {
        grid-template-columns: 1fr;
    }
}

/* ==================== BID CARD MOBILE ==================== */

@media (max-width: 768px) {
    .bid-card {
        padding: 16px;
    }
    
    .bid-card > div:first-child {
        flex-direction: column;
        gap: 16px;
    }
    
    .bid-card .avatar-lg {
        width: 60px;
        height: 60px;
    }
    
    .bid-info {
        width: 100%;
    }
    
    .bid-price {
        text-align: left !important;
        margin-top: 8px;
    }
    
    .bid-actions {
        flex-wrap: wrap;
    }
    
    .bid-actions .btn {
        flex: 1;
        min-width: 120px;
    }
}

/* ==================== FORUM MOBILE ==================== */

@media (max-width: 768px) {
    .forum-category-item {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .forum-category-item > div:last-child {
        text-align: center;
    }
    
    .forum-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==================== FORUM POST ==================== */

.forum-post-layout {
    display: flex;
    gap: 20px;
}

.forum-post-author {
    text-align: center;
    min-width: 100px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.forum-post-author .avatar {
    margin-bottom: 0;
}

.forum-post-author .avatar-frame-wrapper {
    margin-bottom: 8px;
}

.forum-post-author a {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.forum-post-author-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.forum-post-content {
    flex: 1;
    min-width: 0;
    border-left: 1px solid var(--border-color);
    padding-left: 20px;
}

.forum-post-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.forum-post-body {
    line-height: 1.7;
}

@media (max-width: 600px) {
    .forum-post-layout {
        flex-direction: column;
        gap: 16px;
    }
    
    .forum-post-author {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
        min-width: auto;
    }
    
    .forum-post-author .avatar {
        margin-bottom: 0;
    }
    
    .forum-post-content {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--border-color);
        padding-top: 16px;
    }
}

/* ==================== FAQ MOBILE ==================== */

.faq-item {
    border-bottom: 1px solid var(--border-color);
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    background: none;
    border: none;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-fast);
    font-family: inherit;
}

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-question i {
    color: var(--text-muted);
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 12px;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer-content {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    line-height: 1.7;
}

@media (max-width: 768px) {
    .faq-question {
        padding: 16px;
        font-size: 14px;
    }
    
    .faq-answer-content {
        padding: 0 16px 16px;
        font-size: 14px;
    }
}

/* ==================== SHOP PAGE ==================== */

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.shop-balance {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.balance-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.shop-preview {
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: center;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.shop-preview-avatar {
    position: relative;
}

.shop-preview-name {
    font-size: 1.5rem;
    font-weight: 700;
}

.shop-preview-badges {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.shop-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.shop-category-header h3 {
    margin-bottom: 4px;
}

.shop-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.shop-item {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
}

.shop-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.shop-item.purchased {
    border-color: var(--success);
    background: rgba(22, 189, 202, 0.05);
}

.shop-item.equipped {
    border-color: var(--primary);
    background: rgba(109, 94, 247, 0.1);
    box-shadow: 0 0 20px rgba(109, 94, 247, 0.2);
}

.shop-item-preview {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.shop-item-info h4 {
    margin-bottom: 4px;
}

.shop-item-info p {
    font-size: 13px;
    margin-bottom: 8px;
}

.shop-item-duration {
    font-size: 12px;
    color: var(--warning);
}

.shop-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.shop-item-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.shop-item-status {
    font-size: 13px;
    font-weight: 500;
}

.shop-item-status.equipped {
    color: var(--primary);
}

.shop-item-status.owned {
    color: var(--success);
}

.purchases-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.purchase-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

/* ==================== NICKNAME COLORS ==================== */

.nick-gold {
    color: #FFD700 !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.nick-purple {
    color: #9B59B6 !important;
}

.nick-red {
    color: #E74C3C !important;
}

.nick-green {
    color: #2ECC71 !important;
}

.nick-blue {
    color: #3498DB !important;
}

.nick-pink {
    color: #FF69B4 !important;
}

/* ==================== NICKNAME EFFECTS ==================== */

.nick-rainbow {
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
    background-size: 400% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow 3s ease infinite;
}

@keyframes rainbow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.nick-glow {
    color: var(--primary) !important;
    text-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary), 0 0 30px var(--primary);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary); }
    to { text-shadow: 0 0 15px var(--primary), 0 0 25px var(--primary), 0 0 35px var(--primary); }
}

.nick-gradient {
    background: linear-gradient(135deg, var(--primary), var(--success));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== CUSTOM BADGES ==================== */

.custom-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-vip {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
}

.badge-legend {
    background: linear-gradient(135deg, #9B59B6, #8E44AD);
    color: white;
}

.badge-pro {
    background: linear-gradient(135deg, #3498DB, #2980B9);
    color: white;
}

.badge-custom {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.badge-default {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* ==================== AVATAR FRAMES ==================== */

/* Base wrapper for all frames */
.avatar-frame-wrapper {
    position: relative;
    display: inline-block;
    line-height: 0;
    border-radius: 50%;
}

.avatar-frame-wrapper > img,
.avatar-frame-wrapper > .avatar,
.avatar-frame-wrapper > .profile-avatar {
    display: block;
    border-radius: 50%;
}

/* Frame styles using box-shadow on the image itself */
.frame-gold > img,
.frame-gold > .avatar,
.frame-gold > .profile-avatar {
    box-shadow: 0 0 0 4px #FFD700, 0 0 15px rgba(255, 215, 0, 0.6);
}

.frame-fire > img,
.frame-fire > .avatar,
.frame-fire > .profile-avatar {
    box-shadow: 0 0 0 4px #ff6b35, 0 0 15px rgba(255, 107, 53, 0.7), 0 0 30px rgba(247, 147, 30, 0.5);
    animation: fireGlow 1s ease-in-out infinite alternate;
}

@keyframes fireGlow {
    from { box-shadow: 0 0 0 4px #ff6b35, 0 0 10px rgba(255, 107, 53, 0.6); }
    to { box-shadow: 0 0 0 4px #f7931e, 0 0 20px rgba(255, 107, 53, 0.8), 0 0 35px rgba(247, 147, 30, 0.6); }
}

.frame-ice > img,
.frame-ice > .avatar,
.frame-ice > .profile-avatar {
    box-shadow: 0 0 0 4px #00CED1, 0 0 15px rgba(0, 206, 209, 0.7), 0 0 30px rgba(135, 206, 250, 0.4);
}

.frame-rainbow > img,
.frame-rainbow > .avatar,
.frame-rainbow > .profile-avatar {
    box-shadow: 0 0 0 4px #9400d3, 0 0 15px rgba(255, 0, 0, 0.4), 0 0 20px rgba(0, 255, 0, 0.4), 0 0 25px rgba(0, 0, 255, 0.4);
    animation: rainbowGlow 3s linear infinite;
}

@keyframes rainbowGlow {
    0% { box-shadow: 0 0 0 4px #ff0000, 0 0 20px rgba(255, 0, 0, 0.6); }
    17% { box-shadow: 0 0 0 4px #ff7f00, 0 0 20px rgba(255, 127, 0, 0.6); }
    33% { box-shadow: 0 0 0 4px #ffff00, 0 0 20px rgba(255, 255, 0, 0.6); }
    50% { box-shadow: 0 0 0 4px #00ff00, 0 0 20px rgba(0, 255, 0, 0.6); }
    67% { box-shadow: 0 0 0 4px #0000ff, 0 0 20px rgba(0, 0, 255, 0.6); }
    83% { box-shadow: 0 0 0 4px #9400d3, 0 0 20px rgba(148, 0, 211, 0.6); }
    100% { box-shadow: 0 0 0 4px #ff0000, 0 0 20px rgba(255, 0, 0, 0.6); }
}

.frame-neon > img,
.frame-neon > .avatar,
.frame-neon > .profile-avatar {
    box-shadow: 0 0 0 4px var(--primary), 0 0 15px var(--primary), 0 0 30px var(--primary);
    animation: neonGlow 1.5s ease-in-out infinite alternate;
}

@keyframes neonGlow {
    from { box-shadow: 0 0 0 4px var(--primary), 0 0 10px var(--primary); }
    to { box-shadow: 0 0 0 4px var(--primary), 0 0 20px var(--primary), 0 0 40px var(--primary); }
}

/* Small avatar frame for header */
.avatar-frame-wrapper.avatar-frame-sm > img,
.avatar-frame-wrapper.avatar-frame-sm > .avatar {
    box-shadow: inherit;
}

.avatar-frame-wrapper.avatar-frame-sm.frame-neon > img,
.avatar-frame-wrapper.avatar-frame-sm.frame-neon > .avatar {
    box-shadow: 0 0 0 2px var(--primary), 0 0 8px var(--primary);
}

.avatar-frame-wrapper.avatar-frame-sm.frame-gold > img,
.avatar-frame-wrapper.avatar-frame-sm.frame-gold > .avatar {
    box-shadow: 0 0 0 2px #FFD700, 0 0 8px rgba(255, 215, 0, 0.5);
}

/* Preview elements in shop */
.preview-nick {
    font-size: 1.25rem;
    font-weight: 700;
}

.preview-avatar {
    width: 60px;
    height: 60px;
    position: relative;
}

.preview-avatar .avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-muted);
}

/* Shop mobile */
@media (max-width: 768px) {
    .shop-header {
        flex-direction: column;
    }
    
    .shop-balance {
        width: 100%;
        justify-content: center;
    }
    
    .shop-preview {
        flex-direction: column;
        text-align: center;
    }
    
    .shop-items-grid {
        grid-template-columns: 1fr;
    }
    
    .purchase-item {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}



/* ==================== ADVERTISING BLOCKS ==================== */

.ad-block {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 24px 0;
}

.ad-block.ad-hero {
    margin: 0;
    border-radius: 0 0 var(--radius) var(--radius);
}

.ad-link {
    display: block;
    text-decoration: none;
}

.ad-image {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.2s;
}

.ad-link:hover .ad-image {
    opacity: 0.95;
}

.ad-legal {
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 0.8);
    font-size: 10px;
    line-height: 1.3;
    text-align: center;
}

/* Sidebar ad */
.ad-block.ad-sidebar {
    margin: 0 0 24px 0;
}

.ad-block.ad-sidebar .ad-image {
    border-radius: var(--radius) var(--radius) 0 0;
}

/* Between content ad */
.ad-block.ad-between {
    border: 1px solid var(--border-color);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .ad-block {
        margin: 16px 0;
    }
    
    .ad-legal {
        font-size: 9px;
        padding: 4px 8px;
    }
    
    /* Hide sidebar ads on mobile */
    .ad-block.ad-sidebar {
        display: none;
    }
}

/* Dark theme */
[data-theme="dark"] .ad-block {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .ad-legal {
    background: rgba(0, 0, 0, 0.8);
}


/* ==================== FORM ROW (Admin) ==================== */

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Admin grid layout */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 1200px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}
