:root {
    --orange:      #FF6600;  /* cf-orange-500 — primary */
    --orange-dark: #CC5200;  /* cf-orange-600 */
    --blue:        #2B6BFF;  /* cf-blue-500 */
    --navy:        #1A2332;  /* cf-navy-500 — topbar */
    --navy-dark:   #151C28;  /* cf-navy-600 */
    --ink:         #061329;  /* --app-text-primary */
    --muted:       #666666;
    --soft:        #8a94a0;
    --line:        #e0e0e0;
    --bg:          #f5f5f5;
    --card:        #ffffff;
    --ok:          #2e8b57;
    --warn:        #b8860b;
    --err:         #c0392b;
    --console-bg:  #101826;
    --console-ink: #c8d6e8;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }

  /* ── Pasek dostępności (gov.pl) ── */
  .a11y-bar { background: var(--navy); color: #fff; font-size: 11.5px; display: flex; align-items: center; gap: 4px; padding: 4px 24px; }
  .a11y-bar button { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.35); border-radius: 6px; font-family: inherit; font-size: 11px; font-weight: 600; padding: 1px 9px; cursor: pointer; margin-left: 4px; }
  .a11y-bar button:hover { background: rgba(255,255,255,0.15); }
  .a11y-bar .right { margin-left: auto; font-size: 11px; color: rgba(255,255,255,0.75); }
  body.hicontrast { filter: contrast(1.25); }
  body.bigtext { font-size: 16.5px; }

  /* ── Topbar (biały, logo CF — wzór gov.pl/mObywatel) ── */
  .topbar { background: rgba(255,255,255,0.95); color: var(--ink); display: flex; align-items: center; gap: 18px; padding: 0 24px; height: 60px; border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; backdrop-filter: blur(8px); z-index: 6; }
  .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
  .brand img { height: 26px; width: auto; }
  .brand b { font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; color: var(--ink); }
  .brand span { color: var(--muted); font-size: 11.5px; font-weight: 500; border-left: 1px solid var(--line); padding-left: 12px; }
  .topbar .env { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 12.5px; }
  .badge-env { background: rgba(26,35,50,0.06); color: var(--navy); padding: 3px 11px; border-radius: 999px; font-size: 11px; font-weight: 600; }
  .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--orange); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }

  .gov-strip { background: rgba(43,107,255,0.06); color: var(--navy); font-size: 12px; padding: 6px 24px; border-bottom: 1px solid var(--line); }

  /* ── Stopka (wzór gov.pl) ── */
  .gov-footer { background: var(--navy); color: rgba(255,255,255,0.85); padding: 22px 24px 26px; display: flex; gap: 40px; justify-content: space-between; flex-wrap: wrap; font-size: 12px; line-height: 1.7; margin-top: 30px; }
  .gov-footer b { color: #fff; font-size: 13px; }
  .gov-footer .f-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; }
  .gov-footer .f-links a { color: #fff; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
  .gov-footer .f-links a:hover { color: var(--orange); }
  .gov-footer .f-meta { color: rgba(255,255,255,0.6); font-size: 11.5px; text-align: right; }

  /* ── Layout ── */
  .shell { display: grid; grid-template-columns: 224px 1fr; min-height: calc(100vh - 58px); }
  .sidenav { background: var(--card); border-right: 1px solid var(--line); padding: 16px 12px; }
  .sidenav a { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 500; cursor: pointer; margin-bottom: 2px; }
  .sidenav a:hover { background: var(--bg); color: var(--ink); }
  .sidenav a.active { background: var(--navy); color: #fff; }
  .sidenav a:focus-visible, .btn:focus-visible, .app-card:focus-visible, .size-card:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
  .sidenav .count { font-size: 11px; background: var(--bg); color: var(--muted); border-radius: 999px; padding: 1px 8px; font-weight: 600; }
  .sidenav a.active .count { background: rgba(255,255,255,0.2); color: #fff; }
  .sidenav .sep { height: 1px; background: var(--line); margin: 10px 6px; }
  .sidenav .section { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); padding: 8px 12px 4px; font-weight: 600; }
  main { padding: 24px 30px; max-width: 1220px; }

  .page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
  .page-head h1 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; color: var(--navy); }
  .page-head .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
  .spacer { flex: 1; }

  /* ── Buttons (orange = primary CTA, navy = secondary — wg brand guide) ── */
  .btn { font-family: inherit; font-size: 13px; font-weight: 600; border-radius: 16px; padding: 8px 16px; border: 1.5px solid transparent; cursor: pointer; transition: background .12s, border-color .12s, opacity .12s; }
  .btn-primary { background: var(--orange); color: #fff; }
  .btn-primary:hover { background: var(--orange-dark); }
  .btn-navy { background: var(--navy); color: #fff; }
  .btn-navy:hover { background: var(--navy-dark); }
  .btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
  .btn-ghost:hover { background: rgba(26,35,50,0.06); }
  .btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 16px; }
  .btn-danger-ghost { background: transparent; color: var(--err); border-color: var(--err); }
  .btn-danger-ghost:hover { background: rgba(192,57,43,0.06); }
  a.link { color: var(--orange); text-decoration: none; font-weight: 500; }
  a.link:hover { text-decoration: underline; }

  /* ── Stats ── */
  .stats { display: flex; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
  .stat { flex: 1; min-width: 150px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; }
  .stat .k { font-size: 10.5px; color: var(--soft); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
  .stat .v { font-size: 21px; font-weight: 700; margin-top: 2px; color: var(--navy); }
  .stat .v small { font-size: 12px; color: var(--muted); font-weight: 500; }
  .stat .bar { height: 4px; background: var(--bg); border-radius: 2px; margin-top: 9px; overflow: hidden; }
  .stat .bar i { display: block; height: 100%; background: var(--blue); border-radius: 2px; }

  /* ── Panels & tables ── */
  .panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
  .panel-head { display: flex; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); gap: 12px; flex-wrap: wrap; }
  .panel-head h2 { font-size: 14px; font-weight: 600; color: var(--navy); }
  table { width: 100%; border-collapse: collapse; font-size: 13px; }
  th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--soft); font-weight: 600; padding: 9px 18px; border-bottom: 1px solid var(--line); background: #fafafa; white-space: nowrap; }
  td { padding: 11px 18px; border-bottom: 1px solid #eef0f2; vertical-align: middle; }
  tr:last-child td { border-bottom: none; }
  tr:hover td { background: #fafbfd; }
  td .name { font-weight: 600; }
  td .sub { font-size: 11.5px; color: var(--soft); font-family: ui-monospace, 'SF Mono', monospace; }
  .row-actions { display: flex; gap: 6px; justify-content: flex-end; }

  .pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
  .pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  .pill.ok { color: var(--ok); background: rgba(46,139,87,0.09); }
  .pill.prog { color: var(--blue); background: rgba(43,107,255,0.10); }
  .pill.warn { color: var(--warn); background: rgba(184,134,11,0.10); }
  .pill.stop { color: var(--muted); background: rgba(102,102,102,0.10); }
  .pill.err { color: var(--err); background: rgba(192,57,43,0.09); }

  .meter { height: 5px; background: var(--bg); border-radius: 3px; overflow: hidden; min-width: 110px; }
  .meter i { display: block; height: 100%; border-radius: 3px; }
  .meter.low i { background: var(--ok); }
  .meter.mid i { background: var(--blue); }
  .meter.high i { background: var(--err); }
  .usage .meta { font-size: 11px; color: var(--soft); margin-top: 3px; }

  /* ── Wizard ── */
  .steps { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
  .step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--soft); }
  .step .n { width: 22px; height: 22px; border-radius: 50%; background: var(--bg); color: var(--soft); display: flex; align-items: center; justify-content: center; font-size: 11px; }
  .step.active { color: var(--navy); }
  .step.active .n { background: var(--navy); color: #fff; }
  .step-sep { flex: 1; min-width: 20px; height: 1px; background: var(--line); margin: 11px 4px 0; }
  .field { margin-bottom: 18px; }
  .field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
  .field .hint { font-size: 11.5px; color: var(--soft); margin-top: 4px; }
  .field input[type=text], .field select { width: 100%; max-width: 420px; font-family: inherit; font-size: 13.5px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; outline: none; background: #fff; }
  .field input[type=text]:focus { border-color: var(--blue); }
  .sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .size-card { border: 1.5px solid var(--line); border-radius: 12px; padding: 16px 18px; cursor: pointer; background: var(--card); position: relative; }
  .size-card:hover { border-color: var(--blue); }
  .size-card.sel { border-color: var(--navy); background: #f4f8fd; }
  .size-card .t { display: flex; align-items: baseline; gap: 8px; }
  .size-card .t b { font-size: 16px; font-weight: 700; color: var(--navy); }
  .size-card .t span { font-size: 11.5px; color: var(--soft); }
  .size-card ul { list-style: none; margin-top: 10px; }
  .size-card li { font-size: 12.5px; color: var(--muted); padding: 2.5px 0; display: flex; justify-content: space-between; }
  .size-card li b { color: var(--ink); font-weight: 600; }
  .size-card .price { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--soft); }
  .size-card .price b { color: var(--navy); font-size: 14px; }
  .tick { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--navy); color: #fff; display: none; align-items: center; justify-content: center; font-size: 11px; }
  .size-card.sel .tick { display: flex; }

  /* ── Monitoring (charts) ── */
  .charts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 18px; }
  .chart-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 10px; }
  .chart-card .head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
  .chart-card .head b { font-size: 13px; font-weight: 600; color: var(--navy); }
  .chart-card .head span { font-size: 11px; color: var(--soft); }
  .chart-card .head .val { margin-left: auto; font-size: 15px; font-weight: 700; color: var(--navy); }
  .chart-card .head .val small { font-size: 11px; color: var(--soft); font-weight: 500; }
  .chart-legend { display: flex; gap: 14px; font-size: 11px; color: var(--muted); padding: 4px 2px 2px; }
  .chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
  .range-tabs { display: flex; gap: 4px; background: var(--bg); border-radius: 8px; padding: 3px; }
  .range-tabs button { font-family: inherit; font-size: 11.5px; font-weight: 600; border: none; background: transparent; color: var(--muted); padding: 4px 10px; border-radius: 6px; cursor: pointer; }
  .range-tabs button.on { background: var(--card); color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

  /* ── Console / logi ── */
  .console { background: var(--console-bg); color: var(--console-ink); font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12px; line-height: 1.75; padding: 14px 18px; border-radius: 0 0 12px 12px; max-height: 430px; overflow-y: auto; }
  .console .ln { display: flex; gap: 12px; }
  .console .t { color: #5b708c; white-space: nowrap; }
  .console .src { color: var(--blue); white-space: nowrap; min-width: 120px; }
  .console .lvl { font-weight: 700; white-space: nowrap; min-width: 52px; }
  .console .lvl.info { color: #7aa5d8; }
  .console .lvl.warn { color: #e5b567; }
  .console .lvl.err  { color: #e0705f; }
  .console .msg { white-space: pre-wrap; word-break: break-word; }
  .console .msg b { color: #fff; font-weight: 600; }
  .console-live { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; color: var(--ok); }
  .console-live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 1.6s infinite; }
  @keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
  .filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  .filters select, .filters input { font-family: inherit; font-size: 12.5px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; outline: none; }

  .kv { display: flex; justify-content: space-between; font-size: 12.5px; padding: 4px 0; }
  .kv span { color: var(--muted); }
  .kv b { font-weight: 600; }
  .kv.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; font-size: 13.5px; }
  .side-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
  .side-card h3 { font-size: 13px; font-weight: 600; margin-bottom: 10px; color: var(--navy); }
  .bill-grid { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
  .cost-note { font-size: 12px; color: var(--soft); padding: 10px 18px; border-top: 1px solid var(--line); background: #fafafa; }

  .view { display: none; }
  .view.on { display: block; }

  .modal-bg { display: none; position: fixed; inset: 0; background: rgba(22,48,79,0.5); z-index: 10; align-items: center; justify-content: center; }
  .modal-bg.on { display: flex; }
  .modal { background: var(--card); border-radius: 14px; width: min(520px, 92vw); padding: 22px 24px; }
  .modal h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--navy); }
  .modal p { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
  .modal .row { display: flex; gap: 10px; justify-content: flex-end; }

  /* ── User management ── */
  .role-tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--bg); color: var(--muted); }
  .role-tag.admin { background: rgba(255,102,0,0.12); color: var(--orange-dark); }
  .role-tag.it { background: rgba(43,107,255,0.12); color: var(--blue); }

  /* ── Asystent AI ── */
  .assistant-panel { display: flex; flex-direction: column; }
  .assistant-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
  .assistant-head b { font-size: 13.5px; color: var(--navy); }
  .assistant-head .sub2 { font-size: 11.5px; color: var(--soft); }
  .ai-orb { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
  .chat { padding: 18px; overflow-y: auto; max-height: 460px; display: flex; flex-direction: column; gap: 14px; background: #fafbfc; }
  .msg { display: flex; flex-direction: column; max-width: 88%; }
  .msg.ai { align-self: flex-start; }
  .msg.user { align-self: flex-end; }
  .msg .bubble { padding: 12px 15px; border-radius: 14px; font-size: 13.5px; line-height: 1.6; }
  .msg.ai .bubble { background: var(--card); border: 1px solid var(--line); border-top-left-radius: 4px; }
  .msg.user .bubble { background: var(--navy); color: #fff; border-top-right-radius: 4px; }
  .msg .meta { font-size: 10.5px; color: var(--soft); margin-top: 5px; padding: 0 4px; }
  .msg .mono { font-family: ui-monospace, 'SF Mono', monospace; font-size: 12px; background: var(--bg); padding: 1px 5px; border-radius: 4px; }
  .src-note { display: block; font-size: 11.5px; color: var(--muted); font-style: italic; margin-top: 8px; }
  .ai-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
  .chip { font-family: inherit; font-size: 11.5px; font-weight: 600; color: var(--navy); background: rgba(43,107,255,0.10); border: 1px solid rgba(43,107,255,0.30); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
  .chip:hover { background: rgba(43,107,255,0.20); }
  .ask { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--card); }
  .ask input { flex: 1; font-family: inherit; font-size: 13.5px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; outline: none; }
  .ask input:focus { border-color: var(--blue); }
  .fab { position: fixed; right: 26px; bottom: 26px; width: 52px; height: 52px; border-radius: 50%; background: var(--orange); color: #fff; border: none; font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 0 8px 22px -8px rgba(22,48,79,0.5); z-index: 5; display: flex; align-items: center; justify-content: center; }
  .fab:hover { background: var(--orange-dark); }
  .fab .dot { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: #fff; }

  /* ── Wybór aplikacji (katalog) ── */
  .app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .app-card { display: flex; gap: 14px; border: 1.5px solid var(--line); border-radius: 12px; padding: 16px 18px; cursor: pointer; background: var(--card); position: relative; }
  .app-card:hover { border-color: var(--blue); }
  .app-card.sel { border-color: var(--navy); background: #f4f8fd; }
  .app-card .tick { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--navy); color: #fff; display: none; align-items: center; justify-content: center; font-size: 11px; }
  .app-card.sel .tick { display: flex; }
  .app-ico { width: 42px; height: 42px; border-radius: 10px; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
  .app-ico.nc { background: var(--navy); }
  .app-ico.docs { background: var(--blue); }
  .app-ico.crm { background: #0F6B4F; }
  .app-ico.chat { background: #6B3FA0; }
  .app-ico.both { background: linear-gradient(135deg, var(--navy) 55%, var(--blue) 55%); }
  .app-card .t { font-size: 14px; font-weight: 700; color: var(--navy); }
  .app-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
  .ver-sel { font-family: inherit; font-size: 11.5px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--navy); font-weight: 600; outline: none; cursor: pointer; }
  .ver-sel:hover { border-color: var(--blue); }
  .app-card .d { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
  .app-card .meta-line { font-size: 11px; color: var(--soft); margin-top: 7px; font-family: ui-monospace, 'SF Mono', monospace; }
  .app-both-note { display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--orange-dark); background: rgba(255,102,0,0.12); border-radius: 999px; padding: 1px 8px; margin-bottom: 4px; }
  .app-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
  .app-pill.nc { color: var(--navy); background: rgba(26,35,50,0.09); }
  .app-pill.docs { color: var(--blue); background: rgba(43,107,255,0.12); }
  .app-pill.crm { color: #0F6B4F; background: rgba(15,107,79,0.12); }
  .app-pill.chat { color: #6B3FA0; background: rgba(107,63,160,0.12); }

  .app-roadmap { margin-top: 12px; font-size: 12px; color: var(--muted); background: rgba(43,107,255,0.06); border: 1px dashed rgba(43,107,255,0.35); border-radius: 10px; padding: 10px 14px; }

  @media (max-width: 940px) {
    .shell { grid-template-columns: 1fr; }
    .sidenav { display: none; }
    .sizes, .charts { grid-template-columns: 1fr; }
    .stat { min-width: 45%; }
    .bill-grid { grid-template-columns: 1fr; }
  }

/* ── dodatki portalu (poza mockupem) ── */
.flash-wrap{max-width:1180px;margin:12px auto 0;padding:0 24px}
.flash{padding:10px 14px;border-radius:8px;font-size:13.5px;margin-bottom:8px;border:1px solid var(--line);background:#fff}
.flash-success{border-color:var(--ok);color:var(--ok)}
.flash-error{border-color:var(--err);color:var(--err)}
.demo-note{background:#FFF7ED;border:1px solid #FED7AA;color:#9A3412;border-radius:8px;padding:9px 14px;font-size:12.5px;margin-bottom:16px}
.field input[type=text],.field input[type=password]{font-family:inherit}
.login-box{max-width:380px;margin:48px auto}
.pill.prog,.pill.stop{white-space:nowrap}


/* S1c: dostępność — etykiety tylko dla czytników ekranu */
.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; }
.topbar select { font: inherit; font-size: 13px; padding: 4px 8px; border-radius: 6px; }
/* S1c: pola formularzy także poza .field (formularze w tabelach, zaproszenia, allauth) */
a.btn { text-decoration: none; display: inline-block; }
main input[type=text], main input[type=email], main input[type=password], main input[type=number], main select {
  font-family: inherit; font-size: 13.5px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: inherit; }
.field input[type=email], .field input[type=password], .field input[type=number] { width: 100%; max-width: 420px; padding: 9px 12px; }
main input:focus, main select:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
main select:disabled { opacity: .6; }
/* strony allauth (MFA, zmiana hasła, logowanie MFA) w panelu portalu */
main.allauth-page { max-width: 760px; margin: 24px 30px; padding: 24px 28px; background: #fff; border: 1px solid var(--line); border-radius: 14px; align-self: flex-start; }
main.allauth-page h1 { font-size: 22px; margin: 0 0 14px; }
main.allauth-page h2 { font-size: 15px; margin: 22px 0 8px; color: var(--navy); }
main.allauth-page ul { list-style: none; padding: 0; margin: 8px 0; display: flex; gap: 8px; flex-wrap: wrap; }
main.allauth-page ul a, main.allauth-page button[type=submit] { font-family: inherit; font-size: 13px; font-weight: 600; border-radius: 16px; padding: 8px 16px;
  border: 1.5px solid var(--navy); color: var(--navy); background: #fff; text-decoration: none; cursor: pointer; display: inline-block; }
main.allauth-page button[type=submit] { background: var(--orange); border-color: var(--orange); color: #fff; }
main.allauth-page form p, main.allauth-page form div { margin-bottom: 12px; }
main.allauth-page label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
main.allauth-page img { background: #fff; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
main.allauth-page code, main.allauth-page pre { font-size: 13px; background: #f4f6fa; padding: 8px 10px; border-radius: 6px; display: block; }


/* ── Ekran logowania (split: marka | formularz) ── */
.shell.shell-auth { display: block; min-height: 0; }
main.auth { display: grid; grid-template-columns: minmax(380px, 46%) 1fr; min-height: calc(100vh - 27px); padding: 0; max-width: none; width: 100%; }
.auth-brand { position: relative; overflow: hidden; color: #fff; padding: 56px 64px 32px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(900px 520px at 110% -10%, rgba(255,102,0,.30), transparent 60%),
              radial-gradient(700px 500px at -20% 120%, rgba(43,107,255,.28), transparent 60%),
              linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%); }
.auth-brand::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: linear-gradient(180deg, #000, transparent 75%); }
.auth-brand-inner { position: relative; z-index: 1; max-width: 520px; }
.auth-logo { height: 34px; width: auto; margin-bottom: 56px; display: block; }
.auth-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #FFB07A; margin-bottom: 12px; }
.auth-title { font-size: clamp(32px, 3.4vw, 46px); font-weight: 700; letter-spacing: -.025em; line-height: 1.08; margin-bottom: 16px; }
.auth-lead { font-size: 16px; line-height: 1.6; color: rgba(255,255,255,.78); margin-bottom: 40px; max-width: 460px; }
.auth-points { list-style: none; display: grid; gap: 20px; }
.auth-points li { display: flex; gap: 14px; align-items: flex-start; font-size: 13.5px; color: rgba(255,255,255,.7); line-height: 1.5; }
.auth-points b { display: block; color: #fff; font-size: 14.5px; font-weight: 600; margin-bottom: 2px; }
.auth-points .ico, .auth-sso .ico { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.auth-points svg, .auth-sso svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.auth-points svg { stroke: #FFB07A; }
.auth-brand-foot { position: relative; z-index: 1; font-size: 12px; color: rgba(255,255,255,.45); margin-top: 40px; }

.auth-panel { background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px 24px; }
.auth-card { width: 100%; max-width: 400px; margin: auto 0; }
.auth-logo-mobile { display: none; height: 28px; width: auto; margin-bottom: 28px; }
.auth-card h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 6px; }
.auth-sub { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.auth-field { margin-bottom: 18px; }
.auth-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--ink); }
.auth-label-row { display: flex; justify-content: space-between; align-items: baseline; }
.auth-label-row a { font-size: 13px; color: var(--blue); text-decoration: none; font-weight: 500; }
.auth-label-row a:hover { text-decoration: underline; }
main.auth .auth-field input { width: 100%; max-width: none; height: 46px; font-family: inherit; font-size: 15px; padding: 0 14px; color: var(--ink);
  border: 1px solid #d0d5dd; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.05); transition: border-color .15s, box-shadow .15s; }
main.auth .auth-field input::placeholder { color: #98a2b3; }
main.auth .auth-field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(43,107,255,.15); }
.auth-pass { position: relative; }
main.auth .auth-pass input { padding-right: 76px; }
.auth-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 34px; padding: 0 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.auth-eye:hover { background: var(--bg); color: var(--ink); }
.auth-btn { width: 100%; height: 46px; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .15s, box-shadow .15s; }
.auth-btn-primary { margin-top: 6px; background: var(--orange); color: #fff; border: 0; box-shadow: 0 1px 2px rgba(16,24,40,.08), 0 4px 14px rgba(255,102,0,.25); }
.auth-btn-primary:hover { background: var(--orange-dark); }
.auth-btn-secondary { background: #fff; color: var(--ink); border: 1px solid #d0d5dd; }
.auth-btn-secondary:hover { background: var(--bg); }
.auth-btn:focus-visible, .auth-eye:focus-visible, .auth-sso summary:focus-visible, .auth-label-row a:focus-visible, .auth-footer a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.auth-alert { background: #FEF3F2; border: 1px solid #FECDCA; color: #B42318; border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 18px; }
.auth-or { display: flex; align-items: center; gap: 14px; margin: 26px 0 18px; color: var(--soft); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: #eaecf0; }
.auth-sso { border: 1px solid #d0d5dd; border-radius: 10px; }
.auth-sso[open] { border-color: #b7c4ff; box-shadow: 0 0 0 4px rgba(43,107,255,.06); }
.auth-sso summary { list-style: none; display: flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 14px;
  cursor: pointer; font-weight: 600; font-size: 15px; border-radius: 10px; }
.auth-sso summary::-webkit-details-marker { display: none; }
.auth-sso summary:hover { background: var(--bg); }
.auth-sso .ico { width: 26px; height: 26px; border-radius: 7px; background: rgba(43,107,255,.08); border-color: rgba(43,107,255,.18); color: var(--blue); }
.auth-sso .ico svg { width: 15px; height: 15px; }
.auth-sso form { padding: 4px 16px 16px; }
.auth-hint { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.auth-note { font-size: 13px; color: var(--muted); text-align: center; margin-top: 22px; }
.auth-footer { width: 100%; max-width: 400px; margin-top: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px;
  font-size: 12px; color: var(--soft); }
.auth-footer nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.auth-footer a { color: var(--soft); text-decoration: none; }
.auth-footer a:hover { color: var(--ink); text-decoration: underline; }
body.bigtext main.auth .auth-field input, body.bigtext .auth-btn { font-size: 17px; height: 52px; }

@media (max-width: 960px) {
  main.auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-brand { padding: 28px 24px 26px; }
  .auth-logo { height: 26px; margin-bottom: 22px; }
  .auth-title { font-size: 28px; margin-bottom: 8px; }
  .auth-lead { font-size: 14.5px; margin-bottom: 0; }
  .auth-points, .auth-brand-foot { display: none; }
  .auth-panel { padding: 32px 20px 24px; }
}

/* ── Topbar na wąskich ekranach: bez opisu, nic nie nachodzi na siebie ── */
@media (max-width: 760px) {
  .brand span { display: none; }
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar .env { gap: 8px; }
  .badge-env { display: none; }
  .a11y-bar { padding: 4px 12px; flex-wrap: wrap; }
  .a11y-bar .right { display: none; }
  .gov-strip { padding: 6px 14px; }
}
body:has(main.auth) { background: #fff; }
