/* =====================================================
   ImageResizerly — style aplikacji (kierunek: mockup V1 Clean Pro)
   ZASADA: zadnego koloru poza blokami zmiennych (:root / [data-theme=dark])
===================================================== */

/* ---------- MOTYW JASNY (DOMYSLNY) ---------- */
:root {
  --accent: #4F46E5;
  --accent-hover: #4338CA;
  --accent-light: #EEF2FF;
  --accent-mid: #818CF8;

  --bg: #FFFFFF;
  --bg-secondary: #F8F9FC;
  --bg-card: #FFFFFF;
  --bg-input: #FFFFFF;

  --border: #E5E7EB;
  --border-focus: #4F46E5;

  --text: #111827;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;

  --ok: #10B981;
  --ok-light: #ECFDF5;
  --bad: #DC2626;
  --bad-light: #FEF2F2;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-accent: 0 4px 14px rgba(79,70,229,.25);

  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --dropzone-bg: #F8F9FC;
  --dropzone-border: #D1D5DB;
  --dropzone-hover-bg: #EEF2FF;

  --nav-bg: rgba(255,255,255,.92);
  --footer-bg: #F1F3F7;

  --crop-frame: #FFFFFF;
  --crop-frame-edge: rgba(0,0,0,.4);
  --crop-mask: rgba(15,18,30,.62);
  --modal-backdrop: rgba(17,24,39,.5);

  color-scheme: light;
}

/* ---------- MOTYW CIEMNY ---------- */
[data-theme="dark"] {
  --accent: #6366F1;
  --accent-hover: #818CF8;
  --accent-light: #1E1B4B;
  --accent-mid: #818CF8;

  --bg: #0F1117;
  --bg-secondary: #161A24;
  --bg-card: #1A1E2E;
  --bg-input: #1F2335;

  --border: #2A2F42;
  --border-focus: #6366F1;

  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --text-light: #64748B;

  --ok: #34D399;
  --ok-light: #064E3B;
  --bad: #F87171;
  --bad-light: #450A0A;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,.4);
  --shadow-accent: 0 4px 14px rgba(99,102,241,.35);

  --dropzone-bg: #1A1E2E;
  --dropzone-border: #2A2F42;
  --dropzone-hover-bg: #1E1B4B;

  --nav-bg: rgba(15,17,23,.92);
  --footer-bg: #0A0C14;

  --crop-frame: #F1F5F9;
  --crop-frame-edge: rgba(0,0,0,.55);
  --crop-mask: rgba(0,0,0,.68);
  --modal-backdrop: rgba(0,0,0,.65);

  color-scheme: dark;
}

/* ---------- RESET / BAZA ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; } /* hidden wygrywa z display:flex komponentow */
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
button { cursor: pointer; font-family: inherit; }
input, select { font-family: inherit; }
kbd {
  background: var(--border); color: var(--text-muted);
  font-family: inherit; font-size: .75rem;
  padding: 2px 6px; border-radius: 4px;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-title { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 8px; }
.section-sub { font-size: 1rem; color: var(--text-muted); margin-bottom: 36px; }
.text-center { text-align: center; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-light); color: var(--accent);
  font-size: .75rem; font-weight: 600;
  padding: 4px 10px; border-radius: 20px; margin-bottom: 14px;
}

/* ---------- HEADER ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; height: 58px; }
/* header ma WLASNY, szerszy sufit niz tresc (1100px): dluzsze jezyki (ES/PL)
   potrzebuja ~1200px na logo+menu+akcje; ponizej pomiar w main.js daje burger */
