/* Stylesheet SPP BHP Billing ISR Komdigi */
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,400&display=swap');

:root {
  --font-family-sans-serif: 'Nunito Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --color-primary: #2962ff;
  --color-primary-dark: #1e4fd6;
  --color-primary-light: #e8eeff;
  --color-success: #0bb7af;
  --color-success-light: #e6fffa;
  --color-danger: #f64e60;
  --color-danger-light: #ffe2e5;
  --color-warning: #fbcd00;
  --color-warning-light: #fff8dd;
  --color-info: #35b1e8;
  --color-info-light: #e5f5fc;
  --color-dark: #272b34;
  --color-gray-dark: #323743;
  --color-gray-light: #f4f6fa;
  --color-border: #e2e8f0;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family-sans-serif);
  background-color: #f4f6fa;
  color: #334155;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==========================================================================
   LOGIN PAGE STYLES (Identik dengan billing-isr.komdigi.go.id/login)
   ========================================================================== */
.login-container {
  min-height: 100vh;
  display: flex;
  width: 100%;
}

.login-left-pane {
  flex: 1;
  background-image: url('assets/radio-tower-bg.097bc8db.jpg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.login-left-pane::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(10, 25, 47, 0.82) 0%, rgba(20, 60, 120, 0.75) 100%);
  z-index: 1;
}

.login-left-content {
  position: relative;
  z-index: 2;
  max-width: 580px;
  text-align: center;
  color: #ffffff;
}

.login-left-content img {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.login-left-content img:hover {
  transform: scale(1.02);
}

.login-title-h2 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 2px;
  margin-top: 1.25rem;
  margin-bottom: 0.25rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.login-subtitle-h4 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #93c5fd;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.login-quote {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #e2e8f0;
  text-align: justify;
  text-justify: inter-word;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  padding: 1.5rem;
  border-radius: 12px;
  border-left: 4px solid #38bdf8;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.login-right-pane {
  flex: 1;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
}

.login-card {
  width: 100%;
  max-width: 440px;
}

.btn-primary-komdigi {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 1.5px;
  transition: all 0.25s ease;
}

.btn-primary-komdigi:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  box-shadow: 0 4px 14px rgba(41, 98, 255, 0.4);
  transform: translateY(-1px);
}

/* ==========================================================================
   DASHBOARD MAIN LAYOUT
   ========================================================================== */
.app-header {
  height: 68px;
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.sidebar {
  width: 260px;
  background-color: #0f172a;
  min-height: calc(100vh - 68px);
  color: #94a3b8;
  transition: all 0.3s ease;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  color: #cbd5e1;
  font-size: 0.925rem;
  font-weight: 600;
  border-radius: 8px;
  margin: 0.25rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.sidebar-nav-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sidebar-nav-item.active {
  background: linear-gradient(90deg, #2962ff 0%, #1e4fd6 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(41, 98, 255, 0.35);
}

.sidebar-nav-item i {
  font-size: 1.15rem;
  width: 24px;
  margin-right: 0.75rem;
}

/* KPI Cards */
.kpi-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.kpi-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.kpi-card.kpi-blue::after { background-color: var(--color-primary); }
.kpi-card.kpi-green::after { background-color: var(--color-success); }
.kpi-card.kpi-red::after { background-color: var(--color-danger); }
.kpi-card.kpi-amber::after { background-color: var(--color-warning); }
.kpi-card.kpi-purple::after { background-color: #8b5cf6; }

/* Status Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-paid {
  background-color: var(--color-success-light);
  color: #0d9488;
  border: 1px solid #99f6e4;
}

.badge-not-paid {
  background-color: var(--color-danger-light);
  color: #e11d48;
  border: 1px solid #fecdd3;
}

.badge-reminder {
  background-color: var(--color-warning-light);
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-annual {
  background-color: var(--color-primary-light);
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.badge-new {
  background-color: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.badge-renewal {
  background-color: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}

.badge-additional {
  background-color: #f0fdfa;
  color: #0d9488;
  border: 1px solid #99f6e4;
}

/* Tables */
.spp-table th {
  background-color: #f8fafc;
  color: #475569;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid #e2e8f0;
}

.spp-table td {
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}

.spp-table tbody tr:hover {
  background-color: #f8faff;
}

/* SPP Invoice Print Slip & AI Executive Report */
@media print {
  body.printing-ai-report * {
    visibility: hidden;
  }
  body.printing-ai-report #aiPrintReportModal,
  body.printing-ai-report #aiPrintReportModalContent,
  body.printing-ai-report #aiPrintReportModalContent * {
    visibility: visible;
  }
  body.printing-ai-report #aiPrintReportModalContent {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 15px;
    box-shadow: none;
    border: none;
    background: #ffffff !important;
    color: #0f172a !important;
  }

  body:not(.printing-ai-report) * {
    visibility: hidden;
  }
  body:not(.printing-ai-report) #sppModalContent, 
  body:not(.printing-ai-report) #sppModalContent * {
    visibility: visible;
  }
  body:not(.printing-ai-report) #sppModalContent {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
    box-shadow: none;
    border: none;
  }
  .no-print {
    display: none !important;
  }
}

/* AI Component Styles */
.ai-badge-gradient {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
}

.ai-card-glow {
  box-shadow: 0 4px 20px -2px rgba(99, 102, 241, 0.12), 0 2px 6px -1px rgba(168, 85, 247, 0.08);
}

.ai-chat-user {
  background: #2962ff;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.ai-chat-bot {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  border-bottom-left-radius: 4px;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

