/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
:root {
  --bg: #eef1f5; --app: #ffffff; --panel: #ffffff; --panel2: #f8fafc;
  --fg: #0f172a; --fg2: #1e293b; --muted: #64748b; --muted2: #94a3b8;
  --border: #e9edf2; --border2: #f1f5f9;
  --primary: #2563eb; --primary-fg: #ffffff; --primary-soft: #eff4ff; --ring: #bfd4fe;
  --red: #ef4444; --red-bg: #fee2e2; --orange: #f97316; --orange-bg: #ffedd5;
  --teal: #0ea5a3; --teal-bg: #cdf5f2; --blue: #3b82f6; --blue-bg: #dbeafe;
  --green: #22c55e; --green-bg: #dcfce7; --amber: #f59e0b; --amber-bg: #fef3c7;
  --purple: #7c3aed; --purple-bg: #ede9fe;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 16px rgba(16, 24, 40, .06);
  --shadow2: 0 10px 30px rgba(16, 24, 40, .10);
}
:root[data-theme="dark"] {
  --bg: #0b1120; --app: #0f172a; --panel: #111a2e; --panel2: #0d1526;
  --fg: #f1f5f9; --fg2: #e2e8f0; --muted: #94a3b8; --muted2: #64748b;
  --border: #1e293b; --border2: #172033;
  --primary: #3b82f6; --primary-soft: #172554; --ring: #1d4ed8;
  --red-bg: #3f1d1d; --orange-bg: #3a2413; --teal-bg: #0e2e2c; --blue-bg: #172554;
  --green-bg: #14321f; --amber-bg: #3a2c10; --purple-bg: #24184a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 16px rgba(0, 0, 0, .4);
  --shadow2: 0 12px 34px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
html, body { padding: 0; margin: 0; }
body {
  background: var(--bg); color: var(--fg);
  font-family: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  letter-spacing: -0.03em; /* -3% tracking */
  -webkit-font-smoothing: antialiased; font-size: 14px;
}
button { font-family: inherit; }
svg { display: block; }

/* ---------- shell: sidebar + main ---------- */
.shell { max-width: 1400px; margin: 18px auto; background: var(--app); border-radius: 22px;
  box-shadow: var(--shadow2); display: grid; grid-template-columns: 236px 1fr; overflow: hidden;
  min-height: calc(100vh - 36px); }
.shell.collapsed { grid-template-columns: 74px 1fr; }

.sidebar { border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 20px 14px; gap: 6px; }
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; }
.side-brand .mark { width: 38px; height: 38px; border-radius: 11px; background: var(--primary); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 18px; flex: none; }
.side-brand b { font-size: 17px; letter-spacing: -.2px; }
.shell.collapsed .side-brand b, .shell.collapsed .side-item span, .shell.collapsed .side-cap { display: none; }
.side-cap { font-size: 11px; color: var(--muted2); text-transform: uppercase; letter-spacing: .1em; padding: 14px 10px 6px; }
.side-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  border: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer;
  width: 100%; text-align: left; transition: .12s; }
.side-item svg { flex: none; color: var(--muted2); }
.side-item:hover { background: var(--panel2); color: var(--fg2); }
.side-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.side-item.active svg { color: var(--primary); }
.side-item .plus { margin-left: auto; color: var(--muted2); font-size: 16px; line-height: 1; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid var(--border); }

/* ---------- main + topbar ---------- */
.main { display: flex; flex-direction: column; min-width: 0; background: var(--app); }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--border); }
.hamb { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel);
  color: var(--fg2); cursor: pointer; display: grid; place-items: center; flex: none; }
.hamb:hover { background: var(--panel2); }
.search { display: flex; align-items: center; gap: 9px; background: var(--panel2); border: 1px solid var(--border);
  border-radius: 10px; padding: 0 12px; height: 40px; flex: 1 1; max-width: 360px; color: var(--muted); }
.search input { border: 0; background: transparent; outline: none; font: inherit; color: var(--fg); flex: 1 1; font-size: 14px; }
.topbar .sp { flex: 1 1; }
.btn { border: 0; border-radius: 10px; height: 40px; padding: 0 16px; font-weight: 600; font-size: 14px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; }
.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 6px 14px rgba(37, 99, 235, .22); }
.btn.primary:hover { background: #1d4ed8; }
.btn.primary:disabled { opacity: .7; cursor: default; }
.iconbtn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel);
  color: var(--fg2); cursor: pointer; display: grid; place-items: center; flex: none; }
