/**
 * College Club Critic Ambassador Dashboard Styles
 * Version: 1.0.1 - Updated to match student dashboard blue theme
 */

/* ========== BASE STYLES ========== */

/* White text for Daily Tasks (info/cyan background) */
.tasks-container .card.bg-info,
.tasks-container .card.bg-info .card-header,
.tasks-container .card.bg-info .card-body,
.tasks-container .card.bg-info h6,
.tasks-container .card.bg-info p,
.tasks-container .card.bg-info i,
.tasks-container .card.bg-info label {
    color: white !important;
}

/* White text for Monthly Goals (success/green background) */
.tasks-container .card.bg-success,
.tasks-container .card.bg-success .card-header,
.tasks-container .card.bg-success .card-body,
.tasks-container .card.bg-success h6,
.tasks-container .card.bg-success p,
.tasks-container .card.bg-success i,
.tasks-container .card.bg-success label {
    color: white !important;
}

.achievement-notification {
    position: relative;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.achievement-icon {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.achievement-content h5 {
    color: white;
    margin: 0;
}

.achievement-content p {
    color: rgba(255, 255, 255, 0.95);
}
.ambassador-dashboard-container {
    padding: 20px 0;
    min-height: 80vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.dashboard-loading {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.dashboard-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* ========== HEADER STYLES ========== */
.dashboard-header {
    background: #0d6efd;
    color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dashboard-header h2 {
    margin: 0;
    font-weight: 600;
    font-size: 2rem;
}

.dashboard-header .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.dashboard-header .btn-outline-primary {
    color: white;
    border-color: white;
}

.dashboard-header .btn-outline-primary:hover {
    background-color: white;
    color: #0d6efd;
}

/* ========== NAVIGATION TABS ========== */
.nav-tabs {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 2rem;
}

.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    background: transparent;
}

.nav-tabs .nav-link:hover {
    color: #0d6efd;
    background-color: #f8f9fa;
}

.nav-tabs .nav-link.active {
    color: #0d6efd;
    background-color: transparent;
    border-bottom: 3px solid #0d6efd;
}

.nav-tabs .nav-link i {
    margin-right: 0.5rem;
}

/* ========== STAT CARDS ========== */
.stat-card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.stat-card .card-body {
    padding: 1.5rem;
}

.stat-card .card-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.stat-card small {
    font-size: 0.75rem;
}

/* Stat card color variations */
.stat-card:nth-child(1) {
    border-top: 4px solid #28a745;
}

.stat-card:nth-child(2) {
    border-top: 4px solid #ffc107;
}

.stat-card:nth-child(3) {
    border-top: 4px solid #17a2b8;
}

.stat-card:nth-child(4) {
    border-top: 4px solid #6f42c1;
}

/* ========== PROGRESS BARS ========== */
.progress {
    height: 1.25rem;
    background-color: #e9ecef;
    border-radius: 0.5rem;
    overflow: visible;
}

.progress-bar {
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.6s ease;
}

/* ========== CARDS ========== */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-header h5 {
    margin: 0;
    color: #2d3748;
}

/* ========== TABLES ========== */
.table {
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #6c757d;
    padding: 0.75rem;
}

.table tbody td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

/* ========== BADGES ========== */
.badge {
    padding: 0.375rem 0.75rem;
    font-weight: 600;
    font-size: 0.75rem;
    border-radius: 0.25rem;
}

.badge.bg-success {
    background-color: #28a745 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-info {
    background-color: #17a2b8 !important;
}

/* ========== BUTTONS ========== */
.btn {
    font-weight: 500;
    padding: 0.375rem 1rem;
    transition: all 0.3s ease;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0a58ca;
    border-color: #0a58ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.25);
}

/* ========== ACTIVITY LIST ========== */
#recent-activity-list .list-group-item {
    border: none;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem;
    transition: background-color 0.2s ease;
}

#recent-activity-list .list-group-item:hover {
    background-color: #f8f9fa;
}

#recent-activity-list .list-group-item:last-child {
    border-bottom: none;
}

#recent-activity-list i {
    width: 20px;
    text-align: center;
}

/* ========== TASKS LIST ========== */
#upcoming-tasks-list .list-group-item {
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    padding: 1rem;
}

#upcoming-tasks-list .list-group-item h6 {
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: #2d3748;
}

/* ========== STAR RATINGS ========== */
.star-rating {
    color: #ffc107;
    font-size: 1rem;
}

.star-rating i {
    margin-right: 0.125rem;
}

