:root {
  --bg: #f4f7f1;
  --surface: #ffffff;
  --surface-alt: #eef4e8;
  --text: #1f2a1f;
  --muted: #687466;
  --line: #d9e3d3;
  --primary: #2d6a4f;
  --primary-soft: #dcefe4;
  --danger: #c94f4f;
  --warning: #d68c1f;
  --success: #2f8f5b;
  --shadow: 0 18px 45px rgba(34, 66, 47, 0.08);
  --shadow-mobile: 0 -12px 30px rgba(31, 42, 31, 0.08);
  --radius: 20px;
  --font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-style: var(--font-style, normal);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(98, 162, 109, 0.18), transparent 26%),
    radial-gradient(circle at top right, rgba(216, 194, 122, 0.12), transparent 18%),
    linear-gradient(180deg, #f8fbf6 0%, var(--bg) 100%);
  min-height: 100vh;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.btn-primary,
.btn-secondary,
.btn-danger {
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 10px 24px rgba(45, 106, 79, 0.22);
}

.btn-secondary {
  background: var(--surface-alt);
  color: var(--text);
}

.btn-danger {
  background: #fae3e3;
  color: #8b2020;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(320px, 1fr);
}

.auth-brand {
  padding: 4rem;
  background: linear-gradient(145deg, rgba(45, 106, 79, 0.95), rgba(65, 135, 91, 0.88));
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-brand h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.08;
}

.auth-brand p {
  color: rgba(255, 255, 255, 0.82);
  max-width: 34rem;
}

.auth-points,
.grid,
.nav-list,
.sidebar-footer {
  display: grid;
  gap: 1rem;
}

.nav-list {
  gap: 0.45rem;
}

.auth-point {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.auth-card-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  width: min(480px, 100%);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow);
  border-radius: 28px;
  padding: 2rem;
}

.ticker-banner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background:
    linear-gradient(120deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92)),
    linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.22);
  padding: 0.9rem 1rem;
}

.ticker-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.96), rgba(249, 115, 22, 0.92));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 24px rgba(248, 113, 113, 0.28);
}

.ticker-track span {
  color: #f8fafc;
  text-shadow: 0 2px 14px rgba(15, 23, 42, 0.75);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.floating-online-widget {
  position: fixed;
  left: 1rem;
  bottom: 7.2rem;
  z-index: 34;
  width: min(330px, calc(100vw - 1.5rem));
  touch-action: none;
}

.floating-online-widget.dragging {
  opacity: 0.96;
}

.floating-online-trigger {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  border-radius: 22px;
  padding: 0.85rem 1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.2);
}

.floating-online-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #86efac;
  box-shadow: 0 0 0 8px rgba(134, 239, 172, 0.15);
}

.floating-online-count {
  flex: 1;
  text-align: left;
  font-weight: 800;
}

.floating-online-card {
  display: none;
  margin-top: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  padding: 0.95rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.floating-online-widget.open .floating-online-card {
  display: block;
}

.floating-online-widget.minimized .floating-online-card {
  display: none !important;
}

.floating-online-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.floating-online-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.floating-online-minimize {
  width: 44px;
  min-width: 44px;
  padding: 0.75rem 0;
}

.floating-online-list {
  display: grid;
  gap: 0.55rem;
  max-height: min(42vh, 280px);
  overflow-y: auto;
}

.floating-online-item {
  display: grid;
  gap: 0.18rem;
  padding: 0.72rem 0.82rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.floating-online-item span {
  font-size: 0.82rem;
  color: var(--muted);
}

.floating-online-meta {
  margin-top: 0.8rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.floating-online-widget[data-theme="glass"] .floating-online-card {
  background: rgba(255, 255, 255, 0.9);
}

.floating-online-widget[data-theme="contrast"] .floating-online-trigger {
  background: linear-gradient(135deg, #0f172a, #111827);
}

.floating-online-widget[data-theme="contrast"] .floating-online-card {
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.22);
}

.floating-online-widget[data-theme="contrast"] .floating-online-item {
  background: rgba(30, 41, 59, 0.92);
  border-color: rgba(148, 163, 184, 0.12);
}

.floating-online-widget[data-theme="contrast"] .floating-online-item span,
.floating-online-widget[data-theme="contrast"] .floating-online-meta,
.floating-online-widget[data-theme="contrast"] .floating-online-head .muted {
  color: rgba(226, 232, 240, 0.82);
}

.floating-online-widget[data-theme="accent"] .floating-online-trigger {
  background: linear-gradient(135deg, var(--accent), var(--primary));
}

.floating-online-widget[data-theme="accent"] .floating-online-card {
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.96), rgba(255, 255, 255, 0.92));
}

.floating-online-widget[data-shape="pill"] .floating-online-trigger,
.floating-online-widget[data-shape="pill"] .floating-online-card,
.floating-online-widget[data-shape="pill"] .floating-online-item {
  border-radius: 999px;
}

.floating-online-widget[data-shape="square"] .floating-online-trigger,
.floating-online-widget[data-shape="square"] .floating-online-card,
.floating-online-widget[data-shape="square"] .floating-online-item {
  border-radius: 12px;
}

@media (max-width: 768px) {
  .ticker-banner {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .floating-online-widget {
    left: 0.8rem;
    bottom: 11.4rem;
    width: min(310px, calc(100vw - 1.6rem));
  }
}

.auth-card-hero {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,250,246,.94)),
    radial-gradient(circle at top right, rgba(45, 106, 79, 0.08), transparent 28%);
}

.auth-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.35rem;
  margin-bottom: 1.2rem;
  border-radius: 999px;
  background: rgba(233, 241, 235, 0.95);
}

.auth-switch-btn {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.auth-switch-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(45, 106, 79, 0.18);
}

.auth-pane {
  display: none;
}

.auth-pane.active {
  display: grid;
  gap: 1rem;
}

.app-shell {
  display: grid;
  grid-template-columns: 290px 1fr;
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  padding: 1.4rem;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.brand {
  padding: 1rem;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #eaf6ee, #ffffff);
  border: 1px solid var(--line);
  margin-bottom: 1rem;
}

.brand h2,
.brand p,
.topbar h1,
.section-header h2,
.panel h3,
.panel h4 {
  margin: 0;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
  display: block;
  margin-bottom: 0.8rem;
  border: 1px solid var(--line);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.profile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
}

.profile-link:hover .profile-avatar,
.profile-link:focus .profile-avatar {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(45, 106, 79, 0.16);
}

.profile-avatar.small {
  width: 38px;
  height: 38px;
  margin: 0;
  border-radius: 14px;
}

.profile-avatar.large {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  margin: 0;
}

.profile-header,
.mobile-appbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-media {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
}

.profile-header .profile-avatar,
.profile-header .app-logo-sidebar {
  margin: 0;
}

.profile-header .profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
  align-content: center;
}

.brand-copy h2,
.brand-copy p {
  overflow-wrap: anywhere;
}

.brand-copy p {
  line-height: 1.35;
  font-size: 0.95rem;
}

.mobile-logout-form {
  margin: 0;
}

.mobile-logout-btn {
  padding: 0.6rem 1rem;
  min-width: 96px;
  font-weight: 700;
}

.app-logo {
  --logo-size: 64px;
  display: block;
  width: var(--logo-size);
  height: var(--logo-size);
  max-width: 100%;
  object-fit: cover;
  object-position: center;
  flex-shrink: 0;
  padding: 0;
  border-radius: clamp(14px, 1.6vw, 22px);
  border: 1px solid rgba(217, 227, 211, 0.9);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.92);
  overflow: hidden;
}

.app-logo-frame-fit {
  object-fit: cover;
  border-radius: clamp(18px, 2vw, 24px);
}

.app-logo-sidebar {
  --logo-size: clamp(52px, 5vw, 64px);
}

.app-logo-inline {
  --logo-size: 24px;
  padding: 0.2rem;
  border-radius: 8px;
  vertical-align: middle;
  margin-right: 0.45rem;
  box-shadow: none;
}

.app-logo-title {
  --logo-size: clamp(52px, 4.6vw, 64px);
}

.app-logo-auth {
  --logo-size: clamp(112px, 16vw, 156px);
}

.app-logo-dominant {
  --logo-size: clamp(132px, 20vw, 220px);
  border-radius: clamp(24px, 2.8vw, 34px);
}

.app-logo-auth-card {
  --logo-size: clamp(56px, 6vw, 72px);
}

.app-logo-preview {
  --logo-size: clamp(72px, 10vw, 96px);
  margin-top: 1rem;
}

.brand .app-logo-sidebar,
.mobile-appbar-overline .app-logo-inline,
.title-card-title-row .app-logo-title,
.auth-card-logo-row .app-logo-auth-card,
.app-logo-showcase .app-logo-dominant,
.panel .app-logo-preview {
  width: var(--logo-size);
  height: var(--logo-size);
  max-width: var(--logo-size);
  max-height: var(--logo-size);
}

.app-logo-showcase {
  margin-bottom: 1.1rem;
}

.auth-card-logo-row,
.title-card-title-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: nowrap;
}

.auth-card-logo-row {
  margin-bottom: 1rem;
}

.title-card-title-row .app-logo-title {
  flex: 0 0 auto;
  align-self: flex-start;
}

.title-card-title-row h1 {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.member-access-table td:last-child,
.category-table td:nth-child(5),
.category-table td:first-child {
  word-break: break-word;
}

.member-access-table td:last-child,
.category-table td:nth-child(5) {
  min-width: 220px;
}

.signature-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
}

