:root {
  --bg: #f7f8fc; --surface: #fff; --surface2: #f0f3f9; --text: #1a2336; --muted: #647089;
  --border: #e0e5ef; --primary: #3854df; --primary2: #2947ce; --primaryText: #fff;
  --shadow: 0 14px 40px rgba(32,46,86,.055); --danger: #bb364f; --success: #087f65;
  --focus: #8d9ff9;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #101521; --surface: #192233; --surface2: #222f45; --text: #eef2fc; --muted: #a4afc2;
  --border: #334158; --primary: #8698ff; --primary2: #a3b0ff; --primaryText: #0b1230;
  --shadow: 0 16px 45px rgba(0,0,0,.19); --danger: #ff8094; --success: #5ad8ac;
  --focus: #aeb9ff;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin:0; background:var(--bg); color:var(--text); font: 15px/1.62 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color:inherit; text-decoration:none; }
a:hover { color:var(--primary); }
button, input, textarea, select { font:inherit; }
button, a, input, textarea { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; }
button:disabled { opacity:.55; cursor:not-allowed; }
:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
.site-shell { min-height:100vh; display:flex; flex-direction:column; }
.site-header { background:var(--surface); border-bottom:1px solid var(--border); position:sticky; top:0; z-index:10; }
.header-inner { max-width:1240px; margin:auto; padding:13px 28px; min-height:74px; display:flex; align-items:center; gap:27px; }
.brand { display:flex; align-items:center; gap:8px; font-weight:800; font-size:22px; letter-spacing:-.8px; flex-shrink:0; }
.brand-mark { background:#303fbc; color:white; padding:8px 10px; border-radius:12px; font-size:15px; letter-spacing:.2px; }
.main-nav { display:flex; flex:1; gap:5px; }
.nav-link { border-radius:10px; padding:9px 12px; white-space:nowrap; font-weight:600; color:var(--muted); font-size:13px; }
.nav-link:hover,.nav-link.active { color:var(--primary); background:var(--surface2); }
.header-tools { margin-left:auto; display:flex; gap:10px; align-items:center; }
.user-chip { max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; font-weight:600; }
.theme-switch { width:37px; height:37px; display:grid; place-items:center; font-size:22px; border:1px solid var(--border); border-radius:10px; background:var(--surface2); color:var(--text); }
.main-content { width:100%; max-width:1240px; padding:35px 28px 68px; margin:0 auto; flex:1; }
.site-footer { display:flex; justify-content:space-between; gap:15px; flex-wrap:wrap; max-width:1240px; width:100%; padding:22px 28px 28px; margin:auto; color:var(--muted); font-size:12px; border-top:1px solid var(--border); }
.page-title { margin:0 0 25px; }
.page-title h1 { margin:2px 0 0; font-size:clamp(28px,4vw,42px); letter-spacing:-1.4px; line-height:1.2; }
.eyebrow { color:var(--primary); font-size:11px; font-weight:800; letter-spacing:2px; text-transform:uppercase; }
h1,h2,h3,p { overflow-wrap:anywhere; }
h2 { font-size:20px; letter-spacing:-.4px; margin:0 0 16px; line-height:1.3; }
h3 { font-size:15px; margin:0; line-height:1.4; }
p { margin:0 0 14px; }
hr { border:0; border-top:1px solid var(--border); margin:18px 0; }
.small { font-size:12px; }
.muted,.hint { color:var(--muted); }
.hint { font-size:12px; margin-top:15px; }
.card { background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:24px; box-shadow:var(--shadow); min-width:0; }
.card.narrow { max-width:600px; }
.stack { display:flex; flex-direction:column; gap:14px; }
.stack.compact { gap:7px; }
.grid { display:grid; gap:22px; align-items:start; }
.two-cols { grid-template-columns:repeat(2,minmax(0,1fr)); }
.cols-40-60 { grid-template-columns:minmax(0,2fr) minmax(0,3fr); }
.cols-60-40 { grid-template-columns:minmax(0,3fr) minmax(0,2fr); }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; background:transparent; border:1px solid transparent; border-radius:11px; min-height:42px; padding:10px 16px; font-weight:700; font-size:13px; transition: .16s ease; transition-property:transform,background,border-color; text-align:center; line-height:1.3; }
.btn:hover:not(:disabled) { transform:translateY(-1px); }
.btn-primary { background:var(--primary); color:var(--primaryText); border-color:var(--primary); }
.btn-primary:hover { background:var(--primary2); color:var(--primaryText); }
.btn-secondary { background:var(--surface2); color:var(--text); border-color:var(--border); }
.btn-secondary:hover { color:var(--primary); border-color:var(--primary); }
.btn-ghost { color:var(--muted); background:transparent; }
.btn-ghost:hover { background:var(--surface2); }
.btn-danger { color:var(--danger); border-color:var(--danger); background:transparent; }
.btn-danger:hover { color:var(--danger); background:var(--surface2); }
.btn-small { padding:7px 11px; min-height:34px; font-size:12px; border-radius:9px; }
.btn-large { min-height:54px; padding:15px 24px; font-size:15px; }
.inline-form { display:inline; margin:0; }
.actions,.action-row { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.auth-wrap { min-height:430px; display:flex; align-items:center; justify-content:center; }
.auth-card { width:100%; max-width:430px; padding:34px; }
.auth-card h2 { font-size:25px; margin:10px 0; }
.round-icon { width:48px; height:48px; border-radius:14px; background:var(--surface2); display:grid; place-items:center; color:var(--primary); font-size:24px; }
label:not(.checkbox-label) { display:flex; flex-direction:column; gap:6px; font-size:13px; font-weight:650; }
input:not([type="checkbox"]):not([type="hidden"]), textarea, select { width:100%; border:1px solid var(--border); background:var(--surface); color:var(--text); padding:11px 12px; border-radius:10px; min-height:43px; outline:none; }
textarea { resize:vertical; min-height:90px; }
input:not([type="checkbox"]):focus, textarea:focus, select:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(100,122,245,.15); }
input[type="file"] { padding:10px; font-size:12px; }
input[type="checkbox"] { accent-color:var(--primary); width:17px; height:17px; }
.alert { border:1px solid var(--border); border-left-width:4px; border-radius:10px; padding:13px 16px; margin-bottom:22px; background:var(--surface); }
.alert-success { border-left-color:var(--success); }
.alert-error { border-left-color:var(--danger); }
.notice { font-size:13px; color:var(--muted); background:var(--surface2); padding:14px; border-radius:10px; margin-top:15px; }
.badge { padding:4px 9px; border-radius:100px; font-size:11px; font-weight:700; white-space:nowrap; display:inline-flex; align-items:center; }
.badge.success { color:var(--success); background:color-mix(in srgb,var(--success) 10%, transparent); }
.badge.danger { color:var(--danger); background:color-mix(in srgb,var(--danger) 10%, transparent); }
.badge.muted { background:var(--surface2); color:var(--muted); }
.section-intro { margin:-4px 0 22px; display:flex; align-items:center; gap:12px; justify-content:space-between; flex-wrap:wrap; }
.section-intro p { margin:0; color:var(--muted); }
.module-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.module-tile { padding:23px; min-height:205px; display:flex; flex-direction:column; gap:16px; background:var(--surface); border-radius:17px; border:1px solid var(--border); box-shadow:var(--shadow); transition:transform .16s,border-color .16s; }
.module-tile:hover { transform:translateY(-3px); border-color:var(--primary); color:var(--text); }
.module-tile h2 { font-size:19px; margin:0 0 8px; }
.module-tile p { color:var(--muted); font-size:13px; margin:0; }
.module-symbol { width:47px; height:47px; display:grid; place-items:center; border-radius:13px; background:var(--surface2); color:var(--primary); font-weight:900; font-size:24px; }
.tile-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; border-top:1px solid var(--border); padding-top:12px; margin-top:auto; color:var(--muted); font-size:12px; }
.tile-footer span:last-child { color:var(--primary); font-weight:700; }
.empty-state { background:var(--surface); border:1px dashed var(--border); border-radius:16px; padding:35px; color:var(--muted); }
.empty-state h2 { color:var(--text); margin-top:14px; }
.hero { display:grid; grid-template-columns:1.1fr .9fr; gap:35px; align-items:center; padding:45px 0 65px; min-height:560px; }
.hero h1 { font-size:clamp(40px,5.8vw,72px); line-height:1.08; letter-spacing:-2.8px; margin:10px 0 28px; }
.hero p { font-size:17px; line-height:1.75; max-width:490px; color:var(--muted); margin-bottom:30px; }
.gradient-text { color:var(--primary); }
.hero-art { min-height:375px; position:relative; display:grid; place-items:center; border-radius:34px; background:radial-gradient(circle at 80% 10%, #9ba7fe55, transparent 52%),linear-gradient(155deg,var(--surface2),var(--surface)); overflow:hidden; border:1px solid var(--border); }
.orbit { border:1px solid color-mix(in srgb,var(--primary) 35%, transparent); border-radius:50%; position:absolute; width:340px; height:340px; }
.orbit-two { width:480px; height:480px; }
.hero-symbol { font-size:clamp(30px,4vw,48px); font-weight:900; color:var(--primary); z-index:1; letter-spacing:-2px; background:var(--surface); border:1px solid var(--border); border-radius:26px; padding:30px; box-shadow:var(--shadow); }
.hero-symbol span { opacity:.4; padding:0 2px; }
.tab-nav { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:22px; }
.tab-nav a { padding:9px 14px; background:var(--surface); border:1px solid var(--border); border-radius:9px; font-weight:650; font-size:13px; }
.tab-nav a:hover { color:var(--primary); border-color:var(--primary); }
.stats-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-bottom:22px; }
.stat { background:var(--surface); border:1px solid var(--border); padding:23px; border-radius:15px; display:flex; flex-direction:column; gap:2px; }
.stat span { color:var(--muted); font-size:12px; }
.stat strong { font-size:36px; letter-spacing:-1px; line-height:1.3; }
.details { display:grid; grid-template-columns:auto minmax(0,1fr); gap:12px 18px; margin:0; font-size:13px; }
.details dt { color:var(--muted); }
.details dd { margin:0; font-weight:650; min-width:0; overflow-wrap:anywhere; }
.table-scroll { width:100%; overflow-x:auto; }
table { width:100%; border-collapse:collapse; text-align:left; font-size:13px; }
th,td { padding:13px 9px; border-bottom:1px solid var(--border); vertical-align:middle; }
th { color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.65px; }
tr:last-child td { border-bottom:0; }
.permission-group { border:1px solid var(--border); padding:12px 14px; border-radius:10px; min-width:0; }
.permission-group legend { padding:0 7px; font-size:13px; }
.checkbox-grid { display:flex; flex-wrap:wrap; gap:13px; }
.checkbox-label { display:inline-flex; gap:5px; align-items:center; font-size:13px; cursor:pointer; }
.module-row { border-bottom:1px solid var(--border); padding:18px 0; }
.module-row:last-child { border-bottom:0; }
.module-row-header { display:flex; align-items:flex-start; justify-content:space-between; gap:15px; margin-bottom:7px; }
.module-row p { font-size:13px; color:var(--muted); }
.danger-zone { margin-top:18px; border:1px solid var(--border); border-radius:10px; padding:10px 14px; }
.danger-zone summary { color:var(--danger); font-size:12px; font-weight:700; cursor:pointer; }
.danger-zone p { margin:12px 0; }
.note { padding:16px; border:1px solid var(--border); border-radius:12px; }
.note-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; }
.note-body { white-space:normal; margin:9px 0; }
.check-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid var(--border); font-size:13px; }
code { font: .9em ui-monospace,Consolas,monospace; background:var(--surface2); border-radius:4px; padding:2px 4px; }
@media(max-width:980px) { .module-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .cols-40-60,.cols-60-40 { grid-template-columns:1fr; } .user-chip { display:none; } }
@media(max-width:700px) { .header-inner { padding:10px 16px; flex-wrap:wrap; column-gap:10px; row-gap:6px; } .brand { font-size:18px; } .main-nav { order:3; width:100%; flex:auto; overflow-x:auto; } .nav-link { font-size:12px; padding:6px 9px; } .header-tools { margin-left:auto; } .main-content { padding:26px 16px 48px; } .site-footer { padding:20px 16px; } .two-cols,.module-grid,.stats-grid,.hero { grid-template-columns:1fr; } .hero { padding:28px 0; min-height:0; gap:20px; } .hero-art { min-height:250px; } .hero h1 { letter-spacing:-1.7px; } .hero p { font-size:15px; } .card { padding:18px; } .auth-card { padding:24px; } .stats-grid { gap:10px; } .stat { padding:15px; } .stat strong { font-size:29px; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; } }

/* Moduł jako samodzielna strona — bez globalnej nawigacji FKT Hub. */
.standalone-shell .main-content { max-width: 100%; padding: 22px clamp(16px, 4vw, 56px) 50px; }
.standalone-shell .page-title { margin-top: 0; }
.settings-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.settings-description { display:block; color:var(--muted); font-size:12px; font-weight:400; margin-top:2px; }
.note.note-highlight { border-color: var(--primary); background: var(--primary-soft, var(--surface)); }