.header .container { max-width: 1410px; }
.logo { display: flex; align-items: center; gap: 9px; }
.logo-icon { width: 30px; height: 30px; flex-shrink: 0; }
.logo-text { font-size: 1.02rem; font-weight: 700; color: var(--text); letter-spacing: -.02em; }
.logo-text span { color: var(--accent); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ---------- Gorne menu narzedzi (dropdowny czysty CSS: hover + focus-within) ---------- */
.main-nav { display: flex; align-items: center; gap: 0; margin: 0 6px; flex: 1 1 auto; min-width: 0;
  overflow-x: clip; overflow-y: visible; /* poziomo: bezpiecznik anty-nachodzeniowy;
  pionowo: WOLNE — dropdowny musza wystawac pod header (hidden je przycinalo) */
  justify-content: space-evenly; } /* ELASTYCZNE odstepy (takze od logo i jezykow):
  duzo miejsca = szerokie luzy, ciasny jezyk = odstepy maleja zanim wskoczy burger */
/* menu sie nie miesci (mierzy main.js — dziala dla KAZDEGO jezyka): dropdowny -> burger */
.header.nav-overflow .main-nav { display: none; }
.header.nav-overflow .nav-burger { display: inline-flex; }
.nav-item { position: relative; }
.nav-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: transparent; border: none; cursor: pointer; text-decoration: none;
  font-size: .8125rem; font-weight: 600; color: var(--text-muted);
  padding: 8px 8px; border-radius: 8px; transition: color .15s, background .15s;
  font-family: inherit; white-space: nowrap;
}
.nav-btn:hover, .nav-item:focus-within > .nav-btn { color: var(--accent); background: var(--accent-light); }
.nav-car { font-size: .625rem; opacity: .7; transition: transform .15s; }
.nav-item:hover .nav-car, .nav-item:focus-within .nav-car { transform: translateY(1px); }
.nav-drop {
  position: absolute; top: 100%; left: 0; min-width: 240px; z-index: 110;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-md); padding: 7px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.nav-item:hover .nav-drop, .nav-item:focus-within .nav-drop {
  opacity: 1; visibility: visible; transform: translateY(2px);
}
.nav-drop a {
  display: block; padding: 8px 11px; border-radius: 8px;
  font-size: .8438rem; font-weight: 500; color: var(--text); text-decoration: none;
}
.nav-drop a:hover { background: var(--accent-light); color: var(--accent); }
.nav-drop .nav-all {
  margin-top: 5px; border-top: 1px solid var(--border); border-radius: 0 0 8px 8px;
  color: var(--accent); font-weight: 600; font-size: .7813rem;
}
/* burger + panel mobilny (≤1150px zastepuja dropdowny) */
.nav-burger {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0; margin-right: 4px;
  background: transparent; border: 1px solid var(--border); border-radius: 9px;
  color: var(--text); cursor: pointer;
}
.nav-burger[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-light); }
.mobile-nav {
  position: fixed; top: 58px; left: 0; right: 0; z-index: 99;
  max-height: calc(100vh - 58px); overflow-y: auto;
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md); padding: 10px 16px 16px;
}
.mnav-cat {
  font-size: .6563rem; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  color: var(--text-light); margin: 12px 0 4px;
}
.mobile-nav a {
  display: block; padding: 9px 10px; border-radius: 8px;
  font-size: .875rem; font-weight: 500; color: var(--text); text-decoration: none;
}
.mobile-nav a:hover { background: var(--accent-light); color: var(--accent); }
.mnav-direct { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 8px; }
.mnav-direct a { font-weight: 600; }
.mnav-all { color: var(--accent) !important; }
/* posredni prog: dluzsze jezyki (ES/PL) — ciasniej zanim przejdziemy na burger */
@media (max-width: 1366px) {
  .nav-btn { font-size: .7813rem; padding: 8px 6px; }
  .main-nav { margin-left: 6px; }
}
@media (max-width: 1150px) {
  .main-nav { display: none; }   /* dropdowny -> burger */
  .nav-burger { display: inline-flex; }
}
/* header: przyciski i przelacznik jezyka NIGDY nie lamia sie na 2 linie */
.header-actions { flex-shrink: 0; }
.header-actions .btn-sm, .header-actions .lang-btn { white-space: nowrap; }

.lang-dropdown { position: relative; }
.lang-btn {
  font-size: .8125rem; font-weight: 500; color: var(--text-muted);
  background: transparent; border: 1px solid var(--border); border-radius: 7px;
  padding: 5px 10px; transition: all .15s;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  min-width: 130px; display: none; overflow: hidden;
}
.lang-menu.open { display: block; }
.lang-menu a { display: block; padding: 9px 14px; font-size: .875rem; color: var(--text); }
.lang-menu a:hover { background: var(--bg-secondary); }
.lang-menu a.active { color: var(--accent); font-weight: 600; background: var(--accent-light); }

.theme-toggle {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--border); background: transparent;
  font-size: .95rem; display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.theme-toggle:hover { border-color: var(--accent); background: var(--accent-light); }

/* ---------- HERO + NARZEDZIE ---------- */
.hero { background: var(--bg-secondary); padding: 44px 0 48px; border-bottom: 1px solid var(--border); }
.hero-title { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.2; margin-bottom: 10px; }
.hero-sub { font-size: 1.03rem; color: var(--text-muted); max-width: 560px; margin-bottom: 26px; }

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* Zakladki panelu (wzorzec mockupu V1) */
.panel-tabs {
  display: flex; gap: 2px; padding: 0 14px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none; /* przewijanie gestem, bez paska */
}
.panel-tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  background: transparent; border: none;
  font-size: .875rem; font-weight: 600; color: var(--text-muted);
  padding: 13px 14px 11px; border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
/* zakladka-LINK (np. Kolaz — osobna strona) */
.tab-btn.tab-go { text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.tab-btn.tab-go:hover { color: var(--accent); }

/* Pasek ustawien */
.settings-bar { border-bottom: 1px solid var(--border); }
.settings-hint { font-size: .7813rem; color: var(--text-light); }
.settings-row { display: flex; align-items: center; gap: 18px; padding: 14px 20px; flex-wrap: wrap; }
.settings-row-sub { padding-top: 0; }
.settings-group { display: flex; align-items: center; gap: 8px; }
.settings-label { font-size: .75rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.settings-unit { font-size: .8125rem; color: var(--text-muted); }

.dim-inputs { display: flex; align-items: center; gap: 6px; }
.dim-input {
  width: 78px; padding: 7px 10px;
  font-size: .875rem; font-weight: 500;
  background: var(--bg-input); color: var(--text);
  border: 1px solid var(--border); border-radius: 7px;
  transition: border-color .15s;
}
.dim-input:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-light); }

.lock-btn {
  width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg-input); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.lock-btn:hover, .lock-btn.locked { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

.seg-ctrl { display: flex; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; padding: 3px; gap: 2px; }
.seg-btn {
  font-size: .8125rem; font-weight: 500; color: var(--text-muted);
  background: transparent; border: none; padding: 5px 12px; border-radius: 6px; transition: all .15s;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--bg-card); color: var(--accent); font-weight: 600; box-shadow: var(--shadow-sm); }

.styled-select {
  padding: 7px 28px 7px 10px;
  font-size: .875rem; font-weight: 500;
  background: var(--bg-input); color: var(--text);
  border: 1px solid var(--border); border-radius: 7px;
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.styled-select:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-light); }

