/**
 * WINROLL ADMIN — admin-vs.css
 * Layout & Responsive Shell.
 * Visual Design, Components & Colors: Vuesax Defaults.
 */

/* ─── Vuesax Dark Theme Tokens ────────────────────────────── */
:root {
  --vs-primary: 244, 166, 35;
  --vs-success: 0, 192, 118;
  --vs-danger: 255, 59, 48;
  --vs-warn: 244, 166, 35;
  --vs-dark: 18, 18, 18;
  --vs-background: 11, 11, 11;
  --vs-color: 255, 255, 255;
  --vs-text: 255, 255, 255;

  /* WinRoll Unified Surface Tokens */
  --wr-bg-main: #0b0b0b;
  --wr-bg-sidebar: #0e0e0e;
  --wr-bg-header: rgba(14, 14, 14, 0.96);
  --wr-bg-card: #141414;
  --wr-bg-card-hover: #191919;
  --wr-bg-surface: #171717;
  --wr-bg-input: #1a1a1a;

  /* Borders */
  --wr-border-subtle: rgba(255, 255, 255, 0.06);
  --wr-border-card: rgba(255, 255, 255, 0.08);
  --wr-border-focus: rgba(var(--vs-primary), 0.6);

  /* Radius Rules: STRICT 10px on all interactive controls */
  --wr-radius-sm: 6px;
  --wr-radius-control: 10px;
  --wr-radius-card: 14px;
  --wr-radius-modal: 16px;

  /* Standard control heights */
  --wr-control-height: 40px;
  --wr-control-height-sm: 34px;
  --wr-control-height-mini: 28px;

  /* Desktop Max Width constraint */
  --wr-content-max-width: 1280px;
}

/* ─── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #0b0b0b;
  color: rgb(var(--vs-text));
  -webkit-font-smoothing: antialiased;
}

[v-cloak] {
  display: none !important;
}

/* ─── App Shell ───────────────────────────────────────────── */
#wr-app {
  display: flex;
  height: 100vh;
  max-width: 100vw;
  overflow: hidden;
}

/* ─── Sidebar ─────────────────────────────────────────────── */
#wr-sidebar {
  width: 268px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #0e0e0e;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  z-index: 200;
  transition: transform 0.25s ease;
}

.wr-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  max-height: 64px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  flex-shrink: 0;
}

.wr-sidebar-brand-logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.wr-sidebar-brand-name {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.5px;
}

.wr-sidebar-brand-badge {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #F4A623;
  background: rgba(244, 166, 35, 0.10);
  border-radius: 6px;
  padding: 2px 6px;
  margin-left: auto;
}

.wr-sidebar-close {
  display: none;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  margin-left: auto;
}

.wr-sidebar-nav {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.wr-sidebar-nav::-webkit-scrollbar {
  width: 5px;
}

.wr-sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.wr-nav-group-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.3);
  padding: 14px 10px 4px;
  text-transform: uppercase;
}

.wr-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, transform 0.1s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wr-nav-item isx-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wr-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgb(var(--vs-text));
}

.wr-nav-item.active {
  background: rgba(244, 166, 35, 0.12);
  color: #F4A623;
  font-weight: 600;
}

.wr-sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 10px;
}

.wr-admin-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(var(--vs-primary), 0.2);
  color: rgba(var(--vs-primary), 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.wr-admin-info {
  flex: 1;
  min-width: 0;
}

.wr-admin-name {
  font-size: 13px;
  font-weight: 600;
  color: rgb(var(--vs-text));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wr-admin-role {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.wr-logout-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.wr-logout-btn:hover {
  color: rgb(var(--vs-danger));
}

/* ─── Main Area & Header ──────────────────────────────────── */
#wr-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100vw;
  overflow: hidden;
}

#wr-header {
  min-height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  background: rgba(14, 14, 14, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 100;
}

.wr-hamburger {
  display: none;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  flex-shrink: 0;
}

.wr-header-breadcrumb {
  flex: 1;
  min-width: 0;
}

.wr-header-pretitle {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
}

.wr-header-title {
  font-size: 16px;
  font-weight: 700;
  color: rgb(var(--vs-text));
  line-height: 1.2;
}

/* ─── Content Scroll View ─────────────────────────────────── */
#wr-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  min-width: 0;
  padding: 24px;
  scroll-padding-bottom: 32px;
}

#wr-content > section,
.wr-page-container {
  max-width: var(--wr-content-max-width, 1280px);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}

/* ─── Mobile Backdrop ─────────────────────────────────────── */
#wr-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 199;
  backdrop-filter: blur(3px);
}

#wr-backdrop.active {
  display: block;
}

/* ─── Initial Loading Screen ──────────────────────────────── */
#wr-loading-screen {
  position: fixed;
  inset: 0;
  background: #0b0b0b;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: opacity 0.25s ease;
}

.wr-loading-title {
  font-size: 18px;
  font-weight: 700;
  color: rgb(var(--vs-text));
}

.wr-loading-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

/* ─── Access Denied & Auth Required View ─────────────────── */
#wr-access-denied {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 40px 16px;
  background: #0b0b0b;
  box-sizing: border-box;
}

.wr-auth-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 36px 28px;
  max-width: 460px;
  width: 100%;
  box-shadow: none;
  box-sizing: border-box;
}