.iconbtn:hover { background: var(--panel2); }
.userchip { display: flex; align-items: center; gap: 9px; padding: 4px 6px 4px 4px; }
.userchip .av { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-weight: 700; flex: none; }
.userchip .nm { font-size: 13px; font-weight: 600; line-height: 1.2; }
.userchip .rl { font-size: 11px; color: var(--muted2); }

.content { padding: 22px; display: flex; flex-direction: column; gap: 18px; background: var(--panel2); flex: 1 1; }
.h2 { margin: 0; font-size: 16px; font-weight: 600; }
.muted { color: var(--muted); }

/* ---------- stat cards ---------- */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); grid-gap: 16px; gap: 16px; }
.statcard { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-card); }
.stat-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px; }
.stat-ico.red { background: var(--red-bg); color: var(--red); }
.stat-ico.orange { background: var(--orange-bg); color: var(--orange); }
.stat-ico.teal { background: var(--teal-bg); color: var(--teal); }
.stat-ico.blue { background: var(--blue-bg); color: var(--blue); }
.stat-ico.green { background: var(--green-bg); color: var(--green); }
.stat-ico.amber { background: var(--amber-bg); color: var(--amber); }
.stat-lbl { color: var(--muted); font-size: 13px; }
.stat-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 3px; }
.stat-num { font-size: 24px; font-weight: 700; letter-spacing: -.5px; }

