/* CENTRUM REKLAMACJI 4FLORIST — wspólny arkusz stylów (aplikacja + panel) */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('fonts/inter-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('fonts/inter-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --green-950: #0D0F14;
  --green-900: #171a22;
  --green-800: #2b2f3b;
  --green-700: #7B61FF;
  --green-100: #ece8ff;
  --green-50:  #f6f4ff;
  --rose-600:  #e23a78;
  --rose-500:  #FF4D8D;
  --rose-100:  #ffe6ef;
  --amber-500: #e5a13a;
  --amber-100: #fbf0dc;
  --ink:       #0D0F14;
  --grad:      linear-gradient(135deg, #7B61FF 0%, #FF4D8D 55%, #FF9A4D 100%);
  --ink-2:     #4a4f5c;
  --ink-3:     #858a97;
  --line:      #e6e6ee;
  --bg:        #f5f5f8;
  --card:      #ffffff;
  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 1px 2px rgba(13, 15, 20, .06), 0 8px 24px rgba(13, 15, 20, .08);
  --shadow-lg: 0 20px 60px rgba(13, 15, 20, .25);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.45;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }

/* ─── Marka / logo ─── */
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 52px; width: auto; margin-left: -6px; }
.login-hero .brand img { height: 96px; margin-left: -12px; }
.a-side .brand img { height: 68px; }
.auth-art .brand img { height: 88px; margin-left: -10px; }

/* ─── Przyciski ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 650; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--green-900); color: #fff; box-shadow: 0 6px 16px rgba(13,15,20,.25); }
.btn-primary:hover:not(:disabled) { background: var(--green-800); }
.btn-accent { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(224,71,111,.3); }
.btn-accent:hover:not(:disabled) { filter: brightness(1.05); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { background: #fff; }
.btn-danger { background: transparent; border-color: #f1c4cf; color: var(--rose-600); }
.btn-danger:hover:not(:disabled) { background: var(--rose-100); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-lg { min-height: 58px; font-size: 17px; border-radius: 16px; padding: 0 24px; }
.btn-block { width: 100%; }
.icon { width: 20px; height: 20px; flex: none; }
.btn-sm .icon { width: 16px; height: 16px; }

/* ─── Formularze ─── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-size: 12px; font-weight: 650; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--green-700); box-shadow: 0 0 0 4px rgba(123, 97, 255, .15); }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.5; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--green-800); }

.error-box { background: var(--rose-100); color: var(--rose-600); padding: 10px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }

/* ─── Toast ─── */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%) translateY(20px);
  background: var(--green-950); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 550;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 1000; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--rose-600); }

/* ─── Status ─── */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-nowa { background: var(--rose-100); color: var(--rose-600); }
.pill-w_toku { background: var(--amber-100); color: #a46a12; }
.pill-zamknieta { background: var(--green-100); color: var(--green-700); }
.pill-on { background: #e7f7ee; color: #1f8a4c; }
.pill-off { background: #eeeef2; color: #858a97; }

/* ════════════════ APLIKACJA MOBILNA ════════════════ */
.m-app { min-height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; background: var(--bg); }
.m-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + var(--safe-t)) 18px 12px;
  background: rgba(245, 245, 248, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.m-user { display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--green-900); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 13px; border: 0;
}
.badge-sync {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 99px;
  background: var(--amber-100); color: #8a5a10; font-size: 12px; font-weight: 650; border: 0;
}
.m-main { flex: 1; padding: 6px 18px calc(120px + var(--safe-b)); }

.steps { display: flex; gap: 6px; margin: 6px 0 22px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s; }
.steps i.on { background: var(--green-800); }
.steps i.cur { background: var(--grad); }

.m-title { font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; }
.m-sub { color: var(--ink-2); margin: 0 0 22px; font-size: 15px; }
.m-kicker { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rose-500); margin-bottom: 8px; }

.m-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 14px 18px calc(14px + var(--safe-b));
  background: linear-gradient(to top, var(--bg) 70%, rgba(245,245,248,0));
}
.m-bottom-inner { max-width: 524px; margin: 0 auto; display: flex; gap: 10px; }
.m-bottom-inner .btn-lg { flex: 1; }
.m-bottom-inner .btn-back { flex: 0 0 58px; padding: 0; }

