:root {
  /* Private Banking Treasury Palette — Nero Verde Marble + Burnished Brass + Banker's Lamp Emerald */
  --bg-chassis: #050706;
  --bg-well: #080b09;
  --bg-surface: #0c100e;
  --bg-elevated: #131916;
  --bg-hover: rgba(197, 160, 89, 0.045);

  --border-subtle: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(197, 160, 89, 0.28);
  --border-brass: rgba(197, 160, 89, 0.45);

  --paper-voucher: #efe6d5;
  --paper-border: #d5c6ad;
  --paper-ink: #16120c;
  --paper-muted: #5b4e3c;

  --brass: #c5a059;
  --brass-bright: #e3c687;
  --brass-soft: rgba(197, 160, 89, 0.13);

  --jade: #34d399;
  --jade-deep: #1b6842;
  --jade-soft: rgba(52, 211, 153, 0.13);

  --amber: #e0af55;
  --amber-soft: rgba(224, 175, 85, 0.14);
  --coral: #e05a54;
  --coral-soft: rgba(224, 90, 84, 0.14);

  --text-primary: #f2efe9;
  --text-secondary: #a8a399;
  --text-muted: #6c685f;

  --font-serif: 'Cinzel', Georgia, serif;
  --font-editorial: 'Cormorant Garamond', Georgia, serif;
  --font-display: 'Space Grotesk', 'Segoe UI Variable Display', system-ui, sans-serif;
  --font-body: 'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg-chassis);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.48;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: #050706;
}

::-webkit-scrollbar-thumb {
  background: rgba(197, 160, 89, 0.22);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(197, 160, 89, 0.42);
}

[hidden] {
  display: none !important;
}

button,
input,
select {
  font-family: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 1.5px solid var(--brass);
  outline-offset: 2px;
}

/* ================= IMMERSIVE CLIPBOARD SCENE LOGIN ================= */
.auth-viewport-root {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background-color: #020503;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  z-index: 40;
}

.auth-scene {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  transform-origin: center center;
  overflow: hidden;
  pointer-events: auto;
  box-sizing: border-box;
  will-change: transform;
}

.auth-scene-image {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  object-fit: fill;
  display: block;
  pointer-events: none;
  user-select: none;
}

.clipboard-overlay {
  position: absolute;
  left: 636px;
  top: 312px;
  width: 648px;
  height: 672px;
  display: flex;
  flex-direction: column;
  padding: 48px 38px 36px 38px;
  pointer-events: auto;
  color: #1f1a14;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  box-sizing: border-box;
}

.paper-inner-pane {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.paper-inner-pane::-webkit-scrollbar {
  width: 4px;
}
.paper-inner-pane::-webkit-scrollbar-track {
  background: rgba(48, 40, 29, 0.08);
  border-radius: 2px;
}
.paper-inner-pane::-webkit-scrollbar-thumb {
  background: rgba(48, 40, 29, 0.25);
  border-radius: 2px;
}

.doc-header {
  text-align: center;
  margin-bottom: 18px;
  flex-shrink: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 4px 0 8px 0;
}

.doc-logo {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  letter-spacing: 0.24em;
  font-weight: 700;
  color: #14100b;
  text-transform: uppercase;
}

.doc-mode-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}

.doc-mode-tab {
  background: transparent;
  border: none;
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  letter-spacing: 0.24em;
  color: #14100b;
  text-transform: uppercase;
  font-weight: 700;
  font-style: italic;
  padding: 2px 4px;
}

.doc-divider {
  width: 55%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(60, 48, 34, 0.38), transparent);
  margin: 10px auto 0 auto;
}

.doc-confidential-notice {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: #6b2723;
  background: rgba(125, 52, 47, 0.09);
  border-left: 2.5px solid #8a2b2b;
  padding: 7px 10px;
  border-radius: 0 2px 2px 0;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.35;
  flex-shrink: 0;
}

.doc-form-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 2px;
}

.doc-field {
  display: flex;
  flex-direction: column;
}

.doc-label {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #352b1e;
  font-weight: 700;
  margin-bottom: 6px;
  transition: color 0.15s ease;
}

.doc-field:focus-within .doc-label {
  color: #14100b;
}