/* ---------- panels ---------- */
.panels2 { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 16px; gap: 16px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-card); }
.phead { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.phead .sp { flex: 1 1; }
.chip { border: 1px solid var(--border); background: var(--panel2); color: var(--muted); font-size: 12px;
  font-weight: 600; border-radius: 9px; padding: 7px 11px; display: inline-flex; align-items: center; gap: 6px; }
.dots { color: var(--muted2); cursor: default; font-weight: 700; letter-spacing: 1px; }

/* ---------- charts ---------- */
canvas { width: 100%; height: 270px; display: block; }
.legend { display: flex; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 230px; padding-top: 10px; }
.bars .bar { flex: 1 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bars .bar .col { width: 100%; max-width: 46px; border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #3b82f6, #93c5fd); }
.bars .bar .n { font-size: 12px; font-weight: 700; }
.bars .bar .x { font-size: 11px; color: var(--muted); }

/* ---------- tabela ---------- */
.tblwrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 12px; }
.tbl td { padding: 11px 12px; border-top: 1px solid var(--border2); font-size: 13.5px; vertical-align: middle; }
.tbl tr:first-child td { border-top: 1px solid var(--border); }
.tbl .mono { font-weight: 600; }
.tbl .sub { color: var(--muted); font-size: 12px; margin-top: 1px; }
.tbl .g { color: var(--green); font-weight: 600; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dotico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px;
  color: #fff; flex: none; font-weight: 600; }
.acts { display: flex; gap: 7px; }
.pwcell { display: flex; align-items: center; gap: 6px; }
.pwcell .pw { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; min-width: 78px; color: var(--fg2); }
.pwcell .actbtn { width: 28px; height: 28px; }
.actbtn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel);
  color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.actbtn:hover { color: var(--primary); border-color: var(--ring); }
.actbtn.danger:hover { color: var(--red); border-color: #fca5a5; }
.tfoot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; color: var(--muted); font-size: 13px; }

/* ---------- lista (Doctors List → konta) ---------- */
.dlist { display: flex; flex-direction: column; }
.drow { display: flex; align-items: center; gap: 11px; padding: 11px 4px; border-top: 1px solid var(--border2); }
.drow:first-child { border-top: none; }
.drow .nm { font-weight: 600; font-size: 13.5px; }
.drow .sub { color: var(--muted); font-size: 11.5px; }
.drow .st { margin-left: auto; }

/* ---------- badge ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { color: var(--green); background: var(--green-bg); }
.badge.warn { color: var(--amber); background: var(--amber-bg); }
.badge.err { color: var(--red); background: var(--red-bg); }
.badge.off { color: var(--muted); background: var(--panel2); }

/* ---------- lista Postęp ---------- */
.instools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.seg { display: flex; gap: 2px; background: var(--panel2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12px;
  font-weight: 600; padding: 6px 12px; border-radius: 7px; cursor: pointer; }
.seg button.on { background: var(--primary); color: #fff; }
.segcap { color: var(--muted2); font-size: 12px; font-weight: 600; margin-left: 4px; }
.cnt { color: var(--muted); font-size: 12px; }
.inslist { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; max-height: 60vh; overflow-y: auto; }
.irow { display: grid; grid-template-columns: minmax(0, 1.6fr) 90px minmax(130px, 1.4fr) 90px 66px 92px;
  align-items: center; grid-gap: 12px; gap: 12px; padding: 9px 14px; border-top: 1px solid var(--border2); font-size: 13px; }
.irow:first-child { border-top: none; }
.irow:not(.ihdr):hover { background: var(--panel2); }
.irow .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.irow .pts { font-weight: 700; font-size: 15px; }
.irow .pts small { font-size: 10px; color: var(--muted); font-weight: 600; margin-left: 3px; }
.irow .strk { display: flex; align-items: center; gap: 9px; }
.progress { height: 6px; background: var(--border); border-radius: 6px; overflow: hidden; flex: 1 1; }
.progress > i { display: block; height: 100%; border-radius: 6px; }
.irow .strk .val { color: var(--muted); font-size: 11px; flex: none; min-width: 36px; text-align: right; }
.irow .mut { color: var(--muted); font-size: 12px; }
.irow .mut b { color: var(--fg); font-weight: 600; }
.irow .st { justify-self: end; }
.ihdr { position: -webkit-sticky; position: sticky; top: 0; z-index: 1; background: var(--panel); color: var(--muted); font-size: 11px;
  font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.insmore { text-align: center; padding: 12px; color: var(--primary); font-weight: 600; font-size: 13px;
  cursor: pointer; border: 0; background: none; width: 100%; border-top: 1px solid var(--border2); }
.insmore:hover { background: var(--panel2); }

/* ---------- formularze ---------- */
.addform { display: flex; gap: 9px; flex-wrap: wrap; }
.addform input, .addform textarea { flex: 1 1; min-width: 150px; font: inherit; background: var(--panel2);
  color: var(--fg); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; font-size: 14px; }
.addform input:focus, .addform textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }

/* ---------- misc ---------- */
.empty { color: var(--muted); text-align: center; padding: 42px 10px; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 60; background: var(--fg);
  color: var(--app); border-radius: 11px; padding: 12px 18px; box-shadow: var(--shadow2); font-size: 13.5px; max-width: 90vw; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-top-color: transparent;
  border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- animacje przejścia ---------- */
@keyframes viewFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.viewfade { display: flex; flex-direction: column; gap: 18px; animation: viewFade .28s ease both; }
.shell { transition: grid-template-columns .22s ease; }
.statcard { transition: transform .18s ease, box-shadow .18s ease; }
.statcard:hover { transform: translateY(-3px); box-shadow: var(--shadow2); }
.panel { transition: box-shadow .18s ease; }
.btn, .iconbtn, .actbtn, .hamb, .side-item, .seg button, .chip, .insmore { transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .12s ease; }
.btn:active, .iconbtn:active, .actbtn:active, .hamb:active { transform: scale(.95); }
.irow, .drow, .tbl tbody tr { transition: background-color .13s ease; }
.tbl tbody tr:hover { background: var(--panel2); }
.toast { animation: toastIn .2s ease both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* ---------- panel bota (telefon) ---------- */
.botgrid { display: grid; grid-template-columns: repeat(4, 1fr); grid-gap: 12px; gap: 12px; margin-top: 4px; }
.botstat { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; }
.botstat .stat-ico { width: 38px; height: 38px; margin-bottom: 0; flex: none; }
.botstat-body { min-width: 0; }
.botstat-val { font-size: 17px; font-weight: 700; line-height: 1.2; }
.botstat-val small { font-size: 11px; font-weight: 500; color: var(--muted); }
.botacts { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.logbox { margin: 4px 0 0; background: #0b1020; color: #cdd6f4; border-radius: 10px; padding: 12px 14px;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word;
  max-height: 420px; overflow: auto; border: 1px solid var(--border); }
[data-theme="dark"] .logbox { background: #05070f; }
.badge.off.mono { font-family: ui-monospace, Menlo, monospace; font-size: 11px; }

@media (max-width: 1000px) {
  .grid4 { grid-template-columns: 1fr 1fr; }
  .panels2 { grid-template-columns: 1fr; }
  .botgrid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .shell { grid-template-columns: 74px 1fr; }
  .side-brand b, .side-item span, .side-cap { display: none; }
  .grid4 { grid-template-columns: 1fr 1fr; }
  .irow { grid-template-columns: minmax(0, 1.5fr) 74px minmax(90px, 1fr) auto; }
  .irow .gnd, .irow .dni { display: none; }
}

