/* ============================================
   SPLIT-PANEL LAYOUT — Jobs List + Detail Preview
   Left: Dark (matches existing) | Right: Light/White
   ============================================ */

/* --- Layout Container --- */
.split-layout {
    display: flex;
    gap: 0;
    height: calc(100vh - 140px);
    position: relative;
}

/* --- Left Panel: Jobs List (stays dark) --- */
.split-left {
    width: 420px;
    min-width: 360px;
    max-width: 480px;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
    flex-shrink: 0;
    position: relative;
}

.split-left::-webkit-scrollbar { width: 5px; }
.split-left::-webkit-scrollbar-track { background: transparent; }
.split-left::-webkit-scrollbar-thumb { background: rgba(102, 126, 234, 0.25); border-radius: 3px; }
.split-left::-webkit-scrollbar-thumb:hover { background: rgba(102, 126, 234, 0.45); }

/* --- Right Panel: LIGHT THEME --- */
.split-right {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    background: #ffffff;
    scrollbar-width: thin;
    scrollbar-color: #d4d4d8 #f4f4f5;
}

.split-right::-webkit-scrollbar { width: 6px; }
.split-right::-webkit-scrollbar-track { background: #f9fafb; }
.split-right::-webkit-scrollbar-thumb { background: #d4d4d8; border-radius: 3px; }
.split-right::-webkit-scrollbar-thumb:hover { background: #a1a1aa; }

/* ============================================
   EMPTY STATE (light)
   ============================================ */
.detail-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 3rem;
    user-select: none;
}

.detail-empty-icon {
    width: 88px;
    height: 88px;
    border-radius: 24px;
    background: linear-gradient(135deg, #f0f0ff, #e8e8ff);
    border: 1px solid #e0e0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.08);
}

.detail-empty-state h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1e1e2e;
    margin-bottom: 0.4rem;
}

.detail-empty-state p {
    font-size: 0.92rem;
    max-width: 260px;
    line-height: 1.55;
    color: #71717a;
}

/* ============================================
   SKELETON LOADING (light)
   ============================================ */
.detail-skeleton {
    padding: 2.5rem 3rem;
}

.detail-skeleton .skel-row {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f0f0f0;
}

.detail-skeleton .skel-avatar {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    flex-shrink: 0;
    background: linear-gradient(90deg, #f3f4f6, #e5e7eb, #f3f4f6);
    background-size: 600px 100%;
    animation: skel-shimmer-light 1.8s ease infinite;
}

.detail-skeleton .skel-info { flex: 1; }

.detail-skeleton .skel-bar {
    height: 14px;
    border-radius: 7px;
    background: linear-gradient(90deg, #f3f4f6, #e5e7eb, #f3f4f6);
    background-size: 600px 100%;
    animation: skel-shimmer-light 1.8s ease infinite;
    margin-bottom: 0.65rem;
}

.detail-skeleton .skel-bar.title { height: 24px; width: 65%; margin-bottom: 0.6rem; }
.detail-skeleton .skel-bar.subtitle { height: 16px; width: 42%; margin-bottom: 0.4rem; }
.detail-skeleton .skel-bar.meta { height: 12px; width: 30%; }
.detail-skeleton .skel-bar.w90 { width: 92%; }
.detail-skeleton .skel-bar.w70 { width: 68%; }
.detail-skeleton .skel-bar.w80 { width: 82%; }
.detail-skeleton .skel-bar.w60 { width: 58%; }

.detail-skeleton .skel-pills {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.detail-skeleton .skel-pill {
    height: 34px;
    border-radius: 20px;
    background: linear-gradient(90deg, #f3f4f6, #e5e7eb, #f3f4f6);
    background-size: 600px 100%;
    animation: skel-shimmer-light 1.8s ease infinite;
}

@keyframes skel-shimmer-light {
    0% { background-position: 600px 0; }
    100% { background-position: -600px 0; }
}

/* ============================================
   DETAIL PREVIEW — Main Container
   ============================================ */
.detail-preview {
    padding: 2.5rem 3rem 7rem;
    animation: detailReveal 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes detailReveal {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   HEADER — Logo + Title + Company + Date
   ============================================ */
.detail-preview-header {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.detail-company-logo {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    object-fit: contain;
    border: 1px solid #e5e7eb;
    background: #fafafa;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-company-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.detail-company-logo-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f0f0ff, #e8e8ff);
    border: 1px solid #e0e0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.detail-header-info { flex: 1; min-width: 0; }

.detail-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.35rem;
    line-height: 1.3;
    word-break: break-word;
    letter-spacing: -0.02em;
}

.detail-company {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.2rem;
}

.detail-company,
.detail-company a {
    color: #5b6abf;
    text-decoration: none;
    transition: color 0.2s;
}

.detail-company a:hover { color: #4338ca; }

.detail-posted {
    font-size: 0.85rem;
    color: #9ca3af;
    margin: 0;
}

/* ============================================
   INFO PILLS — Colored per type (light theme)
   ============================================ */
.detail-info-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}

.detail-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.45rem 0.9rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 550;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: 1px solid;
}

.detail-pill .pill-icon { font-size: 0.78rem; }

.detail-pill.pill-location {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.detail-pill.pill-salary {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}

.detail-pill.pill-type {
    background: #fffbeb;
    border-color: #fde68a;
    color: #a16207;
}

.detail-pill.pill-level {
    background: #f5f3ff;
    border-color: #ddd6fe;
    color: #6d28d9;
}

.detail-pill.pill-clearance {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c;
}

/* ============================================
   MATCH SCORE (light)
   ============================================ */
.detail-match-score {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    background: #f8f7ff;
    border: 1px solid #e8e5ff;
    border-radius: 12px;
    margin-bottom: 1.75rem;
}

.detail-match-score .match-label {
    font-size: 0.78rem;
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.detail-match-score .match-percent {
    font-size: 1.15rem;
    font-weight: 700;
    color: #5b6abf;
    white-space: nowrap;
}

.detail-match-bar-outer {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.detail-match-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   SECTIONS — Description & Duties
   ============================================ */
.detail-section {
    margin-bottom: 1.75rem;
}

.detail-section-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9ca3af;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.detail-section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #f0f0f0;
}

.detail-description-text {
    font-size: 0.98rem;
    color: #374151;
    line-height: 1.8;
    max-height: 260px;
    overflow: hidden;
    position: relative;
    word-break: break-word;
}

.detail-description-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(transparent, #ffffff);
    pointer-events: none;
}

/* ============================================
   DUTIES (light)
   ============================================ */
.detail-duties-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.detail-duties-list li {
    font-size: 0.95rem;
    color: #374151;
    padding: 0.65rem 0 0.65rem 1.75rem;
    position: relative;
    line-height: 1.6;
    border-bottom: 1px solid #f5f5f5;
}

.detail-duties-list li:last-child { border-bottom: none; }

.detail-duties-list li::before {
    content: '';
    position: absolute;
    left: 0.3rem;
    top: 1rem;
    width: 7px;
    height: 7px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
}

.detail-duties-more {
    color: #9ca3af;
    font-style: italic;
    font-size: 0.88rem;
    padding-left: 1.75rem;
    padding-top: 0.5rem;
}

/* ============================================
   STICKY ACTION BAR (light)
   ============================================ */
.detail-actions-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 0.75rem;
    padding: 1.25rem 3rem 1.5rem;
    background: linear-gradient(to top, #ffffff 70%, rgba(255, 255, 255, 0.85) 90%, transparent);
    z-index: 10;
    border-top: 1px solid #f0f0f0;
}

.detail-btn-view {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem 1.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.25);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.detail-btn-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.38);
    color: #fff;
    text-decoration: none;
}

.detail-btn-view:active { transform: translateY(0); }

.detail-btn-share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.95rem 1.25rem;
    background: #ffffff;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.detail-btn-share:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.detail-btn-share.copied {
    border-color: #86efac;
    color: #15803d;
    background: #f0fdf4;
}

/* ============================================
   ACTIVE JOB CARD HIGHLIGHT (left panel, dark)
   ============================================ */
.split-layout .job-card-compact.active-job {
    border-color: rgba(102, 126, 234, 0.4);
    background: rgba(102, 126, 234, 0.1);
    box-shadow: inset 3px 0 0 #667eea;
}

.split-layout .job-card-compact.active-job .job-title {
    color: #c4d0ff;
}

/* ============================================
   LEFT PANEL — Override existing dark styles
   ============================================ */
.split-layout .jobs-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(13, 27, 42, 0.96);
    backdrop-filter: blur(20px);
    padding: 1.15rem 0.9rem 0.65rem;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-secondary);
}

.split-layout .jobs-header .app-bar { margin-bottom: 0.4rem; padding: 0; }
.split-layout .jobs-header .app-title { font-size: 1.25rem; }
.split-layout .jobs-header .jobs-subtitle { display: none; }
.split-layout .search-container { margin: 0 0 0.4rem; }

.split-layout .search-input {
    padding: 0.6rem 0.9rem;
    font-size: 0.86rem;
    border-radius: 10px;
}

.split-layout .tab-filter-container { margin-bottom: 0.4rem; }

.split-layout .tab-btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.76rem;
    min-width: auto;
}

.split-layout .tab-icon { font-size: 0.8rem; }

.split-layout .job-listings {
    margin: 0;
    padding: 0.35rem 0.4rem;
}

.split-layout .job-card-compact {
    padding: 0.65rem 0.85rem;
    margin-bottom: 2px;
    border-radius: 10px;
    transition: all 0.15s ease;
}

.split-layout .job-card-compact .job-title { font-size: 0.87rem; }
.split-layout .job-card-compact .job-company { font-size: 0.76rem; }
.split-layout .job-card-compact .job-location,
.split-layout .job-card-compact .job-salary { font-size: 0.72rem; }
.split-layout .job-card-compact .job-arrow { display: none; }

.split-layout .load-more-container { padding: 0.65rem; margin-top: 0.4rem; }
.split-layout .recommendation-prompt { margin: 0.4rem 0; padding: 0.55rem; font-size: 0.82rem; }
.split-layout .recommendation-prompt .prompt-content h4 { font-size: 0.8rem; }
.split-layout .recommendation-prompt .prompt-content p { font-size: 0.7rem; }

/* Remove section card styling inside split */
.split-layout .jobs-section {
    background: none;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    overflow: visible;
}

.split-layout .jobs-section::before { display: none; }

/* ============================================
   WRAPPER
   ============================================ */
.split-layout-wrapper {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    position: relative;
    animation: fadeInUp 0.8s ease-out;
}

.split-layout-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: var(--primary-gradient);
    opacity: 0.6;
    z-index: 1;
}

/* ============================================
   RESIZE HANDLE
   ============================================ */
.split-resize-handle {
    width: 4px;
    cursor: col-resize;
    background: transparent;
    position: relative;
    flex-shrink: 0;
    z-index: 5;
}

.split-resize-handle::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 32px;
    background: #e5e7eb;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.split-resize-handle:hover::after,
.split-resize-handle.active::after {
    background: #667eea;
    height: 48px;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1023px) {
    .split-layout-wrapper { display: none !important; }
    .mobile-fallback-layout { display: block !important; }
}

@media (min-width: 1024px) {
    .mobile-fallback-layout { display: none !important; }
    .split-layout-wrapper { display: block; }
    .jobs-page.has-split-layout { padding-top: 100px; }
    .jobs-page.has-split-layout > .container { max-width: 1400px; }
}

@media (min-width: 1440px) {
    .split-left { width: 460px; max-width: 520px; }
    .jobs-page.has-split-layout > .container { max-width: 1600px; }
}