/* ============================================================
   PAGES.CSS - Style spesifik per halaman
   (landing, dashboard, akun, pricing, hutang, produk, dll)
   ============================================================ */

/* Landing Login */
#landing-page {
  display: none;
  flex-direction: column;
  height: 100dvh;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 55%, #1e3a8a 100%);
  padding: 0 20px 24px;
  box-sizing: border-box;
  overflow-y: auto;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
}

#landing-page.active {
  display: flex;
}

.landing-hero {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 0 28px;
  text-align: center;
}

.landing-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.landing-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.landing-tagline {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  font-weight: 400;
}

.landing-card {
  background: #fff;
  border-radius: 20px 20px 16px 16px;
  padding: 24px 20px 20px;
  box-shadow: 0 -4px 40px rgba(0,0,0,0.15);
}

[data-theme="dark"] .landing-card {
  background: var(--card-bg);
}

.landing-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  text-align: center;
}

.landing-footer-links {
  text-align: center;
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.landing-footer-links a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.land-error {
  margin-bottom: 10px;
  padding: 10px;
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid var(--danger);
  border-radius: 6px;
  color: var(--danger);
  font-size: 0.82rem;
}

/* Landing Lupa Password */
.land-forgot-group {
  text-align: right;
  margin-bottom: 12px;
}

.land-forgot-link {
  font-size: 0.85rem;
  color: var(--primary);
  text-decoration: none;
}

/* Landing Legal Footer */
.landing-legal-footer {
  text-align: center;
  padding: 20px 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

.landing-legal-links {
  margin-bottom: 8px;
}

.landing-legal-links a {
  color: var(--primary);
  text-decoration: none;
  margin: 0 6px;
}


/* === POWER BI STYLE: ADVANCED ANALYSIS === */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--bg-card, #ffffff);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border: 1px solid var(--border, #e2e8f0);
}

.kpi-label { 
  font-size: 0.75rem; 
  color: var(--text-secondary); 
  margin-bottom: 4px; 
}

.kpi-value { 
  font-size: 1.2rem; 
  font-weight: 700; 
  color: var(--text-primary); 
  margin-bottom: 8px; 
}

.kpi-target { 
  font-size: 0.7rem; 
  color: var(--text-secondary); 
  margin-bottom: 6px; 
}

.progress-track {
  background: #e2e8f0;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.progress-fill.success { 
  background: #10b981; 
}

.progress-fill.warning { 
  background: #f59e0b; 
}

.progress-fill.danger { 
  background: #ef4444; 
}

.abc-item {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border, #e2e8f0);
  font-size: 0.8rem;
}

.abc-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  margin-right: 12px;
  font-size: 0.7rem;
}

.abc-badge.a { 
  background: #10b981; 
}

.abc-badge.b { 
  background: #f59e0b; 
}

.abc-badge.c { 
  background: #94a3b8; 
}

.abc-name { 
  flex: 1; 
}

.abc-sales { 
  font-weight: 600; 
}

