/* Panel GLAMDO. Czcionka Poppins z plików lokalnych (public/fonts), bez zewnętrznych adresów. */
@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/poppins-700.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --bg: #f5f4fa;
  --card: #ffffff;
  --ink: #231d3a;
  --muted: #5f5a75;
  --border: #e7e4f2;
  --border-in: #d9d6e6;
  --side: #2a2350;
  --primary: #4a3e80;
  --primary-dark: #2a2350;
  --violet: #5b4ec9;
  --violet-soft: #ece9fb;
  --gold: #f2cd5c;
  --red: #b42318;
  --red-soft: #fee4e2;
  --green: #1f7a4a;
  --green-soft: #dcf5e3;
  --amber: #92400e;
  --amber-soft: #fef3c7;
  --blue: #1d5fa8;
  --blue-soft: #e8f1fb;
  --gold-soft: #fbf3d9;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px; line-height: 1.5; min-height: 100vh; overflow-x: hidden;
}
.hidden { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.red { color: var(--red); }
.num { text-align: right; }
.nowrap { white-space: nowrap; }
.break { word-break: break-word; }
.grow { flex: 1; }

/* --- Przyciski --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; background: #fff; text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-outline { background: #fff; border-color: var(--border-in); color: var(--ink); }
.btn-outline:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger-outline { background: #fff; border-color: #f1b4ae; color: var(--red); }
.btn-ghost-light { width: 100%; background: transparent; border-color: rgba(255, 255, 255, 0.28); color: #fff; min-height: 44px; }
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.1); }
.btn-small { min-height: 44px; padding: 6px 14px; margin-left: 8px; }
.btn-big { min-height: 52px; }

/* --- Pola formularza --- */
label { display: block; font-size: 13px; color: var(--muted); }
input[type="email"], input[type="password"], input[type="text"], input[type="date"], input[type="month"], select, textarea, .inp {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border-in); border-radius: 10px;
  background: #fff; color: var(--ink); font-size: 14px;
}
textarea { resize: vertical; min-height: 76px; margin-top: 8px; display: block; }
.inp { width: auto; }
.label-strong { font-weight: 600; font-size: 14px; color: var(--ink); margin-top: 16px; }