.quality-group { gap: 8px; }
.quality-slider {
  width: 110px; height: 4px; border-radius: 2px;
  appearance: none; outline: none; cursor: pointer;
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) 85%, var(--border) 85%);
}
.quality-slider::-webkit-slider-thumb {
  appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg-card);
  box-shadow: var(--shadow-sm); cursor: pointer;
}
.quality-val { font-size: .8125rem; font-weight: 700; color: var(--accent); min-width: 34px; }

.check-label { display: flex; align-items: center; gap: 7px; font-size: .8125rem; color: var(--text-muted); cursor: pointer; }
.check-label input { accent-color: var(--accent); }

/* ---------- ETAP 4: kompresja do KB, watermark, efekty, jednostki/DPI ---------- */
.dim-input-sm { width: 64px; }
.dpi-wrap { display: flex; align-items: center; gap: 8px; }

.extras-row { gap: 12px 16px; padding-bottom: 12px; }
.chip-toggle { font-weight: 600; }

.extra-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 0 20px 12px;
  padding: 10px 14px;
  row-gap: 10px;
}
.wm-text-input { width: 170px; }
.fx-slider { width: 90px; background: var(--border); }

.pos-grid { display: grid; grid-template-columns: repeat(3, 15px); grid-auto-rows: 15px; gap: 3px; }
.pos-cell {
  border: 1px solid var(--border); background: var(--bg-input);
  border-radius: 3px; cursor: pointer; padding: 0;
}
.pos-cell:hover { border-color: var(--accent); }
.pos-cell.active { background: var(--accent); border-color: var(--accent); }

.preview-row { align-items: flex-start; }
.extra-preview {
  max-width: 300px; max-height: 220px;
  border: 1px solid var(--border); border-radius: 8px;
  /* szachownica pod przezroczyste PNG */
  background: repeating-conic-gradient(rgba(128,128,128,.18) 0% 25%, transparent 0% 50%) 0 / 16px 16px var(--bg-input);
}

/* ---------- ETAP 5: konta, auth modal, presety, toast ---------- */
.auth-area { display: flex; align-items: center; gap: 8px; }
.user-btn { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.verify-banner {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 16px; font-size: .8125rem;
  background: var(--accent-light); color: var(--accent);
  border-bottom: 1px solid var(--border);
}
/* baner "masz Workspace" (zalogowany na landingu) — ten sam pasek, mocniejszy CTA */
.ws-banner { font-weight: 600; }
.ws-header-btn { text-decoration: none; white-space: nowrap; }

.crop-modal-box.auth-box { max-width: 380px; width: 100%; } /* wygrywa z .crop-modal-box nizej w pliku */
.auth-form { display: flex; flex-direction: column; gap: 12px; padding: 16px 20px 20px; }
.auth-benefits { font-size: .8125rem; color: var(--text-muted); margin: 0; }
.auth-field { display: flex; flex-direction: column; gap: 5px; font-size: .8125rem; font-weight: 600; color: var(--text-muted); }
/* honeypot anty-bot: poza ekranem (celowo NIE display:none — boty to filtruja) */
.hp-wrap { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-wrap { margin: 2px 0; min-height: 65px; }
.auth-field input {
  padding: 9px 12px; font-size: .9375rem; font-weight: 400;
  background: var(--bg-input); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
}
.auth-field input:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-light); }
.auth-msg { font-size: .8125rem; color: #DC2626; margin: 0; }
.auth-msg-ok { color: #16A34A; }
.auth-submit { justify-content: center; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; font-size: .8125rem; flex-wrap: wrap; }
.auth-links a { color: var(--accent); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

.irl-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg-card);
  padding: 10px 18px; border-radius: 10px; font-size: .875rem;
  box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,.25));
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 1000;
  max-width: min(90vw, 480px); text-align: center;
}
.irl-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.preset-group { gap: 8px; }
.preset-name-wrap { display: inline-flex; align-items: center; gap: 6px; }
.preset-name-input { width: 190px; }

