/* ────────────────────────────────────────────────────────────────
   brandppoz — DEMO mockup CSS
   Replika tokenów admin2 (PayZO utility panel) wg DESIGN.md.
   Sidebar slate #0f172a, primary niebieski #277ABD, Inter, Bootstrap 5.3.3.
   Akcent PPOŻ (czerwień) tylko w brandzie sidebara i panelu klienta.
   ──────────────────────────────────────────────────────────────── */
:root {
  --mark: #277ABD;
  --mark-light: #A0D4FF;
  --mark-dark: #105A96;
  --bs-primary: #277ABD;
  --ppoz: #d32f2f;          /* akcent PPOŻ (brand klienta) */
  --ppoz-dark: #b71c1c;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f1f5f9;
  --card: #ffffff;
  --sidebar-bg: #0f172a;
  --sidebar-text: #b8c8d8;
}

* { box-sizing: border-box; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: .875rem;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  line-height: 1.5;
}
a { color: var(--mark); text-decoration: none; }
a:hover { color: var(--mark-dark); }

/* ── App shell ───────────────────────────────────────────── */
#sidebar {
  width: 260px; position: fixed; top: 0; left: 0; height: 100vh;
  background: var(--sidebar-bg); color: var(--sidebar-text);
  overflow-y: auto; z-index: 1040;
}
#main-wrapper { margin-left: 260px; min-height: 100vh; }
.top-navbar {
  height: 60px; background: #fff; border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem; position: sticky; top: 0; z-index: 1030;
}
.page-content { padding: 1.5rem; }

