/* Enhanced EMR Styles for Psychiatry Practice */
:root {
    --primary-blue: #3a6ea5;
    --primary-dark: #2c5282;
    --primary-light: #a0c1e6;
    --accent-teal: #4fb0b9;
    --accent-light: #e1f5fe;
    --neutral-gray: #f8fafc;
    --neutral-medium: #e2e8f0;
    --neutral-dark: #4a5568;
    --calm-purple: #8b7dad;
    --calm-lavender: #e6e6fa;
    --success-green: #38a169;
    --warning-orange: #ed8936;
    --error-red: #e53e3e;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--neutral-gray) 0%, var(--calm-lavender) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    padding: 2.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--neutral-medium);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-teal), var(--calm-purple));
}

h1 {
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 1.5rem;
    text-align: center;
    font-size: 2.2rem;
}

h1:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-teal));
    border-radius: 2px;
}

h2 {
    color: var(--primary-blue);
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-light);
    font-weight: 600;
}

h3 {
    color: var(--neutral-dark);
    font-size: 1.3rem;
    margin: 1.5rem 0 1rem 0;
    font-weight: 600;
}

.tabber {
    margin-top: 2.5rem;
}

.tabbertab {
    background-color: white;
    border: 1px solid var(--neutral-medium);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.tabbertab:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.form-control, .form-select {
    border: 1px solid var(--neutral-medium);
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
    font-size: 1rem;
    background-color: var(--neutral-gray);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(58, 110, 165, 0.2);
    background-color: white;
}

.btn {
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    width: auto;
    min-width: 150px;
    margin: 0.25rem;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-green), #2d9e5f);
    color: white;
    box-shadow: 0 4px 6px rgba(56, 161, 105, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #2d9e5f, var(--success-green));
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(56, 161, 105, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-orange), #e57c1f);
    color: white;
    box-shadow: 0 4px 6px rgba(237, 137, 54, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e57c1f, var(--warning-orange));
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(237, 137, 54, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 6px rgba(58, 110, 165, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-blue));
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(58, 110, 165, 0.4);
}

.col-md-4.text-center img {
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    max-width: 200px;
    margin-bottom: 1rem;
    border: 3px solid white;
}

.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-right: 0.75em;
    border: 2px solid var(--neutral-medium);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.form-check-label {
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
}

/* Medical history sections styling */
.form-group {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border-radius: 8px;
    background-color: var(--neutral-gray);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-light);
}

.form-group:hover {
    background-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

/* Label styling */
label {
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: block;
    font-size: 1rem;
}

/* Tab navigation styling */
.nav-tabs {
    border-bottom: 2px solid var(--primary-light);
    margin-bottom: 2rem;
}

.nav-tabs .nav-link {
    border: 1px solid transparent;
    border-radius: 8px 8px 0 0;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    background-color: var(--neutral-gray);
    transition: all 0.3s ease;
    font-weight: 600;
    margin-right: 0.5rem;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-blue);
    background-color: var(--accent-light);
    border-color: var(--primary-light);
}

.nav-tabs .nav-link.active {
    color: white;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-teal));
    border-color: var(--primary-blue);
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(58, 110, 165, 0.3);
}

/* Tab Content Styling */
.tab-content {
    padding: 2rem;
    border: 1px solid var(--neutral-medium);
    border-top: none;
    border-radius: 0 0 10px 10px;
    background-color: white;
    box-shadow: var(--shadow-light);
}

/* Navbar styling */
.navbar {
    margin: 10px;
    padding: 15px;
    font-size: 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    box-shadow: var(--shadow-medium);
}

.navbar-brand {
    font-weight: bold;
    color: white !important;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
}

.navbar-brand::before {
    content: "🩺";
    margin-right: 10px;
    font-size: 1.5rem;
}

.nav-link {
    color: white !important;
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: none;
    font-size: 1rem;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    margin: 0 2px;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white !important;
    transform: translateY(-2px);
}

.dropdown-menu {
    background-color: white;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: none;
    border-radius: 8px;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--neutral-medium);
    padding: 0.5rem;
}

.dropdown-item {
    color: var(--text-primary);
    font-size: 1rem;
    background-color: transparent;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-teal));
    color: white;
    transform: translateX(5px);
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
    padding: 0.25rem 0.5rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30' fill='white'%3E%3Cpath stroke='white' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Error message styling */
.error {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: white;
    background: linear-gradient(135deg, var(--error-red), #c53030);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(229, 62, 62, 0.3);
    margin: 1rem 0;
}

/* Success message styling */
.success {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: white;
    background: linear-gradient(135deg, var(--success-green), #2d9e5f);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(56, 161, 105, 0.3);
    margin: 1rem 0;
}

/* Card styling for patient info */
.patient-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    border-left: 5px solid var(--accent-teal);
    margin-bottom: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    
    .tabbertab {
        padding: 1.5rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.75rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    .navbar {
        margin: 5px;
        padding: 10px;
    }
}

/* Animation for smooth transitions */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Focus states for accessibility */
button:focus, .form-control:focus, .form-select:focus, .form-check-input:focus {
    outline: 2px solid var(--accent-teal);
    outline-offset: 2px;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}