.doc-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.doc-input {
  width: 100%;
  background: transparent !important;
  border: none !important;
  border-bottom: 1.5px solid rgba(65, 48, 30, 0.45) !important;
  border-radius: 0 !important;
  padding: 8px 36px 6px 2px !important;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #14100b !important;
  font-weight: 500;
  letter-spacing: 0.02em;
  caret-color: #14100b;
  outline: none !important;
  box-shadow: none !important;
  transition: border-bottom-color 0.2s ease;
}

.doc-input::placeholder {
  color: rgba(75, 60, 44, 0.5) !important;
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
  font-size: 16.5px;
}

.doc-input:focus {
  background: transparent !important;
  border-bottom: 2px solid #14100b !important;
  box-shadow: none !important;
  outline: none !important;
}

.doc-input:-webkit-autofill,
.doc-input:-webkit-autofill:hover,
.doc-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #dcc5a6 inset !important;
  -webkit-text-fill-color: #14100b !important;
  transition: background-color 5000s ease-in-out 0s;
}

.doc-toggle-pwd-btn {
  position: absolute;
  right: 4px;
  bottom: 8px;
  background: transparent;
  border: none;
  color: #6e604e;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.doc-toggle-pwd-btn:hover {
  color: #14100b;
}

.doc-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.doc-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #2e251a;
  cursor: pointer;
  font-weight: 600;
  user-select: none;
}

.doc-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(75, 60, 42, 0.6);
  border-radius: 2px;
  background: rgba(228, 215, 192, 0.6);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.doc-checkbox:hover {
  border-color: #14100b;
}

.doc-checkbox:checked {
  background: #1a4d2e;
  border-color: #1a4d2e;
}

.doc-checkbox:checked::after {
  content: '';
  width: 8px;
  height: 8px;
  background: #ede2cf;
  clip-path: polygon(14% 44%, 0 60%, 40% 100%, 100% 18%, 82% 0%, 36% 66%);
}

.doc-signature-caption {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14.5px;
  letter-spacing: 0.08em;
  color: #554838;
}

.doc-signature-caption.is-verified {
  color: #1a4d2e;
  font-weight: 600;
}

.doc-turnstile-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 0;
}

.doc-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1.5px solid rgba(60, 48, 34, 0.38);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  flex-shrink: 0;
}

.doc-footer::before {
  content: '';
  position: absolute;
  top: -1.5px;
  left: 0;
  width: 0;
  height: 2px;
  background: #14110c;
  transition: width 0.3s ease;
}

.doc-footer:hover::before {
  width: 100%;
}

.doc-action-btn {
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #14110c;
  transition: color 0.2s ease;
}

.doc-action-btn:hover:not(:disabled) {
  color: #113b22;
}

.doc-action-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.doc-action-btn .btn-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
  width: 18px;
  height: 18px;
}

.doc-action-btn:hover:not(:disabled) .btn-arrow {
  transform: translateX(4px);
}

@media (max-width: 1023px) {
  .auth-viewport-root,
  .auth-viewport-mobile {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: max(env(safe-area-inset-top, 0px), 20px) 16px max(env(safe-area-inset-bottom, 0px), 24px) 16px;
    background: #030504;
    user-select: auto;
  }

  .auth-scene-image {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    opacity: 0.18;
    filter: blur(8px);
    pointer-events: none;
    transform: none;
  }

  .auth-scene,
  .auth-scene-mobile {
    position: relative;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100%;
    max-width: 410px;
    height: auto;
    margin: auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
  }

  .clipboard-overlay {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 410px;
    height: auto;
    padding: 32px 22px 26px 22px;
    background: linear-gradient(180deg, #e5d6be 0%, #ddceb5 100%);
    border: 1px solid rgba(80, 60, 40, 0.35);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 20px 40px -4px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  }

  .clipboard-overlay::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 76px;
    height: 18px;
    background: linear-gradient(180deg, #c5a059 0%, #8c6828 100%);
    border-radius: 4px 4px 2px 2px;
    border: 1px solid rgba(60, 45, 20, 0.5);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 240, 180, 0.6);
    z-index: 10;
  }

  .paper-inner-pane {
    height: auto;
    overflow: visible;
    padding-right: 0;
  }

  .doc-header {
    margin-bottom: 18px;
  }

  .doc-logo {
    font-size: 19px;
    letter-spacing: 0.18em;
  }

  .doc-form-body {
    gap: 18px;
  }

  .doc-input {
    font-size: 16px !important;
    padding: 10px 36px 8px 2px !important;
  }

  .doc-footer {
    margin-top: 22px;
    padding-top: 14px;
  }

  .doc-action-btn {
    min-height: 48px;
    font-size: 15px;
    letter-spacing: 0.18em;
  }
}