/* Aparat */
.camera-cta {
  width: 100%; border: 0; border-radius: 24px; padding: 34px 20px; color: #fff;
  background: var(--grad);
  display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.camera-cta::after {
  content: ''; position: absolute; width: 220px; height: 220px; right: -70px; top: -90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.25), rgba(255,255,255,0) 70%);
}
.camera-cta .ring { width: 76px; height: 76px; border-radius: 50%; background: rgba(255,255,255,.12); display: grid; place-items: center; border: 2px solid rgba(255,255,255,.35); }
.camera-cta .ring .icon { width: 34px; height: 34px; }
.camera-cta b { font-size: 19px; }
.camera-cta span { font-size: 13px; opacity: .75; }
.camera-cta:active { transform: scale(.99); }
.link-btn { background: none; border: 0; color: var(--green-700); font-weight: 650; padding: 14px; width: 100%; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; }

.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #ddd; box-shadow: var(--shadow); animation: pop .25s ease; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(13,15,20,.75); color: #fff; border: 0; display: grid; place-items: center;
}
.thumb button .icon { width: 14px; height: 14px; }
.thumb .n { position: absolute; left: 6px; bottom: 6px; background: rgba(255,255,255,.9); border-radius: 6px; padding: 0 6px; font-size: 11px; font-weight: 700; }
.thumb.add { display: grid; place-items: center; background: #fff; border: 2px dashed var(--line); box-shadow: none; color: var(--ink-3); }
.thumb.add .icon { width: 28px; height: 28px; }
.thumb.busy { display: grid; place-items: center; background: #fff; }
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Kafelki wyboru */
.tiles { display: grid; gap: 10px; }
.tiles.two { grid-template-columns: 1fr 1fr; }
.tile {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  min-height: 64px; padding: 14px 16px; border-radius: var(--radius); background: var(--card);
  border: 2px solid transparent; box-shadow: var(--shadow); font-size: 16px; font-weight: 650;
  transition: border-color .15s, transform .08s, background .15s;
}
.tile:active { transform: scale(.985); }
.tile.sel { border-color: var(--green-800); background: var(--green-50); }
.tile .flag { font-size: 28px; line-height: 1; }
.tile .mono {
  width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--green-100); color: var(--green-800); font-weight: 800; font-size: 15px;
}
.tile .grow { flex: 1; min-width: 0; }
.tile .grow small { display: block; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.tile .chev { color: var(--ink-3); }
.tiles.two .tile { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 96px; }
.tag-last { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--rose-500); }

.search { position: relative; margin-bottom: 14px; }
.search .icon { position: absolute; left: 14px; top: 12px; color: var(--ink-3); }
.search .input { padding-left: 42px; }

.crumb { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font-weight: 650; font-size: 14px; margin-bottom: 14px; }

/* Podsumowanie */
.summary { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 18px; }
.summary-photos { display: flex; gap: 4px; overflow-x: auto; padding: 4px; scrollbar-width: none; }
.summary-photos img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; flex: none; }
.summary-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-top: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; }
.summary-row .k { font-size: 12px; color: var(--ink-3); width: 64px; flex: none; text-transform: uppercase; letter-spacing: .06em; font-weight: 650; }
.summary-row .v { flex: 1; font-weight: 650; }
.summary-row .icon { color: var(--ink-3); width: 16px; height: 16px; }

/* Ekran sukcesu */
.done { text-align: center; padding-top: 8vh; }
.done-ring {
  width: 112px; height: 112px; border-radius: 50%; margin: 0 auto 24px; display: grid; place-items: center;
  background: var(--grad); color: #fff; box-shadow: 0 0 0 12px var(--rose-100), 0 0 0 24px #fff3f7;
  animation: pop .4s cubic-bezier(.2,1.6,.4,1);
}
.done-ring.offline { background: var(--amber-500); box-shadow: 0 0 0 12px var(--amber-100), 0 0 0 24px #fdf8ee; }
.done-ring .icon { width: 52px; height: 52px; }
.done h1 { font-size: 28px; margin: 0 0 8px; letter-spacing: -.02em; }
.done .num { font-size: 15px; color: var(--ink-2); }
.done .num b { color: var(--ink); }

/* Logowanie pracownika */
.login-hero { padding: 6vh 0 26px; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 20px 0 26px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--green-800); transition: background .15s; }
.pin-dots i.on { background: var(--green-800); }
.pin-dots.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 320px; margin: 0 auto; }
.keypad button { height: 66px; border-radius: 18px; border: 0; background: #fff; box-shadow: var(--shadow); font-size: 24px; font-weight: 650; }
.keypad button:active { background: var(--green-100); }
.keypad button.fn { background: transparent; box-shadow: none; font-size: 15px; color: var(--ink-2); }

.empty { text-align: center; padding: 40px 20px; color: var(--ink-3); }

.sheet-back { position: fixed; inset: 0; background: rgba(13,15,20,.45); z-index: 90; animation: fade .2s; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91; background: #fff; border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(18px + var(--safe-b)); max-width: 560px; margin: 0 auto; animation: up .25s ease;
}
.sheet::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 14px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }

