:root {
  --primary: #3390ec;
  --primary-dark: #2b7fd6;
  --primary-light: #e8f2fd;
  --accent: #3390ec;
  --success: #34c759;
  --danger: #e5484d;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --bg: #f4f4f5;
  --text: #0f1620;
  --text-secondary: #56606b;
  --muted: #8b98a5;
  --border: #e4e8ec;
  --tg-online: #46c93a;
  --shadow-sm: 0 1px 2px rgba(16,24,40,0.06);
  --shadow: 0 8px 24px rgba(16,24,40,0.08), 0 1px 2px rgba(16,24,40,0.04);
  --shadow-lg: 0 20px 60px rgba(16,24,40,0.14), 0 6px 16px rgba(16,24,40,0.08);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --topbar-height: 64px;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }

/* Keep content inside its frame — prevents long text, emails, numbers or URLs from spilling out */
h1, h2, h3, h4, h5, h6, p, li, label, td, th, dd, dt, blockquote, figcaption, strong, em, small, a, span, div { overflow-wrap: anywhere; }
pre, code { white-space: pre-wrap; overflow-wrap: anywhere; }
input, select, textarea, button, .btn { max-width: 100%; }
img, svg, video, canvas { max-width: 100%; }
.container, main, section, article, .card, .kmj-card, .panel, .surface, .job-card, .section-card { min-width: 0; }
.stat-grid > *, [class*="-grid"] > *, .two-col > *, .overview > *, .layout > * { min-width: 0; }

/* ─── Layout ─── */
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.page-wrapper { min-height: 100vh; display: flex; flex-direction: column; }