.signature-preview-card {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.signature-preview-card img {
  width: 100%;
  min-height: 110px;
  max-height: 140px;
  object-fit: contain;
  background: linear-gradient(180deg, #fff, #f7faf5);
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
}

.profile-photo-wrap {
  position: relative;
  width: fit-content;
}

.profile-edit-badge {
  position: absolute;
  right: -10px;
  bottom: -8px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  box-shadow: var(--shadow);
  font-size: 0.78rem;
}

.nav-item {
  width: 100%;
  display: block;
  text-align: left;
  background: transparent;
  color: var(--text);
  border-radius: 16px;
  padding: 0.72rem 0.9rem;
  min-height: 0;
}

.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}

.mobile-appbar,
.mobile-bottom-nav {
  display: none;
}

.content {
  padding: 1.8rem;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.section-body {
  display: grid;
  gap: 1rem;
}

.topbar,
.section-header,
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.period-filter-bar input[type="date"] {
  min-width: 150px;
}

.calculator-card {
  margin-top: 1rem;
}

.calculator-card iframe {
  width: 100%;
  min-height: 320px;
  border: 0;
  border-radius: 18px;
  background: #fff;
}

.org-hierarchy-wrap {
  overflow-x: auto;
  padding-bottom: 0.4rem;
}

.org-hierarchy-svg {
  width: 100%;
  min-width: 520px;
  display: block;
}

.title-card {
  display: grid;
  gap: 0.45rem;
  padding: 1.4rem 1.55rem;
  border-radius: 28px;
  background: var(--title-card-background);
  border: 1px solid rgba(217, 227, 211, 0.9);
  box-shadow: var(--shadow);
  min-width: min(100%, 520px);
  position: relative;
  overflow: hidden;
}

.title-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,.42), transparent 42%, rgba(255,255,255,.18));
  pointer-events: none;
}

.title-card > * {
  position: relative;
  z-index: 1;
}

.title-card-tag {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 0.36rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 700;
}

.actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.actions form {
  margin: 0;
}

.brand,
.panel,
.summary-note,
.alert,
.empty-state,
th,
td,
.nav-item,
.mobile-nav-item,
.btn-primary,
.btn-secondary,
.btn-danger,
h1,
h2,
h3,
h4,
p,
label {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.muted {
  color: var(--muted);
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4,
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.panel {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  overflow: hidden;
}

.section-header {
  padding: 1rem 1.1rem;
  margin: -0.15rem -0.15rem 1rem;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(250,252,249,.95), rgba(239,246,241,.96));
  border: 1px solid rgba(217, 227, 211, 0.72);
}

.topbar > div:last-child.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 241, 0.94));
}

.section-body > .panel,
.grid > .panel,
.report-grid > .panel {
  min-width: 0;
}

.stat-card {
  display: grid;
  gap: 0.25rem;
}

.icon-card {
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 0.85rem;
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
  flex-shrink: 0;
}

.stat-card strong {
  font-size: 1.65rem;
}

.stat-card.compact strong {
  font-size: 1.2rem;
}

.compact-strip .panel {
  padding: 0.95rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  font-size: 0.92rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  background: #fff;
  color: var(--text);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(45, 106, 79, 0.45);
  box-shadow: 0 0 0 4px rgba(45, 106, 79, 0.12);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(217, 227, 211, 0.8);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 100%;
}

th,
td {
  padding: 0.85rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(242, 247, 239, 0.95);
  position: sticky;
  top: 0;
  z-index: 1;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  background: var(--surface-alt);
}

.chip.role-admin {
  background: #e7f2ea;
  color: var(--primary);
}

.chip.role-user {
  background: #eef0f7;
  color: #42518c;
}

.chip.positive {
  background: #e1f4ea;
  color: var(--success);
}

.chip.negative {
  background: #fae7e7;
  color: var(--danger);
}

.chart {
  min-height: 280px;
}

.chart.chart-small {
  min-height: 220px;
}

.chart.chart-medium {
  min-height: 260px;
}

.chart svg {
  width: 100%;
  height: 100%;
}

.donut-layout {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1rem;
  align-items: center;
}

.donut-legend {
  display: grid;
  gap: 0.65rem;
}

.chart-legend-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.chart-legend-inline span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-row,
.legend-left {
  display: flex;
  align-items: center;
}

.legend-row {
  justify-content: space-between;
  gap: 1rem;
}

.legend-left {
  gap: 0.55rem;
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.chart-empty {
  min-height: 240px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: linear-gradient(180deg, #fbfcfa, #f0f5ed);
  border-radius: 16px;
  border: 1px dashed var(--line);
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.report-table td:last-child,
.report-table th:last-child {
  text-align: right;
}

.summary-note,
.alert,
.empty-state {
  border-radius: 18px;
  padding: 0.95rem 1rem;
}

.feature-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.65rem;
}

.feature-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.ticker-banner {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(255,255,255,0.94), rgba(236,253,245,0.9), rgba(255,255,255,0.94));
  padding: 0.8rem 0;
}

.ticker-track {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
  width: max-content;
  animation: ticker-slide 22s linear infinite;
}

.ticker-track span {
  font-weight: 600;
  color: var(--primary-dark);
}

.ad-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.ad-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.ad-card img,
.ad-card video {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  background: #0f172a;
}

.app-footer {
  text-align: center;
  color: var(--muted);
  padding: 0.6rem 1rem 1.2rem;
}

@keyframes ticker-slide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.scan-input-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: stretch;
}

.scan-trigger {
  white-space: nowrap;
}

.input-hint {
  color: var(--muted);
  font-size: 0.8rem;
}

.scanner-inline-card {
  display: grid;
  gap: 0.85rem;
}

.scanner-modal {
  position: fixed;
  inset: 0;
  background: rgba(18, 28, 22, 0.72);
  backdrop-filter: blur(12px);
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.scanner-modal.open {
  display: flex;
}

.scanner-dialog {
  width: min(520px, 100%);
  max-width: 95vw;
  margin: auto;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(217, 227, 211, 0.9);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.scanner-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.scanner-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  
  overflow: hidden;
  border-radius: 24px;
  background: #0d1711;
  aspect-ratio: 4 / 3;
}

.scanner-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-manual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.scanner-manual input {
  min-width: 0;
}

.scanner-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scanner-overlay::before {
  content: "";
  position: absolute;

  width: 70%;
  height: 30%;

  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* CENTER PERFECT */

  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  box-shadow: 0 0 0 999px rgba(8, 14, 11, 0.24);
}

.scanner-overlay::after {
  content: "";
  position: absolute;

  width: 70%;
  left: 50%;
  top: 50%;
  transform: translateX(-50%);

  height: 2px;
  background: linear-gradient(90deg, transparent, #8effc2, transparent);
  box-shadow: 0 0 12px rgba(142, 255, 194, 0.8);

  animation: scanner-line 1.8s linear infinite;
}

.scanner-status {
  text-align: center;
}

@keyframes scanner-line {
  0% {
    transform: translateY(-54px);
  }
  50% {
    transform: translateY(54px);
  }
  100% {
    transform: translateY(-54px);
  }
}
@media (max-width: 860px) {
  .scanner-frame {
    aspect-ratio: 3 / 4; /* lebih tinggi biar kamera mobile pas */
  }

  .scanner-overlay::before {
    width: 80%;
    height: 35%;
  }
}

.summary-note {
  background: #f6f8ef;
  border: 1px solid #dee7cd;
}

.alert {
  background: #fff5df;
  border: 1px solid #ecd8a2;
  color: #76551d;
}

.stock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-weight: 700;
  background: #e9f6ee;
  color: #1d6b43;
}

.stock-badge.low {
  background: #fff0dd;
  color: #935615;
}

.cashier-layout .panel {
  height: 100%;
}

.cashier-panel {
  background:
    radial-gradient(circle at top right, rgba(45, 106, 79, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(244,248,241,.94));
}

.cashier-hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(45, 106, 79, 0.1);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
}

.cashier-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.cashier-mini-card {
  display: grid;
  gap: 0.2rem;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(217, 227, 211, 0.85);
  box-shadow: 0 10px 22px rgba(34, 66, 47, 0.06);
}

.cashier-mini-card strong {
  font-size: 1.15rem;
}

.cashier-stock-note {
  font-weight: 700;
}

.cashier-stock-note.danger {
  color: var(--danger);
}

.attachment-preview {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, #f9fbfa, #f1f6f2);
}

.attachment-preview.empty {
  text-align: center;
  color: var(--muted);
}

.attachment-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}

.attachment-preview-head a {
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.attachment-preview img,
.attachment-preview iframe {
  width: 100%;
  min-height: 220px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: #fff;
}

.attachment-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  text-decoration: none;
  color: #163728;
  border: 1px solid rgba(45, 106, 79, 0.18);
  background: rgba(45, 106, 79, 0.08);
}

.attachment-badge img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 999px;
}

.attachment-badge.file {
  background: rgba(255, 237, 213, 0.65);
  border-color: rgba(245, 158, 11, 0.24);
}

.cashier-pos-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.95fr);
  gap: 1rem;
  align-items: start;
}

.cashier-pos-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: end;
  margin-bottom: 1rem;
}

.cashier-search-field {
  display: grid;
  gap: 0.4rem;
  font-weight: 700;
}

.cashier-toolbar-note {
  padding: 0.8rem 1rem;
  border-radius: 16px;
  background: rgba(45, 106, 79, 0.08);
  color: #214b36;
  max-width: 260px;
}

.cashier-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  max-height: 760px;
  overflow-y: auto;
  padding-right: 0.1rem;
}

.cashier-product-card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(242,247,243,0.96));
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.cashier-product-card:hover,
.cashier-product-card.active {
  transform: translateY(-2px);
  border-color: rgba(45, 106, 79, 0.32);
  box-shadow: 0 16px 28px rgba(28, 59, 42, 0.12);
}

.cashier-product-card.is-empty {
  opacity: 0.55;
  cursor: not-allowed;
}

.cashier-product-top,
.cashier-product-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.cashier-product-price {
  font-weight: 800;
  color: var(--primary);
}

.cashier-product-meta {
  display: grid;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.cashier-product-promo {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.1);
  color: #a12727;
  font-size: 0.78rem;
  font-weight: 700;
}

.cashier-product-stock {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(45, 106, 79, 0.1);
  color: #225039;
  font-size: 0.8rem;
  font-weight: 700;
}

.cashier-product-stock.low {
  background: rgba(245, 158, 11, 0.14);
  color: #9a5f12;
}