/* ================= PRIVATE TREASURY SHELL & VAULT HEADER ================= */
.workspace-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 68% 42% at 22% -6%, rgba(24, 92, 56, 0.16), transparent 65%),
    radial-gradient(ellipse 52% 36% at 82% -4%, rgba(197, 160, 89, 0.08), transparent 60%),
    linear-gradient(180deg, #070a08 0%, #050706 100%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 28px;
  background: rgba(7, 10, 8, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(197, 160, 89, 0.18);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  flex-wrap: wrap;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
}

.topbar-logo {
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.brand-titles {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.topbar-brand {
  font-family: var(--font-serif);
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-primary);
}

.topbar-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--brass);
  margin-top: 2px;
}

.topbar-sep {
  width: 1px;
  height: 22px;
  background: rgba(197, 160, 89, 0.22);
}

.mode-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 4px;
  background: rgba(16, 23, 19, 0.85);
  border: 1px solid rgba(52, 211, 153, 0.24);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #cde8dc;
}

.mode-indicator.is-sim {
  background: var(--amber-soft);
  border-color: rgba(224, 175, 85, 0.4);
  color: var(--brass-bright);
}

.mode-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.65);
}

.mode-indicator.is-sim .mode-dot {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(224, 175, 85, 0.55);
}

/* Architectural Brass Navigation Rail */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(12, 16, 14, 0.92);
  border: 1px solid rgba(197, 160, 89, 0.16);
}

.nav-tab {
  position: relative;
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.025);
}

.nav-tab.is-active {
  background: linear-gradient(180deg, rgba(197, 160, 89, 0.12) 0%, rgba(197, 160, 89, 0.04) 100%);
  color: var(--brass-bright);
  box-shadow: inset 0 -1.5px 0 var(--brass);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 5px;
  border-radius: 999px;
  border: 1px solid rgba(197, 160, 89, 0.24);
  background: rgba(14, 19, 16, 0.9);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.user-chip:hover {
  border-color: var(--brass);
  background: rgba(19, 26, 22, 0.95);
}

.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(28, 104, 66, 0.35), rgba(197, 160, 89, 0.2));
  border: 1px solid rgba(197, 160, 89, 0.45);
  color: var(--brass-bright);
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.22;
}

.user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-role {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
}

/* ================= MAIN CONTAINER & EDITORIAL HEADERS ================= */
.main-container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 28px 28px 40px;
  flex: 1;
}

