/* =====================================================
   WORKPASS 2.0 - ADVANCED FEATURES STYLES
   Styles for achievements, goals, evidence review, etc.
   ===================================================== */

/* =====================================================
   ACHIEVEMENTS
   ===================================================== */

.achievement-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.achievement-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.achievement-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.achievement-info {
    flex: 1;
}

.achievement-info h4 {
    margin: 0 0 0.5rem 0;
    color: #fff;
}

.achievement-info p {
    margin: 0 0 0.75rem 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.achievement-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.achievement-actions {
    display: flex;
    gap: 0.5rem;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.achievement-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.achievement-badge.unlocked {
    border-color: currentColor;
    background: rgba(74, 222, 128, 0.05);
}

.achievement-badge.unlocked:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(74, 222, 128, 0.2);
}

.achievement-badge.locked {
    opacity: 0.5;
    filter: grayscale(1);
}

.achievement-badge .achievement-icon {
    font-size: 2rem;
}

.achievement-title {
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
}

.achievement-xp {
    font-size: 0.8rem;
    color: #4ade80;
    font-weight: 700;
}

.achievement-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

/* =====================================================
   GOALS
   ===================================================== */

.goal-card {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.goal-card.overdue {
    border-color: rgba(255, 68, 68, 0.3);
    background: rgba(255, 68, 68, 0.05);
}

.goal-card.completed {
    opacity: 0.7;
    border-color: rgba(74, 222, 128, 0.3);
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.goal-header h4 {
    margin: 0;
    color: #fff;
}

.goal-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.goal-progress {
    margin-top: 1rem;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #3b82f6);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.goal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.85rem;
}

.goals-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.goal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* =====================================================
   EVIDENCE REVIEW
   ===================================================== */

.review-card {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.review-card.pending {
    border-left: 4px solid #f59e0b;
}

.review-card.approved {
    border-left: 4px solid #4ade80;
}

.review-card.rejected {
    border-left: 4px solid #ff4444;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

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

.mini-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.mini-avatar.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
}

.review-status {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.review-status.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.review-status.approved {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.review-status.rejected {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
    border: 1px solid rgba(255, 68, 68, 0.2);
}

.evidence-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.evidence-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.evidence-gallery img:hover {
    transform: scale(1.05);
}

.review-actions {
    margin-top: 1.5rem;
}

.review-actions textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 1rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.reviewer-notes {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.reviewer-notes strong {
    color: #fff;
}

.reviewer-notes p {
    margin: 0.5rem 0;
    color: rgba(255, 255, 255, 0.8);
}

.reviewer-info {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.review-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    display: block;
    margin-top: 0.25rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.3);
    color: #4ade80;
}

.review-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* =====================================================
   PROFILES MANAGEMENT
   ===================================================== */

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.user-card {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-align: center;
}

.user-avatar-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
}

.user-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 700;
    font-size: 2.5rem;
}

.change-avatar-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #4ade80;
    border: 2px solid rgba(0, 0, 0, 0.8);
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.change-avatar-btn:hover {
    transform: scale(1.1);
}

.user-role {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.user-xp {
    color: #4ade80;
    font-weight: 700;
    margin: 0.5rem 0;
}

.user-settings {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-settings label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
}

.color-picker-wrapper input[type="color"] {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.color-preview {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* =====================================================
   DASHBOARD STATS
   ===================================================== */

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

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.stat-card.highlight {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.stat-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.stat-info h3 {
    margin: 0;
    font-size: 2rem;
    color: #fff;
}

.stat-info p {
    margin: 0.25rem 0 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.activity-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.activity-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.activity-avatar.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
}

.activity-text {
    flex: 1;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.activity-time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.leaderboard-item.top {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    width: 40px;
    text-align: center;
}

.performer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.performer-avatar.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
}

.performer-info {
    flex: 1;
}

.performer-info h4 {
    margin: 0;
    color: #fff;
}

.performer-info p {
    margin: 0.25rem 0 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.crown {
    font-size: 1.5rem;
}

/* =====================================================
   IMAGE MODAL
   ===================================================== */

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* =====================================================
   UTILITIES
   ===================================================== */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    margin: 0;
    color: #fff;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

.badge.inactive {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
    border-color: rgba(255, 68, 68, 0.2);
}

.completed-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}