.cashier-product-add {
  font-weight: 800;
  color: var(--primary);
}

.cashier-cart-wrap,
.cashier-payment-card {
  display: grid;
  gap: 1rem;
}

.cashier-cart-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}

.cashier-cart-list {
  max-height: 540px;
  overflow-y: auto;
  padding-right: 0.1rem;
}

.cashier-cart-item.batch-row {
  grid-template-columns: 1fr;
  gap: 0.9rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,249,247,0.95));
}

.cashier-cart-item-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: start;
}

.cashier-cart-item-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(150px, 0.9fr);
  gap: 0.9rem;
  align-items: end;
}

.cashier-line-total {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(45, 106, 79, 0.08);
}

.cashier-line-total span {
  color: var(--muted);
  font-size: 0.85rem;
}

.cashier-line-total strong {
  font-size: 1.05rem;
  color: #1a4b34;
}

.cashier-payment-grid {
  display: grid;
  grid-template-columns: minmax(230px, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
}

.cashier-payment-card {
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,248,245,0.95));
}

.cashier-payment-line {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.cashier-payment-line.total strong {
  font-size: 1.15rem;
  color: var(--primary);
}

.cashier-payment-fields {
  align-items: start;
}

.cashier-pos-empty {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cashier-reference-shell {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cashier-reference-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 24px;
  color: #f5fbff;
  background: linear-gradient(135deg, #157347, #1f8e55 52%, #2ea66b 100%);
  box-shadow: 0 18px 34px rgba(21, 115, 71, 0.22);
}

.cashier-reference-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.cashier-reference-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.cashier-reference-brand strong,
.cashier-reference-session strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
}

.cashier-reference-brand small,
.cashier-reference-session span {
  display: block;
  color: rgba(245, 251, 255, 0.82);
}

.cashier-reference-session {
  min-width: 0;
  text-align: right;
}

.cashier-reference-shortcuts {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.85rem;
}

.cashier-reference-shortcut {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  padding: 0.9rem 0.65rem;
  border-radius: 18px;
  text-decoration: none;
  color: #f8fbff;
  background: linear-gradient(180deg, #2d75b8, #275d96);
  border: 1px solid rgba(18, 51, 89, 0.18);
  box-shadow: 0 14px 26px rgba(33, 79, 126, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.cashier-reference-shortcut:hover,
.cashier-reference-shortcut.active {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 18px 28px rgba(33, 79, 126, 0.24);
}

.cashier-reference-shortcut span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.cashier-reference-shortcut strong {
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
}

.cashier-reference-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.cashier-reference-kpi {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.05rem;
  border-radius: 20px;
  color: #ffffff;
  box-shadow: 0 16px 28px rgba(28, 42, 84, 0.14);
}

.cashier-reference-kpi span,
.cashier-reference-kpi small {
  color: rgba(255, 255, 255, 0.82);
}

.cashier-reference-kpi strong {
  font-size: 1.2rem;
  font-weight: 800;
}

.cashier-reference-kpi.kpi-red {
  background: linear-gradient(135deg, #d85b42, #ca4b37);
}

.cashier-reference-kpi.kpi-blue {
  background: linear-gradient(135deg, #3279bf, #255e99);
}

.cashier-reference-kpi.kpi-gold {
  background: linear-gradient(135deg, #efb53c, #d89118);
}

.cashier-reference-kpi.kpi-dark {
  background: linear-gradient(135deg, #333842, #11161e);
}

.cashier-reference-body {
  padding: 1rem;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 252, 0.96));
}

.cashier-reference-form {
  gap: 1rem;
}

.cashier-reference-header-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.9rem;
}

.cashier-reference-layout {
  display: grid;
  grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.cashier-reference-sidebar,
.cashier-reference-main {
  display: grid;
}

.cashier-reference-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid rgba(168, 184, 211, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 252, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.cashier-reference-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.cashier-reference-panel-head h3 {
  font-size: 1.1rem;
}

.cashier-reference-search input {
  border: 1px solid rgba(117, 145, 190, 0.26);
  background: #fbfdff;
}

.cashier-reference-toolbar {
  display: grid;
  gap: 0.75rem;
}

.cashier-reference-manual-btn {
  width: 100%;
  justify-content: center;
}

.cashier-reference-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.cashier-reference-summary-card {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 20px;
  background: linear-gradient(135deg, #edf5ff, #f7fbff);
  border: 1px solid rgba(57, 102, 170, 0.16);
}

.cashier-reference-summary-card .cashier-payment-line.total strong {
  color: #1552c7;
}

.cashier-reference-catalog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: #47617e;
  font-size: 0.84rem;
}

.cashier-reference-shell .cashier-product-grid {
  grid-template-columns: 1fr;
  max-height: 620px;
  gap: 0.75rem;
}

.cashier-reference-shell .cashier-product-card {
  gap: 0.65rem;
  padding: 0.9rem 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(52, 93, 151, 0.14);
  background: linear-gradient(180deg, #ffffff, #f4f8fd);
}

.cashier-reference-shell .cashier-product-card:hover,
.cashier-reference-shell .cashier-product-card.active {
  border-color: rgba(39, 93, 150, 0.32);
  box-shadow: 0 18px 28px rgba(36, 74, 118, 0.12);
}

.cashier-reference-shell .cashier-product-price,
.cashier-reference-shell .cashier-product-add {
  color: #255e99;
}

.cashier-reference-shell .cashier-product-stock {
  background: rgba(39, 93, 150, 0.1);
  color: #224b79;
}

.cashier-reference-table-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(21, 82, 199, 0.08);
  color: #1552c7;
  font-size: 0.78rem;
  font-weight: 800;
}

.cashier-reference-table-head {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) repeat(3, minmax(90px, 0.78fr)) minmax(130px, 0.86fr) auto;
  gap: 0.8rem;
  padding: 0.7rem 0.85rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #edf4fb, #e4edf8);
  color: #47617e;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cashier-reference-table {
  display: grid;
  gap: 0.85rem;
  max-height: 740px;
  overflow-y: auto;
  padding-right: 0.12rem;
}

.cashier-reference-order-row {
  grid-template-columns: 1fr;
  gap: 0.95rem;
  padding: 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(168, 184, 211, 0.24);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.cashier-reference-order-product {
  display: grid;
  gap: 0.45rem;
}

.cashier-reference-order-product label {
  font-size: 0.8rem;
  font-weight: 800;
  color: #4f5d75;
}

.cashier-reference-order-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(130px, 0.9fr) auto;
  gap: 0.8rem;
  align-items: end;
}

.cashier-reference-order-metrics .field {
  gap: 0.4rem;
}

.cashier-reference-order-metrics .field label {
  font-size: 0.76rem;
}

.cashier-reference-remove {
  min-height: 46px;
  align-self: end;
}

.cashier-reference-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: end;
}

.cashier-reference-actions {
  justify-content: flex-end;
}

.cashier-reference-actions .btn-primary {
  background: linear-gradient(135deg, #3aa151, #2f8c44);
  box-shadow: 0 14px 24px rgba(47, 140, 68, 0.18);
}

.cashier-reference-actions .btn-secondary {
  background: linear-gradient(135deg, #eef4fb, #dbe7f6);
  color: #305a86;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  background: linear-gradient(180deg, #fcfdfb, #f3f7f1);
}

.floating-chat {
  position: fixed;
  right: 1rem;
  bottom: 6.2rem;
  z-index: 30;
  display: grid;
  gap: 0.6rem;
  cursor: move;
}

.floating-app-menu {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 35;
  width: min(340px, calc(100vw - 1.2rem));
}

.floating-app-menu.dragging {
  opacity: 0.96;
}

.floating-app-menu-panel {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 0.85rem;
  backdrop-filter: blur(18px);
}

body[data-menu-glow="bold"] .floating-app-menu-panel {
  box-shadow: 0 22px 48px rgba(30, 71, 50, 0.22);
}

body[data-menu-glow="none"] .floating-app-menu-panel {
  box-shadow: none;
}

body[data-menu-layout="list"] .floating-app-menu-body {
  grid-template-columns: 1fr;
}

body[data-menu-layout="grid"] .floating-app-menu-body {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-menu-shape="pill"] .floating-app-menu-panel,
body[data-menu-shape="pill"] .floating-app-menu-item,
body[data-menu-shape="pill"] .floating-app-menu-trigger,
body[data-menu-shape="pill"] .floating-app-menu-icon {
  border-radius: 999px;
}

body[data-menu-shape="square"] .floating-app-menu-panel,
body[data-menu-shape="square"] .floating-app-menu-item,
body[data-menu-shape="square"] .floating-app-menu-trigger,
body[data-menu-shape="square"] .floating-app-menu-icon {
  border-radius: 10px;
}

body[data-menu-density="compact"] .floating-app-menu-item {
  padding: 0.58rem 0.7rem;
}

body[data-menu-density="tight"] .floating-app-menu-item {
  padding: 0.5rem 0.62rem;
}

body[data-menu-animation="pulse"] .floating-app-menu.open .floating-app-menu-panel {
  animation: menu-pulse 1.3s ease;
}

body[data-menu-animation="slide"] .floating-app-menu.open .floating-app-menu-panel {
  animation: menu-slide 0.26s ease;
}

body[data-menu-animation="float"] .floating-app-menu.open .floating-app-menu-panel {
  animation: menu-float 0.3s ease;
}

.floating-app-menu-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
}

.floating-app-menu-trigger {
  width: 100%;
  justify-content: flex-start;
  gap: 0.7rem;
}

.floating-app-menu-trigger-icon,
.floating-app-menu-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.76rem;
  font-weight: 800;
}

.floating-app-menu-trigger-icon {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.floating-app-menu-trigger-text {
  font-weight: 700;
}

.floating-app-menu-minimize {
  width: 48px;
  min-width: 48px;
  padding: 0.8rem 0;
  font-weight: 800;
}

.floating-app-menu-body {
  margin-top: 0.75rem;
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  max-height: min(60vh, 460px);
  overflow-y: auto;
}

.floating-app-menu.open .floating-app-menu-body {
  display: grid;
}

.floating-app-menu.minimized .floating-app-menu-body {
  display: none !important;
}

.floating-app-menu.minimized .floating-app-menu-panel {
  width: fit-content;
}

.floating-app-menu.minimized .floating-app-menu-trigger {
  width: auto;
  min-width: 0;
  padding-right: 1rem;
}

.floating-app-menu.minimized .floating-app-menu-trigger-text,
.floating-app-menu.minimized .floating-app-menu-minimize {
  display: none;
}

.floating-app-menu-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.72rem 0.78rem;
  border-radius: 18px;
  background: rgba(241, 247, 237, 0.85);
  border: 1px solid rgba(217, 227, 211, 0.9);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.floating-app-menu-item:hover {
  transform: translateY(-1px);
  background: #f6fbf2;
}

.floating-app-menu-item.active {
  background: var(--primary-soft);
  border-color: rgba(45, 106, 79, 0.25);
  color: var(--primary);
}

.floating-app-menu-icon {
  background: rgba(45, 106, 79, 0.1);
  color: var(--primary);
}

.floating-app-menu-label {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
}

.floating-cashier-button {
  --cashier-float-size: 86px;
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 36;
  width: var(--cashier-float-size);
  height: var(--cashier-float-size);
  min-width: 64px;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.55rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 18px 34px rgba(15, 118, 110, 0.3);
  user-select: none;
  touch-action: none;
}

.floating-cashier-button[data-shape="circle"] {
  border-radius: 999px;
}

.floating-cashier-button[data-shape="rounded"] {
  border-radius: 28px;
}

.floating-cashier-button[data-shape="pill"] {
  border-radius: 999px;
  width: max(var(--cashier-float-size), 120px);
}

.floating-cashier-button[data-shape="square"] {
  border-radius: 16px;
}

.floating-cashier-button[data-animation="pulse"] {
  animation: menu-pulse 1.8s ease infinite;
}

.floating-cashier-button[data-animation="float"] {
  animation: menu-float 1.6s ease infinite;
}

.floating-cashier-button[data-animation="spin"] .floating-cashier-icon {
  animation: cashier-spin 5s linear infinite;
}

.floating-cashier-icon {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.floating-cashier-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.1;
}

.floating-cashier-resize {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.08);
  cursor: nwse-resize;
}

.floating-chat.dragging {
  opacity: 0.94;
}

.floating-chat-card {
  width: min(360px, calc(100vw - 2rem));
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 1rem;
  display: none;
  max-height: min(60vh, 460px);
  overflow: auto;
}

.floating-chat.alarm-active .floating-chat-trigger {
  animation: alarm-pulse 1s ease infinite;
  box-shadow: 0 0 0 0 rgba(201, 79, 79, 0.45);
  background: linear-gradient(135deg, #b92f2f, #d95e3f);
}

.floating-chat.alarm-active .floating-chat-card {
  border-color: rgba(201, 79, 79, 0.55);
}

.floating-chat.alarm-active.alarm-flash .floating-chat-card,
.floating-chat.alarm-active.alarm-flash .floating-chat-trigger {
  filter: brightness(1.08);
}

.floating-chat.open .floating-chat-card {
  display: block;
}

.floating-chat.minimized .floating-chat-card {
  display: none !important;
}

.floating-chat-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.floating-chat-minimize {
  width: 46px;
  min-width: 46px;
  padding: 0.76rem 0;
  font-weight: 800;
}

.floating-chat-trigger {
  justify-self: end;
  min-width: 0;
}

.floating-chat.minimized .floating-chat-trigger {
  padding-inline: 0.9rem;
}

.location-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.location-map-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.8rem;
}

.location-map-card.compact {
  padding: 0.7rem;
}

.location-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}

.location-map-card iframe {
  width: 100%;
  min-height: 220px;
  border: 0;
  border-radius: 14px;
}

.map-picker-card,
.face-capture-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.9rem;
}

.map-picker-card iframe,
.face-capture-card video,
.face-capture-card canvas {
  width: 100%;
  min-height: 220px;
  border: 0;
  border-radius: 14px;
  background: #0d1711;
  object-fit: cover;
  margin-top: 0.75rem;
}

.face-capture-card canvas {
  display: none;
}

.face-preview-image {
  display: block;
  width: min(100%, 280px);
  border-radius: 18px;
  border: 1px solid var(--line);
  margin-top: 0.8rem;
}

img,
video,
iframe {
  max-width: 100%;
}

.live-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(47, 143, 91, 0.12);
}

.toast-host {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 45;
  display: grid;
  gap: 0.7rem;
  width: min(360px, calc(100vw - 1.5rem));
}

.toast-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-left: 5px solid var(--warning);
  box-shadow: var(--shadow);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  transform: translateY(-10px);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.toast-card.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-card.warning {
  border-left-color: var(--warning);
}

.toast-card.danger {
  border-left-color: var(--danger);
}

.toast-body {
  color: var(--muted);
  margin-top: 0.3rem;
  line-height: 1.4;
}

body[data-title-card-style="glass"] .title-card {
  background: linear-gradient(135deg, rgba(255,255,255,.72), rgba(245,251,247,.52));
  backdrop-filter: blur(18px);
}

body[data-title-card-style="solid"] .title-card {
  background: linear-gradient(135deg, var(--primary-soft), #ffffff);
}

@keyframes menu-pulse {
  0% { transform: scale(0.98); opacity: 0.92; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes menu-slide {
  0% { transform: translateY(16px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes menu-float {
  0% { transform: translateY(10px) scale(0.98); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes cashier-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes alarm-pulse {
  0% { box-shadow: 0 0 0 0 rgba(201, 79, 79, 0.5); }
  70% { box-shadow: 0 0 0 18px rgba(201, 79, 79, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 79, 79, 0); }
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .kpi-strip,
  .grid.cols-4,
  .grid.cols-3,
  .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cashier-reference-shortcuts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cashier-reference-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cashier-reference-header-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cashier-reference-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .auth-shell,
  .form-grid,
  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .kpi-strip,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .section-header,
  .toolbar,
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .title-card {
    min-width: 100%;
    padding: 1.15rem 1.05rem;
    border-radius: 24px;
  }

  .cashier-summary-grid {
    grid-template-columns: 1fr;
  }

  .cashier-reference-topbar,
  .cashier-reference-panel-head,
  .cashier-reference-bottom {
    grid-template-columns: 1fr;
    display: grid;
  }

  .cashier-reference-shortcuts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cashier-reference-header-grid,
  .cashier-reference-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cashier-reference-order-metrics,
  .cashier-reference-table-head {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content {
    padding: 0.85rem 0.85rem 9.8rem;
  }

  body {
    background:
      linear-gradient(180deg, #eff5ec 0%, #f7faf5 32%, #f4f7f1 100%);
  }

  .sidebar {
    display: none;
  }

  .mobile-appbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    margin-bottom: 0.9rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(217, 227, 211, 0.9);
    border-radius: 22px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0.7rem;
    z-index: 5;
    backdrop-filter: blur(16px);
  }

  .mobile-appbar-right {
    gap: 0.55rem;
  }

  .app-logo-title {
    --logo-size: 48px;
  }

  .title-card-title-row .app-logo-title {
    max-width: 48px;
    max-height: 48px;
  }

  .app-logo-dominant {
    --logo-size: min(148px, 42vw);
    border-radius: 28px;
  }

  .auth-card-logo-row,
  .title-card-title-row {
    align-items: flex-start;
  }

  .mobile-appbar-title {
    font-size: 0.82rem;
    color: var(--muted);
  }

  .mobile-appbar-subtitle {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 0.18rem;
  }

  .topbar {
    gap: 0.6rem;
    margin-bottom: 0.95rem;
  }

  .topbar h1 {
    font-size: 1.35rem;
  }

  .topbar > div:last-child.panel {
    border-radius: 18px;
    padding: 0.85rem 1rem;
    min-width: 100%;
  }

  .panel {
    padding: 0.92rem;
    border-radius: 22px;
  }

  .section-header {
    padding: 0.92rem;
    border-radius: 18px;
  }

  .stat-card strong {
    font-size: 1.18rem;
  }

  .stat-card.compact strong {
    font-size: 1rem;
  }

  input,
  select,
  textarea,
  button {
    min-height: 48px;
  }

  textarea {
    min-height: 100px;
  }

  .nav-item,
  .mobile-nav-item {
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-bottom-nav {
    display: none;
  }

  .mobile-nav-item {
    background: transparent;
    color: var(--muted);
    padding: 0.58rem 0.35rem;
    border-radius: 18px;
    font-size: 0.74rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.15;
  }

.mobile-nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
}

body {
  background: var(--app-surface, #f6fbf8);
  color: var(--app-text, #102217);
}

.brand-copy h2,
.title-card h1,
.section-header h3,
.panel h3 {
  font-family: var(--app-font-display, var(--font-family));
}

body[data-motion-intensity="minimal"] * {
  animation-duration: 0.01ms !important;
  transition-duration: 0.12s !important;
}

body[data-motion-intensity="gentle"] .title-card,
body[data-motion-intensity="gentle"] .panel,
body[data-motion-intensity="gentle"] .nav-item,
body[data-motion-intensity="expressive"] .title-card,
body[data-motion-intensity="expressive"] .panel,
body[data-motion-intensity="expressive"] .nav-item {
  animation: theme-float 6s ease-in-out infinite;
}

body[data-motion-intensity="expressive"] .title-card::after,
body[data-motion-intensity="expressive"] .app-background-orb {
  animation-duration: 4s;
}

body[data-theme-pattern="aurora"] .app-background-grid {
  background-image:
    linear-gradient(135deg, rgba(255,255,255,0.18), transparent 35%),
    linear-gradient(45deg, rgba(255,255,255,0.12), transparent 48%);
}

body[data-theme-pattern="mesh"] .app-background-grid {
  background-image:
    radial-gradient(circle at 25% 20%, rgba(255,255,255,0.34), transparent 0 28%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.2), transparent 0 22%),
    radial-gradient(circle at 45% 80%, rgba(255,255,255,0.16), transparent 0 24%);
}

body[data-theme-pattern="sunburst"] .app-background-grid {
  background-image: repeating-conic-gradient(from 0deg, rgba(255,255,255,0.18) 0deg 8deg, transparent 8deg 18deg);
  opacity: 0.24;
}

body[data-theme-pattern="grid"] .app-background-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.12) 1px, transparent 1px);
  background-size: 34px 34px;
}

body[data-theme-pattern="ribbon"] .app-background-grid {
  background-image:
    linear-gradient(120deg, rgba(255,255,255,0.18) 0%, transparent 30%),
    linear-gradient(300deg, rgba(255,255,255,0.12) 0%, transparent 40%);
}

body[data-theme-pattern="leaf"] .app-background-grid {
  background-image:
    radial-gradient(ellipse at 20% 25%, rgba(255,255,255,0.18) 0 16%, transparent 17%),
    radial-gradient(ellipse at 70% 65%, rgba(255,255,255,0.15) 0 15%, transparent 16%);
}

body[data-theme-pattern="bloom"] .app-background-grid {
  background-image:
    radial-gradient(circle at 30% 35%, rgba(255,255,255,0.24) 0 10%, transparent 11%),
    radial-gradient(circle at 65% 30%, rgba(255,255,255,0.18) 0 12%, transparent 13%),
    radial-gradient(circle at 55% 72%, rgba(255,255,255,0.14) 0 14%, transparent 15%);
}

@keyframes theme-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.signature-pad-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px dashed rgba(15, 23, 42, 0.18);
  border-radius: 18px;
  padding: 0.9rem;
}

.signature-pad-card canvas {
  width: 100%;
  height: 160px;
  display: block;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), #ffffff);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  touch-action: none;
  cursor: crosshair;
}

  .actions button {
    width: 100%;
  }

  .actions a,
  .actions form {
    width: 100%;
  }

  .actions .btn-secondary,
  .actions .btn-danger {
    width: 100%;
    display: block;
    text-align: center;
  }

  .table-wrap {
    border-radius: 16px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 620px;
  }

  .chart {
    min-height: 205px;
  }

  .kpi-strip {
    gap: 0.75rem;
  }

  .kpi-strip .panel,
  .compact-strip .panel {
    min-height: 96px;
  }

  .chart-empty {
    min-height: 180px;
  }

  .donut-layout {
    grid-template-columns: 1fr;
  }

  .floating-chat {
    right: 0.85rem;
    left: auto;
    bottom: 7.25rem;
  }

  .floating-app-menu {
    right: 0.85rem;
    bottom: 0.85rem;
    width: min(320px, calc(100vw - 1.2rem));
  }

  .floating-app-menu-body {
    grid-template-columns: 1fr;
  }

  .floating-chat-trigger {
    width: auto;
    min-height: 42px;
    padding: 0.68rem 1rem;
    box-shadow: var(--shadow);
  }

  .floating-chat-card {
    width: min(320px, calc(100vw - 1.7rem));
    max-height: min(54vh, 380px);
  }

  .toast-host {
    left: 0.85rem;
    right: 0.85rem;
    width: auto;
  }

  .report-grid {
    gap: 0.85rem;
  }

  .summary-note,
  .alert,
  .empty-state {
    border-radius: 16px;
  }

  .scan-input-group {
    grid-template-columns: 1fr;
  }

  .scanner-dialog {
    border-radius: 22px;
    padding: 0.85rem;
  }

  .scanner-head {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 520px) {
  .content {
    padding: 0.7rem 0.7rem 10.2rem;
  }

  .mobile-bottom-nav {
    display: none;
  }

  .mobile-nav-item {
    font-size: 0.68rem;
    padding: 0.54rem 0.22rem;
  }

  .mobile-appbar {
    padding: 0.85rem 0.9rem;
    top: 0.5rem;
  }

  .panel {
    padding: 0.82rem;
  }

  .kpi-strip,
  .grid.cols-4 {
    gap: 0.6rem;
  }

  .section-header h3 {
    font-size: 1rem;
  }

  .profile-avatar {
    width: 54px;
    height: 54px;
  }

  .profile-avatar.large {
    width: 72px;
    height: 72px;
  }

  .compact-strip .panel,
  .kpi-strip .panel {
    padding: 0.72rem;
    border-radius: 18px;
  }

  .chart,
  .chart.chart-small {
    min-height: 168px;
  }

  .stat-card strong {
    font-size: 1.04rem;
  }

  .donut-layout {
    gap: 0.55rem;
  }

  .legend-row {
    font-size: 0.84rem;
  }

  .floating-chat {
    right: 0.6rem;
    bottom: 7.7rem;
  }

  .floating-app-menu {
    right: 0.6rem;
    bottom: 0.6rem;
    width: min(290px, calc(100vw - 1rem));
  }

  .floating-app-menu-panel {
    padding: 0.72rem;
    border-radius: 20px;
  }

  .floating-app-menu-item {
    padding: 0.66rem 0.72rem;
  }

  .floating-chat-card {
    width: min(286px, calc(100vw - 1.2rem));
    max-height: min(50vh, 320px);
  }

  .floating-chat-trigger {
    font-size: 0.84rem;
    padding: 0.62rem 0.9rem;
  }

  .toast-host {
    top: 0.65rem;
    left: 0.65rem;
    right: 0.65rem;
  }

  .toast-card {
    border-radius: 16px;
    padding: 0.82rem 0.9rem;
  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  body {
    background: white;
  }

  .sidebar,
  .mobile-appbar,
  .mobile-bottom-nav,
  .floating-chat,
  .toolbar,
  .actions,
  .btn-primary,
  .btn-secondary,
  .btn-danger {
    display: none !important;
  }

  .content {
    padding: 0;
  }

  .panel {
    box-shadow: none;
    break-inside: avoid;
  }
}

/* Android-style redesign overrides */
:root {
  --bg: #f3f6fb;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: #ffffff;
  --surface-alt: #eef3ff;
  --text: #172033;
  --muted: #657089;
  --line: rgba(110, 130, 180, 0.16);
  --primary: #165dff;
  --primary-strong: #0b45cf;
  --primary-soft: rgba(22, 93, 255, 0.12);
  --accent: #18b7a0;
  --danger: #dc4c64;
  --warning: #e89f2e;
  --success: #14966d;
  --shadow: 0 24px 80px rgba(28, 42, 84, 0.14);
  --shadow-soft: 0 18px 44px rgba(28, 42, 84, 0.09);
  --shadow-mobile: 0 -16px 32px rgba(17, 28, 52, 0.14);
  --radius: 28px;
  --radius-sm: 20px;
  --font-family: "Trebuchet MS", "Segoe UI Variable", "Segoe UI", sans-serif;
}

body {
  font-family: var(--font-family);
  color: var(--text);
  background:
    radial-gradient(circle at 12% 18%, rgba(24, 183, 160, 0.16), transparent 22rem),
    radial-gradient(circle at 88% 0%, rgba(22, 93, 255, 0.14), transparent 25rem),
    linear-gradient(180deg, #f8fbff 0%, #eef3fb 48%, #edf2f8 100%);
}

.app-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.app-background-orb {
  position: absolute;
  filter: blur(18px);
  opacity: 0.8;
}

.orb-a {
  width: 26rem;
  height: 26rem;
  left: -8rem;
  top: -5rem;
  background: radial-gradient(circle, rgba(24, 183, 160, 0.24), transparent 68%);
}

.orb-b {
  width: 30rem;
  height: 30rem;
  right: -8rem;
  top: 8rem;
  background: radial-gradient(circle, rgba(22, 93, 255, 0.22), transparent 68%);
}

.app-background-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(127, 149, 192, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 149, 192, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 88%);
}

.app-shell,
.auth-shell {
  position: relative;
  z-index: 1;
}

.app-shell {
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 1.2rem;
  padding: 1rem;
  min-height: calc(100vh - 3rem);
}

.sidebar,
.panel,
.auth-card,
.auth-point,
.empty-state,
.title-card,
.mobile-appbar,
.ticker-banner,
.ad-card,
.floating-app-menu-panel,
.floating-chat-card,
.summary-note,
.alert {
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px);
}

.sidebar {
  background: linear-gradient(180deg, rgba(17, 27, 51, 0.92), rgba(31, 47, 88, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  color: #eef4ff;
  padding: 1rem;
}

.brand {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  padding: 1rem;
}

.brand-badge,
.title-card-chip,
.title-card-tag,
.sidebar-section-label,
.mobile-appbar-overline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-badge {
  color: #b6c8ff;
  margin-bottom: 0.85rem;
}

.profile-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.95rem;
}

.brand-copy h2 {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.15;
}

.brand-status {
  margin-top: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: rgba(238, 244, 255, 0.8);
  font-size: 0.92rem;
  min-width: 0;
}

.brand-status span:last-child {
  overflow-wrap: anywhere;
}

.brand-status-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: #2ce5b8;
  box-shadow: 0 0 0 0.3rem rgba(44, 229, 184, 0.16);
}

.sidebar-section-label {
  color: rgba(182, 200, 255, 0.76);
  margin: 1rem 0 0.8rem;
  padding: 0 0.25rem;
}

.nav-list {
  gap: 0.6rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 0.9rem;
  border-radius: 22px;
  color: rgba(238, 244, 255, 0.9);
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-item:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(22, 93, 255, 0.38), rgba(24, 183, 160, 0.24));
  border-color: rgba(255, 255, 255, 0.15);
}

.nav-item-icon,
.mobile-nav-icon,
.section-shortcut-icon,
.floating-app-menu-icon,
.floating-app-menu-trigger-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06));
  color: inherit;
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.nav-item-copy {
  display: grid;
  gap: 0.1rem;
}

.nav-item-copy strong {
  font-size: 0.96rem;
  font-weight: 700;
}

.nav-item-copy small {
  color: rgba(238, 244, 255, 0.64);
  font-size: 0.76rem;
}

.sidebar-footer .btn-danger {
  width: 100%;
  justify-content: center;
  background: rgba(255, 117, 133, 0.16);
  color: #ffd7de;
}

.content {
  padding: 0.25rem 0.25rem 8rem;
  overflow: visible;
}

.mobile-appbar {
  position: sticky;
  top: 1rem;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
}

.mobile-appbar-title {
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.15;
}

.mobile-appbar-subtitle,
.mobile-appbar-overline {
  color: var(--muted);
}

.mobile-appbar-overline {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.18rem;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.title-card {
  position: relative;
  overflow: hidden;
  padding: 1.3rem;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(17, 27, 51, 0.92), rgba(22, 93, 255, 0.84)),
    var(--title-card-background);
  color: #f4f7ff;
}

.title-card::after {
  content: "";
  position: absolute;
  inset: auto -6rem -7rem auto;
  width: 16rem;
  height: 16rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 68%);
}

.title-card h1 {
  font-size: clamp(1.65rem, 4vw, 2.55rem);
  line-height: 1.06;
  margin: 0.5rem 0;
}

.title-card .muted {
  color: rgba(244, 247, 255, 0.8) !important;
  max-width: 38rem;
}

.title-card-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.title-card-chip,
.title-card-tag {
  border-radius: 999px;
  padding: 0.46rem 0.75rem;
  background: rgba(255, 255, 255, 0.12);
  color: #eef4ff;
}

.hero-highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.2rem;
  position: relative;
  z-index: 1;
}

.hero-highlight {
  padding: 0.9rem 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-highlight span {
  display: block;
  font-size: 0.8rem;
  color: rgba(244, 247, 255, 0.78);
  margin-bottom: 0.35rem;
}

.hero-highlight strong {
  font-size: 1.04rem;
  color: #fff;
}

.control-panel {
  display: grid;
  align-content: start;
  gap: 0.95rem;
  padding: 1.05rem;
  width: 100%;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.86);
}

.section-header.compact {
  margin-bottom: 0.85rem;
}

.control-form {
  gap: 0.8rem;
}

.content-stage {
  display: grid;
  gap: 1rem;
}

.section-shortcuts {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.section-shortcuts::-webkit-scrollbar {
  display: none;
}

.section-shortcut {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.78rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(110, 130, 180, 0.14);
  box-shadow: var(--shadow-soft);
}

.section-shortcut.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.section-shortcut.active .section-shortcut-icon {
  background: rgba(255, 255, 255, 0.18);
}

.panel,
.summary-note,
.alert,
.empty-state,
.auth-card,
.auth-point,
.ticker-banner,
.ad-card {
  background: var(--surface);
  border-radius: 30px;
}

.panel {
  padding: 1.15rem;
  border-color: rgba(255, 255, 255, 0.9);
}

.summary-note,
.alert {
  padding: 0.95rem 1rem;
  border-radius: 22px;
}

.summary-note {
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
}

.alert {
  background: linear-gradient(180deg, rgba(255, 234, 237, 0.95), rgba(255, 244, 246, 0.95));
  color: #7d2131;
}

.kpi-strip {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  min-height: 100%;
}

.icon-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.icon-card .card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: 0 18px 30px rgba(22, 93, 255, 0.2);
}

.stat-card strong {
  display: block;
  font-size: 1.28rem;
  margin-top: 0.15rem;
}

.compact-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.chart,
.chart svg {
  width: 100%;
}

.chart {
  padding: 0.3rem 0;
}

.grid.cols-2,
.grid.cols-3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

.field.full,
.form-grid .full {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(109, 130, 181, 0.16);
  background: rgba(248, 251, 255, 0.96);
  color: var(--text);
  padding: 0.86rem 0.95rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(22, 93, 255, 0.42);
  box-shadow:
    0 0 0 0.28rem rgba(22, 93, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

textarea {
  min-height: 112px;
  resize: vertical;
}

button,
.btn-primary,
.btn-secondary,
.btn-danger {
  min-height: 2.9rem;
  font-weight: 700;
  border-radius: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: white;
  box-shadow: 0 18px 32px rgba(22, 93, 255, 0.22);
}

.btn-secondary {
  background: rgba(231, 238, 255, 0.9);
  color: #223356;
}

.btn-danger {
  background: rgba(255, 229, 234, 0.9);
  color: #9a2940;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.table-wrap {
  overflow: auto;
  border-radius: 24px;
  border: 1px solid rgba(109, 130, 181, 0.12);
  background: rgba(248, 251, 255, 0.72);
}

table {
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(237, 243, 255, 0.94);
  color: #45506a;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

th,
td {
  padding: 0.92rem 0.95rem;
  border-bottom: 1px solid rgba(109, 130, 181, 0.1);
  vertical-align: top;
}

tbody tr:hover {
  background: rgba(22, 93, 255, 0.035);
}

.ticker-banner {
  overflow: hidden;
  padding: 0.8rem 0;
  background: linear-gradient(135deg, rgba(20, 33, 61, 0.96), rgba(21, 82, 182, 0.94));
  color: #edf4ff;
}

.ticker-track {
  display: flex;
  gap: 2rem;
  width: max-content;
  padding-left: 1rem;
  animation: ticker-slide 18s linear infinite;
}

.ticker-track span {
  white-space: nowrap;
}

@keyframes ticker-slide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ad-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.ad-card {
  overflow: hidden;
  padding: 0;
}

.ad-card img,
.ad-card video {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  display: block;
}

.empty-state {
  text-align: center;
  padding: 2rem 1.25rem;
}

.chip,
.stock-badge,
.floating-cashier-label {
  border-radius: 999px;
}

.floating-app-menu {
  right: 1rem;
  bottom: 1rem;
}

.floating-app-menu-panel {
  background: rgba(18, 26, 46, 0.92);
  color: #eff4ff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
}

.floating-app-menu-trigger {
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.floating-app-menu-item {
  border-radius: 20px;
  color: rgba(239, 244, 255, 0.9);
}

.floating-app-menu-item:hover,
.floating-app-menu-item.active {
  background: rgba(255, 255, 255, 0.12);
}

.floating-chat {
  right: 1rem;
  bottom: 6.2rem;
}

.floating-chat-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 28px;
}

.floating-chat-trigger {
  border-radius: 999px;
}

.mobile-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 20;
  width: min(560px, calc(100vw - 1rem));
  display: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.55rem;
  border-radius: 26px;
  background: rgba(17, 26, 46, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-mobile);
  backdrop-filter: blur(18px);
}

.mobile-nav-item {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  padding: 0.45rem;
  border-radius: 18px;
  color: rgba(237, 243, 255, 0.72);
  text-align: center;
}

.mobile-nav-item.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.mobile-nav-label {
  font-size: 0.68rem;
  line-height: 1.1;
}

.auth-shell {
  gap: 1.2rem;
  padding: 1rem;
  min-height: 100vh;
}

.auth-brand {
  border-radius: 36px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 22rem),
    linear-gradient(160deg, rgba(17, 27, 51, 0.96), rgba(22, 93, 255, 0.86));
  box-shadow: var(--shadow);
}

.auth-card-wrap {
  padding: 0;
}

.auth-card {
  width: min(520px, 100%);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.88);
}

.auth-switch {
  background: rgba(233, 239, 252, 0.92);
}

.auth-switch-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.auth-point {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
}

.map-picker-card iframe,
.location-map-card iframe {
  width: 100%;
  min-height: 250px;
  border: 0;
  border-radius: 20px;
}

.scanner-dialog {
  border-radius: 28px;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .content {
    padding-bottom: 8.5rem;
  }

  .mobile-bottom-nav {
    display: grid;
  }

  .topbar,
  .grid.cols-2,
  .grid.cols-3,
  .kpi-strip,
  .compact-strip,
  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 0.95rem;
  }

  .app-shell,
  .auth-shell {
    padding: 0.75rem;
    gap: 0.9rem;
  }

  .mobile-appbar {
    top: 0.7rem;
    border-radius: 24px;
    padding: 0.9rem 1rem;
  }

  .title-card,
  .panel,
  .summary-note,
  .alert,
  .auth-card,
  .empty-state,
  .ticker-banner {
    border-radius: 24px;
  }

  .title-card {
    padding: 1.1rem;
  }

  .hero-highlight-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section-shortcuts {
    margin-inline: -0.1rem;
  }

  .mobile-bottom-nav {
    width: calc(100vw - 1rem);
    bottom: 0.55rem;
  }

  .floating-app-menu {
    right: 0.75rem;
    bottom: 5.9rem;
  }

  .floating-chat {
    right: 0.75rem;
    bottom: 11.2rem;
  }

  .floating-chat-card {
    width: min(320px, calc(100vw - 1.5rem));
  }

  .ad-strip {
    grid-template-columns: 1fr;
  }
}

.ticker-banner {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  background:
    linear-gradient(120deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92)),
    linear-gradient(90deg, var(--primary), var(--accent)) !important;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.22) !important;
  padding: 0.9rem 1rem !important;
}

.ticker-track span {
  color: #f8fafc !important;
  text-shadow: 0 2px 14px rgba(15, 23, 42, 0.75);
  font-weight: 700;
}

@media (max-width: 768px) {
  .ticker-banner {
    grid-template-columns: 1fr !important;
    gap: 0.7rem;
  }
}

.org-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.org-card {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 245, 255, 0.9));
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.org-card.flow {
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.98), rgba(219, 234, 254, 0.92));
}

