/* Low Energy Group CRM - style */
:root {
    --las: #0F1F18;
    --las-2: #16291F;
    --papier: #F4F6F2;
    --biel: #FFFFFF;
    --zielen: #1E9E5A;
    --zielen-c: #157A44;
    --slonce: #F5A623;
    --tusz: #17221B;
    --szary: #66756C;
    --linia: #E1E7E0;
    --czerwien: #C63B3B;
    --r: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--papier); color: var(--tusz); font-size: 14.5px; }
h1, h2, h3, .logo-nazwa, .stat-liczba, .wynik-glowny { font-family: 'Sora', sans-serif; }
a { color: var(--zielen-c); text-decoration: none; }

.app { display: flex; min-height: 100vh; }

/* ---------- SIDEBAR ---------- */
.sidebar { width: 240px; background: var(--las); color: #DCE7DF; display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; }
.logo { display: flex; align-items: center; gap: 12px; padding: 22px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.logo-znak { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, var(--zielen), #35C97E); color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'Sora'; font-weight: 800; font-size: 15px; }
.logo-nazwa { font-weight: 700; font-size: 14px; color: #fff; line-height: 1.2; }
.logo-sub { font-size: 11px; color: #7E9488; letter-spacing: .12em; text-transform: uppercase; margin-top: 2px; }
.sidebar nav { flex: 1; padding: 14px 12px; overflow-y: auto; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 10px 13px; margin: 2px 0; border-radius: 9px; color: #B9C9BE; font-weight: 500; font-size: 14px; position: relative; transition: background .12s, color .12s; }
.sidebar nav a:hover { background: var(--las-2); color: #fff; }
.sidebar nav a.aktywny { background: var(--zielen); color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(30,158,90,.3); }
.nav-ikona { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.sidebar nav a.aktywny .nav-ikona { opacity: 1; }
.nav-tekst { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-badge { flex-shrink: 0; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #F5A623; color: #3a2a05; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.sidebar nav a.aktywny .nav-badge { background: #fff; color: var(--zielen-c); }
.nav-sekcja { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #5F7367; padding: 18px 14px 6px; }
.sidebar-stopka { padding: 16px; border-top: 1px solid rgba(255,255,255,.07); }
.user-info { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.user-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--slonce); color: var(--las); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.user-imie { font-size: 13.5px; font-weight: 600; color: #fff; }
.user-rola { font-size: 11.5px; color: #7E9488; }
.wyloguj { display: block; text-align: center; padding: 8px; border: 1px solid rgba(255,255,255,.15); border-radius: 8px; color: #B9C9BE; font-size: 13px; }
.wyloguj:hover { background: rgba(255,255,255,.06); color: #fff; }

/* ---------- TREŚĆ ---------- */
.tresc { flex: 1; margin-left: 240px; display: flex; flex-direction: column; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 28px; background: var(--biel); border-bottom: 1px solid var(--linia); position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-size: 20px; font-weight: 700; }
.topbar-data { color: var(--szary); font-size: 13.5px; }
.zawartosc { padding: 26px 28px 60px; max-width: 1240px; }

/* ---------- KARTY / SIATKI ---------- */
.karta { background: var(--biel); border: 1px solid var(--linia); border-radius: var(--r); padding: 20px 22px; margin-bottom: 20px; }
.karta h2 { font-size: 16px; margin-bottom: 14px; }
.karta h3 { font-size: 14px; margin: 14px 0 8px; }
.siatka { display: grid; gap: 16px; }
.siatka-2 { grid-template-columns: 1fr 1fr; }
.siatka-3 { grid-template-columns: repeat(3, 1fr); }
.siatka-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .siatka-4 { grid-template-columns: repeat(2, 1fr); } .siatka-3 { grid-template-columns: 1fr; } .siatka-2 { grid-template-columns: 1fr; } }

.stat { background: var(--biel); border: 1px solid var(--linia); border-radius: var(--r); padding: 18px 20px; }
.stat-etykieta { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--szary); margin-bottom: 6px; }
.stat-liczba { font-size: 30px; font-weight: 800; }
.stat-liczba small { font-size: 14px; font-weight: 600; color: var(--szary); }
.stat.akcent { border-top: 3px solid var(--zielen); }
.stat.slonce { border-top: 3px solid var(--slonce); }

/* ---------- TABELE ---------- */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--szary); padding: 8px 10px; border-bottom: 2px solid var(--linia); }
td { padding: 11px 10px; border-bottom: 1px solid var(--linia); vertical-align: middle; }
tr:hover td { background: #FAFCF9; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- FORMULARZE ---------- */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--szary); margin-bottom: 5px; }
input, select, textarea { width: 100%; padding: 9px 12px; border: 1px solid #CBD6CD; border-radius: 8px; font: inherit; background: #fff; color: var(--tusz); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--zielen); outline-offset: 0; border-color: var(--zielen); }
.pole { margin-bottom: 14px; }
.rzad { display: flex; gap: 14px; } .rzad > * { flex: 1; }

.btn { display: inline-block; padding: 10px 18px; border-radius: 9px; border: none; font: inherit; font-weight: 600; cursor: pointer; background: var(--zielen); color: #fff; }
.btn:hover { background: var(--zielen-c); }
.btn.drugi { background: #fff; color: var(--tusz); border: 1px solid #CBD6CD; }
.btn.drugi:hover { background: #F2F5F1; }
.btn.maly { padding: 6px 12px; font-size: 13px; }
.btn.niebezpieczny { background: #fff; color: var(--czerwien); border: 1px solid #E4C2C2; }
.btn.niebezpieczny:hover { background: #FBF0F0; }

/* ---------- BADGE STATUSÓW ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.b-nowy { background: #E7F0FB; color: #2B5FA8; }
.b-kontakt { background: #EDEBFB; color: #5A4FB8; }
.b-spotkanie { background: #FDF3DF; color: #A87413; }
.b-oferta { background: #E4F4EC; color: #157A44; }
.b-negocjacje { background: #FDEAD9; color: #B05E14; }
.b-umowa { background: #1E9E5A; color: #fff; }
.b-montaz { background: #164A78; color: #fff; }
.b-zakonczony { background: #E4E9E4; color: #4E5C52; }
.b-stracony { background: #F8E5E5; color: #A33; }
.b-robocza { background: #E4E9E4; color: #4E5C52; }
.b-wyslana { background: #E7F0FB; color: #2B5FA8; }
.b-zaakceptowana { background: #1E9E5A; color: #fff; }
.b-odrzucona { background: #F8E5E5; color: #A33; }

/* ---------- KOMUNIKATY ---------- */
.info { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-weight: 500; }
.info.ok { background: #E4F4EC; color: #157A44; border: 1px solid #BFE3CF; }
.info.blad { background: #FBEAEA; color: #A33; border: 1px solid #E9C6C6; }

/* ---------- KALENDARZ ---------- */
.kal-naglowek { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.kal-naglowek h2 { font-size: 18px; text-transform: capitalize; }
.kal-siatka { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.kal-dzien-naglowek { text-align: center; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--szary); padding: 6px 0; font-weight: 600; }
.kal-dzien { background: var(--biel); border: 1px solid var(--linia); border-radius: 10px; min-height: 96px; padding: 7px; font-size: 12.5px; }
.kal-dzien.pusty { background: transparent; border-color: transparent; }
.kal-dzien.dzis { border: 2px solid var(--zielen); }
.kal-nr { font-weight: 700; font-size: 12.5px; color: var(--szary); margin-bottom: 4px; }
.kal-dzien.dzis .kal-nr { color: var(--zielen-c); }
.kal-spotkanie { display: block; background: #E4F4EC; color: #14663B; border-left: 3px solid var(--zielen); border-radius: 5px; padding: 3px 6px; margin-bottom: 3px; font-size: 11.5px; line-height: 1.3; overflow: hidden; }
.kal-spotkanie.odbyte { background: #EDF0ED; color: #67766D; border-left-color: #A9B6AC; text-decoration: line-through; }
.kal-spotkanie.anulowane { background: #FBEAEA; color: #A33; border-left-color: var(--czerwien); }

/* ---------- KALKULATOR - panel licznika energii ---------- */
.kalk-uklad { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .kalk-uklad { grid-template-columns: 1fr; } }
.podsumowanie { position: sticky; top: 90px; background: var(--las); color: #DCE7DF; border-radius: 16px; padding: 24px; }
.podsumowanie h2 { color: #fff; font-size: 15px; letter-spacing: .04em; }
.wynik-moc { margin: 14px 0 4px; }
.wynik-glowny { font-size: 44px; font-weight: 800; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.wynik-glowny small { font-size: 17px; color: var(--slonce); font-weight: 700; }
.pasek-energii { height: 8px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; margin: 12px 0 18px; }
.pasek-energii i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--zielen), var(--slonce)); transition: width .5s ease; border-radius: 99px; }
.pods-wiersz { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13.5px; border-bottom: 1px dashed rgba(255,255,255,.12); }
.pods-wiersz b { font-variant-numeric: tabular-nums; color: #fff; font-weight: 600; }
.pods-suma { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; }
.pods-suma .kwota { font-family: 'Sora'; font-size: 26px; font-weight: 800; color: var(--slonce); font-variant-numeric: tabular-nums; }
.pods-netto { font-size: 12.5px; color: #93A79A; text-align: right; margin-top: 2px; }
.podsumowanie .btn { width: 100%; margin-top: 16px; background: var(--slonce); color: var(--las); font-weight: 700; }
.podsumowanie .btn:hover { background: #FFB63F; }

.pozycja { display: grid; grid-template-columns: 1fr 110px 80px 110px 34px; gap: 10px; align-items: center; margin-bottom: 8px; }
.pozycja .cena, .pozycja .razem { text-align: right; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.pozycja .razem { font-weight: 600; }
.usun-poz { background: none; border: none; color: var(--czerwien); cursor: pointer; font-size: 17px; line-height: 1; }
.kalk-naglowki { display: grid; grid-template-columns: 1fr 110px 80px 110px 34px; gap: 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--szary); margin-bottom: 6px; }

/* ---------- LOGOWANIE ---------- */
.login-tlo { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: radial-gradient(1000px 600px at 20% 0%, #16382A, var(--las)); }
.login-karta { width: 380px; background: var(--biel); border-radius: 18px; padding: 34px; }
.login-karta .logo { border: none; padding: 0 0 20px; }
.login-karta .logo-nazwa { color: var(--tusz); font-size: 17px; }
.login-karta .logo-sub { color: var(--szary); }
.login-hint { margin-top: 16px; font-size: 12.5px; color: var(--szary); background: #F2F5F1; border-radius: 8px; padding: 10px 12px; }

.pusto { text-align: center; color: var(--szary); padding: 30px 10px; }
.naglowek-akcje { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.filtr { display: flex; gap: 10px; flex-wrap: wrap; }
.filtr select, .filtr input { width: auto; min-width: 160px; }

@media (max-width: 860px) {
    .sidebar { position: static; width: 100%; height: auto; }
    .tresc { margin-left: 0; }
    .app { flex-direction: column; }
    .sidebar nav { display: flex; flex-wrap: wrap; }
    .kalk-uklad { grid-template-columns: 1fr; }
    .podsumowanie { position: static; }
    .pozycja, .kalk-naglowki { grid-template-columns: 1fr 80px 60px 90px 30px; }
}
@media print {
    .sidebar, .topbar, .btn, .naglowek-akcje { display: none !important; }
    .tresc { margin: 0; } body { background: #fff; }
}

/* Logo obrazkowe */
.logo-img { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; flex-shrink: 0; }

/* Dodatkowe style v2 */
.siatka-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
@media (max-width: 900px) { .siatka-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .siatka-4 { grid-template-columns: 1fr; } }
.stat { text-align: center; padding: 20px 12px; }
.stat-liczba { font-size: 28px; font-weight: 800; color: var(--akcent); font-family: 'Sora', sans-serif; }
.stat-opis { font-size: 13px; color: var(--szary); margin-top: 4px; }
.b-decyzja { background: #E8D44D; color: #333; }
.b-ponowny { background: #7B68EE; color: #fff; }

/* v3 - zmienne pomocnicze */
:root { --tlo-akcent: #f0f7f3; --amber: #F5A623; }
h3 { font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 600; color: var(--tekst, #1a2b23); }
