/* ============================================
   CAMPUS CONNECT - Professional Design System
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

/* ============================================
   CSS Variables / Design Tokens
   ============================================ */
:root {
    /* Primary Colors */
    --primary: #502868;
    --primary-dark: #3d1e4f;
    --primary-light: #a484bd;
    
    /* Accent Colors */
    --accent: #fbd063;
    --accent-dark: #e5bb4d;
    
    /* Brand Colors */
    --cream: #fff0d6;
    --beige: #efeee6;
    --gray-brand: #c7c5c2;
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #efeee6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #c7c5c2;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* Container */
    --container-max: 1280px;
    --container-padding: 24px;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

ul, ol {
    list-style: none;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Layout Components
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: 80px 0;
}

.section-sm {
    padding: 48px 0;
}

.section-lg {
    padding: 120px 0;
}

/* ============================================
   Header / Navigation
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    transition: box-shadow var(--transition-base);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 32px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Navigation Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--gray-700);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.nav-dropdown .dropdown-arrow {
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown:hover .nav-link {
    color: var(--primary);
    background: var(--gray-50);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--gray-200);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--gray-700);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.nav-dropdown-item:hover {
    background: var(--gray-50);
    color: var(--primary);
}

.nav-dropdown-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--gray-700);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary);
    background: var(--gray-50);
}

.nav-link.active {
    color: var(--primary);
    background: rgba(80, 40, 104, 0.08);
}

/* Search Bar */
.search-form {
    flex: 1;
    max-width: 400px;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 44px;
    font-size: 0.9375rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-full);
    background: var(--gray-50);
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(80, 40, 104, 0.1);
}

.search-input::placeholder {
    color: var(--gray-400);
}

.search-icon {
    position: absolute;
    left: 16px;
    color: var(--gray-400);
    pointer-events: none;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Clean Header Actions Design */
.header-actions-clean {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 16px;
}

.header-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--gray-700);
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.header-icon-btn:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.header-icon-btn svg {
    transition: transform 0.2s ease;
}

.header-icon-btn:hover svg {
    transform: scale(1.1);
}

/* User Avatar Header */
.user-avatar-header {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: transform 0.2s ease;
}

.header-icon-btn:hover .user-avatar-header {
    transform: scale(1.05);
}

/* Header Badge */
.header-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.header-badge.pulse {
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Legacy Icon Actions Group (for mobile compatibility) */
.icon-actions-group {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px;
    background: rgba(80, 40, 104, 0.03);
    border-radius: 14px;
    border: 1px solid rgba(80, 40, 104, 0.08);
}

.icon-btn-enhanced {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--gray-600);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    text-decoration: none;
    gap: 4px;
}

.icon-btn-enhanced:hover {
    color: var(--primary);
    background: rgba(80, 40, 104, 0.08);
    transform: translateY(-2px);
}

.icon-btn-enhanced:active {
    transform: translateY(0);
}

.icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-label {
    font-size: 11px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.02em;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.icon-btn-enhanced:hover .icon-label {
    opacity: 1;
}

/* User Avatar Mini */
.user-avatar-mini {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 2px 8px rgba(80, 40, 104, 0.25);
    transition: transform 0.3s ease;
}

.icon-btn-enhanced:hover .user-avatar-mini {
    transform: scale(1.1);
}

/* Enhanced Notification Badge */
.notification-badge-enhanced {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.4), 0 0 0 3px white;
    animation: badgePop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.notification-badge-enhanced.pulse {
    animation: badgePop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55), badgePulse 2s ease-in-out 0.5s infinite;
}