.org-photo-wrap {
  display: flex;
  justify-content: center;
}

.org-photo {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.org-photo-fallback {
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
}

.org-card strong,
.org-card span,
.org-card small {
  text-align: center;
}

@media (max-width: 420px) {
  html,
  body {
    min-width: 0;
    width: 100%;
    overflow-x: hidden;
  }

  .app-shell,
  .auth-shell {
    padding: 0.45rem;
    gap: 0.75rem;
  }

  .content {
    min-width: 0;
  }

  .topbar,
  .grid.cols-2,
  .grid.cols-3,
  .kpi-strip,
  .compact-strip,
  .form-grid,
  .hero-highlight-grid {
    grid-template-columns: 1fr !important;
  }

  .title-card,
  .panel,
  .auth-card,
  .summary-note,
  .alert,
  .empty-state {
    padding: 0.95rem;
    border-radius: 20px;
  }

  .title-card h1,
  .mobile-appbar-title {
    font-size: 1.55rem;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .floating-online-widget {
    left: 0.6rem;
    right: 0.6rem;
    width: auto;
    bottom: 8rem;
  }

  .floating-online-trigger,
  .floating-online-card,
  .floating-chat-card,
  .floating-app-menu-panel {
    width: 100%;
    max-width: 100%;
  }

  .mobile-bottom-nav {
    width: calc(100vw - 0.8rem);
    left: 0.4rem;
    right: 0.4rem;
    bottom: 0.4rem;
    padding: 0.45rem;
    gap: 0.3rem;
  }

  .mobile-nav-item {
    min-width: 0;
    padding: 0.55rem 0.4rem;
  }

  .mobile-nav-label {
    font-size: 0.68rem;
  }

  .floating-app-menu {
    left: 0.4rem;
    right: 0.4rem;
    bottom: 5.8rem;
  }

  .floating-chat {
    right: 0.5rem;
    bottom: 12rem;
  }

  .section-shortcuts {
    gap: 0.55rem;
    padding-bottom: 0.2rem;
  }

  .auth-brand {
    padding: 1rem;
  }
}

/* Chrome-friendly layout normalization */
html {
  width: 100%;
  overflow-x: hidden;
}

body {
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
}

.app-background-grid {
  -webkit-mask-image: linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 88%);
}

.app-shell,
.content,
.content-stage,
.topbar,
.topbar > div,
.grid,
.grid > *,
.kpi-strip,
.kpi-strip > *,
.compact-strip,
.compact-strip > *,
.hero-highlight-grid,
.hero-highlight-grid > *,
.form-grid,
.form-grid > *,
.panel,
.section-header,
.table-wrap,
.nav-item,
.nav-item-copy,
.mobile-nav-item,
.mobile-sidebar-item,
.floating-chat-card,
.floating-app-menu-item,
.floating-online-card {
  min-width: 0;
}

.sidebar,
.panel,
.auth-card,
.auth-point,
.empty-state,
.title-card,
.mobile-appbar,
.ticker-banner,
.ad-card,
.floating-app-menu-panel,
.floating-chat-card,
.floating-online-card,
.summary-note,
.alert {
  -webkit-backdrop-filter: blur(22px);
}

.content {
  width: 100%;
}

.nav-item {
  align-items: flex-start;
}

.nav-item-icon,
.nav-icon,
.mobile-nav-icon {
  flex: 0 0 auto;
}

.nav-item-copy,
.nav-label,
.mobile-nav-label {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mobile-sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-sidebar-item .nav-icon,
.mobile-sidebar-item .nav-label {
  display: inline-flex;
  align-items: center;
}

.mobile-sidebar-item .nav-label {
  display: block;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sidebar,
  .panel,
  .auth-card,
  .auth-point,
  .empty-state,
  .title-card,
  .mobile-appbar,
  .ticker-banner,
  .ad-card,
  .floating-app-menu-panel,
  .floating-chat-card,
  .floating-online-card,
  .summary-note,
  .alert {
    background: rgba(255, 255, 255, 0.98);
  }
}

@media (min-width: 761px) and (max-width: 1400px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .floating-chat-card {
    width: min(340px, calc(100vw - 2rem));
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }
}

@media (max-width: 760px) {
  body {
    min-height: 100svh;
  }

  .app-shell,
  .auth-shell {
    width: 100%;
    max-width: 100%;
  }
}

th,
td {
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  writing-mode: horizontal-tb;
}

.btn-primary,
.btn-secondary,
.btn-danger,
.actions a,
.actions button {
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
}

.table-wrap table {
  table-layout: auto;
}

.batch-form .form-grid {
  align-items: start;
}

.batch-list {
  display: grid;
  gap: 0.85rem;
}

.batch-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.92);
}