.wr-auth-logo-wrap {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wr-auth-logo {
  height: 38px;
  width: auto;
  display: block;
}

.wr-auth-spinner-wrap {
  margin: 8px 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wr-auth-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #F4A623;
  border-radius: 50%;
  animation: wrSpin 0.8s linear infinite;
}

@keyframes wrSpin {
  to { transform: rotate(360deg); }
}

.wr-auth-title {
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 10px;
  line-height: 1.35;
}

.wr-auth-subtitle {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 24px;
  max-width: 380px;
}

.wr-auth-actions-single {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.wr-auth-main-btn-link {
  width: 100%;
  text-decoration: none;
  display: block;
  box-sizing: border-box;
}

.wr-auth-btn-primary {
  width: 100%;
  height: 48px;
  min-height: 44px;
  border-radius: 10px;
  background: #F4A623;
  color: #000000;
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  transition: background 0.2s, transform 0.1s;
}

.wr-auth-btn-primary:hover {
  background: #E09419;
}

.wr-auth-btn-primary:active {
  transform: scale(0.99);
}

.wr-auth-btn-secondary {
  width: 100%;
  height: 48px;
  min-height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  transition: background 0.2s;
}

.wr-auth-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.wr-auth-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.wr-auth-icon-info {
  background: rgba(244, 166, 35, 0.15);
  color: #F4A623;
}

.wr-auth-icon-warn {
  background: rgba(255, 186, 0, 0.15);
  color: #FFBA00;
}

.wr-auth-icon-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
}

@media (max-width: 680px) {
  #wr-access-denied {
    padding: 16px;
    min-height: calc(100vh - 56px);
  }
  .wr-auth-card {
    padding: 28px 18px;
    border-radius: 14px;
    max-width: 100%;
  }
  .wr-auth-title {
    font-size: 18px;
  }
  .wr-auth-subtitle {
    font-size: 13px;
    margin-bottom: 20px;
  }
}

/* ─── Grids & Section Headers ─────────────────────────────── */
.wr-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.wr-page-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.wr-page-header-title {
  font-size: 20px;
  font-weight: 700;
  color: rgb(var(--vs-text));
  margin: 0;
  line-height: 1.25;
}

.wr-page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ─── KPI Metrics Grid & Cards ───────────────────────────── */
.wr-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  width: 100%;
}

.wr-metric-card {
  background: var(--wr-bg-card, #141414);
  border: 1px solid var(--wr-border-card, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 90px;
  box-sizing: border-box;
  transition: background-color 0.15s ease;
}

.wr-metric-card:hover {
  background: var(--wr-bg-card-hover, #191919);
}

.wr-metric-label,
.wr-stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wr-metric-value,
.wr-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.wr-metric-sub,
.wr-stat-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 6px;
  line-height: 1.3;
}

/* ─── Standard Cards Grid ─────────────────────────────────── */
.wr-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  width: 100%;
  margin-bottom: 20px;
}

/* ─── Standard Empty State Component ──────────────────────── */
.wr-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 44px 20px;
  background: var(--wr-bg-card, #141414);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  margin: 16px 0 24px;
  width: 100%;
  box-sizing: border-box;
}

.wr-empty-state-icon {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 12px;
  opacity: 0.7;
}

.wr-empty-state-title {
  font-size: 15px;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 0 6px 0;
}

.wr-empty-state-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  max-width: 440px;
  margin: 0 0 16px 0;
  line-height: 1.45;
}

