/* =========================================================================
   LFDS Web — purple glass theme
   Ported from the mobile app's Resources/Styles/Colors.xaml palette.
   ========================================================================= */

:root {
  --lfds-purple-deep: #2D2154;
  --lfds-purple-header: #3E2C7E;
  --lfds-purple-mid: #5C4A8C;
  --lfds-purple-light: #9B8BC4;
  --lfds-lavender-end: #B8A8D8;
  --lfds-bg: #4B3799;
  --lfds-bg-dark: #0D0628;
  --lfds-card-border: rgba(255, 255, 255, 0.53);
  --lfds-glass-fill: rgba(255, 255, 255, 0.18);
  --lfds-glass-fill-strong: rgba(255, 255, 255, 0.33);
  --lfds-glass-panel-top: rgba(40, 24, 100, 0.27);
  --lfds-glass-panel-bottom: rgba(32, 24, 74, 0.2);
  --lfds-title-on-purple: #FFFFFF;
  --lfds-text-primary: #3E2C7E;
  --lfds-text-muted: #8A7AA8;
  --lfds-accent-green: #2FA385;
  --lfds-accent-gold: #E4B84A;
  --lfds-accent-blue: #5B9BD5;
  --lfds-tab-bar-bg: #35285A;
  --lfds-tab-selected: #6EB8FF;
  --lfds-tab-unselected: #B8A8D8;
  --lfds-accent-gradient: linear-gradient(90deg, #7B68EE 0%, #9B6FFF 50%, #B084FF 100%);
  --lfds-shell-width: 100%;
  --lfds-shell-max: 430px;
  --lfds-phone-width: 430px;
  --lfds-danger: #E53935;
  --lfds-error-text: #FFCDD2;
  --lfds-font: "Outfit", "Segoe UI", system-ui, sans-serif;
  --lfds-display: "Fraunces", Georgia, serif;
  font-family: var(--lfds-font);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #ffffff;
  color: #fff;
  font-family: var(--lfds-font);
}

body {
  background: #ffffff;
  min-height: 100vh;
  min-height: 100dvh;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4, h5 {
  font-family: var(--lfds-font);
  font-weight: 700;
  margin: 0;
}

/* ---------------------------------------------------------------------- */
/* App shell — mobile phone frame only (all breakpoints)                 */
/* ---------------------------------------------------------------------- */

.app-shell {
  width: min(100%, var(--lfds-phone-width));
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
  /* Shared sample starfield (same asset/look as Support) */
  background:
    linear-gradient(180deg, rgba(45, 33, 84, 0.08), rgba(20, 12, 46, 0.22)),
    url("/images/main_background.jpg") center / cover no-repeat;
  background-color: #2a1a55;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 12px 40px rgba(0, 0, 0, 0.18);
}

.app-shell.with-tab-bar .app-content {
  padding-bottom: 92px;
}

.app-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  /* Transparent so main_background shows through like Support */
  background: transparent;
}

.page {
  padding: 20px 18px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  max-width: none;
  margin: 0;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--lfds-title-on-purple);
  text-align: center;
  margin: 4px 0 0;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 13px;
  color: #F1E6FF;
  text-align: center;
  opacity: 0.92;
}

/* ---------------------------------------------------------------------- */
/* Glass cards                                                             */
/* ---------------------------------------------------------------------- */

.glass-card {
  border: 1px solid var(--lfds-card-border);
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.33) 0%, rgba(255,255,255,0.15) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(20, 10, 60, 0.28);
}

.glass-card.deep {
  background: linear-gradient(180deg, var(--lfds-glass-panel-top) 0%, var(--lfds-glass-panel-bottom) 100%);
}

.glass-card.tight {
  padding: 10px 12px;
}

.glass-row {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--lfds-card-border);
  border-radius: 18px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.27) 100%);
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
  color: var(--lfds-text-primary);
}

.glass-row:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.32) 100%);
}

.glass-row .chevron {
  font-size: 26px;
  color: #B8A8D8;
  margin-left: auto;
}

.glass-field {
  border: 1px solid var(--lfds-card-border);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.22) 100%);
  padding: 0 12px;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.glass-field input,
.glass-field select {
  background: transparent;
  border: none;
  outline: none;
  color: var(--lfds-purple-deep);
  font-size: 14px;
  width: 100%;
  height: 100%;
  font-family: inherit;
}

.glass-field input::placeholder {
  color: #9E8FC0;
}

textarea.glass-textarea {
  border: 1px solid var(--lfds-card-border);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.22) 100%);
  color: var(--lfds-purple-deep);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 100px;
  width: 100%;
  outline: none;
}

/* ---------------------------------------------------------------------- */
/* Avatar                                                                  */
/* ---------------------------------------------------------------------- */

