/* ========================================================
   FRAPPE UI DESIGN SYSTEM STYLESHEET
   Clean, Compact & Minimalist Dashboard UI for ERP/POS
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --f-bg: #f8fafc;
  --f-sidebar: #ffffff;
  --f-surface: #ffffff;
  --f-border: #cbd5e1;
  --f-border-subtle: #e2e8f0;
  --f-text: #0f172a;
  --f-text-muted: #334155;
  --f-text-light: #475569;
  --f-primary: #0f172a;
  --f-primary-hover: #020617;
  --f-accent: #1d4ed8;
  --f-accent-subtle: #eff6ff;
  --f-success: #059669;
  --f-success-subtle: #ecfdf5;
  --f-danger: #dc2626;
  --f-danger-subtle: #fef2f2;
  --f-warning: #d97706;
  --f-warning-subtle: #fffbeb;
  --f-radius: 6px;
  --f-radius-sm: 4px;
  --f-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --f-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

:root {
  color-scheme: light;
}

body {
  background: var(--f-bg);
  color: var(--f-text);
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
  accent-color: var(--f-accent, #1d4ed8);
}

/* Typographic Legibility (Modern Web Guidance: visual-design/improve-text-layout-and-legibility) */
h1, h2, h3, h4, h5, h6, .card-title-clean, .stat-card-title, .f-modal-header strong {
  text-wrap: balance;
}

p, .card-sub-clean, .stat-card-sub {
  text-wrap: pretty;
}

/* Accessible Focus States (Modern Web Guidance: accessibility) */
:focus-visible {
  outline: 2px solid var(--f-accent, #1d4ed8);
  outline-offset: 2px;
}

/* --- APP SHELL (SIDEBAR + MAIN) --- */
.app-shell {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Sidebar Navigation */
.sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--f-sidebar);
  border-right: 1px solid var(--f-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  z-index: 20;
}

.sidebar-header {
  height: 54px;
  min-height: 54px;
  max-height: 54px;
  padding: 0 16px;
  border-bottom: 1px solid var(--f-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  background: var(--f-sidebar);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--f-text);
}

.brand-icon {
  width: 30px;
  height: 30px;
  background: #1e293b;
  color: #fff;
  border-radius: var(--f-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.brand-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--f-text);
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--f-text-muted);
  line-height: 1.1;
}

.sidebar-nav {
  padding: 14px 10px;
  overflow-y: auto;
  flex: 1;
}

.nav-section-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--f-text-light);
  letter-spacing: 0.6px;
  padding: 8px 10px 4px 10px;
  margin-top: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--f-radius);
  color: var(--f-text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: var(--f-border-subtle);
  color: var(--f-text);
}

.nav-item.active {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 600;
}

.nav-item svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--f-border);
  background: #fafafa;
}

.btn-open-pos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 7px 12px;
  background: #ffffff;
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius);
  color: var(--f-text);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 10px;
  transition: 0.15s;
}

.btn-open-pos:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.user-profile-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-avatar-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #475569;
}

.user-text-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--f-text);
  line-height: 1.2;
}

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

/* --- MAIN CONTENT AREA --- */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--f-bg);
}

/* Top Header Bar */
.top-header {
  height: 54px;
  min-height: 54px;
  max-height: 54px;
  background: #ffffff;
  border-bottom: 1px solid var(--f-border);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  box-sizing: border-box;
}

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

.breadcrumb-f {
  font-size: 13px;
  font-weight: 500;
  color: var(--f-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.breadcrumb-f:hover {
  color: var(--f-text);
}

.breadcrumb-slash {
  color: #cbd5e1;
  font-size: 12px;
  user-select: none;
}

.page-title {
  font-size: 14.5px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.2px;
  margin: 0;
}

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

/* Frappe UI Status Badge & Pulse */
.frappe-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.2s;
  line-height: 1;
  cursor: pointer;
}

.frappe-status-pill.online {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.frappe-status-pill.offline {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.pulse-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  position: relative;
}

.frappe-status-pill.online .pulse-dot::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: 50%;
  background: inherit;
  animation: frappePulse 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes frappePulse {
  0% { transform: scale(1); opacity: 0.8; }
  70% { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}

.frappe-badge-ver {
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 4px 8px;
  border-radius: var(--f-radius-sm);
  cursor: pointer;
  transition: 0.15s ease;
  line-height: 1;
}

.frappe-badge-ver:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Frappe UI Vector Icons */
.icon-f {
  width: 14px;
  height: 14px;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 4px;
  flex-shrink: 0;
}

.icon-f-no-margin {
  margin-right: 0 !important;
}

.icon-f-lg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Page Body */
.page-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* --- FRAPPE CARDS & SURFACES --- */
.frappe-card {
  background: var(--f-surface);
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius);
  box-shadow: var(--f-shadow-sm);
  padding: 16px 20px;
  margin-bottom: 20px;
}

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

.card-title-clean {
  font-size: 14px;
  font-weight: 700;
  color: var(--f-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Stat Grid (Dashboard Compact Cards) */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius);
  padding: 16px 18px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
}

.stat-card-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--f-text-light);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.stat-card-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--f-text);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.stat-card-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--f-text-muted);
  margin-top: 6px;
}

