/*
 * eBOK – wygląd zgodny z zipnet.pl (Material Kit: #f06722 -> #E93D3D, Dosis, karty 12px).
 * Tekst podstawowy #67748e (ciemniejszy niż #7b809a na zipnet.pl) dla czytelności na białym tle.
 */
:root {
  --ebok-primary: #f06722;
  --ebok-primary-dark: #c94e12;
  --ebok-gradient: linear-gradient(90deg, #F06722 0%, #E93D3D 100%);
  --ebok-heading: #344767;
  --ebok-text: #67748e;
  --ebok-border: #e9ecef;
  --ebok-input-border: #d2d6da;
  --ebok-bg: #f0f2f5;
  --ebok-tint: #fef0e9;
  --ebok-radius: 12px;
  --ebok-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);
  --ebok-shadow-primary: 0 4px 20px 0 rgba(0, 0, 0, .14), 0 7px 10px -5px rgba(240, 103, 34, .4);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ebok-bg);
  color: var(--ebok-text);
  font-family: "Dosis", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
a { color: var(--ebok-primary); }
a:hover { color: var(--ebok-primary-dark); }
h1, h2, h3 { color: var(--ebok-heading); margin: 0; font-weight: 700; line-height: 1.2; }
h1 { font-size: 34px; }
h2 { font-size: 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.muted { color: var(--ebok-text); }
.strong { color: var(--ebok-heading); font-weight: 600; }

/* --- Pasek nawigacji --------------------------------------------------- */
.topbar { padding: 16px 24px 0; position: sticky; top: 0; z-index: 10; }
.topbar__nav {
  max-width: 1200px; margin: 0 auto; padding: 10px 20px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  background: rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: saturate(200%) blur(30px);
  backdrop-filter: saturate(200%) blur(30px);
  border-radius: var(--ebok-radius); box-shadow: var(--ebok-shadow);
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { width: 152px; height: 33px; display: block; }
.brand span {
  font-weight: 700; font-size: 15px; color: var(--ebok-heading); letter-spacing: .02em;
  border-left: 1px solid var(--ebok-input-border); padding-left: 14px;
}
.menu { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.menu a { color: var(--ebok-heading); text-decoration: none; padding: 10px 14px; border-radius: 8px; }
.menu a:hover { background: var(--ebok-tint); color: var(--ebok-primary-dark); }
.menu a[aria-current="page"] { color: var(--ebok-primary-dark); background: var(--ebok-tint); }
.account { display: flex; align-items: center; gap: 14px; font-size: 15px; }
.account__name { color: var(--ebok-heading); font-weight: 600; }
.topbar__contact { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; font-size: 15px; font-weight: 600; }
.topbar__contact a { color: var(--ebok-heading); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }

/* --- Przyciski --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; border-radius: 8px; padding: 11px 18px; min-height: 44px;
  border: 1px solid transparent; cursor: pointer; background: none; line-height: 1.2;
}
.btn--primary { background-image: var(--ebok-gradient); color: #fff; box-shadow: 0 3px 3px 0 rgba(240,103,34,.15), 0 3px 1px -2px rgba(240,103,34,.2), 0 1px 5px 0 rgba(240,103,34,.15); }
.btn--primary:hover { color: #fff; filter: brightness(.95); }
.btn--outline { color: var(--ebok-primary-dark); border-color: var(--ebok-primary); background: #fff; }
.btn--outline:hover { background: var(--ebok-tint); }
.btn--plain { color: var(--ebok-heading); border-color: var(--ebok-input-border); background: #fff; }
.btn--plain:hover { color: var(--ebok-heading); background: #f8f9fa; }
.btn--small { font-size: 12px; padding: 8px 12px; min-height: 36px; }
.btn--block { width: 100%; font-size: 14px; padding: 13px 24px; }
.btn--light { background: #fff; color: #c4421a; }
.btn--light:hover { color: #a3350f; }

/* --- Układ treści ------------------------------------------------------ */
.page { flex: 1 1 auto; padding: 40px 24px 24px; }
.page__inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.page__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.row { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.row__main { flex: 999 1 560px; min-width: 0; }
.row__side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }

.card { background: #fff; border-radius: var(--ebok-radius); box-shadow: var(--ebok-shadow); padding: 24px; }
.card > h2 { margin-bottom: 16px; }
.card__lead { margin: -8px 0 20px; font-size: 15px; }

/* Kafel z ikoną (pulpit) */
.tile { background: #fff; border-radius: var(--ebok-radius); box-shadow: var(--ebok-shadow); padding: 0 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.tile__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tile__icon { margin-top: -18px; flex: 0 0 auto; width: 56px; height: 56px; border-radius: 10px; display: flex; align-items: center; justify-content: center; box-shadow: var(--ebok-shadow-primary); background-image: var(--ebok-gradient); }
.tile__icon--dark { background: var(--ebok-heading); box-shadow: 0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px rgba(52,71,103,.4); }
.tile__icon--green { background: #4CAF50; box-shadow: 0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px rgba(76,175,80,.4); }
.tile__value { text-align: right; padding-top: 12px; font-size: 15px; }
.tile__amount { color: var(--ebok-heading); font-size: 32px; font-weight: 800; line-height: 1.1; }
.tile__account { color: var(--ebok-heading); font-size: 16px; font-weight: 700; letter-spacing: .02em; overflow-wrap: anywhere; }
.tile hr { border: 0; border-top: 1px solid var(--ebok-border); margin: 6px 0 0; width: 100%; }
.tile__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; flex-wrap: wrap; }
.link-strong { font-weight: 700; font-size: 15px; text-decoration: none; }

/* Usługi */
.place { border: 1px solid var(--ebok-border); border-radius: 10px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.place + .place { margin-top: 16px; }
.place__address { display: flex; align-items: center; gap: 8px; color: var(--ebok-heading); font-weight: 700; }
.service { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 14px 0 0; border-top: 1px solid var(--ebok-border); }
.service__info { display: flex; gap: 12px; align-items: flex-start; }
.service__icon { width: 40px; height: 40px; border-radius: 8px; background: var(--ebok-tint); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.service__name { color: var(--ebok-heading); font-weight: 700; font-size: 17px; }
.service__meta { font-size: 15px; }
.service__price { color: var(--ebok-heading); font-weight: 800; font-size: 18px; white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Dane klienta */
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 15px; }
.facts dd { margin: 0; color: var(--ebok-heading); font-weight: 600; overflow-wrap: anywhere; }
.facts .masked { letter-spacing: .06em; }

.promo { border-radius: var(--ebok-radius); background-image: var(--ebok-gradient); box-shadow: var(--ebok-shadow-primary); padding: 24px; color: #fff; }
.promo h2 { color: #fff; font-size: 24px; margin-bottom: 8px; }
.promo p { margin: 0 0 16px; font-weight: 500; }

/* Saldo w nagłówku Faktur */
.balance { background: #fff; border-radius: var(--ebok-radius); box-shadow: var(--ebok-shadow); padding: 12px 20px; display: flex; align-items: baseline; gap: 12px; }
.balance__amount { color: var(--ebok-heading); font-size: 26px; font-weight: 800; }

/* Tabele */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table--wide { min-width: 560px; }
.table th, .table td { padding: 14px 10px; border-bottom: 1px solid var(--ebok-border); text-align: left; vertical-align: middle; }
.table thead th { padding: 8px 10px; text-transform: uppercase; font-size: 12px; letter-spacing: .06em; font-weight: 700; color: var(--ebok-text); }
.table tbody tr:last-child th, .table tbody tr:last-child td { border-bottom: 0; }
.table tbody th { color: var(--ebok-heading); font-weight: 700; }
.table .num { text-align: right; white-space: nowrap; }
.table .amount { color: var(--ebok-heading); font-weight: 700; }
.table .amount--negative { color: #1557b0; }
.table .amount--payment { color: #1e6b22; }
.table .doc { text-align: right; white-space: nowrap; }
.table .doc .btn + .btn { margin-left: 4px; }
.table tr.is-credit { background: #eef5fe; }
.table tr.is-canceled { opacity: .7; }
.subnote { display: block; font-size: 13px; font-weight: 500; color: var(--ebok-text); }
.chip { display: inline-block; font-weight: 700; font-size: 13px; border-radius: 6px; padding: 4px 10px; white-space: nowrap; }
.chip--paid { background: #e8f5e9; color: #1e6b22; }
.chip--unpaid { background: #fff4e5; color: #8a4b00; }
.chip--canceled { background: #eceff1; color: #455a64; }
.empty { margin: 0; }

/* --- Oferta (zakładka Usługi) ------------------------------------------ */
.btn--ghost { color: #fff; border-color: rgba(255,255,255,.8); }
.btn--ghost:hover { color: #fff; background: rgba(255,255,255,.12); }
.hero { border-radius: var(--ebok-radius); background-image: var(--ebok-gradient); box-shadow: var(--ebok-shadow-primary); padding: 32px; color: #fff; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.hero__text { flex: 1 1 420px; min-width: 0; }
.hero h1 { color: #fff; margin-bottom: 8px; }
.hero p { margin: 0; font-size: 17px; font-weight: 500; max-width: 640px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }
.offer-head { display: flex; align-items: center; gap: 16px; margin: 8px 0 28px; }
.offer-head h2 { font-size: 26px; }
.offer-head p { margin: 4px 0 0; }
.offer-head__icon { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background-image: var(--ebok-gradient); box-shadow: var(--ebok-shadow-primary); }
.offer-head__icon--dark { background: var(--ebok-heading); box-shadow: 0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px rgba(52,71,103,.4); }
.offer { position: relative; background: #fff; border-radius: var(--ebok-radius); box-shadow: var(--ebok-shadow); padding: 28px 24px 24px; display: flex; flex-direction: column; gap: 10px; border: 2px solid transparent; }
.offer--featured { border-color: var(--ebok-primary); }
.offer__badge { position: absolute; top: -14px; left: 24px; display: inline-flex; align-items: center; gap: 6px; background-image: var(--ebok-gradient); color: #fff; font-size: 13px; font-weight: 700; border-radius: 6px; padding: 4px 10px; }
.offer__name { font-size: 24px; }
.offer__sub { font-weight: 600; color: var(--ebok-heading); }
.offer__price { color: var(--ebok-heading); font-weight: 600; }
.offer__price span { font-size: 40px; font-weight: 800; color: var(--ebok-primary-dark); line-height: 1; }
.offer__desc { margin: 0; font-size: 15px; flex: 1 1 auto; }
.offer__list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--ebok-heading); }
.offer__list li { display: flex; align-items: center; gap: 8px; }
.offer-note { margin: 16px 0 0; font-size: 15px; }
.offer-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.offer-strip__text { flex: 1 1 320px; min-width: 0; }
.offer-strip h2 { font-size: 20px; margin: 0 0 4px; }
.offer-strip p { margin: 0; }
.offer-legal { margin: 0; font-size: 14px; }

/* --- Logowanie / komunikaty ------------------------------------------- */
.center { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 72px 16px 48px; }
.login { width: 100%; max-width: 440px; background: #fff; border-radius: var(--ebok-radius); box-shadow: var(--ebok-shadow); padding: 0 24px 28px; }
.login--wide { max-width: 640px; }
.login__head { margin: -28px 0 24px; background-image: var(--ebok-gradient); border-radius: 10px; box-shadow: var(--ebok-shadow-primary); padding: 22px 20px; text-align: center; }
.login__head h1 { color: #fff; font-size: 26px; }
.login__head p { margin: 4px 0 0; color: #fff; font-size: 15px; font-weight: 500; }
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 700; color: var(--ebok-heading); }
.field input {
  font-family: inherit; font-size: 16px; color: var(--ebok-heading); padding: 11px 12px;
  border: 1px solid var(--ebok-input-border); border-radius: 6px; background: #fff; min-height: 44px;
}
.field input:focus { outline: 2px solid rgba(240, 103, 34, .35); outline-offset: 1px; border-color: var(--ebok-primary); }
.field input.is-invalid { border-color: #fb8c00; }
.field input.code { letter-spacing: .2em; max-width: 240px; }
.login__help { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--ebok-border); font-size: 15px; }
.login__help p { margin: 0; }

.alert { border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; font-size: 15px; font-weight: 500; display: flex; gap: 10px; align-items: flex-start; }
.alert svg { flex: 0 0 auto; margin-top: 1px; }
.alert--warning { background: #fff4e5; color: #8a4b00; }
.alert--success { background: #e8f5e9; color: #1e6b22; }
.alert--danger { background: #fdecea; color: #8e1b12; display: block; padding: 16px 16px 18px; line-height: 1.5; }
.alert--danger p { margin: 0 0 12px; }
.alert__title { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 18px; font-weight: 700; }
.alert__contacts { display: flex; flex-wrap: wrap; gap: 8px; }
.alert__contacts a { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--ebok-heading); text-decoration: none; font-weight: 700; border: 1px solid #f3b8b1; border-radius: 8px; padding: 10px 14px; min-height: 44px; }
.alert__note { margin: 12px 0 0 !important; font-size: 14px; }

/* E-akceptacja: lista dokumentów */
.docs { list-style: none; padding: 0; margin: 18px 0; display: flex; flex-direction: column; gap: 10px; }
.docs li { border: 1px solid var(--ebok-border); border-radius: 10px; padding: 14px; color: var(--ebok-heading); }

/* --- Stopka ------------------------------------------------------------ */
.footer { padding: 28px 24px 32px; }
.footer__inner { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; font-size: 15px; line-height: 1.6; }
.footer__title { font-weight: 700; color: var(--ebok-heading); }

@media (max-width: 640px) {
  h1 { font-size: 28px; }
  .topbar { padding: 12px 12px 0; position: static; }
  .page { padding: 28px 16px 16px; }
  .tile__amount { font-size: 28px; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
  .hero { padding: 24px; }
  .offer-head h2 { font-size: 22px; }
}