/* --- Ekrany logowania --- */
.auth-card {
  width: calc(100% - 32px); max-width: 400px; margin: 48px auto; background: var(--card);
  border: 1px solid var(--border); border-radius: 16px; padding: 0 28px 28px; overflow: hidden;
}
.auth-card.center { text-align: center; padding-top: 28px; }
.auth-brand { background: var(--side); margin: 0 -28px 24px; padding: 22px 28px; }
.auth-brand img { display: block; width: 118px; height: auto; }
.auth-card h2 { font-size: 18px; margin-bottom: 8px; }
.auth-card .hint { color: var(--muted); font-size: 13px; line-height: 1.5; margin-bottom: 4px; }
.auth-card label { margin: 14px 0 4px; }
.auth-card canvas { display: block; width: 200px; height: 200px; margin: 16px auto; image-rendering: pixelated; }
.auth-card code { display: block; padding: 10px; background: var(--bg); border-radius: 8px; font-size: 13px; word-break: break-all; user-select: all; }
.code-input { font-size: 18px !important; letter-spacing: 4px; text-align: center; }
.row-buttons { display: flex; gap: 8px; margin-top: 18px; }
.row-buttons .btn { flex: 1; }
.auth-error { color: var(--red); font-size: 13px; margin-top: 10px; min-height: 1em; }
.spinner { width: 28px; height: 28px; margin: 0 auto 16px; border: 3px solid var(--border); border-top-color: var(--violet); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Szkielet panelu --- */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); grid-template-areas: "side main"; min-height: 100vh; }
.topbar, .tabs-nav { display: none; }
.sidebar {
  grid-area: side; background: var(--side); padding: 28px 16px; display: flex; flex-direction: column; gap: 28px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.side-brand img { width: 118px; height: auto; display: block; }
.admin-tag { font-size: 11px; font-weight: 600; color: var(--side); background: var(--gold); border-radius: 6px; padding: 3px 7px; letter-spacing: 0.4px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { font-size: 11px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: #9a93c9; padding: 14px 14px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; min-height: 44px; border-radius: 10px;
  color: #d9d4f5; text-decoration: none; font-size: 14px; font-weight: 500;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav-link[aria-current="page"] { background: #fff; color: var(--side); font-weight: 600; }
.sidebar :focus-visible, .topbar :focus-visible { outline-color: var(--gold); }
.nav-link[aria-current="page"]:focus-visible { outline-color: var(--violet); }
.badge {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--gold); color: var(--side);
  font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.user-block { margin-top: auto; padding: 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); display: flex; flex-direction: column; gap: 12px; }
.user-row { display: flex; align-items: center; gap: 10px; }
.user-av { width: 36px; height: 36px; border-radius: 50%; background: var(--violet); color: #fff; font-weight: 600; display: flex; align-items: center; justify-content: center; flex: none; }
.user-text { flex: 1; min-width: 0; }
.user-mail { font-size: 12px; font-weight: 600; color: #fff; overflow-wrap: anywhere; }
.user-role { font-size: 12px; color: #c9c3ec; }
.main { grid-area: main; min-width: 0; padding: 32px 40px 48px; outline: none; }
.page { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.page-head { display: flex; flex-direction: column; gap: 4px; }
.page-head.row-between { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-title { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.2; }
.sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.h2 { font-size: 16px; font-weight: 600; color: var(--ink); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 22px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.row-end { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.row-center { display: flex; justify-content: center; padding: 14px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; align-items: center; }
.row-wrap .inp { flex: 1 1 200px; }
.state-msg { color: var(--muted); font-size: 13px; padding: 14px 4px; }
.state-msg.error, .status-msg.error { color: var(--red); }
.status-msg { font-size: 13px; margin-top: 10px; min-height: 1em; }
.status-msg.ok { color: var(--green); }
.inline-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* --- Pulpit --- */
.todo-error { background: var(--red-soft); }
.tone-gold { background: var(--gold-soft); color: #6b4e0e; }
.tone-violet { background: var(--violet-soft); color: var(--primary); }
.tone-red { background: var(--red-soft); color: var(--red); }
.tone-blue { background: var(--blue-soft); color: var(--blue); }
.tone-green { background: var(--green-soft); color: var(--green); }
.tone-text-green { color: var(--green); }
.tone-text-amber { color: var(--amber); }
.tone-text-violet { color: var(--violet); }
.tone-text-red { color: var(--red); }
.tone-bg-green { background: var(--green); }
.tone-bg-amber { background: #d97706; }
.tone-bg-violet { background: var(--violet); }

/* --- Dwie kolumny: lista i szczegóły --- */
.split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.split > :first-child { flex: 1 1 300px; max-width: 380px; min-width: 0; }
.split > :last-child { flex: 999 1 520px; min-width: 0; }
.queue, .case-list { display: flex; flex-direction: column; gap: 12px; }
.q-item, .it {
  display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 16px; cursor: pointer; color: var(--ink);
}
.it { padding: 14px 16px; }
.q-item.on, .it.on { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.q-top { display: flex; align-items: center; gap: 12px; }
.avatar, .avatar-lg {
  border-radius: 50%; color: #fff; font-weight: 600; display: flex; align-items: center; justify-content: center; flex: none;
  position: relative; overflow: hidden;
}
.avatar { width: 46px; height: 46px; }
.avatar-lg { width: 88px; height: 88px; font-size: 30px; box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--border); }
.avatar img, .avatar-lg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.q-name { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.q-name b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.q-name .muted { overflow-wrap: anywhere; }
.q-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.q-meta b { font-weight: 600; text-align: right; }
.q-bar { height: 6px; border-radius: 3px; background: #efedf6; margin-top: 8px; }
.q-bar-fill { height: 6px; border-radius: 3px; }
.it-top { display: flex; align-items: center; gap: 8px; }
.it-type { font-weight: 600; font-size: 14px; flex: 1; }
.it-who { font-size: 13px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.it-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.it-meta .pill { font-size: 11px; padding: 2px 8px; }
.it-bottom { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 12px; }
.sup { font-size: 11px; font-weight: 700; color: #5a430a; background: var(--gold); border-radius: 6px; padding: 2px 7px; white-space: nowrap; }

/* --- Szczegóły --- */
.detail { display: block; }
.detail-body { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.detail-head, .case-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.case-head { align-items: flex-start; justify-content: space-between; }
.detail-title, .case-head-main { flex: 1 1 220px; min-width: 0; }
.detail-name { font-size: 22px; font-weight: 700; overflow-wrap: anywhere; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.status-pill { font-size: 12px; font-weight: 600; color: var(--primary); background: var(--violet-soft); border-radius: 999px; padding: 2px 10px; }
.bio { margin-top: 8px; font-size: 14px; line-height: 1.6; color: #3d3850; white-space: pre-line; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.missing-list { font-size: 13px; color: var(--red); background: #fff6f5; border: 1px solid #f1b4ae; border-radius: 10px; padding: 10px 12px; }
.checks { margin-top: 8px; }
.chk { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 9px 0; border-top: 1px solid #f0eef5; }
.chk-ok, .chk-no { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.chk-ok { background: var(--green-soft); color: var(--green); }
.chk-no { background: var(--amber-soft); color: var(--amber); font-weight: 700; font-size: 13px; }
.chk-label { flex: 1; }
.chk-val { font-size: 13px; color: var(--muted); text-align: right; overflow-wrap: anywhere; max-width: 55%; }
.kv-grid { margin-top: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; background: #f7f6fb; border-radius: 12px; padding: 14px; }
.kv-field { min-width: 0; }
.kv-field.wide { grid-column: 1 / -1; }
.kv-label { font-size: 12px; color: var(--muted); }
.kv-value { font-size: 14px; font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; }
.timeline { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.tl-item { display: flex; gap: 10px; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; background: #9a90e8; margin-top: 7px; flex: none; }
.tl-item b { font-weight: 600; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 12px; }
.photo-tile { aspect-ratio: 1; border: 0; padding: 0; border-radius: 12px; overflow: hidden; background: var(--violet-soft); cursor: zoom-in; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; margin-top: 12px; }
.cert-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.cert-card .photo-grid { width: 100%; margin-top: 0; grid-template-columns: 1fr; }
.cert-card.is-hidden .photo-tile { opacity: 0.5; }
.cert-name { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; position: relative; margin-top: 10px; max-width: 100%; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; padding: 8px 10px 8px 0; white-space: nowrap; }
.tbl td { padding: 11px 10px 11px 0; border-top: 1px solid #f0eef5; vertical-align: top; }
.tbl th.num, .tbl td.num { text-align: right; padding-right: 0; }
.tbl th.num + th, .tbl td.num + td { padding-left: 18px; }
.tbl .group-row th { padding-top: 14px; color: var(--ink); font-size: 13px; }
.services-tbl { min-width: 420px; }
.services-tbl tr.inactive { opacity: 0.6; }
.s-desc { font-size: 13px; color: var(--muted); white-space: pre-wrap; }
.s-addons { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.hours-row { display: flex; justify-content: space-between; max-width: 300px; padding: 3px 0; font-size: 14px; }
.hours { margin-top: 8px; }
.reject-panel { border: 1px solid #f1b4ae; background: #fff6f5; border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.reject-panel .label-strong { margin-top: 0; }
.reject-panel textarea { margin-top: 0; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; }
.chip-btn { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 0 12px; min-height: 44px; font-size: 12px; cursor: pointer; }
.chip-btn:hover { border-color: var(--primary); }
.decision-bar { border-top: 1px solid var(--border); padding-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* --- Zgłoszenia --- */
.tabs-row { display: flex; flex-wrap: wrap; gap: 24px; border-bottom: 1px solid var(--border); }
.tab { background: transparent; border: 0; border-bottom: 3px solid transparent; padding: 12px 4px; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tab.on { color: var(--primary-dark); border-bottom-color: var(--violet); }
.cnt { display: inline-block; margin-left: 6px; font-size: 12px; background: var(--violet-soft); color: var(--primary); border-radius: 999px; padding: 2px 8px; }
.due-box { text-align: right; }
.due-val { font-size: 15px; font-weight: 700; color: var(--amber); }
.due-val.late { color: var(--red); }
.due-val.ok { color: var(--green); }
.party-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.party { border-radius: 12px; padding: 14px; display: flex; gap: 12px; min-width: 0; }
.party-icon { width: 36px; height: 36px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.party-text { display: flex; flex-direction: column; min-width: 0; }
.party-label { font-size: 12px; font-weight: 600; }
.party-name { font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; }
.party-sub { font-size: 13px; overflow-wrap: anywhere; }
.party-client { background: var(--blue-soft); }
.party-client .party-icon { background: var(--blue); }
.party-client .party-label { color: var(--blue); }
.party-client .party-sub { color: #3e4c5e; }
.party-stylist { background: #f1eefb; }
.party-stylist .party-icon { background: var(--primary); }
.party-stylist .party-label { color: var(--primary); }
.party-stylist .party-sub { color: #4b4760; }
.party-visit { background: var(--gold-soft); }
.party-visit .party-icon { background: #9a6b0a; }
.party-visit .party-label { color: #6b4e0e; }
.party-visit .party-sub { color: #5c4a1e; }
.entries { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.entry { display: flex; gap: 12px; }
.entry-av { width: 34px; height: 34px; border-radius: 50%; font-weight: 600; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; }
.entry-bubble { flex: 1; min-width: 0; background: #f7f6fb; border-radius: 12px; padding: 12px 14px; }
.entry-bubble.internal { background: #fffbef; border: 1px dashed #e9c46a; }
.entry-meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.entry-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.note-box { background: #f7f6fb; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.opts { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.opt { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border); background: #fff; border-radius: 12px; padding: 14px; cursor: pointer; text-align: left; font-size: 14px; width: 100%; min-height: 44px; }
.opt.on { border-color: var(--violet); background: #f7f5ff; }
.radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--violet); display: flex; align-items: center; justify-content: center; flex: none; margin-top: 2px; }
.radio-dot { width: 9px; height: 9px; border-radius: 50%; background: transparent; }
.opt.on .radio-dot { background: var(--violet); }
.opt-text { display: flex; flex-direction: column; font-size: 13px; }
.opt-text b { font-size: 14px; font-weight: 600; }
.supreme-block { border-top: 1px solid var(--border); padding-top: 16px; }
.history-item { padding: 8px 0; border-bottom: 1px solid #f0eef5; font-size: 13px; }

/* --- Finanse --- */
.banner { display: flex; align-items: center; gap: 12px; border-radius: 12px; padding: 14px 18px; font-size: 14px; flex-wrap: wrap; }
.banner svg { flex: none; }
.banner-ok { background: var(--green-soft); color: #14532d; }
.banner-bad { background: var(--red-soft); color: #7a1a12; }
.banner-warn { background: var(--amber-soft); color: var(--amber); }
.banner-text { flex: 1 1 240px; }
.banner-time { font-size: 12px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.tile { padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.tile-accent { border-color: #c5bff5; background: #f7f5ff; }
.tile-alert { border-color: #f1b4ae; background: #fff6f5; }
.tile-label { font-size: 13px; color: var(--muted); }
.tile-value { font-size: 24px; font-weight: 700; letter-spacing: -0.3px; overflow-wrap: anywhere; }
.tile-accent .tile-value { color: var(--primary); }
.tile-alert .tile-value { color: var(--red); }
.tile .sub { margin-top: 0; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.tone-pill-green { background: var(--green-soft); color: var(--green); }
.tone-pill-violet { background: var(--violet-soft); color: var(--primary); }
.tone-pill-red { background: var(--red-soft); color: var(--red); }
.tone-pill-amber { background: var(--amber-soft); color: var(--amber); }
.tone-pill-grey { background: #eceaf4; color: #4b4760; }
.tone-pill-blue { background: var(--blue-soft); color: var(--blue); }
.tone-pill-gold { background: var(--gold-soft); color: #6b4e0e; }

/* --- Dziennik --- */
.security-card { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px 20px; background: #f7f5ff; border-color: #e2ddfb; }
.sec-icon { width: 40px; height: 40px; border-radius: 10px; background: #fff; color: var(--primary); display: flex; align-items: center; justify-content: center; flex: none; }
.sec-text { flex: 1 1 260px; min-width: 0; }
.filters-bar { padding: 14px 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; border-bottom: 1px solid #efedf6; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; border-radius: 999px; padding: 0 14px; font-size: 13px; font-weight: 600; background: #fff; border: 1px solid var(--border-in); color: #4b4760; cursor: pointer; display: inline-flex; align-items: center; }
.chip.on { background: var(--side); border-color: var(--side); color: #fff; }
.card.flush .table-wrap { margin-top: 0; }
.audit-tbl { min-width: 860px; }
.audit-tbl th, .audit-tbl td { padding-left: 12px; }
.audit-tbl th:first-child, .audit-tbl td:first-child { padding-left: 20px; }
.audit-tbl th:last-child, .audit-tbl td:last-child { padding-right: 20px; }
.card.flush .state-msg { padding: 14px 20px; }

/* --- Okna --- */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal .box { background: #fff; border-radius: 14px; padding: 24px; width: 100%; max-width: 460px; }
.modal h3 { font-size: 16px; margin-bottom: 4px; }
.modal .hint { color: var(--muted); font-size: 13px; }
.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.85); z-index: 50; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 94vw; max-height: 88vh; border-radius: 8px; }
.lightbox button { position: absolute; top: 14px; right: 14px; }

/* --- Tablet --- */
@media (max-width: 1100px) {
  .shell { grid-template-columns: 220px minmax(0, 1fr); }
  .main { padding: 28px 24px 40px; }
}

/* --- Telefon: górny pasek z logo i kontem, przewijane zakładki --- */
@media (max-width: 820px) {
  .shell { display: block; }
  .sidebar { display: none; }
  .topbar { display: flex; align-items: center; gap: 10px; background: var(--side); padding: 14px 16px; position: relative; }
  .topbar-logo { width: 96px; height: auto; display: block; }
  .topbar .admin-tag { font-size: 10px; padding: 2px 6px; border-radius: 5px; }
  .account-btn { margin-left: auto; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--violet); color: #fff; font-weight: 600; cursor: pointer; }
  .account-menu {
    position: absolute; right: 12px; top: 66px; width: min(250px, calc(100vw - 24px)); background: #fff; border: 1px solid var(--border);
    border-radius: 14px; box-shadow: 0 12px 32px rgba(42, 35, 80, 0.18); padding: 14px; z-index: 20; display: flex; flex-direction: column; gap: 12px;
  }
  .account-menu-who { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
  .account-menu-who b { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
  .tabs-nav { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; -webkit-overflow-scrolling: touch; }
  .tab-chip {
    flex: none; min-height: 44px; border-radius: 999px; padding: 0 14px; font-size: 13px; font-weight: 600; background: #fff;
    border: 1px solid var(--border); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap;
  }
  .tab-chip[aria-current="page"] { background: var(--side); border-color: var(--side); color: #fff; }
  .tab-chip .badge { margin-left: 0; min-width: 20px; height: 20px; font-size: 11px; padding: 0 6px; }
  .main { padding: 4px 16px 32px; }
  .page-title { font-size: 24px; }
  .card { padding: 16px; }
  .split > :first-child { max-width: none; flex-basis: 100%; }
  .kv-grid { grid-template-columns: 1fr; }
  .services-tbl { min-width: 0; }
  .decision-bar { grid-template-columns: 1fr; }
  .detail-name { font-size: 19px; }
  .tabs-row { gap: 16px; }
  .chk-val { max-width: 50%; }
  .filters-bar { padding: 12px 16px; }
  .auth-card { margin: 24px auto; }
}

/* --- Wyszukiwarka w nagłówku --- */
.main-col { grid-area: main; min-width: 0; }
.main-col .main { padding-top: 20px; }
.gsearch { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 28px 40px 0; max-width: 780px; }
.gsearch-field { position: relative; flex: 1 1 auto; display: block; }
.gsearch-msg { flex: 1 1 100%; font-size: 13px; color: var(--red); }
.gsearch-msg:empty { display: none; }
.gsearch-icon { position: absolute; left: 14px; top: 13px; color: #6b6880; pointer-events: none; display: flex; }
.gsearch-field input { width: 100%; min-height: 46px; padding: 10px 14px 10px 42px; border: 1px solid var(--border-in); border-radius: 12px; background: #fff; font-size: 14px; }

/* --- Listy kont: stylistki i klientki --- */
.card.flush { padding: 0; overflow: hidden; }
.chips-bar { border-bottom: 1px solid #efedf6; }
.filters-bar .grow { flex: 1 1 260px; min-width: 0; }
.filters-bar .inp { max-width: 100%; }
.filters-bar .city-inp { flex: 0 1 190px; min-width: 140px; }
.page > .status-msg:empty { display: none; }
.chip-n { margin-left: 6px; opacity: 0.7; font-weight: 500; }
.list-tbl { min-width: 900px; }
.rez-tbl { min-width: 1080px; }
.list-tbl th, .list-tbl td { padding: 12px 10px; vertical-align: middle; }
.list-tbl th:first-child, .list-tbl td:first-child { padding-left: 20px; }
.list-tbl th:last-child, .list-tbl td:last-child { padding-right: 20px; }
.list-tbl tbody tr:hover { background: #faf9fd; }
.row-click { cursor: pointer; }
.row-actions { text-align: right; white-space: nowrap; }
.btn-mini { min-height: 44px; padding: 6px 12px; font-size: 13px; }
.avatar.sm { width: 40px; height: 40px; font-size: 14px; }
.who-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; min-height: 44px; }
.who-link:hover { color: var(--primary); }
.who-text { display: flex; flex-direction: column; min-width: 0; }
.who-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; overflow-wrap: anywhere; }
.list-foot { padding: 14px 20px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid #efedf6; font-size: 13px; }
.list-foot:empty { display: none; }
.chip:disabled { opacity: 0.5; cursor: default; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.search-hits { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.search-hit { padding: 6px 8px; border-radius: 10px; }
.search-hit:hover { background: #faf9fd; }

/* --- Profil konta --- */
.back-link { font-size: 14px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.prof-head { display: flex; flex-direction: column; gap: 20px; }
.prof-id { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.prof-title { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; border-top: 1px solid #efedf6; padding-top: 16px; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; overflow-wrap: anywhere; }
.stat-sub { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.prof-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.prof-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.prof-aside { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.prof-tabs { gap: 20px; overflow-x: auto; flex-wrap: nowrap; }
.prof-tabs .tab { white-space: nowrap; }
.side-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.side-actions .btn { width: 100%; }
.prof-aside textarea { margin-top: 10px; }
.danger-zone { border-color: #f1b4ae; }
.block-info { border-color: #f1b4ae; background: #fff6f5; }
.consents { margin-top: 8px; }
.consent-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 9px 0; border-top: 1px solid #f0eef5; font-size: 14px; }
.case-links { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.case-link { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--ink); min-height: 44px; }
.case-link:hover { border-color: var(--violet); }
.case-link-text { display: flex; flex-direction: column; flex: 1 1 200px; min-width: 0; }
.case-link-open { font-size: 13px; font-weight: 600; color: var(--primary); }
.bookings-tbl { min-width: 560px; }
.area { margin-top: 8px; font-size: 14px; }
.party-link { color: inherit; text-decoration: underline; }
.banner-warn .btn { flex: none; }

/* --- Okna dialogowe akcji --- */
.modal.dlg { overflow-y: auto; align-items: flex-start; }
.dlg-box { margin: auto; }
.dlg-box.wide { max-width: 620px; }
.dlg-body { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.dlg-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; padding: 12px; border-radius: 10px; background: #fff4e5; font-size: 14px; }
.dlg-ask span { flex: 1 1 100%; }
.dlg-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.dlg-field { display: flex; flex-direction: column; gap: 6px; }
.dlg-field .label-strong { margin-top: 0; }
.dlg-field textarea { margin-top: 0; }
.dlg-text { font-size: 14px; line-height: 1.55; }
.dlg-h { font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.impact { margin: 6px 0 0; padding-left: 20px; font-size: 14px; line-height: 1.55; display: flex; flex-direction: column; gap: 6px; }
.error-text { color: var(--red); }

@media (max-width: 1100px) {
  .prof-grid { grid-template-columns: minmax(0, 1fr); }
  .gsearch { padding: 24px 24px 0; }
}
@media (max-width: 820px) {
  .main-col { display: block; }
  .gsearch { padding: 4px 16px 8px; }
  .gsearch .btn { padding: 10px 14px; }
  .main-col .main { padding-top: 4px; }
  .dlg-footer .btn { flex: 1 1 140px; }
  .list-foot { padding: 12px 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- Rezerwacje, kwoty i wpływy Glamdo (pakiet 3) --- */
.money-layout { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.money-line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; }
.money-line + .money-line { border-top: 1px solid #f0eef5; }
.money-line b { white-space: nowrap; }
.money-deduction { color: var(--muted); }
.money-deduction b { font-weight: 600; }
.money-net { color: var(--primary-dark); }
.money-net b { color: var(--primary); }
.mini-title { font-size: 12px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.mini-title.mt { margin-top: 16px; }
.pay-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 24px; }
.stack.tight { gap: 10px; }
.rez-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.rez-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.rez-grid .stack { min-width: 0; }
.rez-tbl td { vertical-align: top; }
.rez-tbl .row-click:hover { background: #faf9fd; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pager .chip { min-width: 44px; justify-content: center; }
.pager .chip:disabled { opacity: 0.5; cursor: default; }
.state-msg.note { background: var(--amber-soft); color: var(--amber); border-radius: 10px; margin: 12px 20px 0; padding: 10px 14px; }
.hold-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.hold-item.hold-old { border-color: #f1b4ae; background: #fff6f5; }
.dispute-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.dispute-item .kv-grid { margin-top: 0; }
.dispute-reversal { background: #f7f6fb; border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.5; }
.hold-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.supreme-money { margin: 6px 0; max-width: 340px; }
.toolbar .h2 { margin-right: 8px; }
@media (max-width: 900px) {
  .rez-grid { grid-template-columns: minmax(0, 1fr); }
  .state-msg.note { margin: 12px 16px 0; }
}
.hold-top .pill { white-space: normal; }

/* Pulpit: kafelki do decyzji, wyniki, wykres i rozbicia. */
.dash-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.period-label { min-width: 130px; text-align: center; font-weight: 600; }
.icon-btn { width: 40px; padding: 0; font-size: 20px; line-height: 1; }
.custom-range { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.custom-range[hidden] { display: none; }
.stack-sm { display: flex; flex-direction: column; gap: 4px; }
.dec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.dec-card { display: flex; align-items: center; gap: 14px; padding: 16px; text-align: left; font: inherit; color: var(--ink); text-decoration: none; cursor: pointer; width: 100%; }
.dec-card:hover { border-color: var(--primary); color: var(--ink); }
.dec-card:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.dec-card.todo-error { cursor: default; }
.dec-hot { border-color: var(--gold); }
.dec-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.dec-text { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; }
.dec-title { font-weight: 600; font-size: 15px; }
.dec-sub { font-size: 13px; color: var(--muted); }
.dec-chev { font-size: 22px; color: var(--muted); flex: none; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.res-tile { display: flex; flex-direction: column; gap: 8px; padding: 18px; }
.res-label { font-size: 13px; color: var(--muted); }
.res-value { font-size: 32px; font-weight: 700; letter-spacing: -0.5px; overflow-wrap: anywhere; }
.res-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.res-dark { background: var(--side); border-color: var(--side); color: #fff; }
.res-dark .res-label, .res-dark .res-foot { color: #d8d3f2; }
.delta { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.delta-up { background: var(--green-soft); color: var(--green); }
.delta-down { background: var(--red-soft); color: var(--red); }
.delta-flat { background: #ece9f5; color: var(--muted); }
.chart-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }
.day-preview { min-width: 240px; border: 1px solid #d9d3f5; background: #f7f5ff; border-radius: 12px; padding: 12px 16px; }
.dp-date { font-size: 12px; color: var(--muted); }
.dp-value { font-size: 24px; font-weight: 700; color: var(--primary); }
.dp-sub { font-size: 12px; color: var(--muted); }
.chart-host { margin-top: 12px; }
.daily-chart { width: 100%; height: auto; max-height: 300px; display: block; }
.chart-bar { fill: #8c7fe0; }
.chart-bar.chart-sel { fill: var(--side); }
.chart-bar.chart-neg { fill: var(--red); }
.chart-axis { stroke: var(--border-in); stroke-width: 1; }
.chart-grid { stroke: #eeecf6; stroke-width: 1; }
.chart-avg { stroke: #d49a1a; stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart-label { fill: var(--muted); font-size: 12px; }
.chart-hit { cursor: pointer; outline: none; }
.chart-hit:focus-visible { stroke: var(--violet); stroke-width: 2; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.stack-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; margin: 14px 0; background: #eeecf6; }
.legend-row, .status-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend-name { flex: 1; min-width: 0; }
.legend-val { white-space: nowrap; }
.legend-pct { width: 40px; text-align: right; color: var(--muted); font-size: 13px; }
.legend-note { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid #f0eef5; margin-top: 8px; padding-top: 10px; font-size: 14px; color: var(--muted); }
.legend-note + .legend-note { border-top: 0; margin-top: 0; padding-top: 4px; }
.dot-green { background: var(--green); }
.dot-violet { background: var(--violet); }
.dot-gold { background: #dfae2e; }
.dot-red { background: var(--red); }
.dot-grey { background: #6b6880; }
.bar-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.bar-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.bar-track { height: 8px; border-radius: 999px; background: #eeecf6; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; }
.fill-violet { background: var(--violet); }
@media (max-width: 760px) {
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .res-value { font-size: 26px; }
  .day-preview { min-width: 0; width: 100%; }
}

/* Rezerwacje: kafelki nad listą, link „Szczegóły”. */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.rez-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.rez-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; text-align: left; font: inherit; cursor: pointer; color: var(--ink); }
.rez-tile:hover, .rez-tile.on { border-color: var(--primary); }
.rez-tile:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.rez-tile-val { font-size: 26px; font-weight: 700; letter-spacing: -0.3px; }
.row-link { font-weight: 600; font-size: 13px; color: var(--primary); text-decoration: none; white-space: nowrap; }
.settle-note { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #f7f5ff; border: 1px solid #e4def8; font-size: 13px; color: var(--ink); line-height: 1.45; }
.supreme-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.supreme-item-main { min-width: 0; flex: 1; }
.supreme-item .btn { flex: none; align-self: center; }
/* Puste stany w kartach zaczynają się na tej samej linii co nagłówek karty. */
.card > .state-msg { padding: 12px 0 0; }

/* --- Makiety, runda 3 --- */
.party-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }
.action-btn { width: 100%; justify-content: flex-start; text-align: left; text-decoration: none; }
.history-dot { position: relative; padding-left: 20px; }
.history-dot::before { content: ""; position: absolute; left: 0; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--violet); }
.tone-dot-green::before { background: var(--green); }
.tone-dot-violet::before { background: #8f84e8; }
.tone-dot-amber::before { background: #d97706; }
.tone-dot-red::before { background: var(--red); }
.audit-search { flex: 1 1 260px; min-width: 0; width: auto; }
.prof-head-cover { overflow: hidden; }
.prof-cover { position: relative; height: 150px; margin: -22px -22px 0; background-size: cover; background-position: center; background-color: var(--violet-soft); }
.prof-cover-plain { background-image: none; }
.prof-cover-tag { position: absolute; top: 12px; right: 14px; font-size: 12px; background: rgba(255, 255, 255, 0.92); color: var(--ink); border-radius: 6px; padding: 3px 8px; }
.prof-head-cover .avatar-lg { margin-top: -48px; }
.prof-site { margin-left: auto; text-decoration: none; }
@media (max-width: 720px) {
  .prof-cover { margin: -16px -16px 0; height: 110px; }
  .prof-site { margin-left: 0; width: 100%; justify-content: center; }
}

/* --- Moderacja --- */
.mod-list { display: flex; flex-direction: column; gap: 16px; }
.mod-card { display: flex; flex-direction: column; gap: 16px; }
.mod-body { display: flex; flex-wrap: wrap; gap: 22px; }
.mod-main { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.mod-report { background: var(--amber-soft); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.mod-report .mod-text { margin: 0; color: #5b3410; }
.mod-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.mod-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mod-when { font-size: 13px; color: var(--muted); }
.mod-quote { margin-top: 6px; padding: 16px; border-radius: 12px; background: #f7f6fb; }
.mod-quote-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.mod-quote-top a, .mod-photo-title a { text-decoration: none; }
.mod-stars { color: #b88a12; font-weight: 700; letter-spacing: 1px; }
.mod-text { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: #3a3550; overflow-wrap: anywhere; }
.mod-meta { font-size: 12px; color: var(--muted); margin-top: 8px; }
.mod-ctx { font-size: 13px; color: #4b4760; }
.mod-photo-title { font-size: 15px; font-weight: 600; }
.mod-photo-btn { flex: none; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 14px; align-self: flex-start; }
.mod-photo { display: block; width: 220px; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: #ebd9f2; }
.mod-actions { display: flex; flex-direction: column; gap: 10px; }
.mod-warn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 0; min-height: 32px; font: inherit; font-size: 13px; font-weight: 600; color: var(--primary); cursor: pointer; text-decoration: underline; }
.mod-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mod-btns .btn { min-height: 48px; padding: 0 8px; white-space: nowrap; }
.mod-done { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px 20px; border-top: 1px solid #efedf6; font-size: 14px; }
.mod-done:first-child { border-top: 0; }
.mod-done-text { flex: 1 1 280px; min-width: 0; overflow-wrap: anywhere; }

/* --- Wiadomości i Kody rabatowe (Pakiet 6) --- */
.seg-row { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.msg-form .seg-row, .kody-form .seg-row { gap: 8px; }
.seg { font: inherit; font-size: 14px; font-weight: 600; flex: 1 1 140px; min-height: 46px; border: 1px solid var(--border-in); background: #fff; color: #4b4760; border-radius: 10px; cursor: pointer; padding: 0 12px; }
.seg.on { background: var(--side); border-color: var(--side); color: #fff; }
.lbl { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 8px; display: block; }
.cb-row { display: flex; align-items: center; gap: 10px; font-size: 14px; min-height: 40px; color: var(--ink); }
.cb { width: 20px; height: 20px; accent-color: var(--primary); }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.hint.warn { color: var(--amber); }
.note { padding: 12px 14px; border-radius: 12px; font-size: 13px; line-height: 1.55; }
.note.warn { background: #fffbeb; border: 1px solid #f1e2b3; color: #5c4a1e; }
.note.info { background: #f1eefb; color: #3a3550; }
.msg-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.msg-form { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.msg-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.msg-selects { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 10px; }
.opt-card { flex: 1 1 220px; text-align: left; font: inherit; border: 1px solid var(--border-in); background: #fff; border-radius: 12px; padding: 12px 14px; cursor: pointer; color: var(--ink); min-height: 44px; }
.opt-card.on { border: 2px solid var(--violet); background: #f7f5ff; padding: 11px 13px; }
.opt-card b { display: block; font-size: 14px; font-weight: 600; }
.opt-card span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.msg-body { line-height: 1.6; margin-top: 0; }
.msg-count { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px; border-radius: 12px; background: #f1eefb; }
.msg-count-lbl { font-size: 13px; color: #4b4760; }
.msg-count-val { font-size: 24px; font-weight: 700; color: var(--primary); }
.msg-when { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.msg-when .inp { width: auto; }
.msg-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.msg-confirm { margin-top: 12px; padding: 16px; border-radius: 12px; background: #fffbeb; border: 1px solid #f1e2b3; display: flex; flex-direction: column; gap: 10px; }
.msg-confirm-text { font-size: 13px; color: #5c4a1e; line-height: 1.5; }
.msg-confirm-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 420px; }
.push-bg { margin-top: 14px; border-radius: 22px; background: linear-gradient(160deg, #3b3270, #6b5bb5); padding: 18px 12px; }
.push-card { background: rgba(255, 255, 255, 0.94); border-radius: 16px; padding: 12px 14px; display: flex; gap: 10px; }
.push-ico { width: 36px; height: 36px; border-radius: 9px; background: var(--primary); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; font-size: 15px; }
.push-text { min-width: 0; flex: 1; }
.push-top { display: flex; justify-content: space-between; font-size: 12px; color: #6b6880; }
.push-top b { color: var(--ink); font-weight: 600; }
.push-title { display: block; font-size: 13px; font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; }
.push-body { display: block; font-size: 13px; color: #3a3550; margin-top: 2px; overflow-wrap: anywhere; }
.mail-prev { margin-top: 14px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.mail-prev-head { background: var(--primary); padding: 16px; text-align: center; }
.mail-prev-head img { height: auto; }
.mail-prev-body { padding: 16px; font-size: 13px; line-height: 1.6; color: #3a3550; white-space: pre-line; overflow-wrap: anywhere; }
.mail-prev-foot { padding: 12px 16px; background: #f7f6fb; font-size: 11px; color: #6b6880; }
.card-pad { padding: 18px 20px; }
.msg-tbl th.first, .msg-tbl td.first, .kody-tbl th.first, .kody-tbl td.first { padding-left: 20px; }
.msg-tbl th.last, .msg-tbl td.last, .kody-tbl th.last, .kody-tbl td.last { padding-right: 20px; }
.msg-tbl, .kody-tbl { min-width: 820px; }
.btn-link { display: block; margin-top: 4px; background: none; border: 0; padding: 4px 0; min-height: 32px; font: inherit; font-size: 12px; font-weight: 600; color: var(--primary); cursor: pointer; text-decoration: underline; }
.kody-form { display: flex; flex-wrap: wrap; gap: 24px; }
.kody-left { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.kody-right { flex: 1 1 260px; min-width: 0; }
.f-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.f-grid.two { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.f-lbl { font-size: 13px; color: var(--muted); }
.f-lbl .inp, .f-lbl select { display: block; width: 100%; margin-top: 6px; }
.code-row { display: flex; gap: 6px; margin-top: 6px; align-items: center; }
.code-row .inp { flex: 1 1 auto; width: 100%; min-width: 0; margin-top: 0; }
.code-row .btn { flex: none; }
.code-field { font-weight: 700; letter-spacing: 0.5px; }
.pv-box { border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: #fbfafe; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.pv-row { display: flex; justify-content: space-between; gap: 8px; }
.pv-row.ok { color: var(--green); font-weight: 600; }
.pv-row.total { border-top: 1px solid #efedf6; padding-top: 10px; font-weight: 700; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: 0.4px; }
.muted-cell { color: #4b4760; }
.kody-tbl td.used { min-width: 150px; }
.kody-tbl td.used .bar-track { height: 6px; margin-top: 5px; }
.kody-tbl .row-actions .btn { margin-left: 6px; }
.mod-done .btn-outline { min-height: 44px; padding: 6px 12px; font-size: 13px; }
a.party-card-link { text-decoration: none; color: inherit; }
a.party-card-link:hover { box-shadow: 0 0 0 2px var(--violet-soft); }
.mail-prev-unsub { text-decoration: underline; margin-top: 4px; }

/* Zaznaczanie na liście stylistek i odbiorcy „Wybrane” w Wiadomościach */
.sel-col { width: 44px; }
.list-tbl th.sel-col, .list-tbl td.sel-col { padding-right: 0; cursor: pointer; }
.sel-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 20px; background: var(--violet-soft); border-bottom: 1px solid #efedf6; position: sticky; top: 0; z-index: 2; }
.sel-bar .btn-link { display: inline-block; margin-top: 0; }
.sel-bar .grow { flex: 1; }
.sel-count { font-weight: 600; font-size: 14px; }
.picked-box { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--border-in); border-radius: 10px; background: #faf9fd; font-size: 14px; line-height: 1.5; }
.tpl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tpl-row .hint { margin-top: 0; }
.tpl-row .chip { min-height: 36px; }
