/* cards/jobs_card/style.css */
:root {
    --jobs-gradient: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    --jobs-bg-hover: rgba(79, 70, 229, 0.04);
}

/* Card Specific Styles */
#jobsCard .mini-chart {
    height: 100px;
    margin: 10px 0;
}

#jobsCard .jobs-date-selector {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    justify-content: space-between;
}

#jobsCard .jobs-date-btn {
    flex: 1;
    border: none;
    padding: 6px 4px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: 'Prompt', sans-serif;
    background: transparent;
    color: #64748b;
}

#jobsCard .jobs-date-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    color: #1e293b;
}

#jobsCard .jobs-date-btn.active {
    background: white;
    color: #4f46e5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#jobsCard .job-active-row:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.05) !important;
    border-color: rgba(79, 70, 229, 0.3) !important;
}

/* Priority Badges */
.job-prio-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
}

.job-prio-critical {
    color: #ef4444;
}

.job-prio-high {
    color: #ea580c;
}

.job-prio-medium {
    color: #ca8a04;
}

.job-prio-low {
    color: #64748b;
}

/* Status Badges */
.job-status-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.job-status-open {
    color: #dc2626;
}

.job-status-inprogress {
    color: #2563eb;
}

.job-status-resolved {
    color: #059669;
}

.job-status-closed {
    color: #64748b;
}

.job-status-reopened {
    color: #ea580c;
}

/* Modal Month Table Styles */
#jobsModal .jobs-month-table-container {
    overflow-x: auto;
    overflow-y: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    background: white;
}

#jobsModal .jobs-month-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: 'Prompt', sans-serif;
    font-size: 0.74rem;
}

#jobsModal .jobs-month-table th {
    background-color: #f8fafc;
    font-weight: 700;
    color: #475569;
    padding: 12px 10px;
    border-bottom: 2px solid #cbd5e1;
    border-right: 1px solid #f1f5f9;
    white-space: nowrap;
}

#jobsModal .jobs-month-table td {
    padding: 10px 10px;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #f1f5f9;
    white-space: nowrap;
}

#jobsModal .jobs-month-table tbody tr {
    cursor: pointer;
    transition: background 0.15s ease;
}

#jobsModal .jobs-month-table tbody tr:hover {
    background-color: #f1f5f9 !important;
}

#jobsModal .jobs-month-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f8fafc;
}

/* Chat Comments UI */
.job-comments-thread {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 380px;
    overflow-y: auto;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.job-comment-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.8rem;
    line-height: 1.4;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.job-comment-bubble.self {
    align-self: flex-end;
    background-color: #e0e7ff;
    color: #1e1b4b;
    border-bottom-right-radius: 2px;
    border: 1px solid #c7d2fe;
}

.job-comment-bubble.other {
    align-self: flex-start;
    background-color: #ffffff;
    color: #334155;
    border-bottom-left-radius: 2px;
    border: 1px solid #e2e8f0;
}

.job-comment-meta {
    font-size: 0.65rem;
    color: #64748b;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    font-weight: 600;
}

/* Custom premium detail panel */
.job-detail-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

.job-form-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 4px;
}

.job-form-control {
    font-size: 0.8rem;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    width: 100%;
    outline: none;
    transition: all 0.2s;
}

.job-form-control:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

/* Stacked Modal Blur Effects */
#jobsModal.modal-blurred,
#jobsDetailModal.modal-blurred {
    filter: blur(4px) brightness(0.9);
    transform: scale(0.985);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#jobsModal,
#jobsDetailModal {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom Searchable Dropdown Styles */
.job-select-wrapper {
    position: relative;
    width: 100%;
}

.job-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    height: 38px;
    color: #334155;
}

.job-select-trigger:hover {
    border-color: #4f46e5;
}

