/* HMS - Hospital Management System
 * Main Stylesheet
 * Created: July 28, 2025
 */

/* Global Styles */
:root {
    --primary-color: #2c6eba;
    --primary-light: #edf2fa;
    --primary-dark: #1a4c8b;
    --accent-color: #2ecc71;
    --text-dark: #333333;
    --text-light: #666666;
    --text-muted: #8a8a8a;
    --danger: #e74c3c;
    --warning: #f39c12;
    --success: #2ecc71;
    --info: #3498db;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    color: var(--text-dark);
    background-color: #f5f7fa;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-danger {
    color: var(--danger) !important;
}

/* Layout */
.container-fluid {
    padding: 0;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background-color: white !important;
    transition: var(--transition);
}

.sidebar .position-sticky {
    height: 100vh;
    padding-top: 1.5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: var(--text-light);
    border-radius: 0;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.sidebar .nav-link i {
    margin-right: 10px;
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.sidebar .nav-link:hover {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.sidebar .nav-link:hover i {
    color: var(--primary-color);
}

.sidebar .nav-link.active {
    color: var(--primary-color);
    background-color: var(--primary-light);
    font-weight: 600;
    border-right: 3px solid var(--primary-color);
}

.sidebar .nav-link.active i {
    color: var(--primary-color);
}

/* Header */
.border-bottom {
    border-color: var(--border-color) !important;
}

/* Buttons */
.btn {
    border-radius: 5px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-light);
}

.btn-outline-secondary:hover {
    background-color: var(--border-color);
    color: var(--text-dark);
}

/* Profile Container */
.profile-container {
    display: flex;
    align-items: center;
}

.profile-button {
    background: none;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    padding: 0;
}

.profile-button i {
    font-size: 1.5rem;
    color: var(--text-light);
}

.profile-button:hover {
    background-color: var(--primary-light);
}

.profile-button:hover i {
    color: var(--primary-color);
}

.dropdown-header {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    padding: 0.75rem 1rem;
}

.dropdown-menu {
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    padding: 0.5rem 0;
    min-width: 200px;
}

.dropdown-item {
    padding: 0.6rem 1rem;
    color: var(--text-light);
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.dropdown-item i {
    transition: var(--transition);
}

.dropdown-item:hover i {
    color: var(--primary-color);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

.card-header h5 {
    margin-bottom: 0;
    font-weight: 600;
    color: var(--text-dark);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Form elements */
.form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-control {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(44, 110, 186, 0.15);
}

.form-control[readonly] {
    background-color: #f8f9fa;
    cursor: default;
}

/* Badges */
.badge {
    padding: 0.4em 0.65em;
    font-weight: 500;
}

.badge.bg-danger {
    background-color: var(--danger) !important;
}

/* Modal */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    background-color: white;
    padding: 1rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

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

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        height: 100vh;
        z-index: 999;
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .col-md-9.ms-sm-auto {
        width: 100%;
        margin-left: 0 !important;
    }
}

/* Profile-specific styles */
.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

/* Patient Profile Specific Styles */
.medical-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.medical-info-item:last-child {
    border-bottom: none;
}

.medical-info-label {
    color: var(--text-light);
    font-weight: 500;
}

.medical-info-value {
    font-weight: 600;
    color: var(--text-dark);
}

/* Customize notification badge */
.position-relative .badge {
    font-size: 0.65rem;
    padding: 0.25em 0.5em;
}

/* Custom alerts */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
}

.custom-alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    animation: slideIn 0.3s ease forwards;
    display: flex;
    align-items: center;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger);
}

.alert-icon {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.alert-message {
    flex-grow: 1;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