/* ════════════════ PANEL ADMINA ════════════════ */
.a-layout { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.a-side {
  background: var(--green-950); color: #d6d8e0; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh;
}
.a-side .brand { padding: 4px 10px 22px; color: #fff; }
.a-nav-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #7c8191; padding: 16px 12px 6px; }
.a-nav {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #c4c7d2;
  text-decoration: none; font-weight: 550; font-size: 14px; border: 0; background: none; width: 100%; text-align: left;
}
.a-nav:hover { background: rgba(255,255,255,.06); color: #fff; }
.a-nav.on { background: rgba(255,255,255,.1); color: #fff; }
.a-nav .count { margin-left: auto; font-size: 12px; background: var(--rose-500); color: #fff; border-radius: 99px; padding: 1px 8px; font-weight: 700; }
.a-side .spacer { flex: 1; }
.a-me { font-size: 12px; color: #7c8191; padding: 8px 12px; overflow: hidden; text-overflow: ellipsis; }

.a-main { padding: 28px 34px 60px; min-width: 0; }
.a-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.a-head h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; font-weight: 800; }
.a-head p { margin: 4px 0 0; color: var(--ink-3); font-size: 14px; }
.a-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--card); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .k { font-size: 12px; color: var(--ink-3); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.stat .v { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.stat.accent { background: var(--green-900); color: #fff; }
.stat.accent .k { color: #a9adbb; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 14px; border-bottom: 1px solid var(--line); }
.filters .field { margin: 0; }
.filters .field label { font-size: 11px; }
.filters .input { min-height: 38px; padding: 6px 10px; border-radius: 9px; font-size: 14px; }

.bulk {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--green-50);
  border-bottom: 1px solid var(--line); font-size: 14px; flex-wrap: wrap;
}
.bulk b { margin-right: auto; }

.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3);
  font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fcfbf8;
  position: sticky; top: 0;
}
.t th.sortable { cursor: pointer; user-select: none; }
.t th.sortable:hover { color: var(--ink); }
.t th .arrow { display: inline-block; margin-left: 4px; color: var(--rose-500); }
.t td { padding: 10px 12px; border-bottom: 1px solid #efece5; vertical-align: middle; }
.t tbody tr { transition: background .1s; }
.t tbody tr:hover { background: #faf9f5; }
.t tbody tr.clickable { cursor: pointer; }
.t tbody tr.sel { background: var(--green-50); }
.t .nr { font-weight: 750; font-variant-numeric: tabular-nums; }
.t .date { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.t .desc { max-width: 280px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t .cb { width: 40px; }
.t .cb input { width: 18px; height: 18px; accent-color: var(--green-800); cursor: pointer; }
.t .row-actions { text-align: right; white-space: nowrap; }
.strip { display: flex; align-items: center; }
.strip img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; border: 2px solid #fff; margin-left: -10px; background: #eee; }
.strip img:first-child { margin-left: 0; }
.strip .more { margin-left: 6px; font-size: 12px; color: var(--ink-3); font-weight: 650; }
.farm-cell b { display: block; }
.farm-cell small { color: var(--ink-3); }
.inactive td { opacity: .5; }

.toolbar { display: flex; gap: 10px; align-items: center; padding: 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.toolbar .input { max-width: 260px; min-height: 38px; }

/* Szuflada szczegółów */
.drawer-back { position: fixed; inset: 0; background: rgba(13,15,20,.4); z-index: 80; animation: fade .2s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: var(--bg); z-index: 81;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .25s ease;
}
@keyframes slide { from { transform: translateX(100%); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); background: #fff; }
.drawer-head h2 { margin: 0; font-size: 20px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px; }
.drawer-foot { display: flex; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: #fff; flex-wrap: wrap; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 20px; }
.gallery button { padding: 0; border: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: #ddd; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.gallery button:hover img { transform: scale(1.04); }
.dl { display: grid; grid-template-columns: 130px 1fr; gap: 0; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.dl dt, .dl dd { margin: 0; padding: 11px 14px; border-bottom: 1px solid #efece5; }
.dl dt { color: var(--ink-3); font-size: 13px; font-weight: 600; }
.dl dd { font-weight: 600; white-space: pre-wrap; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(8, 9, 12, .94); z-index: 200; display: flex; align-items: center; justify-content: center; animation: fade .2s; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 6px; box-shadow: 0 20px 80px rgba(0,0,0,.5); }
.lightbox .lb-btn { position: absolute; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; border: 0; display: grid; place-items: center; }
.lightbox .lb-btn:hover { background: rgba(255,255,255,.2); }
.lightbox .prev { left: 20px; top: 50%; } .lightbox .next { right: 20px; top: 50%; }
.lightbox .close { right: 20px; top: 20px; }
.lightbox .cnt { position: absolute; bottom: 20px; color: #fff; font-size: 14px; opacity: .7; }
.lightbox .dl-link { position: absolute; right: 80px; top: 20px; }

/* Modal */
dialog.modal { border: 0; border-radius: 20px; padding: 0; width: min(460px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(13,15,20,.45); }
.modal-head { padding: 20px 22px 4px; }
.modal-head h3 { margin: 0; font-size: 19px; }
.modal-body { padding: 14px 22px 6px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px 20px; }

/* Logowanie admina */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art {
  background: var(--green-950); color: #fff;
  padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth-art::after { content: ''; position: absolute; width: 520px; height: 520px; right: -160px; bottom: -180px; border-radius: 50%; background: radial-gradient(circle, rgba(255,77,141,.45), rgba(123,97,255,.25) 40%, transparent 65%); }
.auth-art h2 { font-size: 40px; line-height: 1.05; letter-spacing: -.03em; margin: 0; max-width: 420px; position: relative; z-index: 1; }
.auth-art p { color: #b4b8c6; max-width: 380px; position: relative; z-index: 1; }
.auth-art .brand { color: #fff; position: relative; z-index: 1; }
.auth-form { display: grid; place-items: center; padding: 32px; }
.auth-form form { width: min(380px, 100%); }
.auth-form h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.02em; }
.auth-form .lead { color: var(--ink-3); margin: 0 0 24px; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--green-50); padding: 2px 6px; border-radius: 6px; font-size: 12px; word-break: break-all; }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--green-100); border-top-color: var(--green-800); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center-load { display: grid; place-items: center; min-height: 50vh; }

.m-only { display: none; }
@media (max-width: 900px) {
  .a-layout { grid-template-columns: 1fr; }
  .a-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 12px; gap: 4px; }
  .a-side .brand { padding: 4px 8px 8px; width: 100%; }
  .a-nav-label, .a-side .spacer, .a-me { display: none; }
  .a-nav { width: auto; padding: 8px 10px; }
  .a-main { padding: 18px 14px 60px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .hide-sm { display: none; }
}

@media print { .a-side, .bulk, .filters { display: none; } }

.drawer-head .actions { display: flex; gap: 6px; }
.drawer-foot .spacer { flex: 1; }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* Aparat na żywo */
.viewfinder {
  position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 62dvh; border-radius: 24px; overflow: hidden;
  background: #0D0F14; box-shadow: var(--shadow);
}
.viewfinder video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-wait { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #c4c7d2; font-size: 14px; }
.cam-wait .spinner { border-color: rgba(255,255,255,.15); border-top-color: #FF4D8D; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cam-flash.go { animation: camflash .35s ease-out; }
@keyframes camflash { 0% { opacity: .85; } 100% { opacity: 0; } }
.cam-count { position: absolute; top: 14px; right: 14px; min-width: 32px; height: 32px; padding: 0 10px; border-radius: 99px; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.cam-controls {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 22px 20px; display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0));
}
.cam-side { width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; display: grid; place-items: center; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.cam-side.ghost { background: transparent; }
.shutter { width: 78px; height: 78px; border-radius: 50%; border: 4px solid #fff; background: transparent; padding: 5px; }
.shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--grad); transition: transform .1s; }
.shutter:active span { transform: scale(.88); }
.shutter:disabled { opacity: .4; }
.cam-strip { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 4px; scrollbar-width: none; }
.cam-strip .thumb { width: 74px; height: 74px; flex: none; aspect-ratio: auto; border-radius: 12px; }
.cam-hint { margin-top: 14px; text-align: center; font-size: 14px; }
