/* ==========================================================================
   DAILY GOALS (METAS DEL DÍA) - PREMIUM PERFORMANCE DESIGN
   ========================================================================== */

.goals-container {
    display: flex;
    gap: 24px;
    height: calc(100vh - 180px);
    padding: 10px;
}

/* Sidebar: Team Progress List */
.goals-sidebar {
    width: 320px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.goals-sidebar-header {
    padding: 24px;
    background: linear-gradient(135deg, #00b4d8, #ec4899);
    color: white;
}

.gs-title {
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gs-subtitle {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-top: 4px;
}

.goals-user-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.goal-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    background: white;
    border: 2px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.goal-user-item:hover {
    transform: translateX(8px);
    border-color: #3b82f6;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.1);
}

.goal-user-item.active {
    background: #f0f9ff;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.gs-avatar-box {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.gs-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Mini progress ring for avatar */
.gs-progress-ring {
    position: absolute;
    top: -2px;
    left: -2px;
    width: 48px;
    height: 48px;
}

.goal-user-info {
    flex: 1;
    min-width: 0;
}

.gs-user-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gs-user-role {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
}

.gs-user-percent {
    font-size: 0.8rem;
    font-weight: 800;
    color: #3b82f6;
    background: #eff6ff;
    padding: 4px 8px;
    border-radius: 8px;
}

/* Main Area: Task Checklist */
.goals-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.goals-header-card {
    background: white;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.gh-user-focus {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gh-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #3b82f6;
    padding: 3px;
    background: white;
}

.gh-stat {
    text-align: center;
    padding: 0 20px;
    border-right: 1px solid #f1f5f9;
}

.gh-stat:last-child {
    border: none;
}

.gh-stat-val {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
}

.gh-stat-label {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
}

/* Task List */
.goals-list-card {
    flex: 1;
    background: white;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.gl-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gl-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.goal-items-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    /* Minimal gap */
    max-height: calc(100vh - 420px);
    /* Prevent internal scroll unless needed */
}

.goal-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    /* Ultra compact */
    min-height: 32px;
    /* Very small minimum height */
    background: #f8fafc;
    border-radius: 10px;
    /* Smaller radius */
    border: 2px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
}

/* COMPACT VERSION */
.goal-row-compact {
    padding: 20px 16px !important;
    /* Increased padding for better visibility */
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    cursor: default;
    /* Not clickable as a whole */
    min-height: 140px;
    /* Ensure leads card is always visible */
}

.goal-row-main {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.goal-item-row:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.goal-item-row.completed {
    opacity: 0.6;
    background: #f0fdf4;
}

.goal-item-row.completed .goal-item-text {
    text-decoration: line-through;
    color: #166534;
}

.goal-checkbox {
    width: 20px;
    /* Smaller checkbox */
    height: 20px;
    border-radius: 5px;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    background: white;
    flex-shrink: 0;
    cursor: pointer;
    font-size: 0.7rem;
    /* Smaller check icon */
}

.progress-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 26px;
    height: 26px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    z-index: 10;
    transition: left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Bouncy transition */
    font-size: 0.9rem;
    border: 2px solid white;
}

.goal-check-auto {
    background: #0ea5e9 !important;
    border-color: #0ea5e9 !important;
    color: white !important;
    cursor: default;
}

.goal-item-row.completed .goal-checkbox {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

.goal-item-text {
    flex: 1;
    font-size: 0.8rem;
    /* Even smaller text */
    font-weight: 600;
    color: #334155;
    line-height: 1.2;
    /* Tighter line height */
}

.goal-item-tag {
    font-size: 0.65rem;
    /* Smaller */
    font-weight: 700;
    padding: 3px 8px;
    /* Smaller */
    border-radius: 6px;
    background: #fff;
    color: #64748b;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}

.tag-auto {
    color: #0ea5e9;
    border-color: #0ea5e9;
    background: #f0f9ff;
}

.goal-priority-tag {
    min-width: 65px;
    text-align: center;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 0.6rem;
    padding: 4px 8px;
    border-radius: 6px;
}

/* EDIT BUTTON */
.goal-edit-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    color: #64748b;
}

.goal-edit-btn:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    transform: scale(1.05);
}

/* PROGRESS BAR (for leads) */
.goal-progress-bar-wrap {
    width: 100%;
    margin-top: 4px;
}

.goal-progress-bar {
    width: 100%;
    height: 10px;
    /* Reduced from 12px */
    background: #e2e8f0;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.goal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0ea5e9, #3b82f6);
    border-radius: 10px;
    transition: width 1s ease;
}

.goal-progress-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    /* Smaller */
    font-weight: 800;
    color: #1e293b;
    pointer-events: none;
}

/* Animations */
@keyframes checkPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.completed .goal-checkbox i {
    animation: checkPop 0.3s ease;
}

/* COMPACT ICON BUTTON (header) */
.btn-icon-compact {
    background: #3b82f6;
    border: none;
    border-radius: 10px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    font-size: 1rem;
}

.btn-icon-compact:hover {
    background: #2563eb;
    transform: scale(1.05);
}

/* MANAGE TASKS MODAL - TASK ITEMS */
.manage-task-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.manage-task-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.mti-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.mti-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    flex-shrink: 0;
}

.mti-checkbox.checked {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

.mti-text {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
}

.mti-tag {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #64748b;
    text-transform: uppercase;
}

.mti-actions {
    display: flex;
    gap: 6px;
    margin-left: 12px;
}

.btn-icon-sm {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #64748b;
    font-size: 0.85rem;
}

.btn-icon-sm:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.btn-danger-sm {
    background: #fee2e2;
    border-color: #fecaca;
    color: #dc2626;
}

.btn-danger-sm:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}