:root {
  --primary: 221 83% 53%;
  --accent: 214 100% 60%;
  --background: 0 0% 98%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;
  --muted: 210 20% 96%;
  --border: 220 13% 91%;
  --destructive: 0 84% 60%;

  --bg: hsl(var(--background));
  --text: hsl(var(--foreground));
  --muted-foreground: hsl(221 16% 47%);
  --line: hsl(var(--border));
  --primary-soft: hsl(var(--primary) / 0.1);
  --success: hsl(145 63% 42%);
  --success-soft: hsl(145 63% 42% / 0.14);
  --warn: hsl(27 96% 51%);
  --warn-soft: hsl(27 96% 51% / 0.16);
  --radius: 18px;
  --shadow: 0 12px 28px hsl(222 47% 11% / 0.08);
}

.dark {
  --primary: 224 94% 67%;
  --accent: 199 96% 58%;
  --background: 222 47% 7%;
  --foreground: 210 40% 96%;
  --card: 222 39% 11%;
  --muted: 221 30% 17%;
  --border: 220 25% 24%;
  --destructive: 0 72% 56%;

  --bg: hsl(var(--background));
  --text: hsl(var(--foreground));
  --muted-foreground: hsl(218 20% 70%);
  --line: hsl(var(--border));
  --primary-soft: hsl(var(--primary) / 0.2);
  --shadow: 0 14px 34px hsl(222 47% 2% / 0.4);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

body.body-scroll-lock {
  overflow: hidden;
}

.app-launch-splash {
  display: none;
}

.standalone .app-launch-splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  z-index: 2147483000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.26s ease, visibility 0.26s ease;
}

.standalone .app-launch-splash img {
  width: 112px;
  height: 112px;
  object-fit: contain;
}

.standalone .app-launch-splash.is-hidden {
  opacity: 0;
  visibility: hidden;
}

h1,
h2,
h3,
h4,
.font-display {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
}

.app-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.08), transparent 35%),
    linear-gradient(320deg, rgba(56, 189, 248, 0.08), transparent 40%);
}

.shell {
  position: relative;
  display: grid;
  grid-template-columns: 256px 1fr;
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand h1 {
  margin: 0;
  font-size: 24px;
}

.brand p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted-foreground);
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(140deg, #4f46e5, #2563eb);
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #d9e1f2;
  background: #fff;
}

.menu {
  display: grid;
  gap: 6px;
  min-height: 0;
  overflow: auto;
}

.menu-link,
.mobile-link {
  text-decoration: none;
  color: #5c6f8e;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
}

.menu-link {
  padding: 12px;
}

.menu-link.active,
.mobile-link.active {
  color: hsl(var(--primary));
  background: var(--primary-soft);
}

.icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
}

.icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-foot {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-items: center;
  flex-shrink: 0;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: hsl(var(--primary));
  font-weight: 800;
}

.sidebar-foot strong {
  font-size: 14px;
}

.sidebar-foot small {
  color: var(--muted-foreground);
}

.logout {
  grid-column: 1 / -1;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: #111827;
  border-radius: 10px;
  padding: 8px;
  font-weight: 700;
}

.content {
  padding: 24px;
  padding-bottom: 100px;
}

.topbar h2 {
  margin: 0;
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted-foreground);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 40;
  background: hsl(var(--background) / 0.92);
  backdrop-filter: blur(8px);
  padding: 10px 0 12px;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pwa-install-btn {
  border-color: #cfd7ff;
  color: #3440c8;
  background: #eef1ff;
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-hero h2 {
  margin: 0;
  font-size: clamp(28px, 2.4vw, 36px);
  letter-spacing: -0.04em;
}

.dashboard-hero p {
  margin: 6px 0 0;
  color: #667085;
  font-size: 16px;
}

.dashboard-actions {
  display: inline-flex;
  gap: 12px;
}

.action-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px hsl(var(--primary) / 0.2);
}

.action-btn-ghost {
  color: #1f2937;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  padding: 10px 22px;
}

.action-btn-primary {
  color: #fff;
  border: 1px solid hsl(var(--primary));
  background: hsl(var(--primary));
  box-shadow: 0 10px 18px hsl(var(--primary) / 0.35);
  padding: 10px 24px;
}

.action-icon {
  font-size: 26px;
  line-height: 1;
  font-weight: 500;
}

.action-btn .icon {
  width: 18px;
  height: 18px;
}
.dashboard-kpis {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-kpi {
  background: hsl(var(--card));
  border-radius: 31px;
  border: 1px solid hsl(var(--border) / 0.55);
  padding: 19px;
  box-shadow: 0 3px 8px hsl(220 43% 11% / 0.04);
}

.dashboard-kpi-revenue {
  background: radial-gradient(circle at 84% -12%, hsl(var(--primary) / 0.08) 0, hsl(var(--primary) / 0.08) 38%, transparent 38%), hsl(var(--card));
}

.dashboard-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 34px;
}

.dashboard-kpi-icon {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.dashboard-kpi-icon svg {
  width: 23px;
  height: 23px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-revenue {
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
}

.icon-sales {
  background: hsl(277 92% 95%);
  color: hsl(272 88% 58%);
}

.icon-stock {
  background: hsl(26 100% 94%);
  color: hsl(27 96% 51%);
}

.icon-debtors {
  background: hsl(0 100% 95%);
  color: hsl(var(--destructive));
}

.dashboard-kpi p {
  margin: 18px 0 0;
  color: #667085;
  font-weight: 600;
  font-size: 18px;
}

.dashboard-kpi h3 {
  margin: 8px 0 0;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.dashboard-pill {
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  color: hsl(145 63% 33%);
  background: hsl(145 63% 42% / 0.18);
}

.dashboard-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: hsl(var(--destructive));
  margin-top: 4px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}

.dashboard-grid > .dashboard-transactions:only-child {
  grid-column: 1 / -1;
}

.dashboard-grid > .dashboard-transactions:only-child .tx-list {
  max-height: min(68vh, 640px);
  overflow: auto;
}

.dashboard-chart-card,
.dashboard-transactions {
  border-radius: 24px;
  border: 1px solid hsl(var(--border) / 0.55);
  box-shadow: 0 3px 10px hsl(220 43% 11% / 0.04);
}

.dashboard-chart-card h3,
.dashboard-transactions h3,
.dashboard-low-stock-card h3 {
  font-size: 24px;
}

.dashboard-chart-card {
  min-height: 420px;
}

.dashboard-chart-card canvas {
  width: 100% !important;
  height: 320px !important;
}

.dashboard-transactions {
  padding: 0;
  overflow: hidden;
}

.dashboard-transactions .card-head {
  padding: 20px 22px;
  border-bottom: 1px solid hsl(var(--border));
}

.dashboard-transactions .card-head a {
  font-size: 15px;
}

.tx-list {
  display: grid;
}

.tx-item {
  text-decoration: none;
  color: inherit;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid hsl(var(--border));
  transition: background-color 0.2s ease;
}

.tx-item:last-child {
  border-bottom: 0;
}

.tx-item:hover {
  background: hsl(var(--muted));
}

.tx-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: hsl(var(--muted));
  color: #6b7280;
  display: grid;
  place-items: center;
}

.tx-icon svg {
  width: 18px;
  height: 18px;
}

.tx-meta strong,
.tx-amount strong {
  display: block;
  font-size: 18px;
  line-height: 1.1;
}

.tx-meta small,
.tx-amount small {
  color: #6b7280;
  font-size: 13px;
}

.tx-amount {
  text-align: right;
}

.tx-empty {
  display: block;
}

.dashboard-low-stock-card {
  border-radius: 24px;
  border: 1px solid hsl(var(--border) / 0.55);
  box-shadow: 0 3px 10px hsl(220 43% 11% / 0.04);
}

.mobile-topbar {
  display: none;
  overflow: visible;
}

.mobile-topbar-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: visible;
}

