/* ================================================================
   PAPERPOOL PROFILE PAGE - ORIGINAL BLACK & WHITE THEME
   Clean, minimal, professional styling
   ================================================================ */

:root {
    --primary-black: #000000;
    --primary-white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-blue: #3b82f6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gray-50);
    color: var(--primary-black);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 2001;
    display: none;
    width: 48px;
    height: 48px;
    background: var(--primary-white);
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.menu-bar {
    width: 18px;
    height: 2px;
    background: var(--primary-black);
    border-radius: 1px;
    transition: var(--transition);
}

.mobile-menu-btn.active .menu-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active .menu-bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .menu-bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--primary-white);
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 2000;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-black);
    color: var(--primary-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-black);
    font-family: 'JetBrains Mono', monospace;
}

.sidebar-close {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: var(--transition);
}

.sidebar-close:hover {
    background: var(--gray-100);
    color: var(--primary-black);
}

/* Sidebar Menu */
.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
    flex: 1;
}

.menu-item {
    margin-bottom: 0.25rem;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    color: var(--gray-600);
    text-decoration: none;
    transition: var(--transition);
}

.menu-link:hover {
    background: var(--gray-50);
    color: var(--primary-black);
}

.menu-item.active .menu-link {
    background: var(--primary-black);
    color: var(--primary-white);
}

.menu-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.menu-link span {
    font-weight: 500;
}

/* Mobile Backdrop */
.mobile-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    display: none;
    opacity: 0;
    transition: var(--transition);
}

.mobile-backdrop.active {
    display: block;
    opacity: 1;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    transition: var(--transition);
    min-height: 100vh;
    position: relative;
    z-index: 1;
    overflow-x: hidden;
}

/* Dashboard Header */
.dashboard-header {
    background: var(--primary-white);
    padding: 2rem;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.header-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-black);
    margin-bottom: 0.5rem;
}

.header-content p {
    color: var(--gray-600);
    font-size: 1.1rem;
}

/* Profile Container */
.profile-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Profile Sidebar */
.profile-sidebar {
    position: sticky;
    top: 140px;
    height: fit-content;
}

.profile-card {
    background: var(--primary-white);
    border-radius: var(--border-radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    text-align: center;
}

.profile-avatar {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-white);
    box-shadow: var(--shadow-lg);
}

.change-avatar {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 36px;
    height: 36px;
    background: var(--primary-black);
    border: none;
    border-radius: 50%;
    color: var(--primary-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.change-avatar:hover {
    transform: scale(1.1);
}

#profileName {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 0.5rem;
}

#profileEmail {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Profile Stats */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.stat {
    text-align: center;
    padding: 1rem;
    border-radius: var(--border-radius);
    background: var(--gray-50);
    transition: var(--transition);
}

.stat:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-black);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Profile Content */
.profile-content {
    background: var(--primary-white);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    overflow-x: auto;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    color: var(--gray-600);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    color: var(--primary-black);
    background: var(--gray-100);
}

.tab-btn.active {
    color: var(--primary-black);
    background: var(--primary-white);
    border-bottom-color: var(--primary-black);
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 2rem;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-header {
    margin-bottom: 2rem;
}

.tab-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 0.5rem;
}

.tab-header p {
    color: var(--gray-600);
    font-size: 1rem;
}

/* Forms */
.profile-form {
    max-width: 800px;
}

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

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--primary-white);
    color: var(--primary-black);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-black);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-size: 0.95rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.btn-primary {
    background: var(--primary-black);
    color: var(--primary-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--gray-800);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--primary-white);
    color: var(--primary-black);
    border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
    border-color: var(--primary-black);
    background: var(--gray-50);
}

.form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* Preferences */
.preferences-section {
    margin-bottom: 2rem;
}

.preferences-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 1rem;
}

.preference-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preference-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.preference-item:hover {
    border-color: var(--primary-black);
    box-shadow: var(--shadow-sm);
}

.preference-info h4 {
    font-weight: 600;
    color: var(--primary-black);
    margin-bottom: 0.25rem;
}

.preference-info p {
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-300);
    transition: var(--transition);
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--primary-white);
    transition: var(--transition);
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary-black);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

/* Security Section */
.security-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.security-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 0.5rem;
}

.security-section p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    color: var(--primary-white);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    transform: translateX(400px);
    transition: var(--transition);
    max-width: 400px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: var(--accent-green);
}

.notification.error {
    background: var(--accent-red);
}

.notification.info {
    background: var(--accent-blue);
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    margin-left: 0.5rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .profile-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .profile-sidebar {
        position: relative;
        top: auto;
    }

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

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 2000;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-close {
        display: flex;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100%;
        position: relative;
        z-index: 1;
    }

    .dashboard-header {
        padding: 1.5rem 1rem;
    }

    .dashboard-header h1 {
        font-size: 2rem;
    }

    .profile-container {
        padding: 1rem;
        gap: 1rem;
    }

    .profile-card {
        padding: 1.5rem;
    }

    .profile-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .tab-content {
        padding: 1.5rem;
    }

    .profile-tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
        padding: 0.75rem 1rem;
    }

    .preference-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .notification {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .main-content {
        margin-left: 0 !important;
        width: 100%;
        position: relative;
        z-index: 1;
    }
    
    .dashboard-header h1 {
        font-size: 1.5rem;
    }

    .profile-avatar img {
        width: 100px;
        height: 100px;
    }

    .change-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .stat-number {
        font-size: 1.2rem;
    }

    .tab-header h2 {
        font-size: 1.5rem;
    }

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

/* Utility Classes */
.hidden {
    display: none !important;
}

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

.word-wrap {
    word-wrap: break-word;
    overflow-wrap: break-word;
}