@keyframes badgePop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 3px 8px rgba(239, 68, 68, 0.4), 0 0 0 3px white;
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 3px 12px rgba(239, 68, 68, 0.6), 0 0 0 3px white, 0 0 0 6px rgba(239, 68, 68, 0.2);
    }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid rgba(80, 40, 104, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    z-index: 1000;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    animation: slideUpNav 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUpNav {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 8px 4px;
    color: var(--gray-500);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    gap: 4px;
}

.mobile-nav-item span {
    font-size: 11px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.mobile-nav-item svg {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.mobile-nav-item:active svg {
    transform: scale(0.9);
}

.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    border-radius: 0 0 3px 3px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        height: 0;
        opacity: 0;
    }
    to {
        height: 3px;
        opacity: 1;
    }
}

.mobile-nav-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 9px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.mobile-badge.pulse {
    animation: badgePulse 2s ease-in-out infinite;
}

.user-avatar-mobile {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

/* Old icon-btn kept for backwards compatibility */

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--gray-600);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.icon-btn:hover {
    color: var(--primary);
    background: var(--gray-100);
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid white;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.notification-badge-mobile {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 1101;
}

.mobile-menu-toggle span {
    display: block;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-accent {
    background: var(--accent);
    color: var(--gray-900);
    border-color: var(--accent);
}

.btn-accent:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-700);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.btn-white {
    background: var(--white);
    color: var(--primary);
    border-color: var(--white);
}

.btn-white:hover {
    background: var(--gray-100);
    border-color: var(--gray-100);
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
}

.card:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-image {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--gray-100);
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--white);
    color: var(--primary);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* ============================================
   Form Elements
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.9375rem;
    font-family: inherit;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: var(--white);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(80, 40, 104, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--gray-400);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-hint {
    margin-top: 6px;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.form-error {
    color: var(--error);
}

/* ============================================
   Alerts & Messages
   ============================================ */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    margin-bottom: 20px;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ============================================
   Badge
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge-primary {
    background: rgba(80, 40, 104, 0.1);
    color: var(--primary);
}

.badge-success {
    background: #ecfdf5;
    color: #065f46;
}

.badge-warning {
    background: #fffbeb;
    color: #92400e;
}

/* ============================================
   Grid System
   ============================================ */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.grid-auto {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ============================================
   Auth Pages
   ============================================ */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 48px 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--gray-500);
    margin-bottom: 0;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
    font-size: 0.9375rem;
    color: var(--gray-500);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   Marketplace Layout
   ============================================ */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 48px 0;
    color: var(--white);
}

.page-header h1 {
    color: var(--white);
    margin-bottom: 8px;
}

.page-header p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
    font-size: 1.125rem;
}

.filters-bar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 16px 0;
    position: sticky;
    top: 72px;
    z-index: 100;
}

.filters-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 8px 32px 8px 12px;
    font-size: 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: var(--white);
    cursor: pointer;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 32px 0;
}

.listing-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
}

.listing-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.listing-card a {
    display: block;
}

.listing-image {
    aspect-ratio: 4/3;
    background: var(--gray-100);
    position: relative;
    overflow: hidden;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-info {
    padding: 16px;
}

.listing-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-900);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.listing-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.listing-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray-400);
    font-size: 3rem;
}

/* ============================================
   Messages Layout
   ============================================ */
.messages-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 0;
    min-height: calc(100vh - 72px);
    background: var(--white);
    border-top: 1px solid var(--gray-200);
}

.messages-sidebar {
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.messages-sidebar h2 {
    padding: 24px 20px;
    margin: 0;
    font-size: 1.5rem;
    color: var(--gray-900);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 10px;
}

.messages-sidebar h2 .badge {
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
}

.messages-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
}

.no-conversations {
    padding: 60px 20px;
    text-align: center;
    color: var(--gray-500);
}

.conversation-item {
    display: block;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    text-decoration: none;
    color: inherit;
    transition: background var(--transition-fast);
    position: relative;
}

.conversation-item:hover {
    background: var(--gray-50);
}

.conversation-item.active {
    background: rgba(80, 40, 104, 0.05);
}

.conversation-item.unread {
    background: rgba(80, 40, 104, 0.03);
}

.conversation-user {
    margin-bottom: 8px;
}

.conversation-user strong {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.conversation-user small {
    color: var(--gray-500);
    font-size: 0.8125rem;
}

.conversation-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.conversation-preview p {
    flex: 1;
    margin: 0;
    font-size: 0.875rem;
    color: var(--gray-600);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-preview .timestamp {
    font-size: 0.75rem;
    color: var(--gray-400);
    white-space: nowrap;
}

.unread-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.messages-content {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
}

.no-conversation-selected {
    text-align: center;
    color: var(--gray-400);
    font-size: 1.125rem;
}

.conversation-list {
    padding: 8px;
}

.conversation-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--gray-600);
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-name {
    font-weight: 600;
    font-size: 0.9375rem;
}

.conversation-preview {
    font-size: 0.8125rem;
    color: var(--gray-500);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: linear-gradient(180deg, #502868 0%, #3d1e4f 100%);
    color: rgba(255, 255, 255, 0.7);
    padding: 64px 0 32px;
    font-family: 'Poppins', sans-serif;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 16px;
    line-height: 1.7;
    font-family: 'Poppins', sans-serif;
}

.footer-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
}

.footer-logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
}