.batch-remove {
  align-self: end;
}

.floating-chat-card,
.floating-online-card,
.floating-app-menu-panel {
  position: relative;
}

.floating-panel-resize {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(14, 165, 233, 0.55));
  cursor: nwse-resize;
}

@media (max-width: 900px) {
  .cashier-pos-shell,
  .cashier-payment-grid,
  .cashier-pos-toolbar {
    grid-template-columns: 1fr;
  }

  .cashier-cart-item-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .batch-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cashier-reference-order-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  table {
    min-width: 680px;
  }

  .cashier-reference-topbar,
  .cashier-reference-shortcuts,
  .cashier-reference-kpis,
  .cashier-reference-header-grid,
  .cashier-reference-mini-grid,
  .cashier-reference-order-metrics,
  .cashier-reference-bottom {
    grid-template-columns: 1fr;
  }

  .cashier-reference-session {
    text-align: left;
  }

  .cashier-reference-shortcut {
    padding: 0.85rem 0.5rem;
  }

  .cashier-reference-table-head {
    display: none;
  }

  .cashier-reference-shell .cashier-product-grid,
  .cashier-reference-table {
    max-height: none;
  }

  .cashier-cart-item-head,
  .cashier-cart-item-body,
  .cashier-product-top,
  .cashier-product-foot {
    grid-template-columns: 1fr;
    display: grid;
  }

  .cashier-product-grid,
  .cashier-cart-list {
    max-height: none;
  }

  .batch-row {
    grid-template-columns: 1fr;
  }

  .actions .btn-primary,
  .actions .btn-secondary,
  .actions .btn-danger {
    width: 100%;
    justify-content: center;
  }

  .floating-chat-card,
  .floating-online-card,
  .floating-app-menu-panel {
    max-width: calc(100vw - 1.2rem);
  }
}