/* --- FRAPPE DATA TABLES (COMPACT & CLEAN) --- */
.table-container {
  background: #ffffff;
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius);
  overflow-x: auto;
  box-shadow: var(--f-shadow-sm);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.frappe-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.frappe-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f1f5f9;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #1e293b;
  padding: 7px 10px;
  border-bottom: 2px solid var(--f-border);
  white-space: nowrap;
}

.frappe-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--f-border-subtle);
  font-size: 12px;
  color: var(--f-text);
  font-weight: 500;
  vertical-align: middle;
  line-height: 1.35;
}

.frappe-table.table-compact th,
.table-compact th {
  padding: 6px 8px !important;
  font-size: 11px !important;
  height: 30px;
}

.frappe-table.table-compact td,
.table-compact td {
  padding: 5px 8px !important;
  font-size: 11.5px !important;
  height: 32px;
}

.frappe-table tbody tr:nth-child(even) td {
  background-color: #fbfcfe;
}

.frappe-table tbody tr:hover td {
  background-color: #f1f5f9;
}

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

.frappe-table td.text-right,
.frappe-table th.text-right,
.frappe-table td[style*="text-align:right"],
.frappe-table td[style*="text-align: right"] {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* Dual Column COA Layout */
.coa-columns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 960px) {
  .coa-columns-grid {
    grid-template-columns: 1fr !important;
  }
}

/* --- BUTTONS (COMPACT FRAPPE STYLE) --- */
.btn-f {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: var(--f-radius);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  line-height: 1.2;
  white-space: nowrap;
}

.btn-f-primary {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}
.btn-f-primary:hover {
  background: #1e293b;
  border-color: #1e293b;
}

.btn-f-default {
  background: #ffffff;
  border-color: var(--f-border);
  color: var(--f-text);
}
.btn-f-default:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.btn-f-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}
.btn-f-danger:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.btn-f-success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #059669;
}
.btn-f-success:hover {
  background: #d1fae5;
}

.btn-f-sm {
  padding: 4px 8px;
  font-size: 11.5px;
}

/* --- FRAPPE FORM CONTROLS --- */
.form-group-f {
  margin-bottom: 12px;
}

.form-label-f {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--f-text-muted);
  margin-bottom: 4px;
  display: block;
}

.form-control-f {
  width: 100%;
  padding: 7px 10px;
  font-size: 13px;
  background: #ffffff;
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius);
  color: var(--f-text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control-f:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-control-f:disabled,
.form-control-f[readonly] {
  background: #f8fafc;
  color: var(--f-text-muted);
  cursor: not-allowed;
}

/* Custom Frappe Select Dropdown */
select,
select.form-control-f {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 14px 14px !important;
  padding-right: 32px !important;
  cursor: pointer !important;
  color: var(--f-text) !important;
  font-weight: 600 !important;
  border: 1px solid var(--f-border) !important;
}

select:hover,
select.form-control-f:hover {
  border-color: #94a3b8 !important;
}

select:focus,
select.form-control-f:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  outline: none !important;
}

input[type="date"].form-control-f,
input[type="date"] {
  cursor: pointer;
  color: var(--f-text);
  font-weight: 600;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.75;
  filter: invert(0.15);
  transition: opacity 0.15s;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* --- BADGES --- */
.badge-f {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.3px;
}

.badge-f-green {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-f-red {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.badge-f-blue {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.badge-f-yellow {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-f-purple {
  background: #faf5ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

.badge-f-gray {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

/* --- SEGMENTED TABS (FILTER BARS) --- */
.segmented-tabs {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius);
  padding: 3px;
  gap: 3px;
}

.segmented-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--f-radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.segmented-tab-btn:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.6);
}

.segmented-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* --- MODAL DIALOGS --- */
.f-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.f-modal-box {
  background: #ffffff;
  border: 1px solid var(--f-border);
  border-radius: 8px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 540px;
  padding: 20px;
  animation: fModalFadeIn 0.15s ease-out;
  display: flex;
  flex-direction: column;
}

.f-modal-box.modal-lg {
  max-width: 780px;
}

.f-modal-box.modal-md {
  max-width: 520px;
}

.f-modal-box.modal-sm {
  max-width: 420px;
}

.f-modal-body {
  max-height: 75vh;
  overflow-y: auto;
  padding: 2px 2px 4px 2px;
}

@keyframes fModalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.f-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--f-border-subtle);
}

.f-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.f-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--f-border-subtle);
}