.wr-empty-state-action {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

/* ─── Standard Table Wrapper with Local Horizontal Scroll ─── */
.wr-table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--wr-bg-card, #141414);
  border: 1px solid var(--wr-border-card, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  margin-bottom: 20px;
  box-sizing: border-box;
}

/* ─── Semantic Badges ─────────────────────────────────────── */
.wr-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.wr-badge--success, .wr-badge-success {
  background: rgba(0, 192, 118, 0.14) !important;
  color: #00c076 !important;
}

.wr-badge--danger, .wr-badge-danger {
  background: rgba(255, 59, 48, 0.14) !important;
  color: #ff3b30 !important;
}

.wr-badge--warn, .wr-badge--warning, .wr-badge-warning {
  background: rgba(244, 166, 35, 0.14) !important;
  color: #f4a623 !important;
}

.wr-badge--neutral, .wr-badge-neutral {
  background: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

.wr-badge--info, .wr-badge-info {
  background: rgba(30, 144, 255, 0.14) !important;
  color: #1e90ff !important;
}

.wr-dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.wr-dash-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.wr-dash-list-item:last-child {
  border-bottom: none;
}

/* ─── Filter & Toolbar ────────────────────────────────────── */
.wr-filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.wr-filter-bar .vs-input-parent {
  flex: 1;
  min-width: 240px;
  max-width: 480px;
}

.wr-filter-bar .vs-select-content {
  width: auto !important;
  min-width: 180px;
}

.wr-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

/* ─── Responsive Desktop Table / Mobile Cards ─────────────── */
.wr-table-desktop {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.wr-mobile-cards {
  display: none;
}

.wr-m-card {
  background: rgb(var(--vs-background));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}

.wr-m-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 8px;
}

.wr-m-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 4px 0;
}

.wr-m-card-label {
  color: rgba(255, 255, 255, 0.45);
}

.wr-m-card-value {
  color: rgb(var(--vs-text));
  text-align: right;
}

.wr-m-card-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

/* ─── Utilities & Helpers ─────────────────────────────────── */
.wr-mono {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.wr-text-muted {
  color: rgba(255, 255, 255, 0.45);
}

.wr-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.wr-badge--success {
  background: rgba(var(--vs-success), 0.15);
  color: rgb(var(--vs-success));
}

.wr-badge--warn {
  background: rgba(var(--vs-warn), 0.15);
  color: rgb(var(--vs-warn));
}

.wr-badge--danger {
  background: rgba(var(--vs-danger), 0.15);
  color: rgb(var(--vs-danger));
}

.wr-badge--neutral {
  background: rgba(var(--vs-color), 0.08);
  color: rgba(var(--vs-text), 0.7);
}

.isx-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.wr-code-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  max-height: 340px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.wr-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.wr-cases-grid > *,
.wr-cases-grid .vs-card {
  min-width: 0;
}

.wr-cases-grid .vs-card {
  overflow: hidden;
}

.wr-case-badges {
  flex-wrap: wrap;
  min-height: 24px;
}

.wr-case-badges .wr-badge {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Vuesax Component Customizations & Dark Fixes ───────── */
.vs-card-content,
.vs-card {
  max-width: 100% !important;
  width: 100% !important;
}

/* Number input spinners suppression */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}
input[type=number] {
  -moz-appearance: textfield !important;
}

/* Select component */
.vs-select__label--hidden {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}
.vs-select {
  width: 100%;
}
.vs-select-content {
  max-width: 100%;
}

/* Input Visibility & Contrast System */
.vs-input,
.vs-select__input,
.wr-input,
.wr-select,
.wr-select-small,
.wr-textarea,
.wr-mono-input,
.wr-treasury-row input,
.wr-input-styled,
textarea.vs-input {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 10px !important;
  color: rgb(var(--vs-text)) !important;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease !important;
}

.vs-input:hover,
.vs-select__input:hover,
.wr-input:hover,
.wr-select:hover,
.wr-select-small:hover,
.wr-textarea:hover,
.wr-mono-input:hover,
.wr-treasury-row input:hover {
  border-color: rgba(255, 255, 255, 0.26) !important;
  background: rgba(255, 255, 255, 0.07) !important;
}

.vs-input:focus,
.vs-select__input:focus,
.wr-input:focus,
.wr-select:focus,
.wr-select-small:focus,
.wr-textarea:focus,
.wr-mono-input:focus,
.wr-treasury-row input:focus {
  border-color: rgb(var(--vs-primary)) !important;
  background: rgba(255, 255, 255, 0.09) !important;
  box-shadow: 0 0 0 3px rgba(var(--vs-primary), 0.24) !important;
  outline: none !important;
}

.vs-input:disabled,
.vs-select__input:disabled,
.wr-input:disabled,
.wr-select:disabled,
.wr-select-small:disabled,
.wr-textarea:disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
}

.vs-input::placeholder,
.vs-select__input::placeholder,
.wr-input::placeholder,
.wr-textarea::placeholder {
  color: rgba(255, 255, 255, 0.35) !important;
  font-weight: 400 !important;
}

/* ─── Vuesax Input & Icon Normalization ───────────────────────── */
.vs-input-parent {
  display: flex !important;
  align-items: stretch !important;
  width: 100% !important;
}

.vs-input-content {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  border-radius: 10px !important;
}

.vs-input,
.vs-input-content .vs-input {
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Canonical native controls. A number of legacy views use plain HTML controls
   instead of Vuesax, so they must share the exact same geometry. */
.wr-input,
.wr-select,
.wr-select-small,
.wr-textarea {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  font: inherit;
}

.wr-input,
.wr-select,
.wr-select-small {
  min-height: 44px;
  padding: 0 14px;
}

.wr-textarea {
  min-height: 96px;
  padding: 12px 14px;
  line-height: 1.45;
}

/* Icon positioning cleanly inside input, eliminate awkward black pod and transform jumps */
.vs-input__icon,
.vs-input-parent .vs-input__icon,
.vs-input-parent--state-dark .vs-input__icon,
.vs-input-parent--state-primary .vs-input__icon {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  transform: none !important;
  -webkit-transform: none !important;
  color: rgba(255, 255, 255, 0.45) !important;
  pointer-events: none !important;
  width: 38px !important;
  height: 100% !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  right: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 3 !important;
  transition: color 0.2s ease !important;
}

/* On focus or hover, keep icon inside without jumping outside or changing background */
.vs-input:focus ~ .vs-input__icon,
.vs-input-parent .vs-input:focus ~ .vs-input__icon,
.vs-input-content:hover .vs-input__icon {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  transform: none !important;
  -webkit-transform: none !important;
  color: rgb(var(--vs-primary)) !important;
}

.vs-input__icon--after,
.vs-input-parent .vs-input__icon--after {
  left: auto !important;
  right: 0 !important;
}

.vs-input:focus ~ .vs-input__icon--after {
  transform: none !important;
  -webkit-transform: none !important;
}

/* Proper padding inside input when icon is present */
.vs-input--has-icon,
.vs-input-parent .vs-input--has-icon,
.vs-input-parent--has-icon .vs-input {
  padding-left: 38px !important;
}

.vs-input--has-icon--after,
.vs-input-parent .vs-input--has-icon--after {
  padding-right: 38px !important;
}

.wr-filter-bar .vs-input {
  height: 38px !important;
  font-size: 13px !important;
  width: 100% !important;
}

/* Tabs styling */
.wr-tabs,
.wr-tabs-header {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
  padding-bottom: 2px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.wr-tabs::-webkit-scrollbar,
.wr-tabs-header::-webkit-scrollbar {
  display: none;
}
.wr-tab-btn {
  padding: 8px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex: 0 0 auto;
  white-space: nowrap;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.wr-tab-btn:hover {
  color: rgb(var(--vs-text));
}
.wr-tab-btn.active {
  color: rgb(var(--vs-primary));
  border-bottom-color: rgb(var(--vs-primary));
}

/* New algorithm: cards must not inherit the legacy edge-to-edge layout. */
#view-new-algorithm .wr-card {
  padding: 16px !important;
  box-sizing: border-box;
}

#view-wheel .wr-points-summary {
  padding: 16px !important;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  #view-new-algorithm .wr-card {
    padding: 14px !important;
  }

  #view-wheel .wr-points-summary {
    padding: 14px !important;
  }
}

/* Info Dialog Help Block */
.wr-help-block {
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 10px 14px;
}
.wr-help-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 4px;
}
.wr-help-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
}

/* Header utility buttons */
.wr-header-btn {
  min-width: 34px !important;
  height: 34px !important;
  padding: 0 10px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.75) !important;
}
.wr-header-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

.wr-page-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wr-info-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #F4A623;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.wr-info-btn:hover {
  background: rgba(244, 166, 35, 0.14);
  border-color: rgba(244, 166, 35, 0.35);
  color: #FFD36A;
  transform: translateY(-1px);
}

.wr-info-btn .isx-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.wr-info-btn .isx-icon-wrap svg path {
  fill: currentColor !important;
}