/* ============================================
   Responsive Design
   ============================================ */
/* ============================================
   Mobile Menu Enhancements
   ============================================ */
.mobile-auth-section {
    display: none;
}

/* --- Mobile Slide Menu --- */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1099;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-slide-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 360px;
    height: 100%;
    background: var(--white);
    z-index: 1100;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
    -webkit-overflow-scrolling: touch;
}

.mobile-slide-menu.active {
    transform: translateX(0);
}

body.mobile-menu-open {
    overflow: hidden;
}

/* Close Button */
.mobile-menu-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.mobile-menu-close:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

/* Profile Card */
.mobile-menu-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 28px 24px 20px;
    border-bottom: 1px solid var(--gray-200);
}

.mobile-menu-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(80, 40, 104, 0.25);
}

.mobile-menu-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mobile-menu-user-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-menu-user-email {
    font-size: 0.8125rem;
    color: var(--gray-500);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Guest Header */
.mobile-menu-guest-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 24px 24px;
    border-bottom: 1px solid var(--gray-200);
    text-align: center;
}

.mobile-menu-guest-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    margin-bottom: 12px;
}

.mobile-menu-guest-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-800);
}

.mobile-menu-guest-subtitle {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 2px;
}

/* Search */
.mobile-menu-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 20px;
    padding: 10px 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
}

.mobile-menu-search:focus-within {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(80, 40, 104, 0.08);
}

.mobile-menu-search svg {
    flex-shrink: 0;
    color: var(--gray-400);
}

.mobile-menu-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.875rem;
    font-family: 'Poppins', sans-serif;
    color: var(--gray-800);
}

.mobile-menu-search input::placeholder {
    color: var(--gray-400);
}

/* Sections */
.mobile-menu-section {
    padding: 8px 12px;
}

.mobile-menu-section-label {
    display: block;
    padding: 8px 12px 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-400);
    font-family: 'Poppins', sans-serif;
}

/* Menu Item */
.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-lg);
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.15s ease;
    position: relative;
}

.mobile-menu-item:hover,
.mobile-menu-item:active {
    background: var(--gray-50);
    color: var(--primary);
}

.mobile-menu-item:active {
    transform: scale(0.98);
}

.mobile-menu-item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--gray-50);
    color: var(--gray-600);
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.mobile-menu-item:hover .mobile-menu-item-icon,
.mobile-menu-item:active .mobile-menu-item-icon {
    background: rgba(80, 40, 104, 0.08);
    color: var(--primary);
}

.mobile-menu-item-text {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

.mobile-menu-item-arrow {
    flex-shrink: 0;
    color: var(--gray-300);
    transition: all 0.15s ease;
}

.mobile-menu-item:hover .mobile-menu-item-arrow {
    color: var(--primary-light);
    transform: translateX(2px);
}

/* Badge */
.mobile-menu-item-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

/* Footer / Logout */
.mobile-menu-footer {
    margin-top: auto;
    padding: 12px 20px 24px;
    border-top: 1px solid var(--gray-200);
}

.mobile-menu-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    background: #fef2f2;
    color: var(--error);
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-menu-logout-btn:hover {
    background: #fee2e2;
}

/* Auth Section (Guest) */
.mobile-menu-auth-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    margin-top: auto;
    border-top: 1px solid var(--gray-200);
}

.mobile-menu-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-menu-auth-login {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.mobile-menu-auth-login:hover {
    background: var(--primary);
    color: var(--white);
}

.mobile-menu-auth-signup {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: 2px solid transparent;
    box-shadow: 0 4px 14px rgba(80, 40, 104, 0.25);
}

.mobile-menu-auth-signup:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(80, 40, 104, 0.35);
}

/* Hamburger Animation */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Old mobile-nav-link kept for backwards compatibility */
.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: var(--gray-700);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    margin-bottom: 4px;
}

.mobile-nav-link svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
    background: var(--gray-50);
    color: var(--primary);
}

.mobile-nav-link:hover svg {
    opacity: 1;
}

.mobile-logout {
    color: var(--error) !important;
}

.mobile-menu-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 16px 0;
}

.mobile-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 0 10px;
    border-top: 2px solid var(--gray-100);
    margin-top: 16px;
}

.mobile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    text-align: center;
}

.mobile-btn svg {
    flex-shrink: 0;
}

.mobile-btn-ghost {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.mobile-btn-ghost:hover,
.mobile-btn-ghost:active {
    background: var(--primary);
    color: var(--white);
}

.mobile-btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(80, 40, 104, 0.25);
}

