:root {
    --primary-color: #0061f2;  /* Blue theme */
    --primary-gradient: linear-gradient(135deg, #0061f2 0%, #6900f2 100%);  /* Blue gradient */
    --primary-light: rgba(0, 97, 242, 0.1);
    --secondary-color: #6900f2;
    --secondary-light: rgba(105, 0, 242, 0.1);
    --success-color: #1cc88a;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
}

body {
    background-color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1 0 auto; }

.footer {
    flex-shrink: 0;
    background: transparent !important;
    margin-top: 0 !important;
}

/* Navigation */
.navbar {
    background: var(--primary-gradient) !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
    position: relative;
}

/* Ensure main content flows properly with navbar */
main {
    flex: 1 0 auto;
    transition: margin-top 0.3s ease;
}

.navbar-brand { 
    font-weight: bold; 
    color: white !important;
}

/* Ensure navbar container is properly positioned */
.navbar .container-fluid {
    position: relative;
}

/* Ensure navbar collapse doesn't overlay content */
.navbar-collapse {
    position: relative;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s ease;
}
        
.nav-link:hover {
    color: white !important;
    transform: translateY(-1px);
}
        
.nav-link.active {
    color: white !important;
    font-weight: bold;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 8px;
        margin-top: 0.5rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .nav-link {
        color: var(--primary-color) !important;
        padding: 0.5rem 1rem;
        font-weight: 500;
    }

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

    .nav-link.active {
        background-color: var(--primary-light) !important;
        color: var(--primary-color) !important;
    }
}

/* Notifications */
.notification-dropdown {
    width: 380px;
    max-height: 600px;
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-top: 10px;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--primary-gradient);
    color: white;
}

.notification-list {
    max-height: 500px;
    overflow-y: auto;
    padding: 8px 0;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    transition: background 0.3s ease;
    cursor: pointer;
    border-left: 4px solid transparent;
}

.notification-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.notification-item.unread {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
    border-left-color: var(--primary-color);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 1.2rem;
    background: var(--primary-gradient);
    color: white;
}

.notification-content { flex: 1; }

.notification-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--bs-dark);
}

.notification-message {
    font-size: 0.85rem;
    color: var(--bs-secondary);
    margin-bottom: 6px;
    line-height: 1.4;
}

.notification-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-time {
    font-size: 0.8rem;
    color: var(--bs-secondary);
}

.notification-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    padding: 2px 8px;
    border-radius: 20px;
}

/* Modal styles */
.modal-header {
    background: var(--primary-gradient);
    padding: 1.5rem;
}

.modal-body { padding: 1.5rem; }

.modal-footer {
    padding: 1rem 1.5rem;
}

.modal-footer .btn {
    padding: 0.5rem 1.5rem;
    border-radius: 10px;
    font-weight: 500;
}

/* Custom scrollbar */
.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: transparent;
}

.notification-list::-webkit-scrollbar-thumb {
    background-color: rgba(var(--bs-primary-rgb), 0.2);
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.3);
}