.account-container { max-width: 640px; }
.account-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 20px; margin-bottom: 16px;
}
.account-card-title { font-size: 1rem; font-weight: 700; margin: 0 0 12px; }
.account-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: .9375rem; flex-wrap: wrap; }
.account-label { color: var(--text-muted); font-size: .8125rem; min-width: 70px; }
.account-hint { font-size: .8125rem; color: var(--text-light); margin: 0 0 10px; }
.account-form { display: flex; flex-direction: column; gap: 10px; max-width: 320px; }
.account-danger { border-color: #FCA5A5; }
.btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 14px; font-size: .875rem; font-weight: 600;
  background: #DC2626; color: #fff; border: none; border-radius: 8px; cursor: pointer;
}
.btn-danger:hover { background: #B91C1C; }

/* ---------- ETAP 5b: landing pages, hub /tools, kolumny stopki ---------- */
.landing-body { max-width: 760px; }
.landing-body p { margin: 0 0 14px; color: var(--text-muted); line-height: 1.7; }

.related-tools { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.related-chip { text-decoration: none; }
.related-all { font-weight: 700; }

.tools-cat { font-size: 1.05rem; font-weight: 700; margin: 30px 0 12px; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tool-link-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 16px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 12px;
  text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.tool-link-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.tool-link-name { font-weight: 700; color: var(--text); }
.tool-link-desc { font-size: .8125rem; color: var(--text-muted); line-height: 1.5; }

.footer-cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px; margin: 18px 0 22px;
}
.footer-col { display: flex; flex-direction: column; gap: 6px; }
.footer-col-title { font-weight: 700; font-size: .8125rem; margin-bottom: 4px; }
.footer-col a { font-size: .8125rem; color: var(--text-muted); text-decoration: none; }
.footer-col a:hover { color: var(--accent); }
.footer-col-all { font-weight: 600; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-legal a { color: var(--text-light); text-decoration: none; }
.footer-legal a:hover { color: var(--accent); }

/* strony prawne (terms/privacy/refund) */
.legal-body h1 { font-size: 1.7rem; font-weight: 800; margin-bottom: 6px; }
.legal-body h2 { font-size: 1.05rem; font-weight: 700; margin: 22px 0 8px; }
.legal-body ul { margin: 0 0 14px 20px; color: var(--text-muted); line-height: 1.7; }
.legal-body li { margin-bottom: 6px; }
.legal-body a { color: var(--accent); }
.legal-updated { font-size: .8125rem; color: var(--text-light); margin-bottom: 18px; }

/* Dropzone */
.dropzone {
  border: 2px dashed var(--dropzone-border);
  border-radius: 14px;
  background: var(--dropzone-bg);
  margin: 20px; padding: 46px 24px;
  text-align: center; cursor: pointer;
  transition: all .2s;
}
.dropzone:hover, .dropzone.drag-over { border-color: var(--accent); background: var(--dropzone-hover-bg); }
.dropzone-icon { width: 54px; height: 54px; margin: 0 auto 14px; color: var(--accent); opacity: .85; }
.dropzone-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 5px; }
.dropzone-sub { font-size: .875rem; color: var(--text-muted); margin-bottom: 16px; }
.dropzone-paste { font-size: .8125rem; color: var(--text-light); margin-top: 12px; }

.dropzone-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn-sm { padding: 7px 12px; font-size: .8125rem; }

/* ---------- WORKSPACE BULK (etap 2) ---------- */
.workspace-bulk { display: flex; flex-direction: column; }
.ws-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.ws-info { font-size: .8438rem; color: var(--text-muted); }
.ws-toolbar-btns { display: flex; gap: 8px; }

.thumb-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px; padding: 18px 20px;
}
@media (max-width: 760px) {
  .thumb-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
.thumb-card { min-width: 0; }
.thumb-stage {
  position: relative; overflow: hidden; width: 100%;
  border-radius: 9px; border: 1px solid var(--border);
  background: var(--bg-secondary);
}
.thumb-canvas { display: block; width: 100%; height: 100%; }
.thumb-stage.is-empty { aspect-ratio: 4/3; }
.thumb-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .8125rem; font-weight: 700; color: var(--text-light);
}
.thumb-remove {
  position: absolute; top: 6px; right: 6px; z-index: 6;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; border: none;
  font-size: .7rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s;
}
.thumb-stage:hover .thumb-remove, .thumb-remove:focus-visible { opacity: 1; }
@media (hover: none) { .thumb-remove { opacity: 1; } }
.thumb-status {
  position: absolute; bottom: 6px; left: 6px; z-index: 6;
  font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 5px;
  background: rgba(0,0,0,.55); color: #fff;
  pointer-events: none;
}
.thumb-status.st-done { background: var(--ok); }
.thumb-status.st-error { background: var(--bad); }
.thumb-status.st-working { background: var(--accent); }
.thumb-tools { display: flex; gap: 3px; justify-content: flex-end; margin-top: 6px; }
.thumb-name {
  font-size: .75rem; font-weight: 600; margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.thumb-meta { font-size: .7188rem; color: var(--text-muted); }
.thumb-meta strong { color: var(--ok); }

/* ---------- CROPPER (etap 3 — ramka birme-style) ---------- */
.crop-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.thumb-stage.is-empty .crop-overlay { display: none; }
.thumb-grid.no-crop .crop-overlay { display: none; } /* zakladka Konwersja — bez kadrowania */
.crop-box {
  position: absolute; pointer-events: auto; touch-action: none;
  cursor: move;
  border: 1.5px solid var(--crop-frame);
  outline: 1px solid var(--crop-frame-edge);
  box-shadow: 0 0 0 9999px var(--crop-mask);
}
/* linie tercji */
.crop-box::before, .crop-box::after { content: ''; position: absolute; pointer-events: none; opacity: .4; }
.crop-box::before {
  left: 33.33%; right: 33.33%; top: 0; bottom: 0;
  border-left: 1px solid var(--crop-frame); border-right: 1px solid var(--crop-frame);
}
.crop-box::after {
  top: 33.33%; bottom: 33.33%; left: 0; right: 0;
  border-top: 1px solid var(--crop-frame); border-bottom: 1px solid var(--crop-frame);
}
.crop-handle {
  position: absolute; width: 11px; height: 11px;
  background: var(--crop-frame); border: 1px solid var(--crop-frame-edge);
  border-radius: 2px; touch-action: none;
  transform: translate(-50%, -50%);
}
@media (hover: none) { .crop-handle { width: 16px; height: 16px; } }
.ch-nw { top: 0; left: 0; cursor: nwse-resize; }
.ch-n  { top: 0; left: 50%; cursor: ns-resize; }
.ch-ne { top: 0; left: 100%; cursor: nesw-resize; }
.ch-e  { top: 50%; left: 100%; cursor: ew-resize; }
.ch-se { top: 100%; left: 100%; cursor: nwse-resize; }
.ch-s  { top: 100%; left: 50%; cursor: ns-resize; }
.ch-sw { top: 100%; left: 0; cursor: nesw-resize; }
.ch-w  { top: 50%; left: 0; cursor: ew-resize; }

/* przyciski-ikony (narzedzia miniatur, toolbar, modal) */
.icon-btn {
  width: 26px; height: 26px; border-radius: 6px; padding: 0;
  border: 1px solid var(--border); background: var(--bg-input); color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s; flex-shrink: 0;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.icon-btn-lg { width: 32px; height: 32px; }
.icon-btn-lg svg { width: 15px; height: 15px; }
.ws-divider { width: 1px; height: 18px; background: var(--border); margin: 0 4px; align-self: center; }

/* presety proporcji */
.aspect-chips { display: flex; gap: 4px; }
.chip {
  font-size: .75rem; font-weight: 600; color: var(--text-muted);
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 9px; transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }

/* wlasne proporcje "W : H" (chip z inputami) */
.ratio-custom {
  display: inline-flex; align-items: center; gap: 1px;
  padding: 1px 6px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 6px; transition: all .15s;
}
.ratio-custom:focus-within { border-color: var(--border-focus); }
.ratio-custom.active { background: var(--accent-light); border-color: var(--accent); }
.ratio-custom input {
  width: 40px; padding: 3px 0;
  border: none; background: transparent;
  font-size: .75rem; font-weight: 600; color: var(--text);
  text-align: center; appearance: textfield; -moz-appearance: textfield;
}
.ratio-custom input::-webkit-outer-spin-button,
.ratio-custom input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ratio-custom input:focus { outline: none; }
.ratio-custom.active input { color: var(--accent); }
.ratio-sep { color: var(--text-light); font-weight: 600; font-size: .75rem; }

/* kolor tla (tryb Fill) */
.color-input {
  width: 36px; height: 28px; padding: 2px;
  border: 1px solid var(--border); border-radius: 7px;
  background: var(--bg-input); cursor: pointer;
}

/* ---------- MODAL: powiekszony podglad / precyzyjny crop ---------- */
.crop-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.crop-modal-backdrop {
  position: absolute; inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.crop-modal-box {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  max-width: min(94vw, 1000px); max-height: 92vh;
}
.crop-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.crop-modal-title {
  font-size: .875rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crop-modal-body {
  padding: 16px; overflow: auto;
  display: flex; align-items: center; justify-content: center;
}
.crop-modal-stage { width: auto; display: inline-block; }
.crop-modal-stage .thumb-canvas {
  width: auto; height: auto;
  max-width: min(88vw, 940px); max-height: 62vh;
}
.crop-modal-foot {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px; border-top: 1px solid var(--border);
}
.crop-modal-tools { display: flex; gap: 6px; }
.crop-modal-foot .btn-primary { margin-left: auto; }

.ws-naming {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 20px; border-top: 1px solid var(--border);
}
.name-input { width: 200px; }
.name-hint { font-size: .7188rem; color: var(--text-light); }
.name-preview { font-size: .75rem; color: var(--accent); font-weight: 600; margin-left: auto; }

.ws-processbar {
  display: flex; align-items: center; justify-content: flex-end; gap: 16px; flex-wrap: wrap;
  padding: 14px 20px; border-top: 1px solid var(--border);
}
.ws-summary {
  font-size: .875rem; font-weight: 600; color: var(--ok);
  background: var(--ok-light); border-radius: 8px; padding: 8px 14px;
  margin-right: auto;
}
.ws-processbar .work-exif { margin-right: 4px; }

/* Workspace (po wczytaniu zdjecia) */
.workspace { display: flex; gap: 20px; padding: 20px; align-items: stretch; }
.preview-pane {
  flex: 1.4; min-width: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  padding: 12px; min-height: 280px;
}
#previewCanvas { max-width: 100%; max-height: 420px; border-radius: 8px; box-shadow: var(--shadow-sm); }
.work-info { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 230px; }
.work-meta { font-size: .9rem; font-weight: 600; }
.work-meta .arrow { color: var(--text-light); margin: 0 6px; }
.work-est { font-size: .8438rem; color: var(--text-muted); }
.work-est .saved { color: var(--ok); font-weight: 600; }
.work-actions { display: flex; gap: 10px; margin-top: auto; flex-wrap: wrap; }
.work-exif { font-size: .75rem; color: var(--text-light); }

/* Przyciski */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  font-size: .9375rem; font-weight: 600;
  padding: 10px 22px; border-radius: 9px; border: none;
  box-shadow: var(--shadow-accent); transition: all .18s;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); color: #fff; }
.btn-primary:disabled { opacity: .55; transform: none; cursor: default; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--text);
  font-size: .875rem; font-weight: 500;
  padding: 10px 16px; border-radius: 9px;
  border: 1px solid var(--border); transition: all .15s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* Pasek zaufania + bledy */
.trust-line {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px;
  padding: 11px 20px; border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}
.trust-item { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--text-muted); font-weight: 500; }
.trust-private svg { color: var(--ok); flex-shrink: 0; }
.trust-pills { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pill {
  font-size: .7188rem; font-weight: 600; color: var(--text-muted);
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 3px 11px; border-radius: 20px; white-space: nowrap;
}
.pill-accent { color: var(--accent); background: var(--accent-light); border-color: var(--accent-mid); }

.error-msg {
  margin-top: 14px; padding: 11px 16px;
  background: var(--bad-light); color: var(--bad);
  border: 1px solid var(--bad); border-radius: var(--radius);
  font-size: .875rem; font-weight: 500;
}

/* ---------- FEATURES ---------- */
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.feat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--accent-mid); }
.feat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.feat-title { font-size: .9375rem; font-weight: 600; margin-bottom: 6px; }
.feat-desc { font-size: .825rem; color: var(--text-muted); line-height: 1.5; }

/* ---------- SEKCJE STRONY GLOWNEJ (mockup V1) ---------- */
.section-alt { background: var(--bg-secondary); }
.feat-card { position: relative; }
.feat-soon {
  position: absolute; top: 14px; right: 14px;
  font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent); background: var(--accent-light);
  padding: 3px 8px; border-radius: 12px;
}

/* Jak to dziala */
.hiw-section { background: var(--bg-secondary); }
.hiw-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; position: relative; }
.hiw-steps::before {
  content: ''; position: absolute; top: 28px;
  left: calc(16.666% + 24px); right: calc(16.666% + 24px); height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-mid) 100%);
  opacity: .3;
}
.hiw-step { text-align: center; position: relative; }
.hiw-num {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 1.25rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px; box-shadow: var(--shadow-accent);
}
.hiw-title { font-size: 1.0625rem; font-weight: 700; margin-bottom: 8px; }
.hiw-desc { font-size: .875rem; color: var(--text-muted); line-height: 1.6; }

