/**
 * SKYBOOK GLOBAL - Centralized HR Recruitment Workspace Stylesheet
 * Premium executive management styling matching CEO & Travel Ops dashboards
 */

/* ═══════════════════════════════════════════════════════════════════
   1. HR SUB-NAVIGATION BAR (PILL STRIP)
   ═══════════════════════════════════════════════════════════════════ */
.hr-subnav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: var(--bg-secondary, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 14px;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
}

.hr-subnav::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.hr-subnav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 650;
    color: var(--text-secondary, #64748b);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    user-select: none;
    flex-shrink: 0;
}

.hr-subnav-btn:hover {
    color: var(--text-primary, #0f172a);
    background: rgba(244, 63, 94, 0.06);
    border-color: rgba(244, 63, 94, 0.2);
}

.hr-subnav-btn.active {
    color: #ffffff !important;
    background: var(--skyops-primary, #3155F5) !important;
    border-color: var(--skyops-primary, #3155F5) !important;
    box-shadow: 0 4px 12px rgba(49, 85, 245, 0.3) !important;
}

[data-theme="dark"] .hr-subnav {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .hr-subnav-btn {
    color: #94a3b8;
}

[data-theme="dark"] .hr-subnav-btn:hover {
    color: #f8fafc;
    background: rgba(244, 63, 94, 0.15);
}

/* ═══════════════════════════════════════════════════════════════════
   2. HR HERO BANNER (RECRUITMENT WORKSPACE HEADER)
   ═══════════════════════════════════════════════════════════════════ */
.hr-hero-banner {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.08) 0%, rgba(99, 102, 241, 0.06) 50%, rgba(168, 85, 247, 0.04) 100%);
    border: 1px solid rgba(244, 63, 94, 0.22);
    border-radius: 18px;
    padding: 22px 28px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

[data-theme="dark"] .hr-hero-banner {
    background: linear-gradient(135deg, rgba(76, 5, 25, 0.45) 0%, rgba(30, 27, 75, 0.6) 50%, rgba(15, 23, 42, 0.8) 100%);
    border-color: rgba(244, 63, 94, 0.35);
    box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.5);
}

.hr-hero-banner::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hr-hero-left {
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.hr-hero-icon-badge {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 8px 20px -4px rgba(244, 63, 94, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

.hr-hero-icon-badge svg {
    width: 26px;
    height: 26px;
}

.hr-hero-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.hr-hero-badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hr-dept-pill {
    background: rgba(244, 63, 94, 0.12);
    color: #f43f5e;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 9999px;
    border: 1px solid rgba(244, 63, 94, 0.28);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

[data-theme="dark"] .hr-dept-pill {
    background: rgba(244, 63, 94, 0.25);
    color: #fda4af;
    border-color: rgba(253, 164, 175, 0.4);
}

.hr-hero-title {
    font-size: 1.55rem;
    font-weight: 850;
    letter-spacing: -0.02em;
    color: var(--text-primary, #0f172a);
    margin: 0;
    line-height: 1.2;
}

[data-theme="dark"] .hr-hero-title {
    color: #ffffff;
}

.hr-hero-subtitle {
    font-size: 0.88rem;
    color: var(--text-secondary, #64748b);
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
}

.hr-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.btn-hr-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-secondary, #ffffff);
    color: var(--text-primary, #0f172a);
    border: 1px solid var(--border-color, #e2e8f0);
    padding: 9px 16px;
    border-radius: 12px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-hr-secondary:hover {
    background: var(--bg-hover, #f1f5f9);
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--skyops-primary, #3155f5);
    transform: translateY(-1px);
}

[data-theme="dark"] .btn-hr-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}

[data-theme="dark"] .btn-hr-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.btn-hr-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--skyops-primary, #3155f5);
    color: #ffffff;
    border: 1px solid var(--skyops-primary, #3155f5);
    padding: 9px 18px;
    border-radius: 12px;
    font-size: 0.84rem;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(49, 85, 245, 0.25);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-hr-primary:hover {
    background: var(--skyops-primary-hover, #2343d4);
    border-color: var(--skyops-primary-hover, #2343d4);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(49, 85, 245, 0.35);
}

@media (max-width: 900px) {
    .hr-hero-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }
    .hr-hero-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   3. HR 9-KPI BALANCED RESPONSIVE GRID (SKYOPS DARK SYSTEM)
   ═══════════════════════════════════════════════════════════════════ */
.hr-stats-grid {
    display: grid;
    grid-template-columns: repeat(20, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
    width: 100%;
}

/* Large Desktop (>= 1400px): Row 1 has 5 cards (4 cols each), Row 2 has 4 cards (5 cols each) -> 100% Full Width Balanced */
.hr-stats-grid > .hr-kpi-card:nth-child(-n+5) {
    grid-column: span 4;
}

.hr-stats-grid > .hr-kpi-card:nth-child(n+6) {
    grid-column: span 5;
}

/* Medium Desktop / Tablet Landscape (901px - 1399px): 3 columns (3x3 = 9 cards, perfectly balanced) */
@media (max-width: 1399px) {
    .hr-stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }
    .hr-stats-grid > .hr-kpi-card:nth-child(-n+5),
    .hr-stats-grid > .hr-kpi-card:nth-child(n+6) {
        grid-column: span 1;
    }
}

/* Tablet Portrait / Mobile Landscape (541px - 900px): 2 columns, last card spans 2 columns */
@media (max-width: 900px) {
    .hr-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .hr-stats-grid > .hr-kpi-card:nth-child(9) {
        grid-column: span 2;
    }
}

/* Mobile Portrait (<= 540px): 1 column */
@media (max-width: 540px) {
    .hr-stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .hr-stats-grid > .hr-kpi-card:nth-child(9) {
        grid-column: span 1;
    }
}

/* HR KPI Card Component Styles */
.hr-kpi-card.skyops-dark-card {
    padding: 18px 16px !important;
    min-height: 148px !important;
    border-radius: 16px !important;
    user-select: none;
    box-shadow: 0 4px 14px rgba(11, 18, 32, 0.22), 0 1px 3px rgba(11, 18, 32, 0.12) !important;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    box-sizing: border-box;
}

.hr-kpi-card.skyops-dark-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 16px 36px rgba(11, 18, 32, 0.32), 0 4px 12px rgba(11, 18, 32, 0.18) !important;
}

.hr-kpi-card .skyops-dark-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    margin-bottom: 8px;
}

.hr-kpi-card .skyops-dark-card-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.4px;
    margin: 0;
    text-transform: uppercase;
}

.hr-kpi-card .skyops-dark-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hr-kpi-card .skyops-dark-card-icon svg {
    width: 16px;
    height: 16px;
}

.hr-kpi-card .skyops-dark-card-value-wrapper {
    position: relative;
    z-index: 2;
    margin: 6px 0 6px 0;
}

.hr-kpi-card .skyops-dark-card-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: #FFFFFF !important;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    margin: 0;
}

.hr-kpi-card .skyops-dark-card-breakdown {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.72rem;
    font-weight: 600;
    position: relative;
    z-index: 2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hr-kpi-card .stat-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 2px;
    flex-shrink: 0;
}

.hr-kpi-card .dot-indigo { background: #818CF8; box-shadow: 0 0 6px rgba(129, 140, 248, 0.6); }
.hr-kpi-card .dot-amber  { background: #F59E0B; box-shadow: 0 0 6px rgba(245, 158, 11, 0.6); }
.hr-kpi-card .dot-cyan   { background: #22D3EE; box-shadow: 0 0 6px rgba(34, 211, 238, 0.6); }
.hr-kpi-card .dot-blue   { background: #60A5FA; box-shadow: 0 0 6px rgba(96, 165, 250, 0.6); }
.hr-kpi-card .dot-purple { background: #A855F7; box-shadow: 0 0 6px rgba(168, 85, 247, 0.6); }
.hr-kpi-card .dot-rose   { background: #F43F5E; box-shadow: 0 0 6px rgba(244, 63, 94, 0.6); }
.hr-kpi-card .dot-green  { background: #10B981; box-shadow: 0 0 6px rgba(16, 185, 129, 0.6); }
.hr-kpi-card .dot-teal   { background: #14B8A6; box-shadow: 0 0 6px rgba(20, 184, 166, 0.6); }

/* ═══════════════════════════════════════════════════════════════════
   4. HR DASHBOARD PANELS (ACTIVITY & INTERVIEWS SPLIT)
   ═══════════════════════════════════════════════════════════════════ */
.hr-dashboard-panels-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 960px) {
    .hr-dashboard-panels-grid {
        grid-template-columns: 1fr;
    }
}

.hr-panel-card {
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .hr-panel-card {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.08);
}

.hr-panel-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

[data-theme="dark"] .hr-panel-header {
    border-color: rgba(255, 255, 255, 0.08);
}

.hr-panel-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}

[data-theme="dark"] .hr-panel-title {
    color: #ffffff;
}

.hr-panel-badge {
    font-size: 0.70rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 9px;
    border-radius: 9999px;
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.hr-panel-badge.purple {
    background: rgba(168, 85, 247, 0.1);
    color: #9333ea;
    border-color: rgba(168, 85, 247, 0.25);
}

[data-theme="dark"] .hr-panel-badge {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

[data-theme="dark"] .hr-panel-badge.purple {
    background: rgba(168, 85, 247, 0.2);
    color: #d8b4fe;
}

.hr-panel-body {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
}

/* Activity Items */
.hr-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    transition: background 0.15s ease;
}

.hr-activity-item:last-child {
    border-bottom: none;
}

.hr-activity-item:hover {
    background: var(--bg-hover, #f8fafc);
}

[data-theme="dark"] .hr-activity-item {
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .hr-activity-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.hr-activity-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--skyops-primary, #3155f5);
    margin-top: 6px;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(49, 85, 245, 0.4);
}

.hr-activity-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hr-activity-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.hr-activity-entity {
    font-size: 0.82rem;
    font-weight: 750;
    color: var(--text-primary, #0f172a);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

[data-theme="dark"] .hr-activity-entity {
    color: #f1f5f9;
}

.hr-activity-time {
    font-size: 0.72rem;
    color: var(--text-muted, #64748b);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.hr-activity-desc {
    font-size: 0.82rem;
    color: var(--text-secondary, #475569);
    line-height: 1.4;
}

[data-theme="dark"] .hr-activity-desc {
    color: #94a3b8;
}

.hr-activity-meta {
    font-size: 0.72rem;
    color: var(--text-muted, #64748b);
    margin-top: 2px;
}

/* Interview Items */
.hr-interview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    transition: background 0.15s ease;
}

.hr-interview-item:last-child {
    border-bottom: none;
}

.hr-interview-item:hover {
    background: var(--bg-hover, #f8fafc);
}

[data-theme="dark"] .hr-interview-item {
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .hr-interview-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.hr-interview-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.hr-candidate-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 800;
    flex-shrink: 0;
}

.hr-interview-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.hr-candidate-name {
    font-size: 0.88rem;
    font-weight: 750;
    color: var(--text-primary, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .hr-candidate-name {
    color: #f1f5f9;
}

.hr-interview-job-row {
    font-size: 0.76rem;
    color: var(--text-secondary, #64748b);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hr-round-badge {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
    border: 1px solid rgba(139, 92, 246, 0.25);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
}

[data-theme="dark"] .hr-round-badge {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
}

.hr-interview-time-row {
    font-size: 0.72rem;
    color: var(--skyops-primary, #3155f5);
    font-weight: 650;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 1px;
}

/* Polished Empty States */
.hr-empty-state {
    padding: 36px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hr-empty-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg-hover, #f1f5f9);
    border: 1px solid var(--border-color, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 4px;
}

[data-theme="dark"] .hr-empty-icon {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.hr-empty-icon svg {
    width: 22px;
    height: 22px;
}

.hr-empty-title {
    font-size: 0.92rem;
    font-weight: 750;
    color: var(--text-primary, #0f172a);
}

[data-theme="dark"] .hr-empty-title {
    color: #f1f5f9;
}

.hr-empty-desc {
    font-size: 0.80rem;
    color: var(--text-muted, #64748b);
    max-width: 320px;
    line-height: 1.4;
    margin: 0;
}
