/* Jobdesk - Expert Level Styling */

.jobdesk-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 24px;
    height: 100%;
    padding: 0 40px 40px 40px;
    box-sizing: border-box;
    position: relative;
    /* For loading overlay */
}

/* Left Panel: Job List */
.job-list-panel {
    background: white;
    border-radius: 20px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.job-list-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}

.header-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.job-list-header h3 {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin: 0;
}

/* Filters */
.job-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    /* Hide scrollbar */
    scrollbar-width: none;
}

.job-filters::-webkit-scrollbar {
    display: none;
}

.filter-pill {
    padding: 6px 12px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: white;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.filter-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.job-items-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.job-card-item {
    padding: 16px;
    background: white;
    border-radius: 12px;
    border: 1px solid transparent;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.job-card-item:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.job-card-item.active {
    background: rgba(79, 70, 229, 0.04);
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.1);
}

.job-card-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
}

.job-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.badge-urgent {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.badge-high {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.badge-normal {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.badge-low {
    background: rgba(148, 163, 184, 0.1);
    color: #64748b;
}

.job-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
    line-height: 1.4;
}

.job-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--text-muted);
}

/* Right Panel: Detail View */
.job-detail-panel {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid white;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.detail-header {
    padding: 32px 40px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: linear-gradient(to bottom, white, rgba(255, 255, 255, 0.5));
}

.detail-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.action-btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
}

.action-btn-icon:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

.action-btn-icon.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.action-btn-icon[title="Edit Job"]:hover {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.detail-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 24px;
    line-height: 1.2;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.meta-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meta-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 700;
}

.meta-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-body {
    padding: 40px;
    flex: 1;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.4);
}

.checklist-container {
    margin-top: 32px;
}

.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.checklist-header h4 {
    font-size: 14px;
    color: var(--text-main);
    margin: 0;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s;
    position: relative;
}

.checklist-item:hover {
    background: rgba(255, 255, 255, 0.6);
}

.checklist-item .delete-subtask {
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
    color: #ef4444;
}

.checklist-item:hover .delete-subtask {
    opacity: 1;
}

.custom-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.checklist-input:checked+.custom-checkbox {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Modal Styling */
.job-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.job-modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.job-modal {
    background: white;
    width: 500px;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 85vh;
    overflow-y: auto;
}

.job-modal-overlay.show .job-modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    background: #f8fafc;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    background: #f8fafc;
    cursor: pointer;
    box-sizing: border-box;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
}

.btn-secondary {
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: white;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f1f5f9;
}

.btn-primary-modal {
    padding: 10px 24px;
    border-radius: 10px;
    border: none;
    background: var(--primary);
    font-weight: 600;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    transition: all 0.2s;
}

.btn-primary-modal:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.3);
}

/* Notification Toast */
.job-notification-toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(16px);
    color: white;
    padding: 16px 24px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    z-index: 99999;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 400px;
}

.job-notification-toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.toast-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.toast-action {
    background: white;
    color: black;
    border: none;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.toast-action:hover {
    transform: scale(1.05);
}

.progress-bar-thin {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.empty-detail-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
}