.avatar {
  border-radius: 50%;
  border: 2px solid #E3ECFF;
  object-fit: cover;
  background: linear-gradient(145deg, #9d86e0, #6650A4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */

.btn {
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: filter 0.12s ease, transform 0.08s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--lfds-accent-gradient);
  color: #fff;
  box-shadow: 0 8px 22px rgba(123, 104, 238, 0.35);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn-secondary {
  background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.1));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.btn-secondary:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(255,255,255,0.3), rgba(255,255,255,0.14));
}

.btn-glass,
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-glass:hover,
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-danger {
  background: #880E4F;
  color: #fff;
}

.btn-outline-light {
  background: transparent;
  color: #fff;
  border: 1px solid var(--lfds-card-border);
}

/* ---------------------------------------------------------------------- */
/* Auth screens — mobile phone frame only                                */
/* ---------------------------------------------------------------------- */

.auth-layout {
  width: min(100%, var(--lfds-phone-width));
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 12px 40px rgba(0, 0, 0, 0.18);
  background:
    linear-gradient(180deg, rgba(45, 33, 84, 0.35), rgba(30, 18, 60, 0.55)),
    url("/images/login_background.jpg") center / cover no-repeat;
}

.auth-brand {
  position: relative;
  display: block;
  min-height: 140px;
  overflow: hidden;
  flex-shrink: 0;
}

.auth-brand__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(45, 33, 84, 0.85), transparent 70%);
  pointer-events: none;
}

.auth-brand__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
  padding: 20px 20px 16px;
}

.auth-brand__eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d7c8ff;
}

.auth-brand__name {
  margin: 0;
  font-family: var(--lfds-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #fff;
}

.auth-brand__tagline {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #efe7ff;
}

.auth-brand__points {
  display: none;
}

.auth-panel {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 18px 28px;
  background: linear-gradient(180deg, rgba(75, 55, 153, 0.72), rgba(47, 34, 99, 0.88));
}

.auth-panel__inner,
.auth-panel__inner--form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-panel__header {
  text-align: center;
}

.auth-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c4b4f0;
}

.auth-heading {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  font-family: "Segoe UI Semibold", var(--lfds-font), sans-serif;
}

.auth-lead {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #e8defe;
}

.auth-card {
  width: 100%;
  border: 1px solid var(--lfds-card-border);
  border-radius: 14px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.14) 100%);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 12px 28px rgba(12, 6, 40, 0.28);
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: #efe7ff;
  margin-top: 4px;
}

.field-toggle {
  border: 0;
  background: transparent;
  color: #6650a4;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.auth-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #cbb9ff;
  text-align: center;
}

.qr-stage {
  display: flex;
  justify-content: center;
}

.qr-frame {
  width: min(100%, 280px);
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 12px;
  background: #0a0618;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.qr-frame.is-live {
  border-color: rgba(110, 184, 255, 0.7);
}

.qr-frame video, .qr-frame canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qr-corners {
  position: absolute;
  inset: 14px;
  pointer-events: none;
  box-shadow:
    inset 18px 18px 0 -16px #6EB8FF,
    inset -18px -18px 0 -16px #6EB8FF,
    inset 18px -18px 0 -16px #6EB8FF,
    inset -18px 18px 0 -16px #6EB8FF;
}

.qr-frame .qr-scan-line {
  position: absolute;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #6EB8FF, transparent);
  animation: qr-scan 2.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes qr-scan {
  0% { top: 12%; }
  50% { top: 84%; }
  100% { top: 12%; }
}

.qr-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  color: #E8DEFF;
  font-size: 13px;
  text-align: center;
  line-height: 1.45;
  background: radial-gradient(circle at center, rgba(75, 55, 153, 0.35), rgba(10, 6, 24, 0.92));
}

.qr-placeholder__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1.5px dashed rgba(255,255,255,0.45);
  opacity: 0.8;
}

/* ---------------------------------------------------------------------- */
/* Profile / summary rows                                                  */
/* ---------------------------------------------------------------------- */

.profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-name {
  font-weight: 700;
  font-size: 17px;
  color: var(--lfds-purple-deep);
}

.profile-meta {
  font-size: 13px;
  color: #fff;
}

/* ---------------------------------------------------------------------- */
/* Credits / progress bars                                                 */
/* ---------------------------------------------------------------------- */

.credit-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.credit-row .credit-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--lfds-purple-deep);
  font-weight: 600;
}

.credit-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.credit-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}

.credit-item__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.credit-item__icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.credit-item__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--lfds-text-primary);
  line-height: 1.25;
}

.credit-item__amt {
  font-size: 16px;
  font-weight: 700;
  color: var(--lfds-text-primary);
  font-variant-numeric: tabular-nums;
}

.avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #E3ECFF;
  background: #9d86e0;
}

.profile-card {
  border-radius: 36px !important;
}

