/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables for consistent theming */
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #475569;
    --accent-color: #3b82f6;
    --danger-color: #dc2626;
    --success-color: #16a34a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Disable white background on autofill */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg-primary) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    transition: background-color 5000s ease-in-out 0s;
}

textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg-primary) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
}

select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
select:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg-primary) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Button styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* Message styles */
.error-message {
    background: #fee;
    color: #c33;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
}

.success-message {
    background: #efe;
    color: #3c3;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
}

/* Link styles */
.link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.link:hover {
    text-decoration: underline;
}

/* Navigation styles */
.top-nav {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav-brand {
    flex-shrink: 0;
}

.nav-brand h1 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    background: transparent;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--accent-color);
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

/* Language selector styles */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.language-selector {
    flex-shrink: 0;
}

.language-selector-top {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

.language-select {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 70px;
    font-weight: 600;
    text-align: center;
}

.language-select:hover {
    border-color: var(--accent-color);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.language-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.language-select option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.5rem;
}

.language-select option:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Logout button styles */
.logout-container {
    flex-shrink: 0;
    margin-left: 1rem;
}

.logout-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

.logout-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.4);
}

.logout-btn:active {
    transform: translateY(0);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
    order: -1; /* Перемещаем бургер в начало */
}

.mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
    position: relative;
}

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

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

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

/* Mobile menu button hover effect */
.mobile-menu-btn:hover span {
    background: var(--accent-color);
}

/* Responsive Navigation */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex !important;
        z-index: 1002;
        order: -1; /* Бургер слева */
        margin-right: auto; /* Отодвигаем от центра */
    }
    
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        position: relative;
    }
    
    /* Hide brand title on mobile */
    .nav-brand h1 {
        display: none;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        gap: 0;
        padding: 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        max-height: 0;
        overflow: hidden;
        border-radius: 0 0 8px 8px;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        max-height: 500px;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--border-color);
        text-align: center;
        font-size: 1rem;
        width: 100%;
        white-space: nowrap;
        transition: background-color 0.2s ease;
    }
    
    .nav-link:hover {
        background-color: var(--bg-tertiary);
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-controls {
        display: flex;
        gap: 0.75rem;
        flex-shrink: 0;
    }
    
    .language-select {
        min-width: 70px;
        font-size: 0.875rem;
        padding: 0.3rem 0.5rem;
    }
    
    .logout-btn, .login-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Ensure auth-links are properly displayed in mobile when visible */
    #auth-links {
        flex-direction: column;
        width: 100%;
    }
    
    #auth-links .nav-link {
        border-bottom: 1px solid var(--border-color);
    }
    
    /* Improve mobile menu animation */
    .nav-links:not(.active) {
        pointer-events: none;
    }
    
    /* Force mobile menu button to always be visible on mobile */
    .mobile-menu-btn {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }
    
    .nav-brand h1 {
        font-size: 1.25rem;
    }
    
    .nav-link {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .language-select {
        min-width: 60px;
        font-size: 0.8rem;
        padding: 0.3rem 0.4rem;
    }
    
    .logout-btn, .login-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .mobile-menu-btn {
        width: 28px;
        height: 28px;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        order: -1; /* Бургер слева */
        margin-right: auto; /* Отодвигаем от центра */
    }
    
    .nav-controls {
        gap: 0.5rem;
    }
    
    /* Ensure mobile menu is properly sized on very small screens */
    .nav-links {
        max-height: 400px;
    }
    
    .nav-links.active {
        max-height: 400px;
    }
}

/* Loading spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Home page styles */
.home-container {
    max-width: 800px;
    margin: 100px auto;
    text-align: center;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
}

.home-container h1 {
    font-size: 3rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-weight: 700;
}

/* Team page styles */
.team-container {
    max-width: 1000px;
    margin: 100px auto;
    text-align: center;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
}

.team-container h1 {
    font-size: 3rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-weight: 700;
}