/* Reference mobile cashier redesign */
html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), transparent 26%),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 22%),
    linear-gradient(180deg, #071120 0%, #0b1730 44%, #101d3a 100%);
  color: #0f172a;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: 0.38;
}

.app-background,
.sidebar,
.ad-strip,
.ticker-banner,
.promo-marquee,
.floating-chat,
.floating-online-widget,
.floating-cashier-button,
.app-footer,
.mobile-logout-form {
  display: none !important;
}

button,
.btn-primary,
.btn-secondary,
.btn-danger {
  border-radius: 16px;
  font-weight: 700;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(135deg, #2f6df6 0%, #1d4ed8 100%);
  color: #fff;
}

.btn-secondary {
  background: #eef4ff;
  color: #1847b8;
  border: 1px solid #d8e5ff;
}

.btn-danger {
  background: #fff1f1;
  color: #c24141;
  border: 1px solid #ffd6d6;
}

input,
select,
textarea {
  border: 1px solid #d9e5fb;
  border-radius: 16px;
  background: #f8fbff;
  color: #0f172a;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.muted {
  color: #6b7a95;
}

.summary-note,
.alert {
  border-radius: 18px;
  padding: 0.95rem 1rem;
}

.summary-note {
  background: #edf4ff;
  border: 1px solid #d8e7ff;
  color: #19428d;
}

.alert {
  background: #fff4e7;
  border: 1px solid #ffe0b4;
  color: #9a5b10;
}

.auth-shell {
  min-height: 100vh;
  grid-template-columns: minmax(320px, 1.15fr) minmax(340px, 0.85fr);
  gap: 1.4rem;
  padding: 1.6rem;
  align-items: stretch;
}

.auth-brand {
  border-radius: 34px;
  padding: clamp(2rem, 4vw, 3.5rem);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(145deg, #0b42c8 0%, #1b63ea 55%, #2b88ff 100%);
  box-shadow: 0 28px 70px rgba(6, 18, 42, 0.34);
}

.auth-brand .chip {
  background: rgba(255, 255, 255, 0.14) !important;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.auth-brand h1 {
  max-width: 12ch;
  font-size: clamp(2.4rem, 4vw, 4.1rem);
  line-height: 1.02;
}

.auth-brand p {
  max-width: 30rem;
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.88);
}

.auth-points {
  gap: 0.85rem;
}

.auth-point {
  position: relative;
  padding-left: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(11, 23, 48, 0.18);
}

.auth-point::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff 0%, #dbeafe 100%);
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.1);
}