.section-title {
  color: var(--lfds-text-primary);
  font-size: 17px;
  margin: 0 0 12px;
}

.link-underline {
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  text-decoration: underline;
}

.nav-glyph {
  font-size: 22px;
  color: var(--lfds-text-primary);
  width: 28px;
  text-align: center;
}

.nav-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--lfds-text-primary);
}

.nav-sub {
  font-size: 12px;
  color: var(--lfds-text-primary);
  opacity: 0.9;
}

.tile-img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #6AD7FF, #7B68EE);
  transition: width 0.3s ease;
}

.progress-fill.warn {
  background: linear-gradient(90deg, #FF9800, #FF4B2B);
}

.progress-fill.danger {
  background: linear-gradient(90deg, #E53935, #B71C1C);
}

.progress-fill.ok {
  background: linear-gradient(90deg, #2FA385, #1FA855);
}

/* ---------------------------------------------------------------------- */
/* Quick action tiles                                                      */
/* ---------------------------------------------------------------------- */

.tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tile {
  border: 1px solid var(--lfds-card-border);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.36) 0%, rgba(255,255,255,0.2) 100%);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--lfds-text-primary);
  transition: transform 0.12s ease;
}

.tile:hover {
  transform: translateY(-2px);
}

.tile .tile-icon {
  font-size: 22px;
}

.tile .tile-title {
  font-weight: 700;
  font-size: 15px;
}

.tile .tile-subtitle {
  font-size: 12px;
  opacity: 0.85;
}

/* ---------------------------------------------------------------------- */
/* Bottom tab bar                                                          */
/* ---------------------------------------------------------------------- */

.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, var(--lfds-phone-width));
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px));
  background: #2A1F4A;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  z-index: 50;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--lfds-tab-unselected);
  font-size: 10px;
  font-weight: 600;
  flex: 1;
  padding: 4px 2px;
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
}

.tab-item .tab-icon {
  font-size: 20px;
  line-height: 1;
}

.tab-item .tab-icon-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
  margin: 0 auto 2px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.tab-item.active .tab-icon-img {
  filter: drop-shadow(0 0 4px rgba(110, 184, 255, 0.55));
}

.tab-item.active {
  color: var(--lfds-tab-selected);
}

/* ---------------------------------------------------------------------- */
/* Top bar with back button (stack screens)                                */
/* ---------------------------------------------------------------------- */

.stack-header {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  padding: 16px 4px 4px;
}

.stack-header .back-btn {
  font-size: 24px;
  color: #fff;
  cursor: pointer;
  background: none;
  border: none;
  justify-self: start;
}

.stack-header .stack-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

/* ---------------------------------------------------------------------- */
/* Tables (movements / history)                                            */
/* ---------------------------------------------------------------------- */

.data-table-card {
  border: 1px solid var(--lfds-card-border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(30, 24, 56, 0.66);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table thead th {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-weight: 700;
  padding: 10px 6px;
  text-align: center;
  white-space: nowrap;
}

.data-table tbody td {
  padding: 9px 6px;
  text-align: center;
  color: #EFE9FF;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.data-table tbody tr:hover {
  background: rgba(255,255,255,0.08);
}

.empty-state {
  text-align: center;
  color: #E8DEFF;
  font-size: 13px;
  padding: 24px 12px;
}

/* ---------------------------------------------------------------------- */
/* Badges                                                                  */
/* ---------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.badge-open { background: #AD8A2D; }
.badge-resolved { background: #4A8F45; }
.badge-ok { background: #1FA855; }
.badge-warn { background: #FF9800; }
.badge-danger { background: #E53935; }
.badge-neutral { background: rgba(255,255,255,0.25); }

/* ---------------------------------------------------------------------- */
/* Admin Consumption (movements) — match APK AdminConsumptionPage          */
/* ---------------------------------------------------------------------- */

.consumption-movements-page {
  gap: 14px;
}

.consumption-movements-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
  margin: 0;
}

.consumption-filter-card {
  border: 1px solid rgba(255, 255, 255, 0.53);
  border-radius: 4px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(40, 24, 100, 0.27) 0%, rgba(32, 24, 74, 0.2) 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.consumption-filter-row--2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.consumption-filter-control {
  border: 1px solid rgba(255, 255, 255, 0.53);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(40, 24, 100, 0.27) 0%, rgba(32, 24, 74, 0.2) 100%);
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 4px;
}

.consumption-filter-control input,
.consumption-filter-control select {
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  height: 32px;
  padding: 0 6px;
}

.consumption-filter-control select option {
  color: #2D2154;
}

.consumption-filter-control input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.85;
}

.consumption-apply-btn {
  width: 100%;
  height: 36px;
  border: 1px solid #9EA7FF;
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(90deg, #7B68EE 0%, #9B6FFF 55%, #B084FF 100%);
}

.consumption-apply-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.consumption-table-card {
  border: 1px solid rgba(255, 255, 255, 0.53);
  border-radius: 4px;
  background: rgba(30, 24, 56, 0.66);
  overflow: hidden;
}

.consumption-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  table-layout: fixed;
}

