/* ═══════════════════════════════════════════════════════════════
   jobspage.css – Public Jobs Page Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Design Tokens ───────────────────────────────────────────── */
:root {
    --jp-primary:       #392C7D;
    --jp-primary-soft:  rgba(57, 44, 125, 0.10);
    --jp-text-main:     #1A1D23;
    --jp-text-muted:    #7C8DB5;
    --jp-border:        #EAECF0;
    --jp-bg-light:      #F8F9FB;
    --jp-radius:        1.5rem;
    --jp-radius-lg:     16px;
    --jp-shadow:        0 1px 4px rgba(0,0,0,.04);
    --jp-shadow-hover:  0 8px 28px rgba(0,0,0,.10);
    --jp-danger:        #E84646;
}

/* ── Sidebar Container ───────────────────────────────────────── */
.jp-sidebar {
    background: #fff;
    border: 1px solid var(--jp-border);
    border-radius: var(--jp-radius-lg);
    box-shadow: var(--jp-shadow);
    overflow: hidden;
}
.jp-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--jp-bg-light);
    border-bottom: 1px solid var(--jp-border);
}
.jp-sidebar-header h5 {
    font-size: .9rem;
    font-weight: 700;
    color: var(--jp-text-main);
    margin-bottom: 0;
}
.jp-sidebar-header h5 i { color: var(--jp-primary); }
.jp-clear-btn {
    font-size: .75rem;
    font-weight: 600;
    color: var(--jp-danger);
    text-decoration: none;
    transition: opacity .2s;
}
.jp-clear-btn:hover { opacity: .7; color: var(--jp-danger); }

/* ── Filter Groups ───────────────────────────────────────────── */
.jp-filter-group {
    padding: 14px 20px;
    border-bottom: 1px solid var(--jp-border);
}
.jp-filter-group:last-of-type { border-bottom: none; }
.jp-filter-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--jp-text-muted);
    margin-bottom: 8px;
    display: block;
}
.jp-filter-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}
.jp-chevron {
    font-size: .85rem;
    color: var(--jp-text-muted);
    transition: transform .25s;
}
.jp-filter-heading.collapsed .jp-chevron {
    transform: rotate(-90deg);
}
.jp-filter-body {
    padding-top: 10px;
    transition: max-height 0.3s ease;
    overflow: hidden;
}
.jp-filter-body.collapsed {
    max-height: 0 !important;
    padding-top: 0;
    overflow: hidden;
}
.jp-filter-input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
    border: 1px solid var(--jp-border);
    border-radius: var(--jp-radius);
    color: var(--jp-text-main);
    background: #fff;
    transition: border .2s, box-shadow .2s;
}
.jp-filter-input:focus {
    border-color: var(--jp-primary);
    box-shadow: 0 0 0 3px var(--jp-primary-soft);
    outline: none;
}
.jp-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235B6B8A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}

/* Search wrap */
.jp-search-wrap { position: relative; }
.jp-search-wrap i {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--jp-text-muted); font-size: 14px; pointer-events: none;
}
.jp-search-wrap input { padding-left: 36px; }

/* Salary / range input */
.jp-salary-input-wrap {
    display: flex; align-items: center; gap: 6px;
}
.jp-salary-input-wrap span {
    font-size: 12px; font-weight: 600; color: var(--jp-text-muted); flex-shrink: 0;
}
.jp-salary-input-wrap input { padding-right: 8px; }

/* Checkbox list */
.jp-checkbox-list {
    max-height: 180px; overflow-y: auto;
}
.jp-checkbox-list::-webkit-scrollbar { width: 4px; }
.jp-checkbox-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.jp-check-item {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 0; cursor: pointer;
    font-size: 13px; color: var(--jp-text-main); transition: color .15s;
}
.jp-check-item:hover { color: var(--jp-primary); }
.jp-check-item input[type="checkbox"] {
    accent-color: var(--jp-primary); cursor: pointer; width: 15px; height: 15px; flex-shrink: 0;
}
.jp-check-count {
    margin-left: auto; font-size: 11px; color: var(--jp-text-muted);
    background: var(--jp-bg-light); padding: 1px 8px; border-radius: 20px;
}

/* Responsive */
@media (max-width: 991.98px) {
    .jp-sidebar-col { position: static !important; margin-bottom: 24px; }
}

/* ── Section ─────────────────────────────────────────────────── */
.jp-section {
    padding: 60px 0;
}

/* ── Sticky sidebar ──────────────────────────────────────────── */
.jp-sidebar-col {
    position: sticky;
    top: 90px;
    align-self: flex-start;
}