.mobile-bell {
  position: relative;
  border: 0;
  background: transparent;
  color: #6b7280;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  box-shadow: none;
}

.mobile-bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  line-height: 1;
}

.mobile-notifications {
  position: relative;
}

.mobile-notifications summary {
  list-style: none;
}

.mobile-notifications summary::-webkit-details-marker {
  display: none;
}

.mobile-notifications-menu {
  position: absolute;
  right: 0;
  left: auto;
  top: calc(100% + 8px);
  width: 320px;
  max-width: calc(100vw - 16px);
  max-height: 460px;
  overflow: auto;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  box-shadow: 0 14px 24px hsl(222 47% 11% / 0.14);
  padding: 10px;
  z-index: 10020;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

@media (max-width: 860px) {
  .mobile-notifications-menu {
    position: fixed;
    left: 50%;
    right: auto;
    top: calc(60px + env(safe-area-inset-top));
    transform: translateX(-50%);
    width: calc(100vw - 20px);
    max-width: 420px;
    max-height: min(64vh, 520px);
    border-radius: 16px;
    z-index: 10040;
  }
}

.mobile-notifications-menu h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #0f172a;
}

.mobile-notifications-empty {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.mobile-notifications-list {
  display: grid;
  gap: 8px;
}

.mobile-note {
  border: 1px solid #e2e8f4;
  border-radius: 10px;
  padding: 8px 10px;
  background: #f8fbff;
}

.mobile-note strong {
  display: block;
  font-size: 13px;
  color: #0f172a;
  margin-bottom: 3px;
}

.mobile-note p {
  margin: 0;
  font-size: 12px;
  color: #475569;
  line-height: 1.35;
}

.mobile-note-danger {
  border-color: #fecaca;
  background: #fff1f2;
}

.mobile-note-warn {
  border-color: #fde68a;
  background: #fffbeb;
}

.mobile-bell svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-profile {
  position: relative;
}

.mobile-profile summary {
  list-style: none;
}

.mobile-profile summary::-webkit-details-marker {
  display: none;
}

.mobile-profile-trigger {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  border-radius: 12px;
  min-height: 36px;
  padding: 4px 9px 4px 5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.mobile-profile-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: hsl(var(--primary) / 0.15);
  color: hsl(var(--primary));
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-profile-text {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.mobile-profile-text strong {
  display: block;
  max-width: 118px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.05;
  color: #0f172a;
}

.mobile-profile-text small {
  display: block;
  max-width: 118px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.05;
  color: #64748b;
}

.mobile-profile-arrow {
  width: 14px;
  height: 14px;
  color: #64748b;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.mobile-profile-arrow svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-profile[open] .mobile-profile-arrow {
  transform: rotate(180deg);
}

.mobile-profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 168px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  box-shadow: 0 14px 24px hsl(222 47% 11% / 0.14);
  padding: 6px;
  z-index: 110;
}

.mobile-profile-logout {
  display: block;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid hsl(var(--destructive) / 0.2);
  background: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
  font-weight: 700;
  font-size: 13px;
  padding: 9px 10px;
  text-align: center;
}

.mobile-profile-install {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #cfd7ff;
  background: #eef1ff;
  color: #3440c8;
  font-weight: 700;
  font-size: 13px;
  padding: 9px 10px;
  box-shadow: none;
  margin-bottom: 6px;
}

.page-dashboard .topbar {
  display: none;
}

.page-dashboard .panel {
  margin-top: 0;
}

.panel {
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

.kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kpi-card,
.card {
  background: hsl(var(--card));
  border-radius: var(--radius);
  border: 1px solid #e5eaf3;
  box-shadow: var(--shadow);
}

.kpi-card {
  padding: 18px;
}

.kpi-card p {
  margin: 0;
  color: var(--muted-foreground);
  font-weight: 600;
}

.kpi-card h3 {
  margin: 10px 0 0;
  font-size: 38px;
  letter-spacing: -0.02em;
}

.card {
  padding: 20px;
}

.card h3 {
  margin: 0 0 12px;
  font-size: 33px;
  letter-spacing: -0.03em;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-head-wrap {
  flex-wrap: wrap;
  gap: 10px;
}

.card-head a {
  text-decoration: none;
  color: hsl(var(--primary));
  font-weight: 700;
}

.btn-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9e1f2;
  color: #334155;
  background: #f8faff;
  border-radius: 10px;
  padding: 9px 12px;
  font-weight: 700;
  font-size: 13px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 16px hsl(var(--primary) / 0.08);
}

.inline-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 14px;
}

.period-toolbar {
  display: grid;
  gap: 10px;
  margin: 12px 0 14px;
}

.period-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.period-link {
  text-decoration: none;
  border: 1px solid #d8e2f1;
  color: #475569;
  background: #f8fbff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
}

.period-link.active {
  border-color: #cfd7ff;
  color: #4338ca;
  background: #eef0ff;
}

.period-custom-wrap {
  position: relative;
}

.period-custom-wrap summary {
  list-style: none;
}

.period-custom-wrap summary::-webkit-details-marker {
  display: none;
}

.period-toggle {
  text-decoration: none;
  border: 1px solid #d8e2f1;
  color: #475569;
  background: #f8fbff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.period-toggle em {
  font-style: normal;
  transition: transform 0.2s ease;
}

.period-custom-wrap[open] .period-toggle em {
  transform: rotate(180deg);
}

.period-toggle.active {
  border-color: #cfd7ff;
  color: #4338ca;
  background: #eef0ff;
}

.period-custom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.inventory-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 2px;
}

.inventory-filter-panel {
  border: 1px solid #dbe4f4;
  border-radius: 14px;
  background: #f8fbff;
  padding: 8px;
  margin: 10px 0 12px;
}

.inventory-filter-panel summary {
  list-style: none;
}

.inventory-filter-panel summary::-webkit-details-marker {
  display: none;
}

.inventory-filter-toggle {
  cursor: pointer;
  border: 1px solid #d8e2f1;
  color: #334155;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inventory-filter-toggle em {
  font-style: normal;
  transition: transform 0.2s ease;
}

.inventory-filter-panel[open] .inventory-filter-toggle em {
  transform: rotate(180deg);
}

.inventory-filter-chip {
  text-decoration: none;
  border: 1px solid #d8e2f1;
  color: #475569;
  background: #f8fbff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
}

.inventory-filter-chip.active {
  border-color: #cfd7ff;
  color: #4338ca;
  background: #eef0ff;
}

.inventory-fab {
  display: none;
  text-decoration: none;
  color: #fff;
  border: 0;
  background: hsl(var(--primary));
}

.inventory-fab .icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.employees-fab {
  display: none;
  text-decoration: none;
  color: #fff;
  border: 0;
  background: hsl(var(--primary));
}

.employees-fab .icon {
  width: 22px;
  height: 22px;
}

.employees-fab .icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.employees-fab-label {
  display: none;
}

.search-form button {
  padding-inline: 20px;
}

.chart-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 2fr 1fr;
}

