:root {
  --bg-canvas: #0A0F1D;
  --bg-sidebar: #0E1626;
  --bg-card: #141E34;
  --bg-card-hover: #19253F;
  --bg-input: #101827;
  --border-color: #202F4D;
  --border-light: #2A3C60;

  --primary: #1E6DEB;
  --primary-hover: #1557BF;
  --primary-glow: rgba(30, 109, 235, 0.28);

  --emerald: #10B981;
  --emerald-bg: rgba(16, 185, 129, 0.12);
  --amber: #F59E0B;
  --amber-bg: rgba(245, 158, 11, 0.12);
  --purple: #8B5CF6;
  --purple-bg: rgba(139, 92, 246, 0.12);
  --rose: #F43F5E;
  --rose-bg: rgba(244, 63, 94, 0.12);

  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-canvas);
}
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: var(--radius-full);
}

/* App Container Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 10;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1E6DEB 0%, #06B6D4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  box-shadow: 0 0 20px var(--primary-glow);
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
}
.brand-name span {
  color: #38BDF8;
}

.brand-sub {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  position: relative;
}

.nav-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  transition: var(--transition);
}

.nav-item:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(30, 109, 235, 0.25) 0%, rgba(30, 109, 235, 0.08) 100%);
  border-left: 3px solid var(--primary);
  font-weight: 700;
}

.nav-item.active i {
  color: #38BDF8;
}

.badge-counter {
  margin-left: auto;
  background-color: var(--rose);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

.ai-status-card {
  background: rgba(16, 24, 39, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: pulseAnim 2s infinite;
}

@keyframes pulseAnim {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.status-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.status-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.btn-config-key {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.btn-config-key:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.user-profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(20, 30, 52, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 12px;
}

.user-avatar-initials-small {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), #0284C7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.avatar-img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--primary);
  flex-shrink: 0;
}

.user-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 10px;
  color: #38BDF8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.btn-sidebar-logout {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: #FDA4AF;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-sidebar-logout:hover {
  background: rgba(244, 63, 94, 0.25);
  color: #FFF;
  border-color: #F43F5E;
  transform: scale(1.05);
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 28px 36px;
  overflow-y: auto;
}

/* Topbar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.page-title-area h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.page-title-area p {
  color: var(--text-muted);
  font-size: 13px;
}

.topbar-actions {
  display: flex;
  gap: 12px;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #1E6DEB 0%, #1557BF 100%);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: var(--transition);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.btn-link {
  background: transparent;
  border: none;
  color: #38BDF8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.btn-link:hover {
  text-decoration: underline;
}

/* Tabs */
.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
  animation: fadeIn 0.28s ease;
}

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

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-light);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.blue-gradient .stat-icon { background: rgba(30, 109, 235, 0.2); color: #60A5FA; }
.green-gradient .stat-icon { background: var(--emerald-bg); color: var(--emerald); }
.purple-gradient .stat-icon { background: var(--purple-bg); color: var(--purple); }
.amber-gradient .stat-icon { background: var(--amber-bg); color: var(--amber); }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  margin-bottom: 6px;
}

.stat-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
}

/* Split Rows */
.dashboard-split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

@media (max-width: 1024px) {
  .dashboard-split-row {
    grid-template-columns: 1fr;
  }
}

/* Content Box */
.content-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
}

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

.box-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.box-title-group h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