/* Presety social media — karty platform */
.sm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: left; }
.sm-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.sm-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--accent-mid); }
.sm-head { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.sm-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: #fff; border: 1px solid var(--border);
}
/* kolory marek (wyjatek od palety — identyfikacja wizualna platform) */
.sm-fb { background: #1877F2; }
.sm-ig { background: radial-gradient(circle at 30% 110%, #FDF497 0%, #FD5949 45%, #D6249F 60%, #285AEB 90%); }
.sm-yt { background: #FF0000; }
.sm-li { background: #0A66C2; }
.sm-x  { background: #0F1419; }
.sm-tt { background: #010101; }
.sm-name { font-size: .9375rem; font-weight: 700; }
.sm-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--border);
}
.sm-row:last-child { border-bottom: none; padding-bottom: 0; }
.sm-row-name { font-size: .8438rem; color: var(--text-muted); }
.dim-badge {
  font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--accent); background: var(--accent-light);
  padding: 3px 9px; border-radius: 6px; white-space: nowrap;
}

/* Dlaczego my — powody + tabela */
.why-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 28px; align-items: start; }
.reason-card {
  display: flex; gap: 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px; margin-bottom: 12px;
  transition: box-shadow .2s, border-color .2s;
}
.reason-card:last-child { margin-bottom: 0; }
.reason-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent-mid); }
.reason-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.reason-title { font-size: .9063rem; font-weight: 700; margin-bottom: 4px; }
.reason-desc { font-size: .8125rem; color: var(--text-muted); line-height: 1.55; }

.table-scroll { overflow-x: auto; }
.compare-table {
  width: 100%; border-collapse: collapse;
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.compare-table th {
  padding: 14px 18px; font-size: .875rem; font-weight: 700; text-align: left;
  background: var(--bg-card); color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.compare-table th:first-child { color: var(--text); }
.compare-table th.irl-col { background: var(--accent-light); color: var(--accent); }
.compare-table td {
  padding: 13px 18px; font-size: .875rem; color: var(--text);
  background: var(--bg-card); border-bottom: 1px solid var(--border);
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table td.irl-col { font-weight: 600; background: var(--accent-light); }
.check-yes { color: var(--ok); font-weight: 600; }
.check-bad { color: var(--bad); font-weight: 600; }
.check-soon { color: var(--accent); font-weight: 600; }

/* Cennik */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.price-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 28px; position: relative;
  transition: box-shadow .2s, transform .2s;
}
.price-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.price-card.popular { border: 2px solid var(--accent); box-shadow: var(--shadow-md); }
.popular-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff;
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 4px 12px; border-radius: 20px; box-shadow: var(--shadow-accent);
  white-space: nowrap;
}
.price-plan {
  font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 6px; color: var(--text-muted);
}
.price-card.popular .price-plan { color: var(--accent); }
.price-amount { font-size: 2.25rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; margin-bottom: 4px; }
.price-note { font-size: .875rem; font-weight: 500; color: var(--text-muted); }
.price-alt { font-size: .8rem; font-weight: 500; color: var(--text-light); margin-bottom: 10px; }
.price-cap { font-size: .7813rem; color: var(--text-light); margin: 4px 0 18px; }
.save-chip {
  display: inline-block; font-size: .7813rem; font-weight: 600;
  color: var(--ok); background: var(--ok-light);
  padding: 4px 10px; border-radius: 6px; margin-bottom: 16px;
}
/* Przelacznik miesiecznie/rocznie w karcie Premium */
.bill-toggle { display: inline-flex; gap: 2px; padding: 3px; margin: 2px 0 14px;
  border: 1px solid var(--border); border-radius: 99px; }
.bill-opt { display: inline-flex; align-items: center; gap: 6px; border: none;
  background: transparent; color: var(--text-muted); font-size: .8125rem; font-weight: 600;
  padding: 6px 14px; border-radius: 99px; cursor: pointer; transition: all .15s; }
.bill-opt:hover:not(.active) { color: var(--text); }
.bill-opt.active { background: var(--accent); color: #fff; box-shadow: var(--shadow-accent); }
.bill-save { font-size: .6875rem; font-weight: 700; color: var(--ok);
  background: var(--ok-light); padding: 1px 7px; border-radius: 99px; white-space: nowrap; }
.bill-opt.active .bill-save { color: #fff; background: rgba(255,255,255,.22); }

/* Sygnaly zaufania platnosci pod cennikiem */
.pay-trust { margin: 30px auto 0; max-width: 600px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pay-trust-lock { font-size: .8125rem; color: var(--text-muted); text-align: center; line-height: 1.55; margin: 0; }
.pay-trust-cards { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pay-trust-cards svg { display: block; }
.price-feats { list-style: none; margin-bottom: 24px; }
.price-feats li {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: .875rem; color: var(--text-muted); padding: 5px 0;
}
.price-feats li.off, .price-feats li.off .mark { color: var(--text-light); }
.price-feats .mark { flex-shrink: 0; width: 15px; text-align: center; font-weight: 700; color: var(--ok); margin-top: 1px; }
.btn-price {
  display: block; width: 100%; padding: 11px;
  border-radius: 9px; font-size: .9375rem; font-weight: 600; text-align: center;
  transition: all .18s; border: none;
}
.btn-price-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-price-outline:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.btn-price-accent { background: var(--accent); color: #fff; box-shadow: var(--shadow-accent); }
.btn-price-accent:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); }
.btn-price:disabled { opacity: .55; cursor: default; }
a.btn-price:hover { color: var(--accent); }

/* FAQ */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-list details {
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 8px; overflow: hidden;
  background: var(--bg-card); transition: box-shadow .15s;
}
.faq-list details[open] { box-shadow: var(--shadow-md); }
.faq-list summary {
  padding: 16px 20px; font-size: .9375rem; font-weight: 600; color: var(--text);
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  transition: background .12s;
}
.faq-list summary:hover { background: var(--bg-secondary); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ''; width: 18px; height: 18px; flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
  transition: transform .2s;
}
.faq-list details[open] summary::after { transform: rotate(180deg); }
.faq-answer { padding: 0 20px 18px; font-size: .875rem; color: var(--text-muted); line-height: 1.7; }

/* ---------- FOOTER ---------- */
.footer { background: var(--footer-bg); border-top: 1px solid var(--border); padding: 28px 0; margin-top: 40px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.footer-tagline { font-size: .8125rem; color: var(--text-muted); max-width: 480px; }
.footer-lang { display: flex; gap: 8px; }
.footer-lang a {
  font-size: .8125rem; color: var(--text-muted);
  padding: 4px 10px; border-radius: 6px; border: 1px solid transparent;
}
.footer-lang a.active { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.footer-bottom { font-size: .8rem; color: var(--text-light); border-top: 1px solid var(--border); padding-top: 14px; }

/* ---------- RESPONSYWNOSC ---------- */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .workspace { flex-direction: column; }
  .sm-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .hiw-steps { grid-template-columns: 1fr; gap: 24px; }
  .hiw-steps::before { display: none; }
}
@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
  .sm-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 30px; }

  /* zakladki: zawijanie zamiast przewijania (odporne na dlugie tlumaczenia) */
  .panel-tabs { flex-wrap: wrap; justify-content: center; gap: 4px; padding: 8px 10px; overflow: visible; }
  .tab-btn { padding: 7px 13px; font-size: .8125rem; border-bottom: none; margin-bottom: 0; border-radius: 8px; }
  .tab-btn.active { background: var(--accent-light); border-bottom-color: transparent; }

  /* panel ustawien: cieśniej i z zawijaniem zamiast poziomego przepełnienia */
  .settings-row { padding: 10px 14px; gap: 8px 14px; }
  .settings-group { flex-wrap: wrap; row-gap: 6px; }
  .aspect-chips { flex-wrap: wrap; row-gap: 6px; }
  .settings-hint { flex-basis: 100%; }
  .styled-select, .dim-input { max-width: 100%; }
  .extra-panel { margin: 0 10px 10px; }
  .extra-preview { max-width: 100%; }
  .dropzone { margin: 14px; padding: 32px 16px; }
  .ws-toolbar-btns { flex-wrap: wrap; row-gap: 8px; }
  .ws-toolbar-btns .btn-sm { white-space: nowrap; }
  .thumb-grid { padding: 14px; gap: 12px; }
  .ws-toolbar, .ws-naming, .ws-processbar { padding-left: 14px; padding-right: 14px; }
  .crop-modal { padding: 8px; }
  .crop-modal-body { padding: 10px; }
  .crop-modal-stage .thumb-canvas { max-height: 56vh; }

  /* pasek zaufania: pigulki w kolumnie, pelna szerokosc, tekst zawijany
     (dlugie zdania w PL/przyszlych jezykach nie wystaja poza ekran) */
  .trust-line { flex-direction: column; align-items: stretch; gap: 10px; }
  .trust-pills { flex-direction: column; align-items: stretch; gap: 6px; width: 100%; }
  .pill { white-space: normal; text-align: center; line-height: 1.4; }

  /* header: dlugi email zalogowanego nie rozpycha paska (skracany wielokropkiem),
     przycisk jezyka bez zawijania ("PL ▾" w jednej linii) */
  .user-btn { max-width: 108px; }
  .lang-btn { white-space: nowrap; }
  .header-inner { gap: 6px; }

  /* header mobile: wszystko w JEDNEJ linii 58px — ciasniejsze przyciski,
     "Sign up free" nie lamie sie i nie wystaje poza ekran */
  .header-actions { gap: 5px; }
  .header-actions .btn-sm { padding: 7px 10px; font-size: .72rem; }
  .header-actions .lang-btn { padding: 7px 8px; font-size: .72rem; }
  .theme-toggle { width: 32px; height: 32px; font-size: .8rem; flex-shrink: 0; }
  .logo { gap: 6px; min-width: 0; }
  .logo-text { font-size: .92rem; }
}

@media (max-width: 430px) {
  /* bardzo waskie ekrany: logo = sama ikona; "Zaloguj" znika (modal rejestracji
     ma przelacznik "masz konto? zaloguj sie") — zostaje CTA rejestracji */
  .logo-text { display: none; }
  #loginBtn { display: none; }
}

@media (max-width: 640px) {
  /* inline pole nazwy presetu (zapis) elastyczne — nie wystaje poza ekran */
  .preset-group { flex-wrap: wrap; min-width: 0; width: 100%; }
  .preset-group .styled-select { flex: 1; min-width: 0; }
  .preset-name-wrap { flex: 1 1 100%; min-width: 0; }
  .preset-name-input { flex: 1; width: auto; min-width: 0; }
}

/* ===================== AI (etap 8) ===================== */
.ai-all-btn { white-space: nowrap; }
.ai-credits {
  font-size: 12px; color: var(--text-muted); white-space: nowrap;
  background: var(--accent-light); color: var(--accent);
  border-radius: 20px; padding: 4px 10px; font-weight: 600;
}
.thumb-tools .ai-btn { color: var(--accent); }

/* menu operacji (popover) */
.ai-menu {
  position: absolute; z-index: 1200; width: 250px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 8px 28px rgba(16,24,40,.16);
  padding: 6px; box-sizing: border-box;
}
.ai-menu-head {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-light); padding: 6px 10px 4px;
}
.ai-menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; border: none; background: none; cursor: pointer; text-align: left;
  font: inherit; font-size: 13.5px; color: var(--text);
  padding: 9px 10px; border-radius: 8px;
}
.ai-menu-item:hover { background: var(--accent-light); color: var(--accent); }
.ai-menu-item.is-off { opacity: .55; cursor: default; }
.ai-menu-item.is-off:hover { background: none; color: var(--text); }
.ai-badge {
  flex-shrink: 0; font-size: 11px; font-weight: 700;
  background: var(--bg-secondary); color: var(--text-muted);
  border-radius: 16px; padding: 2px 8px; white-space: nowrap;
}
.ai-badge.is-free { background: #ECFDF5; color: #059669; }
[data-theme="dark"] .ai-badge.is-free { background: rgba(16,185,129,.16); color: #34D399; }

/* nakladka "AI pracuje" na miniaturze */
.ai-overlay {
  position: absolute; inset: 0; z-index: 6;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: color-mix(in srgb, var(--bg-card) 72%, transparent);
  backdrop-filter: blur(1.5px);
  font-size: 12.5px; font-weight: 600; color: var(--accent);
  border-radius: inherit;
}
.ai-spin {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--accent-light); border-top-color: var(--accent);
  animation: aispin .8s linear infinite;
}
@keyframes aispin { to { transform: rotate(360deg); } }

/* modal wynikow tekstowych */
.ai-results-box { max-width: 640px; width: min(92vw, 640px); }
.ai-results-body { max-height: 60vh; overflow-y: auto; padding: 4px 18px 8px; }
.ai-result { padding: 12px 0; border-bottom: 1px solid var(--border); }
.ai-result:last-child { border-bottom: none; }
.ai-result-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ai-result-head strong { font-size: 13px; word-break: break-all; }
.ai-result-text {
  margin: 0; white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.55; color: var(--text);
  background: var(--bg-secondary); border-radius: 8px; padding: 10px 12px;
  max-height: 220px; overflow-y: auto;
}
.ai-result-desc p { margin: 0 0 6px; font-size: 13.5px; line-height: 1.55; }
.ai-result-desc .ai-alt { font-size: 12.5px; color: var(--text-muted); }
.ai-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ai-tag {
  font-size: 11.5px; background: var(--accent-light); color: var(--accent);
  border-radius: 14px; padding: 2px 9px;
}
.ai-results-foot { display: flex; justify-content: flex-end; padding: 10px 18px 16px; }
@media (max-width: 640px) {
  .ai-menu { width: 230px; }
}

/* ===== AI menu v2: ikony + opisy + saldo w naglowku ===== */
.ai-menu { width: 292px; padding: 8px; }
.ai-menu-head { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px 8px;
  border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.ai-mh-t { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-light); }
.ai-mh-s { font-size: 12px; font-weight: 600; color: var(--accent); text-transform: none; letter-spacing: 0; }
.ai-mi-ic { flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-light); color: var(--accent); }
.ai-mi-ic.is-free { background: #ECFDF5; color: #059669; }
[data-theme="dark"] .ai-mi-ic.is-free { background: rgba(16,185,129,.16); color: #34D399; }
.ai-mi-tx { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ai-mi-l { font-size: 13px; font-weight: 600; line-height: 1.3; }
.ai-mi-d { font-size: 11.5px; color: var(--text-muted); line-height: 1.35; }
.ai-menu-item:hover .ai-mi-d { color: inherit; opacity: .75; }

/* ===== AI: modal potwierdzenia operacji zbiorczej ===== */
.ai-confirm-box { max-width: 410px; width: min(92vw, 410px); padding: 22px; }
.ai-confirm-t { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.ai-confirm-cost { font-size: 13.5px; color: var(--text-muted); margin: 0 0 18px; line-height: 1.5; }
.ai-confirm-btns { display: flex; justify-content: flex-end; gap: 10px; }
