/* ============ GASTRO PANEL — DARK "WOW" THEME ============ */
:root {
  --bg: #0a0c12;
  --bg2: #0e1220;
  --card: rgba(22, 27, 43, .82);
  --card-solid: #141a2c;
  --ink: #eef1f8;
  --mut: #8b93b0;
  --line: rgba(255, 255, 255, .08);
  --brand: #ff6b1a;
  --brand2: #ffb347;
  --brand-d: #d14e05;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --blue: #60a5fa;
  --r: 16px;
  --glow: 0 0 24px rgba(255, 107, 26, .35);
  --shadow: 0 18px 50px rgba(0, 0, 0, .5);
}
* { box-sizing: border-box; }
html { scrollbar-color: #2b3350 var(--bg); }
::selection { background: rgba(255, 107, 26, .4); }
body {
  margin: 0; color: var(--ink);
  font: 14px/1.55 "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}
/* tło: poświata + siatka */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(900px 500px at 12% -5%, rgba(255, 107, 26, .14), transparent 60%),
    radial-gradient(800px 500px at 95% 10%, rgba(139, 92, 246, .13), transparent 60%),
    radial-gradient(700px 600px at 50% 110%, rgba(34, 211, 238, .08), transparent 60%),
    var(--bg);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
}
a { color: var(--brand2); text-decoration: none; }
a:hover { text-decoration: underline; }
.app { display: flex; min-height: 100vh; }

/* ---------- sidebar ---------- */
.side {
  width: 232px; padding: 20px 14px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 5px;
  background: linear-gradient(180deg, rgba(20, 25, 44, .92), rgba(12, 15, 28, .94));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(14px);
  animation: slideIn .5s cubic-bezier(.2, .8, .2, 1);
}
.logo { font-size: 20px; font-weight: 800; padding: 4px 10px 16px; letter-spacing: -.02em; }
.logo span {
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav a {
  display: flex; gap: 11px; align-items: center;
  color: #b9c0d8; text-decoration: none;
  padding: 10px 12px; border-radius: 11px; font-weight: 600;
  border: 1px solid transparent;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.nav a:hover { background: rgba(255, 255, 255, .06); transform: translateX(4px); color: #fff; text-decoration: none; }
.nav a.on {
  background: linear-gradient(90deg, rgba(255, 107, 26, .22), rgba(255, 107, 26, .08));
  border-color: rgba(255, 107, 26, .45);
  color: #fff; box-shadow: var(--glow);
}
.nav .ico { width: 22px; text-align: center; filter: drop-shadow(0 0 6px rgba(255, 107, 26, .5)); }
.who {
  margin-top: auto; background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line); border-radius: 12px; padding: 11px; font-size: 12px; color: var(--mut);
}
.who b { display: block; font-size: 13px; color: var(--ink); }
.who button { margin-top: 9px; width: 100%; }

/* ---------- main ---------- */
.main { flex: 1; padding: 26px 30px; max-width: 1320px; animation: pageIn .45s cubic-bezier(.2, .8, .2, 1); }
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.top h1 {
  font-size: 24px; margin: 0; letter-spacing: -.02em;
  background: linear-gradient(90deg, #fff, #ffc79a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.top .sub { color: var(--mut); }
.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .g4, .g3 { grid-template-columns: 1fr 1fr; } .g2 { grid-template-columns: 1fr; } .side { display: none; } }

/* ---------- karty ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  animation: rise .55s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: var(--d, 0s);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-2px); border-color: rgba(255, 107, 26, .3); box-shadow: var(--shadow), 0 0 0 1px rgba(255,107,26,.12); }
.card h3 { margin: 0 0 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--mut); }
.kpi .n {
  font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1;
  background: linear-gradient(90deg, #fff, var(--brand2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.kpi .l { color: var(--mut); font-size: 13px; }

/* ---------- formularze i przyciski ---------- */
input, select, textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px;
  font: inherit; width: 100%; background: rgba(0, 0, 0, .35); color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 107, 26, .25);
}
select option { background: #141a2c; }
label { font-size: 12px; font-weight: 700; color: var(--mut); display: block; margin-bottom: 4px; }
.btn {
  position: relative; overflow: hidden;
  border: 0; border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 700;
  cursor: pointer; color: #fff;
  background: linear-gradient(135deg, var(--brand), #f43f5e);
  box-shadow: 0 8px 24px rgba(255, 107, 26, .35);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px) scale(1.015); filter: brightness(1.1); box-shadow: 0 10px 30px rgba(255, 107, 26, .5); }
.btn:active { transform: translateY(0) scale(.99); }
.btn::after {
  content: ""; position: absolute; top: 0; left: -70%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg); transition: left .5s ease;
}
.btn:hover::after { left: 130%; }
.btn.ghost { background: rgba(255, 255, 255, .06); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); box-shadow: none; }
.btn.green { background: linear-gradient(135deg, #059669, #34d399); box-shadow: 0 8px 24px rgba(52, 211, 153, .3); }
.btn.red { background: linear-gradient(135deg, #dc2626, #f87171); box-shadow: 0 8px 24px rgba(248, 113, 113, .3); }
.btn.sm { padding: 6px 11px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input, .toolbar select { width: auto; min-width: 140px; }

/* ---------- tabele ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 11px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--mut); }
tbody tr { animation: fadeSlide .4s ease both; transition: background .15s ease; }
tbody tr:hover td { background: rgba(255, 107, 26, .07); }
.score {
  display: inline-block; min-width: 36px; text-align: center; font-weight: 800;
  border-radius: 20px; padding: 3px 9px; font-size: 12px;
  background: rgba(251, 191, 36, .15); color: var(--amber);
  border: 1px solid rgba(251, 191, 36, .35);
}
.score.hi { background: rgba(52, 211, 153, .14); color: var(--green); border-color: rgba(52, 211, 153, .4); box-shadow: 0 0 12px rgba(52, 211, 153, .25); }
.score.lo { background: rgba(255, 255, 255, .06); color: var(--mut); border-color: var(--line); }

/* ---------- badże ---------- */
.bdg {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700; border: 1px solid transparent;
  animation: pop .3s ease both;
}
.b-new { background: rgba(96, 165, 250, .15); color: #93c5fd; border-color: rgba(96, 165, 250, .4); }
.b-call { background: rgba(251, 191, 36, .13); color: var(--amber); border-color: rgba(251, 191, 36, .35); }
.b-callback { background: rgba(255, 107, 26, .14); color: #fdba74; border-color: rgba(255, 107, 26, .4); }
.b-interested { background: rgba(251, 113, 133, .14); color: #fda4af; border-color: rgba(251, 113, 133, .45); box-shadow: 0 0 12px rgba(251, 113, 133, .18); }
.b-demo { background: rgba(34, 211, 238, .13); color: #67e8f9; border-color: rgba(34, 211, 238, .35); }
.b-negoc { background: rgba(139, 92, 246, .15); color: #c4b5fd; border-color: rgba(139, 92, 246, .4); }
.b-won {
  background: rgba(52, 211, 153, .15); color: var(--green); border-color: rgba(52, 211, 153, .45);
  box-shadow: 0 0 14px rgba(52, 211, 153, .3); animation: pop .3s ease both, glowPulse 2.2s ease-in-out infinite;
}
.b-lost { background: rgba(255, 255, 255, .06); color: var(--mut); border-color: var(--line); }
.b-fresh { background: rgba(52, 211, 153, .15); color: var(--green); border-color: rgba(52, 211, 153, .4); }
.b-ver { background: rgba(52, 211, 153, .15); color: var(--green); border-color: rgba(52, 211, 153, .4); }
.b-unc { background: rgba(251, 191, 36, .13); color: var(--amber); border-color: rgba(251, 191, 36, .35); }
.b-bnc { background: rgba(248, 113, 113, .13); color: var(--red); border-color: rgba(248, 113, 113, .4); }
.b-nowww { background: rgba(255, 107, 26, .14); color: #fdba74; border-color: rgba(255, 107, 26, .4); }

/* ---------- dialer ---------- */
.dial { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }
@media (max-width: 1000px) { .dial { grid-template-columns: 1fr; } }
.bigphone { font-size: 28px; font-weight: 800; letter-spacing: .02em; }
.bigphone a { color: #fff; text-decoration: none; text-shadow: 0 0 22px rgba(255, 107, 26, .55); transition: text-shadow .2s ease; }
.bigphone a:hover { text-shadow: 0 0 34px rgba(255, 107, 26, .9); text-decoration: none; animation: ringPulse 1s ease-in-out infinite; }
.callbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.hist { max-height: 320px; overflow: auto; list-style: none; padding: 0; margin: 0; }
.hist li {
  margin-bottom: 8px; font-size: 13px; padding: 8px 10px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 10px;
  animation: fadeSlide .35s ease both;
}

/* ---------- agent (czat w dialerze) ---------- */
.agentcard { display: flex; flex-direction: column; max-height: calc(100vh - 170px); min-height: 480px; }
.agentcard h3 { display: flex; align-items: center; gap: 8px; }
.agentbox { flex: 1; min-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 10px 8px; }
.arow { display: flex; gap: 8px; align-items: flex-end; animation: fadeSlide .25s ease both; }
.arow.user { justify-content: flex-end; }
.arow.assistant { justify-content: flex-start; }
.avatar { width: 30px; height: 30px; flex: 0 0 30px; display: flex; align-items: center; justify-content: center; font-size: 17px; background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 50%; }
.arow.user .avatar { background: rgba(255, 107, 26, .18); border-color: rgba(255, 107, 26, .5); }
.arow.assistant .avatar { background: rgba(139, 92, 246, .18); border-color: rgba(139, 92, 246, .5); }
.amsg { position: relative; max-width: 82%; padding: 10px 14px 8px; border-radius: 16px; font-size: 13px; line-height: 1.55; white-space: pre-wrap; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.amsg::after { content: ""; position: absolute; bottom: 0; width: 0; height: 0; border: 7px solid transparent; }
.ahead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.aname { font-size: 10px; text-transform: uppercase; letter-spacing: .09em; font-weight: 800; }
.ameta { display: flex; align-items: center; gap: 6px; }
.atime { font-size: 10px; opacity: .55; font-variant-numeric: tabular-nums; }
.copyb { display: none; font-size: 11px; line-height: 1; padding: 3px 7px; border-radius: 8px; cursor: pointer; color: #c4b5fd; background: rgba(139,92,246,.15); border: 1px solid rgba(139,92,246,.45); }
.amsg.assistant:hover .copyb { display: inline-block; }
.copyb:hover { background: rgba(139,92,246,.35); }
.abody { overflow-wrap: anywhere; }
.abody p { margin: 0 0 6px; }
.abody p:last-child { margin-bottom: 0; }
.abody strong { font-weight: 800; }
.amsg.assistant .abody strong { color: #fff; font-weight: 800; }
.saylabel { font-size: 10px; text-transform: uppercase; letter-spacing: .09em; color: #b7a8ee; font-weight: 800; margin: 8px 0 4px; }
.saylabel:first-child { margin-top: 0; }
.saycard { color: #1c1838; font-weight: 600; background: linear-gradient(135deg, #f2edff, #d9cdfc); padding: 10px 13px; border-radius: 12px; margin: 0 0 8px; border-left: 4px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,.35); line-height: 1.55; }
.amsg.assistant .abody em { color: #e9e2ff; }
.abody code { font-family: Consolas, monospace; font-size: 12px; background: rgba(0,0,0,.4); padding: 1px 6px; border-radius: 6px; }
.abody ul, .abody ol { margin: 4px 0 8px; padding-left: 20px; }
.abody li { margin-bottom: 3px; }
.abody li::marker { color: #c4b5fd; font-weight: 700; }
.abody .mdh { font-weight: 800; font-size: 13px; margin: 8px 0 5px; color: #fff; }
.abody .mdh:first-child { margin-top: 0; }
.abody .mdq { border-left: 3px solid rgba(167,139,250,.7); padding: 4px 10px; margin: 6px 0; background: rgba(139,92,246,.12); border-radius: 0 8px 8px 0; font-style: italic; }
.amsg.user { background: linear-gradient(135deg, #c2571d, #8a3c12); border: 1px solid rgba(255, 150, 80, .5); border-bottom-right-radius: 5px; color: #fff7f0; }
.amsg.user::after { right: -7px; border-left-color: #8a3c12; border-right: 0; border-bottom: 0; }
.amsg.user .aname { color: #ffd9b8; }
.amsg.user .atime { color: #ffd9b8; }
.amsg.assistant { background: linear-gradient(135deg, #2b2350, #1c1838); border: 1px solid rgba(167, 139, 250, .55); border-bottom-left-radius: 5px; color: #f1ecff; box-shadow: 0 2px 14px rgba(139, 92, 246, .22); }
.amsg.assistant::after { left: -7px; border-right-color: #2b2350; border-left: 0; border-bottom: 0; }
.amsg.assistant .aname { color: #c4b5fd; }
.amsg.assistant .atime { color: #b7a8ee; }
.amsg.typing { display: flex; gap: 5px; align-items: center; padding: 13px 16px; }
.amsg.typing .dot { width: 7px; height: 7px; border-radius: 50%; background: #c4b5fd; animation: tblink 1.1s ease-in-out infinite; }
.amsg.typing .dot:nth-child(2) { animation-delay: .18s; }
.amsg.typing .dot:nth-child(3) { animation-delay: .36s; }
@keyframes tblink { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chips button { font-size: 12px; padding: 6px 12px; border-radius: 20px; cursor: pointer; color: #c4b5fd; background: rgba(139, 92, 246, .1); border: 1px solid rgba(139, 92, 246, .4); transition: all .15s ease; }
.chips button:hover { background: rgba(139, 92, 246, .25); transform: translateY(-1px); }
.fbform input { width: 100%; margin-bottom: 6px; }
.llist { display: flex; flex-direction: column; gap: 8px; }
.lrow { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 11px; font-size: 13px; }
.lrow .v { font-size: 17px; flex: 0 0 24px; text-align: center; }
.lrow .t { flex: 1; }
.lrow .t b { display: block; margin-bottom: 2px; }
.lrow .wr { white-space: nowrap; }
.ldel { flex: 0 0 auto; }

/* ---------- mailing ---------- */
.tabs { display: inline-flex; gap: 4px; margin-bottom: 14px; padding: 4px;
  background: rgba(0,0,0,.4); border: 1px solid var(--line); border-radius: 14px; }
.tab { position: relative; overflow: hidden; border: 0; border-radius: 10px; padding: 10px 22px;
  cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; letter-spacing: .02em;
  color: var(--mut); background: transparent; transition: all .2s ease; }
.tab:hover { color: var(--ink); background: rgba(255,255,255,.06); }
.tab.on { color: #fff; background: linear-gradient(135deg, var(--brand), #f43f5e);
  box-shadow: 0 6px 20px rgba(255, 107, 26, .4); }
.tab.on::after { content: ""; position: absolute; top: 0; left: -70%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); transition: left .5s ease; }
.tab.on:hover::after { left: 130%; }
/* ---------- skrzynka (inbox jak w kliencie poczty) ---------- */
.inbox { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 12px; align-items: start; }
@media (max-width: 1000px) { .inbox { grid-template-columns: 1fr; } }
.inbox-list { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.msg { padding: 12px 14px; background: rgba(255,255,255,.035); border: 1px solid var(--line);
  border-radius: 12px; cursor: pointer; transition: all .15s ease; animation: fadeSlide .25s ease both; }
.msg:hover { border-color: rgba(255,107,26,.45); transform: translateY(-1px); }
.msg.sel { border-color: var(--brand); box-shadow: var(--glow); background: rgba(255,107,26,.07); }
.msg.unread { border-left: 3px solid var(--brand); background: rgba(255,107,26,.05); }
.msg.unread .msubj { color: #fff; font-weight: 800; }
.mhead { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.mfrom { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtime { font-size: 11px; color: var(--mut); white-space: nowrap; }
.msubj { font-size: 13px; color: var(--ink); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msnip { font-size: 12px; color: var(--mut); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtags { margin-top: 6px; display: flex; gap: 6px; align-items: center; }
.inbox-view { min-height: 420px; position: sticky; top: 12px; }
.vhead { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.vava { width: 44px; height: 44px; flex: 0 0 44px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: #fff; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #f43f5e); box-shadow: 0 4px 14px rgba(255,107,26,.4); }
.vsubj { font-size: 16px; font-weight: 800; }
.vseg { display: inline-flex; gap: 4px; padding: 3px; background: rgba(0,0,0,.4);
  border: 1px solid var(--line); border-radius: 10px; flex: 0 0 auto; }
.vtab { border: 0; border-radius: 7px; padding: 6px 12px; cursor: pointer; font-size: 12px; font-weight: 700;
  color: var(--mut); background: transparent; }
.vtab.on { color: #fff; background: linear-gradient(135deg, var(--brand), #f43f5e); }
.vbody { background: #fff; border-radius: 12px; overflow: hidden; }
.vbody iframe { width: 100%; height: 420px; border: 0; background: #fff; display: block; }
.vtext { white-space: pre-wrap; color: #111; background: #fff; padding: 16px; max-height: 420px; overflow: auto; font-size: 13px; line-height: 1.6; }
.capbar { height: 7px; border-radius: 4px; background: rgba(255,255,255,.08); margin-top: 6px; overflow: hidden; }
.capbar div { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #34d399, #fbbf24 70%, #f87171); transition: width .4s ease; }
.pane textarea { width: 100%; }

/* ---------- kanban ---------- */
.board { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1400px) { .board { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.col { background: rgba(255, 255, 255, .035); border: 1px solid var(--line); border-radius: 14px; padding: 9px; min-height: 200px; max-height: calc(100vh - 220px); display: flex; flex-direction: column; min-width: 0; }
.col h4 { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--mut); display: flex; justify-content: space-between; align-items: center; gap: 4px; white-space: nowrap; }
.col h4 .cnt { background: rgba(255,107,26,.18); border: 1px solid rgba(255,107,26,.4); color: #fdba74; border-radius: 12px; padding: 0 8px; font-size: 11px; }
.cbody { overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.kcard .km { color: var(--mut); font-size: 12px; display: block; }
.kcard .mut { font-size: 11px; }
.kcard {
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border: 1px solid var(--line); border-radius: 11px; padding: 9px 11px; margin-bottom: 8px;
  cursor: grab; font-size: 13px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  animation: pop .3s ease both;
}
.kcard:hover { transform: translateY(-2px) rotate(-.4deg); border-color: rgba(255, 107, 26, .45); box-shadow: var(--glow); }
.kcard:active { cursor: grabbing; transform: scale(1.03); }
.kcard b { display: block; }

/* ---------- misc ---------- */
.mut { color: var(--mut); } .ok { color: var(--green); } .bad { color: var(--red); }
pre.log {
  background: rgba(0, 0, 0, .55); color: #fdba74;
  border: 1px solid var(--line); border-radius: 12px; padding: 13px;
  max-height: 260px; overflow: auto; font-size: 12px; font-family: Consolas, monospace;
}
.pager { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.segcheck { display: flex; gap: 8px; flex-wrap: wrap; }
.segcheck label {
  display: flex; gap: 6px; align-items: center; cursor: pointer;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
  border-radius: 20px; padding: 7px 13px; font-size: 13px; color: var(--ink);
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.segcheck label:hover { border-color: rgba(255, 107, 26, .5); transform: translateY(-1px); }
.segcheck label:has(input:checked) {
  border-color: var(--brand); background: rgba(255, 107, 26, .12);
  box-shadow: 0 0 14px rgba(255, 107, 26, .25);
}
.segcheck input { width: auto; accent-color: var(--brand); }

/* ---------- login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px; position: relative; overflow: hidden;
}
.login-wrap::before, .login-wrap::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5;
  animation: drift 9s ease-in-out infinite alternate;
}
.login-wrap::before { width: 420px; height: 420px; background: rgba(255, 107, 26, .28); top: -120px; left: -100px; }
.login-wrap::after { width: 460px; height: 460px; background: rgba(139, 92, 246, .26); bottom: -140px; right: -110px; animation-delay: -4s; }
.login-box {
  position: relative; z-index: 1; width: 380px;
  background: rgba(20, 26, 44, .9); border-radius: 20px; padding: 30px;
  border: 1px solid rgba(255, 107, 26, .3);
  box-shadow: var(--shadow), var(--glow);
  backdrop-filter: blur(16px);
  animation: rise .6s cubic-bezier(.2, .8, .2, 1) both;
}
.login-box h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.02em; }
.login-box h1 span {
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.err { background: rgba(248, 113, 113, .13); color: var(--red); border: 1px solid rgba(248,113,113,.4); border-radius: 10px; padding: 9px 11px; margin-top: 10px; display: none; }

/* ---------- progress ---------- */
.progress { height: 12px; background: rgba(255, 255, 255, .07); border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.progress i {
  display: block; height: 100%; width: 0; border-radius: 8px;
  background: linear-gradient(90deg, var(--brand), var(--brand2), var(--brand));
  background-size: 200% 100%;
  animation: barShift 1.6s linear infinite;
  box-shadow: 0 0 16px rgba(255, 107, 26, .6);
  transition: width .3s ease;
}

/* ---------- scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2b3350; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* ---------- karta kontaktu (szczegóły CEIDG) ---------- */
.cinfo { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; margin-top: 6px; font-size: 12.5px; }
.cinfo .k { color: var(--mut); font-weight: 600; }
.cinfo .v { color: var(--ink); }
.cinfo .full { grid-column: 1 / -1; }
.modal-bg {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .65); z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: pop .25s ease both; backdrop-filter: blur(4px);
}
.modal {
  width: 560px; max-width: 100%; max-height: 88vh; overflow: auto;
  background: var(--card-solid); border: 1px solid rgba(255, 107, 26, .35);
  border-radius: 18px; padding: 22px; box-shadow: var(--shadow), var(--glow);
  animation: rise .35s cubic-bezier(.2, .8, .2, 1) both;
}
.modal h2 { margin: 0 0 4px; font-size: 19px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 7px 12px; margin-top: 12px; font-size: 13.5px; }
.kv .k { color: var(--mut); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.kv .v { color: var(--ink); }

/* ---------- z kim rozmawiasz (karta dzwonienia) ---------- */
.callwith {
  font-size: 17px; padding: 10px 14px; margin: 8px 0;
  background: linear-gradient(135deg, rgba(255, 107, 26, .18), rgba(255, 170, 60, .08));
  border: 1px solid rgba(255, 107, 26, .45); border-radius: 12px;
  box-shadow: var(--glow);
}
.callwith b { color: var(--amber); font-size: 19px; }

/* ---------- keyframes ---------- */
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
@keyframes fadeSlide { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 10px rgba(52, 211, 153, .25); } 50% { box-shadow: 0 0 22px rgba(52, 211, 153, .55); } }
@keyframes ringPulse { 0%, 100% { text-shadow: 0 0 22px rgba(255, 107, 26, .55); } 50% { text-shadow: 0 0 40px rgba(255, 107, 26, .95); } }
@keyframes barShift { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(50px, 36px) scale(1.12); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
