/* Base styles */
:root {
    /* Light theme */
    --primary-color: #7c4dff;
    --primary-dark: #5e35b1;
    --primary-light: #b388ff;
    --secondary-color: #00bfa5;
    --background-color: #f8f9fa;
    --surface-color: #ffffff;
    --text-color: #212121;
    --text-secondary: #757575;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --success-color: #4caf50;
    --error-color: #f44336;
    --warning-color: #ff9800;
    --info-color: #2196f3;

    /* Sizes and spacing */
    --header-height: 60px;
    --sidebar-width: 280px;
    --border-radius: 12px;
    --input-radius: 24px;
    --shadow: 0 4px 6px var(--shadow-color);
}

.dark-mode {
    --primary-color: #bb86fc;
    --primary-dark: #9e68df;
    --primary-light: #d5b3ff;
    --secondary-color: #03dac6;
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --text-color: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

.app-container {
    position: relative;
    min-height: 100vh;
}

/* Common elements */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 50px;
    border: none;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.dark-mode .btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.hidden {
    display: none !important;
}

/* Header */
.app-header {
    height: var(--header-height);
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 600;
}

/* User menu */
.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 20px;
}

.user-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 8px 0;
    width: 180px;
    box-shadow: var(--shadow);
    display: none;
    z-index: 100;
}

.user-menu:hover .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 8px 16px;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s;
}

.user-dropdown a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.dark-mode .user-dropdown a:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Content area */
.content-area {
    display: flex;
    height: calc(100vh - var(--header-height));
    position: relative;
    overflow: hidden;
}

/* Page transitions */
.page {
    width: 100%;
    height: 100vh;
    overflow-y: auto;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    width: 400px;
    max-width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-weight: 500;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Form elements */
.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--input-radius);
    background-color: var(--surface-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-error {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: -8px;
    margin-bottom: 16px;
    min-height: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 240px;
    }
    
    .content-area {
        flex-direction: column;
    }
    
    .sidebar {
        position: fixed;
        left: -100%;
        width: 100%;
        max-width: 280px;
        z-index: 99;
        transition: left 0.3s ease;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .chat-area {
        width: 100%;
    }
}