:root {
    /* LegalNoter - Professional Navy Theme */
    --navy-dark: #0A192F;
    --navy-light: #112240;
    --navy-lighter: #233554;
    --slate: #8892b0;
    --text-light: #ccd6f6;
    --white: #e6f1ff;
    --accent: #64ffda;
    /* Professional Teal Accent */
    --danger: #ff5f56;
    --success: #28a745;

    --font-main: 'Inter', system-ui, -apple-system, sans-serif;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.2);
    --radius: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--navy-dark);
    color: var(--text-light);
    font-family: var(--font-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    filter: brightness(1.1);
    text-decoration: underline;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.btn:hover {
    background-color: var(--accent);
    /* rgba overlay handled by transition */
    background: rgba(100, 255, 218, 0.1);
}

.btn-primary {
    background-color: var(--accent);
    color: var(--navy-dark);
}

.btn-primary:hover {
    background: #52e0be;
    color: var(--navy-dark);
}

/* Auth Layout */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background-color: var(--navy-light);
    padding: 40px;
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.logo-large {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.highlight {
    color: var(--accent);
}

.auth-subtitle {
    color: var(--slate);
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--white);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 12px;
    background-color: var(--navy-lighter);
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--white);
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}

.divider {
    margin: 24px 0;
    color: var(--slate);
    position: relative;
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background-color: var(--navy-lighter);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .workspace {
        flex-direction: column;
        overflow-y: auto;
        /* Allow full page scroll on mobile */
    }

    .panel {
        min-width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--navy-lighter);
        height: auto;
        /* Allow content to dictate height */
        min-height: 500px;
        /* Decent height for each panel */
    }

    .chat-widget {
        width: 90%;
        right: 5%;
        left: 5%;
        bottom: 10px;
    }

    .nav {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }

    .nav-links a {
        margin: 0;
        /* Reset margins for flex gap */
    }
}

/* User Profile Menu */
.user-menu {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.avatar {
    width: 36px;
    height: 36px;
    background-color: var(--accent);
    color: var(--navy-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.user-menu:hover .avatar {
    transform: scale(1.05);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background-color: var(--navy-light);
    border: 1px solid var(--navy-lighter);
    border-radius: var(--radius);
    width: 200px;
    box-shadow: var(--shadow-md);
    display: none;
    z-index: 1000;
    padding: 8px 0;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    padding: 10px 16px;
    color: var(--text-light);
    font-size: 0.9rem;
    display: block;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--navy-lighter);
    color: var(--accent);
    text-decoration: none;
}

.dropdown-header {
    padding: 8px 16px;
    border-bottom: 1px solid var(--navy-lighter);
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: var(--slate);
}