/* Logout button styles */
.btn-logout {
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 0.5rem 1.2rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Mobile logout button styles */
@media (max-width: 991.98px) {
    .btn-logout {
        color: var(--primary-color) !important;
        border: 1px solid var(--primary-color);
        background: transparent;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
            
    .btn-logout:hover {
        background: var(--primary-light);
        color: var(--primary-color) !important;
    }
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Portal-specific logout button styles */
body.doctor-portal .btn-logout {
    border-color: rgba(0, 176, 155, 0.3);
}

body.doctor-portal .btn-logout:hover {
    background: rgba(0, 176, 155, 0.2);
}

body.patient-portal .btn-logout {
    border-color: rgba(0, 97, 242, 0.3);
}

body.patient-portal .btn-logout:hover {
    background: rgba(0, 97, 242, 0.2);
}

.logout-form {
    margin: 0;
    padding: 0.5rem;
}

.dropdown-item-text {
    padding: 0;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-notification {
    display: flex;
    align-items: center;
    padding: 16px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-width: 400px;
    margin-bottom: 10px;
    animation: slideIn 0.3s ease-out;
}

.toast-notification.success {
    border-left: 4px solid #00c851;
}

.toast-notification.error {
    border-left: 4px solid #ff4444;
}

.toast-notification.warning {
    border-left: 4px solid #ffbb33;
}

.toast-notification.info {
    border-left: 4px solid #33b5e5;
}

.toast-icon {
    margin-right: 12px;
    font-size: 1.2rem;
}

.toast-notification.success .toast-icon {
    color: #00c851;
}

.toast-notification.error .toast-icon {
    color: #ff4444;
}

.toast-notification.warning .toast-icon {
    color: #ffbb33;
}

.toast-notification.info .toast-icon {
    color: #33b5e5;
}

.toast-message {
    flex-grow: 1;
    font-size: 0.95rem;
}

.toast-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    margin-left: 12px;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #666;
}

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

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Logo styles */
.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

/* For mobile responsiveness */
@media (max-width: 768px) {
    .navbar-brand img {
        height: 32px;
    }
            
    /* Ensure navbar collapse pushes content down instead of overlaying */
    .navbar-collapse {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        z-index: 1000;
        margin-top: 1rem;
    }
            
    /* Ensure all text in collapsed navbar is visible */
    .navbar-nav .nav-link,
    .navbar-nav .dropdown-item {
        color: var(--primary-color) !important;
        font-weight: 500;
        text-shadow: none;
    }
            
    /* Ensure dropdown menus are properly positioned */
    .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        margin-top: 0.5rem;
        border: 1px solid rgba(0, 0, 0, 0.1);
        background: white;
        box-shadow: none;
    }
            
    /* Ensure notification dropdown doesn't overlay content */
    .notification-dropdown {
        position: static !important;
        width: 100%;
        margin-top: 0.5rem;
    }
            
    /* Force visibility of all dropdown text */
    .navbar-nav .dropdown-menu .dropdown-item,
    .navbar-nav .dropdown-menu a {
        color: var(--primary-color) !important;
        font-weight: 500;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

.dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    min-width: 200px;
    z-index: 1050;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    color: var(--primary-color) !important;
}

.dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: translateX(3px);
    color: var(--primary-color) !important;
}

.dropdown-item.text-danger:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545 !important;
}

.dropdown-divider {
    margin: 0.5rem 0;
    opacity: 0.1;
}

.btn-link:hover {
    opacity: 0.9;
}

.btn-link:focus {
    box-shadow: none;
}

@media (max-width: 768px) {
    .dropdown-menu {
        position: static !important;
        top: auto !important;
        bottom: auto;
        left: auto;
        right: auto;
        width: 100%;
        border-radius: 8px;
        padding: 0.5rem;
        transform: none;
        transition: none;
        margin-top: 0.5rem;
    }

    .dropdown-menu.show {
        transform: none;
    }

    .dropdown-item {
        padding: 0.8rem 1rem;
        text-align: left;
    }
}

/* Notifications */
@media (max-width: 576px) {
    .notification-dropdown {
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .notification-list {
        max-height: calc(100vh - 60px);
    }
}

/* Responsive Tables */
.table-responsive {
    margin: 1rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Responsive Cards */
.card {
    margin-bottom: 1rem;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
}

@media (max-width: 576px) {
    .card {
        margin: 0.5rem 0;
    }

    .card-body {
        padding: 1rem;
    }
}

/* Responsive Spacing */
@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .section-padding {
        padding: 2rem 0;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Responsive Forms */
.form-control {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 0.75rem 1rem;
}

@media (max-width: 576px) {
    .form-group {
        margin-bottom: 1rem;
    }

    .form-label {
        margin-bottom: 0.5rem;
    }
}

