/* === PRACOSTAT - Jasny motyw === */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:wght@400;600;700&display=swap');

:root {
  --amber: #d97706; --amber-bg: #fffbeb; --amber-border: #fcd34d;
  --violet: #7c3aed; --violet-bg: #f5f3ff; --violet-border: #ddd6fe;
  --emerald: #059669; --emerald-bg: #ecfdf5; --emerald-border: #a7f3d0;
  --red: #dc2626; --red-bg: #fef2f2;
  --bg: #faf9fc; --card: #ffffff; --surface: #f8f7fa;
  --text: #1e1b4b; --text-secondary: #5b6170; --text-muted: #6b7280;
  --border: #e5e0f5;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 24px -4px rgba(124,58,237,0.08), 0 4px 10px -6px rgba(0,0,0,0.04);
  --radius: 16px; --radius-sm: 10px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* HEADER */
.header { background: rgba(255,255,255,0.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.25rem; color: var(--text); font-family: var(--font-display); }
.logo-icon { font-size: 1.5rem; }
.nav { display: flex; gap: 20px; }
.nav a { text-decoration: none; color: var(--text-secondary); font-weight: 500; font-size: 0.9rem; transition: color 0.2s; cursor: pointer; }
.nav a:hover, .nav a.active { color: var(--violet); }

/* HERO */
.hero { background: linear-gradient(135deg, #faf9fc 0%, #f5f3ff 50%, #ede9fe 100%); padding: 60px 0 40px; text-align: center; border-radius: 0 0 var(--radius) var(--radius); margin-bottom: 24px; }
.hero-title { font-family: var(--font-display); font-size: 2.5rem; font-weight: 700; margin-bottom: 8px; }
.hero-title .highlight { background: linear-gradient(90deg, var(--violet), var(--emerald)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-subtitle { font-size: 1rem; color: var(--text-secondary); margin-bottom: 24px; }

/* SEARCH */
.search-container { position: relative; max-width: 560px; margin: 0 auto 12px; }
.search-box { display: flex; }
.search-box input { flex: 1; padding: 14px 18px; font-size: 1rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: var(--card); color: var(--text); outline: none; box-shadow: var(--shadow); }
.search-box input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(124,58,237,0.12); }
.search-btn { padding: 14px 24px; background: var(--violet); color: #fff; border: none; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.search-btn:hover { background: #6d28d9; }

/* SUGGESTIONS */
.search-suggestions { position: absolute; top: 100%; left: 0; right: 0; background: var(--card); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); display: none; z-index: 200; margin-top: 4px; border: 1px solid var(--border); }
.search-suggestions.visible { display: block; }
.suggestion-item { padding: 12px 16px; cursor: pointer; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); transition: background 0.15s; }
.suggestion-item:hover { background: var(--surface); }
.suggestion-item:last-child { border-bottom: none; }
.suggestion-emoji { font-size: 1.3rem; }
.suggestion-name { font-weight: 600; display: block; }
.suggestion-category { font-size: 0.8rem; color: var(--text-muted); display: block; }

/* POPULAR */
.popular-searches { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 16px; }
.popular-searches span { color: var(--text-muted); font-size: 0.85rem; }
.popular-searches button { padding: 6px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 18px; color: var(--text); cursor: pointer; font-size: 0.82rem; transition: all 0.2s; }
.popular-searches button:hover { background: var(--violet-bg); border-color: var(--violet); color: var(--violet); }

/* STATS */
.stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 32px; }
.stat-item { background: var(--card); padding: 20px; border-radius: var(--radius-sm); box-shadow: var(--shadow); text-align: center; border: 1px solid var(--border); }
.stat-number { display: block; font-size: 1.8rem; font-weight: 700; color: var(--violet); }
.stat-item.highlight .stat-number { background: linear-gradient(135deg, var(--violet), var(--emerald)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { font-size: 0.82rem; color: var(--text-muted); }

/* BACK BTN */
.back-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.88rem; font-weight: 500; cursor: pointer; margin-bottom: 16px; transition: all 0.2s; color: var(--text); }
.back-btn:hover { background: var(--violet-bg); border-color: var(--violet); color: var(--violet); }

/* LAB HERO */
.lab-hero { display: flex; align-items: center; gap: 20px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 28px; margin-bottom: 20px; border: 1px solid var(--border); flex-wrap: wrap; }
.lab-hero-icon { font-size: 3rem; width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--violet-bg), #ede9fe); border-radius: 18px; border: 1px solid var(--border); }
.lab-kod-kzis { font-family: monospace; font-size: 0.85rem; font-weight: 600; color: var(--violet); margin-bottom: 2px; }
.lab-title { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.lab-sub { font-size: 0.95rem; color: var(--text-secondary); }
.lab-hero-scores { display: flex; gap: 12px; margin-left: auto; flex-wrap: wrap; }
.lab-score-card { background: var(--surface); border-radius: var(--radius-sm); padding: 12px 16px; text-align: center; border: 1px solid var(--border); min-width: 100px; }
.lab-score-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 4px; }
.lab-score-value { font-size: 1.4rem; font-weight: 700; }

/* 3 FILARY */
.lab-filary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.lab-filar { border-radius: var(--radius); padding: 18px; border: 1px solid; }
.lab-filar-amber { border-color: var(--amber-border); background: var(--amber-bg); }
.lab-filar-amber .lab-filar-h { color: var(--amber); }
.lab-filar-violet { border-color: var(--violet-border); background: var(--violet-bg); }
.lab-filar-violet .lab-filar-h { color: var(--violet); }
.lab-filar-emerald { border-color: var(--emerald-border); background: var(--emerald-bg); }
.lab-filar-emerald .lab-filar-h { color: var(--emerald); }
.lab-filar-h { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px; }
.lab-filar-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(0,0,0,0.04); }
.lab-filar-row:last-child { border-bottom: none; }
.lab-filar-l { font-size: 0.78rem; color: var(--text-secondary); }
.lab-filar-v { font-size: 0.95rem; font-weight: 600; }

/* WERDYKT */
.lab-werdykt { color: #fff; border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.lab-werdykt-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.lab-werdykt-text { font-size: 0.9rem; line-height: 1.6; opacity: 0.9; margin-bottom: 12px; }
.lab-sygnaly { display: flex; flex-wrap: wrap; gap: 6px; }
.lab-sygnal { padding: 4px 12px; border-radius: 16px; font-size: 0.78rem; font-weight: 500; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.1); }
.lab-sygnal-positive { border-color: rgba(52,211,153,0.5); background: rgba(52,211,153,0.2); color: #6ee7b7; }
.lab-sygnal-neutral { border-color: rgba(252,211,77,0.5); background: rgba(252,211,77,0.2); color: #fde68a; }
.lab-sygnal-caution { border-color: rgba(251,113,133,0.5); background: rgba(251,113,133,0.2); color: #fda4af; }

/* SECTIONS */
.lab-section { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 14px; border: 1px solid var(--border); }
.lab-section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 14px; color: var(--text); }

/* NAPIECIA */
.lab-napiecia { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.lab-napiecie { border-radius: var(--radius-sm); padding: 14px; border-left: 4px solid; }
.lab-napiecie-hot { border-color: var(--red); background: var(--red-bg); }
.lab-napiecie-hot .lab-napiecie-t { color: var(--red); }
.lab-napiecie-watch { border-color: var(--amber); background: var(--amber-bg); }
.lab-napiecie-watch .lab-napiecie-t { color: var(--amber); }
.lab-napiecie-calm { border-color: var(--emerald); background: var(--emerald-bg); }
.lab-napiecie-calm .lab-napiecie-t { color: var(--emerald); }
.lab-napiecie-t { font-weight: 700; margin-bottom: 4px; font-size: 0.85rem; }
.lab-napiecie p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }

/* TABLE */
.lab-table { width: 100%; border-collapse: collapse; }
.lab-table th { text-align: left; padding: 10px 12px; background: var(--surface); font-weight: 600; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.lab-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.lab-table tr:hover td { background: var(--surface); }

/* REKOMENDACJE */
.lab-reco-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; }
.lab-reco-list { font-size: 0.88rem; color: var(--text-secondary); padding-left: 20px; }
.lab-reco-list li { margin-bottom: 6px; line-height: 1.5; }

/* DEFICYT */
.lab-deficit-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; font-style: italic; }

/* COMPARE BTN */
.lab-compare-btn { padding: 10px 24px; background: var(--violet); color: #fff; border: none; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; transition: all 0.2s; font-size: 0.9rem; }
.lab-compare-btn:hover { background: #6d28d9; transform: translateY(-1px); }

/* COMPARE TABLE */
.lab-compare-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.lab-compare-table th { text-align: left; padding: 10px 14px; background: var(--violet-bg); font-weight: 600; font-size: 0.82rem; color: var(--violet); border: 1px solid var(--border); }
.lab-compare-table td { padding: 10px 14px; border: 1px solid var(--border); font-size: 0.88rem; }
.lab-compare-table tr:nth-child(even) td { background: var(--surface); }
.lab-compare-table .val { font-weight: 600; }
.lab-compare-table .mono { font-family: monospace; }

/* EMPTY */
.lab-empty { text-align: center; padding: 60px 20px; }
.lab-empty h2 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 8px; }
.lab-empty p { color: var(--text-secondary); margin-bottom: 20px; }

/* LOADING */
.loading { text-align: center; padding: 60px 20px; }
.spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--violet); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ERROR */
.error { text-align: center; padding: 60px 20px; background: var(--red-bg); border-radius: var(--radius); border: 1px solid var(--red); }
.error h3 { color: var(--red); margin-bottom: 8px; }
.error p { color: var(--text-secondary); margin-bottom: 8px; }
.error button { margin-top: 16px; padding: 10px 24px; background: var(--red); color: #fff; border: none; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; }

/* HOME SECTIONS */
.section-home { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; border: 1px solid var(--border); }
.section-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; }
.section-subtitle { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 16px; }
.section-future-home { background: linear-gradient(135deg, #f0fdf4, #ecfdf5); border: 1px solid #bbf7d0; }

/* SELECT POWIATU */
.powiat-selector { display: flex; flex-direction: column; gap: 10px; }
#powiat-select, #powiat-subselect { padding: 12px 16px; font-size: 0.95rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--card); color: var(--text); outline: none; appearance: none; cursor: pointer; }
#powiat-select:focus, #powiat-subselect:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(124,58,237,0.12); }

/* POWIAT INFO */
.powiat-info-card { background: var(--surface); border-radius: var(--radius-sm); padding: 16px; border: 1px solid var(--border); margin-top: 10px; }
.powiat-info-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 2px; }
.powiat-info-woj { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 12px; }
.powiat-info-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 10px; }
.poi-stat { background: var(--card); border-radius: 8px; padding: 10px; text-align: center; }
.poi-label { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 2px; }
.poi-value { font-size: 1rem; font-weight: 700; }

/* TOP LIST */
.top-list { display: flex; flex-direction: column; gap: 8px; }
.top-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s; border: 1px solid transparent; }
.top-item:hover { background: var(--card); border-color: var(--violet); box-shadow: var(--shadow-lg); transform: translateX(4px); }
.top-item-highlight { background: linear-gradient(135deg, #f5f3ff, #ede9fe); border-color: #ddd6fe; }
.top-rank { font-size: 0.85rem; font-weight: 700; color: var(--violet); min-width: 30px; }
.top-emoji { font-size: 1.3rem; }
.top-name { font-weight: 600; flex: 1; }
.top-oferty { font-size: 0.82rem; color: var(--text-muted); }
.top-ratio { font-size: 0.82rem; color: #059669; font-weight: 600; }

/* RANKING */
.ranking-list { display: flex; flex-direction: column; gap: 8px; }
.ranking-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border-radius: var(--radius-sm); cursor: default; }
.ranking-name { font-weight: 600; flex: 1; }
.ranking-woj { font-size: 0.82rem; color: var(--text-muted); }
.ranking-value { font-size: 1rem; font-weight: 700; }

/* MAP */
.section-map-home { background: linear-gradient(135deg, #f0f9ff, #e0f2fe); border: 1px solid #bae6fd; }
.open-map-btn { display: inline-block; padding: 14px 28px; background: linear-gradient(135deg, #7c3aed, #6d28d9); color: #fff; text-decoration: none; border-radius: var(--radius-sm); font-weight: 600; font-size: 1rem; transition: all 0.2s; box-shadow: var(--shadow); }
.open-map-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.map-container { min-height: 200px; margin-top: 12px; }
.map-loading { text-align: center; padding: 40px; color: var(--text-muted); }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(28px, 1fr)); gap: 2px; }
.map-cell { aspect-ratio: 1; border-radius: 3px; cursor: pointer; transition: all 0.15s; }
.map-cell:hover { transform: scale(1.3); z-index: 10; box-shadow: 0 0 8px rgba(0,0,0,0.3); }
.map-legend { display: flex; align-items: center; gap: 8px; margin-top: 12px; justify-content: center; }
.legend-label { font-size: 0.75rem; color: var(--text-muted); }
.legend-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; width: 200px; }
.legend-segment { flex: 1; }

/* FUTURE PREVIEW GRID */

/* 4 METRYKI */
.lab-metryki { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.lab-metryka { background: var(--card); border-radius: var(--radius-sm); padding: 16px; text-align: center; border: 1px solid var(--border); box-shadow: var(--shadow); }
.lab-metryka-icon { font-size: 1.5rem; margin-bottom: 4px; }
.lab-metryka-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 4px; }
.lab-metryka-value { font-size: 1rem; font-weight: 700; }

/* DEPOPULACJA */
.lab-section-depop { background: var(--surface); }
.lab-depop-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 8px; }
.lab-depop-detail { font-size: 0.8rem; color: var(--text-muted); font-style: italic; }

/* HINT */
.lab-section-hint { font-size: 0.82rem; color: var(--text-muted); margin-top: 10px; font-style: italic; }

/* FUTURE GRID */
.lab-section-future { background: linear-gradient(135deg, #f0fdf4, #ecfdf5); border: 1px solid #bbf7d0; }
.lab-future-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.lab-future-card { background: var(--card); border-radius: var(--radius-sm); padding: 14px; text-align: center; border: 1px solid var(--border); transition: all 0.2s; }
.lab-future-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.lab-future-current { border-color: #16a34a; box-shadow: 0 0 0 2px rgba(22,163,74,0.2); }
.lab-future-emoji { font-size: 1.5rem; margin-bottom: 4px; }
.lab-future-name { font-size: 0.82rem; font-weight: 600; margin-bottom: 4px; }
.lab-future-reason { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 6px; }
.lab-future-score { font-size: 0.9rem; font-weight: 700; }

/* ALTERNATYWY */
.lab-alts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lab-alt-btn { padding: 8px 16px; background: var(--card); border: 1px solid var(--border); border-radius: 20px; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; color: var(--text); }
.lab-alt-btn:hover { background: var(--violet-bg); border-color: var(--violet); color: var(--violet); }

/* CTA SECTION */
.lab-section-cta { background: linear-gradient(135deg, #faf5ff, #f3e8ff); border: 1px solid #e9d5ff; }
.lab-cta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
.lab-cta-card { background: var(--card); border-radius: var(--radius-sm); padding: 20px; text-align: center; border: 1px solid var(--border); transition: all 0.2s; text-decoration: none; color: var(--text); cursor: pointer; position: relative; }
.lab-cta-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--violet); }
.lab-cta-icon { font-size: 2rem; margin-bottom: 8px; }
.lab-cta-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.lab-cta-desc { font-size: 0.78rem; color: var(--text-muted); }
.lab-cta-badge { position: absolute; top: 8px; right: 8px; background: #f59e0b; color: #fff; font-size: 0.65rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; }
.lab-cta-course { border-left: 3px solid #7c3aed; }
.lab-cta-jobs { border-left: 3px solid #059669; }
.lab-cta-training { border-left: 3px solid #0ea5e9; }
.lab-cta-report { border-left: 3px solid #f59e0b; opacity: 0.7; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .lab-filary { grid-template-columns: 1fr; }
  .lab-metryki { grid-template-columns: repeat(2, 1fr); }
  .lab-future-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .lab-hero { flex-direction: column; align-items: flex-start; }
  .lab-hero-scores { margin-left: 0; width: 100%; }
  .hero-title { font-size: 1.8rem; }
  .lab-title { font-size: 1.4rem; }
}