@media (max-width: 991.98px) {
  #sidebar { transform: translateX(-260px); transition: transform .2s; }
  body.sidebar-open #sidebar { transform: translateX(0); }
  #main-wrapper { margin-left: 0; }
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar-brand {
  display: flex; align-items: center; gap: .6rem;
  padding: 1rem 1.25rem; color: #fff; font-weight: 700; font-size: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand .logo {
  width: 34px; height: 34px; border-radius: 8px; flex: 0 0 34px;
  background: var(--ppoz); color: #fff; display: flex; align-items: center;
  justify-content: center; font-weight: 800;
}
.sidebar-brand small { display: block; font-weight: 400; font-size: .68rem; color: var(--sidebar-text); }
.sidebar-nav { padding: .5rem 0 2rem; }
.sidebar-section-label {
  padding: .9rem 1.25rem .35rem; font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: #64748b;
}
.sidebar-link {
  display: flex; align-items: center; gap: .65rem;
  padding: .5rem 1.25rem; color: var(--sidebar-text); font-size: .85rem;
}
.sidebar-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-link.active { background: rgba(255,255,255,.14); color: #fff; font-weight: 500; }
.sidebar-link .material-symbols-outlined { font-size: 1.2rem; }
.sidebar-link .tag {
  margin-left: auto; font-size: .6rem; padding: .1rem .4rem; border-radius: 4px;
  background: rgba(255,255,255,.1); color: #94a3b8; text-transform: uppercase; letter-spacing: .04em;
}
.sidebar-link .tag.core { background: rgba(39,122,189,.3); color: #bfdbfe; }
.sidebar-link .tag.addon { background: rgba(211,47,47,.25); color: #fca5a5; }

/* ── Page header ─────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem;
}
.page-header h1 { font-size: 1.35rem; font-weight: 700; margin: 0; }
.page-header h1 small { font-size: .85rem; font-weight: 400; color: var(--muted); }
.breadcrumb { font-size: .8rem; margin-bottom: .25rem; }

/* ── Cards ───────────────────────────────────────────────── */
.stat-card, .table-card, .forms_option {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px;
}
.stat-card { padding: 1.1rem 1.25rem; display: flex; align-items: center; gap: 1rem; }
.stat-card-icon {
  width: 46px; height: 46px; border-radius: 10px; flex: 0 0 46px;
  display: flex; align-items: center; justify-content: center;
}
.stat-card-icon.blue   { background: #eff6ff; color: #2563eb; }
.stat-card-icon.green  { background: #f0fdf4; color: #16a34a; }
.stat-card-icon.orange { background: #fff7ed; color: #ea580c; }
.stat-card-icon.red    { background: #fef2f2; color: #dc2626; }
.stat-card-icon.purple { background: #faf5ff; color: #7c3aed; }
.stat-card-value { font-size: 1.4rem; font-weight: 700; line-height: 1.1; }
.stat-card-label { font-size: .78rem; color: var(--muted); }

.table-card { overflow: hidden; }
.forms_option { padding: 1.5rem; margin-bottom: 1.25rem; }
.forms_option_text {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin-bottom: 1rem;
}

/* ── Tables ──────────────────────────────────────────────── */
.table-card .table { margin: 0; }
.table > thead th {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); background: #f8fafc;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { vertical-align: middle; }
.btn-action { padding: .2rem .4rem; line-height: 1; }
.btn-action .material-symbols-outlined { font-size: 1.05rem; }

/* ── Alerts ──────────────────────────────────────────────── */
.form_info { border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1rem; border-left: 4px solid; }
.form_info h2 { font-size: .95rem; font-weight: 700; margin: 0 0 .25rem; }
.form_info p { margin: 0; font-size: .85rem; }
.form_info.ok      { background: #f0fdf4; border-color: #22c55e; color: #166534; }
.form_info.error   { background: #fef2f2; border-color: #ef4444; color: #991b1b; }
.form_info.info    { background: #eff6ff; border-color: #3b82f6; color: #1d4ed8; }
.form_info.warning { background: #fffbeb; border-color: #f59e0b; color: #92400e; }

/* ── Action nav ──────────────────────────────────────────── */
.admin-nav {
  display: flex; gap: .25rem; background: #fff; border: 1px solid var(--border);
  border-radius: 8px; padding: .35rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.admin-nav .nav-link {
  display: flex; align-items: center; gap: .35rem; color: var(--text);
  padding: .4rem .8rem; border-radius: 6px; font-size: .82rem; cursor: pointer;
}
.admin-nav .nav-link:hover { background: var(--bg); color: var(--mark-dark); }
.admin-nav .nav-link .material-symbols-outlined { font-size: 1.1rem; }

/* ── Misc ────────────────────────────────────────────────── */
.material-symbols-outlined { vertical-align: middle; }
.badge-dim { background: #e2e8f0; color: #64748b; }
.text-muted { color: var(--muted) !important; }
.demo-note {
  background: #fffbeb; border: 1px dashed #f59e0b; color: #92400e;
  border-radius: 8px; padding: .6rem .9rem; font-size: .8rem; margin-bottom: 1.25rem;
}
.demo-note b { color: #78350f; }
.kanban-col { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: .75rem; }
.kanban-col h3 { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 .6rem; display: flex; align-items: center; justify-content: space-between; }
.kanban-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: .65rem .75rem; margin-bottom: .6rem; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.kanban-card .title { font-weight: 600; font-size: .85rem; }
.kanban-card .meta { font-size: .75rem; color: var(--muted); margin-top: .25rem; }
.sig-pad { border: 2px dashed #cbd5e1; border-radius: 8px; background: #fff; height: 160px; display: flex; align-items: center; justify-content: center; color: #94a3b8; position: relative; }
.sig-pad svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tree-row td { white-space: nowrap; }
.check-table td, .check-table th { font-size: .82rem; }
.client-shell .top-navbar { border-bottom: 3px solid var(--ppoz); }
.client-brand { font-weight: 800; color: var(--ppoz); display:flex; align-items:center; gap:.5rem; }
.client-brand .logo { width: 30px; height: 30px; border-radius: 7px; background: var(--ppoz); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:.85rem; }
.doc-folder { display:flex; align-items:center; gap:.5rem; padding:.6rem .9rem; border:1px solid var(--border); border-radius:8px; background:#fff; cursor:pointer; }
.doc-folder:hover { border-color: var(--mark); }
.doc-folder .material-symbols-outlined { color: #f59e0b; }
