/* ============================================
   STATUS.LUKASZBANACH.PL — Shared Design System
   ============================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #050505; --surface: #0a0a0a; --surface-2: #111; --border: #1a1a1a; --border-light: #222;
    --red: #dc2626; --red-dim: rgba(220,38,38,0.12); --red-glow: rgba(220,38,38,0.06);
    --green: #22c55e; --green-dim: rgba(34,197,94,0.12);
    --yellow: #eab308; --yellow-dim: rgba(234,179,8,0.12);
    --blue: #3b82f6; --blue-dim: rgba(59,130,246,0.12);
    --text: #ededed; --text-dim: #999; --text-muted: #555;
}

body { background: var(--bg); color: var(--text); font-family: 'Inter', sans-serif; min-height: 100vh; line-height: 1.6; }
.mono { font-family: 'JetBrains Mono', monospace; }
.serif { font-family: 'Cinzel', serif; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Grid Background */
.grid-bg {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-size: 60px 60px;
    background-image: linear-gradient(to right, rgba(220,38,38,0.02) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(220,38,38,0.02) 1px, transparent 1px);
}

/* Layout */
.container { max-width: 860px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* Topbar */
.topbar {
    position: sticky; top: 0; z-index: 50; background: rgba(5,5,5,0.85); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border); padding: 12px 0;
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; }
.topbar-back { font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 8px; text-decoration: none; }
.topbar-back:hover { color: var(--red); text-decoration: none; }
.topbar-live { font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--yellow); display: flex; align-items: center; gap: 6px; }
.topbar-live .dot { width: 5px; height: 5px; background: var(--yellow); border-radius: 50%; animation: pulse 2s infinite; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Header (hub pages) */
header { padding: 80px 0 40px; border-bottom: 1px solid var(--border); }
.header-tag {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--red); margin-bottom: 24px;
}
.header-tag .dot { width: 6px; height: 6px; background: var(--red); border-radius: 50%; animation: pulse 2s infinite; }
h1 { font-size: clamp(28px, 5vw, 42px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 12px; }
.subtitle { color: var(--text-dim); font-size: 15px; line-height: 1.6; max-width: 540px; }

/* Hero (project pages) */
.hero { padding: 48px 0 40px; border-bottom: 1px solid var(--border); }
.hero-tag { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 16px; }
.hero h1 { font-size: clamp(24px, 4vw, 36px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.hero-sub { font-size: 15px; color: var(--text-dim); }
.hero-meta { display: flex; gap: 24px; margin-top: 20px; flex-wrap: wrap; }
.hero-meta-item { font-size: 11px; color: var(--text-muted); }
.hero-meta-item span { color: var(--text-dim); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--border); margin: 32px 0; border: 1px solid var(--border); }
.stat { background: var(--surface); padding: 20px 24px; }
.stat-label { font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.stat-value { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.stat-note { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

/* Sections */
.section { padding: 40px 0; border-bottom: 1px solid var(--border); }
.section:last-of-type { border-bottom: none; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.section-title { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-muted); }
.section-badge { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border: 1px solid; }
.section-label { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 24px; }

/* Timeline */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: var(--border-light); }
.tl-item { position: relative; margin-bottom: 28px; }
.tl-item:last-child { margin-bottom: 0; }
.tl-dot { position: absolute; left: -28px; top: 4px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--border-light); background: var(--bg); }
.tl-dot.done { border-color: var(--green); background: var(--green); }
.tl-dot.active { border-color: var(--yellow); background: var(--yellow); box-shadow: 0 0 12px rgba(234,179,8,0.4); }
.tl-dot.todo { border-color: var(--text-muted); }
.tl-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.tl-desc { font-size: 13px; color: var(--text-dim); }
.tl-date { font-size: 10px; color: var(--text-muted); margin-top: 4px; }

/* Insights */
.insights { display: grid; gap: 12px; }
.insight { background: var(--surface); border: 1px solid var(--border); padding: 20px 24px; display: flex; gap: 16px; align-items: flex-start; }
.insight-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.insight-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.insight-text { font-size: 12px; color: var(--text-dim); line-height: 1.5; }

/* Competition Table */
.comp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.comp-table th { text-align: left; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); font-weight: 500; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.comp-table td { padding: 12px; border-bottom: 1px solid var(--border); color: var(--text-dim); }
.comp-table tr:hover td { background: var(--surface); }
.comp-rank { color: var(--text-muted); }

/* Segments */
.segments { display: grid; gap: 12px; }
.segment { background: var(--surface); border: 1px solid var(--border); padding: 20px 24px; display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.seg-pct { font-size: 22px; font-weight: 700; min-width: 50px; text-align: center; }
.seg-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.seg-desc { font-size: 12px; color: var(--text-dim); }
.seg-headline { font-size: 11px; color: var(--text-muted); font-style: italic; margin-top: 4px; }
.seg-tag { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border: 1px solid rgba(220,38,38,0.2); color: var(--red); white-space: nowrap; }

/* Bar chart */
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.bar-label { font-size: 11px; color: var(--text-dim); min-width: 110px; }
.bar-track { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; transition: width 1s ease; }
.bar-value { font-size: 11px; color: var(--text-muted); min-width: 40px; text-align: right; }

/* Checklist */
.checklist { list-style: none; }
.checklist li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-dim); display: flex; align-items: center; gap: 12px; }
.checklist li:last-child { border-bottom: none; }
.check { width: 18px; height: 18px; border: 1px solid var(--border-light); display: flex; align-items: center; justify-content: center; font-size: 10px; flex-shrink: 0; }
.check.done { background: var(--green-dim); border-color: var(--green); color: var(--green); }
.check.pending { border-color: var(--text-muted); }
.check-label.done { color: var(--text-dim); text-decoration: line-through; text-decoration-color: var(--text-muted); }

/* Client cards (hub pages) */
.clients { padding: 48px 0 80px; }
.client-card {
    display: block; text-decoration: none; color: inherit;
    background: var(--surface); border: 1px solid var(--border);
    padding: 28px 32px; margin-bottom: 12px;
    transition: all 0.3s ease; position: relative; overflow: hidden;
}
.client-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--red); opacity: 0; transition: opacity 0.3s;
}
.client-card:hover { border-color: rgba(220,38,38,0.3); transform: translateX(4px); text-decoration: none; }
.client-card:hover::before { opacity: 1; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.card-name { font-size: 18px; font-weight: 600; }
.card-badge {
    font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase; padding: 4px 10px;
    border: 1px solid; display: inline-flex; align-items: center; gap: 6px;
}
.badge-active { color: var(--green); border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.05); }
.badge-setup { color: var(--yellow); border-color: rgba(234,179,8,0.3); background: rgba(234,179,8,0.05); }
.card-project { color: var(--text-dim); font-size: 13px; margin-bottom: 16px; }
.card-meta { display: flex; gap: 24px; flex-wrap: wrap; }
.card-meta-item { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.card-meta-item span { color: var(--text-dim); }
.card-arrow {
    position: absolute; right: 28px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 18px; transition: all 0.3s;
}
.client-card:hover .card-arrow { color: var(--red); transform: translateY(-50%) translateX(4px); }

/* Footer */
footer {
    border-top: 1px solid var(--border); padding: 32px 0; margin-top: 20px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
}
.footer-text { font-size: 11px; color: var(--text-muted); }
.footer-brand { font-size: 12px; color: var(--text-muted); }
.footer-brand a { color: var(--text-dim); text-decoration: none; }
.footer-brand a:hover { color: var(--red); }
.footer-note { font-size: 10px; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; }

/* Auth (login page) */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-box { width: 100%; max-width: 380px; }
.login-tag { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red); margin-bottom: 24px; text-align: center; }
.login-title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; text-align: center; }
.login-sub { font-size: 13px; color: var(--text-dim); margin-bottom: 32px; text-align: center; }
.login-input {
    width: 100%; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border);
    color: var(--text); font-family: 'JetBrains Mono', monospace; font-size: 14px;
    outline: none; transition: border-color 0.2s;
}
.login-input:focus { border-color: var(--red); }
.login-input::placeholder { color: var(--text-muted); }
.login-btn {
    width: 100%; padding: 14px; margin-top: 12px; background: var(--red); border: none;
    color: white; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600;
    letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; transition: opacity 0.2s;
}
.login-btn:hover { opacity: 0.9; }
.login-error { color: var(--red); font-size: 12px; margin-top: 12px; text-align: center; display: none; }

