@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-bg: #f8fafc;
    --glass-bg: #ffffff;
    --glass-border: #e2e8f0;
    --glass-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent: #6d5dfc;
    --accent-glow: rgba(109, 93, 252, 0.15);
    --sidebar-width: 280px;
    --header-height: 70px;
    --footer-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: #f8fafc;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Solid Card Utility */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
}

/* Layout Containers */
.wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.sidebar-logo i {
    font-size: 28px;
    color: var(--accent);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: 0.3s;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(109, 93, 252, 0.1);
    color: var(--accent);
    transform: translateX(5px);
}

.new-chat-btn {
    background: white;
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    margin-bottom: 20px;
}

.new-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* Top Bar Styling */
.top-bar {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 900;
    margin-bottom: 20px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 30px;
    transition: 0.3s;
}

.user-menu:hover {
    background: rgba(255, 255, 255, 0.4);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.user-info .user-name {
    font-weight: 600;
    font-size: 14px;
    display: block;
}

.user-info .user-role {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Form Styling */
.form-card {
    max-width: 450px;
    margin: 100px auto;
    padding: 40px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: #ffffff;
    outline: none;
    transition: 0.3s;
}

.form-input:focus {
    border-color: var(--accent);
    background: white;
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.btn {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    font-size: 16px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--accent-glow);
}

/* Footer Styling */
.footer-nav {
    display: none;
    /* Hidden on desktop */
}

/* Back to Top Styling */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 10px 20px var(--accent-glow);
    transition: 0.3s;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .mobile-toggle {
        display: block !important;
    }

    .sidebar {
        left: -300px;
        transition: 0.4s;
    }

    .sidebar.open {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        padding-bottom: 80px;
    }

    .footer-nav {
        display: flex;
        position: fixed;
        bottom: 20px;
        left: 20px;
        right: 20px;
        height: var(--footer-height);
        z-index: 1000;
        justify-content: space-around;
        align-items: center;
        padding: 0 10px;
    }

    .footer-btn {
        color: var(--text-secondary);
        font-size: 20px;
        text-decoration: none;
        padding: 10px;
        border-radius: 12px;
        transition: 0.3s;
    }

    .footer-btn.active {
        color: var(--accent);
        background: rgba(109, 93, 252, 0.1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}