/* SIDEBAR STYLES - Extracted from chat/index.html */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 2px solid var(--border-primary);
    padding: 2rem 1.5rem;
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

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

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

.sidebar-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 2px solid var(--border-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-primary);
    transition: all 0.2s;
}

.sidebar-close:hover {
    transform: translate(-2px, -2px);
    box-shadow: 2px 2px 0 var(--border-primary);
}

.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    display: none;
}

.sidebar-backdrop.active {
    display: block;
}

.sidebar-user-section {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-primary);
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-secondary);
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-primary);
}

.sidebar-user-name {
    font-size: 14px;
    font-weight: 600;
}

.sidebar-settings-section {
    margin-bottom: 1.5rem;
}

.sidebar-settings-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.sidebar-settings-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.sidebar-settings-btn {
    flex: 1;
    min-width: 70px;
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--border-primary);
    background: var(--bg-secondary);
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s;
    font-family: 'IBM Plex Mono', monospace;
    text-transform: uppercase;
}

.sidebar-settings-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 1px 1px 0 var(--border-primary);
}

.sidebar-settings-btn {
    background: #fff;
    color: #666;
    border-color: #000;
}

.sidebar-settings-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

[data-theme="dark"] .sidebar-settings-btn {
    background: #1a1a1a;
    color: #888;
    border-color: #333;
}

[data-theme="dark"] .sidebar-settings-btn.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.sidebar-auth-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-primary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    font-family: 'IBM Plex Mono', monospace;
    text-transform: uppercase;
}

.sidebar-auth-btn.signin {
    background: var(--accent-purple);
    color: #fff;
    border-color: var(--accent-purple);
    margin-bottom: 0.5rem;
}

.sidebar-auth-btn.signin:hover {
    transform: translate(-2px, -2px);
    box-shadow: 2px 2px 0 var(--accent-purple);
}

.sidebar-auth-btn.logout {
    background: transparent;
    color: #ef4444;
    border-color: #ef4444;
}

.sidebar-auth-btn.logout:hover {
    transform: translate(-2px, -2px);
    box-shadow: 2px 2px 0 #ef4444;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    margin-bottom: 0.35rem;
}

.sidebar-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    padding: 0.35rem 0;
    transition: all 0.2s;
}

.sidebar-link:hover {
    padding-left: 0.5rem;
    color: var(--accent-purple);
}

.sidebar-chat-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-item {
    padding: 0.75rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-secondary);
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
}

.chat-item:hover {
    background: #e8e8e8;
}

[data-theme="dark"] .chat-item:hover {
    background: var(--bg-primary);
}

.chat-item.active {
    background: var(--bg-primary);
    border-left: 3px solid var(--accent-purple);
}

.chat-item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.chat-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'IBM Plex Mono', monospace;
}

.chat-menu-btn {
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.chat-menu-btn:hover {
    color: var(--text-primary);
}

.chat-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    box-shadow: 2px 2px 0 var(--border-primary);
    z-index: 2000;
    min-width: 120px;
}

.chat-menu-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.chat-menu-item:hover:not(.disabled) {
    background: var(--bg-tertiary);
}

.chat-menu-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-menu-item.delete {
    color: var(--accent-red);
}

.chat-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 600;
    background: var(--accent-purple);
    color: #fff;
    border-radius: 3px;
    margin-left: 0.5rem;
    text-transform: uppercase;
    flex-shrink: 0;
}
/* Sign In Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    padding: 2rem;
    width: 90%;
    max-width: 420px;
    border: 2px solid var(--border-primary);
    box-shadow: 8px 8px 0 rgba(0,0,0,0.3);
}

.modal-close {
    width: 28px;
    height: 28px;
    border: 2px solid var(--border-primary);
    background: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-primary);
    float: right;
    margin: -0.5rem -0.5rem 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    transform: translate(-1px, -1px);
    box-shadow: 1px 1px 0 var(--border-primary);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    clear: both;
}

.modal-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 1.25rem;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    cursor: pointer;
}

.checkbox-label a {
    color: var(--accent-purple);
    text-decoration: underline;
}

.google-btn {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border: 2px solid var(--border-primary);
    background: var(--bg-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.2s;
    font-family: 'IBM Plex Mono', monospace;
    text-transform: uppercase;
}

.google-btn:hover:not(:disabled) {
    transform: translate(-2px, -2px);
    box-shadow: 2px 2px 0 var(--border-primary);
}

.google-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.modal-footer {
    margin-top: 1.25rem;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}