.job-select-trigger.active {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.job-select-placeholder {
    color: #94a3b8 !important;
}

.job-select-dropdown {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 -10px 15px -3px rgba(0, 0, 0, 0.1), 0 -4px 6px -4px rgba(0, 0, 0, 0.1);
    z-index: 10010;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.job-select-search-container {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
    gap: 8px;
}

.job-select-search-container i {
    color: #94a3b8;
    font-size: 0.75rem;
}

.job-select-search {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.76rem;
    width: 100%;
    color: #334155;
    padding: 4px 0;
}

.job-select-options {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
}

.job-select-options li {
    font-size: 0.78rem;
    color: #334155;
    transition: background 0.15s;
}

.job-select-options li.job-select-group-header {
    font-weight: 700;
    color: #64748b;
    background-color: #f8fafc;
    padding: 6px 12px;
    font-size: 0.68rem;
    pointer-events: none;
    border-bottom: 1px solid #f1f5f9;
    border-top: 1px solid #f1f5f9;
}

.job-select-options li.job-select-group-header:first-child {
    border-top: none;
}

.job-select-options li.job-select-option-item {
    padding: 8px 12px 8px 24px;
    cursor: pointer;
}

.job-select-options li.job-select-option-item:hover {
    background-color: #f1f5f9;
    color: #4f46e5;
}

.job-select-options li.selected {
    background-color: #e0e7ff;
    color: #4f46e5;
    font-weight: 600;
}

.job-select-options li.no-results {
    color: #94a3b8;
    text-align: center;
    padding: 12px;
    pointer-events: none;
    font-style: italic;
}

.job-preset-btn {
    border: 1px solid #cbd5e1;
    background: white;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Prompt', sans-serif;
    outline: none;
}

.job-preset-btn:hover {
    border-color: #4f46e5;
    color: #4f46e5;
    background-color: rgba(79, 70, 229, 0.05);
}

.job-preset-btn:active {
    transform: scale(0.95);
}

.job-preset-btn.active {
    border-color: #4f46e5;
    color: white;
    background-color: #4f46e5;
}

/* Gantt Timeline Capsule and Action Dots Styles */
.job-capsule-segment {
    box-sizing: border-box;
}

.job-capsule-segment:hover {
    filter: brightness(0.95);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: scaleY(1.03);
    z-index: 10 !important;
}

.job-capsule-open {
    background-color: rgba(234, 88, 12, 0.12);
    border: 1.5px solid #ea580c;
    color: #ea580c;
}

.job-capsule-inprogress {
    background-color: rgba(59, 130, 246, 0.12);
    border: 1.5px solid #3b82f6;
    color: #3b82f6;
}

.job-capsule-resolved {
    background-color: rgba(16, 185, 129, 0.12);
    border: 1.5px solid #10b981;
    color: #10b981;
}

.job-capsule-dots {
    display: inline-flex;
    gap: 3px;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.job-action-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.job-dot-green {
    background-color: #10b981;
    box-shadow: 0 0 3px #10b981;
}

.job-dot-red {
    background-color: #ef4444;
    box-shadow: 0 0 3px #ef4444;
}

.job-dot-blue {
    background-color: #3b82f6;
    box-shadow: 0 0 3px #3b82f6;
}

/* Skeleton Loading Animation */
@keyframes skeleton-pulse {
    0% {
        background-color: #f1f5f9;
    }
    50% {
        background-color: #e2e8f0;
    }
    100% {
        background-color: #f1f5f9;
    }
}

.job-skeleton-pulse {
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}

/* ─── Today-Only Toggle Button ─────────────────────────────────── */
.job-today-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    user-select: none;
    padding: 4px 12px 4px 6px;
    border-radius: 20px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.job-today-toggle-label:hover {
    border-color: #a5b4fc;
    background: #f5f3ff;
}

/* Track */
.job-today-toggle-track {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
    background: #cbd5e1;
    border-radius: 18px;
    flex-shrink: 0;
    transition: background 0.22s;
}

/* Thumb */
.job-today-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Label text */
.job-today-toggle-text {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.22s;
}

/* Active state */
.job-today-toggle-label.active {
    border-color: #6366f1;
    background: #eef2ff;
}

.job-today-toggle-label.active .job-today-toggle-track {
    background: #6366f1;
}

.job-today-toggle-label.active .job-today-toggle-thumb {
    transform: translateX(14px);
}

.job-today-toggle-label.active .job-today-toggle-text {
    color: #4f46e5;
}


/* Overdue Fine Badge Styles */
@keyframes pulse-fine {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.job-fine-badge {
    animation: pulse-fine 2s infinite;
}
