@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #f7f9fc;
  --card: #ffffff;
  --primary: #4f7cff;
  --accent: #ff7a18;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(79, 124, 255, 0.08);
  --shadow-soft: 0 4px 16px rgba(15, 23, 42, 0.05);
  --border: #e5e7eb;
  --muted: #6b7280;
  --text: #111827;
  --employee-bottom-nav-height: 78px;
  --employee-bottom-safe-gap: calc(var(--employee-bottom-nav-height) + max(env(safe-area-inset-bottom), 12px) + 16px);
  --employee-bonus-widget-bottom: calc(var(--employee-bottom-nav-height) + max(env(safe-area-inset-bottom), 0px) + 14px);
  --employee-bonus-modal-bottom: calc(var(--employee-bottom-nav-height) + max(env(safe-area-inset-bottom), 0px) + 18px);
  --admin-sidebar-width: 258px;
  --admin-sidebar-collapsed-width: 80px;
}

* { box-sizing: border-box; }
body { font-family: Inter, Arial, sans-serif; margin: 0; background: var(--bg); color: var(--text); line-height: 1.45; }
body.employee-view { padding-bottom: var(--employee-bottom-safe-gap); }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.25; color: #0f172a; }
h1 { font-size: clamp(1.7rem, 2.8vw, 2rem); font-weight: 700; }
h2 { font-size: clamp(1.2rem, 2vw, 1.45rem); font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 10px; }
a { color: var(--primary); text-decoration: none; }
.container {
  max-width: 1180px;
  margin: 24px auto;
  background: var(--card);
  padding: 24px;
  border-radius: 18px;
  border: 1px solid #eef2f7;
  box-shadow: var(--shadow-soft);
}
.header {
  background: #ffffff;
  color: #1f2937;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e9edf5;
}
.header a { color: #334155; margin-right: 12px; text-decoration: none; }
.brand { font-weight: 700; letter-spacing: 0.01em; }
.user-pill {
  background: #eef2ff;
  color: #334155;
  padding: 7px 12px;
  border-radius: 999px;
  margin-right: 12px;
  font-size: 12px;
  font-weight: 500;
}
.inline-form { display: inline; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card {
  border: 1px solid #edf1f7;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}
button {
  background: var(--primary);
  color: #fff;
  border: 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  min-height: 44px;
}
button.secondary, .button.secondary {
  background: #64748b;
  color: #ffffff;
}
button.secondary:hover,
.button.secondary:hover,
button.secondary:focus-visible,
.button.secondary:focus-visible {
  background: #475569;
}
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  min-height: 44px;
}
.button.success { background: var(--success); }
.button.danger { background: var(--danger); }
.button.warning { background: var(--warning); }
button.success { background: var(--success); }
button.danger { background: var(--danger); }
button.warning { background: var(--warning); }
button:disabled,
.button[aria-disabled="true"],
.button:disabled {
  cursor: not-allowed;
  opacity: .58;
  filter: saturate(0.7);
}

button:active, .button:active { transform: scale(0.97); }
.card { transition: transform .2s ease, box-shadow .2s ease; }
@media (hover:hover) {
  .card:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(15, 23, 42, 0.1); }
}

table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { border-bottom: 1px solid #eef2f7; padding: 11px 9px; text-align: left; vertical-align: top; }
th a { color: #0f172a; text-decoration: none; }
.badge { padding: 3px 9px; border-radius: 999px; color: #fff; font-size: 12px; text-transform: lowercase; }
.badge.pending { background: var(--warning); }
.badge.approved, .badge.issued, .badge.inbox-valid, .badge.inbox-processed { background: var(--success); }
.badge.rejected, .badge.inbox-invalid, .badge.inbox-failed, .badge.inbox-rejected { background: var(--danger); }
.badge.cancelled, .badge.inbox-duplicate { background: #64748b; }
.badge.inbox-pending { background: var(--warning); }
.badge.inbox-dry-run { background: #6f42c1; }
.error { background: #fff0f0; color: #a30000; padding: 10px; border-radius: 10px; }
.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(60% 55% at 8% 10%, rgba(79, 124, 255, 0.22), transparent 72%),
    radial-gradient(58% 48% at 94% 18%, rgba(255, 122, 24, 0.16), transparent 72%),
    linear-gradient(180deg, #f4f7ff 0%, #eef3ff 45%, #f9fbff 100%);
}
.auth-layout {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 3.4vw, 34px);
}
.auth-layout::before,
.auth-layout::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(1px);
  z-index: 0;
}
.auth-layout::before {
  width: clamp(220px, 32vw, 440px);
  height: clamp(220px, 32vw, 440px);
  top: clamp(-90px, -6vw, -20px);
  left: clamp(-80px, -3vw, 12px);
  background: radial-gradient(circle, rgba(79, 124, 255, 0.27) 0%, rgba(79, 124, 255, 0) 72%);
  animation: auth-orb-shift 18s ease-in-out infinite alternate;
}
.auth-layout::after {
  width: clamp(260px, 36vw, 500px);
  height: clamp(260px, 36vw, 500px);
  bottom: clamp(-170px, -9vw, -40px);
  right: clamp(-130px, -5vw, 0px);
  background: radial-gradient(circle, rgba(255, 122, 24, 0.2) 0%, rgba(255, 122, 24, 0) 72%);
  animation: auth-orb-shift 22s ease-in-out infinite alternate-reverse;
}
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 251, 255, 0.92) 100%);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(203, 215, 237, 0.7);
  border-radius: 26px;
  box-shadow: 0 26px 64px rgba(15, 23, 42, 0.14), 0 10px 26px rgba(79, 124, 255, 0.13);
  padding: clamp(22px, 4vw, 34px);
  animation: auth-card-enter .58s cubic-bezier(.2, .7, .15, 1) both;
}
.auth-header { margin-bottom: 16px; }
.auth-brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(79, 124, 255, 0.16), rgba(255, 122, 24, 0.2));
  margin: 0 0 10px;
}
.auth-brand-name {
  margin-bottom: 8px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.01em;
}
.auth-subtitle {
  color: #4b556b;
  margin: 0 0 9px;
}
.auth-security-note {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}
.form-grid { display: grid; gap: 12px; }
.auth-form label {
  font-size: 14px;
  color: #334155;
  font-weight: 600;
}
.auth-form label input {
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background-color .2s ease;
}
.auth-form label input:focus-visible {
  border-color: color-mix(in srgb, var(--primary) 65%, #dbeafe);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, white 82%), 0 8px 18px rgba(37, 99, 235, 0.14);
  background: #fff;
  transform: translateY(-1px);
  outline: none;
}
label input, select, textarea { width: 100%; margin-top: 6px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; font-family: inherit; min-height: 50px; font-size: 16px; }
.auth-form button {
  width: 100%;
  border-radius: 12px;
  min-height: 50px;
  margin-top: 6px;
  background: linear-gradient(95deg, color-mix(in srgb, var(--primary) 88%, #ffffff 12%), color-mix(in srgb, var(--accent) 80%, #ffffff 20%));
  box-shadow: 0 12px 24px rgba(79, 124, 255, 0.28);
  transition: transform .2s ease, filter .25s ease, box-shadow .25s ease, background-position .35s ease;
  background-size: 140% 140%;
  background-position: 0% 50%;
}
.auth-form button:hover,
.auth-form button:focus-visible {
  transform: translateY(-1px);
  filter: saturate(1.05);
  box-shadow: 0 14px 30px rgba(79, 124, 255, 0.34);
  background-position: 70% 50%;
}
.auth-form button:active {
  transform: translateY(1px) scale(0.99);
}
.auth-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0 6px;
}
.auth-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #dae4f4;
  background: rgba(255, 255, 255, 0.72);
  color: #475569;
  font-size: 12px;
  font-weight: 500;
}
.auth-register-hint {
  margin-top: 14px;
  font-size: 13px;
}
.auth-register-hint a {
  font-weight: 600;
  color: #1e40af;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--primary) 60%, transparent);
  text-underline-offset: 2px;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.auth-register-hint a:hover,
.auth-register-hint a:focus-visible {
  color: color-mix(in srgb, var(--primary) 84%, #0f172a 16%);
  text-decoration-color: currentColor;
}
.auth-demo-hint {
  margin-top: 12px;
  border: 1px solid #dce6f8;
  border-radius: 12px;
  background: rgba(241, 245, 255, 0.72);
  padding: 9px 11px;
  font-size: 12px;
  color: #58667a;
}
.auth-hint { text-align: center; margin-top: 14px; }
.hint { color: var(--muted); font-size: 13px; }
@keyframes auth-card-enter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes auth-orb-shift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(12px, -12px, 0) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-layout::before,
  .auth-layout::after,
  .auth-card {
    animation: none;
  }
  .auth-form button,
  .auth-form label input,
  .auth-register-hint a {
    transition: none;
  }
}
.list { list-style: none; padding: 0; margin: 0; }
.list li { border: 1px solid #edf1f7; padding: 12px; border-radius: var(--radius-sm); margin-bottom: 10px; background: var(--card); }
.row-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.progress { height: 12px; background:#e9edf7; border-radius:999px; overflow:hidden; margin-bottom: 16px; }
.progress > div { height:100%; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .8s ease; }
.level-card .progress {
  height: 16px;
  background: #ecf2ff;
}
.level-card .progress > div {
  background: linear-gradient(90deg, #4f7cff 0%, #6d8fff 45%, #8ab0ff 100%);
}
.empty-state {
  padding: 20px;
  border: 1px dashed #d7dfef;
  border-radius: var(--radius);
  color: #64748b;
  background: #f9fbff;
  text-align: center;
}
.notification-unread { border-left: 4px solid var(--primary); background: #eef4ff; }
.notification-read { opacity: 0.85; }
.row-form input, .row-form select { width: auto; margin-top: 0; }
.alert { padding: 10px; border-radius: 6px; margin-bottom: 12px; }
.alert-error { background: #ffe3e3; color: #a30000; }
.alert-success { background: #e6ffef; color: #0f6b34; }
pre { white-space: pre-wrap; word-break: break-word; background: #f7f7f7; padding: 10px; border-radius: 6px; }
.muted { color: var(--muted); }
.metric { font-size: 30px; font-weight: 700; margin: 4px 0 8px; }
.flash {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 500;
}
.flash.error {
  color: #9f1239;
  background: #fff1f2;
  border-color: #fecdd3;
}
.flash.success {
  color: #166534;
  background: #ecfdf3;
  border-color: #bbf7d0;
}
.account-context-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: #f1f5ff;
  color: #1f3a8a;
  border-radius: 999px;
  border: 1px solid #d9e4ff;
  font-size: 13px;
}
.account-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: #475569;
  font-size: 13px;
}
.account-breadcrumbs a { color: #334155; font-weight: 600; }
.account-filter {
  padding: 12px 14px;
  border: 1px solid #e4ebf7;
  border-radius: 14px;
  background: #fbfdff;
  margin-bottom: 14px;
}
.account-kpi-grid .kpi-card {
  border-radius: 18px;
  border-color: #e9effb;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
}
.owner-home-hero {
  border-radius: 20px;
  border: 1px solid #dbe7fb;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  margin-bottom: 14px;
}
.owner-home-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
}
.owner-home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.owner-context-card {
  margin-bottom: 14px;
  border-radius: 16px;
  border: 1px solid #dbe7fb;
  background: #f8fbff;
}
.owner-context-card h3 {
  margin: 4px 0 8px;
}
.owner-context-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.organization-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.organization-card {
  border-radius: 18px;
  border: 1px solid #e6edf8;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background-color .22s ease;
}
.organization-card__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.organization-card__head h3 {
  margin: 0;
  color: #0f172a;
}
.organization-card__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.organization-card__stats div {
  border: 1px solid #e9eef8;
  background: #f8faff;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.organization-card__stats strong { font-size: 20px; line-height: 1; }
.organization-card__admins { margin: 12px 0; min-height: 38px; }
.organization-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.organization-card__actions .button,
.organization-card__actions button {
  min-height: 42px;
  border-radius: 12px;
}
.organization-card.is-selected {
  border-color: #cddcfe;
  box-shadow: 0 14px 28px rgba(59, 130, 246, 0.16);
}
.account-analytics-period-card {
  border-radius: 18px;
  border: 1px solid #e6edf8;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  margin-bottom: 16px;
}
.account-org-comparison {
  border-radius: 18px;
  border: 1px solid #e6edf8;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.account-org-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.account-org-actions .button,
.account-org-actions button {
  min-height: 36px;
  border-radius: 10px;
}
.account-signals {
  margin-top: 16px;
  border-radius: 18px;
  border: 1px solid #e6edf8;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.account-signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.account-signal-grid article {
  border: 1px solid #e8eef9;
  background: #f8fbff;
  border-radius: 12px;
  padding: 10px 12px;
}
.account-signal-grid h3 {
  margin: 0 0 6px;
  font-size: 14px;
}
.account-signal-grid p {
  margin: 0;
  color: #1e293b;
}
.premium-empty-state {
  border-style: solid;
  border-color: #e3ebfa;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
  border-radius: 20px;
  padding: 30px 20px;
}
.premium-empty-state p {
  margin: 8px auto 16px;
  color: #334155;
  max-width: 720px;
}
.premium-form-panel {
  border-radius: 20px;
  border: 1px solid #e6edf8;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
}
.account-form-grid { gap: 14px; }
.trust-block {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #dbe6fb;
  background: #f8fbff;
}
.trust-block h3 { margin-bottom: 8px; font-size: 15px; }
.trust-block ul { margin: 0; padding-left: 18px; color: #334155; }
.account-admin-grid { align-items: start; }
.admin-list {
  display: grid;
  gap: 10px;
}
.admin-list-item {
  border: 1px solid #e5edf9;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.fade-in {
  animation: card-fade-in .24s ease both;
}
@keyframes card-fade-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (hover:hover) {
  .organization-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
    border-color: #d7e3fa;
    background: #ffffff;
  }
}
.assistant-card {
  margin-bottom: 14px;
  border-radius: 18px;
  border: 1px solid #e1eaf8;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
}
.assistant-card--attention { border-color: #fde68a; background: linear-gradient(180deg, #fffdf5 0%, #fff9eb 100%); }
.assistant-card--success { border-color: #bbf7d0; background: linear-gradient(180deg, #f7fef9 0%, #ecfdf3 100%); }
.assistant-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.assistant-card__head h2 { margin: 2px 0 6px; }
.assistant-actions {
  display: grid;
  gap: 10px;
}
.assistant-action {
  border: 1px solid #e3ebf8;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.assistant-action--blocker,
.assistant-action--high { border-left: 4px solid #f59e0b; }
.assistant-action--medium { border-left: 4px solid #4f7cff; }
.assistant-action--low { border-left: 4px solid #94a3b8; }
.assistant-action__content h3 {
  margin: 0 0 4px;
  font-size: 15px;
}
.assistant-action__content p {
  margin: 0;
  color: #475569;
}
.assistant-more {
  margin-top: 10px;
  border-top: 1px dashed #dbe6f9;
  padding-top: 10px;
}
.assistant-more summary {
  cursor: pointer;
  font-weight: 600;
  color: #334155;
}
.assistant-more__list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}
.assistant-calm-state h3 {
  margin: 0 0 6px;
}
@media (max-width: 780px) {
  .organization-card__stats { grid-template-columns: 1fr; }
  .assistant-action {
    flex-direction: column;
    align-items: stretch;
  }
}

.page-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }

 .rewards-subnav {
  position: sticky;
  top: 70px;
  z-index: 14;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid #e3eaf8;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
}
.rewards-subnav__context-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.rewards-subnav__context,
.rewards-subnav__divider {
  color: var(--muted);
  font-size: 12px;
}
.rewards-subnav__section {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}
.rewards-subnav__tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.rewards-subnav a {
  border: 1px solid #dbe5fb;
  background: #f8faff;
  color: #334155;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.rewards-subnav a.active,
.rewards-subnav a:hover {
  background: #e0e9ff;
  border-color: #c9d8ff;
  color: #1e3a8a;
}
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi-card { position: relative; overflow: hidden; }
.kpi-card::after {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(79,124,255,.18), rgba(79,124,255,0));
}
.kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef3ff;
  color: var(--primary);
}
.kpi-card .label { color: var(--muted); font-size: 13px; }
.kpi-card .value { font-size: 32px; font-weight: 700; margin-top: 8px; }
.kpi-card .delta { color: var(--muted); font-size: 13px; }
.quick-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 6px; }
.split-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; }
.activity-list li { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.activity-timeline-card {
  display: grid;
  gap: 14px;
}
.activity-filter-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}
.activity-filter-toolbar select {
  min-width: 220px;
  margin: 0;
}
.activity-timeline-list {
  list-style: none;
  margin: 0;
  padding: 6px 0 0;
  display: grid;
  gap: 12px;
}
.activity-timeline-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
}
.activity-timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #4f7cff 0%, #6da0ff 100%);
  margin-top: 10px;
  box-shadow: 0 0 0 4px #eef3ff;
}
.activity-timeline-content {
  border: 1px solid #e6ecf7;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fbfdff;
  display: grid;
  gap: 8px;
}
.activity-timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.activity-timeline-content h3 {
  margin: 0;
  font-size: 17px;
}
.activity-timeline-content p {
  margin: 0;
}
.activity-timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}
.button.small {
  font-size: 12px;
  padding: 6px 10px;
}
.soft-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px #fed7aa;
}

.admin-topbar {
  position: fixed;
  top: 0;
  left: var(--admin-sidebar-width);
  right: 0;
  min-height: 72px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #e6ecf7;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 25;
  transition: left .2s ease, padding .2s ease;
}
.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.org-switcher-form select {
  min-width: 220px;
  max-width: 280px;
  margin-bottom: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}


.admin-mobile-title {
  display: grid;
  gap: 2px;
  color: #1e293b;
}

.admin-mobile-title strong { font-size: 1rem; }
.admin-mobile-title .muted { font-size: 12px; }

.actions-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions-wrap .button,
.actions-wrap button {
  width: auto;
}
.admin-menu-toggle {
  display: none;
  background: #f8fbff;
  color: #334155;
  border: 1px solid #dbe3f4;
  border-radius: 12px;
  min-width: 44px;
}
.admin-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  opacity: 0;
  transition: opacity .25s ease;
  z-index: 28;
}
.admin-drawer-overlay.open { opacity: 1; }
.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--admin-sidebar-width);
  padding: 20px 14px;
  background: #f8faff;
  border-right: 1px solid #e7edf8;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  overflow: hidden;
  box-shadow: 3px 0 20px rgba(15, 23, 42, 0.05);
  z-index: 30;
  transition: width .2s ease, padding .2s ease;
}
.admin-sidebar a { color: #475569; display: flex; align-items: center; gap: 10px; padding: 12px 12px; margin: 3px 0; border-radius: 12px; font-weight: 500; }
.admin-sidebar a.active, .admin-sidebar a:hover { background: #e0e9ff; color: #1e3a8a; box-shadow: inset 0 0 0 1px #c9d8ff; }
.admin-sidebar a.active { font-weight: 700; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 8px; }
.sidebar-collapse-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid #dbe3f4;
  border-radius: 10px;
  background: #f8fbff;
  color: #475569;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.sidebar-collapse-toggle:hover {
  background: #eef4ff;
  border-color: #c9d8ff;
  color: #1e3a8a;
}
.sidebar-collapse-toggle:active {
  background: #e4edff;
  box-shadow: inset 0 0 0 1px #c9d8ff;
}
.sidebar-collapse-toggle .expand-icon { display: none; }
.admin-sidebar i[data-lucide] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}
.sidebar-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid #e7edf8; }
.sidebar-group:first-of-type { margin-top: 8px; }
.sidebar-group summary {
  list-style: none;
  cursor: pointer;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 0 12px 6px;
}
.sidebar-group summary::-webkit-details-marker { display: none; }
.sidebar-group.has-active summary { color: #1e3a8a; }
.sidebar-group > a { margin-left: 6px; }
.sidebar-footer { margin-top: 10px; display: grid; gap: 8px; flex-shrink: 0; }
.sidebar-footer .user-pill { margin: 0; }
.sidebar-footer .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.admin-drawer-close { display: none; }

body:has(.admin-shell) .container {
  margin-top: 92px;
  margin-left: calc(var(--admin-sidebar-width) + 24px);
  margin-right: 24px;
  width: auto;
  max-width: none;
  transition: margin-left .2s ease;
}
body.sidebar-collapsed .admin-topbar { left: var(--admin-sidebar-collapsed-width); }
body.sidebar-collapsed:has(.admin-shell) .container { margin-left: calc(var(--admin-sidebar-collapsed-width) + 24px); }

@media (min-width: 921px) {
  body.sidebar-collapsed .admin-sidebar {
    width: var(--admin-sidebar-collapsed-width);
    padding: 18px 8px;
  }
  body.sidebar-collapsed .sidebar-top .admin-mobile-title,
  body.sidebar-collapsed .sidebar-nav .nav-label,
  body.sidebar-collapsed .sidebar-nav .sidebar-group summary,
  body.sidebar-collapsed .sidebar-footer .nav-label {
    display: none;
  }
  body.sidebar-collapsed .sidebar-nav .sidebar-group {
    margin-top: 8px;
    padding-top: 4px;
    border-top-color: transparent;
  }
  body.sidebar-collapsed .sidebar-nav .sidebar-group > a {
    margin-left: 0;
  }
  body.sidebar-collapsed .admin-sidebar a,
  body.sidebar-collapsed .sidebar-collapse-toggle,
  body.sidebar-collapsed .sidebar-footer .secondary,
  body.sidebar-collapsed .sidebar-footer .user-pill {
    justify-content: center;
    gap: 0;
    padding-left: 8px;
    padding-right: 8px;
  }
  body.sidebar-collapsed .sidebar-top {
    justify-content: center;
    margin-bottom: 10px;
  }
  body.sidebar-collapsed .admin-sidebar a {
    width: 100%;
  }
  body.sidebar-collapsed .sidebar-collapse-toggle .collapse-icon { display: none; }
  body.sidebar-collapsed .sidebar-collapse-toggle .expand-icon { display: inline; }
  body.sidebar-collapsed .sidebar-footer {
    gap: 6px;
  }
}

.table-shell { border: 1px solid #edf1f7; border-radius: var(--radius); overflow: hidden; }
.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; color: var(--muted); }
.rewards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.reward-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }

.achievement-grid, .mission-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.achievement-card { background: #fffbf5; border: 1px solid #ffe9d6; }
.mission-card .progress { margin-top: 8px; margin-bottom: 8px; }
.leaderboard-preview td:first-child { font-weight: 700; color: var(--primary); }


.employee-header-shell {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 8px 0 6px;
}
.employee-header-shell .brand {
  text-decoration: none;
}
.employee-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.employee-header-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.employee-brand {
  display: inline-flex;
  align-items: center;
  font-size: clamp(1.05rem, 2.3vw, 1.22rem);
  font-weight: 900;
  letter-spacing: .025em;
  color: #0f172a;
}
.employee-header-subtitle {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 500;
  padding-left: 2px;
}
.employee-badge {
  margin-right: 0;
  max-width: min(56vw, 300px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 12px;
  padding: 7px 11px;
  background: #f7faff;
  border: 1px solid #d7e3ff;
  color: #1e293b;
}
.employee-name {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.employee-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  border-radius: 11px;
  font-size: 20px;
  line-height: 1;
  background: #e9efff;
  border: 1px solid #b8caf8;
  color: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.employee-bottom-nav {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: max(env(safe-area-inset-bottom), 10px);
  z-index: 35;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e4ebf8;
  border-radius: 18px;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.1);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 7px;
}

.employee-bottom-nav a {
  min-height: 52px;
  border-radius: 999px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-right: 0;
  text-align: center;
  line-height: 1.15;
}
.employee-bottom-nav a span { font-size: 16px; line-height: 1; transition: transform .2s ease, text-shadow .2s ease; }
.employee-bottom-nav a.active {
  color: #1d4ed8;
  background: #e2ebff;
  box-shadow: inset 0 0 0 1px #cddcff, 0 6px 14px rgba(59, 130, 246, 0.22);
}
.employee-bottom-nav a.active span {
  transform: scale(1.08);
  text-shadow: 0 1px 8px rgba(59, 130, 246, 0.45);
}

.employee-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 36;
  opacity: 0;
  transition: opacity .25s ease;
}
.employee-drawer-overlay.open { opacity: 1; }
.employee-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(84vw, 320px);
  height: 100vh;
  background: #fff;
  z-index: 37;
  box-shadow: -6px 0 24px rgba(15, 23, 42, 0.16);
  transform: translateX(104%);
  transition: transform .25s ease;
  padding: 18px 14px;
}
.employee-drawer.open { transform: translateX(0); }
.employee-drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.employee-drawer-links { display: grid; gap: 10px; }
.employee-drawer-links a,
.employee-drawer-links button {
  background: #f8fbff;
  border: 1px solid #e5ecfa;
  border-radius: 12px;
  color: #334155;
  min-height: 46px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  font-weight: 600;
}

.employee-drawer-links .inline-form {
  display: block;
}

.employee-drawer-links .inline-form button {
  width: 100%;
  justify-content: flex-start;
  background: #fff5f5;
  border-color: #ffd5d5;
  color: #b42318;
}

.level-indicator { font-size: 1.05rem; margin-bottom: 8px; }

.hero-action {
  margin-top: 0;
  background: linear-gradient(135deg, #fff5c0 0%, #fcd34d 55%, #f59e0b 100%);
  color: #5b3200;
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 14px 24px rgba(245, 158, 11, 0.28);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.hero-action:hover,
.hero-action:focus-visible {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 18px 30px rgba(245, 158, 11, 0.36);
  filter: brightness(1.03);
}

.points-hero {
  background: linear-gradient(140deg, #4f7cff 0%, #5f8dff 60%, #7aa6ff 100%);
  color: #fff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 12px 26px rgba(79, 124, 255, 0.24);
  border: 1px solid rgba(255,255,255,.22);
}
.points-hero .hero-value {
  font-size: clamp(3rem, 8vw, 4rem);
  font-weight: 800;
  margin: 0;
  letter-spacing: .03em;
  line-height: 1.05;
  text-shadow: 0 10px 20px rgba(15, 23, 42, 0.3);
}
.points-hero .hero-helper {
  margin-top: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, .92);
}
.level-card {
  background: linear-gradient(180deg, #fff9f2 0%, #fffefb 100%);
  border: 1px solid #ffe1bf;
  box-shadow: var(--shadow-soft);
}
.level-next {
  border: 1px dashed #fdba74;
  background: #fff6eb;
  color: #9a3412;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
  font-size: 14px;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.mission-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #e4ecff;
}
.mission-state {
  font-size: 12px;
  border-radius: 999px;
  padding: 4px 9px;
  font-weight: 600;
}
.mission-state--progress { background: #eef3ff; color: #3451a6; }
.mission-state--almost { background: #fff7ed; color: #9a3412; }
.mission-state--done { background: #ecfdf3; color: #166534; }
.mission-progress-line {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #64748b;
}
.mission-card--almost { border-color: #ffd8ac; }
.mission-card--done { border-color: #bdebcf; background: linear-gradient(180deg, #ffffff 0%, #f6fff9 100%); }
.mission-card .progress {
  height: 14px;
  background: #e7eefc;
}


.streak-card-panel {
  background: linear-gradient(180deg, #fff8f1 0%, #fffdf9 100%);
  border: 1px solid #ffd8b5;
}

.streak-card {
  margin-top: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  padding: 12px;
}
.streak-head { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.streak-text { margin: 8px 0 4px; color: #9a3412; }
.streak-helper { margin: 0; color: #b45309; font-size: 13px; }

.season-progress-card {
  border: 1px solid #e3ecff;
  border-radius: 14px;
  padding: 16px;
  background: #f8fbff;
}
.season-meta { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 13px; color: #475569; }
.season-rank {
  background: #eaf1ff;
  border: 1px solid #d6e4ff;
  color: #1e3a8a;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 14px;
}

.mission-card--almost {
  animation: almostPulse 1.8s ease-in-out infinite;
}
@keyframes almostPulse {
  0%,100% { box-shadow: 0 4px 14px rgba(245, 158, 11, 0.12); }
  50% { box-shadow: 0 8px 22px rgba(245, 158, 11, 0.28); }
}

.celebrate-pop::before {
  content: '🎉 ✨ 🎁';
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 60;
  background: #ffffff;
  border: 1px solid #dce6ff;
  border-radius: 999px;
  padding: 8px 12px;
  box-shadow: 0 10px 20px rgba(15,23,42,.16);
  animation: fadeCelebrate 1.4s ease forwards;
}
@keyframes fadeCelebrate {
  0% { transform: translateY(-8px) scale(.9); opacity: 0; }
  20% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-10px) scale(1.02); opacity: 0; }
}

.reward-status { margin-top: 10px; border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.reward-status-ok { background: #ebfff1; color: #166534; }
.reward-status-almost { background: #fff6ea; color: #9a3412; }
.reward-status-low { background: #f1f5f9; color: #475569; }
.reward-card--affordable { border-color: #c9efdb; background: linear-gradient(180deg, #ffffff 0%, #f5fff9 100%); }
.reward-card--almost { border-color: #ffd8af; }
.reward-card--locked { border-color: #dbe3ef; }

.engagement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.engagement-title { margin-bottom: 6px; color: #0f172a; }
.challenge-card { border-color: #ffd5b3; background: linear-gradient(180deg, #fffdfa 0%, #fff5ec 100%); }
.team-mission-card { border-color: #d6e5ff; background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%); }
.bonus-card { border-color: #ffe3bf; background: linear-gradient(180deg, #fffefb 0%, #fff8ee 100%); }
.motivation-card {
  border-color: #dce8ff;
  background: linear-gradient(135deg, #f8fbff 0%, #f1f7ff 55%, #eef3ff 100%);
  margin-bottom: 16px;
}
.motivation-main {
  margin: 6px 0 8px;
  font-weight: 700;
  color: #1e3a8a;
}
.shop-motivation { margin-bottom: 14px; }

.points-toast-stack {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: grid;
  gap: 8px;
  width: min(92vw, 360px);
}
.points-toast {
  background: #ffffff;
  border: 1px solid #dce6ff;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  padding: 12px 14px;
  transform: translateY(-18px);
  opacity: 0;
  transition: all .25s ease;
}
.points-toast.show {
  transform: translateY(0);
  opacity: 1;
}
.points-toast-title { font-weight: 700; color: #1e3a8a; }
.points-toast-sub { font-size: 13px; color: #64748b; }
.points-toast--celebrate {
  border-color: #ffd7a8;
  box-shadow: 0 14px 32px rgba(249, 115, 22, 0.22);
}

.leaderboard-card { overflow: hidden; }
.table-compact th,
.table-compact td { padding: 12px 10px; }
.rank-row { transition: background .2s ease; }
.rank-row.rank-1 {
  background: linear-gradient(90deg, #fff8dc 0%, #fff2b8 100%);
  border-left: 4px solid #eab308;
}
.rank-row.rank-2 { background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%); border-left: 4px solid #94a3b8; }
.rank-row.rank-3 { background: linear-gradient(90deg, #fff5ec 0%, #ffedd5 100%); border-left: 4px solid #fb923c; }
.rank-cell {
  font-weight: 700;
  font-size: 16px;
}
.rank-name {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rank-highlight {
  background: #fff;
  border: 1px solid #f6d365;
  color: #854d0e;
  border-radius: 999px;
  font-size: 11px;
  padding: 2px 8px;
  font-weight: 700;
}

.empty-state {
  padding: 22px;
  border: 1px dashed #d7dfef;
  border-radius: var(--radius);
  color: #64748b;
  background: linear-gradient(180deg, #f9fbff 0%, #f5f9ff 100%);
  text-align: center;
}
.empty-state strong { color: #1e3a8a; }

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title--center {
  justify-content: center;
  text-align: center;
}
.section-title .soft-icon { width: 30px; height: 30px; font-size: 14px; }
.section-title-inverse {
  color: #fff;
  font-weight: 600;
}
.section-title-inverse .soft-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.employee-page-title { margin-bottom: 20px; }

.dashboard-shell > .section-title,
.dashboard-shell > .empty-state,
.dashboard-shell > .mission-grid,
.dashboard-shell > .split-grid,
.dashboard-shell > .achievement-grid {
  margin-top: 18px;
}

.dashboard-shell > .section-title:first-of-type {
  margin-top: 0;
}
.points-pill {
  background: #fff7eb;
  border: 1px solid #ffdfbe;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: #9a3412;
}
.mission-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.achievement-title {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
  color: #0f172a;
}
.rewards-shop-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.reward-card { border-width: 1px; }
.reward-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}
.reward-emoji { margin-right: 4px; }
.reward-cost {
  font-weight: 700;
  font-size: 13px;
  color: #1e40af;
  background: #e8efff;
  border-radius: 999px;
  padding: 4px 9px;
  white-space: nowrap;
}


@media (max-width: 520px) {
  .auth-layout { padding: 14px; }
  .auth-card { padding: 22px 18px; border-radius: 18px; }
}

@media (max-width: 920px) {
  .split-grid { grid-template-columns: 1fr; }
  .admin-topbar {
    left: 0;
    min-height: 64px;
    padding: 10px 12px;
  }
  .admin-topbar-actions .user-pill { display: none; }
  .admin-topbar-actions .secondary { width: auto; min-width: 44px; }
  .admin-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .admin-drawer-close { display: inline-flex; }
  .admin-sidebar {
    transform: translateX(-102%);
    transition: transform .25s ease;
    width: min(84vw, 320px);
  }
  body.sidebar-collapsed .admin-sidebar {
    width: min(84vw, 320px);
    padding: 20px 14px;
  }
  body.sidebar-collapsed .sidebar-top .admin-mobile-title,
  body.sidebar-collapsed .sidebar-nav .nav-label,
  body.sidebar-collapsed .sidebar-nav .sidebar-group summary,
  body.sidebar-collapsed .sidebar-footer .nav-label {
    display: initial;
  }
  .sidebar-collapse-toggle { display: none; }
  .admin-sidebar.open { transform: translateX(0); }
  body:has(.admin-shell) .container {
    margin: 78px 10px 12px;
    width: auto;
    padding: 14px;
    border-radius: 14px;
  }
  .button, button { min-height: 46px; width: 100%; justify-content: center; }
  .actions-wrap .button, .actions-wrap button { width: 100%; }
  .quick-actions { width: 100%; }
  .quick-actions .button { flex: 1 1 100%; justify-content: center; }
  .cards,
  .kpi-grid,
  .engagement-grid,
  .mission-grid,
  .rewards-shop-grid { grid-template-columns: 1fr; gap: 12px; }
  .table-shell { overflow-x: auto; }
  table { min-width: 560px; }
  .header { padding: 0; align-items: flex-start; border-bottom: 0; background: transparent; }
  .employee-header-top,
  .reward-card-head,
  .mission-head,
  .page-title,
  .progress-label { flex-direction: column; align-items: flex-start; }
  .employee-bottom-nav { left: 8px; right: 8px; bottom: max(env(safe-area-inset-bottom), 8px); }
  .employee-bottom-nav a { min-height: 50px; font-size: 11px; }
  .employee-bottom-nav a.active span { transform: scale(1.06); }
  :root {
    --employee-bonus-widget-bottom: calc(var(--employee-bottom-nav-height) + max(env(safe-area-inset-bottom), 8px));
    --employee-bonus-modal-bottom: calc(var(--employee-bottom-nav-height) + max(env(safe-area-inset-bottom), 14px));
  }
  .bonus-floating-widget { right: 10px; }
  .bonus-widget-modal__sheet { right: 10px; width: min(320px, calc(100vw - 20px)); }
  .points-pill { width: 100%; border-radius: 12px; text-align: center; }
  .table-compact th,
  .table-compact td,
  .leaderboard-preview th,
  .leaderboard-preview td { padding: 14px 8px; font-size: 14px; }
  .progress { margin-bottom: 12px; height: 14px; }
  .container { margin: 14px; padding: 18px; border-radius: 14px; }
  .employee-header-top {
    flex-direction: row;
    align-items: center;
  }
  .employee-header-top-actions {
    margin-left: auto;
  }
  .employee-badge {
    max-width: 64vw;
  }
  .employee-header-subtitle {
    font-size: 12px;
  }
}


.primary-block-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-secondary-area {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e7eefb;
  opacity: .97;
}

.dashboard-secondary-title {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: center;
}

@media (min-width: 921px) {
  .progress-card,
  .next-reward-card,
  .today-focus-card {
    min-height: 100%;
  }
}

.gamified-home {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.dashboard-layer {
  margin-bottom: 14px;
}
.dashboard-layer--personal {
  display: grid;
  gap: 12px;
}
.dashboard-layer-title {
  margin-bottom: 2px;
}
.today-focus-card {
  border: 1px solid rgba(167, 139, 250, 0.34);
  background:
    radial-gradient(120% 120% at 14% 0%, rgba(129, 140, 248, 0.34) 0%, rgba(129, 140, 248, 0) 54%),
    linear-gradient(180deg, #23264b 0%, #1a1f3f 100%);
  box-shadow: 0 16px 34px rgba(8, 12, 33, 0.38);
}
.today-focus-card--spotlight {
  border-width: 1px;
  box-shadow:
    0 16px 34px rgba(8, 12, 33, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}
.today-focus-card .section-title {
  margin-bottom: 10px;
  color: #eef2ff;
  font-weight: 700;
}
.today-focus-card .section-title .soft-icon {
  background: rgba(255, 255, 255, 0.14);
  color: #eef2ff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.progress-card {
  border-color: #dce6ff;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
}
.progress-stack {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}
.progress-unit-title {
  margin: 0 0 6px;
  color: #0f172a;
}
.progress-unit {
  border: 1px solid #dde6f7;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
.today-list {
  margin: 8px 0 12px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.today-list li {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #ffe8ce;
  font-size: 14px;
}
.today-points {
  font-weight: 700;
  color: #9a3412;
  background: #fff3e1;
  border: 1px solid #ffd9ad;
  border-radius: 999px;
  width: fit-content;
  padding: 6px 12px;
}
.level-card--game .progress {
  height: 18px;
}
.mission-grid--compact .mission-card {
  padding: 14px;
}
.engagement-grid--preview {
  margin-top: 12px;
}
.history-achievements-grid {
  display: grid;
  gap: 12px;
}
.dashboard-accordion {
  border: 1px solid #dde6f7;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.dashboard-accordion-toggle {
  width: 100%;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
  border: 0;
  border-bottom: 1px solid #d9e5fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
}
.dashboard-accordion-toggle > span:first-child {
  display: grid;
  gap: 2px;
  text-align: left;
}
.dashboard-accordion-toggle .section-title {
  margin: 0;
  color: #0f172a;
}
.accordion-subtitle {
  font-size: 13px;
  color: #475569;
  font-weight: 500;
  padding-left: 38px;
}
.dashboard-accordion-toggle .accordion-arrow {
  color: #334155;
  transition: transform .25s ease;
}
.dashboard-accordion-toggle[aria-expanded='true'] .accordion-arrow {
  transform: rotate(180deg);
}
.dashboard-accordion-body {
  overflow: hidden;
  transition: height .28s ease;
  height: 0;
}
.dashboard-accordion-body > * {
  padding: 14px;
}
.rank-emphasis {
  font-size: 1.08rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: #0f172a;
}
.leaderboard-podium {
  margin-bottom: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}
.podium-card {
  text-align: center;
  padding: 14px;
  border: 1px solid #dde6f7;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.podium-place {
  font-size: 28px;
  margin-bottom: 4px;
}
.my-rank-row {
  outline: 2px solid #93c5fd;
  background: #eff6ff;
}

@media (max-width: 920px) {
  .leaderboard-podium,
  .primary-block-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-layer--personal,
  .task-sections-grid,
  .task-sections-grid--primary,
  .primary-block-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .dashboard-layer--personal > *,
  .task-sections-grid > *,
  .primary-block-grid > * {
    min-height: 0;
    height: auto;
    align-self: auto;
  }
  .dashboard-layer {
    margin-bottom: 10px;
  }
  .points-hero--game,
  .task-list-card,
  .today-focus-card,
  .progress-card,
  .next-reward-card {
    padding: 16px;
  }
  .dashboard-secondary-area {
    margin-top: 10px;
    padding-top: 10px;
  }
  .today-list {
    margin-bottom: 10px;
  }
  .achievement-grid .achievement-card {
    min-width: 200px;
  }
  .dashboard-accordion-toggle {
    padding: 12px 14px;
  }
  .dashboard-accordion-body > * {
    padding: 12px;
  }
  .today-list li {
    font-size: 15px;
  }

  .points-hero--game {
    padding: 22px 18px;
  }
  .hero-status-card .hero-helper {
    font-size: 14px;
  }
}


/* employee polish pass */
.progress {
  position: relative;
}
.progress > div,
.progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #4f7cff 0%, #7c9cff 55%, #9db9ff 100%);
  transition: width 1.1s cubic-bezier(.22,.61,.36,1);
}
.progress::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.28), rgba(255,255,255,0));
  pointer-events: none;
}

.today-mission-title {
  margin: 4px 0 8px;
  font-weight: 700;
  color: #9a3412;
}
.today-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.today-points {
  margin-top: 8px;
}

.hero-helper--secondary {
  margin-top: 0;
  font-weight: 500;
}
.hero-level-track {
  margin-top: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.06) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
}
.hero-level-line {
  font-size: 14px;
  color: rgba(246, 249, 255, 0.92);
  margin-bottom: 4px;
}
.progress--hero {
  height: 4px;
  margin: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.progress--hero .progress-fill {
  border-radius: inherit;
  background: linear-gradient(90deg, #8fb0ff 0%, #b7c9ff 100%);
}

.hero-status-card .badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(191, 219, 255, 0.16);
  border: 1px solid rgba(191, 219, 255, 0.22);
  color: rgba(236, 245, 255, 0.94);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
}
.next-reward-card {
  margin-bottom: 16px;
  border-color: #d7e6ff;
  background: linear-gradient(145deg, #fbfdff 0%, #f2f7ff 100%);
}
.next-reward-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.next-reward-status {
  margin: 6px 0 12px;
  color: #334155;
}
.next-reward-status--close {
  color: #b45309;
  font-weight: 600;
}
.next-reward-status--ready {
  color: #166534;
  font-weight: 700;
}

.mission-tone {
  margin: 0 0 8px;
  font-size: 13px;
  color: #64748b;
}
.mission-tone--almost {
  color: #b45309;
  font-weight: 700;
}
.mission-card--almost {
  border-width: 2px;
}

.achievement-card {
  position: relative;
  overflow: hidden;
  animation: achievementIn .45s ease both;
  padding: 12px;
  border-radius: 14px;
}
.achievement-card::after {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 68px;
  height: 68px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,165,0,.28), rgba(255,165,0,0));
}
.achievement-card--unlocked {
  border-color: #ffd99a;
  background: linear-gradient(180deg, #fffdf7 0%, #fff7e8 100%);
}
.achievement-card--locked {
  border-style: dashed;
  border-color: #d9e2f0;
  background: linear-gradient(180deg, #fbfcff 0%, #f6f8ff 100%);
  opacity: .82;
}
.achievement-status {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}


.achievements-scroll-wrap {
  display: grid;
  gap: 10px;
}
.achievement-grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  gap: 12px;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}
.achievement-grid .achievement-card {
  min-width: 220px;
  max-width: 240px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}
.achievement-grid::-webkit-scrollbar {
  height: 8px;
}
.achievement-grid::-webkit-scrollbar-thumb {
  background: #c9d6f5;
  border-radius: 999px;
}

@keyframes achievementIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.leaderboard-motivation-card {
  margin-bottom: 14px;
  border-color: #cfe0ff;
  background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
}
.leaderboard-preview-card--motivating {
  border-color: #d8e5ff;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}
.bonus-floating-widget {
  position: fixed;
  right: 16px;
  bottom: var(--employee-bonus-widget-bottom);
  z-index: 48;
  width: 52px;
  height: 52px;
  min-height: 52px;
  border-radius: 999px;
  border: 1px solid #ffe2bf;
  background: linear-gradient(180deg, #fff8ef 0%, #ffeedb 100%);
  color: #7c2d12;
  box-shadow: 0 12px 28px rgba(251, 146, 60, 0.28);
  display: grid;
  place-items: center;
  animation: bonusWidgetFloat 2.8s ease-in-out infinite;
}

.bonus-floating-widget__icon {
  font-size: 22px;
  line-height: 1;
}

.bonus-widget-modal {
  position: fixed;
  inset: 0;
  z-index: 55;
}

.bonus-widget-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.bonus-widget-modal__sheet {
  position: absolute;
  right: 16px;
  bottom: var(--employee-bonus-modal-bottom);
  width: min(320px, calc(100vw - 32px));
  border-radius: 14px;
  border: 1px solid #ffe0be;
  background: #fffaf3;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.28);
  padding: 14px;
}

.bonus-widget-modal__close {
  position: absolute;
  top: 6px;
  right: 6px;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 9px;
  background: #e2e8f0;
  color: #1f2937;
}

.bonus-widget-modal__points {
  margin: 8px 0 12px;
  color: #7c2d12;
  font-weight: 700;
}

@keyframes bonusWidgetFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px) scale(1.02); }
}
.podium-card.rank-1 {
  border: 2px solid #facc15;
  box-shadow: 0 10px 20px rgba(234, 179, 8, 0.2);
  transform: translateY(-6px);
}
.podium-card.rank-2 {
  border: 2px solid #cbd5e1;
  transform: translateY(-2px);
}
.podium-card.rank-3 { border: 2px solid #fdba74; }
.podium-card--me {
  transform: translateY(-2px);
}
.leaderboard-motivation-card .hint { margin: 4px 0 0; }
.podium-note {
  margin: 0;
  font-size: 12px;
  color: #1e3a8a;
  font-weight: 700;
}
.my-rank-row {
  box-shadow: inset 0 0 0 2px #93c5fd;
}

.reward-card--almost {
  border-width: 2px;
  box-shadow: 0 8px 20px rgba(251, 146, 60, 0.15);
}
.reward-helper {
  font-size: 12px;
  color: #64748b;
  margin: 7px 0 0;
}

.history-group + .history-group {
  margin-top: 10px;
}
.history-request-list,
.compact-points-history,
.notifications-list {
  display: grid;
  gap: 10px;
}
.history-row,
.history-points-card,
.notification-card {
  margin-bottom: 0 !important;
}
.history-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.history-row--approved,
.history-row--issued { border-left: 4px solid #22c55e; }
.history-row--pending { border-left: 4px solid #f59e0b; }
.history-row--rejected,
.history-row--cancelled { border-left: 4px solid #ef4444; }
.history-note {
  margin: 4px 0;
  font-size: 13px;
  color: #475569;
}
.history-points-card--plus { border-left: 4px solid #22c55e; background: #f7fff9; }
.history-points-card--minus { border-left: 4px solid #ef4444; background: #fff8f8; }
.history-type {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}
.notification-card.notification-unread {
  border-left-width: 4px;
}
.notification-tone--reward { background: #fff8ef; }
.notification-tone--points { background: #f0f7ff; }
.notification-tone--info { background: #f8fafc; }

.points-toast--success { border-color: #bbf7d0; }
.points-toast--levelup { border-color: #fcd34d; box-shadow: 0 14px 32px rgba(234, 179, 8, 0.25); }
.points-toast--reward { border-color: #fdba74; }

.task-filters { margin-bottom: 14px; }
.task-stats-grid .kpi-card .value { font-size: 26px; }
.task-title-cell { max-width: 280px; }
.task-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.task-status-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.task-status-active { background: #dcfce7; color: #166534; }
.task-status-archived { background: #e2e8f0; color: #334155; }
.task-status-inactive { background: #fef3c7; color: #92400e; }
.task-status-upcoming { background: #dbeafe; color: #1d4ed8; }
.task-status-expired { background: #fee2e2; color: #b91c1c; }
.task-form-grid { max-width: 860px; }
.task-form-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.task-checkbox { display: flex; align-items: center; gap: 8px; }
.task-checkbox input { width: auto; margin: 0; }
.task-assign-form { max-width: 620px; margin-bottom: 14px; }

/* employee dashboard tasks integration */
.today-focus-card .today-list {
  margin: 8px 0 12px;
  gap: 8px;
}
.today-focus-card .today-list--tasks li,
.today-focus-card #today-focus-list li {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #e8ecff;
  border: 1px solid rgba(196, 181, 253, 0.24);
  background: linear-gradient(180deg, rgba(67, 74, 128, 0.62) 0%, rgba(47, 53, 102, 0.62) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.today-focus-card .task-summary-title {
  margin: 10px 0 6px;
  font-size: 11px;
  color: rgba(225, 232, 255, 0.78);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.today-focus-card .today-points {
  margin-top: 12px;
  max-width: 100%;
  width: fit-content;
  color: #fef3c7;
  border: 1px solid rgba(251, 191, 36, 0.42);
  background: linear-gradient(180deg, rgba(161, 98, 7, 0.28) 0%, rgba(120, 53, 15, 0.22) 100%);
  border-radius: 999px;
  padding: 8px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.today-focus-card .today-list li:empty {
  display: none;
}
.task-sections-grid {
  margin-top: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.task-sections-grid--primary {
  margin: 6px 0 2px;
}

.dashboard-secondary-hint {
  text-align: center;
  margin: 0;
}

.mission-grid--secondary .mission-card {
  border-color: #e7edf8;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.task-list-card {
  border-color: #f3e8d3;
  background: linear-gradient(180deg, #fffdfa 0%, #fffefc 100%);
}
.task-list-card--team {
  border-color: #d7e4ff;
  background: linear-gradient(180deg, #f9fbff 0%, #ffffff 100%);
}
.task-cards-grid {
  display: grid;
  gap: 10px;
}
.task-card {
  border: 1px solid #e6edf8;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
.task-card--completed {
  border-color: #bdebcf;
  background: #f6fff9;
}
.task-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}
.task-state-badge {
  font-size: 12px;
  border-radius: 999px;
  padding: 4px 8px;
  white-space: nowrap;
  font-weight: 700;
}
.task-state-badge--active {
  background: #dbeafe;
  color: #1d4ed8;
}
.task-state-badge--done {
  background: #dcfce7;
  color: #166534;
}
.task-state-badge--almost {
  background: #fef3c7;
  color: #92400e;
}
.task-reward-line {
  margin: 8px 0 0;
  color: #334155;
}

@media (max-width: 920px) {
  .task-sections-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .dashboard-shell.gamified-home {
    padding: 14px;
  }
  .dashboard-accordion-toggle {
    padding: 11px 12px;
  }
  .dashboard-accordion-body > * {
    padding: 10px;
  }
}

.profile-head-grid { margin-bottom: 14px; }
.profile-avatar-slot {
  display: grid;
  gap: 10px;
  align-content: start;
  justify-items: center;
  text-align: center;
}
.avatar-uploader {
  padding-top: 22px;
  padding-bottom: 22px;
}
.avatar-preview-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 999px;
}
.avatar-placeholder,
.avatar-image {
  width: 110px;
  height: 110px;
  border-radius: 999px;
}
.avatar-placeholder {
  background: #eef3ff;
  color: #1e3a8a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
  border: 1px dashed #b6c8ff;
  box-shadow: 0 8px 20px rgba(79, 124, 255, 0.16);
}
.profile-content-grid { margin-bottom: 14px; }
.avatar-image {
  object-fit: cover;
  border: 1px solid #cbd5e1;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
  transition: transform .2s ease, box-shadow .2s ease;
}
.avatar-uploader:hover .avatar-image,
.avatar-uploader:hover .avatar-placeholder {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
}
.avatar-hover-overlay {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.avatar-uploader:hover .avatar-hover-overlay {
  opacity: 1;
}

.avatar-form {
  display: grid;
  gap: 8px;
  justify-items: center;
  width: 100%;
}
.avatar-file-input {
  width: 100%;
}
.js-enabled .avatar-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.file-btn,
.avatar-actions button {
  min-width: 160px;
  justify-content: center;
}
.file-btn {
  cursor: pointer;
}
.file-name {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  max-width: 100%;
  word-break: break-word;
}
.avatar-hint {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}
.avatar-actions {
  display: flex;
  justify-content: center;
  width: 100%;
}
.is-hidden {
  display: none !important;
}

.form-error {
  color: #b91c1c;
  margin: 0;
}

.form-success {
  color: #166534;
  margin: 0;
}

.hero-main-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.hero-medallion-block {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: -14px;
  position: relative;
  z-index: 2;
}
.hero-status-card .hero-helper {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  width: 100%;
}
.hero-profile-card {
  display: grid;
  gap: 5px;
  width: min(520px, 100%);
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 6px;
  opacity: .84;
}
.hero-action--primary {
  min-width: min(320px, 100%);
  justify-content: center;
  font-weight: 800;
  letter-spacing: .01em;
  box-shadow: 0 10px 30px rgba(255, 170, 0, 0.4);
}
.hero-action--primary:hover,
.hero-action--primary:focus-visible {
  transform: scale(1.03);
}
.hero-avatar--preset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
}
.hero-user-name {
  margin: 0;
  font-size: clamp(1.4rem, 2.3vw, 1.75rem);
  font-weight: 800;
  line-height: 1.1;
}
.hero-user-role {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}
.hero-user-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.hero-user-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.97);
}
.hero-user-badge--team {
  background: rgba(255, 255, 255, 0.18);
}

/* Employee dashboard hero (authoritative current layout) */
.points-hero--game {
  position: relative;
  overflow: hidden;
  padding: 24px 24px 22px;
}

.points-hero--game::after {
  content: '✨';
  position: absolute;
  right: 16px;
  top: 12px;
  font-size: 28px;
  opacity: .45;
}

.hero-status-card .section-title {
  margin: 0 0 2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(244, 247, 255, 0.93);
}

.hero-status-card .section-title .soft-icon {
  font-size: 14px;
  opacity: 0.86;
}

.hero-status-card .hero-value {
  font-size: clamp(2.55rem, 6.8vw, 3.4rem);
  line-height: 1.02;
  margin: 0;
  display: grid;
  gap: 6px;
  justify-items: center;
}

.hero-status-card .hero-value::before {
  content: 'доступно сейчас';
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.employee-profile-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.employee-profile-identity,
.employee-profile-summary,
.employee-profile-settings {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #e4ecff;
}
.employee-profile-page .stack-form {
  display: grid;
  gap: 12px;
}
.avatar-presets-fieldset {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
}
.avatar-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.avatar-preset-option {
  border: 1px solid #dbe4f5;
  border-radius: 10px;
  padding: 8px;
  display: grid;
  justify-items: center;
  gap: 6px;
  font-size: 12px;
}
.avatar-preset-chip,
.avatar-preset-live {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
}
.avatar-preset-live {
  width: 110px;
  height: 110px;
  font-size: 40px;
  border: none;
}
.avatar-preset--aurora { background: linear-gradient(135deg, #0ea5e9, #6366f1); }
.avatar-preset--sky { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.avatar-preset--mint { background: linear-gradient(135deg, #14b8a6, #22c55e); }
.avatar-preset--sunset { background: linear-gradient(135deg, #f97316, #fb7185); }
.avatar-preset--violet { background: linear-gradient(135deg, #8b5cf6, #d946ef); }
.avatar-preset--coral { background: linear-gradient(135deg, #f43f5e, #f59e0b); }

@media (max-width: 920px) {
  .hero-action--primary {
    width: 100%;
    min-width: 0;
  }

}

/* Employee dashboard hero visual upgrade (late authoritative override) */
.points-hero--game {
  position: relative;
  isolation: isolate;
  padding: clamp(20px, 3vw, 28px) clamp(16px, 3vw, 30px) 18px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background:
    radial-gradient(130% 110% at 20% -10%, rgba(110, 214, 255, 0.3) 0%, rgba(110, 214, 255, 0) 52%),
    radial-gradient(120% 100% at 85% 110%, rgba(180, 115, 255, 0.24) 0%, rgba(180, 115, 255, 0) 60%),
    linear-gradient(145deg, #322168 0%, #2a1d57 42%, #211748 100%);
  box-shadow: 0 20px 50px rgba(8, 6, 30, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  --hero-avatar-size: clamp(142px, 39vw, 188px);
}

.points-hero--game::after {
  content: none;
}

.hero-sparkles-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.16;
  background: url('/public/assets/effect-sparkles-overlay.png') right -10% top -22% / 72% auto no-repeat;
  mix-blend-mode: screen;
}

.points-hero--game .hero-main-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "medallion"
    "status"
    "cta"
    "profile";
  justify-items: center;
  gap: 14px;
}

.hero-medallion-block {
  grid-area: medallion;
  margin-bottom: -6px;
  z-index: 3;
  display: grid;
  justify-items: center;
  width: 100%;
}

.hero-avatar-wrap {
  flex: 0 0 auto;
  position: relative;
  width: var(--hero-avatar-size);
  height: var(--hero-avatar-size);
  border-radius: 999px;
  filter: drop-shadow(0 14px 24px rgba(8, 6, 30, 0.45));
}
.hero-avatar {
  position: absolute;
  top: 43%;
  left: 51%;
  width: 85%;
  height: 85%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.25);
}
.hero-avatar-medallion {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 145%;
  height: auto;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 3;
}

.hero-status-card {
  display: grid;
  justify-items: stretch;
  text-align: left;
  grid-area: status;
  position: relative;
  gap: 9px;
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 20px 16px 14px;
  border-radius: 18px;
  backdrop-filter: blur(12px);
  background: linear-gradient(168deg, rgba(90, 102, 226, 0.26) 0%, rgba(52, 63, 158, 0.2) 56%, rgba(28, 36, 95, 0.26) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 36px rgba(7, 12, 33, 0.35), 0 0 24px rgba(99, 119, 255, 0.14);
}

.hero-medallion-value {
  position: absolute;
  left: 50%;
  bottom: 11%;
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 0;
  transform: translateX(-50%);
  font-size: clamp(1.28rem, 3.4vw, 1.82rem);
  font-weight: 900;
  line-height: 0.8;
  color: #fef3c7;
  text-shadow: 0 2px 0 rgba(120, 54, 0, 0.92), 0 7px 14px rgba(38, 15, 0, 0.5);
  z-index: 6;
}

.hero-medallion-unit {
  font-size: clamp(0.48rem, 1vw, 0.66rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 0.8;
  text-transform: uppercase;
  color: #fff2dd;
}

.hero-status-card .hero-value {
  position: relative;
  margin-top: 2px;
  z-index: 2;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  opacity: 0.9;
  text-shadow: 0 3px 12px rgba(13, 8, 44, 0.34);
}

.hero-status-card .hero-helper {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.06) 100%);
  color: rgba(247, 250, 255, 0.94);
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.hero-level-track {
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.06) 100%);
}

.hero-level-line {
  font-size: 14px;
  line-height: 1.4;
  color: rgba(247, 250, 255, 0.92);
  text-align: left;
  margin: 0;
}

.hero-action--primary {
  grid-area: cta;
  align-self: center;
  width: min(360px, 100%);
  min-width: 0;
  margin-top: 4px;
  position: relative;
  justify-content: center;
  font-weight: 900;
  letter-spacing: 0.015em;
  color: #4a1f00;
  text-shadow: 0 1px 0 rgba(255, 247, 215, 0.7);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68) 0%, rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, #ffe594 0%, #ffc645 52%, #ef8e1f 100%);
  border: 1px solid rgba(255, 241, 210, 0.95);
  border-bottom-color: #a74f08;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.82),
    inset 0 -4px 0 rgba(145, 61, 8, 0.48),
    0 16px 0 -9px rgba(119, 40, 0, 0.7),
    0 16px 20px rgba(14, 10, 40, 0.45),
    0 0 0 2px rgba(255, 180, 59, 0.24);
}

.hero-action--primary::after {
  content: '';
  position: absolute;
  inset: 4px 14px auto;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.hero-action--primary:hover,
.hero-action--primary:focus-visible {
  transform: translateY(-2px) scale(1.015);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.9),
    inset 0 -4px 0 rgba(145, 61, 8, 0.52),
    0 19px 0 -9px rgba(119, 40, 0, 0.78),
    0 22px 24px rgba(14, 10, 40, 0.5),
    0 0 0 3px rgba(255, 190, 75, 0.3);
}

.hero-profile-card {
  grid-area: profile;
  display: grid;
  justify-items: center;
  gap: 7px;
  width: min(620px, 100%);
  margin-top: 0;
  border-radius: 16px;
  padding: 13px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-color: rgba(255, 255, 255, 0.24);
  opacity: 1;
}

.hero-summary-strip {
  width: 100%;
  display: grid;
  gap: 8px;
  text-align: center;
}

.hero-summary-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}

.hero-summary-value {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
}

.hero-summary-unit {
  font-size: 0.78em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.84);
}

.hero-summary-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
}

.hero-summary-name {
  font-weight: 600;
}

.hero-summary-role,
.hero-summary-org {
  color: rgba(255, 255, 255, 0.84);
}

.hero-summary-dot {
  color: rgba(255, 255, 255, 0.55);
}

@media (min-width: 921px) {
  .points-hero--game .hero-main-layout {
    grid-template-columns: minmax(250px, 1fr) minmax(360px, 1.15fr);
    grid-template-areas:
      "medallion status"
      "cta cta"
      "profile profile";
    column-gap: 20px;
    row-gap: 12px;
    align-items: center;
  }

  .hero-medallion-block {
    align-self: center;
    margin-bottom: -8px;
  }

  .points-hero--game {
    --hero-avatar-size: clamp(190px, 19vw, 236px);
  }

  .hero-status-card {
    justify-self: stretch;
    width: 100%;
    max-width: 560px;
    padding: 18px 18px 14px;
    border-radius: 18px;
    background: linear-gradient(175deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.08) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 8px 20px rgba(8, 6, 30, 0.22);
  }

  .hero-medallion-value {
    bottom: 8%;
  }

  .hero-action--primary {
    margin-top: 6px;
  }

  .hero-profile-card {
    width: min(700px, 100%);
    padding: 14px 16px;
  }
}

@media (max-width: 920px) {
  .points-hero--game {
    border-radius: 24px;
    padding: 18px 14px 14px;
  }

  .hero-status-card {
    padding: 24px 12px 12px;
  }

  .hero-medallion-value {
    bottom: 11%;
  }

  .hero-profile-card {
    margin-top: 0;
  }

  .hero-summary-identity {
    gap: 4px;
    font-size: 12px;
  }
}

.shop-tabs { margin-top: 16px; }
.shop-actions {
  margin: 0 0 14px;
  display: flex;
  justify-content: flex-end;
}
.shop-tab-controls {
  display: inline-flex;
  gap: 8px;
  background: #f3f6fc;
  border-radius: 999px;
  padding: 6px;
  margin-bottom: 14px;
}
.shop-tab-control {
  border: none;
  background: transparent;
  color: #4b5568;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}
.shop-tab-control.is-active {
  background: #ffffff;
  color: #1b2540;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1);
}
.shop-tab-panel[hidden] { display: none; }
.reward-meta-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.team-reward-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin: 10px 0;
}
.team-balance-card {
  margin-bottom: 14px;
}
.team-goal-summary {
  margin-top: 8px;
}
.team-goal-summary .hint {
  margin: 4px 0;
}
.team-balance-history {
  margin-top: 14px;
}
.compact-list {
  margin: 8px 0 0;
  padding-left: 18px;
}
.compact-list li {
  margin-bottom: 4px;
}

.team-reward-filters {
  position: sticky;
  top: 82px;
  z-index: 15;
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
}
.team-reward-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.team-reward-kpi {
  font-size: 12px;
  color: #475569;
  background: #f8faff;
  border: 1px solid #dbe7ff;
  border-radius: 999px;
  padding: 5px 10px;
}
.team-reward-quick-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.team-reward-quick-filter {
  width: auto;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1f2937;
  font-weight: 600;
  padding: 7px 12px;
}
.team-reward-quick-filter:hover,
.team-reward-quick-filter:focus-visible {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e3a8a;
}
.team-reward-quick-filter.is-active {
  background: linear-gradient(90deg, #355cff, #4f7cff);
  border-color: transparent;
  color: #fff;
}
.team-reward-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 1fr) minmax(140px, 1fr) minmax(210px, auto);
  gap: 8px;
  align-items: center;
}
.team-reward-toolbar input,
.team-reward-toolbar select {
  margin-top: 0;
  min-height: 42px;
  padding: 8px 12px;
  font-size: 14px;
}
.team-reward-search {
  position: relative;
  display: block;
}
.team-reward-search-icon {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  font-size: 13px;
}
.team-reward-search input {
  padding-left: 30px;
}
.team-reward-period {
  position: relative;
}
.team-reward-period-trigger {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d5ddf1;
  background: #fff;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  color: #1f2937;
  font-size: 14px;
}
.team-reward-period-trigger:hover {
  border-color: #b7c8ee;
  background: #f8faff;
}
.team-reward-period-trigger-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-reward-period-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: min(320px, 92vw);
  z-index: 40;
  padding: 8px;
  border: 1px solid #dbe3f4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(51, 65, 85, 0.16);
}
.team-reward-period-presets {
  display: grid;
  gap: 4px;
}
.team-reward-period-presets button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  color: #1f2937;
  min-height: 34px;
  padding: 6px 8px;
  font-weight: 600;
}
.team-reward-period-presets button:hover {
  background: #eff6ff;
  color: #1e3a8a;
}
.team-reward-period-custom {
  border-top: 1px solid #eef2ff;
  margin-top: 8px;
  padding-top: 8px;
  display: grid;
  gap: 6px;
}
.team-reward-period-custom label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: #475569;
}
.team-reward-period-custom input[type="date"] {
  min-height: 38px;
  margin-top: 0;
  font-size: 13px;
}
.team-reward-active-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.team-reward-chip {
  width: auto;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1f2937;
  font-size: 12px;
  font-weight: 600;
}
button.team-reward-chip {
  min-height: 32px;
  width: auto;
  margin: 0;
  cursor: pointer;
}
button.team-reward-chip:hover,
button.team-reward-chip:focus-visible {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e3a8a;
}

.rewards-catalog-filters {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}
.rewards-catalog-toolbar {
  grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 1fr) minmax(180px, 1fr) minmax(180px, 1fr);
}
.rewards-catalog-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.rewards-catalog-card {
  display: grid;
  gap: 14px;
}
.rewards-catalog-card__top {
  display: grid;
  gap: 10px;
}
.rewards-catalog-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rewards-catalog-card__middle {
  display: grid;
  gap: 8px;
}
.rewards-catalog-card__price {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}
.rewards-catalog-card__stock {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: #475569;
  font-size: 13px;
}
.rewards-catalog-card__bottom .reward-status {
  margin-top: 0;
  margin-bottom: 0;
}
.rewards-catalog-card__actions {
  margin-top: 0;
}

@media (max-width: 920px) {
  .team-reward-filters {
    top: 70px;
  }
  .team-reward-toolbar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .team-reward-toolbar {
    grid-template-columns: 1fr;
  }
  .rewards-catalog-toolbar {
    grid-template-columns: 1fr;
  }
  .team-reward-period-menu {
    left: 0;
    right: auto;
  }
}


.empty-state--module {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin-bottom: 14px;
}

.empty-state--module[hidden] {
  display: none !important;
}

.rewards-catalog-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.rewards-catalog-card__actions .inline-form button,
.rewards-catalog-card__actions .button {
  min-height: 38px;
  padding: 8px 12px;
}
.rewards-catalog-card__actions .inline-form {
  margin-left: auto;
}
.rewards-catalog-legacy-hint {
  margin: 0;
}
.reward-ownership-badge {
  background: #475569;
  text-transform: none;
}
.reward-ownership-badge--org {
  background: #1d4ed8;
}
.reward-ownership-badge--legacy {
  background: #7c3aed;
}

.personal-requests-toolbar {
  grid-template-columns: minmax(220px, 1.4fr) minmax(170px, 1fr) minmax(160px, 1fr) minmax(160px, 1fr) auto;
}
.personal-requests-toolbar__actions {
  margin: 0;
  justify-content: flex-end;
}

@media (max-width: 920px) {
  .rewards-subnav {
    top: 60px;
    align-items: flex-start;
    flex-direction: column;
  }
  .personal-requests-toolbar {
    grid-template-columns: 1fr 1fr;
  }
  .personal-requests-toolbar__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .personal-requests-toolbar {
    grid-template-columns: 1fr;
  }
}

.technical-section {
  border: 1px dashed #d6deef;
  border-radius: 12px;
  padding: 12px;
  background: #fafcff;
}

.technical-section summary {
  cursor: pointer;
  font-weight: 600;
  color: #334155;
}

.technical-section[open] summary {
  margin-bottom: 8px;
}

.technical-warning {
  color: #9a6700;
}

.points-ops-kpis .kpi-card .value {
  font-size: 28px;
}
.points-ops-filters {
  position: static;
}
.points-ops-toolbar {
  grid-template-columns: minmax(240px, 1.4fr) minmax(170px, 1fr) minmax(160px, 1fr) minmax(180px, 1fr) minmax(210px, auto) auto;
}
.points-ops-reset {
  width: auto;
  min-height: 42px;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 12px;
}
.points-ops-anomalies {
  margin-bottom: 14px;
}
.points-ops-anomalies__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.points-ops-signals {
  margin-top: 10px;
}
.points-ops-signal {
  border-width: 1px;
}
.points-ops-signal--ok {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.points-ops-signal--medium {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}
.points-ops-signal--high {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #9f1239;
}
.points-ops-anomalies__empty {
  margin: 8px 0 0;
}
.points-ops-table-shell {
  max-height: 68vh;
  overflow: auto;
}
.points-ops-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
}
.points-ops-table tr:hover td {
  background: #f8faff;
}
.points-ops-entity a {
  font-weight: 600;
}
.points-ops-amount .badge {
  font-weight: 700;
  min-width: 88px;
  justify-content: center;
}
.points-ops-date,
.points-ops-actor {
  white-space: nowrap;
}

.points-feed-page .row-form.points-feed-toolbar {
  align-items: center;
  gap: 10px;
}
.points-feed-controls {
  border-radius: 18px;
  border: 1px solid rgba(203, 213, 225, 0.75);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}
.points-feed-tabs,
.points-feed-periods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.points-feed-tabs .button.is-active,
.points-feed-periods .button.is-active,
.chip-row .button.is-active {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e3a8a;
}
.points-feed-periods input[type="date"] {
  width: auto;
}
.points-feed {
  display: grid;
  gap: 12px;
}
.points-feed-group-title {
  margin: 10px 2px 0;
  font-size: 13px;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.points-tx-card {
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.92) 100%);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  overflow: hidden;
  opacity: 1;
}
.points-tx-card.is-revealed {
  animation: txFade .22s ease both;
}
.points-tx-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 16px 34px rgba(59, 130, 246, 0.16);
}
.points-tx-card__head {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}
.points-tx-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.points-tx-card__icon.is-credit { background: #dcfce7; color: #166534; }
.points-tx-card__icon.is-debit { background: #fee2e2; color: #b91c1c; }
.points-tx-card__icon.is-reward { background: #ffedd5; color: #c2410c; }
.points-tx-card__main small,
.points-tx-card__meta small {
  display: block;
  color: #475569;
}
.points-amount.approved { color: #15803d; transition: color .2s ease, transform .2s ease; }
.points-amount.cancelled { color: #dc2626; transition: color .2s ease, transform .2s ease; }
.points-tx-card:hover .points-amount { transform: scale(1.03); }
.points-tx-card__foot {
  border-top: 1px solid #eef2ff;
  padding: 10px 14px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #334155;
  font-size: 13px;
}
.points-tx-card__details {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
  padding: 0 14px;
}
.points-tx-card.is-open .points-tx-card__details {
  max-height: 180px;
  padding: 0 14px 12px;
}
.points-feed-table-toggle {
  margin-top: 12px;
}
@keyframes txFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.points-ops-reason {
  line-height: 1.35;
}
.points-ops-filters .team-reward-chip {
  border: 1px solid #d4ddf4;
  background: #f8faff;
}

@media (max-width: 920px) {
  .points-ops-toolbar {
    grid-template-columns: 1fr 1fr;
  }
}

.badge.reserved {
  background: #94a3b8;
}

.onboarding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.onboarding-progress-card,
.onboarding-checklist-card,
.onboarding-finished-card {
  border-radius: 20px;
  border: 1px solid #e2eaf8;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  margin-bottom: 14px;
}

.onboarding-progress-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.onboarding-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.onboarding-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #e7eefc;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fbff;
}

.onboarding-checklist li.done {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.onboarding-checklist li.todo {
  border-color: #dbe6f8;
  background: #f8fbff;
}

.onboarding-checklist .state {
  font-weight: 700;
  width: 18px;
  margin-top: 2px;
}

.onboarding-checklist p {
  margin: 4px 0 0;
}

.onboarding-step-card {
  position: relative;
}

.onboarding-step-card.is-current {
  border-color: #bfd4ff;
  box-shadow: 0 14px 32px rgba(79, 124, 255, 0.15);
}

.onboarding-step-card.is-done {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #ffffff 0%, #f7fff9 100%);
}

.onboarding-step-done {
  color: #166534;
  font-weight: 600;
  margin-bottom: 8px;
}

.onboarding-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.onboarding-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.activation-status-hero {
  border-radius: 20px;
  border: 1px solid #f2e0aa;
  background: linear-gradient(180deg, #fffdf4 0%, #fff8e8 100%);
  margin-bottom: 14px;
}

.activation-status-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: #fff3cd;
  color: #92400e;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.activation-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.activation-status-hero__badge.success {
  color: #166534;
  border-color: #bbf7d0;
  background: #ecfdf3;
}

@media (max-width: 780px) {
  .onboarding-progress-card__head {
    flex-direction: column;
    align-items: flex-start;
  }
}


.vk-module-header {
  margin-bottom: 16px;
}

.vk-module-header__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.vk-module-header__eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
}

.vk-module-header h1 {
  margin: 0;
}

.vk-module-tabs {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vk-module-tabs a {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d6e2ff;
  border-radius: 999px;
  padding: 6px 12px;
  color: #1e3a8a;
  font-weight: 600;
}

.vk-module-tabs a.active,
.vk-module-tabs a:hover {
  background: #e0e9ff;
  border-color: #b7cbff;
}

.vk-dashboard-hero {
  margin-bottom: 14px;
}

.vk-page-head {
  margin-bottom: 14px;
}

.vk-page-head h2 {
  margin: 0 0 4px;
}

.vk-dashboard-status {
  margin-top: 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 12px;
  background: #f8fbff;
}

.vk-dashboard-status.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.vk-dashboard-status.error {
  border-color: #fecaca;
  background: #fff5f5;
}

.vk-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.vk-dashboard-action-card .button {
  margin-top: 8px;
}

.vk-warning-text {
  margin: 8px 0 0;
  color: #b91c1c;
  font-weight: 600;
}

.vk-empty-state {
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px dashed #dbeafe;
  border-radius: 10px;
  background: #f8fbff;
}

.vk-dashboard-grid--metrics {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.vk-dashboard-metric-card .metric {
  margin: 2px 0 0;
}

.vk-keyboard-builder {
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.vk-keyboard-builder legend {
  font-weight: 700;
  padding: 0 6px;
}

.vk-keyboard-builder__rows {
  display: grid;
  gap: 10px;
}

.vk-keyboard-builder__row {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  background: #fafcff;
  display: grid;
  gap: 8px;
}

.vk-keyboard-builder__row-buttons {
  display: grid;
  gap: 8px;
}

.vk-keyboard-builder__button {
  display: grid;
  grid-template-columns: minmax(160px, 1.1fr) minmax(160px, 1fr) minmax(210px, 1.4fr) minmax(120px, 0.8fr) auto auto auto;
  gap: 8px;
  align-items: start;
}

.vk-builder-field {
  display: grid;
  gap: 4px;
}

.vk-builder-field__label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.vk-builder-field-hint {
  margin: 0;
  font-size: 12px;
}

.vk-builder-action-value {
  display: grid;
  gap: 6px;
}

.vk-builder-hint {
  margin: 0;
  color: #475569;
  font-size: 13px;
}

.vk-builder-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.vk-keyboard-preview {
  border: 1px solid #d8e4f5;
  border-radius: 12px;
  padding: 10px;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
}

.vk-keyboard-preview__title {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 13px;
}

.vk-keyboard-preview__bubble {
  max-width: 480px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.vk-keyboard-preview__bubble p {
  margin: 0;
  white-space: pre-wrap;
}

.vk-keyboard-preview__buttons {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.vk-keyboard-preview__row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.vk-keyboard-preview__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 13px;
}

.vk-keyboard-preview__btn.primary,
.vk-keyboard-preview__btn.positive {
  background: #3b82f6;
  color: #fff;
}

.vk-keyboard-preview__btn.secondary {
  background: #e2e8f0;
  color: #1e293b;
}

.vk-keyboard-preview__btn.negative {
  background: #ef4444;
  color: #fff;
}

.vk-keyboard-builder__button.is-invalid {
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 8px;
  background: #fff5f5;
}

.vk-keyboard-builder__button .is-invalid {
  border-color: #ef4444;
}

.vk-keyboard-builder__row.is-over-limit {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
}

.vk-keyboard-builder__actions,
.vk-keyboard-builder__row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vk-keyboard-builder__advanced textarea {
  margin-top: 8px;
}

.vk-builder-warning {
  margin: 0;
  color: #b45309;
}

@media (max-width: 900px) {
  .vk-keyboard-builder__button {
    grid-template-columns: 1fr;
  }
}