.consumption-table thead th {
  background: rgba(255, 255, 255, 0.27);
  color: #fff;
  font-weight: 700;
  font-size: 10px;
  padding: 12px 4px;
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.33);
}

.consumption-table tbody td {
  padding: 10px 4px;
  text-align: center;
  color: #fff;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.consumption-table tbody tr.alt-a td { background: rgba(0, 0, 0, 0.13); }
.consumption-table tbody tr.alt-b td { background: rgba(0, 0, 0, 0.19); }

.consumption-date-cell {
  white-space: pre-line !important;
  font-size: 10px;
  line-height: 1.25;
}

/* ---------------------------------------------------------------------- */
/* Admin Edit Credits — match APK AdminEditCreditsPage                     */
/* ---------------------------------------------------------------------- */

.edit-credits-page {
  gap: 14px;
  background: transparent;
}

.edit-credits-toolbar {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
}

.edit-credits-title {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0;
}

.edit-credits-search {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 4px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.53);
  border-radius: 36px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.33) 0%, rgba(255, 255, 255, 0.2) 50%);
}

.edit-credits-search__icon {
  font-size: 14px;
  line-height: 1;
  color: #fff;
}

.edit-credits-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  height: 100%;
}

.edit-credits-search input::placeholder {
  color: #E8DEFF;
  opacity: 0.95;
}

.edit-credits-search__btn {
  border: 0;
  border-radius: 20px;
  height: 32px;
  min-width: 76px;
  padding: 0 14px;
  background: #7B68EE;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.edit-credits-search__btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.edit-credits-intro {
  margin: 0;
  font-size: 13px;
  color: #E8E0FF;
  text-align: center;
}

.edit-credits-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.edit-credits-user-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.53);
  border-radius: 4px;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.33) 0%, rgba(255, 255, 255, 0.2) 100%);
  text-align: left;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
}

.edit-credits-user-card__name {
  font-size: 16px;
  font-weight: 700;
  color: #2D2154;
}

.edit-credits-user-card__role {
  font-size: 13px;
  color: #8A7AA8;
}

.edit-credits-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.edit-credits-user-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.53);
  border-radius: 4px;
  padding: 8px 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.33) 0%, rgba(255, 255, 255, 0.2) 100%);
}

.edit-credits-user-summary__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.edit-credits-user-summary__name {
  font-size: 14px;
  font-weight: 700;
  color: #2D2154;
}

.edit-credits-user-summary__role {
  font-size: 12px;
  color: #8A7AA8;
}

.edit-credits-user-summary__max {
  font-size: 12px;
  font-weight: 700;
  color: #2D2154;
}