/* ── Result Bar ──────────────────────────────────────────────── */
.jp-result-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.jp-result-info {
    font-size: 14px;
    font-weight: 600;
    color: var(--jp-text-main);
}
.jp-result-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--jp-text-muted);
}
.jp-sort-select {
    height: 36px;
    padding: 0 30px 0 10px;
    border: 1px solid var(--jp-border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--jp-text-main);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235B6B8A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
    appearance: none;
    cursor: pointer;
}

/* ── Job Cards ───────────────────────────────────────────────── */
.jp-card {
    background: #fff;
    border: 1px solid var(--jp-border);
    border-radius: var(--jp-radius-lg);
    padding: 24px;
    transition: all .3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}
.jp-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--jp-shadow-hover);
    border-color: var(--jp-primary);
}
.jp-card-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #f0f0ff 0%, #e8e6ff 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.jp-card-avatar i {
    font-size: 28px;
    color: var(--jp-primary);
}
.jp-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--jp-text-main);
    margin: 14px 0 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.jp-card-company {
    font-size: 13px;
    color: var(--jp-text-muted);
    margin-bottom: 12px;
}
.jp-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.jp-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.jp-badge-location {
    background: rgba(14, 165, 233, 0.10);
    color: #0EA5E9;
}
.jp-badge-type {
    background: rgba(29, 185, 117, 0.10);
    color: #1DB975;
}
.jp-badge-exp {
    background: rgba(255, 168, 17, 0.10);
    color: #d48a00;
}
.jp-card-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--jp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.jp-card-salary {
    font-size: 14px;
    font-weight: 700;
    color: var(--jp-primary);
}
.jp-card-date {
    font-size: 11px;
    color: var(--jp-text-muted);
}

/* ── Skeleton ────────────────────────────────────────────────── */
@keyframes _skelShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton, .skeleton-text {
    background: linear-gradient(90deg, #EAECF0 25%, #d8dbe3 50%, #EAECF0 75%);
    background-size: 200% 100%;
    animation: _skelShimmer 1.2s infinite;
}
.skeleton-text {
    display: inline-block;
    border-radius: 4px;
    height: 1em;
    min-width: 80px;
}
.jp-skeleton-card {
    padding: 24px;
}
.jp-skel-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
}

/* ── Pagination ──────────────────────────────────────────────── */
.jp-pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 0 4px;
}
.jp-pagination-info {
    font-size: 13px;
    color: var(--jp-text-muted);
    margin: 0;
}
.pagination.lms-page { margin: 0; gap: 4px; flex-wrap: wrap; }
.pagination.lms-page .page-item .page-link {
    width: 34px !important; height: 34px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center; justify-content: center;
    border-radius: 6px !important;
    border: 1px solid var(--jp-border) !important;
    font-size: 13px; font-weight: 500;
    color: var(--jp-text-muted) !important;
    background: #fff !important;
    line-height: 1;
    transition: background .15s, border-color .15s, color .15s;
    box-shadow: none !important;
}
.pagination.lms-page .page-item .page-link:hover {
    border-color: var(--jp-primary) !important;
    color: var(--jp-primary) !important;
    background: var(--jp-primary-soft) !important;
}
.pagination.lms-page .page-item.active .page-link {
    background: var(--jp-primary) !important;
    border-color: var(--jp-primary) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(57,44,125,.28) !important;
}
.pagination.lms-page .page-item.disabled .page-link {
    opacity: .4 !important;
    pointer-events: none;
}

/* ── Detail View ─────────────────────────────────────────────── */
.jp-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--jp-primary);
    margin-bottom: 20px;
    cursor: pointer;
    transition: opacity .2s;
}
.jp-detail-back:hover { opacity: .7; color: var(--jp-primary); }

.jp-detail-hero {
    background: linear-gradient(135deg, var(--jp-primary) 0%, #1e1a5e 100%);
    border-radius: var(--jp-radius-lg);
    padding: 2rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    position: relative;
}
.jp-detail-hero-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,.15);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.jp-detail-hero-avatar i {
    font-size: 42px;
    color: #fff;
}
.jp-detail-hero-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}
.jp-detail-hero-meta {
    font-size: 14px;
    color: rgba(255,255,255,.75);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.jp-detail-hero-meta span { display: inline-flex; align-items: center; gap: 4px; }

.jp-detail-apply-bar {
    background: #fff;
    border: 1px solid var(--jp-border);
    border-radius: var(--jp-radius-lg);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    box-shadow: var(--jp-shadow);
}
.jp-detail-salary {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--jp-primary);
}
.jp-detail-salary-sub {
    font-size: 13px;
    color: var(--jp-text-muted);
    margin-top: 4px;
}
.jp-detail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.jp-btn-apply-job {
    padding: 10px 28px;
    background: linear-gradient(135deg, var(--jp-primary) 0%, #6c5ce7 50%, var(--jp-primary) 100%);
    background-size: 200% auto;
    background-position: 0% 50%;
    color: #fff;
    border: none;
    border-radius: var(--jp-radius);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-position 0.4s ease-out;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.jp-btn-apply-job:hover {
    color: #fff;
    background-position: 100% 50%;
}
.jp-btn-apply-job:disabled {
    opacity: .6;
    cursor: not-allowed;
    background-position: 0% 50%;
}

.jp-detail-description {
    background: #fff;
    border: 1px solid var(--jp-border);
    border-radius: var(--jp-radius-lg);
    padding: 2rem 2.5rem;
    box-shadow: var(--jp-shadow);
}
.jp-detail-description h5 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--jp-text-main);
}
.jp-detail-description .deskripsi-content {
    line-height: 1.8;
    color: #495057;
}
.jp-detail-description .deskripsi-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.jp-detail-description .deskripsi-content ul { padding-left: 20px; }