.page-section {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.editorial-eyebrow {
  display: block;
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 3px;
}

.section-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.section-desc {
  margin: 5px 0 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.toolbar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ================= PILLS, CHECKBOXES & LUXURY BUTTONS ================= */
.period-pills,
.status-pills {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 7px;
  background: var(--bg-surface);
  border: 1px solid rgba(197, 160, 89, 0.18);
  flex-wrap: wrap;
}

.pill-btn {
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-btn:hover {
  color: var(--text-primary);
}

.pill-btn.is-active {
  background: var(--brass-soft);
  border-color: rgba(197, 160, 89, 0.42);
  color: var(--brass-bright);
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.inline-check input[type='checkbox'] {
  appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border-radius: 3px;
  border: 1px solid rgba(197, 160, 89, 0.42);
  background: var(--bg-well);
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.inline-check input[type='checkbox']:checked {
  background: var(--jade-deep);
  border-color: var(--brass);
}

.inline-check input[type='checkbox']:checked::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--brass-bright);
  clip-path: polygon(14% 44%, 0 60%, 40% 100%, 100% 18%, 82% 0%, 36% 66%);
}

/* Banker's Lamp Emerald + Burnished Brass Primary CTA */
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(197, 160, 89, 0.46);
  background: linear-gradient(180deg, #1f6d45 0%, #13472c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 6px 18px rgba(0, 0, 0, 0.45);
  color: #f6f3ec;
  font-family: var(--font-serif);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

.primary-btn:hover:not(:disabled) {
  filter: brightness(1.1);
  border-color: var(--brass-bright);
}

.primary-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.primary-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.primary-btn.is-full {
  width: 100%;
}

.primary-btn.is-large {
  padding: 14px 20px;
  font-size: 13px;
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(197, 160, 89, 0.24);
  background: linear-gradient(180deg, #151c18 0%, #0e1310 100%);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.secondary-btn:hover:not(:disabled) {
  border-color: var(--brass);
  color: var(--brass-bright);
}

.ghost-btn,
.icon-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(12, 16, 14, 0.65);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.ghost-btn:hover,
.icon-btn:hover {
  border-color: rgba(197, 160, 89, 0.36);
  background: var(--bg-elevated);
  color: var(--brass-bright);
}

.kbd-hint {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(197, 160, 89, 0.2);
  border: 1px solid rgba(197, 160, 89, 0.35);
  color: var(--brass-bright);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ================= 4-CELL EXECUTIVE TREASURY PLAQUE ================= */
.kpi-strip {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(17, 23, 19, 0.94) 0%, rgba(10, 14, 12, 0.96) 100%);
  border: 1px solid rgba(197, 160, 89, 0.22);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.42);
  overflow: hidden;
}

.kpi-strip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 6%;
  right: 6%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(227, 198, 135, 0.6), transparent);
  pointer-events: none;
}

.kpi-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  border-right: 1px solid var(--border-subtle);
}

.kpi-cell:last-child {
  border-right: none;
}

.kpi-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot.is-settled {
  background: var(--jade);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.55);
}

.dot.is-pending {
  background: var(--amber);
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.kpi-value.is-jade,
.mini-kpi-val.is-jade {
  color: var(--jade);
  text-shadow: 0 0 22px rgba(52, 211, 153, 0.16);
}

#kpi-commission-total {
  color: var(--brass-bright);
}

.kpi-sub {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ================= MARBLE PANELS & LEDGER TABLES ================= */
.panel-card {
  position: relative;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(15, 20, 17, 0.92) 0%, rgba(10, 14, 12, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
  padding: 22px;
}

.panel-card.is-cashier-box {
  border-color: rgba(197, 160, 89, 0.28);
}

.panel-card.is-cashier-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(227, 198, 135, 0.65), transparent);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.card-head.is-wrap {
  flex-wrap: wrap;
}

.card-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.card-subtitle {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.card-subtitle strong {
  color: var(--brass-bright);
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.data-table th {
  text-align: left;
  padding: 11px 12px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #8c867a;
  border-bottom: 1px solid rgba(197, 160, 89, 0.18);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13.5px;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background-color 0.15s ease;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--bg-hover);
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-serif);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.rank-num.is-top {
  background: var(--brass-soft);
  color: var(--brass-bright);
  border: 1px solid rgba(197, 160, 89, 0.52);
  box-shadow: 0 0 14px rgba(197, 160, 89, 0.16);
}

.emp-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.emp-name {
  font-weight: 600;
  color: var(--text-primary);
}

.emp-handle {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}

.conv-bar-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 108px;
}

.conv-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--bg-well);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.conv-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f7a4c, #c5a059);
}

.paid-highlight {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--jade);
}

.operator-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 5px;
  background: rgba(197, 160, 89, 0.08);
  border: 1px solid rgba(197, 160, 89, 0.22);
  color: #e2dacb;
  font-size: 12px;
  font-weight: 600;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-badge.is-PENDENTE {
  background: var(--amber-soft);
  border: 1px solid rgba(224, 175, 85, 0.3);
  color: var(--amber);
}

.status-badge.is-COMPLETO {
  background: var(--jade-soft);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--jade);
}

.status-badge.is-FALHA {
  background: var(--coral-soft);
  border: 1px solid rgba(224, 90, 84, 0.3);
  color: #f48b86;
}

/* ================= EXECUTIVE TELLER DESK (CASHIER) ================= */
.cashier-grid {
  display: grid;
  grid-template-columns: 416px 1fr;
  gap: 24px;
  align-items: start;
}

.cashier-instrument {
  position: sticky;
  top: 84px;
}

.cashier-box-header {
  margin-bottom: 16px;
}

