@font-face {
  font-family: 'Eurostile';
  src: url('/fonts/Eurostile-Bold.otf') format('opentype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Mundial';
  src: url('/fonts/Mundial-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}

* { box-sizing: border-box; margin: 0; }
:root {
  /* Design tokeny Digital Development (ze strony www / panelu CMS) */
  --brand: #2A47D1; --brand-hover: #243BB0;
  --brand-tint: #EEF2FF; --brand-border: rgba(42, 71, 209, 0.15);
  --sidebar: #0F172A; --sidebar-2: #1E293B;
  --bg: #F4F5F7; --card: #ffffff; --border: #E2E8F0;
  --text: #0F172A; --muted: #64748B;
  --ok: #16A34A; --ok-bg: #F0FDF4;
  --warn: #B45309; --warn-bg: #FEF3C7;
  --err: #DC2626; --err-bg: #FEF2F2;
}
body {
  font-family: 'Mundial', -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--text);
}
h1, h2, h3, .sidebar-brand, .login-card h1, .title { font-family: 'Eurostile', 'Mundial', sans-serif; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 14px; }
.error { color: var(--err); font-size: 14px; }
code { background: var(--brand-tint); color: var(--brand); padding: 2px 6px; border-radius: 6px; font-size: 13px; }

/* ---------- logowanie ---------- */
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg); position: relative; overflow: hidden; }
.login-screen::before { content: ''; position: absolute; top: -160px; right: -160px; width: 600px; height: 600px;
  background: rgba(42,71,209,.10); border-radius: 50%; filter: blur(64px); pointer-events: none; }
.login-screen::after { content: ''; position: absolute; bottom: -160px; left: -160px; width: 500px; height: 500px;
  background: rgba(42,71,209,.05); border-radius: 50%; filter: blur(64px); pointer-events: none; }
.login-card { background: var(--card); border: 1px solid var(--border); border-radius: 24px; padding: 48px;
  text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; max-width: 420px;
  box-shadow: 0 10px 40px rgba(42,71,209,.12); position: relative; z-index: 1; }
.login-logo { max-width: 210px; max-height: 64px; object-fit: contain; }
.login-card h1 { font-size: 26px; letter-spacing: .01em; }

/* ---------- layout ---------- */
.app-layout { display: flex; height: 100vh; overflow: hidden; }
main { flex: 1; overflow-y: auto; padding: 32px; }
main > section { max-width: 1060px; margin: 0 auto; }
#view-stopki { max-width: none; height: 100%; }

/* ---------- sidebar ---------- */
.sidebar { width: 256px; flex-shrink: 0; background: var(--sidebar); color: #CBD5E1;
  display: flex; flex-direction: column; }
.sidebar-head { display: flex; align-items: center; gap: 12px; padding: 22px 20px;
  border-bottom: 1px solid var(--sidebar-2); }
/* logo klienta na ciemnym tle: wybielamy niezależnie od jego kolorów
   (ten sam zabieg co w panelu CMS Digital Development) */
.sidebar-logo { max-width: 104px; max-height: 34px; object-fit: contain;
  filter: brightness(0) invert(1); opacity: .92; }

/* awatary użytkowników (zdjęcie z Google albo inicjały) */
.avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; background: var(--brand-tint); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.sidebar-brand { color: #fff; font-size: 15px; letter-spacing: .02em; }
.sidebar-domain { font-size: 11px; color: #64748B; margin-top: 2px; }
.sidebar-nav { flex: 1; padding: 14px 12px; overflow-y: auto; }
.nav-section { margin-bottom: 18px; }
.nav-section-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .2em;
  color: #64748B; padding: 0 12px 8px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px;
  border: none; background: none; border-radius: 12px; font-size: 14px; font-family: inherit;
  color: #94A3B8; cursor: pointer; transition: all .15s; text-align: left; }
.nav-item svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.nav-item:hover { background: var(--sidebar-2); color: #fff; }
.nav-item.active { background: rgba(42,71,209,.25); color: #93C5FD; font-weight: 600; }
.sidebar-foot { border-top: 1px solid var(--sidebar-2); padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sidebar-user { font-size: 12px; color: #94A3B8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-logout { background: none; border: none; color: #F87171; font-size: 12px; cursor: pointer;
  font-family: inherit; padding: 6px 10px; border-radius: 8px; flex-shrink: 0; }
.sidebar-logout:hover { background: rgba(239,68,68,.1); }

/* ---------- przyciski / formularze ---------- */
button.primary { background: var(--brand); color: #fff; border: none; border-radius: 14px;
  padding: 11px 20px; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: all .2s; box-shadow: 0 8px 24px rgba(42,71,209,.20); }
button.primary:hover { background: var(--brand-hover); transform: translateY(-1px); }
button.primary:disabled { opacity: .55; cursor: default; transform: none; }
button.ghost { background: transparent; border: 1.5px solid var(--brand); border-radius: 12px;
  padding: 8px 16px; font-size: 13px; font-family: inherit; cursor: pointer; color: var(--brand); transition: all .2s; }
button.ghost:hover { background: var(--brand); color: #fff; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }

/* ---------- karty i listy ---------- */
.card-list { display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 18px 22px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03); transition: box-shadow .2s; }
.row { display: flex; align-items: center; gap: 16px; }
.row .grow { flex: 1; min-width: 0; }
.title { font-weight: 700; font-size: 15px; }
.sub { color: var(--muted); font-size: 13px; margin-top: 3px; }

.pill { border-radius: 999px; padding: 4px 13px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #BBF7D0; }
.pill.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #FDE68A; }
.pill.err { background: var(--err-bg); color: var(--err); border: 1px solid #FECACA; }
.pill.neutral { background: var(--brand-tint); color: var(--brand); border: 1px solid var(--brand-border); }

.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: #CBD5E1; border-radius: 26px; transition: background .15s; }
.switch .slider::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(20px); }

.members { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 9px; }
.member-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.link-btn { background: none; border: none; color: var(--brand); font-size: 13px; cursor: pointer;
  padding: 0; font-family: inherit; }
.link-btn:hover { text-decoration: underline; }

/* ---------- moduł stopek (iframe) / placeholder kontaktów ---------- */
#stopki-frame, #kontakty-frame { width: 100%; height: calc(100vh - 64px); border: 1px solid var(--border);
  border-radius: 20px; background: #fff; }
.empty-module { text-align: center; padding: 64px 32px; }
.empty-icon { width: 64px; height: 64px; border-radius: 18px; background: var(--brand-tint);
  color: var(--brand); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.empty-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.empty-module .title { font-size: 19px; margin-bottom: 6px; }

.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: var(--sidebar);
  color: #fff; padding: 13px 24px; border-radius: 14px; font-size: 14px;
  box-shadow: 0 10px 40px rgba(15,23,42,.35); z-index: 10; max-width: 90vw; }