/* ── Empty State ─────────────────────────────────────────────── */
.jp-empty {
    text-align: center;
    padding: 4rem 2rem;
}
.jp-empty-icon {
    font-size: 64px;
    color: #d1d5db;
    margin-bottom: 16px;
}
.jp-empty h5 {
    font-weight: 700;
    color: var(--jp-text-main);
    margin-bottom: 8px;
}
.jp-empty p {
    color: var(--jp-text-muted);
    font-size: 14px;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .jp-sidebar-col {
        position: static;
        margin-bottom: 24px;
    }
    .jp-detail-hero {
        padding: 1.5rem;
    }
    .jp-detail-hero-title {
        font-size: 1.2rem;
    }
    .jp-detail-apply-bar {
        padding: 1rem 1.25rem;
    }
}
@media (max-width: 575.98px) {
    .jp-card {
        padding: 18px;
    }
    .jp-detail-hero {
        flex-direction: column;
        text-align: center;
    }
    .jp-detail-hero-meta {
        justify-content: center;
    }
    .jp-detail-actions {
        width: 100%;
    }
    .jp-btn-apply-job,
    .jp-btn-applied {
        width: 100%;
        justify-content: center;
    }
}

/* ── Application Timeline (Premium) ────────────────────────── */
.application-timeline {
    animation: fadeIn 0.5s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Horizontal Status Steps from Commit 349f3bc */
.status-steps { display: flex; gap: 0; margin-bottom: 4px; }
.status-step { flex: 1; text-align: center; font-size: 11px; font-weight: 600; color: #adb5bd; }
.status-step::after { content: ''; display: block; height: 4px; background: #e2e8f0; border-radius: 2px; margin-top: 6px; }
.status-step.done  { color: var(--jp-primary); }
.status-step.active { color: var(--jp-primary); }
.status-step.done::after  { background: var(--jp-primary); }
.status-step.active::after { background: #818cf8; }

.tl-wrapper {
    position: relative;
    padding-left: 45px;
    margin-top: 10px;
}
.tl-wrapper::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 14px;
    bottom: 14px;
    width: 2px;
    background: #e5e7eb;
    z-index: 0;
}
.tl-item {
    position: relative;
    padding-bottom: 24px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
    position: absolute;
    left: -42px;
    top: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    z-index: 1;
    box-shadow: 0 0 0 3px #fff, 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
.tl-card {
    background: #fff;
    border: 1px solid var(--jp-border);
    border-radius: 12px;
    padding: 14px 18px;
    transition: all 0.3s ease;
}
.tl-card.is-latest {
    background: #fcfcff;
    border-color: var(--jp-primary-soft);
}

/* Badge variants for timeline */
.bg-soft-primary { background-color: rgba(57, 44, 125, 0.1); color: #392C7D; }
.bg-soft-success { background-color: rgba(16, 185, 129, 0.1); color: #10B981; }
.bg-soft-warning { background-color: rgba(245, 158, 11, 0.1); color: #F59E0B; }
.bg-soft-danger { background-color: rgba(239, 68, 68, 0.1); color: #EF4444; }
.bg-soft-info { background-color: rgba(14, 165, 233, 0.1); color: #0EA5E9; }
.bg-soft-secondary { background-color: rgba(107, 114, 128, 0.1); color: #6B7280; }


/* Applied Button State */
.jp-btn-applied {
    padding: 10px 28px;
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    border-radius: var(--jp-radius);
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}
.jp-btn-applied[disabled],
.jp-btn-applied:disabled {
    cursor: not-allowed;
    opacity: .65;
}

/* Save Button States */
.jp-btn-save {
    padding: 10px 20px;
    background: #fff;
    color: #4b5563;
    border: 1px solid #d1d5db;
    border-radius: var(--jp-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    line-height: 1.4;
}
.jp-btn-save:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}
.jp-btn-save.is-saved {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}
.jp-btn-save.is-saved:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}