/* Admin badge */
.admin-tag {
    font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase;
    padding: 3px 8px; background: var(--red-dim); color: var(--red); border: 1px solid rgba(220,38,38,0.2);
}
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.logout-btn {
    font-size: 10px; color: var(--text-muted); background: none; border: 1px solid var(--border);
    padding: 4px 10px; cursor: pointer; font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.1em; text-transform: uppercase; transition: all 0.2s;
}
.logout-btn:hover { color: var(--red); border-color: rgba(220,38,38,0.3); }

/* Finance card (admin) */
.finance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.finance-item { background: var(--surface); padding: 20px 24px; }
.finance-label { font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.finance-value { font-size: 20px; font-weight: 700; }
.finance-note { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

/* Notes (admin) */
.notes-list { list-style: none; }
.notes-list li { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-dim); display: flex; gap: 12px; }
.notes-list li:last-child { border-bottom: none; }
.note-bullet { color: var(--text-muted); flex-shrink: 0; }

/* Responsive */
@media (max-width: 640px) {
    .stats { grid-template-columns: 1fr 1fr; }
    .segment { grid-template-columns: auto 1fr; }
    .seg-tag { display: none; }
    .hero-meta { gap: 12px; }
    .comp-table { font-size: 12px; }
    .comp-table th, .comp-table td { padding: 8px 6px; }
    .card-meta { gap: 12px; }
    .card-arrow { display: none; }
    .client-card { padding: 20px; }
    .finance-grid { grid-template-columns: 1fr 1fr; }
}