.turnover-card {
  background: var(--bg-card, #ffffff);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border: 1px solid var(--border, #e2e8f0);
}

.turnover-value { 
  font-size: 2rem; 
  font-weight: 800; 
  margin: 10px 0; 
}

.turnover-status { 
  font-size: 0.85rem; 
  font-weight: 600; 
  padding: 4px 12px; 
  border-radius: 12px; 
  display: inline-block; 
}

.turnover-status.excellent { 
  background: #d1fae5; 
  color: #065f46; 
}

.turnover-status.good { 
  background: #fef3c7; 
  color: #92400e; 
}

.turnover-status.warning { 
  background: #fee2e2; 
  color: #991b1b; 
}

/* What-If Simulator */
input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;  
  background: #e2e8f0;
  outline: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.sim-recommendation {
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

.sim-recommendation.good { 
  background: #d1fae5; 
  color: #065f46; 
}

/* Customer Lifetime Value */
.clv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.clv-card {
  background: var(--bg-card, #fff);
  border-radius: 12px;
  padding: 16px;  
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border: 1px solid var(--border, #e2e8f0);
  position: relative;
  overflow: hidden;
}

.clv-tier-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  color: white;
}

.clv-tier-badge.platinum { 
  background: linear-gradient(135deg, #6366f1, #8b5cf6); 
}

.clv-tier-badge.gold { 
  background: linear-gradient(135deg, #f59e0b, #d97706); 
}

.clv-tier-badge.silver { 
  background: linear-gradient(135deg, #94a3b8, #64748b); 
}

.clv-tier-badge.bronze { 
  background: linear-gradient(135deg, #a8a29e, #78716c); 
}

.clv-name { 
  font-size: 1rem; 
  font-weight: 700; 
  margin-bottom: 4px; 
  padding-right: 60px; 
}

.clv-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }

.clv-stat-label { font-size: 0.65rem; color: var(--text-secondary); }

.clv-stat-value { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }

.clv-projected {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border, #e2e8f0);
  text-align: center;
}

.clv-projected-label { font-size: 0.7rem; color: var(--text-secondary); }

.clv-projected-value { font-size: 1.2rem; font-weight: 800; color: var(--primary); margin-top: 4px; }

/* === DRILL-DOWN CHART === */
.drilldown-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--bg-card, #fff);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.drilldown-back-btn:hover {
  background: var(--primary);
  color: white;  border-color: var(--primary);
}

.drilldown-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

/* === PERBANDINGAN OMZET (MoM) === */
.mom-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--bg-card, #fff);
  border-radius: 12px;
  border: 1px solid var(--border, #e2e8f0);
  margin-bottom: 12px;
}

.mom-left { flex: 1; }

.mom-label { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 4px; }

.mom-value { font-size: 1.3rem; font-weight: 800; color: var(--text-primary); }

.mom-right { text-align: right; min-width: 100px; }

.mom-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}

.mom-badge.naik { background: #d1fae5; color: #065f46; }

.mom-badge.turun { background: #fee2e2; color: #991b1b; }

.mom-badge.sama { background: #f1f5f9; color: #64748b; }

.mom-subtitle { font-size: 0.7rem; color: var(--text-secondary); margin-top: 4px; }

/* === FIX DROPDOWN KASIR === */
.search-dropdown {
  position: relative;
  width: 100%;
}

.dropdown-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  display: none;
}

.dropdown-results.show {
  display: block;
}

.dropdown-item {
  padding: 12px 14px;
  cursor: pointer;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
  transition: background 0.15s;
}

.dropdown-item:last-child {  border-bottom: none;
}

.dropdown-item:hover,
.dropdown-item:active {
  background: rgba(37, 99, 235, 0.08);
}

.dropdown-item.create-new {
  color: var(--primary);
  font-weight: 600;
  background: rgba(37, 99, 235, 0.04);
}

.dropdown-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Dark mode support */
[data-theme="dark"] .dropdown-results {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .dropdown-item:hover {
  background: rgba(37, 99, 235, 0.15);
}

/* ===== WELCOME BANNER INNER ===== */
.welcome-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.welcome-text {
  flex: 1;
}

.welcome-greeting {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.welcome-datetime {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-bottom: 6px;
}

.welcome-stock-alert {
  font-size: 0.8rem;
  opacity: 0.85;
}

.welcome-icon {
  font-size: 2.5rem;
  opacity: 0.3;
}

/* === TOGGLE SWITCH (PENGATURAN) === */
.toggle {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--border);
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.3s ease;
  flex-shrink: 0;
  display: inline-block;
}

.toggle.active {
  background: var(--primary);
}

.toggle::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  background: #ffffff;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
}

.toggle.active::after {
  transform: translateX(22px);
}

/* === DAILY ACTION CARD === */
#daily-action-card {
  margin-top: 18px !important;
  padding-top: 16px !important;
}

.daily-action-section:first-child {
  margin-top: 4px;
  padding-bottom: 0;
  border-bottom: none;
}

.daily-action-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.daily-action-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.target-progress-bar {
  height: 12px;
  background: var(--bg, #f8fafc);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}

.target-progress-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.target-progress-fill.success { background: var(--success, #10b981); }

.target-progress-fill.warning { background: var(--warning, #f59e0b); }

.target-progress-fill.danger { background: var(--danger, #ef4444); }

.target-info {
  display: flex;  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Alert boxes */
.alert-box {
  padding: 10px 12px;
  border-left: 4px solid;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.alert-box.critical {
  background: rgba(239, 68, 68, 0.05);
  border-color: var(--danger, #ef4444);
}

.alert-box.success {
  background: rgba(16, 185, 129, 0.05);
  border-color: var(--success, #10b981);
}

.alert-box.warning {
  background: rgba(245, 158, 11, 0.05);
  border-color: var(--warning, #f59e0b);
}

.alert-box.info {
  background: rgba(99, 102, 241, 0.05);
  border-color: var(--primary, #2563eb);
}

/* Edit target button */
.btn-edit-target {
  background: var(--primary, #2563eb);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
  transition: all 0.2s ease;
}

.btn-edit-target:hover {
  transform: translateY(-1px);  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Welcome Banner */
.welcome-banner {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.welcome-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.welcome-banner:active {
  transform: translateY(0);
}

/* ===== FORGOT MESSAGE ===== */
.forgot-message {
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

/* ===== FORGOT BACK LINK ===== */
.forgot-back {
  text-align: center;
  margin-top: 12px;
}

.forgot-back-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* === KARTU HARGA === */
.pricing-card {
  border: 2px solid var(--warning);
  border-radius: 12px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(255, 255, 255, 0.05));
}

.pricing-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

.pricing-info {
  flex: 1;
}

.pricing-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.pricing-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.pricing-price {
  text-align: right;
}

.price-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--warning);
  line-height: 1.2;
}

.price-period {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.pricing-features li {
  position: relative;
  padding: 10px 0 10px 32px;
  font-size: 0.9rem;
  color: var(--text-primary, #1a202c);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  line-height: 1.5;
  transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.pricing-features li:hover {
  padding-left: 36px;
  color: var(--primary, #2563eb);
}

.pricing-features li:hover::before {
  transform: translateY(-50%) scale(1.1);
}

.pricing-features li:last-child {
  border-bottom: none;
}

/* Bullet checkmark premium */
.pricing-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.pricing-cta {
  text-align: center;
  padding: 12px;
  background: linear-gradient(135deg, var(--warning), #d97706);
  color: white;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 480px) {
.pricing-header {
  flex-direction: column;
}

.pricing-price {
  text-align: left;
  margin-top: 12px;
}

.price-amount {
  font-size: 1.25rem;
}
}

/* === AKUN PROFILE LAYOUT === */
.account-profile-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
}

.avatar-container {
  position: relative;
  margin-bottom: 16px;
}

.avatar-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  font-weight: 700;
  overflow: hidden;
  border: 4px solid white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-upload-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  background: #f59e0b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.account-info {
  width: 100%;
}

#account-name {
  margin: 0 0 4px 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a202c;
  word-break: break-word;
}

#account-email {
  margin: 0 0 12px 0;
  font-size: 0.9rem;
  color: #6b7280;
  word-break: break-word;
}

#account-status {
  display: flex;
  justify-content: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-badge.free {
  background: #f3f4f6;
  color: #6b7280;
}

.status-badge.premium {
  background: #fef3c7;
  color: #d97706;
}

/* === HALAMAN AKUN === */
.account-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  flex-shrink: 0;
}

.account-details {
  flex: 1;
}

#account-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  justify-content: center;
}

#account-email {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

#account-status {
  display: flex;
  justify-content: center;
  margin-top: 8px;
  display: inline-block;
}

.account-profile-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
}

.avatar-container {
  position: relative;
  margin-bottom: 16px;
}

#land-forgot-group a {
  text-decoration: none;
  transition: opacity 0.2s;
}

#land-forgot-group a:hover {  
  opacity: 0.7;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
.account-profile-wrapper {
  flex-direction: column;
  text-align: center;  }
  
.account-info h2 {
  margin: 0 0 4px 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a202c;
  word-break: break-word;
}

.account-info p {
  text-align: center;
  word-break: break-word;
  margin: 0 0 8px 0;
  font-size: 0.9rem;
  color: var(--text-secondary, #6b7280);
}
}


/* ===== EXPORT PAGE (BARU) ===== */
.export-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.export-summary-item:last-child {
  border-bottom: none;
}

.export-summary-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.export-summary-value {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.export-summary-value.success {
  color: var(--success);
}

.export-summary-value.primary {
  color: var(--primary);
}

/* ===== LINIMASA / TIMELINE (BARU) ===== */
.timeline-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.timeline-content {
  flex: 1;
  min-width: 0;
}

.timeline-title {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.timeline-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.timeline-time {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.timeline-item.transaction .timeline-icon {
  background: var(--primary-light);
}

.timeline-item.achievement .timeline-icon {
  background: rgba(245, 158, 11, 0.1);
}

.timeline-item.stock_warning .timeline-icon {
  background: rgba(245, 158, 11, 0.1);
}

.timeline-item.stock_empty .timeline-icon {
  background: rgba(239, 68, 68, 0.1);
}

/* ===== CASH FLOW INSIGHT (BARU) ===== */
.cashflow-card {
  background: linear-gradient(    135deg,
    var(--primary-light),
    rgba(16, 185, 129, 0.05)
  );
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  border-left: 4px solid var(--primary);
}

.cashflow-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 0.9rem;
}

.cashflow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.cashflow-item {
  background: var(--card-bg);
  padding: 10px;
  border-radius: 8px;
  text-align: center;
}

.cashflow-item-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.cashflow-item-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

/* ===== PERIOD FILTER CARD ===== */
.period-filter-card {
  margin: 0 16px 12px 16px;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.period-filter-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.period-select {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
}

/* ===== CUSTOM DATE RANGE ===== */
.custom-date-range {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.date-input {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
}

/* ===== ACHIEVEMENT SUMMARY (PROFIL) ===== */
.achievement-summary {
  text-align: center;
}

.achievement-count-big {
  font-size: 2rem;
  font-weight: 700;
  color: var(--warning);
}

.achievement-count-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.achievement-detail-btn {
  margin-top: 10px;
}

/* ===== UPGRADE CARD ===== */
.upgrade-desc {
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-size: 0.9rem;
}

/* ===== CUSTOMER ID PREVIEW ===== */
.customer-id-preview {
  background: var(--bg);
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.customer-id-label {
  color: var(--text-secondary);
}

.customer-id-value {
  color: var(--primary);
  margin-left: 6px;
}

/* ===== SIMULATOR SELECT ===== */
.sim-product-select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

/* ===== RESET WARNING ===== */
.reset-warning {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

/* ===== TENTANG APP HEADER ===== */
.tentang-app-icon {
  font-size: 3rem;
  margin-bottom: 8px;
}

.tentang-app-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}

.tentang-app-version {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ===== TENTANG LIST ===== */
.tentang-list {
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.tentang-list-item {
  margin-bottom: 6px;
}

/* ===== TENTANG STEPS ===== */
.tentang-steps {
  font-size: 0.85rem;
  line-height: 2;
  color: var(--text-secondary);
}

/* ===== TENTANG DESC ===== */
.tentang-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* ===== TENTANG EMAIL ===== */
.tentang-email {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ===== TENTANG LEGAL LIST ===== */
.tentang-legal-list {
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.tentang-legal-item {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.link-primary {
  color: var(--primary);
}

/* ===== TENTANG FOOTER ===== */
.tentang-footer {
  text-align: center;
  padding: 20px 0 40px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.doc-legal-list {
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.doc-legal-item { margin-bottom: 8px; }

.doc-legal-link {
  color: var(--primary);
  font-weight: 600;
}

.doc-legal-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
}

/* ===== PRICE MODE OPTIONS ===== */
.price-mode-options {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* ===== MARKUP SECTION ===== */
.markup-section {
  background: var(--bg);
  padding: 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}

/* ===== PRICE PREVIEW ===== */
.price-preview-row {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.price-preview-value { color: var(--primary); }

/* ===== PRICE WARNING ===== */
.price-warning {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 4px;
}

/* ===== RESTOCK MODAL ===== */
.restock-product-info {
  margin-bottom: 16px;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
}

.restock-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.restock-product-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.restock-stocks {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.restock-stock-item { flex: 1; }

.restock-current {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--warning);
}

.restock-new {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--success);
}

/* ===== TOMBOL TAMBAH BARANG / TAMBAH STOK (HEADER) ===== */
.btn-add-product {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-add-product:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(37, 99, 235, 0.4);
}

.btn-add-product:active {
  transform: translateY(0);
}

.btn-add-icon {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

/* Badge status di tabel stok */
.stock-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.stock-status-badge.safe {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}

.stock-status-badge.low {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.stock-status-badge.empty {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

/* Tombol aksi di tabel stok */
.btn-restock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-restock:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* ===== KPI CARD HEADER (BEDAH TOKO - TARGET EDIT) ===== */
.kpi-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.kpi-card-header .kpi-label {
  margin-bottom: 0;
}

/* ===== SIMULATOR COBA-COBA HARGA (REDESIGN) ===== */
.sim-product-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.sim-product-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.sim-product-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.sim-price-now {
  text-align: right;
  flex-shrink: 0;
}

.sim-price-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.sim-price-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* Slider */
.sim-slider-section {
  margin-bottom: 14px;
}

.sim-slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.sim-slider-badge {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.sim-slider-badge.up   { background: rgba(16,185,129,0.12); color: var(--success); border-color: var(--success); }

.sim-slider-badge.down { background: rgba(239,68,68,0.12);  color: var(--danger);  border-color: var(--danger);  }

.sim-slider {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}

.sim-slider-hints {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Harga baru row */
.sim-new-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 0.85rem;
}

.sim-new-price-label { color: var(--text-secondary); }

.sim-new-price-value {
  font-weight: 700;
  font-size: 1rem;
}

.sim-new-price-value.up   { color: var(--success); }

.sim-new-price-value.down { color: var(--danger); }

/* Hasil simulasi */
.sim-result-rows { margin-bottom: 12px; }

.sim-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.sim-result-row:last-child { border-bottom: none; }

.sim-result-total {
  font-size: 0.95rem;
  padding-top: 12px;
}

.sim-result-total strong { color: var(--success); font-size: 1rem; }

/* Verdict / kesimpulan */
.sim-verdict {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 4px;
  background: var(--bg);
  color: var(--text-secondary);
}

.sim-verdict.success { background: rgba(16,185,129,0.1);  color: #065f46; }

.sim-verdict.warning { background: rgba(245,158,11,0.1);  color: #92400e; }

.sim-verdict.danger  { background: rgba(239,68,68,0.1);   color: #991b1b; }

/* ===== CHECKOUT MODAL ===== */
.checkout-total-box {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark, #1d4ed8));
  color: white;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
}

.checkout-total-label {
  font-size: 0.8rem;
  opacity: 0.85;
  margin-bottom: 4px;
}

.checkout-total-value {
  font-size: 1.6rem;
  font-weight: 800;
}

/* Kembalian */
.kembalian-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(16, 185, 129, 0.08);
  border-radius: 8px;
  font-size: 0.9rem;
}

.kembalian-value {
  font-size: 1.05rem;
  color: var(--success);
}

/* Badge hutang di struk */
.receipt-hutang-badge {
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  margin: 8px 0;
}

.receipt-hutang-badge-sm {
  font-size: 0.7rem;
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
  padding: 2px 7px;
  border-radius: 6px;
  margin-left: 6px;
  font-weight: 600;
  vertical-align: middle;
}

/* ===== HUTANG PELANGGAN ===== */
.hutang-item {
  background: var(--bg);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  border-left: 3px solid var(--warning);
}

.hutang-item.overdue {
  border-left-color: var(--danger);
  background: rgba(239, 68, 68, 0.04);
}

.hutang-item- {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.hutang-total {
  font-size: 1rem;
  font-weight: 700;
  color: var(--warning);
  white-space: nowrap;
}

.hutang-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.hutang-jatuh-tempo {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.hutang-lunas-at {
  font-size: 0.78rem;
  color: var(--success);
  margin-top: 6px;
}

/* Badge status hutang */
.hutang-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 6px;
  vertical-align: middle;
}

.hutang-badge.aktif       { background: rgba(37,99,235,0.1);   color: var(--primary); }

.hutang-badge.jatuh-tempo { background: rgba(239,68,68,0.12);  color: var(--danger); }

.hutang-badge.hampir      { background: rgba(245,158,11,0.12); color: var(--warning); }

.hutang-badge.lunas       { background: rgba(16,185,129,0.12); color: var(--success); }

/* ===== PRODUK STAT (BERANDA - KONDISI PRODUK) ===== */
.produk-stat-group {
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.produk-stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.produk-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}

.produk-stat-row:last-child { border-bottom: none; }

.produk-stat-val {
  font-weight: 700;
  font-size: 0.82rem;
}

.produk-stat-val.success  { color: var(--success); }

.produk-stat-val.danger   { color: var(--danger); }

.produk-stat-val.secondary { color: var(--text-secondary); }

.produk-stat-more {
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding-top: 4px;
  font-style: italic;
}