.wr-page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Dialog component */
.vs-dialog-content {
  padding-left: 12px !important;
  padding-right: 12px !important;
  padding-top: 16px !important;
  padding-bottom: 16px !important;
}

.vs-dialog {
  min-width: 0 !important;
  width: min(720px, calc(100vw - 24px)) !important;
  max-width: 720px !important;
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
  margin: auto !important;
  box-sizing: border-box !important;
  background: var(--wr-bg-card, #141414) !important;
  border: 1px solid var(--wr-border-card, rgba(255, 255, 255, 0.08)) !important;
  border-radius: 12px !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6) !important;
}

.vs-dialog.wr-dialog--info {
  max-width: 760px !important;
  width: min(760px, calc(100vw - 24px)) !important;
}

.vs-dialog.wr-dialog--large,
.vs-dialog.wr-dialog--editor,
.vs-dialog.wr-user-dialog,
.vs-dialog.wr-case-editor-dialog {
  max-width: 960px !important;
  width: min(960px, calc(100vw - 24px)) !important;
}

.wr-form-card {
  max-width: 720px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.vs-dialog__content {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  max-height: calc(90vh - 120px) !important;
  padding: 14px 16px !important;
  box-sizing: border-box !important;
}

.vs-dialog__header {
  padding: 16px 18px 8px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #FFFFFF !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.vs-dialog__close {
  min-width: 36px !important;
  min-height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  top: 10px !important;
  right: 10px !important;
  border-radius: 8px !important;
}

/* ─── Form Inputs & Labels Standards ────────────────────────── */
.wr-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  width: 100%;
  margin-bottom: 16px;
}

.wr-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin-bottom: 14px;
}

.wr-form-label,
.wr-field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
  letter-spacing: 0.2px;
}

textarea.vs-input,
textarea.wr-input,
textarea {
  width: 100% !important;
  box-sizing: border-box !important;
  resize: vertical;
  min-height: 80px;
}

/* Monospace & Treasury inputs */
.wr-treasury-row,
.wr-mono-copy-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.wr-treasury-row input,
.wr-mono-copy-row input,
input.wr-mono {
  min-width: 0;
  flex: 1;
}

.wr-dialog-actions-row {
  display: flex;
  gap: 10px;
}
.wr-dialog-actions-row .vs-button {
  flex: 1;
}

.wr-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .vs-dialog__footer,
  .wr-dialog-footer,
  .wr-dialog-actions-row,
  .wr-dialog-actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
  }
  .vs-dialog__footer .vs-button,
  .wr-dialog-footer .vs-button,
  .wr-dialog-actions-row .vs-button,
  .wr-dialog-actions .vs-button {
    width: 100% !important;
    margin: 0 !important;
    min-height: 42px !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
  }
}

/* ─── Responsive Breakpoints ──────────────────────────────── */
@media (max-width: 1024px) {
  .wr-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .wr-dash-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  html,
  body,
  #wr-app,
  #wr-main,
  #wr-content {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  #wr-content > section,
  #wr-content .wr-card,
  #wr-content .vs-card,
  #wr-content .vs-card-content,
  #wr-content .vs-card__text,
  #wr-content .wr-filter-bar,
  #wr-content .wr-mobile-cards {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #wr-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    z-index: 300;
  }

  #wr-sidebar.open {
    transform: translateX(0);
  }

  .wr-sidebar-close {
    display: flex;
  }

  .wr-hamburger {
    display: flex;
  }

  #wr-content {
    padding: 14px 12px;
  }

  .wr-page-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 16px;
  }

  .wr-page-title-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .wr-page-header-title {
    font-size: 18px;
    line-height: 1.3;
    word-break: break-word;
    margin: 0;
  }

  .wr-page-actions {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .wr-page-actions .vs-button,
  .wr-page-actions .wr-header-btn {
    flex: 1 1 auto;
    min-height: 38px;
    justify-content: center;
  }

  .wr-filter-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    margin-bottom: 16px;
  }

  .wr-filter-bar .vs-input-parent,
  .wr-filter-bar .vs-select-content,
  .wr-filter-bar .vs-button {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  .wr-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .wr-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .wr-dash-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .wr-table-desktop {
    display: none;
  }

  .wr-mobile-cards {
    display: block;
  }

  .wr-treasury-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .wr-treasury-row input {
    width: 100%;
  }

  .wr-treasury-row .vs-button {
    width: 100% !important;
    margin: 0 !important;
  }
}

@media (max-width: 360px) {
  .wr-metrics-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Collapsible Nav Groups ──────────────────────────────── */
.wr-nav-group {
  margin-bottom: 6px;
}

.wr-nav-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 4px;
  cursor: pointer;
  user-select: none;
  border-radius: 6px;
  transition: background 0.15s;
}

.wr-nav-group-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.wr-nav-group-chevron {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  transition: transform 0.2s ease;
  transform: rotate(0deg);
}

.wr-nav-group-chevron.collapsed {
  transform: rotate(-90deg);
}

.wr-nav-group-items {
  display: flex;
  flex-direction: column;
}

.wr-nav-badge-dev {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.45);
  margin-left: auto;
}

.wr-nav-item.wr-nav-item--disabled {
  opacity: 0.7;
}

/* ─── Standard 10px border radius for inputs and buttons ──── */
.vs-button,
.vs-button__content,
.vs-input,
.vs-select__input,
.vs-dialog,
.wr-card,
.vs-card,
.wr-btn,
.wr-header-btn,
button.wr-header-btn,
select,
textarea,
input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="search"] {
  border-radius: 10px !important;
}

/* ─── WinRoll operations polish & accessibility ───────────── */
html {
  color-scheme: dark;
  background: #0B0B0B;
}

button,
a,
input,
select,
textarea,
[role="button"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(244, 166, 35, 0.12);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid #F4A623 !important;
  outline-offset: 2px;
}

