
        /* Sidebar styles */
        .sidebar {
            position: fixed;
            top: 0;
            left: -250px; /* Hidden by default */
            width: 250px;
            height: 100%;
            background-color: #2c3e50; /* Dark background like header */
            transition: left 0.3s ease;
            z-index: 1000;
            padding-top: 60px; /* Space for header */
        }

        .sidebar.active {
            left: 0;
        }

        .sidebar-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 999;
        }

        .sidebar-overlay.active {
            display: block;
        }

        /* Hamburger menu styles */
        .menu-toggle {
            color: white;
            font-size: 24px;
            cursor: pointer;
            display: block; /* Always show hamburger */
            margin-right: 15px;
            z-index: 910;
        }

        /* Navbar styles */
        .navbar {
            background-color: #2c3e50;
            color: white;
            padding: 10px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 900;
        }

        .navbar-left {
            display: flex;
            align-items: center;
        }

        .navbar-left h1 {
            margin: 0;
            margin-left: 15px;
            font-size: 22px;
        }

        .navbar-right {
            display: flex;
            align-items: center;
        }

        .user-actions {
            display: flex;
            gap: 10px;
        }

        .btn-auth,
        .btn-settings {
            background-color: #3498db;
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.3s;
        }

        .btn-auth:hover,
        .btn-settings:hover {
            background-color: #2980b9;
        }

        /* Server feedback display */
        .server-message {
            background-color: rgba(255, 255, 255, 0.9);
            color: var(--text-color);
            padding: 10px 15px;
            border-radius: 4px;
            position: fixed;
            top: 80px;
            right: 20px;
            z-index: 1000;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
            display: none;
            max-width: 300px;
        }

        .server-message.success {
            border-left: 4px solid var(--secondary-color);
        }

        .server-message.error {
            border-left: 4px solid var(--danger-color);
        }

        .server-message.info {
            border-left: 4px solid var(--primary-color);
        }

        /* Main content */
        main {
            margin-left: 0;
            padding: 20px;
            padding-top: 70px; /* Space for fixed header */
            transition: margin-left 0.3s ease;
        }

        /* Modal styles */
        .modal {
            display: none;
            position: fixed;
            z-index: 1001;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(0, 0, 0, 0.4);
        }

        .modal-content {
            background-color: #fefefe;
            margin: 15% auto;
            padding: 20px;
            border: 1px solid #888;
            width: 80%;
            max-width: 500px;
            border-radius: 8px;
        }

        .close {
            color: #aaa;
            float: right;
            font-size: 28px;
            font-weight: bold;
        }

        .close:hover,
        .close:focus {
            color: black;
            text-decoration: none;
            cursor: pointer;
        }

        /* Medication specific styles */
        .medications-container {
            padding: 20px;
        }
        
        .medications-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        
        .add-medication-btn {
            background-color: #4CAF50;
            color: white;
            border: none;
            border-radius: 4px;
            padding: 8px 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
        }
        
        .add-medication-btn i {
            margin-right: 8px;
        }
        
        .medication-tabs {
            display: flex;
            border-bottom: 1px solid #ddd;
            margin-bottom: 20px;
        }
        
        .medication-tab {
            padding: 10px 20px;
            cursor: pointer;
            border: 1px solid transparent;
            border-bottom: none;
            margin-right: 5px;
            border-radius: 5px 5px 0 0;
            background-color: #f5f5f5;
        }
        
        .medication-tab.active {
            background-color: white;
            border-color: #ddd;
            border-bottom-color: white;
            margin-bottom: -1px;
            color: #4CAF50;
            font-weight: bold;
        }
        
        .tab-content {
            display: none;
        }
        
        .tab-content.active {
            display: block;
        }
        
        .medications-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
        }
        
        .medication-card {
            background-color: #fff;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            padding: 15px;
            position: relative;
            border-left: 5px solid #4CAF50;
        }
        
        .medication-card.inactive {
            border-left-color: #9e9e9e;
            opacity: 0.8;
        }
        
        .medication-card.critical {
            border-left-color: #f44336;
        }
        
        .medication-card.as-needed {
            border-left-color: #2196F3;
        }
        
        .medication-status {
            position: absolute;
            top: 10px;
            right: 10px;
            padding: 3px 8px;
            border-radius: 12px;
            font-size: 12px;
            color: white;
        }
        
        .status-active {
            background-color: #4CAF50;
        }
        
        .status-inactive {
            background-color: #9e9e9e;
        }
        
        .status-as-needed {
            background-color: #2196F3;
        }
        
        .status-critical {
            background-color: #f44336;
        }
        
        .medication-name {
            font-size: 18px;
            font-weight: bold;
            margin-top: 5px;
            margin-bottom: 10px;
        }
        
        .medication-details {
            margin-bottom: 15px;
        }
        
        .medication-detail {
            display: flex;
            margin-bottom: 5px;
        }
        
        .detail-label {
            font-weight: bold;
            width: 100px;
            flex-shrink: 0;
        }
        
        .detail-value {
            flex: 1;
        }
        
        .medication-schedule {
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px solid #eee;
        }
        
        .schedule-title {
            font-weight: bold;
            margin-bottom: 5px;
        }
        
        .schedule-times {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            margin-bottom: 10px;
        }
        
        .schedule-time {
            background-color: #e0f2f1;
            padding: 3px 8px;
            border-radius: 12px;
            font-size: 12px;
        }
        
        .medication-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 15px;
        }
        
        .edit-btn, .refill-btn, .take-btn {
            border: none;
            border-radius: 4px;
            padding: 6px 12px;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
        }
        
        .edit-btn i, .refill-btn i, .take-btn i {
            margin-right: 5px;
        }
        
        .edit-btn {
            background-color: #2196F3;
            color: white;
        }
        
        .refill-btn {
            background-color: #FF9800;
            color: white;
        }
        
        .take-btn {
            background-color: #4CAF50;
            color: white;
        }
        
        .delete-btn {
            background-color: #f44336;
            color: white;
            border: none;
            border-radius: 4px;
            padding: 6px 12px;
            cursor: pointer;
        }
        
        .medication-form {
            background-color: #fff;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            padding: 20px;
            margin-bottom: 20px;
            display: none;
        }
        
        .form-group {
            margin-bottom: 15px;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
        }
        
        .form-group input,
        .form-group select,
        .form-group textarea {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            box-sizing: border-box;
        }
        
        .form-group textarea {
            height: 100px;
            resize: vertical;
        }
        
        .form-row {
            display: flex;
            gap: 15px;
        }
        
        .form-row .form-group {
            flex: 1;
        }
        
        .form-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 15px;
        }
        
        .save-btn {
            background-color: #4CAF50;
            color: white;
            border: none;
            border-radius: 4px;
            padding: 10px 15px;
            cursor: pointer;
        }
        
        .cancel-form-btn {
            background-color: #f44336;
            color: white;
            border: none;
            border-radius: 4px;
            padding: 10px 15px;
            cursor: pointer;
        }
        
        .reminder-settings {
            background-color: #f5f5f5;
            padding: 10px;
            border-radius: 4px;
            margin-top: 5px;
        }
        
        .reminder-title {
            font-weight: bold;
            margin-bottom: 5px;
        }
        
        .reminder-options {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }
        
        .reminder-option {
            display: flex;
            align-items: center;
        }
        
        .reminder-option input {
            margin-right: 5px;
        }
        
        .schedule-builder {
            background-color: #f5f5f5;
            padding: 15px;
            border-radius: 4px;
            margin-top: 10px;
        }
        
        .schedule-builder-title {
            font-weight: bold;
            margin-bottom: 10px;
        }
        
        .time-slots {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 10px;
        }
        
        .time-slot {
            display: flex;
            align-items: center;
        }
        
        .time-slot input {
            margin-right: 5px;
        }
        
        .time-slot-custom {
            display: flex;
            align-items: center;
            margin-top: 10px;
        }
        
        .time-slot-custom input[type="time"] {
            width: 120px;
            margin-right: 10px;
        }
        
        .add-time-btn {
            background-color: #2196F3;
            color: white;
            border: none;
            border-radius: 4px;
            padding: 5px 10px;
            cursor: pointer;
        }
        
        .selected-times {
            margin-top: 10px;
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }
        
        .selected-time {
            background-color: #e0f2f1;
            display: flex;
            align-items: center;
            padding: 5px 10px;
            border-radius: 15px;
        }
        
        .remove-time {
            color: #f44336;
            cursor: pointer;
            margin-left: 5px;
        }
        
        .medication-history {
            margin-top: 20px;
        }
        
        .history-title {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 10px;
            padding-bottom: 5px;
            border-bottom: 1px solid #eee;
        }
        
        .history-list {
            border: 1px solid #eee;
            border-radius: 5px;
            overflow: hidden;
        }
        
        .history-item {
            padding: 10px 15px;
            border-bottom: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .history-item:last-child {
            border-bottom: none;
        }
        
        .history-date {
            color: #666;
            font-size: 14px;
        }
        
        .history-action {
            font-weight: bold;
        }
        
        .history-action.taken {
            color: #4CAF50;
        }
        
        .history-action.missed {
            color: #f44336;
        }
        
        .history-action.refilled {
            color: #FF9800;
        }
        
        .interaction-alert {
            background-color: #ffebee;
            border-left: 5px solid #f44336;
            padding: 15px;
            margin-bottom: 20px;
            border-radius: 4px;
        }
        
        .interaction-title {
            color: #f44336;
            font-weight: bold;
            margin-bottom: 5px;
            display: flex;
            align-items: center;
        }
        
        .interaction-title i {
            margin-right: 10px;
        }
        
        .interaction-meds {
            font-weight: bold;
            margin-bottom: 5px;
        }
        
        .interaction-description {
            margin-bottom: 0;
        }
        
        .med-search {
            margin-bottom: 20px;
            display: flex;
        }
        
        .med-search input {
            flex: 1;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px 0 0 4px;
        }
        
        .med-search button {
            background-color: #4CAF50;
            color: white;
            border: none;
            padding: 10px 15px;
            border-radius: 0 4px 4px 0;
            cursor: pointer;
        }
        
        .low-supply-alert {
            display: inline-block;
            background-color: #f44336;
            color: white;
            padding: 2px 6px;
            border-radius: 3px;
            font-size: 12px;
            margin-left: 5px;
        }
        
        /* Pill tracker styles */
        .pill-tracker {
            background-color: #f9f9f9;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 20px;
        }
        
        .today-meds {
            margin-bottom: 15px;
        }
        
        .today-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .med-time-group {
            border: 1px solid #eee;
            border-radius: 5px;
            margin-bottom: 15px;
        }
        
        .time-group-header {
            background-color: #e0f2f1;
            padding: 10px;
            font-weight: bold;
            border-radius: 5px 5px 0 0;
        }
        
        .med-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 15px;
            border-bottom: 1px solid #eee;
        }
        
        .med-item:last-child {
            border-bottom: none;
        }
        
        .med-details {
            flex: 1;
        }
        
        .med-name {
            font-weight: bold;
        }
        
        .med-info {
            color: #666;
            font-size: 14px;
        }
        
        .med-status {
            display: flex;
            align-items: center;
        }
        
        .status-pending {
            color: #FF9800;
        }
        
        .status-taken {
            color: #4CAF50;
        }
        
        .status-missed {
            color: #f44336;
        }
        
        .med-btn {
            margin-left: 10px;
            padding: 5px 10px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
        
        .taken-btn {
            background-color: #4CAF50;
            color: white;
        }
        
        .skip-btn {
            background-color: #9e9e9e;
            color: white;
        }
        
        /* Mobile responsiveness */
        @media (max-width: 768px) {
            .medications-grid {
                grid-template-columns: 1fr;
            }
            
            .form-row {
                flex-direction: column;
                gap: 0;
            }
            
            .medication-actions {
                flex-wrap: wrap;
            }
            
            .medication-tabs {
                flex-wrap: wrap;
            }
            
            .medication-tab {
                flex-grow: 1;
                text-align: center;
                margin-bottom: 5px;
            }
            
            .history-item {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .history-date {
                margin-top: 5px;
            }
        }
