/* Panel partnerski Antonio Finance - jeden plik stylów, bez frameworków. */
:root {
  --zielony: #16352D;
  --zielony-2: #234d42;
  --zloty: #D7A530;
  --zloty-jasny: #f3e3b8;
  --krem: #F7F2E8;
  --bialy: #fff;
  --tekst: #1f2a27;
  --szary: #6b6f6c;
  --linia: #e3dccb;
  --czerwony: #b3261e;
  --czerwony-tlo: #fbe9e7;
  --zielony-tlo: #e6f2ec;
  --cien: 0 1px 2px rgba(22, 53, 45, .08), 0 2px 8px rgba(22, 53, 45, .05);
  --r: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--krem); color: var(--tekst);
  font: 15px/1.5 Calibri, "Segoe UI", Carlito, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--zielony); }
a:hover { color: #0b211b; }
h1 { font-size: 1.55rem; margin: 0 0 .6rem; color: var(--zielony); line-height: 1.25; }
h2 { font-size: 1.12rem; margin: 0 0 .6rem; color: var(--zielony); }
code { background: #f1ece0; padding: 0 .3em; border-radius: 4px; font-size: .92em; }
.szary { color: var(--szary); font-weight: normal; }
.maly { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.pusto { color: var(--szary); font-style: italic; margin: .4rem 0; }
.ukryta-etykieta { position: absolute; left: -9999px; }

/* --- nagłówek -------------------------------------------------------------- */
.gora { background: var(--zielony); color: #fff; border-bottom: 3px solid var(--zloty); }
.gora-w { max-width: 1320px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 18px; min-height: 58px; flex-wrap: wrap; }
.logo { color: #fff; text-decoration: none; font-size: 1.25rem; font-weight: 700; letter-spacing: .2px; white-space: nowrap; }
.logo:hover { color: #fff; }
.logo-b { color: var(--zloty); }
.logo small { display: block; font-size: .7rem; font-weight: normal; color: #c9d6d1; letter-spacing: .5px; text-transform: uppercase; margin-top: -3px; }
.menu { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.menu a { color: #e4ece9; text-decoration: none; padding: 8px 12px; border-radius: 6px; white-space: nowrap; }
.menu a:hover { background: var(--zielony-2); color: #fff; }
.menu a.aktywne { background: var(--zloty); color: var(--zielony); font-weight: 700; }
.kto { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.kto a { color: #fff; text-decoration: none; }
.link-jasny { background: none; border: 1px solid #5c7d73; color: #e4ece9; padding: 4px 10px; border-radius: 6px; cursor: pointer; font: inherit; font-size: .88rem; }
.link-jasny:hover { border-color: var(--zloty); color: #fff; }
.inline { display: inline; margin: 0; }

.tresc { max-width: 1320px; margin: 0 auto; padding: 20px 16px 48px; }

/* --- karty, układ ---------------------------------------------------------- */
.karta { background: var(--bialy); border-radius: var(--r); box-shadow: var(--cien); padding: 18px 20px; margin-bottom: 16px; }
.karta.waska { max-width: 640px; }
.bez-paddingu { padding: 0; }
.naglowek { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.naglowek h1 { margin: 0; }
.siatka-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.siatka-2 > .karta { margin-bottom: 0; }
.siatka-szablon { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.licznik { display: inline-block; background: var(--zloty-jasny); color: var(--zielony); border-radius: 999px; padding: 0 10px; font-size: .85rem; font-weight: 700; vertical-align: middle; }
.okruszki { margin: 0 0 10px; }
.okruszki a { text-decoration: none; }
.pasek-info { background: var(--bialy); border-left: 4px solid var(--zloty); padding: 8px 14px; border-radius: 6px; box-shadow: var(--cien); margin: 0 0 16px; }

/* --- komunikaty ------------------------------------------------------------ */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid; }
.flash-ok { background: var(--zielony-tlo); border-color: #b5d6c6; color: #14432f; }
.flash-blad { background: var(--czerwony-tlo); border-color: #f0b8b2; color: #7d1a14; }
.ostrzezenie { background: #fff6dc; border: 1px solid #ecd28a; color: #6a4d00; padding: 8px 12px; border-radius: 8px; margin: 0 0 10px; }
span.ostrzezenie { padding: 1px 8px; }
.wyroznienie { background: var(--zloty-jasny); padding: 6px 12px; border-radius: 8px; margin: 8px 0 0; display: inline-block; }
.pomoc { color: var(--szary); font-size: .87rem; margin: -4px 0 4px; }

/* --- przyciski ------------------------------------------------------------- */
.przycisk {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 7px 15px;
  border: 1px solid #cfc6b1; background: #fff; color: var(--zielony); border-radius: 8px; font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; line-height: 1.2;
}
.przycisk:hover { border-color: var(--zielony); color: var(--zielony); }
.przycisk.glowny { background: var(--zielony); border-color: var(--zielony); color: #fff; }
.przycisk.glowny:hover { background: #0e2620; color: #fff; }
.przycisk.niebezpieczny { color: var(--czerwony); border-color: #e2aaa5; }
.przycisk[disabled], .przycisk.wylaczony { opacity: .5; cursor: not-allowed; }
.przycisk.duzy { min-height: 46px; padding: 10px 18px; font-size: 1.02rem; }
.przycisk.szeroki { width: 100%; }
.akcje-dol { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }

/* --- formularze ------------------------------------------------------------ */
.formularz { display: flex; flex-direction: column; gap: 10px; }
.formularz > .przycisk { align-self: flex-start; }
label { display: flex; flex-direction: column; gap: 3px; font-weight: 600; font-size: .9rem; color: #33413c; }
input, select, textarea {
  font: inherit; font-weight: normal; color: var(--tekst); background: #fff; border: 1px solid #cfc6b1; border-radius: 7px;
  padding: 8px 10px; min-height: 38px; width: 100%; max-width: 100%;
}
textarea { resize: vertical; line-height: 1.45; }
textarea.mono { font-family: Consolas, "Cascadia Mono", Menlo, monospace; font-size: .88rem; }
input:focus, select:focus, textarea:focus, .przycisk:focus-visible { outline: 2px solid var(--zloty); outline-offset: 1px; border-color: var(--zloty); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--zielony); margin: 0; flex: none; }
.inline-check { flex-direction: row; align-items: center; gap: 7px; font-weight: normal; }
.wybor { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.opcja { flex-direction: row; align-items: center; gap: 8px; font-weight: normal; border: 1px solid var(--linia); border-radius: 8px; padding: 8px 10px; cursor: pointer; background: #fdfbf6; }
.opcja:has(input:checked) { border-color: var(--zielony); background: var(--zielony-tlo); font-weight: 600; }
.terminy { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
[hidden] { display: none !important; }

/* filtry listy */
.filtry { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px 12px; align-items: end; }
.filtry .pole-szukaj { grid-column: span 2; }
.filtry-przyciski { display: flex; gap: 8px; }
.filtr-mini label { flex-direction: row; align-items: center; gap: 8px; }
.filtr-mini select { width: auto; }
.pasek-akcji { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; padding: 12px 16px; position: sticky; top: 0; z-index: 5; }
.pasek-akcji .grupa { display: inline-flex; gap: 6px; align-items: center; }
.pasek-akcji select { width: auto; }

/* --- tabele ---------------------------------------------------------------- */
.tabela-wrap { overflow-x: auto; }
.tabela { width: 100%; border-collapse: collapse; }
.tabela th, .tabela td { padding: 8px 10px; border-bottom: 1px solid #efe9dc; text-align: left; vertical-align: top; }
.tabela th { font-size: .82rem; text-transform: uppercase; letter-spacing: .3px; color: var(--szary); background: #fbf8f1; white-space: nowrap; }
.tabela tbody tr:hover { background: #fdfaf2; }
.tabela .liczba { text-align: right; font-variant-numeric: tabular-nums; }
.lista .kol-check { width: 36px; }
.lista .kol-nazwa a { font-weight: 700; text-decoration: none; }
.lista .kol-nazwa a:hover { text-decoration: underline; }
.kol-email { word-break: break-all; }
.email-zly { color: var(--szary); text-decoration: line-through; text-decoration-color: #c9a; }
.znacznik-zly { display: inline-block; background: var(--czerwony); color: #fff; border-radius: 50%; width: 16px; height: 16px; text-align: center; font-size: 11px; line-height: 16px; font-weight: 700; }
.sort { color: inherit; text-decoration: none; }
.sort-asc::after { content: " ▲"; font-size: .7em; }
.sort-desc::after { content: " ▼"; font-size: .7em; }
.strony { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 16px 0; }
.strony a, .strony span { padding: 6px 11px; border-radius: 7px; background: #fff; box-shadow: var(--cien); text-decoration: none; }
.strony .biezaca { background: var(--zielony); color: #fff; font-weight: 700; }
.strony .kropki { background: none; box-shadow: none; }

/* wykresy w tabelach */
.wykres td { border-bottom: none; padding: 4px 8px; }
.kol-pasek { width: 60%; }
.pasek { display: block; background: #f1ece0; border-radius: 4px; height: 14px; overflow: hidden; margin-top: 3px; }
.pasek-w { display: block; height: 100%; background: linear-gradient(90deg, var(--zielony), #2e6b5a); border-radius: 4px; min-width: 2px; }

/* --- odznaki statusów -------------------------------------------------------- */
.odznaka { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.s-nowy { background: #eceae4; color: #4a4f4c; }
.s-mail { background: #e3eefb; color: #1d4f8c; }
.s-przyp { background: #ece6f8; color: #503a8c; }
.s-rozmowa { background: #dff3ef; color: #0f5e50; }
.s-spotkanie { background: var(--zloty-jasny); color: #6b4c00; border-color: #e4c56f; }
.s-umowa { background: #fde7d3; color: #8a4510; }
.s-partner { background: var(--zielony); color: #fff; }
.s-odmowa { background: #f6e1df; color: #8c2a20; }
.s-wypisany { background: #5b5f5d; color: #fff; }
.s-bledny { background: #fbe0e0; color: #a01818; border-color: #efb4b4; }
.s-weryf { background: #fff; color: #9a6a00; border-color: #e7c25f; font-weight: 600; }
.s-kolejka { background: #e5f1fb; color: #245a86; }
.q-wyslany { color: #14603f; font-weight: 700; }
.q-blad { color: var(--czerwony); font-weight: 700; }
.q-pominiety, .q-anulowany { color: var(--szary); }
.q-oczekuje { color: #245a86; }

/* --- do zrobienia dziś ------------------------------------------------------- */
.zadania { list-style: none; margin: 0; padding: 0; }
.zadanie { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 9px 0; border-bottom: 1px solid #efe9dc; }
.zadanie:last-child { border-bottom: none; }
.zadanie-gl { min-width: 0; }
.zadanie-nazwa { font-weight: 700; text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zadanie-info { grid-column: 1; font-size: .88rem; color: var(--szary); }
.zadanie-akcje { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tel a { font-weight: 700; white-space: nowrap; }

/* --- karta kontaktu ---------------------------------------------------------- */
.naglowek-kontaktu h1 { margin-bottom: 6px; }
.odznaki { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.szybkie { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.szybkie .przycisk { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.karta-kontaktu { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 16px; align-items: start; }
.kol-dane { grid-column: 1; grid-row: 1; }
.kol-akcje { grid-column: 2; grid-row: 1; }
.dane { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 0; }
.dane dt { color: var(--szary); font-size: .88rem; }
.dane dd { margin: 0; overflow-wrap: anywhere; }
.historia { list-style: none; padding: 0; margin: 12px 0 0; }
.zd { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid #efe9dc; }
.zd-ikona { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #f1ece0; color: var(--zielony); display: flex; align-items: center; justify-content: center; font-size: .95rem; }
.zd-mail .zd-ikona { background: #e3eefb; color: #1d4f8c; }
.zd-rozmowa .zd-ikona { background: #dff3ef; color: #0f5e50; }
.zd-status .zd-ikona { background: var(--zloty-jasny); color: #6b4c00; }
.zd-wypis .zd-ikona { background: #5b5f5d; color: #fff; }
.zd-opis { overflow-wrap: anywhere; white-space: pre-line; }
.notatka-form { flex-direction: row; align-items: flex-start; }
.notatka-form textarea { flex: 1; }

/* --- podgląd maila ------------------------------------------------------------ */
.podglad-maila { border: 1px solid var(--linia); border-radius: 8px; overflow: hidden; margin-top: 10px; }
.podglad-naglowki { background: #fbf8f1; padding: 10px 14px; border-bottom: 1px solid var(--linia); font-size: .92rem; overflow-wrap: anywhere; }
.podglad-tresc { background: #fff; max-height: 70vh; overflow: auto; overflow-wrap: anywhere; }
.pominiete { margin: 0 0 10px; }
.zmienne { padding-left: 18px; margin: 8px 0; font-size: .9rem; }
.pomoc-blok { margin-top: 14px; }
.pomoc-blok summary { cursor: pointer; font-weight: 600; color: var(--zielony); }
.lista-prosta { padding-left: 18px; }

/* --- kafelki (kolejka) --------------------------------------------------------- */
.kafelki { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kafelek { background: #fff; border-radius: var(--r); box-shadow: var(--cien); padding: 14px 16px; color: var(--szary); font-size: .9rem; border-top: 3px solid var(--zloty); }
.kafelek-liczba { display: block; font-size: 1.6rem; font-weight: 700; color: var(--zielony); }

/* --- logowanie ------------------------------------------------------------------- */
.logowanie { max-width: 400px; margin: 7vh auto 0; }
.logowanie .karta { padding: 28px 28px 24px; border-top: 4px solid var(--zloty); }

/* --- responsywność ------------------------------------------------------------- */
@media (max-width: 1000px) {
  .siatka-2, .siatka-szablon, .karta-kontaktu { grid-template-columns: minmax(0, 1fr); }
  .kol-dane, .kol-akcje { grid-column: 1; grid-row: auto; }
  .kafelki { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .gora-w { gap: 6px 12px; padding-top: 8px; }
  .menu { order: 3; flex-basis: 100%; margin: 0 -16px; padding: 0 12px 6px; }
  .menu a { padding: 7px 10px; }
  .kto { margin-left: auto; }
  .tresc { padding-top: 14px; }
  .karta { padding: 14px; }
  h1 { font-size: 1.3rem; }
  .filtry { grid-template-columns: 1fr 1fr; }
  .filtry .pole-szukaj { grid-column: 1 / -1; }
  .wybor, .terminy { grid-template-columns: 1fr; }
  .szybkie .przycisk { flex: 1 1 100%; }
  .pasek-akcji { position: static; }
  /* lista kontaktów jako karty */
  .lista thead { display: none; }
  .lista, .lista tbody, .lista tr, .lista td { display: block; width: 100%; }
  .lista tr { position: relative; padding: 10px 12px 10px 44px; border-bottom: 1px solid #efe9dc; }
  .lista td { border: none; padding: 2px 0; }
  .lista td.kol-check { position: absolute; left: 12px; top: 12px; width: auto; }
  .lista td[data-etykieta]::before { content: attr(data-etykieta) ": "; color: var(--szary); font-size: .85rem; }
  .lista td[data-etykieta="Status"]::before, .lista td[data-etykieta="Zmiana"]::before { content: none; }
  .lista td .maly { display: inline; margin-left: 6px; }
  .lista td:empty, .lista td.pusta { display: none; }
  .notatka-form { flex-direction: column; align-items: stretch; }
  .kafelki { grid-template-columns: 1fr 1fr; }
}
