/* CareerOS shared product UI primitives. */

:root {
    --cos-primary: #111827;
    --cos-primary-hover: #020617;
    --cos-accent: #0f766e;
    --cos-accent-hover: #115e59;
    --cos-accent-light: #f0fdfa;
    --cos-accent-border: #99f6e4;
    --cos-bg: #f7f8fa;
    --cos-surface: #ffffff;
    --cos-surface-soft: #f8fafc;
    --cos-text: #111827;
    --cos-text-sub: #64748b;
    --cos-border: #e5e7eb;
}

@keyframes cos-soft-pulse {
    0%, 100% {
        opacity: 0.48;
        transform: scale(1);
    }
    50% {
        opacity: 0.86;
        transform: scale(1.02);
    }
}

.cos-page {
    color: var(--cos-text);
}

.cos-atmosphere-page {
    min-height: calc(100vh - 80px);
    margin-top: -40px;
    padding: 36px 0 80px;
    background:
        radial-gradient(circle at 76% 12%, rgba(20,184,166,0.13), transparent 30%),
        radial-gradient(circle at 12% 18%, rgba(56,189,248,0.08), transparent 28%),
        linear-gradient(180deg, #f7fbfb 0%, #f7f8fa 48%, #ffffff 100%);
}

.cos-shell {
    width: min(1220px, calc(100% - 40px));
    margin: 0 auto;
}

.cos-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.cos-hero h1 {
    margin: 0 0 8px;
    color: var(--cos-text);
    letter-spacing: 0;
}

.cos-hero p {
    margin: 0;
    color: var(--cos-text-sub);
    line-height: 1.65;
}

.cos-panel,
.cos-card,
.cos-metric-card,
.cos-empty-state {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(15,23,42,0.08);
    border-radius: 10px;
    box-shadow: none;
}

.cos-panel,
.cos-card,
.cos-metric-card {
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.cos-panel,
.cos-card,
.cos-metric-card,
.cos-asset-card,
.cos-atmosphere-page .side-panel,
.cos-atmosphere-page .plan-card,
.cos-atmosphere-page .timeline-card,
.cos-atmosphere-page .market-filter,
.cos-atmosphere-page .metric-card,
.cos-atmosphere-page .chart-card,
.cos-atmosphere-page .stage-strip,
.cos-atmosphere-page .application-form,
.cos-atmosphere-page .application-row,
.cos-atmosphere-page .plan-empty,
.cos-atmosphere-page .market-empty,
.cos-atmosphere-page .empty-state {
    position: relative;
}

.cos-panel::after,
.cos-card::after,
.cos-metric-card::after,
.cos-asset-card::after,
.cos-atmosphere-page .side-panel::after,
.cos-atmosphere-page .plan-card::after,
.cos-atmosphere-page .timeline-card::after,
.cos-atmosphere-page .market-filter::after,
.cos-atmosphere-page .metric-card::after,
.cos-atmosphere-page .chart-card::after,
.cos-atmosphere-page .stage-strip::after,
.cos-atmosphere-page .application-form::after,
.cos-atmosphere-page .application-row::after,
.cos-atmosphere-page .plan-empty::after,
.cos-atmosphere-page .market-empty::after,
.cos-atmosphere-page .empty-state::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    opacity: 0;
    background: radial-gradient(circle at 50% 0%, rgba(20,184,166,0.12), transparent 46%);
    transition: opacity 0.22s ease;
}

.cos-panel:hover,
.cos-card:hover,
.cos-metric-card:hover {
    border-color: rgba(15,118,110,0.22);
    background: rgba(255,255,255,0.96);
    box-shadow: 0 8px 24px rgba(15,23,42,0.06);
}

.cos-panel:hover::after,
.cos-card:hover::after,
.cos-metric-card:hover::after,
.cos-asset-card:hover::after,
.cos-atmosphere-page .side-panel:hover::after,
.cos-atmosphere-page .plan-card:hover::after,
.cos-atmosphere-page .timeline-card:hover::after,
.cos-atmosphere-page .market-filter:hover::after,
.cos-atmosphere-page .metric-card:hover::after,
.cos-atmosphere-page .chart-card:hover::after,
.cos-atmosphere-page .stage-strip:hover::after,
.cos-atmosphere-page .application-form:hover::after,
.cos-atmosphere-page .application-row:hover::after,
.cos-atmosphere-page .plan-empty:hover::after,
.cos-atmosphere-page .market-empty:hover::after,
.cos-atmosphere-page .empty-state:hover::after {
    opacity: 1;
}

.cos-metric-card {
    min-width: 0;
}

.cos-empty-state {
    padding: 52px 20px;
    text-align: center;
    color: var(--cos-text-sub);
    border-style: dashed;
}

.cos-asset-header {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(15,23,42,0.07);
    border-radius: 10px;
    padding: 2.25rem 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(15,23,42,0.06);
    backdrop-filter: blur(18px);
}

.cos-asset-header::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #0f766e, #5eead4, rgba(15,118,110,0.10));
}

.cos-asset-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    color: var(--cos-accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
}