.mobile-btn-primary:hover,
.mobile-btn-primary:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(80, 40, 104, 0.35);
}

.desktop-only-btn {
    display: inline-flex;
}

/* Sell Button Styles */
.sell-btn-desktop {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(80, 40, 104, 0.2);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.sell-btn-desktop:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(80, 40, 104, 0.3);
}

.sell-btn-desktop:active {
    transform: translateY(0);
}

.sell-btn-desktop svg {
    flex-shrink: 0;
}

.sell-btn-mobile {
    display: none;
    position: fixed;
    bottom: calc(85px + env(safe-area-inset-bottom));
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(80, 40, 104, 0.3), 
                0 8px 24px rgba(80, 40, 104, 0.2);
    align-items: center;
    justify-content: center;
    z-index: 998;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
}

.sell-btn-mobile:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 16px rgba(80, 40, 104, 0.4), 
                0 12px 32px rgba(80, 40, 104, 0.25);
}

.sell-btn-mobile:active {
    transform: scale(0.95);
}

.sell-btn-mobile svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* ============================================
   Media Queries
   ============================================ */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .messages-container {
        grid-template-columns: 280px 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 16px;
    }
    
    .header-container {
        height: 64px;
    }
    
    /* Hide desktop nav on mobile */
    .desktop-nav {
        display: none !important;
    }
    
    /* Show mobile slide menu */
    .mobile-slide-menu {
        display: flex;
    }
    
    /* Show mobile auth section */
    .mobile-auth-section {
        display: block;
        margin-top: auto;
        padding-top: 20px;
    }
    
    /* Hide desktop auth buttons */
    .desktop-only-btn {
        display: none !important;
    }
    
    /* Hide desktop header actions */
    .header-actions-clean {
        display: none !important;
    }
    
    /* Sell Button Mobile Display */
    .sell-btn-desktop {
        display: none !important;
    }
    
    .sell-btn-mobile {
        display: flex;
    }
    
    /* Improve dropdown appearance on mobile */
    .nav-dropdown-menu {
        position: static;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--gray-50);
        margin-top: 8px;
        border-radius: var(--radius-lg);
        padding: 8px;
    }
    
    .nav-dropdown:hover .nav-dropdown-menu {
        display: none;
    }
    
    .nav-dropdown.mobile-active .nav-dropdown-menu {
        display: block;
    }
    
    .nav-link {
        justify-content: space-between;
        padding: 14px 16px;
        border-radius: var(--radius-lg);
    }
    
    .nav-link:hover {
        background: var(--gray-50);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .search-form {
        display: none;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .messages-container {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 48px 0;
    }
    
    .section-lg {
        padding: 64px 0;
    }
    
    .auth-card {
        padding: 32px 24px;
    }
    
    .btn-lg {
        padding: 14px 24px;
    }
}

/* Extra small devices (phones, less than 480px) */
@media (max-width: 480px) {
    :root {
        --container-padding: 12px;
    }
    
    body {
        overflow-x: hidden;
    }
    
    .container {
        padding: 0 12px;
    }
    
    /* Ensure buttons wrap properly on very small screens */
    .btn {
        font-size: 0.9375rem;
        padding: 12px 20px;
        white-space: normal;
        text-align: center;
    }
    
    .btn-lg {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }

.hidden { display: none; }
.w-full { width: 100%; }

/* ============================================
   Dropdown Menu
   ============================================ */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 0.9375rem;
    color: var(--gray-700);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.dropdown-item svg {
    flex-shrink: 0;
}

.dropdown-item:hover {
    background: var(--gray-50);
    color: var(--primary);
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: 64px 24px;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.empty-state h3 {
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* ============================================
   Enhanced Header Icons - Responsive
   ============================================ */
@media (min-width: 769px) {
    /* Desktop: Show header actions, hide mobile bottom nav */
    .header-actions-clean {
        display: flex;
    }
    
    .mobile-bottom-nav {
        display: none !important;
    }
}

@media (max-width: 768px) {
    /* Mobile: Hide header actions, show bottom nav */
    .header-actions-clean {
        display: none !important;
    }
    
    .mobile-bottom-nav {
        display: flex;
    }
    
    /* Add bottom padding to body to prevent content from being hidden behind nav */
    body {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
    
    /* Adjust dropdown on mobile to work above bottom nav */
    .dropdown-menu {
        bottom: 90px;
        top: auto;
    }
}

/* Hide hamburger menu when bottom nav is active */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
}