.amount-box {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--bg-well);
  border: 1px solid rgba(197, 160, 89, 0.2);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.65);
  margin-bottom: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.amount-box:focus-within {
  border-color: var(--brass);
  box-shadow:
    inset 0 2px 10px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(197, 160, 89, 0.2);
}

.eyebrow {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--brass);
  margin-bottom: 8px;
}

.amount-row {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.currency-sign {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  color: var(--brass);
}

.amount-display-input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.amount-display-input:focus {
  outline: none;
}

.amount-display-input::placeholder {
  color: #2c332e;
}

.clear-btn {
  align-self: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
}

.clear-btn:hover {
  border-color: var(--brass);
  color: var(--text-primary);
}

.quick-amounts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--border-subtle);
}

.chip {
  padding: 7px 4px;
  border-radius: 5px;
  border: 1px solid var(--border-subtle);
  background: #0d120f;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: all 0.14s ease;
}

.chip:hover {
  border-color: rgba(197, 160, 89, 0.38);
  color: var(--text-primary);
}

.chip.is-selected {
  border-color: var(--brass);
  background: var(--brass-soft);
  color: var(--brass-bright);
}

.accordion-box {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-well);
  margin-bottom: 16px;
}

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}

.accordion-trigger:hover {
  color: var(--brass-bright);
}

.accordion-body {
  padding: 6px 14px 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.personal-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.mini-kpi {
  padding: 15px 17px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(16, 22, 18, 0.92) 0%, rgba(11, 15, 13, 0.95) 100%);
  border: 1px solid rgba(197, 160, 89, 0.18);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mini-kpi-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.mini-kpi-val {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mini-kpi-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-field,
.select-input,
.text-input {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-well);
  color: var(--text-primary);
  font-size: 13px;
  transition: border-color 0.15s ease;
}

.select-input option {
  background-color: #0d120f;
  color: var(--text-primary);
}

.search-field:focus,
.select-input:focus,
.text-input:focus {
  outline: none;
  border-color: var(--brass);
}

.text-input {
  width: 100%;
}

.select-input.is-full {
  width: 100%;
}

.search-field.is-grow {
  flex: 1;
  min-width: 200px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.tx-cards-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tx-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-well);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.tx-item:hover {
  border-color: rgba(197, 160, 89, 0.38);
  background: var(--bg-elevated);
}

.tx-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.tx-item-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tx-item-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* ================= GOVERNANCE & CREDENTIALS ================= */
.ledger-filters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.manage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.staff-create-box {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--bg-well);
  border: 1px solid rgba(197, 160, 89, 0.2);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
}

.field-help {
  font-size: 11.5px;
  color: var(--text-muted);
}

.muted-inline {
  font-weight: 500;
  color: var(--jade);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 10px;
}

.users-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-well);
  transition: border-color 0.15s ease;
}

.user-row-card:hover {
  border-color: rgba(197, 160, 89, 0.28);
}

.user-row-card.is-blocked {
  opacity: 0.58;
}

.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mode-selector-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mode-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-well);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.mode-card:has(input:checked) {
  border-color: var(--brass);
  background: linear-gradient(180deg, rgba(197, 160, 89, 0.1) 0%, rgba(28, 104, 66, 0.08) 100%);
}

.mode-card input {
  margin-top: 3px;
  accent-color: var(--brass);
}

.mode-card-title {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-primary);
}

.mode-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.test-feedback {
  font-size: 12.5px;
  font-weight: 600;
}

.test-feedback.is-ok {
  color: var(--jade);
}

.test-feedback.is-err {
  color: #f48b86;
}

.copy-row {
  display: flex;
  gap: 8px;
}

.divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 6px 0;
}

.alert-box {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}

.alert-box.is-error {
  background: var(--coral-soft);
  border: 1px solid rgba(224, 90, 84, 0.38);
  color: #f8aba7;
}