.cos-asset-card {
    border: 1px solid rgba(15,23,42,0.07);
    border-radius: 10px;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 14px 38px rgba(15,23,42,0.055);
    backdrop-filter: blur(18px);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.cos-asset-card:hover {
    border-color: rgba(15,118,110,0.24);
    background: #fcfffe;
    transform: translateY(-3px);
    box-shadow: 0 20px 54px rgba(15,118,110,0.09);
}

.cos-danger-icon-btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    color: #dc2626;
    background: #fef2f2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.cos-danger-icon-btn:hover {
    color: #fff;
    background: #dc2626;
}

.cos-asset-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid #dbe3ee;
    background: #f8fafc;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
}

.cos-asset-badge.is-accent {
    border-color: rgba(15,118,110,0.16);
    background: var(--cos-accent-light);
    color: var(--cos-accent);
}

.cos-asset-excerpt {
    line-height: 1.6;
    background: #f8fafc;
    border: 1px solid var(--cos-border);
    border-radius: 8px;
    color: var(--cos-text-sub);
    word-break: break-word;
}

.cos-pagination .page-link {
    border: 1px solid rgba(15,23,42,0.08);
    color: var(--cos-accent);
    min-width: 40px;
    text-align: center;
    font-weight: 700;
    border-radius: 8px;
    margin: 0 3px;
}

.cos-pagination .page-item.active .page-link {
    background: var(--cos-primary);
    border-color: var(--cos-primary);
    color: #fff;
}

.cos-pagination .page-item.disabled .page-link {
    color: #94a3b8;
    background: rgba(255,255,255,0.7);
}

.cos-chip,
.cos-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    padding: 5px 9px;
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px solid var(--cos-border);
    background: var(--cos-surface-soft);
    color: #475569;
}

.cos-chip.is-selected,
.cos-status.is-active {
    background: var(--cos-accent-light);
    border-color: rgba(15,118,110,0.18);
    color: var(--cos-accent);
}

.cos-status.is-active::before,
.cos-asset-badge.is-accent::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    animation: cos-soft-pulse 1.8s ease-in-out infinite;
}

.cos-action-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.cos-primary-action {
    background: var(--cos-primary);
    border-color: var(--cos-primary);
    color: #ffffff;
}

.cos-atmosphere-page .career-page,
.cos-atmosphere-page .market-page,
.cos-atmosphere-page .applications-page {
    max-width: none;
    padding: 0;
}

.cos-atmosphere-page .side-panel,
.cos-atmosphere-page .plan-card,
.cos-atmosphere-page .timeline-card,
.cos-atmosphere-page .market-filter,
.cos-atmosphere-page .metric-card,
.cos-atmosphere-page .chart-card,
.cos-atmosphere-page .stage-strip,
.cos-atmosphere-page .application-form,
.cos-atmosphere-page .application-row,
.cos-atmosphere-page .plan-empty,
.cos-atmosphere-page .market-empty,
.cos-atmosphere-page .empty-state {
    background: rgba(255,255,255,0.9);
    border-color: rgba(15,23,42,0.08);
    box-shadow: 0 8px 24px rgba(15,23,42,0.04);
}

.cos-atmosphere-page .metric-card,
.cos-atmosphere-page .chart-card,
.cos-atmosphere-page .application-row,
.cos-atmosphere-page .timeline-card,
.cos-atmosphere-page .plan-card {
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.cos-atmosphere-page .metric-card:hover,
.cos-atmosphere-page .chart-card:hover,
.cos-atmosphere-page .application-row:hover,
.cos-atmosphere-page .timeline-card:hover,
.cos-atmosphere-page .plan-card:hover {
    border-color: rgba(15,118,110,0.22);
    box-shadow: 0 12px 30px rgba(15,23,42,0.06);
}

@media (max-width: 768px) {
    .cos-atmosphere-page {
        margin-top: -28px;
        padding: 28px 0 56px;
    }

    .cos-shell {
        width: min(100% - 28px, 1220px);
    }

    .cos-hero,
    .cos-action-row {
        justify-content: flex-start;
    }

    .cos-action-row .btn {
        width: 100%;
    }

    .cos-asset-header {
        padding: 1.35rem;
        text-align: left;
    }

    .cos-asset-header h1 {
        font-size: 1.45rem;
        line-height: 1.32;
    }

    .cos-pagination .pagination {
        flex-wrap: wrap;
        gap: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cos-panel,
    .cos-card,
    .cos-metric-card,
    .cos-atmosphere-page .metric-card,
    .cos-atmosphere-page .chart-card,
    .cos-atmosphere-page .application-row,
    .cos-atmosphere-page .timeline-card,
    .cos-status.is-active::before,
    .cos-asset-badge.is-accent::before {
        animation: none;
    }

    .cos-panel,
    .cos-card,
    .cos-metric-card,
    .cos-asset-card,
    .cos-atmosphere-page .metric-card,
    .cos-atmosphere-page .chart-card,
    .cos-atmosphere-page .application-row,
    .cos-atmosphere-page .timeline-card,
    .cos-atmosphere-page .plan-card {
        transition: none;
    }
}
