/* Front UI — Layout 5 (Editorial Light)
   Shared for:
   - landing (wynajmujacy)
   - /auth/* (login / register / forgot / reset / stepup / phone)
*/

:root{
  --bg:#FFFEFB;
  --paper:#ffffff;
  --text:#0f172a;
  --muted: rgba(15,23,42,.66);
  --line: rgba(15,23,42,.12);
  --a1:#0F172A;
  --a2:#F59E0B;
  --a3:#38BDF8;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(15,23,42,.10);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

*{box-sizing:border-box}

html{color-scheme:light}

body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(900px 520px at 10% 0%, color-mix(in oklab, var(--a2) 10%, transparent), transparent 60%),
    var(--bg);
  background-size: auto, auto;
}

a{color:inherit; text-decoration:none}

/* Accessibility helper */
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* Top bar */
.top{
  max-width:1200px;
  margin:0 auto;
  padding:22px 24px 10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
}

.brand{display:flex; gap:12px; align-items:center}
.brand img{border-radius:18px; box-shadow:0 12px 30px rgba(15,23,42,.10)}
.brand strong{display:block; letter-spacing:-.01em}
.brand small{display:block; color:var(--muted); font-size:12px}

.nav{display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:flex-end}
.nav a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.75)
}
.nav a:hover{text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px}
.nav .cta{border:none; background: linear-gradient(90deg, #1e40af, var(--a3)); color:white; font-weight:750; text-decoration:none}
.nav .pwa-install-link{background: linear-gradient(90deg, var(--a2), #f97316); animation: pwa-pulse 2s ease-in-out 3s 2}
@keyframes pwa-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.07)}}

/* Layout */
.wrap{max-width:1200px; margin:0 auto; padding:10px 24px 34px}
.layout{display:grid; grid-template-columns: 1.1fr .9fr; gap:16px; align-items:start}

.paper{
  background: rgba(255,255,255,.88);
  border:1px solid rgba(15,23,42,.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:26px;
}

.kicker{
  margin:0 0 12px;
  letter-spacing:.24em;
  text-transform:uppercase;
  font-size:11px;
  color: rgba(15,23,42,.62);
}

.paper h1{
  margin:0 0 14px;
  font-size:50px;
  letter-spacing:-.04em;
  line-height:1.02;
}

.paper--auth h1{
  font-size:44px;
}


/* Document pages (policy / terms) */
.paper--doc h1{
  font-size:36px;
  letter-spacing:-.03em;
  line-height:1.08;
  margin-bottom:10px;
}

.paper--doc .meta{
  margin:0 0 14px;
  color: rgba(15,23,42,.56);
  font-size:12px;
}

.paper--doc .toc{
  margin:12px 0 0;
  padding:12px 14px;
  border-radius:18px;
  border:1px dashed rgba(15,23,42,.16);
  background: rgba(15,23,42,.03);
  font-size:12px;
  color: rgba(15,23,42,.74);
  line-height:1.6;
}
.paper--doc .toc strong{display:block; margin-bottom:6px}
.paper--doc .toc a{border-bottom:1px solid rgba(15,23,42,.22)}
.paper--doc .toc a:hover{border-bottom-color: rgba(15,23,42,.55)}

.paper--doc .note{
  margin:12px 0 0;
  padding:12px 14px;
  border-radius:18px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.70);
  color: rgba(15,23,42,.74);
  font-size:13px;
  line-height:1.55;
}

.paper--doc h2{
  margin:20px 0 8px;
  font-size:16px;
  letter-spacing:-.01em;
}

.paper--doc p{
  margin:10px 0;
  color: var(--muted);
  line-height:1.7;
  font-size:14px;
}

.paper--doc ul,
.paper--doc ol{
  margin:10px 0;
  padding-left:18px;
  color: var(--muted);
  line-height:1.7;
  font-size:14px;
}

.paper--doc li{margin:6px 0}

.paper--doc a{
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.paper--doc a:hover{ text-decoration-thickness: 3px; }

.cols{display:grid; grid-template-columns: 1fr; gap:14px; align-items:start}
.lead{margin:0; color:var(--muted); line-height:1.7}

.cta-row{display:none; flex-wrap:wrap; gap:10px; align-items:center; justify-content:flex-start}
.hint{color: rgba(15,23,42,.50); font-size:12px}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 16px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.12);
  background:#fff;
  font-weight:700;
  transition: transform .18s ease;
}
.btn:hover{transform:translateY(-1px)}
.btn.primary{border-color:transparent; background: var(--text); color:white}
.full{width:100%}