/* ─── Typography ─── */
.display-4 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.15; }
.display-5 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 800; line-height: 1.2; }
.display-6 { font-size: 1.5rem; font-weight: 700; }
.h3 { font-size: 1.3rem; font-weight: 700; }
.h4 { font-size: 1.15rem; font-weight: 700; }
.h5 { font-size: 1rem; font-weight: 600; }
.text-muted { color: var(--text-secondary); }
.text-faint { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.small { font-size: 0.875rem; }
.xs { font-size: 0.78rem; }

/* ─── Spacing ─── */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 40px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.p-3 { padding: 16px; }
.p-4 { padding: 24px; }

/* ─── Flex / Grid utilities ─── */
.d-flex { display: flex; }
.d-grid { display: grid; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.gap-4 { gap: 24px; }
.w-100 { width: 100%; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 12px;
  padding: 11px 22px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--primary);
  color: #10140b;
  box-shadow: 0 10px 22px rgba(183,255,54,0.16);
}
.btn-primary:hover { background: #d0ff75; box-shadow: 0 12px 26px rgba(183,255,54,0.24); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #252e39; }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-outline-primary { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline-primary:hover { background: var(--primary-light); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--border); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 7px 16px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-icon { padding: 10px; border-radius: 50%; }

/* ─── Tags / Badges ─── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.tag-success { background: #d1fae5; color: #065f46; }
.tag-warning { background: #fef3c7; color: #92400e; }
.tag-danger { background: #fee2e2; color: #991b1b; }
.tag-muted { background: #f1f5f9; color: #475569; }

/* ─── Cards ─── */
.card {
  background: var(--surface);
  border: 1px solid rgba(18,24,38,.08);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.card-sm { border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel-card {
  background: var(--surface);
  border: 1px solid rgba(18,24,38,.08);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.section-card {
  background: var(--surface);
  border: 1px solid rgba(18,24,38,.08);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
}

/* ─── Topbar (shared nav for inner pages) ─── */
.topbar {
  background: rgba(10,13,16,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--primary);
  color: #10140b;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1rem;
  box-shadow: 0 8px 18px rgba(15,118,110,0.24);
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nav-links a {
  padding: 7px 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--primary); background: var(--primary-light); }
.nav-links a.active { color: var(--primary); background: var(--primary-light); }

/* ─── Mobile menu ─── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0 16px;
  border-top: 1px solid var(--border);
  width: 100%;
}
.mobile-menu a {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.mobile-menu a:hover { background: var(--primary-light); color: var(--primary); }
.mobile-menu.open { display: flex; }

@media (max-width: 760px) {
  .container { width: min(100% - 24px, 1180px); }
  .topbar .container { gap: 10px; padding: 10px 0; }
  .brand { font-size: 1rem; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .nav-links { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; padding: 8px 10px; font-size: 0.84rem; }
  .btn { padding: 9px 14px; font-size: 0.86rem; }
  .btn-sm { padding: 7px 11px; font-size: 0.78rem; }
  .avatar-sm { width: 34px; height: 34px; }
  .section-card, .panel-card { padding: 18px; border-radius: 16px; }
  .table-wrap { overflow-x: auto; }
  table { min-width: 680px; }
  input, select, textarea { min-width: 0; }
}

@media (max-width: 520px) {
  .display-4 { font-size: 2rem; }
  .display-5 { font-size: 1.55rem; }
  .auth-bg { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-card { width: calc(100% - 24px); margin: 20px auto; }
}

/* ─── Auth pages ─── */
.auth-bg {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-panel {
  display: grid;
  place-items: center;
  padding: 40px 32px;
}
.auth-side {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #3b82f6 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 56px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.auth-side::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}
.auth-side::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.auth-card {
  width: min(460px, 100%);
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 8px;
  font-size: 1.1rem;
}
.input-group {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}
.input-group label { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.input-group input,
.input-group select,
.input-group textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-note { font-size: 0.9rem; color: var(--muted); }
.form-error { font-size: 0.9rem; color: var(--danger); margin-top: 10px; }

/* ─── Dashboard layout ─── */
.dash-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - var(--topbar-height));
}
.sidebar {
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
  overflow-y: auto;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.sidebar-link:hover { background: var(--bg); color: var(--text); }
.sidebar-link.active {
  background: var(--primary-light);
  color: var(--primary);
}
.sidebar-link .icon { font-size: 1.1rem; width: 20px; text-align: center; }
.sidebar-section { padding: 8px 14px 4px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 12px; }
.main-content { padding: 28px 32px; overflow-y: auto; }

/* ─── Stat cards ─── */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-card { padding: 22px 24px; border-radius: var(--radius-lg); color: #fff; position: relative; overflow: hidden; }
.stat-card::after { content: ''; position: absolute; top: -20px; right: -20px; width: 100px; height: 100px; border-radius: 50%; background: rgba(255,255,255,0.1); }
.stat-card.success { background: linear-gradient(135deg, #059669, #10b981); }
.stat-card.info { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
.stat-card.primary { background: linear-gradient(135deg, var(--primary), #3b82f6); }
.stat-card.warning { background: linear-gradient(135deg, #d97706, #f59e0b); }
.stat-num { font-size: 2rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: 0.85rem; opacity: 0.88; margin-top: 4px; }
.stat-sub { font-size: 0.78rem; opacity: 0.75; margin-top: 10px; }

/* ─── Job cards ─── */
.job-list { display: grid; gap: 12px; }
.job-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.job-item:hover { border-color: #99d6cb; box-shadow: 0 10px 24px rgba(15,118,110,0.10); }
.job-item-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.job-item-meta { color: var(--text-secondary); font-size: 0.88rem; margin-top: 4px; }
.job-item-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.job-item-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ─── Forms ─── */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.88rem; color: var(--text); }
.field input,
.field select,
.field textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.10);
}
.field-full { grid-column: 1 / -1; }

/* ─── Metric tiles ─── */
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.metric {
  border-radius: var(--radius);
  padding: 18px 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.metric::after { content: ''; position: absolute; top: -20px; right: -20px; width: 90px; height: 90px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.metric.blue { background: linear-gradient(135deg, var(--primary), #60a5fa); }
.metric.green { background: linear-gradient(135deg, #059669, #34d399); }
.metric.orange { background: linear-gradient(135deg, #d97706, #fbbf24); }
.metric.purple { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.metric-num { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.metric-label { font-size: 0.82rem; opacity: 0.85; margin-top: 4px; }

/* ─── Avatar ─── */
.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 800;
  flex-shrink: 0;
}
.avatar-sm { width: 40px; height: 40px; font-size: 1rem; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #60a5fa); color: #fff; display: grid; place-items: center; font-weight: 800; background-size: cover; background-position: center; flex-shrink: 0; }
.avatar-empty { background: #e5e7eb !important; color: #64748b !important; box-shadow: inset 0 0 0 1px #cbd5e1; }
.avatar-empty::before { content: '👤'; font-size: 0.95em; line-height: 1; }
.avatar-empty.has-text::before { content: ''; }

/* ─── Status badges ─── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}
.status-new { background: #dbeafe; color: #1e40af; }
.status-accepted { background: #d1fae5; color: #065f46; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-active { background: #d1fae5; color: #065f46; }

/* ─── List items ─── */
.list-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.list-item:last-child { border-bottom: none; }

/* ─── Toast ─── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--text);
  color: #fff;
  border-radius: var(--radius);
  padding: 14px 18px;
  min-width: 240px;
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 600;
  animation: slideUp 0.3s ease;
}
.toast.success { background: #065f46; }
.toast.error { background: #991b1b; }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Footer ─── */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 32px 0; color: var(--text-secondary); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { font-size: 0.9rem; transition: color 0.15s; }
.footer-links a:hover { color: var(--primary); }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .auth-bg { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .metric-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .dash-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-content { padding: 20px 16px; }
}
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: 1fr; }
  .hamburger { display: flex; }
  .nav-links { display: none; }
  .topbar-actions { display: none; }
}

input, select, textarea, .field input, .field select, .field textarea, .input-group input, .input-group select, .input-group textarea { background: var(--surface-2) !important; color: var(--text) !important; border-color: var(--border) !important; }
.card, .panel-card, .section-card, .panel, .job-item, .site-footer, .sidebar, .summary-card, .balance, .surface { background: var(--surface) !important; color: var(--text) !important; border-color: var(--border) !important; }
.avatar-empty { background: var(--surface-2) !important; color: var(--text-secondary) !important; box-shadow: inset 0 0 0 1px var(--border); }
.kmj-support-dialog { width: min(520px, calc(100% - 24px)); margin: auto; padding: 28px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.kmj-support-dialog::backdrop { background: rgba(0,0,0,.72); }
.kmj-support-dialog h2 { margin: 0 32px 12px 0; }
.kmj-support-dialog p { color: var(--text-secondary); margin-bottom: 20px; }
.kmj-support-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.kmj-dialog-close { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; color: var(--text); font-size: 1.5rem; cursor: pointer; }
@media (max-width: 640px) { .kmj-support-dialog { padding: 22px; } .kmj-support-actions .btn { width: 100%; min-height: 46px; } }
/* ===== Telegram dual-theme overrides ===== */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
@supports (backdrop-filter: blur(1px)) { .topbar { background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(16px); } }
.brand { color: var(--text); }
.brand-mark { background: var(--primary) !important; color: #fff !important; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(51,144,236,.24); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn:active { transform: scale(.97); }
.nav-links a { color: var(--text-secondary); }
.nav-links a:hover, .nav-links a.active { color: var(--primary); background: var(--primary-light); }
.job-card, .filters, .kmj-card, .job-modal-card, .search-card { background: var(--surface) !important; color: var(--text) !important; border-color: var(--border) !important; }
/* ── Telegram shared components ── */
.tg-toggle { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font-size: 1rem; line-height: 1; transition: background .15s ease, transform .12s ease; }
.tg-toggle:hover { background: var(--surface-2); }
.tg-toggle:active { transform: scale(.9); }
.online-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--tg-online, #46c93a); }
.brand-status { font-size: .7rem; color: var(--tg-online, #46c93a); font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.tg-bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; display: none; justify-content: space-around; gap: 2px; padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--border); }
@supports (backdrop-filter: blur(1px)) { .tg-bottom-nav { background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); } }
.tg-bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px; border-radius: 12px; color: var(--muted); font-size: .68rem; font-weight: 700; text-decoration: none; transition: color .15s ease, transform .12s ease; }
.tg-bottom-nav a .ic { font-size: 1.3rem; line-height: 1; }
.tg-bottom-nav a.active { color: var(--primary); }
.tg-bottom-nav a:active { transform: scale(.9); }
@media (max-width: 760px) { .tg-bottom-nav { display: flex; } body { padding-bottom: 74px; } }
/* Telegram chat-style job cards */
.tg-jobs { display: grid; gap: 10px; }
.tg-job { display: flex; align-items: flex-start; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px; }
.tg-ava { flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; background: var(--primary-light); }
.tg-job-body { flex: 1; min-width: 0; }
.tg-job-title { font-weight: 800; color: var(--text); font-size: 1rem; margin-bottom: 4px; }
.tg-job-sub { color: var(--text-secondary); font-size: .82rem; margin-bottom: 8px; }
.tg-bubbles { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tg-bubble { background: var(--surface-2); color: var(--text-secondary); border-radius: 12px 12px 12px 4px; padding: 4px 10px; font-size: .76rem; font-weight: 700; }
.tg-bubble.rate { background: var(--primary-light); color: var(--primary); }
.tg-take { display: block; width: 100%; text-align: center; padding: 12px; border: 0; border-radius: 14px; background: var(--primary); color: #fff; font-weight: 800; font-size: .95rem; cursor: pointer; text-decoration: none; transition: transform .1s ease, background .15s ease; }
.tg-take:active { transform: scale(.95); }
.tg-take:disabled { opacity: .5; cursor: default; }
.kmj-fixed-controls { position: fixed; right: 14px; bottom: 14px; z-index: 9999; display: none; flex-direction: column; gap: 8px; }
@media (max-width: 760px) { .kmj-fixed-controls { display: flex; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); } .kmj-header-ctl { display: none !important; } }
/* ── Typography polish ── */
@media (max-width: 760px) {
  input, select, textarea { font-size: 16px; }
  body { font-size: 15px; }
}
/* ── Skeleton loaders ── */
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 8px; }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 9%, transparent), transparent); animation: kmj-shimmer 1.3s infinite; }
@keyframes kmj-shimmer { 100% { transform: translateX(100%); } }
.skeleton-line { height: 12px; border-radius: 6px; margin: 8px 0; }
.skeleton-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; margin-bottom: 12px; display: flex; gap: 12px; align-items: flex-start; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
.skeleton-body { flex: 1; min-width: 0; }
@media (prefers-reduced-motion: reduce) { .skeleton::after { animation: none; } }
/* ── 2FA login dialog ── */
.kmj-2fa-dialog { width: min(400px, calc(100% - 24px)); border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); padding: 24px; box-shadow: var(--shadow-lg, 0 24px 70px rgba(0,0,0,.45)); }
.kmj-2fa-dialog::backdrop { background: rgba(0,0,0,.55); }
.kmj-2fa-dialog h2 { font-size: 1.15rem; margin-bottom: 8px; }
.kmj-2fa-dialog p { color: var(--text-secondary); font-size: .9rem; margin-bottom: 14px; line-height: 1.5; }
.kmj-2fa-dialog input { width: 100%; padding: 12px 14px; font-size: 18px; letter-spacing: 3px; text-align: center; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text); }
.kmj-2fa-err { color: var(--danger); font-size: .85rem; min-height: 18px; margin: 8px 0; font-weight: 600; }
.kmj-2fa-actions { display: flex; gap: 10px; }
.kmj-2fa-actions .btn { flex: 1; }
/* ── Security: QR, backup codes, sessions ── */
.kmj-qr { display: grid; place-items: center; padding: 12px; background: #fff; border-radius: 12px; width: max-content; margin: 12px auto; }
.kmj-qr img, .kmj-qr canvas, .kmj-qr svg { display: block; width: 180px; height: 180px; }
.kmj-backup-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.kmj-backup-codes code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px; text-align: center; font-family: ui-monospace, Menlo, monospace; font-size: .95rem; letter-spacing: 1px; }
.session-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.session-item:last-child { border-bottom: 0; }
.session-badge { font-size: .7rem; font-weight: 800; color: var(--primary); background: var(--primary-light); padding: 3px 8px; border-radius: 999px; }
/* ── Mobile text/layout polish ── */
.job-title, .job-company, .enterprise-shift strong, h1, h2, h3, .tg-job-title, .tg-job-sub, .enterprise-shift-meta, .job-meta { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .job-modal { padding: 12px; align-items: flex-start; }
  .job-modal-card { width: 100%; max-height: 92vh; padding: 18px; margin-top: 8px; }
  .kmj-support-dialog, .kmj-2fa-dialog { width: calc(100% - 20px); }
  .two-col { grid-template-columns: 1fr; }
  .btn { white-space: normal; }
}
/* ── Profil Zaufany signing ── */
.pz-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.pz-sign-btn { display: inline-flex; align-items: center; gap: 8px; background: #0b8457; color: #fff; border: 0; border-radius: 10px; padding: 9px 14px; font-weight: 800; font-size: .85rem; cursor: pointer; transition: transform .1s ease, background .15s ease; text-decoration: none; white-space: nowrap; }
.pz-sign-btn::before { content: '🛡'; font-size: .95rem; line-height: 1; }
.pz-sign-btn:hover { background: #0a7049; }
.pz-sign-btn:active { transform: scale(.96); }
.pz-sign-btn:disabled { opacity: .6; cursor: default; }
.pz-signed { display: inline-flex; align-items: center; gap: 6px; color: #0b8457; font-weight: 800; font-size: .82rem; }