/* AI Health Gauge */
.health-status-badge {
  background: var(--emerald-bg);
  color: var(--emerald);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.health-gauge-container {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
}

.score-circle {
  width: 100px;
  height: 100px;
  position: relative;
  flex-shrink: 0;
}

.circular-chart {
  display: block;
  max-width: 100%;
}

.circle-bg {
  fill: none;
  stroke: var(--bg-canvas);
  stroke-width: 3.2;
}

.circle-fill {
  fill: none;
  stroke: var(--emerald);
  stroke-width: 3.2;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s ease;
}

.score-number-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.score-number {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}

.score-max {
  font-size: 11px;
  color: var(--text-dim);
}

.health-narrative {
  flex: 1;
}

.health-summary-text {
  font-size: 13px;
  line-height: 1.6;
  color: #CBD5E1;
  margin-bottom: 12px;
}

.insight-pills {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.insight-pill {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.insight-pill i {
  color: var(--emerald);
  font-size: 10px;
}

.ai-recommendation-alert {
  background: rgba(30, 109, 235, 0.12);
  border: 1px solid rgba(30, 109, 235, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #93C5FD;
  font-size: 12px;
  line-height: 1.5;
}

.ai-recommendation-alert i {
  font-size: 16px;
  margin-top: 2px;
  color: #60A5FA;
}

/* Profit & Loss Waterfall Ladder */
.pl-ladder {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pl-step {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.highlight-step {
  background: rgba(30, 109, 235, 0.08);
  border-color: rgba(30, 109, 235, 0.3);
}

.final-step {
  background: var(--emerald-bg);
  border-color: rgba(16, 185, 129, 0.4);
}

.step-meta {
  display: flex;
  flex-direction: column;
}

.step-title {
  font-size: 13px;
  font-weight: 600;
  color: #E2E8F0;
}

.step-hint {
  font-size: 10px;
  color: var(--text-dim);
}

.step-amount {
  font-size: 15px;
  font-weight: 700;
}

.pl-divider {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  padding-left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}

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

.data-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #E2E8F0;
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge-approved { background: var(--emerald-bg); color: var(--emerald); }
.badge-pending { background: var(--amber-bg); color: var(--amber); }
.badge-rejected { background: var(--rose-bg); color: var(--rose); }

.badge-in { color: var(--emerald); font-weight: 700; }
.badge-out { color: var(--rose); font-weight: 700; }

.pill-ai-score {
  background: rgba(30, 109, 235, 0.15);
  color: #60A5FA;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

/* Filter Group */
.filter-group {
  display: flex;
  gap: 8px;
}

.filter-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  color: #fff;
  border-color: var(--border-light);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}

/* Search Box */
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  width: 260px;
}

.search-box i {
  color: var(--text-dim);
}

.search-box input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 13px;
  outline: none;
  width: 100%;
}

/* Dividend Slider Section */
.dividend-hero-box {
  background: linear-gradient(180deg, #16223B 0%, #111A2D 100%);
}

.slider-control-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.slider-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.slider-label {
  font-size: 14px;
  font-weight: 700;
  color: #E2E8F0;
}

.slider-value-display {
  font-size: 20px;
  font-weight: 800;
  color: #38BDF8;
}

.custom-slider {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border-light);
  outline: none;
  cursor: pointer;
  accent-color: var(--primary);
}

.slider-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-dim);
}

.dividend-pool-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pool-card {
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--border-color);
}

.pool-dividend {
  background: rgba(30, 109, 235, 0.1);
  border-color: rgba(30, 109, 235, 0.4);
}

.pool-retained {
  background: var(--emerald-bg);
  border-color: rgba(16, 185, 129, 0.4);
}

.pool-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.pool-card h2 {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.pool-sub {
  font-size: 11px;
  color: var(--text-dim);
}

/* Shareholders Grid */
.shareholders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.shareholder-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sh-top-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sh-avatar-pill {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 16px;
}

.sh-name-title {
  flex: 1;
}

.sh-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.sh-role {
  font-size: 11px;
  color: var(--text-dim);
}

.sh-percentage-badge {
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 800;
  color: #38BDF8;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.sh-dividend-payout {
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  padding: 12px;
  border: 1px dashed var(--border-color);
}

.payout-label {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.payout-amount {
  font-size: 18px;
  font-weight: 800;
  color: var(--emerald);
}

/* Levios AI Hub & Copilot */
.copilot-box {
  display: flex;
  flex-direction: column;
  height: 640px;
}

.copilot-chat-window {
  flex: 1;
  overflow-y: auto;
  background: var(--bg-canvas);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 12px;
}

.chat-message {
  display: flex;
  flex-direction: column;
}

.chat-message.assistant .chat-bubble {
  background: #131E33;
  color: #E2E8F0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px 14px 14px 2px;
  align-self: flex-start;
  max-width: 94%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.chat-message.user .chat-bubble {
  background: var(--primary);
  color: #fff;
  border-radius: 14px 14px 2px 14px;
  align-self: flex-end;
  max-width: 88%;
}

.chat-bubble {
  padding: 14px 18px;
  font-size: 13px;
  line-height: 1.65;
  word-break: break-word;
}

/* Rich Markdown Content in AI Chat Bubbles */
.chat-bubble h1,
.chat-bubble h2,
.chat-bubble h3,
.chat-bubble h4 {
  color: #F8FAFC;
  font-weight: 700;
  margin: 12px 0 6px 0;
}
.chat-bubble h1 { font-size: 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 4px; }
.chat-bubble h2 { font-size: 14px; color: #38BDF8; }
.chat-bubble h3 { font-size: 13px; color: #93C5FD; }
.chat-bubble h4 { font-size: 12px; color: #E2E8F0; }

.chat-bubble p {
  margin: 0 0 8px 0;
}
.chat-bubble p:last-child {
  margin-bottom: 0;
}

.chat-bubble ul,
.chat-bubble ol {
  margin: 6px 0 10px 0;
  padding-left: 20px;
}
.chat-bubble li {
  margin-bottom: 4px;
}

.chat-bubble blockquote {
  margin: 10px 0;
  padding: 8px 14px;
  background: rgba(56, 189, 248, 0.08);
  border-left: 3px solid #38BDF8;
  border-radius: 0 6px 6px 0;
  color: #BAE6FD;
  font-style: normal;
}

.chat-bubble table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 12px 0;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.chat-bubble th,
.chat-bubble td {
  padding: 8px 10px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.chat-bubble th {
  background: rgba(255, 255, 255, 0.06);
  color: #38BDF8;
  font-weight: 600;
}
.chat-bubble tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.chat-bubble code {
  background: rgba(0, 0, 0, 0.35);
  color: #F472B6;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
}

.chat-bubble pre {
  background: #090F1D;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 8px 0;
}
.chat-bubble pre code {
  background: transparent;
  color: #E2E8F0;
  padding: 0;
}

.chat-bubble hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 12px 0;
}

.quick-prompts {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.quick-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: #94A3B8;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.quick-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}
.quick-chip.highlight {
  background: rgba(30, 109, 235, 0.15);
  border-color: rgba(30, 109, 235, 0.45);
  color: #60A5FA;
}
.quick-chip.highlight:hover {
  background: rgba(30, 109, 235, 0.28);
  color: #93C5FD;
}

.chat-input-bar {
  display: flex;
  gap: 8px;
}

.chat-input-bar input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #fff;
  font-size: 13px;
  outline: none;
}
.chat-input-bar input:focus {
  border-color: var(--primary);
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-row {
  display: flex;
  gap: 14px;
}

.flex-1 { flex: 1; }

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.form-control {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.ai-json-output {
  background: var(--bg-canvas);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.ai-json-output pre {
  font-family: monospace;
  font-size: 11px;
  color: #38BDF8;
  max-height: 220px;
  overflow-y: auto;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.modal-lg {
  max-width: 840px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
}
.btn-close:hover { color: #fff; }

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
}

.modal-split-view {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
}

.receipt-img-frame {
  background: #000;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.receipt-img-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.no-receipt-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 12px;
}
.no-receipt-box i { font-size: 32px; }

.ai-analysis-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-badge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.ai-verified-pill {
  font-size: 12px;
  font-weight: 700;
  color: #38BDF8;
}

.confidence-pill {
  font-size: 11px;
  font-weight: 700;
  background: var(--emerald-bg);
  color: var(--emerald);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.analysis-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.field-label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
}

.field-val {
  font-size: 13px;
  color: #E2E8F0;
}

.ai-notes-box {
  background: var(--bg-canvas);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 12px;
  color: #CBD5E1;
  line-height: 1.5;
}

/* Utilities */
.text-emerald { color: var(--emerald) !important; }
.text-rose { color: var(--rose) !important; }
.text-primary { color: #60A5FA !important; }
.text-purple { color: #A78BFA !important; }
.text-muted { color: var(--text-muted) !important; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-extrabold { font-weight: 800; }
.mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.text-sm { font-size: 12px; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

/* BRAND LOGO CIRCLE (OFFICIAL TEAM LOGO) */
.brand-logo-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3), 0 0 0 2px rgba(30, 109, 235, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-img-round {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* TOPBAR PDF SHORTCUT BUTTON */
.btn-pdf-export {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.28);
}

.btn-pdf-export:hover {
  background: linear-gradient(135deg, #F87171 0%, #EF4444 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

/* REPORTS & PDF TAB STYLES */
.report-filter-box {
  padding: 22px 26px;
}

.report-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.report-btn-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-download-pdf {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn-download-pdf:hover {
  background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}

.btn-download-pdf.loading {
  opacity: 0.75;
  cursor: wait;
}

.btn-print-native {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-print-native:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: #FFFFFF;
}

.report-filters-grid {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.align-end {
  display: flex;
  align-items: flex-end;
}

/* Category Breakdown List */
.category-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.cat-bar-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cat-bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.cat-bar-title {
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-bar-amt {
  font-weight: 700;
  color: #CBD5E1;
}

.cat-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.cat-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* A4 PRINT & PDF DOCUMENT WRAPPER */
.print-document-wrapper {
  background: #0b1122;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px;
}

.print-toolbar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 14px;
}

.btn-group-sm {
  display: flex;
  gap: 8px;
}

.btn-sm {
  padding: 6px 12px !important;
  font-size: 12px !important;
}

/* THE CORPORATE A4 WHITE PAPER CONTAINER */
.report-paper {
  background: #FFFFFF;
  color: #0F172A;
  max-width: 880px;
  margin: 0 auto;
  padding: 44px 48px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.45;
  box-sizing: border-box;
}

/* Document Header */
.doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

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

.doc-logo-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #E2E8F0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.doc-company-info {
  display: flex;
  flex-direction: column;
}

.doc-brand-title {
  font-size: 20px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.5px;
}

.doc-brand-title span {
  color: #1E6DEB;
}

.doc-corp-name {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.3px;
}

.doc-corp-sub {
  font-size: 11px;
  color: #64748B;
}

.doc-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.doc-meta-item {
  font-size: 11px;
  display: flex;
  gap: 8px;
}

.doc-meta-item .meta-label {
  color: #64748B;
  font-weight: 600;
}

.doc-meta-item .meta-val {
  color: #0F172A;
  font-weight: 700;
}

.doc-meta-badge {
  margin-top: 4px;
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.doc-divider {
  height: 3px;
  background: linear-gradient(90deg, #1E6DEB 0%, #10B981 50%, #E2E8F0 100%);
  margin: 18px 0 22px 0;
  border-radius: 2px;
}

.doc-report-title-area {
  text-align: center;
  margin-bottom: 24px;
}

.doc-main-title {
  font-size: 17px;
  font-weight: 800;
  color: #0F172A;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.doc-subtitle {
  font-size: 12px;
  color: #64748B;
}

/* Corporate KPI Grid in A4 Paper */
.doc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.doc-kpi-card {
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
  display: flex;
  flex-direction: column;
}

.doc-kpi-card.kpi-income {
  background: #F0FDF4;
  border-color: #BBF7D0;
}

.doc-kpi-card.kpi-expense {
  background: #FEF2F2;
  border-color: #FECACA;
}

.doc-kpi-card.kpi-net {
  background: #EFF6FF;
  border-color: #BFDBFE;
}

.doc-kpi-card.kpi-balance {
  background: #FAF5FF;
  border-color: #E9D5FF;
}

.doc-kpi-card .kpi-label {
  font-size: 10px;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.4px;
}

.doc-kpi-card .kpi-value {
  font-size: 16px;
  font-weight: 800;
  margin: 4px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.doc-kpi-card .kpi-sub {
  font-size: 10px;
  color: #64748B;
}

/* Levios AI Box in A4 Paper */
.doc-ai-box {
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-left: 4px solid #1E6DEB;
  border-radius: 4px;
  padding: 14px 16px;
  margin-bottom: 24px;
}

.doc-ai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.doc-ai-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #1E6DEB;
}

.doc-ai-score-pill {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
}

.doc-ai-narrative {
  font-size: 11.5px;
  color: #334155;
  line-height: 1.5;
  margin-bottom: 8px;
}

.doc-ai-recs {
  font-size: 11px;
  color: #1E293B;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  padding: 8px 12px;
}

.doc-ai-recs ul {
  margin: 4px 0 0 16px;
  padding: 0;
}

.doc-ai-recs li {
  margin-bottom: 2px;
}

/* Section Headings */
.doc-section-heading {
  font-size: 12px;
  font-weight: 800;
  color: #1E293B;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.doc-section-heading i {
  color: #1E6DEB;
}

/* Corporate Tables in A4 Paper */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 22px;
  font-size: 11px;
}

.doc-table th {
  background: #F1F5F9;
  color: #334155;
  font-weight: 700;
  text-align: left;
  padding: 7px 8px;
  border: 1px solid #CBD5E1;
  font-size: 10.5px;
}

.doc-table td {
  padding: 6px 8px;
  border: 1px solid #E2E8F0;
  color: #1E293B;
}

.doc-table tbody tr:nth-child(even) {
  background: #F8FAFC;
}

.doc-table tfoot td {
  background: #F1F5F9;
  font-weight: 700;
  border-top: 2px solid #94A3B8;
  border-bottom: 2px solid #94A3B8;
}

.doc-table .font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.doc-table .badge-in-doc {
  color: #059669;
  font-weight: 700;
  background: #ECFDF5;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 9.5px;
}

.doc-table .badge-out-doc {
  color: #DC2626;
  font-weight: 700;
  background: #FEF2F2;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 9.5px;
}

/* Category Progress Bars in Table */
.doc-cat-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.doc-cat-bar-track {
  flex: 1;
  height: 6px;
  background: #E2E8F0;
  border-radius: 9999px;
  overflow: hidden;
}

.doc-cat-bar-fill {
  height: 100%;
  background: #1E6DEB;
  border-radius: 9999px;
}

/* Formal Sign-off Section (Left Aligned for CFO) */
.doc-signoff-section {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  margin-top: 26px;
  margin-bottom: 20px;
  page-break-inside: avoid;
}

.signoff-col {
  width: 250px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 16px;
  border: 1px dashed #CBD5E1;
  border-radius: 8px;
  background: #FAFBFD;
}

.signoff-role {
  font-size: 10px;
  color: #64748B;
  font-weight: 600;
}

.signoff-title {
  font-size: 11px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 8px;
}

.signoff-space {
  height: 60px;
  width: 100%;
  border-bottom: 1px solid #94A3B8;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.signature-img {
  max-height: 52px;
  max-width: 115px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  mix-blend-mode: multiply;
  pointer-events: none;
  filter: contrast(1.15) brightness(0.95);
}

.signoff-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #0F172A;
}

.signoff-date {
  font-size: 10px;
  color: #64748B;
}

/* Confidentiality Notice */
.doc-footer-notice {
  border-top: 1px solid #E2E8F0;
  padding-top: 12px;
  font-size: 9.5px;
  color: #64748B;
  line-height: 1.5;
  text-align: justify;
}

/* PRINT MEDIA QUERIES (DIRECT WINDOW.PRINT) */
@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .sidebar,
  .topbar,
  .report-filter-box,
  .stat-grid,
  .dashboard-split-row,
  .table-responsive,
  .print-toolbar-top,
  .petty-top-action-bar,
  .petty-modal-toolbar,
  nav,
  button {
    display: none !important;
  }

  /* Default print: General executive reports */
  body:not(.printing-petty-cash) .modal-overlay {
    display: none !important;
  }

  body:not(.printing-petty-cash) .tab-pane {
    display: none !important;
  }

  body:not(.printing-petty-cash) #tab-reports {
    display: block !important;
  }

  /* Petty Cash specific print */
  body.printing-petty-cash .tab-pane {
    display: none !important;
  }

  body.printing-petty-cash #tab-reports {
    display: none !important;
  }

  body.printing-petty-cash #pettyCashReportModal {
    display: block !important;
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
    backdrop-filter: none !important;
  }

  body.printing-petty-cash #pettyCashReportModal .modal-card {
    max-width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
  }

  body.printing-petty-cash #pettyCashReportModal .modal-header,
  body.printing-petty-cash #pettyCashReportModal .modal-footer,
  body.printing-petty-cash #pettyCashReportModal .petty-modal-toolbar {
    display: none !important;
  }

  body.printing-petty-cash #pettyCashReportModal .modal-doc-body {
    padding: 0 !important;
    background: transparent !important;
  }

  body.printing-petty-cash #printablePettyCashDocument {
    display: block !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .app-container {
    display: block !important;
  }

  .main-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .print-document-wrapper {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .report-paper {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  @page {
    size: A4 portrait;
    margin: 10mm 10mm 10mm 10mm;
  }

  .doc-table tr,
  .doc-kpi-card,
  .doc-ai-box,
  .doc-signoff-section {
    page-break-inside: avoid !important;
  }
}

/* ==========================================================================
   Kas Kecil (Petty Cash) & Perilisan Dana Styles
   ========================================================================== */
.cyan-gradient .stat-icon {
  background: rgba(6, 182, 212, 0.2) !important;
  color: #22D3EE !important;
}

.petty-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.petty-status-badge.badge-healthy {
  background: var(--emerald-bg);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.petty-status-badge.badge-warning {
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.petty-status-badge.badge-critical {
  background: var(--rose-bg);
  color: var(--rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.petty-mini-progress {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 6px 0 6px 0;
  width: 100%;
}

.petty-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #06B6D4, #3B82F6);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.badge-transfer {
  background: rgba(6, 182, 212, 0.15);
  color: #38BDF8;
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.disburse-info-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 18px;
}

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

.disburse-arrow-col {
  font-size: 20px;
  color: #06B6D4;
  padding: 0 16px;
  display: flex;
  align-items: center;
}

/* Dual Cash Tables & Summaries */
.cash-table-card {
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.main-cash-card {
  border-top: 3px solid #1E6DEB !important;
}
.petty-cash-card {
  border-top: 3px solid #06B6D4 !important;
}

.cash-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.main-pill {
  background: rgba(30, 109, 235, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(30, 109, 235, 0.35);
}
.petty-pill {
  background: rgba(6, 182, 212, 0.15);
  color: #38BDF8;
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.cash-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 14px;
}
.main-summary-bar {
  border-left: 4px solid #1E6DEB;
}
.petty-summary-bar {
  border-left: 4px solid #06B6D4;
}

.summary-metric {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 130px;
}
.metric-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.metric-value {
  font-size: 16px;
  letter-spacing: -0.3px;
}
.summary-metric-divider {
  width: 1px;
  height: 32px;
  background: var(--border-color);
}

.btn-xs {
  padding: 6px 12px;
  font-size: 11px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.btn-xs:hover {
  transform: translateY(-1px);
}

/* ==========================================================================
   Petty Cash Report Modal & Preview Styles
   ========================================================================== */
.modal-xl {
  max-width: 980px !important;
  max-height: 92vh !important;
  height: 90vh;
  display: flex !important;
  flex-direction: column !important;
}

.petty-modal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--border-color);
  gap: 14px;
  flex-wrap: wrap;
}

.modal-doc-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: #060B18;
}

.petty-top-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 14px;
  border-left: 4px solid #06B6D4;
}

.petty-bar-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.petty-action-btns {
  display: flex;
  align-items: center;
  gap: 10px;
}

.petty-report-paper {
  border-top: 5px solid #06B6D4;
}

/* ==========================================================================
   Realtime Live Sync, Kas Kecil Antrean & Photo Preview Lightbox Styles
   ========================================================================== */

/* Topbar Live Sync Pill */
.live-sync-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--emerald);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.live-sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: pulseLiveDot 1.8s infinite;
}

@keyframes pulseLiveDot {
  0% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 4px var(--emerald); }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px var(--emerald); }
  100% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 4px var(--emerald); }
}

/* Antrean Realtime Card */
.petty-realtime-card {
  border-left: 4px solid #06B6D4 !important;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(10, 15, 30, 0.95) 100%) !important;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.08);
}

.live-pulse-badge {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(30, 109, 235, 0.2) 100%);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #38BDF8;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.5px;
}

.badge-pending-counter {
  background: rgba(245, 158, 11, 0.18);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.realtime-status-pill {
  font-size: 11px;
  color: #94A3B8;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Thumbnail Foto Struk di Tabel */
.thumb-wrapper {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  background: #0F172A;
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.thumb-wrapper:hover {
  transform: scale(1.08);
  border-color: #06B6D4;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.5);
}

.receipt-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-zoom-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 11, 24, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.thumb-wrapper:hover .thumb-zoom-overlay {
  opacity: 1;
}

.badge-no-photo {
  font-size: 10px;
  color: #94A3B8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Tombol Aksi di Antrean Realtime */
.btn-action-acc {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  border: none;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-action-acc:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
}

.btn-action-preview {
  background: rgba(6, 182, 212, 0.15);
  color: #38BDF8;
  border: 1px solid rgba(6, 182, 212, 0.35);
  font-weight: 600;
}

.btn-action-preview:hover {
  background: rgba(6, 182, 212, 0.25);
  border-color: #38BDF8;
  transform: translateY(-1px);
}

.btn-receipt-view {
  background: rgba(6, 182, 212, 0.1);
  color: #38BDF8;
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.btn-receipt-view:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: #38BDF8;
  transform: translateY(-1px);
}

/* Efek Animasi Baris Baru yang Masuk (Glow Highlight) */
.highlight-new-row {
  animation: rowHighlightPulse 3s ease forwards;
}

@keyframes rowHighlightPulse {
  0% {
    background-color: rgba(6, 182, 212, 0.35);
    box-shadow: inset 0 0 15px rgba(6, 182, 212, 0.5);
  }
  60% {
    background-color: rgba(6, 182, 212, 0.15);
  }
  100% {
    background-color: transparent;
  }
}

/* Modal Struk & Tools Toolbar */
.receipt-tools-bar {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-tool-sm {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: var(--transition);
}

.btn-tool-sm:hover {
  background: rgba(6, 182, 212, 0.2);
  color: #38BDF8;
  border-color: rgba(6, 182, 212, 0.4);
}

.zoomable-receipt-img {
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
  transition: transform 0.3s ease;
  transform-origin: center center;
  display: block;
  margin: 0 auto;
}

/* Lightbox Modal Photo Viewer */
.modal-photo-viewer {
  max-width: 820px !important;
  width: 90vw;
  background: #0B1120 !important;
  border: 1px solid rgba(6, 182, 212, 0.3) !important;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(6, 182, 212, 0.2) !important;
}

.photo-modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #060B18;
  border-radius: 8px;
  margin: 12px 18px;
}

.photo-viewer-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  background: rgba(15, 23, 42, 0.8);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.viewer-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #E2E8F0;
  border: 1px solid var(--border-color);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
}

.viewer-btn:hover {
  background: #06B6D4;
  color: #FFFFFF;
  border-color: #06B6D4;
}

.photo-canvas-wrapper {
  width: 100%;
  max-height: 520px;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020617;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  padding: 12px;
}

.photo-viewer-img {
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-origin: center center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

/* Toast Notification Styles */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.realtime-toast {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-left: 4px solid #06B6D4;
  backdrop-filter: blur(12px);
  padding: 14px 18px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(6, 182, 212, 0.25);
  color: #FFFFFF;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 320px;
  max-width: 420px;
  animation: slideInToast 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.realtime-toast:hover {
  transform: translateY(-2px);
}

.realtime-toast.closing {
  animation: fadeOutToast 0.4s ease forwards;
}

@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOutToast {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

.toast-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.2);
  color: #22D3EE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toast-desc {
  font-size: 12px;
  color: #CBD5E1;
  line-height: 1.4;
}

.toast-time {
  font-size: 10px;
  color: #94A3B8;
  margin-top: 4px;
}

.toast-close {
  background: transparent;
  border: none;
  color: #64748B;
  cursor: pointer;
  padding: 0 4px;
  font-size: 14px;
}

.toast-close:hover {
  color: #FFFFFF;
}

/* ==========================================================================
   Modul Akumulasi Laba Bersih & Laba Kotor (Profit & Loss Styles)
   ========================================================================== */
.pl-control-header {
  background: linear-gradient(135deg, rgba(30, 109, 235, 0.08) 0%, rgba(6, 182, 212, 0.04) 100%);
  border: 1px solid rgba(30, 109, 235, 0.2);
}

.pl-module-badge {
  background: rgba(30, 109, 235, 0.2);
  color: #60A5FA;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Absorption Bar */
.absorption-bar-wrapper {
  background: #0B1120;
  border: 1px solid #1E293B;
  border-radius: 8px;
  padding: 14px 16px;
}

.absorption-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: #CBD5E1;
  margin-bottom: 10px;
}

.absorption-stacked-bar {
  display: flex;
  height: 18px;
  width: 100%;
  border-radius: 9999px;
  overflow: hidden;
  background: #1E293B;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.bar-slice {
  height: 100%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-cogs {
  background: linear-gradient(90deg, #F43F5E 0%, #E11D48 100%);
}

.bar-opex {
  background: linear-gradient(90deg, #F59E0B 0%, #D97706 100%);
}

.bar-net {
  background: linear-gradient(90deg, #10B981 0%, #059669 100%);
}

.absorption-legend {
  display: flex;
  gap: 20px;
  margin-top: 10px;
  font-size: 11.5px;
  color: #94A3B8;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.dot-cogs { background: #F43F5E; }
.dot-opex { background: #F59E0B; }
.dot-net { background: #10B981; }

/* AI Evaluation Box */
.pl-ai-evaluation-card {
  background: #0B1120;
  border: 1px solid #1E293B;
  border-radius: 8px;
  padding: 14px 16px;
}

.ai-speech-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.ai-avatar-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.2);
  color: #22D3EE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.ai-eval-text {
  font-size: 12.5px;
  line-height: 1.55;
  color: #E2E8F0;
}

/* Ratios Grid */
.pl-ratios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.ratio-cell {
  background: #0B1120;
  border: 1px solid #1E293B;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ratio-label {
  font-size: 10.5px;
  color: #64748B;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ratio-val {
  font-size: 19px;
  font-weight: 800;
  font-family: monospace;
}

.ratio-sub {
  font-size: 10px;
  color: #94A3B8;
}

/* Printable P&L Paper adjustments */
.pl-report-paper {
  background: #FFFFFF !important;
  color: #0F172A !important;
}

#profitLossReportModal .doc-report-title-area {
  text-align: center;
  margin: 14px 0 20px 0;
}

#profitLossReportModal .doc-main-title {
  font-size: 17px;
  font-weight: 800;
  color: #0F172A !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

#profitLossReportModal .doc-subtitle {
  font-size: 11.5px;
  color: #475569 !important;
  line-height: 1.5;
  margin: 0;
}

.doc-kpi-card .kpi-sub,
.doc-kpi-card .kpi-hint {
  font-size: 10px;
  color: #64748B !important;
}

/* User Management Module Styling */
.badge-dept {
  font-size: 11px;
  background: rgba(56, 189, 248, 0.12);
  color: #38BDF8;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-role {
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.claimant-profile-card {
  transition: var(--transition);
}

.claimant-profile-card:hover {
  border-color: #38BDF8 !important;
  background: rgba(30, 109, 235, 0.12) !important;
}

#deliverMessageText:focus {
  border-color: #10B981 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
}

.btn-c-level {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #0F172A !important;
  font-weight: 700 !important;
  border: none !important;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
  font-size: 13px;
  transition: all 0.2s ease;
}

.btn-c-level:hover {
  background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
}

.btn-c-level i {
  color: #0F172A !important;
}