.team-members {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.team-member {
    background: var(--bg-tertiary);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

.team-member:hover {
    transform: translateY(-5px);
}

.team-member h3 {
    color: var(--bg-tertiary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.team-member p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Auth controls styles */
#auth-controls, #login-controls {
    flex-shrink: 0;
    margin-left: 1rem;
}

#auth-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Login button styles */
.login-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.3);
}

.login-btn:hover {
    background: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(22, 163, 74, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

/* Login page styles */
.login-container {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border-color);
    margin: 100px auto;
    backdrop-filter: blur(10px);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Override form styles for login page */
.login-container .form-group input {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.login-container .form-group input:focus {
    border-color: var(--accent-color);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.login-container .form-group label {
    color: var(--text-secondary);
}

/* Override message styles for login page */
.login-container .error-message {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.login-container .success-message {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

/* Finish Chat Modal Styles */
#finish-chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.finish-modal {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 0 1.5rem;
}

.form-group label {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea::placeholder {
    color: var(--text-muted);
}

.modal-footer {
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 1.5rem;
}

.btn-secondary {
    padding: 0.5rem 1rem;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.btn-primary {
    padding: 0.5rem 1rem;
    background-color: var(--accent-color);
    color: white;
    border: 1px solid var(--accent-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

.btn-primary:active {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

/* Responsive design */
@media (max-width: 640px) {
    .finish-modal {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .btn-secondary,
    .btn-primary {
        width: 100%;
    }
} 

/* Error states for finish chat modal */
.form-textarea.error {
	border-color: var(--danger-color);
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.field-error {
	color: var(--danger-color);
	font-size: 0.8rem;
	margin-top: 0.375rem;
}

/* Patient Summary Styles */
.patient-summary {
	background-color: var(--bg-secondary);
	border: 1px solid var(--border-color);
	border-radius: 8px;
	padding: 1rem;
	margin-bottom: 1rem;
}

.patient-info-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin-bottom: 1rem;
}

.patient-basic h4 {
	color: var(--text-primary);
	margin: 0 0 0.5rem 0;
	font-size: 1.1rem;
	font-weight: 600;
}

.patient-basic p {
	color: var(--text-secondary);
	margin: 0;
	font-size: 0.9rem;
}

.patient-details p {
	color: var(--text-secondary);
	margin: 0.25rem 0;
	font-size: 0.85rem;
}

.symptoms-compact h5,
.history-compact h5 {
	color: var(--text-primary);
	margin: 0 0 0.5rem 0;
	font-size: 0.9rem;
	font-weight: 600;
}

.symptoms-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.symptom-tag {
	background-color: var(--bg-tertiary);
	color: var(--text-primary);
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	font-size: 0.8rem;
	border: 1px solid var(--border-color);
}

.history-compact ul {
	margin: 0;
	padding-left: 1rem;
}

.history-compact li {
	color: var(--text-secondary);
	font-size: 0.85rem;
	margin-bottom: 0.25rem;
}

@media (max-width: 640px) {
	.patient-info-grid {
		grid-template-columns: 1fr;
		gap: 0.5rem;
	}
}

/* Enhanced Loader Styles - Dots Only */

/* Enhanced modal loader animation */
.modal-loader-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 3rem;
	min-height: 200px;
	position: relative;
}

/* Medical Symbol Loader */
.medical-symbol {
	position: relative;
	margin-bottom: 1.5rem;
	width: 80px;
	height: 80px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.heart-beat {
	position: absolute;
	animation: heartPulse 1.5s ease-in-out infinite;
}

.heart {
	animation: heartBeat 1.5s ease-in-out infinite;
}

@keyframes heartPulse {
	0%, 100% { 
		transform: scale(1);
		opacity: 0.8;
	}
	50% { 
		transform: scale(1.1);
		opacity: 1;
	}
}

@keyframes heartBeat {
	0%, 100% { 
		transform: scale(1);
	}
	25% { 
		transform: scale(1.1);
	}
	50% { 
		transform: scale(1);
	}
	75% { 
		transform: scale(1.05);
	}
}



.modal-loader-content .loading-text {
	color: var(--text-primary);
	font-size: 1.1rem;
	font-weight: 500;
	animation: textPulse 1.5s ease-in-out infinite;
}

.modal-loader-content .loading-dots {
	display: flex;
	gap: 0.5rem;
	margin-top: 1rem;
}

.modal-loader-content .loading-dot {
	width: 10px;
	height: 10px;
	background-color: #3b82f6;
	border-radius: 50%;
	animation: dotBounce 1.4s ease-in-out infinite both;
	display: inline-block;
}

.modal-loader-content .loading-dot:nth-child(1) { animation-delay: -0.32s; }
.modal-loader-content .loading-dot:nth-child(2) { animation-delay: -0.16s; }
.modal-loader-content .loading-dot:nth-child(3) { animation-delay: 0s; }

@keyframes textPulse {
	0%, 100% { opacity: 0.7; }
	50% { opacity: 1; }
}

@keyframes dotBounce {
	0%, 80%, 100% {
		transform: scale(0.3) translateY(0);
		opacity: 0.3;
	}
	40% {
		transform: scale(1) translateY(-10px);
		opacity: 1;
	}
}

/* CRM Layout Styles */
.crm-layout {
	display: flex;
	min-height: 100vh;
	background: var(--bg-primary);
}

.crm-sidebar {
	width: 280px;
	background: var(--bg-secondary);
	border-right: 1px solid var(--border-color);
	position: fixed;
	height: 100vh;
	overflow-y: auto;
	z-index: 100;
	display: flex;
	flex-direction: column;
}

.crm-logo {
	padding: 2rem 1.5rem 1.5rem 1.5rem;
	border-bottom: 1px solid var(--border-color);
	background: var(--bg-primary);
}

.crm-logo-link {
	text-decoration: none;
	color: var(--text-primary);
	transition: color 0.3s ease;
}

.crm-logo-link:hover {
	color: var(--accent-color);
}

.crm-logo h2 {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: 1px;
}

.crm-menu-sections {
	flex: 1;
	padding: 2rem 0;
	overflow-y: auto;
}

.crm-sidebar-footer {
	padding: 1.5rem;
	border-top: 1px solid var(--border-color);
	background: var(--bg-primary);
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.crm-language-selector {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.crm-language-label {
	color: var(--text-secondary);
	font-size: 0.8rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.crm-language-select {
	padding: 0.5rem 2rem 0.5rem 0.75rem;
	border: 1px solid var(--border-color);
	border-radius: 6px;
	background-color: var(--bg-secondary);
	color: var(--text-primary);
	font-size: 0.85rem;
	cursor: pointer;
	transition: all 0.2s ease;
	appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 14px;
}

.crm-language-select:focus {
	outline: none;
	border-color: var(--accent-color);
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.crm-language-select:hover {
	border-color: var(--accent-color);
}

.crm-logout-btn {
	padding: 0.75rem 1rem;
	background: #7f1d1d;
	border: 1px solid #5f1a1a;
	border-radius: 8px;
	color: #fca5a5;
	font-size: 0.85rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
	width: 100%;
	text-align: center;
}

.crm-logout-btn:hover {
	background: #991b1b;
	border-color: #7f1d1d;
	color: #fecaca;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(127, 29, 29, 0.2);
}

.crm-logout-btn:active {
	transform: translateY(0);
	box-shadow: 0 2px 6px rgba(127, 29, 29, 0.15);
}

.crm-menu-section {
	margin-bottom: 2.5rem;
	padding: 0 1.5rem;
}

.crm-menu-title {
	color: var(--text-primary);
	font-size: 0.9rem;
	font-weight: 600;
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--accent-color);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;
	user-select: none;
	transition: all 0.3s ease;
}

.crm-menu-title:hover {
	color: var(--accent-color);
}

.crm-menu-arrow {
	font-size: 0.8rem;
	transition: transform 0.3s ease;
	color: var(--text-muted);
}

.crm-menu-toggle {
	padding: 0.75rem 1rem;
	margin: -0.75rem -1rem 1rem -1rem;
	border-radius: 8px;
}

.crm-menu-toggle:hover {
	background: var(--bg-tertiary);
}

.crm-menu-list {
	list-style: none;
	padding: 0;
	margin: 0;
	overflow: hidden;
	transition: all 0.3s ease;
	max-height: 0;
	opacity: 0;
	transform: translateY(-10px);
}

.crm-menu-list.crm-menu-expanded {
	max-height: 500px;
	opacity: 1;
	transform: translateY(0);
}

.crm-menu-list li {
	margin-bottom: 0.5rem;
}

.crm-menu-link {
	display: block;
	padding: 0.6rem 1rem;
	color: var(--text-secondary);
	text-decoration: none;
	border-radius: 8px;
	transition: all 0.3s ease;
	font-weight: 500;
	font-size: 0.85rem;
	border-left: 3px solid transparent;
}

.crm-menu-link:hover {
	background: var(--bg-tertiary);
	color: var(--text-primary);
	border-left-color: var(--accent-color);
	transform: translateX(4px);
}

.crm-menu-link.active {
	background: var(--bg-tertiary);
	color: var(--text-primary);
	border-left-color: var(--accent-color);
	font-weight: 600;
	transform: translateX(4px);
}

.crm-menu-link.active:hover {
	background: var(--bg-tertiary);
}

.crm-main-content {
	flex: 1;
	margin-left: 280px;
	min-height: 100vh;
}

/* Responsive Design */
@media (max-width: 768px) {
	.crm-sidebar {
		width: 100%;
		position: relative;
		height: auto;
	}
	
	.crm-logo {
		padding: 1.5rem 1rem 1rem 1rem;
	}
	
	.crm-menu-sections {
		padding: 1rem 0;
	}
	
	.crm-sidebar-footer {
		padding: 1rem;
	}
	
	.crm-main-content {
		margin-left: 0;
		padding: 1rem;
	}
	
	.crm-layout {
		flex-direction: column;
	}
}

/* Critical Notifications Top Bar Styles */
.notifications-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1rem;
}

.notification {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    animation: slideIn 0.3s ease-out;
    max-width: 100%;
}

.notification:last-child {
    margin-bottom: 0;
}

.notification-critical {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 4px solid #dc2626;
    color: #991b1b;
}

.notification-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.notification-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-message {
    font-weight: 500;
    line-height: 1.4;
}


@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Adjust main content when topbar is visible */
body.has-notifications .crm-main-content {
    margin-top: 80px; /* Adjust based on topbar height */
}

body.has-notifications .crm-sidebar {
    top: 80px; /* Adjust based on topbar height */
    height: calc(100vh - 80px); /* Reduce height to account for topbar */
}

/* Mobile responsive */
@media (max-width: 768px) {
    .notification {
        padding: 0.5rem 0.75rem;
        flex-direction: row;
        align-items: center;
    }
    
    .notification-icon {
        margin-right: 0.75rem;
        margin-bottom: 0;
        font-size: 1.25rem;
    }
    
    
    .notifications-topbar {
        padding: 0.5rem;
    }
    
    body.has-notifications .crm-main-content {
        margin-top: 60px; /* Smaller margin for mobile */
    }
    
    body.has-notifications .crm-sidebar {
        top: 60px; /* Smaller adjustment for mobile */
        height: calc(100vh - 60px); /* Reduce height to account for mobile topbar */
    }
}

/* Team Page Styles */
.team-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.team-header {
    text-align: center;
    margin-bottom: 3rem;
}

.team-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.team-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0;
}

.team-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-member-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.team-member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.member-avatar {
    text-align: center;
    margin-bottom: 1.5rem;
}

.avatar-container {
    position: relative;
    display: inline-block;
}

.member-photo {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    border: 3px solid var(--bg-primary);
}

.avatar-placeholder {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.avatar-initials {
    font-size: 4rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

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

.member-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.member-position {
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent-primary);
    margin: 0 0 1rem 0;
}

.member-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .team-page {
        padding: 1rem;
    }
    
    .team-title {
        font-size: 2rem;
    }
    
    .team-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .team-member-card {
        padding: 1.5rem;
    }
    
    .member-photo {
        width: 180px;
        height: 180px;
    }
    
    .avatar-placeholder {
        width: 180px;
        height: 180px;
    }
    
    .avatar-initials {
        font-size: 3rem;
    }
    
    .member-name {
        font-size: 1.25rem;
    }
} 