/* Callouts / toast messages */
@keyframes toastIn {
  0%   { opacity:0; transform:translateY(-18px) scale(.95); }
  100% { opacity:1; transform:translateY(0) scale(1); }
}
@keyframes toastOut {
  0%   { opacity:1; transform:translateY(0) scale(1); }
  100% { opacity:0; transform:translateY(-14px) scale(.95); }
}
.flash-container{
  position:fixed;
  top:20px;
  left:50%;
  transform:translateX(-50%);
  z-index:9990;
  display:flex;
  flex-direction:column;
  gap:8px;
  width:min(420px, calc(100vw - 32px));
  pointer-events:none;
}
.flash{
  padding:14px 18px;
  border-radius:14px;
  border:2px solid rgba(15,23,42,.12);
  background: #fff;
  font-size:15px;
  font-weight:600;
  line-height:1.45;
  display:flex;
  align-items:center;
  gap:10px;
  animation: toastIn .45s cubic-bezier(.22,1,.36,1) both;
  box-shadow: 0 8px 32px rgba(15,23,42,.18), 0 2px 6px rgba(15,23,42,.10);
  pointer-events:auto;
}
.flash::before{
  content:'';
  flex-shrink:0;
  width:22px; height:22px;
  background-size:contain;
  background-repeat:no-repeat;
  background-position:center;
}
.flash.success{
  border-color: #22c55e;
  background: #f0fdf4;
  color: #15803d;
}
.flash.success::before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' stroke='%2322c55e' stroke-width='2' fill='%23dcfce7'/%3E%3Cpath stroke='%2315803d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='m8 12 3 3 5-6'/%3E%3C/svg%3E");
}
.flash.error{
  border-color: #ef4444;
  background: #fef2f2;
  color: #b91c1c;
}
.flash.error::before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' stroke='%23ef4444' stroke-width='2' fill='%23fee2e2'/%3E%3Cpath stroke='%23b91c1c' stroke-width='2.5' stroke-linecap='round' d='M12 8v4m0 4h.01'/%3E%3C/svg%3E");
}
.flash.warning{
  border-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}
.flash.warning::before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23f59e0b' stroke-width='2' fill='%23fef3c7' stroke-linecap='round' stroke-linejoin='round' d='M12 9v4m0 4h.01M10.29 3.86l-8.6 14.86A2 2 0 0 0 3.4 22h17.2a2 2 0 0 0 1.71-2.98l-8.6-14.86a2 2 0 0 0-3.42 0z'/%3E%3C/svg%3E");
}
.flash.info{
  border-color: #3b82f6;
  background: #eff6ff;
  color: #1d4ed8;
}
.flash.info::before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' stroke='%233b82f6' stroke-width='2' fill='%23dbeafe'/%3E%3Cpath stroke='%231d4ed8' stroke-width='2.5' stroke-linecap='round' d='M12 16v-4m0-4h.01'/%3E%3C/svg%3E");
}
.flash.dismissing{
  animation: toastOut .35s cubic-bezier(.22,1,.36,1) forwards;
}

.notice{
  margin:12px 0 0;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(15,23,42,.03);
  color: rgba(15,23,42,.74);
  font-size:12px;
  line-height:1.45;
}