.table-wrap {
  overflow: auto;
}

.row-link {
  cursor: pointer;
}

.row-link:hover td {
  background: #f8faff;
}

.mobile-link-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.mobile-link-card:hover {
  border-color: #d3dcf1;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

th {
  color: var(--muted-foreground);
  font-weight: 700;
}

.pill {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.pill.ok {
  color: var(--success);
  background: var(--success-soft);
}

.pill.warn {
  color: var(--warn);
  background: var(--warn-soft);
}

.badge-stock-in {
  background: hsl(142 76% 94%);
  color: hsl(142 61% 32%);
}

.badge-stock-low {
  background: hsl(33 100% 92%);
  color: hsl(28 86% 41%);
}

.badge-stock-out,
.pill.destructive {
  background: hsl(var(--destructive) / 0.14);
  color: hsl(var(--destructive));
}

.badge-role-owner {
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}

.badge-role-cashier {
  background: hsl(var(--accent) / 0.11);
  color: hsl(var(--accent));
}

.badge-role-warehouse {
  background: hsl(27 96% 51% / 0.12);
  color: hsl(27 90% 45%);
}

.mobile-nav {
  display: none;
}

.mobile-short {
  display: none;
}

.mobile-list {
  display: none;
}

.auth-page {
  min-height: 100vh;
  margin: 0;
  font-family: 'Manrope', 'Inter', sans-serif;
  color: #121629;
  position: relative;
  overflow-x: hidden;
  background: linear-gradient(165deg, #f5f6fc 0%, #eef1fa 65%, #ececf8 100%);
}

.auth-grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.45;
}

.auth-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 16px;
  padding: 20px;
}

.auth-brand {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.auth-brand-badge {
  width: 86px;
  height: 86px;
  border-radius: 24px;
  background: linear-gradient(140deg, #4f46e5, #7c3aed);
  color: #fff;
  font-size: 48px;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 18px 34px rgba(79, 70, 229, 0.3);
}

.auth-brand-logo {
  display: block;
  object-fit: cover;
  padding: 0;
  background: #fff;
  border: 1px solid #d9e1f2;
  color: transparent;
  font-size: 0;
}

.auth-brand h1 {
  margin: 0;
  font-size: clamp(34px, 3vw, 46px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.auth-brand p {
  margin: 0;
  color: #697188;
  font-weight: 600;
}

.auth-card {
  width: min(100%, 420px);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #dfe4f3;
  border-radius: 24px;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.12);
  padding: 24px;
  display: grid;
  gap: 12px;
  margin-inline: auto;
}

.auth-card h2 {
  margin: 0;
  font-size: 40px;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.auth-subtext {
  margin: 0;
  color: #6b7288;
  font-size: 17px;
  line-height: 1.45;
}

.auth-alert {
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
}

.auth-alert-danger {
  color: #d72d4a;
  background: #ffeef2;
  border: 1px solid #ffd0db;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: #1f2937;
  font-size: 14px;
  font-weight: 700;
}

.auth-form input {
  height: 52px;
  border-radius: 16px;
  border: 1px solid #d6deef;
  background: #f6f8ff;
  padding: 0 14px;
  font-size: 22px;
  font-weight: 700;
  color: #121629;
}

.auth-form input:focus {
  outline: 0;
  border-color: #9aa7ff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}

.auth-submit {
  margin-top: 6px;
  min-height: 56px;
  border-radius: 18px;
  background: linear-gradient(90deg, #474be5, #3a45ea);
  color: #fff;
  font-size: 33px;
  font-weight: 800;
  border: 0;
}

.auth-hint {
  border: 1px solid #d8defa;
  border-radius: 16px;
  background: #f5f7ff;
  padding: 11px 13px;
}

.auth-hint strong {
  display: block;
  color: #4954ea;
  font-size: 14px;
}

.auth-hint p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 14px;
}

.auth-lock-card {
  border-top: 5px solid #fb7a24;
}

.auth-lock-icon {
  width: 118px;
  height: 118px;
  border-radius: 28px;
  margin-inline: auto;
  background: #fff3f6;
  border: 1px solid #ffd2dd;
  display: grid;
  place-items: center;
}

.auth-lock-icon svg {
  width: 54px;
  height: 54px;
  stroke: #f04465;
  stroke-width: 1.8;
  fill: none;
}

.auth-lock-pill {
  justify-self: center;
  border: 1px solid #ffc8d6;
  background: #ffeef3;
  color: #ef3b5b;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
}

.auth-info-box {
  border: 1px solid #e2e7f2;
  border-radius: 16px;
  background: #f8faff;
  padding: 10px 12px;
}

.auth-info-box div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e8ecf6;
}

.auth-info-box div:last-child {
  border-bottom: 0;
}

.auth-info-box span {
  color: #64748b;
  font-weight: 600;
}

.auth-info-box strong {
  color: #0f172a;
  font-size: 17px;
}

.auth-action {
  text-decoration: none;
  border: 1px solid #dbe2f4;
  background: #fff;
  color: #334155;
  border-radius: 16px;
  padding: 12px 14px;
  font-weight: 700;
}

.auth-action-primary {
  border-color: #454be8;
  background: linear-gradient(90deg, #4b50ea, #3a45ea);
  color: #fff;
}

.auth-foot {
  text-align: center;
  color: #6b7288;
  font-size: 13px;
}

.muted {
  color: var(--muted-foreground);
}

.alert {
  margin: 14px 0;
  border-radius: 10px;
  padding: 11px;
  font-size: 14px;
}

.alert.danger {
  color: #991b1b;
  background: #fee2e2;
}

.alert.success {
  color: #0f766e;
  background: #ccfbf1;
}

@media (max-width: 640px) {
  .auth-shell {
    gap: 12px;
    padding: 10px;
    place-content: start center;
  }

  .auth-brand-badge {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    font-size: 36px;
  }

  .auth-brand h1 {
    font-size: 48px;
  }

  .auth-brand p {
    font-size: 17px;
  }

  .auth-card {
    width: 100%;
    border-radius: 22px;
    padding: 20px 14px;
    gap: 11px;
  }

  .auth-card h2 {
    font-size: 46px;
  }

  .auth-subtext {
    font-size: 13px;
  }

  .auth-form input {
    height: 62px;
    font-size: 34px;
    border-radius: 18px;
  }

  .auth-submit {
    min-height: 58px;
    font-size: 39px;
    border-radius: 18px;
  }

  .auth-alert {
    font-size: 12px;
  }

  .auth-foot {
    margin-bottom: 12px;
  }
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid .full-width {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: #334155;
}

input,
button,
select,
textarea {
  font-family: inherit;
  border-radius: 12px;
}

input {
  border: 1px solid #d9e1ef;
  padding: 12px 13px;
  font-size: 15px;
}

select,
textarea {
  border: 1px solid #d9e1ef;
  padding: 12px 13px;
  font-size: 15px;
  background: #fff;
}

textarea {
  resize: vertical;
}

.check-row {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 600;
}

.check-row input {
  width: 18px;
  height: 18px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.employee-form .form-actions {
  width: 100%;
}

.employee-form .inline-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
}

.employee-form .inline-actions button {
  min-height: 44px;
}

.report-grid {
  margin-top: 16px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-btn {
  border: 1px solid #e2e8f4;
  border-radius: 14px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  background: #fbfdff;
  display: grid;
  gap: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.report-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px hsl(var(--primary) / 0.08);
}

.report-btn span {
  color: #64748b;
}

.report-btn strong {
  font-size: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.detail-grid div {
  border: 1px solid #e4eaf6;
  border-radius: 10px;
  padding: 10px;
  background: #fbfdff;
}

.spaced-title {
  margin-top: 16px;
}

.big-number {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.pos-shell {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

.pos-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
  min-height: 0;
}

.page-pos .topbar {
  display: none;
}

.page-pos .panel {
  margin-top: 0;
}

.page-employees .topbar {
  display: none;
}

.page-employees .panel {
  margin-top: 0;
}

.page-reports .topbar,
.page-inventory .topbar {
  display: none;
}

.page-inventory_edit .topbar {
  display: none;
}

.page-sale_details .topbar {
  display: none;
}

.page-report_total_profit .topbar,
.page-report_total_revenue .topbar {
  display: none;
}

.page-report_total_items .topbar,
.page-report_top_products .topbar,
.page-report_profitable_products .topbar,
.page-report_debtors .topbar,
.page-report_employee_performance .topbar,
.page-report_product_performance .topbar,
.page-employee_edit .topbar {
  display: none;
}

.page-reports_overview .topbar {
  display: none;
}

.inventory-edit-appbar {
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 8px;
  z-index: 120;
  background: hsl(var(--background) / 0.96);
  backdrop-filter: blur(6px);
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  padding: 8px 10px;
  box-shadow: 0 8px 16px hsl(220 43% 11% / 0.06);
  margin-bottom: 12px;
}

.inventory-edit-appbar strong {
  font-size: clamp(22px, 2.2vw, 30px);
  letter-spacing: -0.02em;
}

.inventory-edit-back {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: #334155;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.inventory-edit-back .icon {
  width: 18px;
  height: 18px;
}

.inventory-edit-back .icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-reports .panel,
.page-inventory .panel {
  margin-top: 0;
}

.staff-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.staff-hero h2 {
  margin: 0;
  font-size: clamp(28px, 2.2vw, 36px);
  letter-spacing: -0.03em;
}

.staff-hero p {
  margin: 6px 0 0;
  color: #667085;
  font-size: 18px;
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.staff-search-note {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 14px;
}

.staff-card {
  text-decoration: none;
  color: inherit;
  border: 1px solid hsl(var(--border));
  border-radius: 24px;
  overflow: hidden;
  background: hsl(var(--card));
  box-shadow: 0 3px 10px hsl(222 47% 11% / 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.staff-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px hsl(var(--primary) / 0.1);
}

.staff-cover {
  height: 108px;
  background: linear-gradient(100deg, #f2f3f8 0%, #e7e8ee 52%, #f0f1f5 100%);
}

.staff-avatar {
  position: absolute;
  top: 64px;
  left: 20px;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(145deg, #6970f0, #9a48e7);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 700;
  border: 4px solid hsl(var(--card));
  box-shadow: 0 8px 16px hsl(222 47% 11% / 0.14);
}

.staff-card-body {
  padding: 28px 20px 18px;
  display: grid;
  gap: 12px;
}

.staff-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.staff-topline h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.staff-role-badge {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  line-height: 1;
  white-space: nowrap;
}

.staff-meta-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #667085;
  font-size: 16px;
}

.staff-meta-line .icon {
  width: 17px;
  height: 17px;
  color: hsl(var(--primary));
}

.staff-meta-line .icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.staff-status {
  font-weight: 700;
}

.staff-status.is-active {
  color: hsl(142 71% 36%);
}

.staff-status.is-inactive {
  color: hsl(var(--destructive));
}

.pos-head {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.pos-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  background: hsl(var(--card));
  padding: 0 14px;
  height: 50px;
}

.pos-search-wrap .icon {
  color: #6b7280;
}

.pos-search-wrap input {
  border: 0;
  width: 100%;
  padding: 0;
  background: transparent;
  font-size: 16px;
  color: #1f2937;
}

.pos-search-wrap input:focus {
  outline: none;
}

.pos-category-chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.pos-category-chips::-webkit-scrollbar {
  height: 6px;
}

.pos-category-chips::-webkit-scrollbar-thumb {
  background: hsl(var(--border));
  border-radius: 999px;
}

.pos-chip {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: #111827;
  box-shadow: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  min-width: max-content;
}

.pos-chip:hover {
  filter: none;
  box-shadow: 0 8px 16px hsl(var(--primary) / 0.1);
}

.pos-chip.active {
  color: #fff;
  border-color: hsl(var(--primary));
  background: hsl(var(--primary));
  box-shadow: 0 8px 18px hsl(var(--primary) / 0.24);
}

.pos-products {
  min-width: 0;
  max-height: calc(100vh - 190px);
  overflow: auto;
  padding-right: 4px;
}

.pos-products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.pos-product-card {
  border: 1px solid hsl(var(--border));
  border-radius: 18px;
  background: hsl(var(--card));
  box-shadow: 0 2px 8px hsl(222 47% 11% / 0.05);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.pos-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px hsl(var(--primary) / 0.1);
}

.pos-product-thumb {
  height: 160px;
  margin: 14px;
  border-radius: 14px;
  border: 1px solid hsl(var(--border) / 0.7);
  background: hsl(220 19% 97%);
  display: grid;
  place-items: center;
}

.pos-product-thumb svg {
  width: 52px;
  height: 52px;
  stroke: #b8bdca;
  stroke-width: 1.8;
  fill: none;
}

.pos-low-pill {
  display: inline-block;
  margin: 12px 12px 0;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 700;
  color: hsl(18 100% 43%);
  background: hsl(37 78% 88%);
}

.pos-product-body {
  border-top: 1px solid hsl(var(--border) / 0.6);
  padding: 14px;
  display: grid;
  gap: 14px;
  flex: 1;
}

.pos-product-body strong {
  font-size: 18px;
  line-height: 1.35;
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pos-product-foot {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.pos-product-foot span {
  color: hsl(var(--primary));
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  min-height: 2.5em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pos-add-btn {
  width: 100%;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid hsl(var(--primary));
  padding: 0 10px;
  background: hsl(var(--primary));
  color: #fff;
  box-shadow: 0 8px 16px hsl(var(--primary) / 0.22);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pos-add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px hsl(var(--primary) / 0.3);
}

.pos-products-empty {
  border: 1px dashed hsl(var(--border));
  border-radius: 18px;
  background: hsl(var(--card));
  color: #6b7280;
  padding: 24px;
  text-align: center;
  font-weight: 600;
}

.pos-cart {
  border: 1px solid hsl(var(--border) / 0.95);
  border-radius: 20px;
  background: linear-gradient(180deg, hsl(var(--card)) 0%, hsl(220 40% 98%) 100%);
  min-height: 620px;
  display: grid;
  grid-template-rows: auto 1fr auto auto auto;
  position: sticky;
  top: 8px;
  max-height: calc(100vh - 16px);
  box-shadow: 0 18px 34px hsl(220 45% 12% / 0.1);
  overflow: hidden;
}

.pos-cart-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 14px;
  border-bottom: 1px solid hsl(var(--border));
  background: linear-gradient(180deg, hsl(var(--card) / 0.96) 0%, hsl(var(--card) / 0.82) 100%);
  backdrop-filter: blur(6px);
}

.pos-cart h4 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: hsl(var(--foreground));
  letter-spacing: -0.02em;
}

.pos-order-no {
  margin: 5px 0 0;
  color: #748096;
  font-size: 14px;
  font-weight: 500;
}

.pos-cart-close {
  display: none !important;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: #334155;
  border-radius: 10px;
  box-shadow: none;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.pos-cart-items {
  overflow: auto;
  padding: 14px 16px;
  min-height: 0;
}

.pos-cart-items::-webkit-scrollbar {
  width: 8px;
}

.pos-cart-items::-webkit-scrollbar-thumb {
  background: hsl(var(--border));
  border-radius: 999px;
}

@media (min-width: 861px) {
  .page-pos .content {
    height: 100vh;
    overflow: hidden;
    padding-bottom: 24px;
  }

  .page-pos .panel {
    height: calc(100vh - 48px);
    min-height: 0;
    overflow: hidden;
  }
}

.pos-cart-empty {
  min-height: 100%;
  display: grid;
  place-content: center;
  gap: 12px;
  color: #9ca3b3;
  text-align: center;
}

.pos-cart-empty svg {
  width: 56px;
  height: 56px;
  margin-inline: auto;
  padding: 12px;
  border-radius: 16px;
  background: hsl(var(--muted));
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.pos-cart-empty p {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.pos-cart-item {
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  padding: 10px 11px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  background: hsl(var(--card));
  box-shadow: 0 8px 16px hsl(220 43% 11% / 0.05);
}

.pos-cart-item + .pos-cart-item {
  margin-top: 8px;
}

.pos-cart-item small {
  display: block;
  color: #7c8596;
  font-size: 12px;
}

.pos-cart-item strong {
  font-size: 14px;
  line-height: 1.3;
}

.qty-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.qty-box input {
  width: 56px;
  padding: 6px 8px;
  text-align: center;
  font-size: 13px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
}

.qty-box button {
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted));
  color: #334155;
  box-shadow: none;
  font-weight: 700;
}

.remove-link {
  border: 0;
  background: hsl(var(--destructive) / 0.12);
  color: hsl(var(--destructive));
  border-radius: 8px;
  box-shadow: none;
  padding: 4px 9px;
  cursor: pointer;
  font-weight: 700;
}

.pos-summary {
  margin: 0 16px;
  padding: 12px 13px;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--card));
  display: grid;
  gap: 7px;
  box-shadow: inset 0 1px 0 hsl(var(--muted));
}

.pos-kassir-line {
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--card));
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pos-summary div {
  display: flex;
  justify-content: space-between;
}

.pos-summary span {
  color: #4b5568;
  font-weight: 500;
}

.pos-summary strong {
  color: hsl(var(--foreground));
}

.pos-cart .form-grid {
  margin: 10px 16px 0;
  gap: 9px;
}

.pos-cart label {
  font-size: 13px;
  color: #334155;
}

.pos-cart select {
  height: 42px;
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
}

.pos-actions {
  margin: 12px 16px 16px;
  display: grid;
  gap: 8px;
}

.pos-actions button {
  min-height: 42px;
  border-radius: 14px;
}

.btn-danger-light {
  border: 1px solid hsl(var(--destructive) / 0.25);
  background: hsl(var(--destructive) / 0.12);
  color: hsl(var(--destructive));
  box-shadow: none;
}

.pos-fab {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  font-size: 16px;
}

.pos-fab .icon {
  width: 22px;
  height: 22px;
}

.pos-fab-label {
  display: none;
}

.pos-fab-count {
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  color: hsl(var(--primary));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  position: absolute;
  top: -3px;
  right: -2px;
}

button {
  border: 0;
  background: hsl(var(--primary));
  color: #fff;
  padding: 12px 16px;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  border-radius: 14px;
  box-shadow: 0 10px 20px hsl(var(--primary) / 0.24);
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 22px hsl(var(--primary) / 0.28);
  filter: brightness(1.02);
}

@media (max-width: 1120px) {
  .staff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-chart-card {
    min-height: 360px;
  }

  .kpi-grid,
  .kpi-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

  .report-grid {
    grid-template-columns: 1fr;
  }

  .pos-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  html,
  body {
    min-height: 100%;
    height: auto;
    overflow-x: hidden;
    overscroll-behavior-y: auto;
  }

  .shell {
    grid-template-columns: 1fr;
    min-height: 100dvh;
    height: auto;
  }

  .sidebar {
    display: none;
  }

  .content {
    padding: 0;
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
    min-height: 100dvh;
    height: auto;
    overflow: visible;
  }

  .page-dashboard .content {
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
  }

  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: hsl(var(--card));
    border-bottom: 1px solid hsl(var(--border));
    padding: 10px 14px;
    position: sticky;
    top: 0;
    z-index: 90;
  }

  .mobile-brand {
    gap: 10px;
  }

  .mobile-brand h1 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -0.02em;
  }

  .mobile-topbar-right {
    gap: 6px;
  }

  .mobile-profile-text strong,
  .mobile-profile-text small {
    max-width: 96px;
  }

  .panel {
    padding: 18px 16px 0;
  }

  .staff-hero {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .staff-hero h2 {
    font-size: 28px;
  }

  .staff-hero p {
    font-size: 14px;
  }

  .page-employees .staff-add-desktop {
    display: none;
  }

  .staff-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .staff-card {
    border-radius: 22px;
  }

  .staff-cover {
    height: 86px;
  }

  .staff-avatar {
    top: 56px;
    width: 64px;
    height: 64px;
    font-size: 34px;
  }

  .staff-card-body {
    padding: 30px 18px 18px;
  }

  .staff-topline h3 {
    font-size: 18px;
  }

  .staff-meta-line {
    font-size: 14px;
  }

  .dashboard-hero {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .dashboard-hero h2 {
    font-size: 30px;
  }

  .dashboard-hero p {
    font-size: 18px;
  }

  .dashboard-actions {
    width: 100%;
  }

  .action-btn {
    flex: 1;
    justify-content: center;
    font-size: 17px;
  }

  .dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .dashboard-kpi {
    border-radius: 22px;
    padding: 16px;
  }

  .dashboard-kpi p {
    font-size: 17px;
  }

  .dashboard-kpi h3 {
    font-size: 30px;
  }

  .dashboard-chart-card,
  .dashboard-transactions,
  .dashboard-low-stock-card {
    border-radius: 22px;
  }

  .dashboard-chart-card h3,
  .dashboard-transactions h3,
  .dashboard-low-stock-card h3 {
    font-size: 24px;
  }

  .dashboard-transactions .card-head {
    padding: 18px;
  }

  .tx-item {
    padding: 14px 18px;
  }

  .tx-meta strong,
  .tx-amount strong {
    font-size: 16px;
  }

  .tx-meta small,
  .tx-amount small {
    font-size: 14px;
  }

  .topbar h2 {
    font-size: 32px;
    line-height: 1.08;
  }

  .topbar {
    background: linear-gradient(165deg, #f8fbff 0%, #eef2ff 100%);
    border: 1px solid #dbe4f4;
    border-radius: 18px;
    padding: 14px;
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
  }

  .pwa-install-btn {
    width: 100%;
    justify-content: center;
  }

  .topbar p {
    font-size: 14px;
  }

  .kpi-grid,
  .kpi-grid.three {
    grid-template-columns: 1fr;
  }

  .kpi-card h3 {
    font-size: 30px;
  }

  .card h3 {
    font-size: 28px;
  }

  .card,
  .kpi-card {
    border-radius: 16px;
  }

  .panel {
    gap: 12px;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .period-custom {
    grid-template-columns: 1fr;
  }

  .period-custom-wrap {
    width: 100%;
  }

  .period-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .inventory-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 4px 0 10px;
    overflow: visible;
    padding-bottom: 0;
  }

  .inventory-filter-panel {
    margin: 6px 0 10px;
    padding: 7px;
  }

  .inventory-filter-toggle {
    padding: 10px 11px;
    font-size: 13px;
  }

  .inventory-filter-chip {
    min-width: 0;
    text-align: center;
    padding: 8px 10px;
    font-size: 13px;
  }

  .page-inventory .panel {
    padding-top: 12px;
  }

  .page-inventory_edit .mobile-topbar {
    display: none;
  }

  .page-sale_details .mobile-topbar {
    display: none;
  }

  .page-report_total_profit .mobile-topbar,
  .page-report_total_revenue .mobile-topbar {
    display: none;
  }

  .page-report_total_items .mobile-topbar,
  .page-report_top_products .mobile-topbar,
  .page-report_profitable_products .mobile-topbar,
  .page-report_debtors .mobile-topbar,
  .page-report_employee_performance .mobile-topbar,
  .page-report_product_performance .mobile-topbar,
  .page-employee_edit .mobile-topbar {
    display: none;
  }

  .page-reports_overview .mobile-topbar {
    display: none;
  }

  .page-inventory_edit .panel {
    padding-top: 72px;
  }

  .page-sale_details .panel {
    padding-top: 72px;
  }

  .page-report_total_profit .panel,
  .page-report_total_revenue .panel {
    padding-top: 72px;
  }

  .page-report_total_items .panel,
  .page-report_top_products .panel,
  .page-report_profitable_products .panel,
  .page-report_debtors .panel,
  .page-report_employee_performance .panel,
  .page-report_product_performance .panel,
  .page-employee_edit .panel {
    padding-top: 72px;
  }

  .page-reports_overview .panel {
    padding-top: 72px;
  }

  .page-inventory_edit .card {
    border-radius: 20px;
    padding: 14px;
  }

  .page-sale_details .card {
    border-radius: 20px;
    padding: 14px;
  }

  .page-report_total_profit .card,
  .page-report_total_revenue .card {
    border-radius: 20px;
    padding: 14px;
  }

  .page-report_total_items .card,
  .page-report_top_products .card,
  .page-report_profitable_products .card,
  .page-report_debtors .card,
  .page-report_employee_performance .card,
  .page-report_product_performance .card,
  .page-employee_edit .card {
    border-radius: 20px;
    padding: 14px;
  }

  .page-reports_overview .card {
    border-radius: 20px;
    padding: 14px;
  }

  .inventory-edit-appbar {
    gap: 10px;
    margin-bottom: 10px;
    position: fixed;
    top: calc(16px + env(safe-area-inset-top));
    left: 16px;
    right: 16px;
    z-index: 120;
    border-radius: 12px;
    padding: 8px 9px;
  }

  .inventory-edit-appbar strong {
    font-size: 22px;
  }

  .inventory-edit-back {
    width: 38px;
    height: 38px;
  }

  .page-inventory .card {
    border-radius: 20px;
    padding: 14px;
  }

  .page-inventory .card-head h3 {
    font-size: 24px;
    margin-bottom: 2px;
  }

  .page-inventory .search-form {
    gap: 8px;
    margin-bottom: 10px;
  }

  .page-inventory .search-form input {
    height: 50px;
    font-size: 14px;
  }

  .page-inventory .search-form button {
    min-height: 50px;
    font-size: 16px;
  }

  .page-inventory .mobile-item {
    border-radius: 16px;
    padding: 12px 13px;
  }

  .page-inventory .mobile-item-meta {
    gap: 4px;
  }

  .page-inventory .mobile-item-meta span {
    font-size: 15px;
  }

  .form-grid.two-col {
    grid-template-columns: 1fr;
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-actions button {
    width: 100%;
  }

  .employee-form .inline-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .employee-form .inline-actions button {
    width: 100%;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .pos-shell {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .page-pos .content {
    height: 100dvh;
    overflow: hidden;
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .page-pos .panel {
    padding-top: 14px;
    height: calc(100dvh - 72px - env(safe-area-inset-top));
    overflow: hidden;
  }

  .pos-head {
    gap: 12px;
    margin-bottom: 12px;
  }

  .pos-search-wrap {
    height: 54px;
    border-radius: 16px;
  }

  .pos-fab {
    display: inline-flex;
    position: fixed;
    right: 14px;
    bottom: calc(112px + env(safe-area-inset-bottom));
    z-index: 9105;
    width: 58px;
    height: 58px;
    min-height: 58px;
    padding: 0;
    border-radius: 999px;
    box-shadow: 0 12px 24px hsl(var(--primary) / 0.35);
  }

  .page-inventory .inventory-add-desktop {
    display: none;
  }

  .page-inventory .inventory-fab {
    display: inline-flex;
    position: fixed;
    right: 14px;
    bottom: calc(104px + env(safe-area-inset-bottom));
    z-index: 9105;
    width: 58px;
    height: 58px;
    min-height: 58px;
    padding: 0;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px hsl(var(--primary) / 0.35);
  }

  .page-employees .employees-fab {
    display: inline-flex;
    position: fixed;
    right: 14px;
    bottom: calc(104px + env(safe-area-inset-bottom));
    z-index: 9105;
    width: 58px;
    height: 58px;
    min-height: 58px;
    padding: 0;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px hsl(var(--primary) / 0.35);
  }

  .pos-category-chips {
    padding-bottom: 0;
  }

  .pos-chip {
    padding: 9px 20px;
    font-size: 15px;
  }

  .pos-layout {
    grid-template-columns: 1fr;
    flex: 1;
    min-height: 0;
  }

  .pos-products {
    max-height: none;
    height: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 0;
    padding-bottom: calc(176px + env(safe-area-inset-bottom));
  }

  .pos-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .pos-product-thumb {
    height: 126px;
    margin: 10px;
  }

  .pos-product-body {
    padding: 12px;
    gap: 10px;
  }

  .pos-product-body strong {
    font-size: 16px;
    min-height: 2.6em;
  }

  .pos-product-foot span {
    font-size: 18px;
    min-height: 2.35em;
  }

  .pos-cart {
    position: fixed;
    top: auto;
    left: 8px;
    right: 8px;
    bottom: calc(74px + env(safe-area-inset-bottom));
    z-index: 9000;
    border-radius: 20px;
    min-height: 440px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.25);
    transform: translateY(calc(100% + 24px));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.2s ease;
    max-height: calc(78vh - env(safe-area-inset-bottom));
    overflow: auto;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }

  .pos-cart.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .pos-cart-close {
    display: inline-flex !important;
  }

  .pos-cart-items {
    max-height: none;
  }

  .pos-shell.cart-open .pos-fab {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
  }

  table {
    min-width: 620px;
  }

  .mobile-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(22px, calc(env(safe-area-inset-bottom) + 12px));
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #dbe4f4;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: stretch;
    gap: 6px;
    padding: 6px;
    z-index: 9999;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-link {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1 0 64px;
    min-width: 62px;
    gap: 3px;
    font-size: 11px;
    padding: 9px 4px;
    border-radius: 12px;
    min-height: 58px;
  }

  .mobile-nav .mobile-link:nth-child(6) {
    display: none;
  }

  .mobile-link .icon {
    width: 18px;
    height: 18px;
  }

  .mobile-link.active {
    box-shadow: inset 0 0 0 1px #d9ddff;
  }

  .mobile-label {
    display: none;
  }

  .mobile-short {
    display: inline;
  }

  .mobile-sale-list {
    display: grid;
    gap: 10px;
  }

  .mobile-list {
    display: grid;
    gap: 10px;
  }

  .mobile-sale-item {
    border: 1px solid #e4eaf6;
    border-radius: 14px;
    padding: 12px;
    background: #fbfdff;
  }

  .mobile-item {
    border: 1px solid #e4eaf6;
    border-radius: 14px;
    padding: 12px;
    background: #fbfdff;
  }

  .mobile-item strong {
    display: block;
    font-size: 15px;
    margin-bottom: 8px;
  }

  .mobile-item-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    font-size: 13px;
    color: #475569;
  }

  .mobile-sale-item strong {
    display: block;
    font-size: 15px;
    margin-bottom: 8px;
  }

  .mobile-sale-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    font-size: 13px;
    color: #475569;
  }

  .mobile-sale-list + .table-wrap {
    display: none;
  }

  .mobile-list + .table-wrap {
    display: none;
  }
}

@media (max-width: 440px) {
  .staff-hero h2 {
    font-size: 20px;
  }

  .staff-hero p {
    font-size: 12px;
  }

  .staff-cover {
    height: 88px;
  }

  .staff-avatar {
    width: 58px;
    height: 58px;
    border-radius: 17px;
    font-size: 32px;
  }

  .staff-topline h3 {
    font-size: 19px;
  }

  .staff-role-badge {
    font-size: 11px;
    padding: 5px 10px;
  }

  .staff-meta-line {
    font-size: 15px;
  }

  .dashboard-hero h2 {
    font-size: 26px;
  }

  .dashboard-actions {
    gap: 10px;
  }

  .action-btn {
    padding-inline: 12px;
    font-size: 15px;
  }

  .dashboard-kpi {
    border-radius: 20px;
    padding: 14px;
  }

  .dashboard-kpi p {
    font-size: 15px;
  }

  .dashboard-kpi h3 {
    font-size: 28px;
  }

  .dashboard-chart-card h3,
  .dashboard-transactions h3,
  .dashboard-low-stock-card h3 {
    font-size: 20px;
  }

  .tx-item {
    grid-template-columns: auto 1fr;
    gap: 10px;
  }

  .tx-amount {
    grid-column: 2;
    text-align: left;
  }

  .tx-meta strong,
  .tx-amount strong {
    font-size: 18px;
  }

  .topbar h2 {
    font-size: 28px;
  }

  .kpi-card h3 {
    font-size: 26px;
  }

  .card h3 {
    font-size: 24px;
  }

  .mobile-link {
    flex-basis: 58px;
    min-width: 58px;
    min-height: 52px;
    font-size: 10px;
  }

  .mobile-sale-meta {
    grid-template-columns: 1fr;
  }

  .mobile-item-meta {
    grid-template-columns: 1fr;
  }

  .big-number {
    font-size: 32px;
  }
}

@media (min-width: 861px) {
  .mobile-sale-list {
    display: none;
  }

  .mobile-list {
    display: none;
  }
}

/* Auth page overrides (login + subscription expired) */
.auth-page {
  background: #f7f9fc;
  color: #0f172a;
}

.auth-page [hidden] {
  display: none !important;
}

.auth-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.auth-blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(66px);
  animation: pulseBlob 3.5s ease-in-out infinite;
}

.auth-blob-one {
  width: 440px;
  height: 440px;
  left: -160px;
  top: -150px;
  background: hsl(var(--primary) / 0.14);
}

.auth-blob-two {
  width: 560px;
  height: 560px;
  right: -200px;
  bottom: -220px;
  background: hsl(var(--accent) / 0.14);
  animation-delay: 1.5s;
}

.auth-page .auth-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(hsl(var(--foreground) / 0.16) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--foreground) / 0.16) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.025;
}

.auth-page .auth-shell {
  gap: 18px;
  padding: 28px 16px 20px;
}

.auth-page .auth-brand {
  gap: 9px;
}

.auth-page .auth-brand-badge {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(150deg, #3b82f6, #1d4ed8);
  font-size: 34px;
  box-shadow: 0 12px 26px rgba(29, 78, 216, 0.3);
}

.auth-page .auth-brand h1 {
  font-size: clamp(30px, 2.6vw, 40px);
}

.auth-page .auth-brand p {
  color: #64748b;
  font-size: 14px;
}

.auth-page .auth-card {
  width: min(100%, 520px);
  background: hsl(var(--card) / 0.42);
  border: 1px solid hsl(0 0% 100% / 0.55);
  border-radius: 28px;
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  padding: 24px 22px 22px;
  gap: 13px;
  overflow: hidden;
  position: relative;
  animation: authCardIn 0.5s ease-out;
}

.auth-gradient-line {
  display: none;
}

.auth-page .auth-card h2 {
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.07;
  margin-top: 8px;
}

.auth-page .auth-subtext {
  color: #64748b;
  font-size: 15px;
}

.auth-page .auth-alert {
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  animation: bannerIn 0.22s ease;
}

.auth-page .auth-alert-danger {
  color: #b42318;
  background: #fff1f3;
  border: 1px solid #fecdd6;
}

.auth-alert-lock {
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fdba74;
}

.auth-alert-lock strong {
  display: block;
  font-size: 14px;
}

.auth-alert-lock p {
  margin: 2px 0 0;
  font-size: 13px;
  color: #9a3412;
}

.auth-alert-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #fecdd6;
  font-size: 13px;
  flex-shrink: 0;
}

.auth-alert p {
  margin: 2px 0 0;
}

.auth-lock-progress-wrap {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #fee2e2;
  overflow: hidden;
}

.auth-lock-progress {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ef4444, #dc2626);
  transition: width 0.5s ease;
}

.auth-field {
  display: grid;
  gap: 7px;
  color: #1e293b;
  font-size: 14px;
  font-weight: 700;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.auth-label-row small {
  color: hsl(var(--destructive));
  font-size: 12px;
}

.auth-input-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.auth-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  transition: color 0.2s ease;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-input-icon svg,
.auth-input-icon-right svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-input-wrap:focus-within .auth-input-icon,
.auth-input-wrap:focus-within .auth-input-icon-right {
  color: hsl(var(--primary));
}

.auth-page .auth-form input {
  width: 100%;
  display: block;
  box-sizing: border-box;
  height: 52px;
  border-radius: 14px;
  border: 2px solid hsl(var(--border) / 0.75);
  background: #fff;
  padding: 0 40px 0 38px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input-icon-right {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-page .auth-form input:focus {
  outline: 0;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 4px hsl(var(--primary) / 0.1);
}

.auth-page .auth-form input::placeholder {
  color: #94a3b8;
}

.auth-page .auth-form input:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.auth-attempt-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-attempt-dots span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #e2e8f0;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.auth-attempt-dots span.used {
  background: hsl(var(--destructive));
  transform: scale(1.1);
}

.auth-page .auth-submit {
  min-height: 52px;
  border-radius: 14px;
  background: linear-gradient(92deg, #2563eb, #1d4ed8);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.auth-page .auth-submit:disabled {
  opacity: 0.64;
}

.auth-page .auth-submit:not(:disabled):hover {
  transform: translateY(-1px);
}

.auth-submit-spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  animation: spin 0.9s linear infinite;
}

.auth-page .auth-hint {
  border-radius: 14px;
  background: #f8fbff;
  padding: 10px 12px;
}

.auth-lock-card {
  width: min(100%, 560px);
  margin-top: 8px;
  text-align: center;
}

.auth-lock-icon {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  margin-inline: auto;
  background: #fff1f2;
  border: 2px solid #fecdd3;
  display: grid;
  place-items: center;
  position: relative;
}

.auth-lock-icon svg {
  width: 42px;
  height: 42px;
  stroke: #e11d48;
  stroke-width: 2;
  fill: none;
  position: relative;
  z-index: 2;
}

.auth-lock-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 26px;
  border: 2px solid hsl(var(--destructive) / 0.35);
  animation: pingSlow 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.auth-info-box {
  border-radius: 18px;
  background: hsl(var(--muted) / 0.75);
  border: 1px solid hsl(var(--border) / 0.6);
  text-align: left;
}

.auth-status-danger {
  color: hsl(var(--destructive));
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.auth-status-danger i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: hsl(var(--destructive));
  display: inline-block;
}

.auth-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  transition: transform 0.2s ease;
}

.auth-action:hover {
  transform: translateY(-1px);
}

.auth-action span strong {
  display: block;
}

.auth-action span small {
  display: block;
  margin-top: 2px;
  opacity: 0.8;
}

.auth-action em {
  font-style: normal;
  font-size: 19px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.auth-action:hover em {
  transform: translateX(2px);
}

.auth-action-button {
  width: 100%;
  border: 1px solid hsl(var(--border) / 0.65);
  background: #f8fafc;
  color: #1e293b;
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  cursor: pointer;
}

.auth-action-retry {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.auth-retry-form {
  margin: 0;
}

.auth-lock-note {
  margin: 2px 0 0;
  color: #64748b;
  font-size: 12px;
}

.auth-page .auth-foot {
  margin-top: 26px;
}

.auth-shake {
  animation: shake 0.38s linear;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  15% {
    transform: translateX(-8px);
  }

  30% {
    transform: translateX(8px);
  }

  45% {
    transform: translateX(-6px);
  }

  60% {
    transform: translateX(6px);
  }

  75% {
    transform: translateX(-4px);
  }

  90% {
    transform: translateX(4px);
  }
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pingSlow {
  75%,
  100% {
    transform: scale(1.08);
    opacity: 0;
  }
}

@keyframes pulseBlob {
  0%,
  100% {
    opacity: 0.8;
  }

  50% {
    opacity: 0.45;
  }
}

@keyframes authCardIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bannerIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .auth-page .auth-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    min-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 28px 8px 12px;
  }

  .auth-page .auth-brand {
    margin-top: 6px;
  }

  .auth-page .auth-brand-badge {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    font-size: 30px;
  }

  .auth-page .auth-brand h1 {
    font-size: 34px;
  }

  .auth-page .auth-brand p {
    font-size: 13px;
  }

  .auth-page .auth-card {
    width: 100%;
    max-width: 560px;
    border-radius: 22px;
    padding: 18px 13px 14px;
    margin-top: 6px;
  }

  .auth-page .auth-card h2 {
    font-size: 31px;
  }

  .auth-page .auth-form input {
    height: 50px;
    font-size: 15px;
    border-radius: 13px;
    padding: 0 38px 0 36px;
  }

  .auth-input-icon,
  .auth-input-icon-right {
    width: 17px;
    height: 17px;
  }

  .auth-page .auth-submit {
    min-height: 50px;
    font-size: 16px;
    border-radius: 13px;
  }

  .auth-lock-card {
    width: min(100%, 420px);
    margin-top: 10px;
  }

  .auth-lock-icon {
    width: 78px;
    height: 78px;
    border-radius: 20px;
  }

  .auth-lock-icon svg {
    width: 34px;
    height: 34px;
  }

  .auth-page .auth-lock-card h2 {
    font-size: 26px;
    margin-top: 6px;
  }

  .auth-page .auth-lock-card .auth-subtext {
    font-size: 14px;
    line-height: 1.5;
  }

  .auth-lock-card .auth-info-box {
    border-radius: 14px;
    padding: 6px 11px;
  }

  .auth-lock-card .auth-info-box span {
    font-size: 12px;
  }

  .auth-lock-card .auth-info-box strong {
    font-size: 13px;
  }

  .auth-lock-card .auth-action,
  .auth-lock-card .auth-action-button {
    border-radius: 12px;
    padding: 10px 11px;
  }

  .auth-lock-card .auth-action span strong {
    font-size: 13px;
  }

  .auth-lock-card .auth-action span small {
    font-size: 11px;
  }

  .auth-page .auth-foot {
    margin-top: auto;
    padding-top: 18px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    text-align: center;
    width: 100%;
  }
}

@media (min-width: 992px) {
  .auth-page .auth-shell {
    grid-template-columns: minmax(280px, 360px) minmax(460px, 640px);
    align-items: center;
    gap: 24px;
  }

  .auth-page .auth-brand {
    justify-items: start;
    text-align: left;
    padding-right: 8px;
  }

  .auth-page .auth-foot {
    grid-column: 1 / -1;
  }
}
