/* ==========================================
   LeanQuest Ecosystem Styles
   ========================================== */

:root {
    --lq-primary: #4361ee;
    --lq-primary-dark: #364dd0;
    --lq-primary-light: #5a7bff;
    --lq-accent: #38b000;
    --lq-success: #38b000;
    --lq-success-dark: #2e9600;
    --lq-warning: #ffaa00;
    --lq-warning-dark: #e69a00;
    --lq-danger: #e74a3b;
    --lq-info: #3b82f6;
    --lq-info-dark: #2563eb;
    --lq-light: #f8f9fa;
    --lq-dark: #2b2d42;
    --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --card-hover-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --spacing-unit: 1.25rem;
}

/* Base Styles */
body {
    background-color: #f8f9fa;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Container */
.leanquest-container {
    min-height: calc(100vh - 200px);
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Dashboard Header - Clean White Card Style */
.dashboard-header {
    background: white;
    color: #2d3748;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
    border: 1px solid #E2E8F0;
    position: relative;
    overflow: hidden;
}

.dashboard-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #2d3748;
    position: relative;
    z-index: 1;
}

.dashboard-header p {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

/* Stat Cards */
.stat-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: var(--spacing-unit);
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow);
}

.stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon.primary {
    background: linear-gradient(135deg, var(--lq-primary), var(--lq-primary-dark));
}

.stat-icon.success {
    background: linear-gradient(135deg, var(--lq-success), var(--lq-success-dark));
}

.stat-icon.warning {
    background: linear-gradient(135deg, var(--lq-warning), var(--lq-warning-dark));
}

.stat-icon.info {
    background: linear-gradient(135deg, var(--lq-info), var(--lq-info-dark));
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--lq-dark);
    margin: 0.5rem 0 0.25rem;
}

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

/* Quest Cards */
.leanquest-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.leanquest-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
    cursor: pointer;
}

.leanquest-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--lq-dark);
    min-height: 2.4em;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.leanquest-card .card-text {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
}

.quest-meta {
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem 0;
    margin: 1rem 0;
}

.reward-box {
    transition: var(--transition);
    border-radius: 8px;
}

.reward-box:hover {
    transform: scale(1.05);
}

/* Info Cards / Tip Cards */
.info-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    padding: var(--spacing-unit);
    position: relative;
    overflow: hidden;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-hover-shadow);
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--lq-primary), var(--lq-info));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.info-card:hover::before {
    transform: scaleX(1);
}

.info-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--lq-primary), var(--lq-accent));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
    margin-bottom: 1rem;
}

/* Badge Styles */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

.badge.bg-referral-subtle {
    background-color: #e7f5ff !important;
    color: #1864ab !important;
}

.badge.bg-skill-subtle {
    background-color: #f3f0ff !important;
    color: #6741d9 !important;
}

.badge.bg-learning-subtle {
    background-color: #fff4e6 !important;
    color: #d9480f !important;
}

.badge.bg-feedback-subtle {
    background-color: #e7f5ff !important;
    color: #0c8599 !important;
}

.badge.bg-custom-subtle {
    background-color: #f8f9fa !important;
    color: #495057 !important;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 30px;
    width: 2px;
    height: calc(100% - 10px);
    background: #dee2e6;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-marker {
    position: absolute;
    left: -40px;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #6c757d;
}

.timeline-item.complete .timeline-marker {
    background: var(--lq-success);
    border-color: var(--lq-success);
    color: #fff;
}

/* Reward Cards in Detail */
.reward-card {
    border: 2px solid;
    transition: all 0.3s ease;
}

.reward-card:hover {
    transform: scale(1.05);
}

/* Forms */
.form-label.required::after {
    content: ' *';
    color: var(--lq-danger);
}

/* Filters Card */
.card .form-select-sm,
.card .btn-sm {
    font-size: 0.875rem;
}

/* Info Items */
.info-item {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Empty State */
.empty-state-container {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15); }
}

.empty-state-icon i {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--lq-primary), var(--lq-info));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--lq-primary);
}

/* Forms */
.form-label {
    font-weight: 600;
    color: var(--lq-dark);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.625rem 0.875rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--lq-primary);
    box-shadow: none;
}

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

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    transition: var(--transition);
}

.btn-primary {
    background: var(--lq-primary);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: var(--lq-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.35);
    color: white;
}

.btn-outline-primary {
    border-color: var(--lq-primary);
    color: var(--lq-primary);
    background-color: white;
}

.btn-outline-primary:hover {
    background-color: var(--lq-primary);
    border-color: var(--lq-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.2);
}

.btn-outline-secondary {
    background-color: white;
    border-color: #dee2e6;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline-danger {
    background-color: white;
    border-color: #e74a3b;
    color: #e74a3b;
}

.btn-outline-danger:hover {
    background-color: #e74a3b;
    border-color: #e74a3b;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(231, 74, 59, 0.3);
}

/* Alerts and Help Text */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem 1.25rem;
}

.alert-info {
    background-color: #e0f2fe;
    color: #0c4a6e;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

.alert-warning {
    background-color: #fef3c7;
    color: #78350f;
}

.alert-danger {
    background-color: #fee2e2;
    color: #7f1d1d;
}

/* Progress Indicators */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
}

.progress-bar {
    background: linear-gradient(90deg, var(--lq-primary), var(--lq-info));
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container,
    .leanquest-container {
        max-width: 100%;
        padding: 0 20px;
    }
}

@media (max-width: 992px) {
    .dashboard-header {
        padding: 2rem;
    }

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

    .dashboard-header p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        padding: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

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

    .dashboard-header p {
        font-size: 0.95rem;
    }

    .stat-card {
        margin-bottom: 1rem;
    }

    .leanquest-card {
        margin-bottom: 1.5rem;
    }

    .timeline {
        padding-left: 30px;
    }

    .timeline-marker {
        left: -30px;
    }

    .timeline-item::before {
        left: -22px;
    }

    .info-card,
    .quest-type-card {
        margin-bottom: 1rem;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .d-flex.gap-2,
    .d-flex.gap-3 {
        flex-direction: column;
        gap: 0.5rem !important;
    }
}

@media (max-width: 576px) {
    .dashboard-header {
        padding: 1.25rem;
    }

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

    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .leanquest-card .card-title {
        font-size: 1.1rem;
    }

    .empty-state-container {
        padding: 2rem 1rem;
    }

    .empty-state-icon {
        width: 100px;
        height: 100px;
    }

    .empty-state-icon i {
        font-size: 2.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.leanquest-card,
.stat-card {
    animation: fadeIn 0.3s ease-out;
}

/* Status Colors */
.badge.bg-started-subtle {
    background-color: #e7f5ff !important;
    color: #1864ab !important;
}

.badge.bg-submitted-subtle {
    background-color: #fff4e6 !important;
    color: #d9480f !important;
}

.badge.bg-completed-subtle {
    background-color: #d3f9d8 !important;
    color: #2b8a3e !important;
}

.badge.bg-rejected-subtle {
    background-color: #ffe3e3 !important;
    color: #c92a2a !important;
}