/* Utility Hidden */
.hidden {
  display: none !important;
}

/* Toast */
.f-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--f-radius);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  z-index: 999;
  animation: fToastSlide 0.2s ease-out;
}

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

/* ==========================================
   FRAPPE UI: ADMIN LOGIN PAGE
   ========================================== */
.admin-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--f-bg);
  padding: 24px;
}

.admin-login-box {
  width: 100%;
  max-width: 420px;
}

.admin-login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.admin-brand-logo {
  width: 44px;
  height: 44px;
  background: var(--f-primary);
  color: #ffffff;
  border-radius: var(--f-radius);
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.25);
}

.admin-brand-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: var(--f-text-dark);
  line-height: 1.2;
}

.admin-brand-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--f-primary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.admin-login-card {
  background: var(--f-surface);
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius-lg);
  padding: 30px 26px;
  box-shadow: var(--f-shadow);
}

.admin-login-header {
  margin-bottom: 22px;
  text-align: center;
}

.admin-login-header h3 {
  margin: 0 0 6px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--f-text-dark);
}

.admin-alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 10px 12px;
  border-radius: var(--f-radius);
  font-size: 12.5px;
  margin-bottom: 16px;
  line-height: 1.45;
}

.btn-f-pass-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--f-text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-f-pass-toggle:hover {
  color: var(--f-text-dark);
}

.admin-login-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--f-border-subtle);
}

.link-f {
  color: var(--f-primary);
  text-decoration: none;
}

.link-f:hover {
  text-decoration: underline;
}

/* --- DASHBOARD ENHANCEMENTS & CHARTS (FRAPPE STYLE) --- */
.dash-chart-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 960px) {
  .dash-chart-grid {
    grid-template-columns: 1fr !important;
  }
}

.rank-pill {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.rank-pill-1 { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.rank-pill-2 { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.rank-pill-3 { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }
.rank-pill-def { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }

.chart-bar-rect {
  transition: opacity 0.15s ease, y 0.2s ease, height 0.2s ease;
  cursor: pointer;
}
.chart-bar-rect:hover {
  opacity: 0.82;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.chart-tooltip-f {
  position: absolute;
  pointer-events: none;
  background: #0f172a;
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.22);
  white-space: nowrap;
  z-index: 50;
  transform: translate(-50%, -100%);
  opacity: 0;
  transition: opacity 0.12s ease;
  line-height: 1.4;
}

.cash-acc-card {
  background: #f8fafc;
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s ease;
}
.cash-acc-card:hover {
  background: #ffffff;
  box-shadow: var(--f-shadow-sm);
  border-color: #cbd5e1;
}

.peak-hour-block {
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius);
  font-size: 12px;
}



/* ======================================================== */
/* PAGINATION COMPONENT (FRAPPE & CLEAN MODERN STYLE)       */
/* ======================================================== */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid var(--f-border, #e2e8f0);
  border-top: none;
  border-radius: 0 0 var(--f-radius, 6px) var(--f-radius, 6px);
  font-size: 11.5px;
  color: var(--f-text-muted, #64748b);
  box-sizing: border-box;
}

.pagination-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.pagination-controls {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid var(--f-border, #cbd5e1);
  background: #ffffff;
  color: var(--f-text, #1e293b);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.pagination-btn:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.pagination-btn.active {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
  font-weight: 700;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f8fafc;
}

.pagination-ellipsis {
  padding: 0 4px;
  color: var(--f-text-muted, #94a3b8);
  font-weight: bold;
}

/* Clickable balance link to view account ledger */
.link-saldo {
  color: #1d4ed8 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  cursor: pointer;
  transition: all 0.15s ease;
}

.link-saldo:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.link-saldo svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.2;
}

/* Transfer badge */
.badge-trx-transfer {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-sm, 4px);
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  white-space: nowrap;
}
