/* ==========================================================================
   Payment Vendor Portal - Full Transparent Crystal Glassmorphism Theme
   ========================================================================== */

:root {
  --primary-navy: #2b2f36;
  --secondary-navy: #3a3f48;
  --header-gradient: linear-gradient(135deg, rgba(38, 41, 47, 0.65) 0%, rgba(56, 61, 70, 0.52) 50%, rgba(34, 37, 43, 0.65) 100%);
  --sidebar-collapsed-width: 68px;
  --sidebar-expanded-width: 250px;
  --bg-page: #1f2227;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-bg-strong: rgba(34, 37, 43, 0.84);
  --glass-bg-soft: rgba(255, 255, 255, 0.06);
  --glass-hover: rgba(255, 255, 255, 0.14);
  --glass-border: rgba(255, 255, 255, 0.22);
  --border-color: rgba(255, 255, 255, 0.15);
  --text-primary: #f8fafc;
  --text-secondary: #d4d8df;
  --text-muted: #9ca3af;
  --success-color: #34d399;
  --dropped-color: #f87171;
  --warning-color: #fbbf24;
  --accent-blue: #e2e8f0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-page);
  background-image:
    radial-gradient(circle at 14% 16%, rgba(255, 255, 255, 0.12) 0px, transparent 42%),
    radial-gradient(circle at 86% 18%, rgba(148, 163, 184, 0.16) 0px, transparent 45%),
    radial-gradient(circle at 75% 84%, rgba(203, 213, 225, 0.10) 0px, transparent 46%),
    radial-gradient(circle at 18% 82%, rgba(100, 116, 139, 0.14) 0px, transparent 46%),
    linear-gradient(145deg, #1b1d21 0%, #2b2f37 50%, #1e2126 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

select option {
  background-color: #262930;
  color: #f8fafc;
}

/* ==========================================================================
   Expandable Transparent Glass Sidebar
   ========================================================================== */
.sidebar {
  width: var(--sidebar-collapsed-width);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  border-right: 1px solid var(--glass-border);
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.25);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 0;
  z-index: 1000;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s;
  overflow-x: hidden;
  white-space: nowrap;
}

.sidebar:hover, .sidebar.expanded {
  width: var(--sidebar-expanded-width);
  background: rgba(10, 28, 54, 0.78);
  box-shadow: 10px 0 38px rgba(0, 0, 0, 0.4);
}

.sidebar-header {
  display: flex;
  align-items: center;
  padding: 0 14px;
  margin-bottom: 20px;
  height: 48px;
  gap: 12px;
}

.sidebar-logo {
  min-width: 40px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.45) 0%, rgba(99, 102, 241, 0.55) 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  flex-shrink: 0;
}

.sidebar-brand-text {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
}

.sidebar:hover .sidebar-brand-text, .sidebar.expanded .sidebar-brand-text {
  opacity: 1;
  transform: translateX(0);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 10px;
}

.nav-section-title {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 12px 10px 4px 10px;
  opacity: 0;
  transition: opacity 0.2s;
}

.sidebar:hover .nav-section-title, .sidebar.expanded .nav-section-title {
  opacity: 1;
}

.nav-link {
  height: 44px;
  display: flex;
  align-items: center;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
  padding: 0 12px;
  gap: 14px;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 600;
}

.nav-link-icon {
  min-width: 22px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-link-text {
  font-size: 13.5px;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.2s, transform 0.2s;
}

.sidebar:hover .nav-link-text, .sidebar.expanded .nav-link-text {
  opacity: 1;
  transform: translateX(0);
}

/* ==========================================================================
   Main Wrapper & Glass Header
   ========================================================================== */
.main-wrapper {
  margin-left: var(--sidebar-collapsed-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.25s;
}

.hero-header {
  background: var(--header-gradient);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px 32px 60px 32px;
  color: #ffffff;
  position: relative;
}

.impersonate-banner {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 10px;
  padding: 8px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #e0f2fe;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.breadcrumbs {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  gap: 6px;
  align-items: center;
}

.breadcrumbs span.current {
  color: #ffffff;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.fullscreen-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  border-radius: 8px;
}

.fullscreen-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(56, 189, 248, 0.6);
}

.header-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.btn-header-action {
  background: rgba(56, 189, 248, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  transition: all 0.2s ease;
}

.btn-header-action:hover {
  background: rgba(56, 189, 248, 0.38);
}

/* ==========================================================================
   Content Area & Translucent Cards
   ========================================================================== */
.content-body {
  padding: 0 28px 40px 28px;
  margin-top: -36px;
  position: relative;
  z-index: 10;
}

.main-card {
  background: var(--glass-bg);
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  padding: 24px;
  margin-bottom: 24px;
  min-height: 480px;
  position: relative;
}

/* KPI Grid for Role Dashboards */
.kpi-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

@media (max-width: 1024px) {
  .kpi-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .kpi-grid-4 { grid-template-columns: 1fr; }
}

.kpi-glass-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 16px 18px;
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin: 6px 0 4px 0;
}

.kpi-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ==========================================================================
   Loader & Toasts
   ========================================================================== */
.loader-container {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  width: 100%;
}

.bouncing-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.bouncing-dot {
  width: 8px;
  height: 8px;
  background-color: #38bdf8;
  border-radius: 50%;
  animation: bounce 0.6s infinite alternate;
}

.bouncing-dot:nth-child(2) { animation-delay: 0.2s; }
.bouncing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  from { transform: translateY(0); opacity: 0.4; }
  to { transform: translateY(-10px); opacity: 1; }
}

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  backdrop-filter: blur(18px);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  min-width: 280px;
  max-width: 420px;
  animation: slideInRight 0.3s ease;
  transition: opacity 0.3s ease;
}