.notice a{
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.notice a:hover{ text-decoration-thickness: 3px; }

/* Feature blocks */
.mosaic{margin:18px 0 0; display:grid; gap:12px}
.mgrid{display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px}
.mcard{
  display:flex;
  gap:12px;
  padding:14px;
  border-radius: 22px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.82);
  align-items:flex-start;
}
.mico{
  width:44px; height:44px;
  border-radius: 18px;
  display:grid; place-items:center;
  flex:none;
  color: var(--a1);
  background: linear-gradient(180deg, color-mix(in oklab, var(--a2) 20%, transparent), color-mix(in oklab, var(--a3) 18%, transparent));
  border:1px solid rgba(15,23,42,.08);
}
.mtext h3{margin:0 0 6px; font-size:14px}
.mtext p{margin:0; color:var(--muted); font-size:13px; line-height:1.5}

.flow{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  padding:12px 14px;
  border-radius: 22px;
  border:1px dashed rgba(15,23,42,.16);
  background: rgba(15,23,42,.03);
  color: rgba(15,23,42,.74);
  font-size:12px;
}
.flow span{
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.85);
}
.flow .arr{
  padding:0;
  border:0;
  background: transparent;
  opacity:.55;
}

.three{margin-top:18px; display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:12px}
.c{
  padding:16px;
  border-radius: 20px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.80);
}
.c h3{margin:0 0 8px; font-size:14px}
.c p{margin:0; color:var(--muted); font-size:13px; line-height:1.5}

.faq{margin-top:18px}
.faq h2{margin:0 0 12px; font-size:16px}

details{
  border:1px solid rgba(15,23,42,.10);
  border-radius: 18px;
  padding:12px 14px;
  background: rgba(255,255,255,.80);
  margin:10px 0;
}
summary{
  cursor:pointer;
  list-style:none;
  font-weight:750;
}
summary::-webkit-details-marker{display:none}
details p{margin:10px 0 0; color:var(--muted); line-height:1.55; font-size:13px}