.wr-card,
.vs-card,
.vs-dialog,
.wr-m-card {
  background: #121212 !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

/* Cards without an explicit component padding still need a content gutter. */
.wr-card {
  padding: 16px;
  box-sizing: border-box;
}

/* Desktop data tables use one continuous surface instead of floating rows. */
.wr-table-desktop,
.wr-table-wrapper {
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  box-sizing: border-box;
}

.wr-table-desktop .vs-table,
.wr-table-desktop .vs-table-content,
.wr-table-wrapper .vs-table,
.wr-table-wrapper .vs-table-content {
  background: transparent !important;
}

.wr-table-desktop .vs-table__tr:not(:last-child),
.wr-table-wrapper .vs-table__tr:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.wr-table-desktop .vs-table__td,
.wr-table-wrapper .vs-table__td {
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}

/* Do not draw a second card around a table already living in a card. */
.wr-card > .wr-table-desktop,
.wr-card > .wr-table-wrapper {
  background: transparent;
  border: 0;
  border-radius: 0;
}

/* Numbered operation forms share the same compact visual language. */
.wr-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(244, 166, 35, 0.14);
  color: #F4A623;
  border: 1px solid rgba(244, 166, 35, 0.28);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

#view-drop-transfer .wr-card {
  padding: 18px;
}

#view-drop-transfer .wr-card:last-child {
  background: transparent !important;
  border: 0 !important;
  padding: 0;
}

#view-drop-transfer .wr-input {
  width: 100%;
  box-sizing: border-box;
}

.wr-subcard,
.wr-inner-panel,
.wr-filter-bar,
.wr-tabs-header {
  background: #191919 !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 10px !important;
}

.wr-stat-value,
.wr-m-card-value,
.vs-table td {
  font-variant-numeric: tabular-nums;
}

.wr-table-desktop {
  border-radius: 10px;
  overscroll-behavior: contain;
}

.wr-table-desktop table,
.vs-table table {
  min-width: 720px;
}

.wr-nav-item:active,
.wr-hamburger:active,
.wr-sidebar-close:active,
.wr-logout-btn:active {
  transform: scale(0.97);
}

.wr-hamburger,
.wr-sidebar-close,
.wr-logout-btn {
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
}

.wr-nav-group-header {
  min-height: 44px;
}

.vs-input,
.vs-select__input,
.vs-button {
  min-height: 44px;
}

@media (max-width: 768px) {
  .wr-card {
    padding: 14px;
  }

  #view-drop-transfer .wr-card {
    padding: 14px;
  }

  #view-drop-transfer .wr-card:last-child {
    padding: 0;
  }
  #wr-sidebar {
    width: min(86vw, 320px);
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.48);
  }

  #wr-header {
    min-height: calc(58px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 12px 0;
    gap: 10px;
  }

  .wr-header-pretitle {
    display: none;
  }

  .wr-header-title {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #wr-content {
    padding: 12px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .wr-page-header {
    padding: 2px 0 0;
  }

  .wr-page-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .wr-page-actions .vs-button,
  .wr-page-actions > button {
    width: 100% !important;
    min-height: 44px !important;
    margin: 0 !important;
  }

  .wr-header-btn {
    min-width: 44px !important;
    min-height: 44px !important;
    height: 44px !important;
  }

  .wr-sidebar-close,
  .wr-logout-btn,
  .wr-hamburger {
    min-width: 44px !important;
    min-height: 44px !important;
  }

  .vs-button {
    min-height: 44px !important;
    min-width: 44px !important;
  }

  .wr-tab-btn,
  .wr-info-btn,
  .wr-filter-btn,
  #view-case-content .wr-page-title-wrap a {
    min-height: 44px !important;
    min-width: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .vs-input,
  .vs-select__input,
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    min-height: 44px !important;
  }

  .wr-m-card {
    padding: 12px;
    border-radius: 10px;
  }

  .wr-table-desktop {
    display: none !important;
    width: 0 !important;
    max-width: 0 !important;
    overflow: hidden !important;
  }

  .wr-table-desktop table,
  .wr-table-desktop .vs-table,
  .wr-table-desktop .vs-table-content {
    min-width: 0 !important;
    width: 0 !important;
  }

  .wr-m-card-row {
    min-width: 0;
    gap: 12px;
  }

  .wr-m-card-label,
  .wr-m-card-value {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .wr-pagination {
    justify-content: space-between;
    width: 100%;
  }

  .vs-dialog-content {
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 8px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .vs-dialog,
  .vs-dialog-enter-active .vs-dialog {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 24px) !important;
    margin: auto !important;
    padding: 0 !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
    animation: none !important;
    -webkit-animation: none !important;
    transform: none !important;
    overflow: hidden !important;
  }

  .vs-dialog__header {
    flex-shrink: 0 !important;
    padding: 14px 16px 10px !important;
    box-sizing: border-box !important;
  }

  .vs-dialog__content {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    max-height: calc(100dvh - 130px) !important;
    padding: 12px 14px !important;
    box-sizing: border-box !important;
  }

  .vs-dialog__footer {
    flex-shrink: 0 !important;
    padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box !important;
  }

  .vs-dialog__close {
    top: 8px !important;
    right: 8px !important;
  }

  .vs-dialog input,
  .vs-dialog select,
  .vs-dialog textarea,
  .vs-dialog .vs-input,
  .vs-dialog .vs-input-parent,
  .vs-dialog .vs-select,
  .vs-dialog .vs-select__input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   WINROLL HOME.JPG VISUAL REFERENCE STYLES
   Authoritative design reproduction for Dashboard & Header
   ═══════════════════════════════════════════════════════════════ */

/* ─── Header Home.jpg Layout ─── */
#wr-header {
  min-height: 60px;
  padding: max(10px, env(safe-area-inset-top, 10px)) 16px 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0B0B0B;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
  width: 100%;
}

.wr-brand-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wr-brand-title {
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.3px;
}

.wr-badge-admin {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  background: #202023;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2px 8px;
  letter-spacing: 0.5px;
}

.wr-header-right {
  display: flex;
  align-items: center;
}

