* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-form h1 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1.5rem;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #666;
    font-size: 1.2rem;
    font-weight: normal;
}

/* Dashboard Styles */
.dashboard {
    min-height: 100vh;
}

.dashboard-header {
    background: #2c3e50;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-header h1 {
    font-size: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.dashboard-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.dashboard-card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    word-wrap: break-word;
}

.dashboard-card p {
    margin-bottom: 1.5rem;
    color: #666;
    word-wrap: break-word;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

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

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    word-wrap: break-word;
    text-align: center;
}

.btn:hover {
    background: #5a67d8;
}

.btn-primary {
    background: #667eea;
}

.btn-primary:hover {
    background: #5a67d8;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-danger {
    background: #dc3545;
}

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Message Styles */
.message {
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 5px;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 5px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Section Styles */
.section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.section h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

/* User Management Styles */
.user-form {
    margin-bottom: 2rem;
}

.users-table-container {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.users-table th,
.users-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.users-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.users-table tr:hover {
    background: #f8f9fa;
}

.actions {
    white-space: nowrap;
}

.actions form {
    margin-right: 0.5rem;
}

/* Hospital Management Styles */
.hospital-form {
    margin-bottom: 2rem;
}

.hospitals-table-container {
    overflow-x: auto;
}

.hospitals-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.hospitals-table th,
.hospitals-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.hospitals-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.hospitals-table tr:hover {
    background: #f8f9fa;
}

.form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-disabled:hover {
    background: #6c757d;
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* Specialization Management Styles */
.specialization-form {
    margin-bottom: 2rem;
}

.specialization-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s;
}

.specialization-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.specializations-table-container {
    overflow-x: auto;
}

.specializations-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.specializations-table th,
.specializations-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
    vertical-align: top;
}

.specializations-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.specializations-table tr:hover {
    background: #f8f9fa;
}

.specialization-name {
    font-weight: 500;
    color: #2c3e50;
}

.specialization-description {
    max-width: 300px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.specialization-description em {
    color: #999;
}

/* Search Bar Styles */
.search-bar {
    margin-bottom: 1rem;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-input-group input[type="text"] {
    min-width: 300px;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-input-group input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Responsive adjustments for specialization management */
@media (max-width: 768px) {
    .search-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input-group input[type="text"] {
        min-width: auto;
        width: 100%;
    }
    
    .specializations-table th,
    .specializations-table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .specialization-description {
        max-width: 200px;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-actions .btn {
        margin-bottom: 0.5rem;
    }
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.welcome-message h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* User Welcome Section */
.user-welcome {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.user-welcome h2 {
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.user-role {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

.training-hospital {
    font-size: 1rem;
    opacity: 0.8;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Quick Actions */
.quick-actions {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.quick-actions h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-action-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.quick-action-item:hover {
    background: #e9ecef;
    border-color: #667eea;
    color: #2c3e50;
    text-decoration: none;
    transform: translateY(-2px);
}

.quick-action-item.logout:hover {
    border-color: #dc3545;
    background: #f8d7da;
}

.quick-action-item .icon {
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

.quick-action-item .text {
    font-weight: 500;
}

/* Password Change Form Styles */
.password-change-form {
    max-width: 500px;
}

.password-change-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 2rem;
    text-align: left;
}

.password-requirements {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 1rem;
    margin: 1rem 0;
}

.password-requirements h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #495057;
    font-size: 1rem;
}

.password-requirements ul {
    margin: 0;
    padding-left: 1.5rem;
}

.password-requirements li {
    margin-bottom: 0.25rem;
    color: #6c757d;
}

.form-help {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.form-footer {
    margin-top: 1rem;
    text-align: center;
}

.back-link {
    margin-bottom: 1rem;
    text-align: left;
}

/* Profile Page Styles */
.profile-form {
    margin-bottom: 2rem;
}

.hospitals-form {
    margin-bottom: 2rem;
}

.hospitals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.hospital-checkbox {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.hospital-checkbox:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.hospital-checkbox input[type="checkbox"] {
    margin-right: 1rem;
    transform: scale(1.2);
}

.hospital-info {
    flex: 1;
}

.hospital-abbr {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Specializations Form Styles */
.specializations-form {
    margin-bottom: 2rem;
}

.specializations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fafafa;
}

.specialization-checkbox {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem;
    background: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.specialization-checkbox:hover {
    background: #f0f7ff;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.specialization-checkbox input[type="checkbox"]:checked + .specialization-info {
    color: #155724;
}

.specialization-checkbox:has(input[type="checkbox"]:checked) {
    background: #d4edda;
    border-color: #28a745;
}

.specialization-checkbox input[type="checkbox"] {
    margin-right: 0.75rem;
    margin-top: 0.25rem;
    transform: scale(1.1);
    accent-color: #28a745;
    flex-shrink: 0;
}

.specialization-info {
    flex: 1;
    line-height: 1.4;
}

.specialization-info strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #2c3e50;
    font-size: 0.95rem;
}

.specialization-desc {
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.3;
}

.specializations-summary {
    margin: 1rem 0;
    padding: 1rem;
    background: #e9ecef;
    border-radius: 6px;
    text-align: center;
}

.specializations-summary p {
    margin: 0;
    font-size: 0.95rem;
}

.specializations-summary #selected-count {
    color: #28a745;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Educator checkbox styling */
.form-group input[type="checkbox"] + label,
.form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    margin: 0;
}

.form-group input[type="checkbox"] {
    margin-right: 0.5rem;
    transform: scale(1.1);
    accent-color: #667eea;
}

.form-group label:has(input[type="checkbox"]) {
    padding: 0.75rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    transition: all 0.3s;
}

.form-group label:has(input[type="checkbox"]:checked) {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.form-group label:has(input[type="checkbox"]):hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.account-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

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

.info-row label {
    font-weight: 500;
    color: #495057;
    margin: 0;
}

.account-actions {
    text-align: center;
}

/* Educator Only Card */
.educator-only {
    border: 2px solid #28a745;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.educator-only h3 {
    color: #155724;
}

.educator-only p {
    color: #155724;
}

/* Training Overview and Progress Styles */
.training-overview {
    margin-bottom: 2rem;
}

.training-card {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #ffc107;
}

.training-card h3 {
    color: #856404;
    margin-bottom: 1.5rem;
    text-align: center;
}

.training-dates-display {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.training-start,
.training-end {
    background: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #856404;
    font-weight: 500;
}

.dashboard-progress-bar {
    background: rgba(255, 255, 255, 0.6);
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid #e0a800;
}

.dashboard-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    border-radius: 10px;
    transition: width 0.8s ease-in-out;
    position: relative;
}

.dashboard-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.progress-percentage {
    font-size: 1.4rem;
    font-weight: bold;
    color: #28a745;
}

.remaining-time,
.upcoming-time {
    background: #17a2b8;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.upcoming-time {
    background: #6c757d;
}

.completed-badge {
    background: #28a745;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Training Dates in Profile */
.training-dates {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.training-dates h3 {
    color: #495057;
    margin-bottom: 1rem;
    border-bottom: 2px solid #ffc107;
    padding-bottom: 0.5rem;
}

.training-progress {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #e9ecef;
    border-radius: 8px;
}

.progress-info p {
    margin: 0.5rem 0;
}

.progress-bar {
    background: #dee2e6;
    height: 16px;
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff 0%, #28a745 100%);
    border-radius: 8px;
    transition: width 0.5s ease-in-out;
}

.progress-text {
    text-align: center;
    font-weight: 500;
    color: #495057;
}

/* Planning Page Styles */
.module-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.module-form .form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.module-form .form-group {
    flex: 1;
    min-width: 250px;
}

.module-form .form-group.full-width {
    flex-basis: 100%;
}

.specializations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.specialization-item {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.specialization-item:has(.spec-checkbox:checked) {
    border-color: #007bff;
    background: #e3f2fd;
}

.specialization-checkbox {
    cursor: pointer;
    display: block;
    margin-bottom: 0.5rem;
}

.specialization-checkbox input[type="checkbox"] {
    margin-right: 0.5rem;
}

.spec-desc {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

.spec-full-name {
    display: block;
    font-size: 0.85rem;
    color: #007bff;
    margin-top: 0.15rem;
    font-weight: normal;
}

.supervisor-select {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.supervisor-select label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.supervisor-dropdown {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.module-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.vacation-module {
    border-left: 5px solid #28a745;
}

.vacation-module .module-header {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.module-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.module-header h3 {
    color: #333;
    margin: 0;
}

.vacation-badge {
    background: #28a745;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.module-details {
    padding: 1.5rem;
}

.module-info p {
    margin-bottom: 0.5rem;
    color: #495057;
}

.module-info strong {
    color: #212529;
    font-weight: 600;
}

.specializations-list {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.specializations-list ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
}

.specializations-list li {
    padding: 0.25rem 0;
    border-bottom: 1px solid #e9ecef;
}

.specializations-list li:last-child {
    border-bottom: none;
}

.module-actions {
    margin-top: 1.5rem;
    text-align: right;
}

.no-modules {
    text-align: center;
    padding: 3rem 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.no-modules p {
    color: #6c757d;
    font-size: 1.1rem;
    margin: 0;
}

.btn-small {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.readonly {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    color: #495057;
}

/* Form validation styles for planning */
.form-group input:invalid,
.form-group select:invalid {
    border-color: #dc3545;
}

.form-group input:valid,
.form-group select:valid {
    border-color: #28a745;
}

.form-help {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
    display: block;
}

/* Message styles specific to planning */
.planning-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 500;
}

.planning-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.planning-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive adjustments for planning */
@media (max-width: 768px) {
    .modules-grid {
        grid-template-columns: 1fr;
    }
    
    .specializations-grid {
        grid-template-columns: 1fr;
    }
    
    .module-form .form-row {
        flex-direction: column;
    }
    
    .module-form .form-group {
        min-width: 100%;
    }
    
    .module-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Animation for module cards */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.module-card {
    animation: slideInUp 0.6s ease forwards;
}

.module-card:nth-child(even) {
    animation-delay: 0.1s;
}

.module-card:nth-child(3n) {
    animation-delay: 0.2s;
}

/* Training Overview Timeline Styles */
.timeline-header {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    text-align: center;
}

.timeline-header h2 {
    color: #333;
    margin-bottom: 1rem;
}

.timeline-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.timeline-info p {
    margin: 0;
    color: #666;
    font-size: 1.1rem;
}

.hospital-legend {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.hospital-legend h3 {
    margin-bottom: 1rem;
    color: #333;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 20px;
    font-size: 0.9rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
}

.timeline-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    min-height: 400px;
}

.time-axis {
    position: relative;
    height: 50px;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 2rem;
}

.time-marker {
    position: absolute;
    top: 0;
    height: 100%;
    border-left: 1px solid #ced4da;
    padding-left: 0.5rem;
}

.time-label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

/* Yearly Timeline Layout */
.yearly-timeline {
    margin: 2rem 0;
}

.year-row {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.year-label {
    background: #f8f9fa;
    padding: 2rem 1.5rem;
    min-width: 80px;
    text-align: center;
    border-right: 2px solid #e9ecef;
}

.year-label h4 {
    margin: 0;
    color: #495057;
    font-size: 1.2rem;
    font-weight: 600;
}

.year-timeline {
    flex: 1;
    height: 120px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.month-headers {
    display: flex;
    height: 20px;
    width: 100%;
    border-bottom: 1px solid #dee2e6;
}

.month-header {
    background: #f8f9fa;
    text-align: center;
    padding: 0.25rem 0;
    font-size: 0.8rem;
    font-weight: 500;
    color: #495057;
    border-right: 1px solid #dee2e6;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.month-header:last-child {
    border-right: none;
}

.year-modules-container {
    position: relative;
    height: 100px;
    width: 100%;
}

.continuous-module-bar {
    position: absolute;
    top: 0;
    height: 100px;
    color: white;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.continuous-module-bar:hover {
    transform: translateY(-2px);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Adjust specialization text for continuous bars */
.continuous-module-bar .module-specializations-text {
    padding: 0.25rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.2rem;
}

.continuous-module-bar .spec-text-item {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin: 0.05rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.empty-year {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    width: 100%;
    background: #f8f9fa;
    color: #6c757d;
    font-style: italic;
}

.no-training-dates {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.no-training-dates p {
    color: #6c757d;
    font-size: 1.1rem;
    margin: 0;
}

.vacation-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 0.9rem;
    font-weight: bold;
}

.vacation-icon {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* Module specializations text inside bars */
.module-specializations-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 0.5rem;
    gap: 0.25rem;
}

.spec-text-item {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    box-sizing: border-box;
}

/* Tooltip Styles */
.module-tooltip {
    position: fixed;
    display: none;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #dee2e6;
    max-width: 350px;
    z-index: 1000;
    pointer-events: none;
    font-size: 0.9rem;
}

.tooltip-content {
    padding: 0;
}

.tooltip-header {
    background: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
}

.tooltip-header h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.tooltip-hospital {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.tooltip-body {
    padding: 1rem;
}

.tooltip-body p {
    margin: 0 0 0.75rem 0;
    color: #495057;
}

.tooltip-body p:last-child {
    margin-bottom: 0;
}

.tooltip-specializations {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.tooltip-specializations strong {
    color: #333;
    display: block;
    margin-bottom: 0.5rem;
}

.tooltip-specializations ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tooltip-specializations li {
    padding: 0.25rem 0;
    color: #495057;
    font-size: 0.85rem;
}

.tooltip-specializations li strong {
    color: #007bff;
    display: inline;
    margin: 0;
}

.vacation-note {
    background: #d4edda;
    color: #155724;
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
}

.training-summary {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.training-summary h3 {
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.summary-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.summary-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.summary-card.full-width {
    grid-column: 1 / -1;
}

.summary-card h4 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.summary-value {
    font-size: 2rem;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 0.5rem;
}

.summary-detail {
    color: #6c757d;
    font-size: 0.9rem;
}

.specializations-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.spec-badge {
    background: #007bff;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Responsive timeline */
@media (max-width: 768px) {
    .timeline-container {
        padding: 1rem;
    }
    
    .module-bar {
        min-width: 150px;
        height: 80px;
    }
    
    .module-timeline-row {
        height: 100px;
    }
    
    .timeline-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .legend-items {
        justify-content: center;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .user-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-row {
        flex-direction: column;
    }

    .dashboard-content {
        padding: 1rem;
    }

    .section {
        padding: 1rem;
    }

    .users-table th,
    .users-table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .actions form {
        display: block;
        margin-bottom: 0.5rem;
        margin-right: 0;
    }

    /* Mobile adjustments for new elements */
    .user-welcome {
        padding: 1.5rem 1rem;
    }

    .user-welcome h2 {
        font-size: 1.5rem;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr;
    }

    .hospitals-grid {
        grid-template-columns: 1fr;
    }

    .hospital-checkbox {
        padding: 0.75rem;
    }

    /* Mobile specializations adjustments */
    .specializations-grid {
        grid-template-columns: 1fr;
        max-height: 300px;
        padding: 0.75rem;
    }

    .specialization-checkbox {
        padding: 0.5rem;
    }

    .specialization-info strong {
        font-size: 0.9rem;
    }

    .specialization-desc {
        font-size: 0.8rem;
    }

    .password-change-form {
        max-width: 100%;
    }

    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

/* Very small mobile devices */
@media (max-width: 480px) {
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    /* Mobile training adjustments */
    .training-card {
        padding: 1.5rem 1rem;
    }

    .training-dates-display {
        flex-direction: column;
        align-items: center;
    }

    .progress-stats {
        flex-direction: column;
        text-align: center;
    }

    .progress-percentage {
        font-size: 1.2rem;
    }

    .training-dates {
        padding: 1rem;
    }
}