/* Sidebar cards */
.sidebar{display:grid; gap:12px}
.card{
  background: rgba(255,255,255,.90);
  border:1px solid rgba(15,23,42,.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:20px;
}
.login{position:sticky; top:18px}
.login h2{margin:0 0 6px}
.login p{margin:0 0 12px; color:var(--muted); font-size:13px; line-height:1.45}

label{display:block; margin:12px 0}
label span{display:block; font-size:12px; color:var(--muted); margin-bottom:6px}

input{
  width:100%;
  padding:12px 12px;
  border-radius: 14px;
  border:1px solid rgba(15,23,42,.12);
  background:#fff;
  outline:none;
}

input:focus{border-color: color-mix(in oklab, var(--a2) 55%, #fff); box-shadow:0 0 0 4px color-mix(in oklab, var(--a2) 14%, transparent)}

.links{display:grid; gap:8px; margin-top:12px; color: rgba(15,23,42,.74); font-size:13px; text-align:right}
.links a{border-bottom:1px solid rgba(15,23,42,.18); width:max-content; justify-self:end}
.links a:hover{border-bottom-color: rgba(15,23,42,.40)}

.small h3{margin:0 0 10px; font-size:14px}
.small ol, .small ul{margin:0; padding-left:18px; color: rgba(15,23,42,.74)}
.small li{margin:10px 0}

/* Simple checklist for auth side */
.checklist{
  margin:16px 0 0;
  padding:0;
  list-style:none;
  display:grid;
  gap:10px;
  max-width:62ch;
}

.checklist li{
  position:relative;
  padding:12px 14px 12px 44px;
  border-radius:18px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.80);
  color: rgba(15,23,42,.74);
  font-size:13px;
  line-height:1.5;
}

.checklist li::before{
  content:"";
  position:absolute;
  left:14px;
  top:14px;
  width:18px;
  height:18px;
  border-radius:8px;
  background:linear-gradient(135deg,var(--a2),var(--a3));
  opacity:.85;
}

.foot{margin-top:16px; color: rgba(15,23,42,.56); font-size:12px; padding:0 4px}
.foot a{color:inherit; text-decoration:none; border-bottom:1px solid rgba(15,23,42,.22)}
.foot a:hover{border-bottom-color: rgba(15,23,42,.55)}
.foot .sep{opacity:.55; margin:0 8px}

@media (max-width: 1040px){
  .layout{grid-template-columns:1fr}
  .paper h1{font-size:40px}
  .paper--auth h1{font-size:38px}
  .three{grid-template-columns:1fr}
  .login{position:relative; top:auto}
}

@media (max-width: 720px){
  .top{
    padding:18px 16px 10px;
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }
  .brand{min-width:0}
  .brand strong{max-width: 220px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
  .brand small{display:none}

  /* Mobile: primary CTAs are shown inside page content */
  .nav{ display:none !important; }

  .paper{padding:20px}
  .paper h1{font-size:34px}
  .paper--auth h1{font-size:32px}

  /* CTA buttons only on mobile */
  .cta-row{display:flex}
  .hint{display:block; width:100%; margin-left:0}

  /* Mobile: login is still available on the landing page (below content) */
  .layout--landing .sidebar .login{display:block}

  /* Anchor jumps should show the form clearly */
  #login{scroll-margin-top: 14px;}

  .mgrid{grid-template-columns: 1fr}
}

@media (prefers-reduced-motion: reduce){ .btn{transition:none} }

/* Simple 2-col grid helper (used on auth forms) */
.grid2{display:grid;grid-template-columns:1fr;gap:12px}
@media (min-width: 720px){
  .grid2{grid-template-columns:1fr 1fr}
}

/* ── Landing page v2 ───────────────────────────────────────────────────── */

/* Hero — tekst + login obok siebie */
.landing-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 40px 0 48px;
}
@media (min-width: 768px) {
  .landing-hero {
    grid-template-columns: 1fr 380px;
    gap: 48px;
    padding: 64px 0 72px;
    align-items: start;
  }
}
.landing-hero__text h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -.02em;
}
@media (min-width: 768px) {
  .landing-hero__text h1 { font-size: 50px; }
}
.landing-hero__text p {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 24px;
  max-width: 480px;
}
.landing-hero__cta {
  font-size: 17px;
  padding: 14px 32px;
}

/* Login box */
.landing-hero__login {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,.06);
}
.landing-hero__login h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 20px;
}
.landing-hero__login label {
  display: block;
  margin-bottom: 14px;
}
.landing-hero__login label span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text);
}
.landing-hero__login input[type="email"],
.landing-hero__login input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 16px;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  transition: border-color .2s;
}
.landing-hero__login input:focus {
  outline: none;
  border-color: var(--a1);
  box-shadow: 0 0 0 3px rgba(15,23,42,.08);
}
.landing-hero__login .btn.full {
  width: 100%;
  margin-top: 4px;
  padding: 13px;
  font-size: 16px;
}
.landing-hero__login .links {
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
}
.landing-hero__login .links a {
  color: var(--muted);
  text-decoration: none;
}
.landing-hero__login .links a:hover { color: var(--text); }

/* 3 kroki */
.landing-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 0 0 48px;
  border-top: 1px solid var(--line);
  padding-top: 48px;
}
@media (min-width: 640px) {
  .landing-steps { grid-template-columns: repeat(3, 1fr); }
}
.landing-step {
  text-align: center;
  padding: 24px 16px;
}
.landing-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--a1);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}
.landing-step h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px;
}
.landing-step p {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* Features grid */
.landing-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding-bottom: 48px;
}
@media (min-width: 640px) {
  .landing-features { grid-template-columns: 1fr 1fr; }
}
.landing-feature {
  display: flex;
  gap: 14px;
  padding: 20px;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  transition: box-shadow .2s;
}
.landing-feature:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.landing-feature__ico {
  font-size: 28px;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.landing-feature h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px;
}
.landing-feature p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* FAQ */
.landing-faq {
  padding-bottom: 48px;
}
.landing-faq h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 16px;
}
.landing-faq details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.landing-faq summary {
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.landing-faq summary::after {
  content: '+';
  font-size: 20px;
  font-weight: 400;
  color: var(--muted);
  transition: transform .2s;
}
.landing-faq details[open] summary::after {
  content: '−';
}
.landing-faq details p {
  font-size: 15px;
  color: var(--muted);
  margin: 10px 0 0;
  line-height: 1.6;
}
.landing-faq summary::-webkit-details-marker { display: none; }
