/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Navigation Styles */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.15);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-icon {
    background: rgba(255,255,255,0.2);
    padding: 0.75rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-icon i {
    font-size: 1.5rem;
    color: #fff;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.brand-subtitle {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    font-weight: 400;
}

.nav-menu {
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-weight: 500;
    position: relative;
}

.nav-link:hover {
    background: rgba(255,255,255,0.15);
    color: white;
    transform: translateY(-1px);
}

.nav-link.active {
    background: rgba(255,255,255,0.2);
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nav-link i {
    font-size: 1.1rem;
}

.nav-text {
    font-size: 0.9rem;
}

.notification-badge {
    background: #ff4757;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    min-width: 1.2rem;
    text-align: center;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.user-profile:hover {
    background: rgba(255,255,255,0.15);
}

.user-avatar {
    background: rgba(255,255,255,0.2);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar i {
    font-size: 1.1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1;
}

.user-role {
    font-size: 0.75rem;
    opacity: 0.8;
    line-height: 1;
    margin-top: 0.1rem;
}

/* Main Content */
.main-content {
    margin-top: 80px;
    padding: 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 0;
}

.section-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.section-filters {
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Dashboard Styles */
.filters {
    display: flex;
    gap: 1rem;
}

.filter-select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-tile {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.dashboard-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.dashboard-tile.clickable {
    cursor: pointer;
}

.dashboard-tile.clickable:hover {
    background: #f8f9fa;
}

.tile-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.5rem;
}

.tile-content h3 {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.tile-number {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
}

.tile-subtitle {
    font-size: 0.8rem;
    color: #666;
}

/* Journey Management */
.journey-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: #e9ecef;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tab-content {
    margin-top: 1rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.journey-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.journey-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.journey-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.journey-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.journey-header h3 {
    color: #2c3e50;
    margin: 0;
}

.journey-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.journey-status.active {
    background: #d4edda;
    color: #155724;
}

.journey-info p {
    margin: 0.5rem 0;
    color: #666;
}

.journey-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Blocks Management */
.blocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.block-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.block-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.block-header h3 {
    color: #2c3e50;
    margin: 0;
}

.block-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.block-tag.device {
    background: #e1f5fe;
    color: #0277bd;
}

.block-tag.lab-test {
    background: #f3e5f5;
    color: #7b1fa2;
}

.block-tag.consultation {
    background: #e8f5e8;
    color: #2e7d32;
}

.block-info p {
    margin: 0.5rem 0;
    color: #666;
}

.status.active {
    color: #28a745;
}

.block-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* User Journeys Table */
.user-journey-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-container {
    position: relative;
    width: 300px;
}

.search-input {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.search-container i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.users-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th {
    background: #f8f9fa;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 1px solid #dee2e6;
}

.users-table td {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.user-name {
    font-weight: 600;
    color: #2c3e50;
}

.user-id {
    font-size: 0.8rem;
    color: #666;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.paused {
    background: #fff3cd;
    color: #856404;
}

.status-badge.completed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-badge.upcoming {
    background: #e2e3e5;
    color: #383d41;
}

.status-badge.terminated {
    background: #f8d7da;
    color: #721c24;
}

.progress-bar {
    width: 100px;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    display: inline-block;
    margin-right: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: #666;
}

/* Task Management */
.task-filters {
    display: flex;
    gap: 1rem;
}

.tasks-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.task-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #e9ecef;
}

.task-card.critical {
    border-left-color: #dc3545;
}

.task-card.delayed {
    border-left-color: #ffc107;
}

.task-card.missed {
    border-left-color: #dc3545;
}

.task-card.cancelled {
    border-left-color: #6c757d;
    opacity: 0.8;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.task-info h3 {
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
}

.task-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.task-meta span {
    font-size: 0.8rem;
    color: #666;
    padding: 0.25rem 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.task-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.task-status-badge.critical {
    background: #f8d7da;
    color: #721c24;
}

.task-status-badge.open {
    background: #d4edda;
    color: #155724;
}

.task-status-badge.delayed {
    background: #fff3cd;
    color: #856404;
}

.task-content p {
    margin: 0.5rem 0;
    color: #666;
}

.task-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-content.large {
    max-width: 900px;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
}

.close {
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.close:hover {
    color: #dc3545;
}

.modal-body {
    padding: 1.5rem;
}

/* Form Styles */
.form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.form-note small {
    color: #666;
    font-size: 0.8rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.mapping-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mapping-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.mapping-item select {
    flex: 1;
}

/* Timeline Styles */
.journey-timeline {
    position: relative;
    padding-left: 2rem;
}

.journey-timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.timeline-marker {
    position: absolute;
    left: -2.5rem;
    top: 1rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #dee2e6;
}

.timeline-item.completed .timeline-marker {
    background: #28a745;
    box-shadow: 0 0 0 2px #28a745;
}

.timeline-item.open .timeline-marker {
    background: #007bff;
    box-shadow: 0 0 0 2px #007bff;
}

.timeline-item.upcoming .timeline-marker {
    background: #6c757d;
    box-shadow: 0 0 0 2px #6c757d;
}

.timeline-content {
    margin-left: 0.5rem;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.task-header h4 {
    margin: 0;
    color: #2c3e50;
}

.task-status {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.task-status.completed {
    background: #d4edda;
    color: #155724;
}

.task-status.open {
    background: #cce5ff;
    color: #004085;
}

.task-status.upcoming {
    background: #e2e3e5;
    color: #383d41;
}

.task-details p {
    margin: 0.25rem 0;
    color: #666;
    font-size: 0.9rem;
}

.task-actions {
    margin-top: 1rem;
}

/* Blocks Container */
.blocks-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.available-blocks,
.selected-blocks {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    min-height: 300px;
}

.available-blocks h4,
.selected-blocks h4 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.block-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.block-item {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.block-item:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.block-item.selected {
    background: #e7f1ff;
    border-color: #667eea;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 1rem 0 0.5rem 0;
    color: #2c3e50;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-content {
        padding: 1rem;
        margin-top: 120px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .journey-grid {
        grid-template-columns: 1fr;
    }
    
    .blocks-grid {
        grid-template-columns: 1fr;
    }
    
    .blocks-container {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    .users-table-container {
        overflow-x: auto;
    }
    
    .task-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .journey-actions,
    .block-actions,
    .task-actions {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section.active {
    animation: fadeIn 0.3s ease;
}

/* Loading States */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 3000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 350px;
    border-left: 4px solid #007bff;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left-color: #28a745;
}

.notification-error {
    border-left-color: #dc3545;
}

.notification-warning {
    border-left-color: #ffc107;
}

.notification-info {
    border-left-color: #17a2b8;
}

.notification-content {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    margin-left: 1rem;
}

.notification-close:hover {
    color: #333;
}

/* Task List Modal Styles */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.task-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid #e9ecef;
}

.task-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.task-item-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1rem;
}

.task-item-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.task-item-actions {
    display: flex;
    gap: 0.5rem;
}

/* Task Status Colors */
.task-item.critical {
    border-left-color: #dc3545;
}

.task-item.open {
    border-left-color: #28a745;
}

.task-item.missed {
    border-left-color: #ffc107;
}

.task-item.delayed {
    border-left-color: #fd7e14;
}

/* Additional Modal Styles */
.modal-content.task-modal {
    max-height: 80vh;
}

.modal-content.task-modal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

/* Responsive Notification */
@media (max-width: 768px) {
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* Role Switcher */
.role-switcher {
    margin-right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.role-switcher label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    margin: 0;
}

.role-select {
    padding: 0.25rem 0.5rem;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 0.8rem;
    min-width: 100px;
}

.role-select:focus {
    outline: none;
    border-color: rgba(255,255,255,0.5);
}

.role-select option {
    background: #333;
    color: white;
}

/* Role-based visibility */
.admin-only {
    display: none;
}

.coach-only {
    display: flex;
}

.manager-only {
    display: none;
}

/* Dashboard role views */
.dashboard-view-admin .admin-only {
    display: flex !important;
}

.dashboard-view-manager .manager-only {
    display: flex !important;
}

/* Dashboard Manager View */
.manager-only {
    display: none;
}

.dashboard-view-manager .manager-only {
    display: flex;
}

/* Form Elements */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.checkbox-option:hover {
    background: #f8f9fa;
}

.checkbox-option input[type="checkbox"] {
    margin: 0;
}

.checkbox-option span {
    font-weight: 500;
}

.checkbox-option small {
    display: block;
    color: #666;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.radio-option:hover {
    background: #f8f9fa;
}

.radio-option input[type="radio"] {
    margin: 0;
}

/* Task Creation Form */
.notification-config {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1rem;
    background: #f8f9fa;
}

.notification-content {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.notification-content label {
    display: block;
    margin-bottom: 0.5rem;
    margin-top: 0.75rem;
}

.notification-content label:first-child {
    margin-top: 0;
}

.subtasks-container {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1rem;
    background: #f8f9fa;
}

.subtask-info {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #e3f2fd;
    border-radius: 6px;
    border-left: 4px solid #2196f3;
}

.subtask-info .form-help {
    margin: 0 0 0.75rem 0;
    color: #1565c0;
    font-weight: 500;
}

.subtask-triggers h5 {
    color: #1565c0;
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.subtask-triggers ul {
    margin: 0;
    padding-left: 1.2rem;
    color: #333;
}

.subtask-triggers li {
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

.task-list-editor {
    margin-bottom: 1rem;
}

.subtask-item {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.subtask-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.subtask-header h5 {
    color: #495057;
    margin: 0;
}

.subtask-basic-info {
    margin-bottom: 1rem;
}

.subtask-properties {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.subtask-type-fields,
.subtask-frequency-fields {
    margin: 1rem 0;
    padding: 0.75rem;
    background: white;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.subtask-trigger-note {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    border-left: 4px solid #f39c12;
}

.subtask-trigger-note small {
    color: #856404;
    font-weight: 500;
}

.subtask-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.subtask-controls small {
    color: #666;
    font-style: italic;
}

.block-start-day-info {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #e7f1ff;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.block-start-day-info small {
    color: #004085;
    font-size: 0.8rem;
    line-height: 1.4;
}

.selected-block-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selected-block-info {
    flex: 1;
}

.selected-block-info h5 {
    margin: 0 0 0.25rem 0;
    color: #2c3e50;
}

.selected-block-info small {
    color: #666;
}

.block-start-day-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.block-start-day-input label {
    font-size: 0.8rem;
    color: #666;
    white-space: nowrap;
}

.block-start-day-input input {
    width: 80px;
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
}

.remove-block-btn {
    margin-left: 0.5rem;
}

/* Journey Status Management */
.current-status {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.current-status h3 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.current-status p {
    margin: 0;
    color: #666;
}

.status-impact {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 1rem;
    display: none;
}

.status-impact.show {
    display: block;
}

.status-impact.warning {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.status-impact.danger {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Calendar View */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.calendar-controls h3 {
    margin: 0;
    color: #2c3e50;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.calendar-day {
    background: white;
    min-height: 80px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.calendar-day.other-month {
    background: #f8f9fa;
    color: #6c757d;
}

.calendar-day.today {
    background: #e7f1ff;
    border: 2px solid #007bff;
}

.calendar-day-number {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.calendar-tasks {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
}

.calendar-task {
    font-size: 0.7rem;
    padding: 1px 3px;
    border-radius: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-task.completed {
    background: #d4edda;
    color: #155724;
}

.calendar-task.open {
    background: #cce5ff;
    color: #004085;
}

.calendar-task.missed {
    background: #f8d7da;
    color: #721c24;
}

.calendar-task.delayed {
    background: #fff3cd;
    color: #856404;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

.legend-color.completed {
    background: #d4edda;
}

.legend-color.open {
    background: #cce5ff;
}

.legend-color.missed {
    background: #f8d7da;
}

.legend-color.delayed {
    background: #fff3cd;
}

/* Task Status Badges */
.task-status-badge.missed {
    background: #f8d7da;
    color: #721c24;
}

.task-status-badge.cancelled {
    background: #e2e3e5;
    color: #383d41;
}

/* Task Item Status Colors */
.task-item.missed {
    border-left-color: #dc3545;
}

.task-item.cancelled {
    border-left-color: #6c757d;
    opacity: 0.8;
}

/* Responsive Updates */
@media (max-width: 768px) {
    .user-journey-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        width: 100%;
    }
    
    .calendar-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .calendar-grid {
        font-size: 0.8rem;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 0.25rem;
    }
    
    .calendar-legend {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .role-switcher {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

/* Journey Status Styles */
.journey-status.archived {
    background: #e2e3e5;
    color: #383d41;
}

.journey-card.archived {
    opacity: 0.8;
}

/* Non-Journey Tasks */
.non-journey-controls {
    display: flex;
    gap: 1rem;
}

.non-journey-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.task-card.bulk {
    border-left-color: #17a2b8;
}

.task-meta .task-type {
    background: #17a2b8;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
}

/* Target Specific Fields */
#targetSpecificFields {
    margin-top: 1rem;
}

.user-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1rem;
    background: #f8f9fa;
}

.user-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.user-option:hover {
    background: white;
}

.user-option input[type="checkbox"] {
    margin: 0;
}

/* Bulk Task Progress */
.bulk-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.bulk-progress-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.bulk-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.bulk-progress-text {
    font-size: 0.8rem;
    color: #666;
    white-space: nowrap;
}

/* Journey Edit Impact Modal */
.edit-impact-options {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.edit-impact-options h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.impact-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 1rem;
    color: #856404;
}

.impact-warning.danger {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Partner Program Removal Options */
.removal-options {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.removal-options h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.removal-option {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.removal-option:hover {
    background: white;
}

.removal-option input[type="radio"] {
    margin: 0;
    margin-top: 0.25rem;
}

.removal-option-content {
    flex: 1;
}

.removal-option-content strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #2c3e50;
}

.removal-option-content small {
    color: #666;
    font-size: 0.8rem;
}

/* Responsive Updates */
@media (max-width: 768px) {
    .non-journey-controls {
        flex-direction: column;
    }
    
    .non-journey-tabs {
        flex-wrap: wrap;
    }
    
    .bulk-progress {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bulk-progress-text {
        text-align: center;
        margin-top: 0.5rem;
    }
}

/* Pending Requests */
.request-filters {
    display: flex;
    gap: 1rem;
}

.requests-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.request-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #007bff;
}

.request-card.urgent {
    border-left-color: #dc3545;
}

.request-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.request-info h3 {
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
}

.request-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.request-meta span {
    font-size: 0.8rem;
    color: #666;
    padding: 0.25rem 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.request-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.request-status-badge.urgent {
    background: #f8d7da;
    color: #721c24;
}

.request-status-badge.normal {
    background: #d4edda;
    color: #155724;
}

.request-content p {
    margin: 0.5rem 0;
    color: #666;
}

.request-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.request-approval-actions {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

/* Request Type Styling */
.request-meta .request-type {
    background: #007bff;
    color: white;
}

.request-meta .request-coach {
    background: #28a745;
    color: white;
}

/* Action Type Radio Options */
#requestTypeGroup {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

#requestTypeGroup .radio-option {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
}

#requestTypeGroup .radio-option:hover {
    border-color: #007bff;
}

#requestTypeGroup .radio-option input[type="radio"]:checked + span {
    color: #007bff;
    font-weight: 600;
}

/* Responsive Updates */
@media (max-width: 768px) {
    .request-filters {
        flex-direction: column;
    }
    
    .request-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .request-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .request-actions {
        flex-direction: column;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-muted {
    color: #666;
}

.mt-1 {
    margin-top: 1rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* Journey Modal Block Styles */
.blocks-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 1rem 0;
}

.available-blocks, .selected-blocks {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    background: #f9f9f9;
}

.available-blocks h4, .selected-blocks h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
}

.block-item, .selected-block-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.block-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0,123,255,0.15);
}

.block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.block-header h5 {
    margin: 0;
    color: #333;
    font-size: 1rem;
}

.block-tag {
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    text-transform: capitalize;
}

.block-info p {
    margin: 0 0 0.5rem 0;
    color: #666;
    font-size: 0.9rem;
}

.block-info small {
    color: #888;
    font-size: 0.8rem;
}

.selected-block-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.selected-block-info {
    flex: 1;
}

.selected-block-info h5 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
}

.selected-block-info .block-tag {
    font-size: 0.7rem;
}

.selected-block-info small {
    display: block;
    color: #888;
    font-size: 0.75rem;
}

.block-start-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.block-start-day label {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
}

.block-start-day input {
    width: 80px;
    padding: 0.25rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9rem;
}

.no-blocks {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 2rem;
    margin: 0;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.block-start-day-info {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.block-start-day-info small {
    color: #1976d2;
    line-height: 1.4;
}

/* Mapping styles */
.mapping-container {
    margin-bottom: 1rem;
}

.mapping-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.mapping-item select {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .blocks-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .selected-block-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .mapping-item {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Modal Display Fix */
.modal {
    display: none !important;
    position: fixed !important;
    z-index: 9999 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    justify-content: center !important;
    align-items: center !important;
}

.modal-open {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.modal-content {
    background-color: white !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    width: 90% !important;
    max-width: 900px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    position: relative !important;
}

.modal-content.large {
    max-width: 900px !important;
}