.wr-menu-pill-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  background: #202023;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 6px 14px;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.wr-menu-pill-btn:hover {
  background: #2A2A2E;
  border-color: rgba(255, 255, 255, 0.2);
}

.wr-menu-burger-lines {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 14px;
  height: 10px;
}

.wr-menu-burger-lines span {
  display: block;
  width: 100%;
  height: 2px;
  background: #FFFFFF;
  border-radius: 1px;
}

.wr-menu-pill-text {
  line-height: 1;
}

/* ─── Dashboard View Overall Container ─── */
.wr-dashboard-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 0 40px 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.wr-dash-card {
  background: #191919;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 16px;
  box-sizing: border-box;
  width: 100%;
}

.wr-dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.wr-dash-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
}

.wr-dash-card-subtitle {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 3px;
}

.wr-dash-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.wr-dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wr-dash-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
}

/* ─── Quick Actions ─── */
.wr-quick-actions-list {
  display: flex;
  flex-direction: column;
}

.wr-quick-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  min-height: 54px;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.wr-quick-action-row:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.wr-quick-action-row:first-child {
  padding-top: 2px;
}

.wr-quick-action-info {
  flex: 1;
  min-width: 0;
}

.wr-quick-action-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #FFFFFF;
}

.wr-quick-action-desc {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}

/* iOS-Style Switch Toggle with >= 44x44px Touch Target */
.wr-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
  cursor: pointer;
  box-sizing: border-box;
}

.wr-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.wr-switch-slider {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  right: 0;
  background-color: #333336;
  border-radius: 26px;
  transition: background-color 0.25s;
}

.wr-switch-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: #FFFFFF;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.wr-switch input:checked + .wr-switch-slider {
  background-color: #F4A623;
}

.wr-switch input:checked + .wr-switch-slider:before {
  transform: translateX(18px);
}

.wr-switch.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.wr-quick-action-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  min-width: 44px;
}

.wr-quick-action-status {
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1;
  user-select: none;
}

.wr-status-saving {
  color: #F4A623;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.wr-status-saved {
  color: #28C76F;
}

.wr-status-error {
  color: #FF4343;
}

.wr-spinner-inline {
  width: 10px;
  height: 10px;
  border: 2px solid rgba(244, 166, 35, 0.3);
  border-top-color: #F4A623;
  border-radius: 50%;
  animation: wr-spin 0.6s linear infinite;
  display: inline-block;
}

@keyframes wr-spin {
  to { transform: rotate(360deg); }
}

/* ─── KPI Grid (Fluid Adaptive & Mobile 1 Column) ─── */
.wr-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .wr-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (max-width: 540px) {
  .wr-kpi-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    min-width: 0;
  }
}

.wr-kpi-card {
  background: #191919;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 104px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.wr-kpi-card--span2 {
  grid-column: span 2;
}

@media (max-width: 540px) {
  .wr-kpi-card--span2 {
    grid-column: span 1;
  }
}

@media (min-width: 900px) {
  .wr-kpi-card--span2 {
    grid-column: auto;
  }
}

.wr-kpi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.wr-kpi-title {
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.wr-kpi-icon {
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
  display: flex;
}

.wr-kpi-value {
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
  margin: 6px 0;
  word-break: break-word;
  min-width: 0;
}

.wr-kpi-unit {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
}

.wr-kpi-sub-pill {
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 6px;
  padding: 3px 6px;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
  min-width: 0;
}

.wr-kpi-sub-muted {
  background: #202023;
  color: rgba(255, 255, 255, 0.55);
}

.wr-kpi-sub-active {
  background: rgba(40, 199, 111, 0.12);
  color: #28C76F;
}

.wr-kpi-sub-blue {
  background: rgba(244, 166, 35, 0.12);
  color: #F4A623;
}

.wr-kpi-note {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.4);
  word-break: break-word;
  min-width: 0;
}

/* ─── 7-Day Charts Stack ─── */
.wr-charts-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.wr-chart-card {
  background: #191919;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 16px;
  box-sizing: border-box;
  width: 100%;
}

.wr-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.wr-chart-title {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
}

.wr-chart-total {
  font-size: 20px;
  font-weight: 700;
  margin-top: 4px;
}