.edit-credits-history-btn {
  flex-shrink: 0;
  height: 34px;
  border: 1px solid #9EA7FF;
  border-radius: 4px;
  padding: 0 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(90deg, #7B68EE 0%, #9B6FFF 55%, #B084FF 100%);
}

.edit-credits-lines {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.edit-credits-line-card {
  display: grid;
  grid-template-columns: 48px 1fr auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(179, 136, 232, 0.8);
  border-radius: 4px;
  padding: 8px 10px;
  background: linear-gradient(180deg, rgba(40, 24, 100, 0.53) 0%, rgba(26, 15, 58, 0.4) 100%);
}

.edit-credits-line-card__img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.edit-credits-line-card__info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.edit-credits-line-card__model {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.edit-credits-line-card__meta {
  font-size: 11px;
  color: #C9B8E8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.edit-credits-stepper {
  display: flex;
  align-items: stretch;
  height: 28px;
}

.edit-credits-stepper__btn {
  width: 28px;
  border: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.edit-credits-stepper__btn--minus {
  border-radius: 4px 0 0 4px;
  background: rgba(45, 74, 131, 0.6);
}

.edit-credits-stepper__btn--plus {
  border-radius: 0 4px 4px 0;
  background: #5B9BD5;
}

.edit-credits-stepper__qty {
  width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 74, 131, 0.6);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.edit-credits-update-btn {
  height: 28px;
  border: 1px solid #E879F9;
  border-radius: 4px;
  padding: 0 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(90deg, #EC4899 0%, #4C1D6E 100%);
  white-space: nowrap;
}

.edit-credits-update-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ---------------------------------------------------------------------- */
/* User History / Movement list — match APK MovementsPage                  */
/* ---------------------------------------------------------------------- */

.movements-page {
  gap: 14px;
}

.movements-title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
}

.movements-subtitle {
  margin: 0;
  font-size: 14px;
  color: #F8F4FF;
  text-align: center;
  opacity: 0.95;
  line-height: 1.35;
}

.movements-filter-card {
  border: 1px solid rgba(255, 255, 255, 0.53);
  border-radius: 8px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(40, 24, 100, 0.27) 0%, rgba(32, 24, 74, 0.2) 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.movements-filter-heading {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.movements-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.movements-filter-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.movements-filter-field label {
  font-size: 11px;
  color: #F5F0FF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movements-filter-control {
  height: 28px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.27);
  display: flex;
  align-items: center;
  padding: 0 6px;
}

.movements-filter-control input,
.movements-filter-control select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 11px;
  font-family: inherit;
  height: 100%;
}

.movements-filter-control select option {
  color: #2D2154;
}

.movements-filter-control input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.85;
}

.movements-apply-btn {
  width: 100%;
  border: 0;
  border-radius: 4px;
  padding: 10px 12px;
  background: #7B68EE;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.movements-apply-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.movements-table-card {
  border: 1px solid rgba(255, 255, 255, 0.53);
  border-radius: 8px;
  background: rgba(30, 24, 56, 0.66);
  overflow: hidden;
}

.movements-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.movements-table thead th {
  background: rgba(255, 255, 255, 0.27);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 12px 4px;
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.33);
}

.movements-table tbody td {
  padding: 10px 4px;
  text-align: center;
  color: #fff;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  text-overflow: ellipsis;
}

.movements-table tbody tr.alt-a td { background: rgba(0, 0, 0, 0.13); }
.movements-table tbody tr.alt-b td { background: rgba(0, 0, 0, 0.19); }

.movements-garment {
  font-weight: 700;
  text-align: left !important;
  padding-left: 8px !important;
}

.movements-kind-cell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  text-align: left !important;
  white-space: normal !important;
  line-height: 1.25;
}

.movements-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.movements-date-cell {
  white-space: pre-line !important;
  font-size: 11px;
  line-height: 1.25;
  opacity: 0.92;
}

.movements-showing {
  margin: 0;
  font-size: 13px;
  color: #fff;
  text-align: center;
  opacity: 0.95;
}

.movements-load-more {
  width: 100%;
  border: 1px solid #B388E8;
  border-radius: 10px;
  padding: 12px 16px;
  background: #5E4AA8;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.movements-load-more:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

@media (max-width: 380px) {
  .movements-filter-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------------- */
/* User Sizes — match APK SizesPage                                        */
/* ---------------------------------------------------------------------- */

.sizes-page {
  gap: 18px;
}

.sizes-title {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0;
  text-align: left;
}

.sizes-profile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.53);
  border-radius: 36px;
  padding: 0 12px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.27) 100%);
  box-shadow: 0 4px 14px rgba(127, 170, 205, 0.28);
  overflow: hidden;
}

.sizes-profile__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid #E3ECFF;
  object-fit: cover;
  background: #fff;
}

.sizes-profile__text {
  min-width: 0;
  padding: 10px 0;
}

.sizes-profile__name {
  font-size: 17px;
  font-weight: 700;
  color: #2D2154;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sizes-profile__intro {
  font-size: 13px;
  color: #fff;
  line-height: 1.3;
}

.sizes-profile__chevron {
  font-size: 36px;
  color: #B8A8D8;
  line-height: 1;
  padding-right: 4px;
}