/* ================= SIGNATURE PARCHMENT-INTEGRATED PIX VOUCHER MODAL ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(3, 5, 4, 0.82);
  backdrop-filter: blur(7px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.voucher-dialog,
.simple-dialog {
  width: 100%;
  max-width: 408px;
  border-radius: var(--radius-lg);
  background: #080b09;
  border: 1px solid rgba(197, 160, 89, 0.38);
  padding: 18px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.78);
}

.voucher-dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.voucher-bar-tags {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tx-id-badge {
  padding: 3px 9px;
  border-radius: 5px;
  background: var(--bg-surface);
  border: 1px solid rgba(197, 160, 89, 0.25);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--brass-bright);
}

.sim-tag {
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--amber-soft);
  border: 1px solid rgba(224, 175, 85, 0.35);
  color: var(--amber);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.close-modal-btn {
  padding: 5px 11px;
  border-radius: 5px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.close-modal-btn:hover {
  border-color: var(--brass);
  color: var(--text-primary);
}

.voucher-ticket {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(197, 160, 89, 0.36);
  background: #0d120f;
  margin-bottom: 14px;
}

.voucher-top {
  padding: 18px 16px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.v-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 9px;
}

.v-status-pill.is-PENDENTE {
  background: var(--amber-soft);
  color: var(--amber);
}

.v-status-pill.is-COMPLETO {
  background: var(--jade-soft);
  color: var(--jade);
}

.v-status-pill.is-FALHA {
  background: var(--coral-soft);
  color: var(--coral);
}

.v-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.v-amount {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.v-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.v-operator {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--brass);
  margin-top: 6px;
}

.voucher-tear {
  position: relative;
  height: 18px;
  display: flex;
  align-items: center;
  background: linear-gradient(to bottom, #0d120f 50%, var(--paper-voucher) 50%);
}

.tear-dashed {
  width: 100%;
  margin: 0 14px;
  border-top: 1.5px dashed rgba(95, 78, 52, 0.55);
}

.tear-notch {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #080b09;
  border: 1px solid rgba(197, 160, 89, 0.36);
  transform: translateY(-50%);
}

.tear-notch.is-left {
  left: -9px;
}

.tear-notch.is-right {
  right: -9px;
}

.voucher-paper {
  background: var(--paper-voucher);
  color: var(--paper-ink);
  padding: 18px 16px;
  text-align: center;
}

.v-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}

.v-qr-img {
  width: 196px;
  height: 196px;
  object-fit: contain;
  background: #ffffff;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--paper-border);
  box-shadow: 0 4px 12px rgba(22, 18, 12, 0.1);
}

.v-paper-hint {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 14px;
  color: var(--paper-muted);
  font-weight: 600;
}

.v-paid-wrap {
  padding: 18px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.v-paid-seal {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(26, 77, 46, 0.14);
  border: 2px solid #1a4d2e;
  color: #1a4d2e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
}

.v-paid-heading {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #1a4d2e;
}

.v-paid-sub {
  font-size: 12.5px;
  color: var(--paper-muted);
}

.voucher-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.simulate-pay-btn {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(52, 211, 153, 0.45);
  background: var(--jade-soft);
  color: var(--jade);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.simulate-pay-btn:hover {
  background: rgba(52, 211, 153, 0.22);
}

.v-radar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.empty-placeholder {
  padding: 38px 20px;
  text-align: center;
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 16px;
  color: var(--text-muted);
  border: 1px dashed rgba(197, 160, 89, 0.2);
  border-radius: var(--radius-md);
}

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 90;
  padding: 12px 18px;
  border-radius: 8px;
  background: #101613;
  border: 1px solid rgba(197, 160, 89, 0.42);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.65);
}

.toast.is-jade {
  background: #0d261b;
  border-color: var(--jade);
  color: #b5f5d8;
}

/* Responsive */
@media (max-width: 1024px) {
  .kpi-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .kpi-cell:nth-child(2) {
    border-right: none;
  }
  .kpi-cell:nth-child(1),
  .kpi-cell:nth-child(2) {
    border-bottom: 1px solid var(--border-subtle);
  }
  .cashier-grid,
  .manage-grid {
    grid-template-columns: 1fr;
  }
  .cashier-instrument {
    position: static;
  }
}

@media (max-width: 640px) {
  .main-container {
    padding: 16px;
  }
  .topbar {
    padding: 12px 16px;
  }
  .topbar-sep {
    display: none;
  }
  .kpi-strip,
  .personal-kpi-strip,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .kpi-cell {
    border-right: none !important;
    border-bottom: 1px solid var(--border-subtle);
  }
  .kpi-cell:last-child {
    border-bottom: none;
  }
}