.wr-gold-text { color: #F4A623; }
.wr-red-text { color: #FF4343; }
.wr-green-text { color: #28C76F; }

.wr-chart-badge {
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 6px;
  padding: 3px 8px;
}

.wr-badge-gold {
  background: rgba(244, 166, 35, 0.12);
  color: #F4A623;
}

.wr-badge-red {
  background: rgba(255, 67, 67, 0.12);
  color: #FF4343;
}

.wr-badge-green {
  background: rgba(40, 199, 111, 0.12);
  color: #28C76F;
}

.wr-chart-svg-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.wr-chart-svg {
  width: 100%;
  height: 90px;
  overflow: visible;
}

.wr-chart-point {
  cursor: pointer;
  transition: r 0.15s, stroke-width 0.15s;
}

.wr-chart-point:hover {
  r: 6;
  stroke-width: 3;
}

.wr-chart-x-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  padding: 0 4px;
}

.wr-chart-x-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  font-family: inherit;
}

/* Floating Chart Tooltip */
.wr-chart-floating-tooltip {
  position: absolute;
  z-index: 9999;
  background: #202023;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px 10px;
  pointer-events: none;
  transform: translate(-50%, -100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.wr-tt-header {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wr-tt-val {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
}

.wr-tt-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
}

/* ─── Top Locales ─── */
.wr-locales-list {
  display: flex;
  flex-direction: column;
  max-height: 480px;
  overflow-y: auto;
}

.wr-locale-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.wr-locale-row:last-child {
  border-bottom: none;
}

.wr-locale-rank {
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  width: 24px;
  flex-shrink: 0;
}

.wr-locale-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wr-locale-flag {
  font-size: 16px;
  line-height: 1;
}

.wr-locale-name {
  font-size: 12.5px;
  font-weight: 500;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wr-locale-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.wr-locale-bar-wrap {
  width: 60px;
  height: 5px;
  background: #202023;
  border-radius: 3px;
  overflow: hidden;
}

.wr-locale-bar {
  height: 100%;
  background: #F4A623;
  border-radius: 3px;
}

.wr-locale-numbers {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 48px;
}

.wr-locale-count {
  font-size: 11.5px;
  font-weight: 600;
  color: #FFFFFF;
}

.wr-locale-percent {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
}

/* ─── Recent Deposits Card ─── */
.wr-card-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #202023;
  border-radius: 8px;
  padding: 2px 6px;
}

.wr-pagination-btn {
  background: none;
  border: none;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.wr-pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.wr-pagination-info {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
}

.wr-deposits-list {
  display: flex;
  flex-direction: column;
}

.wr-deposit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.wr-deposit-row:last-child {
  border-bottom: none;
}

.wr-deposit-left {
  flex: 1;
  min-width: 0;
}

.wr-deposit-user {
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wr-deposit-date {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}

.wr-deposit-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.wr-deposit-amount {
  font-size: 13px;
  font-weight: 700;
  color: #28C76F;
}

.wr-deposit-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wr-btn-detail {
  background: #202023;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10.5px;
  font-weight: 500;
  padding: 2px 7px;
  cursor: pointer;
  transition: background 0.15s;
}

.wr-btn-detail:hover {
  background: #2A2A2E;
  color: #FFFFFF;
}

/* ─── Mobile-first operational forms and case editor ─────── */
.wr-form-page {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.wr-form-card,
.wr-case-summary,
.wr-case-content-panel {
  padding: 16px;
}

.wr-form-card,
.wr-dialog-form,
.wr-form-card *,
.wr-dialog-form * {
  box-sizing: border-box;
}

.wr-label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.78);
}

.wr-textarea,
.wr-select,
.wr-select-small {
  display: block;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: #191919;
  color: #fff;
  font: inherit;
}

.wr-textarea {
  min-height: 92px;
  padding: 12px 14px;
  resize: vertical;
}

.wr-select,
.wr-select-small {
  min-height: 42px;
  padding: 0 12px;
}

.wr-dialog-form {
  width: 100%;
  padding: 6px 0 2px;
}

.wr-dialog-form .vs-input-parent,
.wr-dialog-form .vs-input,
.wr-form-card .vs-input-parent,
.wr-form-card .vs-input {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

.wr-responsive-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.wr-responsive-form-grid--compact {
  gap: 12px;
  margin-bottom: 14px;
}

.wr-search-action-row,
.wr-dialog-actions,
.wr-case-summary-buttons {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.wr-search-action-row .vs-button,
.wr-dialog-actions .vs-button,
.wr-case-summary-buttons .vs-button {
  width: 100% !important;
  margin: 0 !important;
}

.wr-case-content-header,
.wr-case-content-actions {
  align-items: stretch;
}

.wr-case-content-actions,
.wr-case-content-actions > * {
  width: 100%;
}

.wr-case-summary {
  margin-bottom: 16px;
}

.wr-case-summary-layout,
.wr-case-summary-main,
.wr-case-summary-metrics,
.wr-case-summary-title,
.wr-case-panel-heading {
  display: flex;
}

.wr-case-summary-layout,
.wr-case-summary-metrics {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.wr-case-summary-main {
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.wr-case-summary-main > div {
  min-width: 0;
}

.wr-case-summary-title {
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 5px;
}

.wr-case-summary-metrics .wr-metric-pill {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #191919;
}

.wr-case-content-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.wr-case-panel-heading {
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 14px;
}

.wr-draft-item,
.wr-available-gift {
  display: grid;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border-radius: 10px;
  border: 0;
  background: #191919;
}

.wr-draft-item {
  grid-template-columns: 34px 44px minmax(0, 1fr) 42px;
}

.wr-draft-weight {
  grid-column: 2 / -1;
  width: 100%;
}

.wr-draft-weight input {
  min-height: 40px;
}

.wr-available-gift {
  grid-template-columns: 38px minmax(0, 1fr);
}

.wr-available-gift .vs-button {
  grid-column: 1 / -1;
  width: 100% !important;
  margin: 0 !important;
}

@media (min-width: 600px) {
  .wr-form-card,
  .wr-case-summary,
  .wr-case-content-panel {
    padding: 20px;
  }

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

  .wr-search-action-row,
  .wr-dialog-actions,
  .wr-case-summary-buttons {
    flex-direction: row;
    align-items: center;
  }

  .wr-search-action-row .vs-button,
  .wr-dialog-actions .vs-button,
  .wr-case-summary-buttons .vs-button {
    width: auto !important;
  }

  .wr-dialog-actions {
    justify-content: flex-end;
  }

  .wr-draft-item {
    grid-template-columns: 34px 44px minmax(0, 1fr) 96px 38px;
  }

  .wr-draft-weight {
    grid-column: auto;
  }

  .wr-available-gift {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .wr-available-gift .vs-button {
    grid-column: auto;
    width: auto !important;
  }
}

@media (min-width: 960px) {
  .wr-case-content-actions,
  .wr-case-content-actions > * {
    width: auto;
  }

  .wr-case-summary-layout,
  .wr-case-summary-metrics {
    flex-direction: row;
    align-items: center;
  }

  .wr-case-summary-layout {
    justify-content: space-between;
  }

  .wr-case-content-workspace {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 20px;
  }
}

/* Touch target hardening for notification close */
.vs-notification__close {
  min-width: 44px !important;
  min-height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ─── Compact Toast Notification (max-width 360px) ────────── */
.vs-notification {
  max-width: 360px !important;
  min-width: 280px !important;
  background: #181818 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-left: 4px solid #F4A623 !important;
  border-radius: 10px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5) !important;
  padding: 12px 14px !important;
  box-sizing: border-box !important;
}

.vs-notification--danger {
  border-left-color: #FF4343 !important;
}

.vs-notification--success {
  border-left-color: #28C76F !important;
}

.vs-notification--warn {
  border-left-color: #F4A623 !important;
}

.vs-notification--primary {
  border-left-color: #388AF6 !important;
}

.vs-notification__title {
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: #FFFFFF !important;
  margin: 0 0 4px 0 !important;
}

.vs-notification__text {
  font-size: 12px !important;
  color: rgba(255, 255, 255, 0.75) !important;
  line-height: 1.4 !important;
  margin: 0 !important;
}

/* ─── Bank view: compact operational layout ───────────────── */
#view-bank {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.wr-bank-section {
  padding: 20px;
  margin-bottom: 20px;
}

.wr-bank-section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.wr-bank-section__title {
  margin: 0;
  color: #f5f5f5;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
}

.wr-bank-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.wr-bank-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.wr-bank-field .wr-field-label {
  display: flex;
  min-height: 36px;
  margin: 0;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: center;
  gap: 6px;
  line-height: 1.35;
}

.wr-bank-field .wr-badge {
  margin: 0 !important;
  padding: 2px 6px !important;
  font-size: 9px !important;
}

.wr-bank-switch-row {
  display: flex;
  min-height: 44px;
  padding: 0 12px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: #191919;
}

.wr-bank-switch-row > span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.wr-bank-reason {
  margin-top: 18px;
}

.wr-bank-actions {
  display: flex;
  margin-top: 16px;
  align-items: center;
  gap: 12px;
}

.wr-bank-diff {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 2px solid #f4a623;
  border-radius: 0 10px 10px 0;
  background: rgba(244, 166, 35, 0.06);
}

.wr-bank-readonly-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.wr-bank-readonly-item {
  min-width: 0;
  padding: 12px 14px;
  background: #191919;
}

.wr-bank-readonly-label {
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  line-height: 1.35;
}

.wr-bank-readonly-value {
  color: #f5f5f5;
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.wr-bank-history {
  padding: 0;
  overflow: hidden;
}

.wr-bank-history > .wr-bank-section__header {
  padding: 18px 20px 0;
}

.wr-bank-history .wr-table-wrapper {
  border: 0;
  border-radius: 0;
}

@media (max-width: 960px) {
  .wr-bank-form-grid,
  .wr-bank-readonly-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 599px) {
  .wr-bank-section {
    padding: 16px;
    margin-bottom: 14px;
  }

  .wr-bank-section__header {
    flex-direction: column;
    margin-bottom: 14px;
  }

  .wr-bank-form-grid,
  .wr-bank-readonly-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .wr-bank-field .wr-field-label {
    min-height: 0;
  }

  .wr-bank-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .wr-bank-actions .vs-button {
    width: 100% !important;
    margin: 0 !important;
  }

  .wr-bank-history {
    padding: 16px;
  }

  .wr-bank-history > .wr-bank-section__header {
    padding: 0;
  }
}

/* ─── Admin shell regression guard (2026-11-11) ────────────
   Keep these rules last: they normalize shared controls and page headers
   after view-specific legacy styles. */
.wr-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wr-page-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.wr-page-pretitle {
  display: block;
  margin: 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.wr-page-title {
  display: block;
  margin: 0;
  color: #fff;
  font-size: 24px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.3px;
}

/* The sidebar is permanently visible on desktop, so a duplicate Menu
   trigger only belongs to the compact/mobile shell. */
.wr-menu-pill-btn.wr-hamburger {
  display: none !important;
}

.wr-nav-item > isx-icon,
.wr-nav-item > svg,
.wr-nav-item > i {
  display: inline-flex;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  overflow: visible;
  align-items: center;
  justify-content: center;
}

/* Vuesax uses the page background variable for the switch thumb. In the
   dark theme that made both the track and thumb almost black. */
.vs-switch {
  min-width: 48px !important;
  width: 48px !important;
  height: 28px !important;
  padding: 4px !important;
  background: #303034 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: none !important;
}

.vs-switch__circle {
  top: 3px !important;
  left: 3px !important;
  width: 20px !important;
  height: 20px !important;
  background: #fff !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35) !important;
}

.vs-switch__input:checked ~ .vs-switch__background {
  background: #f4a623 !important;
}

.vs-switch__input:checked ~ .vs-switch__circle {
  left: calc(100% - 23px) !important;
  background: #fff !important;
}

@media (max-width: 768px) {
  .wr-menu-pill-btn.wr-hamburger {
    display: inline-flex !important;
  }

  .wr-page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .wr-page-title-wrap {
    width: 100%;
  }

  .wr-page-title {
    font-size: 20px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   COMPREHENSIVE RESPONSIVE MOBILE MODAL & DIALOG UI
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .vs-dialog-content {
    padding: 8px 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .vs-dialog,
  .vs-dialog.not-center,
  .vs-dialog[style*="width"] {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    min-width: 0 !important;
    margin: auto !important;
    max-height: 90vh !important;
    max-height: 90dvh !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
  }
  .vs-dialog__header {
    padding: 14px 16px 10px !important;
    flex-shrink: 0 !important;
  }
  .vs-dialog__header h4,
  .vs-dialog__header .wr-modal-title {
    font-size: 15px !important;
    line-height: 1.3 !important;
  }
  .vs-dialog__content {
    padding: 12px 14px !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: calc(90dvh - 120px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
  }
  .vs-dialog__footer {
    padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    flex-shrink: 0 !important;
  }
  .vs-dialog__footer > div {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
    justify-content: flex-end !important;
  }
  .vs-dialog__footer .vs-button {
    flex: 1 1 auto !important;
    min-width: 110px !important;
    margin: 0 !important;
  }
  .vs-dialog input,
  .vs-dialog select,
  .vs-dialog textarea {
    font-size: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .vs-dialog [style*="display: flex"][style*="gap:"] {
    flex-wrap: wrap !important;
  }
  .vs-dialog .wr-grid-2col,
  .vs-dialog [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}