.sizes-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sizes-card {
  border: 1px solid rgba(255, 255, 255, 0.53);
  border-radius: 8px;
  padding: 8px 12px 12px;
  background: linear-gradient(180deg, rgba(40, 24, 100, 0.27) 0%, rgba(32, 24, 74, 0.2) 100%);
  box-shadow: 0 4px 14px rgba(127, 170, 205, 0.22);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sizes-card__header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  width: 100%;
  border: 0;
  padding: 4px 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

.sizes-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sizes-card__icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.sizes-card__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sizes-card__name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sizes-card__current {
  font-size: 13px;
  color: #8A7AA8;
  line-height: 1.3;
}

.sizes-card__chevron {
  font-size: 36px;
  color: #B8A8D8;
  line-height: 1;
}

.sizes-save-btn {
  width: 100%;
  height: 28px;
  margin-top: 8px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(90deg, #7B68EE 0%, #9B6FFF 50%, #B084FF 100%);
}

.sizes-save-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.sizes-empty {
  border: 1px solid rgba(255, 255, 255, 0.53);
  border-radius: 10px;
  padding: 20px 18px;
  text-align: center;
  color: #3E2C7E;
  font-size: 14px;
  background: linear-gradient(180deg, rgba(40, 24, 100, 0.27) 0%, rgba(32, 24, 74, 0.2) 100%);
}

.sizes-success {
  margin: 0;
  text-align: center;
  color: #7DFFB8;
  font-size: 13px;
}

/* Action-sheet modal (APK DisplayActionSheet) — covers phone frame */
.sizes-modal {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, var(--lfds-phone-width));
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sizes-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(10, 6, 28, 0.55);
  cursor: pointer;
}

.sizes-modal__sheet {
  position: relative;
  z-index: 1;
  width: calc(100% - 24px);
  max-width: 400px;
  margin: 0 12px 104px;
  border-radius: 14px;
  background: #2A1F4A;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: min(58vh, 420px);
}

.sizes-modal__title {
  padding: 14px 16px 10px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sizes-modal__options {
  overflow: auto;
  flex: 1;
  padding: 6px;
}

.sizes-modal__option {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  text-align: center;
  padding: 14px 12px;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
}

.sizes-modal__option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sizes-modal__option.is-selected {
  background: rgba(123, 104, 238, 0.45);
  font-weight: 700;
}

.sizes-modal__cancel {
  width: calc(100% - 12px);
  margin: 6px;
  border: 0;
  border-radius: 10px;
  padding: 14px 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.consumption-showing {
  margin: 0;
  font-size: 13px;
  color: #fff;
  text-align: center;
}

.consumption-load-more {
  width: 100%;
  border: 0;
  border-radius: 4px;
  padding: 12px 16px;
  background: #5E4AA8;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.consumption-load-more:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ---------------------------------------------------------------------- */
/* Admin Support — match APK AdminSupportPage                              */
/* ---------------------------------------------------------------------- */

.support-page {
  gap: 12px;
}

.support-lang-card {
  border: 1px solid rgba(255, 255, 255, 0.53);
  border-radius: 8px;
  padding: 12px 8px;
  background: linear-gradient(180deg, rgba(40, 24, 100, 0.27) 0%, rgba(32, 24, 74, 0.2) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgba(127, 170, 205, 0.18);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.support-lang-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  padding: 0;
}

.support-lang-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.53);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.22) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.support-lang-title {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.support-lang-hint {
  color: #E7DFFF;
  font-size: 13px;
  margin-top: 4px;
  line-height: 1.35;
}

.support-lang-chevron {
  color: #B8A8D8;
  font-size: 28px;
  line-height: 1;
}

.support-lang-pick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 44px;
  justify-content: center;
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
  padding: 0;
}

.support-lang-pick-label {
  font-size: 14px;
  font-weight: 700;
}

.support-lang-pick-value {
  font-size: 13px;
  opacity: 0.95;
}

.support-lang-select {
  width: 100%;
  margin-top: 2px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
  padding: 0;
  outline: none;
  cursor: pointer;
}

.support-lang-select option {
  color: #2D2154;
}

.support-lang-apply {
  height: 36px;
  border-radius: 8px;
  font-size: 14px;
  padding: 0 8px;
  box-shadow: none;
}

.support-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 4px;
}

.support-filter {
  height: 40px;
  border-radius: 16px;
  border: 1px solid #8A7CC8;
  background: #3A2A74;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.support-filter.active {
  background: #5C6BEF;
}

.support-ticket-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.support-ticket-card {
  border: 1px solid #7A66B6;
  border-radius: 4px;
  padding: 12px 10px;
  background: linear-gradient(180deg, rgba(40, 24, 100, 0.27) 0%, rgba(32, 24, 74, 0.2) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.support-ticket-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.support-ticket-name {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

.support-ticket-role {
  color: #D6C7F8;
  font-size: 13px;
  margin-top: 2px;
}

.support-badge {
  padding: 3px 10px;
  font-size: 13px;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}

.support-badge.is-pending {
  background: #AD8A2D;
  border-radius: 4px;
}

.support-badge.is-resolved {
  background: #4A8F45;
  border-radius: 8px;
}

.support-ticket-subject {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-top: 8px;
}

.support-ticket-desc {
  color: #F0E8FF;
  font-size: 14px;
  margin-top: 4px;
  line-height: 1.35;
}

.support-ticket-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.support-ticket-when {
  color: #D6C7F8;
  font-size: 12px;
}

.support-resolve-btn {
  border: 0;
  border-radius: 4px;
  height: 36px;
  padding: 0 10px;
  background: #6F4DDB;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.support-resolve-btn:hover {
  filter: brightness(1.08);
}

/* ---------------------------------------------------------------------- */
/* Machine status cards (admin) — match APK MachineStatusPage              */
/* ---------------------------------------------------------------------- */

.machines-page {
  gap: 14px;
}

.machines-toolbar {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: start;
  gap: 8px;
}

.machines-title-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 2px;
}

.machines-title {
  margin: 0;
  font-size: 24px;
}

.machines-title-rule {
  width: calc(100% - 48px);
  max-width: 220px;
  height: 3px;
  border-radius: 2px;
  background: #00F2FF;
  box-shadow: 0 0 14px rgba(0, 242, 255, 0.75);
  opacity: 0.92;
}

.machine-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.machine-card {
  border-radius: 8px;
  border: 1.5px solid var(--accent, #00F2FF);
  background: rgba(10, 14, 33, 0.8);
  padding: 4px;
  cursor: pointer;
  box-shadow: 0 2px 14px color-mix(in srgb, var(--accent, #00F2FF) 28%, transparent);
  transition: transform 0.12s ease;
  min-width: 0;
}

.machine-card.is-alert {
  box-shadow: 0 2px 16px color-mix(in srgb, var(--accent, #FF4B2B) 42%, transparent);
}

.machine-card:hover {
  transform: translateY(-1px);
}

.machine-card .machine-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 8px;
}

.machine-header__text {
  min-width: 0;
  flex: 1;
}

.machine-card .machine-name {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.machine-card .machine-sub {
  color: #B0B0B0;
  font-size: 11px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.machine-pill {
  border-radius: 8px;
  border: 1px solid var(--accent, #00F2FF);
  background: var(--badge-bg, #082038);
  padding: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  line-height: 1;
  flex-shrink: 0;
}

.machine-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px;
  align-items: end;
}

.machine-body__left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.machine-body__img {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.machine-body__img img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
}

.machine-img-status {
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.machine-cap-line {
  font-size: 11px;
  color: #E8E8E8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.machine-fill-track {
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.27);
  padding: 2px;
  box-sizing: border-box;
}

.machine-fill-bar {
  height: 100%;
  border-radius: 4px;
  min-width: 0;
}

.machine-fraction {
  font-size: 12px;
  font-weight: 700;
}

.machine-fraction__rest {
  color: #B0B0B0;
  font-weight: 400;
}

.machine-status-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #E8E8E8;
  min-width: 0;
}

.machine-status-line .status-label {
  flex-shrink: 0;
}

.machine-status-line strong {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.machine-status-line strong.pos { color: #70E0E0; }
.machine-status-line strong.neg { color: #FFB86C; }

.machine-status-line .status-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #fff;
  flex-shrink: 0;
  font-weight: 700;
  line-height: 1;
}

.machine-status-line .status-dot.ok { background: #1FA855; }
.machine-status-line .status-dot.warn { background: #CC6B2E; }
.machine-status-line .status-dot.person { background: #3A6EA5; font-size: 8px; }

/* ---------------------------------------------------------------------- */
/* Donuts / dashboard                                                      */
/* ---------------------------------------------------------------------- */

.donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.donut {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.donut::after {
  content: '';
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: #2c2153;
}

.donut--thick::after {
  inset: 22px;
  background: #2a1f55;
}

.donut .donut-value {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
}

.consumption-page {
  gap: 14px;
}

.consumption-toolbar {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
}

.consumption-title {
  margin: 0;
  font-size: 24px;
}

.toolbar-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.period-pills {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.period-pill {
  border: none;
  border-radius: 4px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
}

.period-pill.active {
  background: #DD5A9C;
}

.consumption-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.machine-hero {
  height: 90px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(6px 8px 10px rgba(0, 0, 0, 0.55));
}

.machine-label {
  color: #fff;
  font-size: 15px;
}

.machine-total {
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.machine-total--disp { color: #9AD8FF; }
.machine-total--coll { color: #7DFFB8; }

.consumption-models {
  margin-top: 8px;
  border-radius: 4px !important;
  padding: 12px 8px !important;
  background: rgba(255, 255, 255, 0.16) !important;
}

.models-title {
  margin: 0 0 10px;
  text-align: center;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.models-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.model-row__name {
  color: #fff;
  font-size: 14px;
  margin-bottom: 4px;
}

.model-row__barline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.model-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.33);
}

.model-fill {
  background: linear-gradient(90deg, #6AD7FF, #7B68EE) !important;
}

.model-row__qty {
  color: #DDF5FF;
  font-size: 13px;
  min-width: 36px;
  text-align: right;
}

/* ---------------------------------------------------------------------- */
/* Utility                                                                 */
/* ---------------------------------------------------------------------- */

.text-center { text-align: center; }
.text-muted { color: var(--lfds-text-muted); }
.text-error { color: var(--lfds-error-text); font-size: 13px; }
.mt-0 { margin-top: 0; }
.stack-gap-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-gap-md { display: flex; flex-direction: column; gap: 14px; }
.row-between { display: flex; justify-content: space-between; align-items: center; }
.row-gap { display: flex; align-items: center; gap: 10px; }
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 12px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.demo-hint {
  font-size: 11px;
  color: #cbb9ff;
  text-align: center;
}

.filters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.filter-field label {
  font-size: 11px;
  color: #F5F0FF;
  display: block;
  margin-bottom: 2px;
}

.filter-field input,
.filter-field select {
  width: 100%;
  height: 30px;
  border-radius: 4px;
  border: none;
  background: rgba(0,0,0,0.27);
  color: #fff;
  font-size: 11px;
  padding: 0 6px;
  font-family: inherit;
}

@media (max-width: 480px) {
  .filters-grid { grid-template-columns: 1fr 1fr; }
  .machine-grid { grid-template-columns: 1fr; }
}

/* Desktop: keep the phone frame; never expand to wide layouts. */

/* ====================================================================== */
/* QR sign-in — match mobile QrPairingPage screenshot                     */
/* ====================================================================== */

.qr-mobile {
  position: relative;
  width: min(100%, var(--lfds-phone-width));
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  color: #fff;
  font-family: "Segoe UI", "Outfit", system-ui, sans-serif;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 12px 40px rgba(0, 0, 0, 0.18);
}

.qr-mobile__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(45, 33, 84, 0.28) 0%, rgba(30, 18, 60, 0.35) 100%),
    url("/images/main_background.jpg") center / cover no-repeat;
  z-index: 0;
}

.qr-mobile__stage {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 28px 18px 20px;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 16px;
  box-sizing: border-box;
}

.qr-mobile__header {
  text-align: center;
  padding-top: 4px;
}

.qr-mobile__header h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0;
  font-family: "Segoe UI Semibold", "Segoe UI", sans-serif;
}

.qr-mobile__header h2 {
  margin: 6px 0 0;
  font-size: 22px;
  font-weight: 600;
  color: #F4ECFF;
  font-family: "Segoe UI", sans-serif;
}

.qr-mobile__header p {
  margin: 8px auto 0;
  max-width: 320px;
  font-size: 12px;
  line-height: 1.4;
  color: #F1E6FF;
}

.qr-mobile__camera-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.qr-mobile__camera {
  position: relative;
  width: min(280px, 78vw);
  aspect-ratio: 1;
  border: 2px solid rgba(175, 255, 255, 0.85);
  border-radius: 8px;
  background: #000;
  padding: 8px;
  box-sizing: border-box;
  box-shadow: 0 0 24px rgba(140, 220, 255, 0.25);
  overflow: hidden;
}

.qr-mobile__camera.is-live {
  border-color: rgba(175, 255, 255, 0.95);
}

.qr-mobile__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  background: #000;
  display: block;
}

.qr-mobile__canvas {
  display: none;
}

.qr-mobile__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(100%, 320px);
  margin: 0 auto;
}

.qr-manual-btn {
  border: 1px solid rgba(255, 255, 255, 0.53);
  border-radius: 8px;
  height: 40px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.qr-mobile__viewfinder {
  position: absolute;
  inset: 8px;
  border-radius: 4px;
  background: rgba(120, 220, 230, 0.55);
  pointer-events: none;
}

.qr-perm {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92%, 230px);
  background: #3a3a3a;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  padding: 18px 14px 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  z-index: 5;
}

.qr-perm__close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.9;
}

.qr-perm__text {
  margin: 4px 8px 16px;
  text-align: center;
  font-size: 13px;
  line-height: 1.35;
  color: #fff;
}

.qr-perm__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.qr-perm__btn {
  border: 0;
  border-radius: 8px;
  padding: 10px 6px;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: #8b7cc8;
  cursor: pointer;
  line-height: 1.2;
}

.qr-perm__btn:hover:not(:disabled) {
  background: #9b8cd8;
}

.qr-perm__btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.qr-mobile__status {
  margin: 0;
  max-width: 300px;
  text-align: center;
  font-size: 12px;
  color: #F1E6FF;
}

.qr-https-banner {
  margin: 0 4px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 205, 210, 0.55);
  background: rgba(136, 14, 79, 0.55);
  color: #FFE8EC;
  text-align: center;
}

.qr-https-banner strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}

.qr-https-banner p {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0.95;
}

.qr-https-banner code {
  font-size: 11px;
  color: #fff;
}

.qr-mobile__error {
  margin: 0;
  max-width: 300px;
  text-align: center;
  font-size: 12px;
  color: #FFCDD2;
}

.qr-mobile__footer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
  padding-bottom: 4px;
}

.qr-mobile__scrub {
  width: 95px;
  height: 85px;
  object-fit: contain;
  filter: drop-shadow(4px 4px 10px rgba(0, 0, 0, 0.55));
}

.qr-mobile__locker {
  width: 190px;
  height: 118px;
  object-fit: contain;
  filter: drop-shadow(4px 4px 10px rgba(0, 0, 0, 0.55));
  border-radius: 4px;
}

.qr-mobile__demo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(100%, 320px);
  margin: 0 auto;
}

.qr-demo-btn {
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(90deg, #7B68EE, #9B6FFF);
  cursor: pointer;
}

.qr-demo-btn--admin {
  background: linear-gradient(90deg, #4B3799, #6E4BB8);
}

.qr-demo-link {
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}