@keyframes slideInRight {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-success {
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #ecfdf5;
}

.toast-error {
  background: rgba(239, 68, 68, 0.24);
  border: 1px solid rgba(248, 113, 113, 0.55);
  color: #fef2f2;
}

.toast-close {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.75;
  font-size: 18px;
  cursor: pointer;
  margin-left: auto;
  padding: 0 4px;
}

/* ==========================================================================
   Filter Controls, Inputs & Buttons
   ========================================================================== */
.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.select-control, .input-control {
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--glass-bg-soft);
  backdrop-filter: blur(10px);
  outline: none;
  min-width: 180px;
  transition: all 0.2s;
}

.input-control::placeholder, .form-control::placeholder {
  color: var(--text-muted);
}

.select-control:focus, .input-control:focus {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.input-icon-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.input-icon-wrapper svg {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-icon-wrapper input {
  padding-left: 36px;
}

.btn-dark {
  background: rgba(56, 189, 248, 0.26);
  backdrop-filter: blur(10px);
  color: #ffffff;
  border: 1px solid rgba(125, 211, 252, 0.45);
  border-radius: 10px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: all 0.2s;
}

.btn-dark:hover {
  background: rgba(56, 189, 248, 0.42);
}

.btn-outline {
  background: var(--glass-bg-soft);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* ==========================================================================
   Tabs & Status Pills
   ========================================================================== */
.tab-container {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.tab-pill {
  flex: 1;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--glass-bg-soft);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.tab-pill.active {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.status-pills {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.status-pill {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  background: var(--glass-bg-soft);
  backdrop-filter: blur(8px);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.status-pill.active {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(56, 189, 248, 0.6);
  color: #ffffff;
  font-weight: 600;
}

/* ==========================================================================
   Data Tables
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.custom-table th {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 12px 14px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.custom-table td {
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  vertical-align: middle;
}

.custom-table tr:hover td {
  background: rgba(255, 255, 255, 0.06);
}

.expand-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-soft);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}

.copy-icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  margin-left: 4px;
  display: inline-flex;
  vertical-align: middle;
  border-radius: 4px;
}

.copy-icon-btn:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.14);
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 12.5px;
}

.badge-success { color: #34d399; }
.badge-dropped { color: #f87171; }
.badge-inprogress { color: #fbbf24; }

.multiline-info {
  white-space: pre-line;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.18);
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #ef4444;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  gap: 12px;
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
}

.empty-state-text {
  font-size: 15px;
  font-weight: 500;
}

/* ==========================================================================
   Dashboard Widgets & Charts
   ========================================================================== */
.dash-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 992px) {
  .dash-grid-2 { grid-template-columns: 1fr; }
}

.widget-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  overflow: hidden;
}

.widget-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.widget-body { padding: 20px; }

.calculation-list {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
}

.calc-legend-title {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.calc-row-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-row-right { font-weight: 600; color: #ffffff; }

.net-balance-box {
  background: rgba(20, 184, 166, 0.14);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(94, 234, 212, 0.38);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.net-balance-label {
  font-size: 13px;
  color: #99f6e4;
  font-weight: 600;
}

.net-balance-amount {
  font-size: 26px;
  font-weight: 700;
  color: #5eead4;
}

.summary-pills-row {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.summary-pill {
  background: var(--glass-bg-soft);
  border: 1px solid var(--glass-border);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

@media (max-width: 992px) {
  .charts-grid { grid-template-columns: 1fr; }
}

.chart-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 20px;
}

.chart-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   Glass Modals, Popovers & Dropdowns
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(3, 10, 22, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: rgba(11, 31, 58, 0.78);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  width: 92%;
  max-width: 520px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  color: var(--text-primary);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-close:hover { color: #ffffff; }

.form-group { margin-bottom: 14px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
}

.form-control:focus {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--accent-blue);
}

.multi-account-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto auto;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.export-btn-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-export-choice {
  flex: 1;
  padding: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.btn-export-choice:hover {
  background: rgba(56, 189, 248, 0.32);
}

.calendar-popover {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 2500;
  background: rgba(11, 31, 58, 0.9);
  backdrop-filter: blur(22px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  padding: 12px;
  width: 290px;
  margin-top: 4px;
}

.cal-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 10px; }
.cal-nav-btn { background: none; border: 1px solid var(--glass-border); color: #fff; border-radius: 4px; padding: 2px 8px; cursor: pointer; }
.cal-select { border: 1px solid var(--glass-border); background: rgba(255,255,255,0.08); color: #fff; border-radius: 4px; padding: 3px 6px; font-size: 13px; outline: none; }
.cal-table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: center; color: #e2e8f0; }
.cal-table th { color: var(--text-muted); padding: 4px 2px; }
.cal-table td { padding: 5px 2px; cursor: pointer; border-radius: 4px; }
.cal-table td:hover { background: rgba(255, 255, 255, 0.12); }
.cal-active-day { background-color: #e2e8f0 !important; color: #1b1d21 !important; font-weight: bold; }
.cal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border-color); }
.btn-cal-cancel { background: rgba(255,255,255,0.1); color: #fff; border: none; padding: 4px 10px; border-radius: 4px; font-size: 12px; cursor: pointer; }
.btn-cal-apply { background: #e2e8f0; color: #1b1d21; font-weight: 600; border: none; padding: 4px 12px; border-radius: 4px; font-size: 12px; cursor: pointer; }

.custom-select-wrapper { position: relative; width: 100%; }

.custom-select-trigger {
  width: 100%;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-secondary);
}

.custom-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(11, 31, 58, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  margin-top: 4px;
  z-index: 2400;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px 0;
}

.dropdown-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
}

.dropdown-check-item:hover { background-color: rgba(255, 255, 255, 0.08); }
.dropdown-check-item input[type="checkbox"] { width: 15px; height: 15px; accent-color: #38bdf8; cursor: pointer; }

.user-profile-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 240px;
  background: rgba(10, 28, 54, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
  border: 1px solid var(--glass-border);
  z-index: 3000;
  overflow: hidden;
  animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-profile-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.user-profile-links { padding: 6px 0; }

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  font-size: 13.5px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background-color 0.15s;
}

.user-menu-item:hover { background-color: rgba(255, 255, 255, 0.1); }

.input-password-wrapper { position: relative; display: flex; align-items: center; }
.input-password-wrapper input { padding-right: 36px; }
.btn-toggle-pwd { position: absolute; right: 10px; background: none; border: none; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; padding: 4px; }

/* ==========================================================================
   Roles, Permissions, Login & Bot Console
   ========================================================================== */
.role-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.role-super-admin {
  background: rgba(99, 102, 241, 0.22);
  color: #c7d2fe;
  border: 1px solid rgba(165, 180, 252, 0.45);
}

.role-sub-admin {
  background: rgba(20, 184, 166, 0.22);
  color: #99f6e4;
  border: 1px solid rgba(94, 234, 212, 0.45);
}

.role-merchant {
  background: rgba(245, 158, 11, 0.22);
  color: #fde68a;
  border: 1px solid rgba(252, 211, 77, 0.45);
}

.role-badge-current {
  background: rgba(56, 189, 248, 0.3);
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.perm-tags-wrap { display: flex; flex-wrap: wrap; gap: 5px; }

.perm-tag {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
}

.perm-tag-all {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.45);
}

.perm-tag-vendor {
  background: rgba(56, 189, 248, 0.16);
  color: #bae6fd;
  font-weight: 600;
}

.perm-checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.profile-switch-section {
  border-top: 1px solid var(--border-color);
  padding: 8px 0 4px 0;
  margin-top: 4px;
}

.profile-switch-title {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 4px 18px;
  letter-spacing: 0.4px;
}

.profile-switch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 18px;
  font-size: 12.5px;
  color: var(--text-secondary);
  text-decoration: none;
}

.profile-switch-item:hover { background: rgba(255, 255, 255, 0.08); color: #ffffff; }
.profile-switch-item.active { background: rgba(56, 189, 248, 0.16); font-weight: 600; color: #ffffff; }

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 22px;
  width: 100%;
  max-width: 430px;
  padding: 32px;
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.login-brand { text-align: center; margin-bottom: 24px; }
.login-brand h2 { font-size: 22px; color: #ffffff; margin-bottom: 4px; }
.login-brand p { font-size: 13px; color: var(--text-secondary); }

.login-error-box {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fecaca;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.login-quick-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border-color); }
.login-quick-title { font-size: 11.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin-bottom: 10px; }

.portal-tabs {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 5px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 18px;
}

.portal-tab {
  flex: 1;
  text-align: center;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s;
}

.portal-tab.active {
  background: rgba(56, 189, 248, 0.3);
  color: #ffffff;
  border: 1px solid rgba(125, 211, 252, 0.45);
}

.bot-terminal {
  background: rgba(3, 10, 22, 0.65);
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  border-radius: 10px;
  padding: 14px;
  height: 185px;
  overflow-y: auto;
  white-space: pre-wrap;
  border: 1px solid var(--glass-border);
}

.bot-quick-cmds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.bot-cmd-chip { cursor: pointer; transition: all 0.15s; }
.bot-cmd-chip:hover { background: rgba(56, 189, 248, 0.3); color: #ffffff; border-color: rgba(125, 211, 252, 0.5); }

.merchant-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  color: #ffffff;
}

.merchant-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.row-detail-expand td {
  background: rgba(255, 255, 255, 0.04) !important;
  padding: 12px 18px !important;
  border-bottom: 1px solid var(--glass-border);
}

.row-detail-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.row-detail-chip {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 5px 10px;
}