/* ========== SEARCH AND FILTERS ========== */
.input-group {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    border-radius: 0.375rem;
    overflow: hidden;
}

.input-group .form-control,
.input-group .form-select {
    border: 1px solid #e9ecef;
}

.input-group .form-control:focus,
.input-group .form-select:focus {
    border-color: #0d6efd;
    box-shadow: none;
}

/* ========== MODALS ========== */
.modal-content {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: #2d3748;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

/* ========== FORM ELEMENTS ========== */
.form-label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-range {
    height: 0.5rem;
}

.form-range::-webkit-slider-thumb {
    background-color: #0d6efd;
}

.form-range::-moz-range-thumb {
    background-color: #0d6efd;
}

/* ========== ALERTS AND NOTIFICATIONS ========== */
.alert {
    border: none;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.alert-info {
    background-color: #e7f3ff;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.ambassador-notification {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========== PAGINATION ========== */
.pagination {
    margin-top: 1.5rem;
}

.page-link {
    color: #0d6efd;
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
}

.page-link:hover {
    background-color: #f8f9fa;
    border-color: #0d6efd;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* ========== CHARTS ========== */
canvas {
    max-height: 300px !important;
}

/* ========== LEADERBOARD ========== */
#leaderboard-container .table-primary {
    background-color: #e7f3ff !important;
}

#leaderboard-container .table td:first-child {
    font-weight: 700;
    color: #0d6efd;
}

/* ========== BADGES DISPLAY ========== */
#earned-badges .badge {
    margin: 0.25rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#earned-badges .badge:hover {
    transform: scale(1.1);
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    .dashboard-header {
        text-align: center;
        padding: 1.5rem;
    }
    
    .dashboard-header .col-md-4 {
        margin-top: 1rem;
    }
    
    .nav-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-tabs .nav-link {
        white-space: nowrap;
        padding: 0.5rem 1rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.5rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
}

@media (max-width: 576px) {
    .dashboard-header h2 {
        font-size: 1.5rem;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group .form-select {
        max-width: 100% !important;
        margin-top: 0.5rem;
    }
}

/* ========== LOADING STATES ========== */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .dashboard-header,
    .nav-tabs,
    .btn,
    .modal {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}

/* ========== DARK MODE SUPPORT (Optional) ========== */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}

/* ========== CUSTOM SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ========== UTILITY CLASSES ========== */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075) !important;
}

.shadow {
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15) !important;
}

.border-primary {
    border-color: #0d6efd !important;
}

.text-primary {
    color: #0d6efd !important;
}

.bg-primary-light {
    background-color: rgba(13, 110, 253, 0.1);
}

/* ========== Additional Ambassador Dashboard Header Overrides ========== */
.ambassador-dashboard .dashboard-header,
#ccc-ambassador-dashboard .dashboard-header,
.ambassador-info-header {
    background: #0d6efd !important;
    background-image: none !important;
}

/* Ensure bg-primary class uses the blue color */
.ambassador-dashboard .bg-primary,
#ccc-ambassador-dashboard .bg-primary {
    background-color: #0d6efd !important;
    background-image: none !important;
}

/* Force white text in blue headers - High specificity */
.ambassador-dashboard .card-header.bg-primary h5,
.ambassador-dashboard .card-header.bg-primary h5 *,
.ambassador-dashboard .card-header.bg-gradient.bg-primary h5,
.ambassador-dashboard .card-header.bg-gradient.bg-primary h5 *,
.ambassador-dashboard .bg-primary.text-white,
.ambassador-dashboard .bg-primary.text-white * {
    color: #ffffff !important;
}

/* Ensure all text elements in primary headers are white */
.ambassador-dashboard .bg-primary h1,
.ambassador-dashboard .bg-primary h2,
.ambassador-dashboard .bg-primary h3,
.ambassador-dashboard .bg-primary h4,
.ambassador-dashboard .bg-primary h5,
.ambassador-dashboard .bg-primary h6,
.ambassador-dashboard .bg-primary p,
.ambassador-dashboard .bg-primary span,
.ambassador-dashboard .bg-primary small,
.ambassador-dashboard .bg-primary strong,
.ambassador-dashboard .bg-primary i,
.ambassador-dashboard .bg-primary .mb-0 {
    color: #ffffff !important;
}

/* Specific fix for Monthly Progress header */
.card-header.bg-gradient.bg-primary.text-white h5,
.card-header.bg-gradient.bg-primary.text-white h5.mb-0 {
    color: #ffffff !important;
}