.auth-card-wrap {
  padding: 0;
}

.auth-card {
  position: relative;
  width: min(420px, 100%);
  padding: 4.4rem 1.5rem 1.5rem;
  border-radius: 42px;
  border: 10px solid #0f172a;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 32px 72px rgba(2, 8, 23, 0.46);
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: 1.6rem;
  border-radius: 0 0 18px 18px;
  background: #0f172a;
}

.auth-card .section-header {
  margin: 0 0 1rem;
  padding: 0;
  background: transparent;
  border: none;
}

.auth-card .section-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
}

.auth-card .section-header p {
  color: #6b7a95;
}

.auth-card .summary-note {
  background: #eff6ff;
}

.app-shell {
  display: block;
  min-height: 100vh;
  padding: 1rem;
}

.content {
  position: relative;
  width: min(430px, calc(100vw - 1.25rem));
  max-width: none;
  min-height: calc(100vh - 2rem);
  margin: 0 auto 6rem;
  padding: 0 1rem 7.25rem;
  border-radius: 42px;
  border: 10px solid #0f172a;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 34px 88px rgba(2, 8, 23, 0.46);
}

.content::before {
  content: "";
  position: sticky;
  top: 0;
  display: block;
  width: 34%;
  height: 1.55rem;
  margin: 0 auto;
  border-radius: 0 0 18px 18px;
  background: #0f172a;
  z-index: 22;
}

.mobile-appbar {
  position: sticky;
  top: 0;
  z-index: 21;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  margin: -1.55rem -1rem 1rem;
  padding: 2.3rem 1rem 1rem;
  border-radius: 32px 32px 24px 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 50%),
    linear-gradient(135deg, #2f6df6 0%, #1e4fd7 100%);
  color: #fff;
  box-shadow: 0 16px 36px rgba(29, 78, 216, 0.24);
}

