
.dashboard-container {
    padding: 0px;
}

.two-column-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.breadcrumbs a,
.breadcrumbs a:link,
.breadcrumbs a:visited,
.breadcrumbs a:hover,
.breadcrumbs a:active {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    background: none !important;
}

/* Specifically for Moodle's default link styling */
.breadcrumbs a.aalink {
    text-decoration: none !important;
    border-bottom: none !important;
}

/* Force override any existing styles */
.breadcrumbs a[href] {
    text-decoration: none !important;
}

/* Ensure icons in breadcrumbs don't get underlined */
.breadcrumbs i,
.breadcrumbs .fa {
    text-decoration: none !important;
}

/* Left Column */
.left-column {
    width: 250px;
    flex-shrink: 0;
}

.metrics-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Metrics Items */
.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.count-positive {
    background-color: #dcfce7;
    color: #065f46;
}

.count-zero {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Right Column */
.right-column {
    flex: 1;
    min-width: 0;
    width: calc(100% - 280px);
}

/* Cohort Info Block */
.cohort-info {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cohort-info h3 {
    margin: 0 0 15px 0;
    color: #374151;
    font-size: 1.25rem;
}

.cohort-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item label {
    font-size: 0.875rem;
    color: #6B7280;
}

.detail-item span {
    font-size: 1rem;
    color: #374151;
    font-weight: 500;
}

/* Table Container and DataTables Styling */
.table-responsive {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: auto;
}

.dataTables_wrapper {
    width: 100% !important;
    margin: 0 !important;
}

/* Table Base Styling */
.generaltable {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    margin: 0 !important;
}

/* Table Headers */
.generaltable thead {
    display: table-header-group !important;
}

.generaltable th {
    background: #f8fafc !important;
    padding: 12px 8px !important;
    text-align: left;
    font-weight: 500;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
    color: #333;
    cursor: pointer;
    position: relative;
}

/* Table Cells */
.generaltable td {
    padding: 12px 8px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.generaltable td.email-cell {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 90px;
}

/* Profile Picture Column */
.generaltable th:first-child,
.generaltable td:first-child {
    width: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
}

/* Actions Column */
.generaltable th:last-child,
.generaltable td:last-child {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    text-align: center !important;
    padding: 12px 8px !important;
    vertical-align: middle !important;
}

/* Profile Picture */
.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Status Cell */
.status-cell {
    white-space: nowrap;
}

/* Action Icons */
.icon-container {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}

/* DataTables Custom Styling */
.dataTables_wrapper .dataTables_length {
    margin-bottom: 1em;
}

.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1em;
}

.dataTables_wrapper .dataTables_filter input {
    margin-left: 0.5em;
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.3em 0.8em;
    margin: 0 2px;
    border: 1px solid #BD1F28;
    border-radius: 4px;
    background: white;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #BD1F28 !important;
    color: white !important;
    border-color: #BD1F28 !important;
}

@media screen and (max-width: 767px) {
    /* Layout Resets */
    .dashboard-container {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }

    /* Two Column Layout Adjustments */
    .two-column-layout {
        flex-direction: column !important;
        gap: 0 !important;
        width: 100% !important;
    }

    /* Left Column Adjustments */
    .left-column {
        width: 100% !important;
        margin: 0 !important;
    }

    /* Right Column Adjustments */
    .right-column {
        width: 100% !important;
        margin: 0 !important;
    }

    /* Cohort Details Grid */
    .cohort-details {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        padding: 0 !important;
    }

    /* Table Container */
    .table-responsive {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }

    /* DataTables Wrapper */
    .dataTables_wrapper {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Hide Table Headers */
    .generaltable thead {
        display: none !important;
    }

    /* Table Cell Transformations */
    .generaltable td {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        border: none !important;
        border-bottom: 1px solid #eee !important;
        padding: 8px !important;
        min-height: unset !important;
        line-height: 1.5 !important;
        align-items: flex-start !important;
        text-align: left !important;
        box-sizing: border-box !important;
    }

    /* Table Cell Labels */
    .generaltable td::before {
        content: attr(data-label) !important;
        width: 80px !important;
        font-weight: bold !important;
        margin-right: 8px !important;
        flex-shrink: 0 !important;
        text-align: left !important;
    }

    /* Action Icons in Table */
    .icon-container {
        font-size: 20px !important;
        display: flex !important;
        gap: 15px !important;
        justify-content: flex-start !important;
    }

    /* Card Adjustments */
    .rowcard1 .card1 {
        height: 150px !important;
    }

    .rowcard1 {
        margin-bottom: 10px !important;
    }

    /* Remove Metrics List */
    .metrics-list {
        display: none !important;
    }

    /* Breadcrumb Adjustments */
    .breadcrumbs {
        padding: 10px 0 !important;
        font-size: 10px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    /* Remove Reasoning Graphs */
    #reasoning-graphs {
        display: none !important;
    }

    /* Modal Adjustments */
    .search-modal-content {
        margin: 0 !important;
        width: 100% !important;
        max-width: none !important;
        border-radius: 0 !important;
        height: 100vh !important;
        box-sizing: border-box !important;
    }

    /* Cohort Info Block */
    .cohort-info {
        border-radius: 0 !important;
        margin: 0 0 10px 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Email Cell */
    .generaltable td.email-cell {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        max-width: 100% !important;
    }

    /* Status Cell */
    .status-cell {
        white-space: normal !important;
    }

    /* Profile Picture Column */
    .generaltable td:first-child {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Actions Column */
    .generaltable td:last-child {
        width: 100% !important;
        max-width: 100% !important;
        text-align: left !important;
    }
    .help-icon {
        padding: 10px !important;  /* Creates larger touch target */
        margin: -10px !important;  /* Offsets padding to maintain visual alignment */
        font-size: 16px !important;  /* Slightly larger icon */
        cursor: pointer !important;
        position: relative !important;
        z-index: 10 !important;  /* Ensure it's above other elements */
        display: inline-block !important;
        min-width: 44px !important;  /* W3C recommended minimum touch target size */
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        touch-action: manipulation !important;  /* Optimize for touch */
    }
    .custom-tooltip {
        position: absolute !important;
        width: auto !important;
        bottom: 100% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-bottom: 8px !important;
        white-space: nowrap !important;
    }

    .custom-tooltip:after {
        content: "" !important;
        position: absolute !important;
        top: 100% !important;
        left: 50% !important;
        margin-left: -5px !important;
        border-width: 5px !important;
        border-style: solid !important;
        border-color: #333 transparent transparent transparent !important;
    }
}

.sticky-back {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, #BD1F28 0%, #9A1921 100%) !important;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
    border: none;
}

.sticky-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.sticky-back i {
    font-size: 20px;
}

@media (max-width: 768px) {
    .sticky-back {
        bottom: 10px;
        left: 10px;
        width: 40px;
        height: 40px;
    }
    
    .sticky-back i {
        font-size: 16px;
    }
}

.client-logo {
    width: 100%;
    max-width: 120px;
    min-width: 40px;
    height: auto;
    object-fit: contain;
    vertical-align: middle;
    aspect-ratio: 3/2;
  }
  
  /* For very small screens */
  @media screen and (max-width: 480px) {
    .client-logo {
      max-width: 80px;
    }
  }
  
  /* For table cells */
  td .client-logo {
    display: block;
    margin: 0.5rem 0;
  }

  .profile-picture-group {
    text-align: center;
    margin-bottom: 20px;
}

.profile-picture-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.profile-preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}

.profile-picture-controls {
    width: 100%;
    max-width: 300px;
}