/* ============================================================================
   JOB HUB — Full-Screen Project Control Center
   Estimate → Schedule → Material → Invoice lifecycle
   ============================================================================ */

/* ── Overlay ─────────────────────────────────────────── */
.job-hub-overlay {
    position: fixed;
    inset: 0;
    z-index: 10002;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    pointer-events: auto;
    animation: jhFadeIn 0.2s ease-out;
}

@keyframes jhFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Panel (slide-out) ───────────────────────────────── */
.job-hub-panel {
    width: min(1100px, 96vw);
    height: 100vh;
    background: var(--color-bg-surface, #0f172a);
    border-left: 1px solid var(--color-border, #1e293b);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: jhSlideIn 0.25s ease-out;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
}

@keyframes jhSlideIn {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

/* ── Header ──────────────────────────────────────────── */
.jh-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    border-bottom: 1px solid var(--color-border, #1e293b);
    background: var(--color-bg-panel, #020617);
    flex-shrink: 0;
    gap: 16px;
}

.jh-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.jh-header-left .jh-quote-id {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--color-text-muted, #64748b);
    text-transform: uppercase;
}

.jh-header-left .jh-client-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text-main, #f1f5f9);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jh-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.jh-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.jh-close-btn {
    background: none;
    border: 1px solid var(--color-border, #334155);
    color: var(--color-text-muted, #94a3b8);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.15s, color 0.15s;
}

.jh-close-btn:hover {
    background: var(--color-bg-subtle, #1e293b);
    color: var(--color-text-main, #f1f5f9);
}

/* ── Body: two-column layout ─────────────────────────── */
.jh-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
}

.jh-columns {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    margin-bottom: 28px;
}

@media (max-width: 860px) {
    .jh-columns {
        grid-template-columns: 1fr;
    }
}

/* ── Section blocks ──────────────────────────────────── */
.jh-section {
    background: var(--color-bg-panel, #020617);
    border: 1px solid var(--color-border, #1e293b);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 16px;
}

.jh-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-muted, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border, #1e293b);
}

/* ── Property & Contact blocks ───────────────────────── */
.jh-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
}

.jh-detail-row + .jh-detail-row {
    border-top: 1px solid var(--color-border, #1e293b);
}

.jh-detail-icon {
    color: var(--color-primary, #3b82f6);
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.jh-detail-content {
    flex: 1;
    min-width: 0;
}

.jh-detail-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted, #64748b);
    margin-bottom: 2px;
}

.jh-detail-value {
    font-size: 14px;
    color: var(--color-text-main, #f1f5f9);
    word-break: break-word;
}

/* Quick-action buttons (call/email) */
.jh-quick-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.jh-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--color-border, #334155);
    background: var(--color-bg-subtle, #1e293b);
    color: var(--color-text-main, #e2e8f0);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    text-decoration: none;
}

.jh-quick-btn:hover {
    background: var(--color-primary, #3b82f6);
    border-color: var(--color-primary, #3b82f6);
    color: #fff;
}

/* ── Scope of Work (Line Items) ──────────────────────── */
.jh-scope-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.jh-scope-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 10px;
    border-bottom: 1px solid var(--color-border, #1e293b);
}

.jh-scope-table td {
    padding: 7px 10px;
    border-bottom: 1px solid var(--color-border, #1e293b);
    color: var(--color-text-main, #e2e8f0);
}

.jh-scope-table tr:last-child td {
    border-bottom: none;
}

.jh-scope-empty {
    text-align: center;
    padding: 20px;
    color: var(--color-text-muted, #64748b);
    font-size: 13px;
}

/* ── Action Timeline (Right Column) ──────────────────── */
.jh-timeline {
    position: relative;
    padding-left: 28px;
}

.jh-timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--color-border, #334155);
    border-radius: 2px;
}

.jh-timeline-step {
    position: relative;
    margin-bottom: 24px;
}

.jh-timeline-step:last-child {
    margin-bottom: 0;
}

.jh-timeline-dot {
    position: absolute;
    left: -28px;
    top: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 1;
}

.jh-timeline-dot.pending {
    background: var(--color-bg-subtle, #1e293b);
    border: 2px solid var(--color-border, #475569);
    color: var(--color-text-muted, #64748b);
}

.jh-timeline-dot.active {
    background: var(--color-primary, #3b82f6);
    border: 2px solid var(--color-primary, #3b82f6);
    color: #fff;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.jh-timeline-dot.done {
    background: #22c55e;
    border: 2px solid #22c55e;
    color: #fff;
}

.jh-timeline-step-header {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-main, #f1f5f9);
    margin-bottom: 4px;
}

.jh-timeline-step-meta {
    font-size: 12px;
    color: var(--color-text-muted, #94a3b8);
    margin-bottom: 8px;
}

.jh-timeline-step-meta .jh-date {
    color: #22c55e;
    font-weight: 600;
}

/* Timeline action button */
.jh-timeline-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}

.jh-timeline-action.primary {
    background: var(--color-primary, #3b82f6);
    color: #fff;
}

.jh-timeline-action.primary:hover {
    background: #2563eb;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.jh-timeline-action.success {
    background: #22c55e;
    color: #fff;
}

.jh-timeline-action.success:hover {
    background: #16a34a;
}

.jh-timeline-action.warning {
    background: #f59e0b;
    color: #0b1220;
}

.jh-timeline-action.warning:hover {
    background: #d97706;
}

.jh-timeline-action.secondary {
    background: var(--color-bg-subtle, #1e293b);
    color: var(--color-text-main, #e2e8f0);
    border: 1px solid var(--color-border, #334155);
}

.jh-timeline-action.secondary:hover {
    background: var(--color-border, #334155);
}

/* Completed-state info block */
.jh-timeline-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--color-bg-subtle, #1e293b);
    border-radius: 8px;
    font-size: 13px;
    color: var(--color-text-main, #e2e8f0);
}

.jh-timeline-info i {
    color: #22c55e;
    font-size: 16px;
}

/* ── Bottom actions bar ──────────────────────────────── */
.jh-bottom-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 28px;
    border-top: 1px solid var(--color-border, #1e293b);
    background: var(--color-bg-panel, #020617);
    flex-shrink: 0;
}

/* ── Schedule Modal (inline form) ────────────────────── */
.jh-schedule-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

.jh-schedule-form .inp-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jh-schedule-form label {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-muted, #64748b);
    text-transform: uppercase;
}

.jh-schedule-form input,
.jh-schedule-form select {
    padding: 7px 10px;
    border-radius: 6px;
    border: 1px solid var(--color-border, #334155);
    background: var(--color-bg-surface, #0f172a);
    color: var(--color-text-main, #e2e8f0);
    font-size: 13px;
}

.jh-schedule-form .jh-form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

/* ── Value badge in header ───────────────────────────── */
.jh-value-badge {
    font-size: 1.1rem;
    font-weight: 700;
    color: #22c55e;
    white-space: nowrap;
}