.mobile-appbar-overline {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.mobile-appbar-title {
  font-size: 1.38rem;
  font-weight: 800;
  line-height: 1.1;
}

.mobile-appbar-subtitle {
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.82rem;
}

.app-logo-inline,
.app-logo-title {
  width: 1.5rem;
  height: 1.5rem;
}

.profile-avatar.small {
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 20px rgba(10, 18, 36, 0.18);
}

.topbar {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.title-card {
  gap: 0.65rem;
  min-width: 0;
  padding: 1.2rem;
  border-radius: 28px;
  border: none;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 28%),
    linear-gradient(135deg, #2f6df6 0%, #1d4ed8 100%);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.22);
  color: #fff;
}

.title-card::before {
  opacity: 0.3;
}

.title-card .muted,
.title-card .hero-highlight span,
.title-card-tag,
.title-card-chip {
  color: rgba(255, 255, 255, 0.86);
}

.title-card-chip,
.title-card-tag {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.title-card-title-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.title-card-title-row h1 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
}

.hero-highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.hero-highlight {
  padding: 0.8rem 0.9rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-highlight strong {
  display: block;
  color: #fff;
  font-size: 1rem;
}

.control-panel,
.panel,
.cashier-reference-panel,
.cashier-reference-body {
  border: 1px solid #e2ebfb;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.panel {
  padding: 1rem;
}

.section-header {
  margin: 0 0 0.9rem;
  padding: 0;
  background: transparent;
  border: none;
}

.section-header h3 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 800;
  color: #0f172a;
}

.control-form,
.content-stage,
.grid {
  gap: 0.9rem;
}

.form-grid,
.grid.cols-2,
.grid.cols-3,
.grid.cols-4 {
  grid-template-columns: 1fr;
}

.kpi-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.icon-card {
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 0.75rem;
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: #e7efff;
  color: #2157c7;
  font-weight: 800;
}

.stat-card {
  padding: 0.95rem;
}

.stat-card strong {
  font-size: 1.16rem;
}

.stat-card.compact strong {
  font-size: 1rem;
}

.section-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.section-shortcut {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 0.8rem 0.55rem;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #dce7fb;
  color: #2157c7;
  font-size: 0.74rem;
  font-weight: 700;
  text-align: center;
}

.section-shortcut.active {
  background: linear-gradient(135deg, #2f6df6 0%, #1d4ed8 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18);
}

.section-shortcut-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.1);
}

.section-shortcut.active .section-shortcut-icon {
  background: rgba(255, 255, 255, 0.18);
}

.content-stage {
  display: grid;
  gap: 1rem;
}

.chart {
  padding: 0.9rem;
  border-radius: 22px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.table-wrap {
  overflow: visible;
}

.mobile-card-table {
  width: 100%;
}

.mobile-card-table thead {
  display: none;
}

.mobile-card-table tbody {
  display: grid;
  gap: 0.85rem;
}

.mobile-card-table tr {
  display: block;
  padding: 0.95rem;
  border-radius: 22px;
  border: 1px solid #e5edf9;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.mobile-card-table td,
.mobile-card-table th {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.45rem 0;
  border: none;
  background: transparent;
  font-size: 0.84rem;
  color: #0f172a;
}

.mobile-card-table td::before {
  content: attr(data-label);
  flex: 0 0 42%;
  color: #7b8ba7;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mobile-card-table td[data-primary="1"] {
  display: block;
  padding-top: 0;
  margin-bottom: 0.3rem;
  border-bottom: 1px solid #edf2fb;
}

.mobile-card-table td[data-primary="1"]::before {
  display: block;
  margin-bottom: 0.3rem;
}

.mobile-card-table td[data-actions="1"] {
  display: block;
  padding-top: 0.85rem;
  margin-top: 0.2rem;
  border-top: 1px solid #edf2fb;
}

.mobile-card-table td[data-actions="1"]::before {
  display: block;
  margin-bottom: 0.55rem;
}

.mobile-card-table td[data-empty="1"] {
  display: block;
  text-align: center;
  color: #6b7a95;
}

.mobile-card-table td[data-empty="1"]::before {
  display: none;
}

.mobile-card-table .actions {
  flex-direction: column;
  align-items: stretch;
}

.mobile-card-table .actions form,
.mobile-card-table .actions a,
.mobile-card-table .actions button {
  width: 100%;
}

.cashier-reference-shell {
  margin-bottom: 0;
  gap: 0.8rem;
}

.cashier-reference-topbar {
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 26%),
    linear-gradient(135deg, #2f6df6 0%, #1e4fd7 100%);
  box-shadow: 0 20px 42px rgba(29, 78, 216, 0.22);
}

.cashier-reference-shortcuts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.cashier-reference-shortcut {
  padding: 0.8rem 0.5rem;
  border-radius: 18px;
  background: #fff;
  color: #2157c7;
  border: 1px solid #dce7fb;
  box-shadow: none;
}

.cashier-reference-shortcut:hover,
.cashier-reference-shortcut.active {
  background: linear-gradient(135deg, #2f6df6 0%, #1d4ed8 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.2);
}

.cashier-reference-shortcut span {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.1);
}

.cashier-reference-shortcut.active span {
  background: rgba(255, 255, 255, 0.18);
}

.cashier-reference-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.cashier-reference-kpi {
  min-height: 104px;
  border-radius: 22px;
}

.cashier-reference-body {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.cashier-reference-header-grid,
.cashier-reference-layout {
  grid-template-columns: 1fr;
}

.cashier-reference-panel {
  gap: 0.9rem;
  padding: 1rem;
}

.cashier-reference-mini-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cashier-reference-summary-card {
  border-radius: 22px;
  background: linear-gradient(180deg, #edf4ff 0%, #f8fbff 100%);
  border: 1px solid #dce7fb;
}

.cashier-reference-summary-card .cashier-payment-line.total {
  padding-top: 0.6rem;
  border-top: 1px solid #d4e1fb;
}

.cashier-reference-summary-card .cashier-payment-line.total strong {
  font-size: 1.2rem;
  color: #1d4ed8;
}

.cashier-reference-shell .cashier-product-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: none;
  gap: 0.75rem;
}

.cashier-reference-shell .cashier-product-card {
  min-height: 146px;
  border-radius: 20px;
  padding: 0.85rem;
}

.cashier-product-top strong {
  font-size: 0.92rem;
}

.cashier-product-price {
  font-size: 0.88rem;
}

.cashier-product-meta {
  font-size: 0.75rem;
}

.cashier-product-stock {
  font-size: 0.74rem;
}

.cashier-reference-table-head {
  display: none;
}

.cashier-reference-order-row {
  padding: 0.85rem;
}

.cashier-reference-order-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cashier-line-total,
.cashier-reference-remove {
  grid-column: 1 / -1;
}

.cashier-reference-remove {
  width: 100%;
}

.cashier-reference-bottom {
  grid-template-columns: 1fr;
}

.cashier-reference-actions {
  justify-content: stretch;
}

.cashier-reference-actions .btn-primary,
.cashier-reference-actions .btn-secondary,
.cashier-reference-actions .btn-danger,
.actions .btn-primary,
.actions .btn-secondary,
.actions .btn-danger {
  width: 100%;
  justify-content: center;
}

.mobile-bottom-nav {
  display: grid;
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 65;
  width: min(414px, calc(100vw - 1rem));
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.6rem;
  border-radius: 24px;
  background: rgba(11, 23, 48, 0.98);
  box-shadow: 0 20px 42px rgba(2, 8, 23, 0.42);
}

.mobile-nav-item {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  padding: 0.7rem 0.35rem;
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.7rem;
  text-align: center;
}

.mobile-nav-item.active {
  background: linear-gradient(135deg, #2f6df6 0%, #1d4ed8 100%);
  color: #fff;
}

.mobile-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  font-weight: 800;
}

.mobile-nav-label {
  line-height: 1.15;
}

.floating-app-menu {
  position: fixed;
  top: 1.1rem;
  right: max(1rem, calc(50% - 18rem));
  left: auto;
  bottom: auto;
  z-index: 80;
}

.floating-app-menu-panel {
  width: min(320px, calc(100vw - 1rem));
  border-radius: 24px;
  border: 1px solid rgba(216, 229, 255, 0.82);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 44px rgba(2, 8, 23, 0.22);
}

.floating-app-menu-trigger {
  min-height: 56px;
  border-radius: 18px;
}

.floating-app-menu-body {
  gap: 0.55rem;
}

.floating-app-menu-item {
  border-radius: 16px;
  border: 1px solid #e4ecfb;
  background: #f8fbff;
}

.floating-app-menu-item.active {
  background: #edf4ff;
  border-color: #cfe0ff;
  color: #1847b8;
}

.empty-state {
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #e2ebfb;
}

@media (max-width: 1100px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    min-height: 340px;
  }
}

@media (max-width: 640px) {
  .auth-shell {
    padding: 0.9rem;
  }

  .auth-brand {
    padding: 1.5rem;
    border-radius: 28px;
  }

  .auth-card {
    width: 100%;
  }

  .app-shell {
    padding: 0.35rem;
  }

  .content {
    width: calc(100vw - 0.5rem);
    margin-bottom: 5.8rem;
    border-width: 7px;
    border-radius: 34px;
    padding: 0 0.8rem 7rem;
  }

  .mobile-appbar {
    margin-left: -0.8rem;
    margin-right: -0.8rem;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .hero-highlight-grid,
  .kpi-strip,
  .cashier-reference-kpis,
  .cashier-reference-shortcuts,
  .section-shortcuts,
  .cashier-reference-mini-grid,
  .cashier-reference-shell .cashier-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cashier-reference-shortcut strong,
  .section-shortcut {
    font-size: 0.7rem;
  }

  .floating-app-menu {
    top: 0.75rem;
    right: 0.55rem;
  }

  .mobile-bottom-nav {
    width: calc(100vw - 0.7rem);
    bottom: 0.45rem;
  }
}
