:root{
  --bg: #f3f3f3;
  --surface: rgba(255,255,255,.75);
  --surface-solid:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --border: rgba(0,0,0,.10);
  --shadow: 0 10px 30px rgba(0,0,0,.10);
  --accent:#2563eb;
  --accent-2:#22c55e;
  --danger:#ef4444;

  --radius: 14px;
  --radius-sm: 10px;

  --font: "Segoe UI Variable","Segoe UI",system-ui,-apple-system,Arial,sans-serif;
}

html[data-theme="dark"]{
  --bg: #0b0f17;
  --surface: rgba(17,24,39,.70);
  --surface-solid:#111827;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --border: rgba(255,255,255,.10);
  --shadow: 0 12px 40px rgba(0,0,0,.35);
  --accent:#60a5fa;
  --accent-2:#34d399;
  --danger:#fb7185;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:var(--font);
  background: radial-gradient(1200px 800px at 20% 10%, rgba(37,99,235,.12), transparent 55%),
              radial-gradient(900px 600px at 80% 0%, rgba(34,197,94,.10), transparent 60%),
              var(--bg);
  color:var(--text);
}

a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}

.container{
  width: 100%;
  max-width: 1600px;   /* estetyczny limit */
  margin: 18px auto;   /* wyśrodkowanie */
  padding: 0 18px;
}

.shell{
  display:grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
}

.sidebar, .card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.sidebar{
  padding: 14px;
  position: sticky;
  top: 18px;
  height: calc(100vh - 36px);
}

.brand{
  display:flex; align-items:center; gap:10px;
  padding: 10px 10px 14px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.brand .dot{
  width:12px;height:12px;border-radius:999px;background:var(--accent);
  box-shadow: 0 0 0 4px rgba(37,99,235,.15);
}
.brand h1{font-size:16px;margin:0}
.brand p{margin:0;color:var(--muted);font-size:12px}

.nav a{
  display:flex; align-items:center; gap:10px;
  padding:10px 12px;
  border-radius: var(--radius-sm);
  color:var(--text);
}
.nav a:hover{background: rgba(0,0,0,.05)}
html[data-theme="dark"] .nav a:hover{background: rgba(255,255,255,.06)}
.nav a.active{
  background: rgba(37,99,235,.12);
  border: 1px solid rgba(37,99,235,.18);
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
}

.card{
  padding: 16px;
}

.h1{font-size:22px;margin:0 0 6px 0}
.p{margin:0;color:var(--muted);font-size:13px}

.btn{
  appearance:none;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 12px;
  cursor:pointer;
}
.btn:hover{filter:brightness(1.02)}
.btn.primary{
  background: var(--accent);
  border-color: rgba(0,0,0,.0);
  color: white;
}
.btn.danger{
  background: var(--danger);
  border-color: rgba(0,0,0,.0);
  color:white;
}

.input, select, textarea{
  width:100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
}

.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.table th, .table td{
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  text-align:left;
  font-size: 13px;
  vertical-align: top;
}
.table th{color:var(--muted); font-weight:600}

.badge{
  display:inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  background: rgba(0,0,0,.03);
}
html[data-theme="dark"] .badge{background: rgba(255,255,255,.06)}

.row-actions{
  display:flex; gap:8px; flex-wrap:wrap;
}

.notice{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(34,197,94,.10);
}
.notice.error{ background: rgba(239,68,68,.12); }

details summary::-webkit-details-marker { display:none; }
details summary::after{
  content:"▾";
  float:right;
  color: var(--muted);
}
details[open] summary::after{ content:"▴"; }

@media (max-width: 900px){
  .shell{grid-template-columns: 1fr}
  .sidebar{position:relative;height:auto}
}



@media (min-width: 1400px){
  .container{
    padding: 0 28px;
  }
}
