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


html, body {
  font-size: 0.925rem;
  margin: 0;
  padding: 0;
  min-height: 100%;
  height: 100%;
}

*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  /* Ultra-Premium Palette */
  --primary: #2D4159;
  --primary-light: #4A607e;
  --primary-dark: #1a2c3f;
  --accent: #F6B17A;
  --accent-hover: #e59a5f;

  --bg-gradient-start: #f8faff;
  --bg-gradient-end: #edf2f7;

  --text-main: #2D3748;
  --text-muted: #718096;

  --surface-white: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.5);

  --shadow-sm: 0 2px 4px rgba(45, 65, 89, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(45, 65, 89, 0.1), 0 2px 4px -1px rgba(45, 65, 89, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(45, 65, 89, 0.1), 0 4px 6px -2px rgba(45, 65, 89, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(45, 65, 89, 0.1), 0 10px 10px -5px rgba(45, 65, 89, 0.04);
}

.text-premium {
  color: var(--primary) !important;
}

.hover-underline:hover {
  text-decoration: underline !important;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at top right, #1e3c72, #2a5298);
  background-attachment: fixed;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  margin: 0;
  padding: 0;
}

body.bg-light {
  padding-top: 76px;
}

/* Landing page & login: full-height flex center */
body.landing-page-body,
body.login-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 0 !important;
}

/* FIX: navbar — fixed top for internal pages */
nav.navbar,
nav.navbar.sticky-top {
  position: fixed !important;
  width: 100% !important;
  left: 0 !important;
  top: 0 !important;
  margin: 0 !important;
  z-index: 1050 !important;
}

.sticky-top {
  position: fixed !important;
  width: 100% !important;
  left: 0 !important;
  top: 0 !important;
  z-index: 1050 !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: url("background.webp") no-repeat center center fixed;
  background-size: cover;
  opacity: 0.8;
  z-index: -1;
  filter: contrast(90%) brightness(90%);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: -0.025em;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary-light);
}

/* ====== COMPONENTS ====== */

/* Card Premium */
.card-premium {
  background: var(--surface-white);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.card-premium:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card-premium .card-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-bottom: none;
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.card-premium .card-body {
  padding: 1.5rem;
}


/* Buttons */
.btn-premium {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: 1px solid transparent;
  font-weight: 500;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  min-width: 100px;
}

.btn-premium:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.btn-outline-premium {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 100px;
}

.btn-outline-premium:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline-warning {
  transition: all 0.3s ease;
}

.btn-outline-warning:hover {
  background: #ffc107 !important;
  color: #000 !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #ffc107 !important;
}



.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #e29e64 100%);
  color: #fff;
  border: none;
  padding: 0.6rem 1.5rem;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.btn-accent:hover {
  background: linear-gradient(135deg, #e29e64 0%, var(--accent) 100%);
  transform: translateY(-2px);
  color: white;
}

/* Badge */
.badge-custom {
  background: rgba(246, 177, 122, 0.15);
  color: #bf7335;
  border: 1px solid rgba(246, 177, 122, 0.3);
  padding: 0.35em 0.8em;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.75rem;
}

.badge-success-custom {
  background: rgba(33, 156, 85, 0.1) !important;
  color: #1a7a42 !important;
  border: 1px solid rgba(33, 156, 85, 0.2);
}

/* Inputs */
.form-control,
.form-select {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 65, 89, 0.1);
}

/* Table */
.table-custom {
  background: white;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.table-custom thead th {
  background: #f1f5f9;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 1rem;
  border-bottom: 2px solid #e2e8f0;
}

.table-custom tbody tr td {
  padding: 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}

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

.table-custom tbody tr:hover {
  background-color: #f8fafc;
}


/* ====== LOGIN PAGE ====== */
body.login-page {
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.login-glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  max-width: 1000px;
  width: 90%;
  display: flex;
}

.login-left {
  flex: 1;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255, 255, 255, 0.4);
}

.login-right {
  flex: 1;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.login-right::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

.login-right>* {
  position: relative;
  z-index: 1;
}

.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: white;
  border: 1px solid #e2e8f0;
  padding: 12px;
  border-radius: 8px;
  color: #1f2937;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}

.google-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

/* ====== TIMELINE ====== */
.timeline {
  position: relative;
  padding-left: 24px;
  margin-top: 1rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 2px;
  background: #e2e8f0;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: -23px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 65, 89, 0.1);
}

.timeline-content {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid #f1f5f9;
}

/* Responsive adjustment */
@media (max-width: 768px) {
  .login-glass-card {
    flex-direction: column;
    max-height: 90vh;
    /* Prevent overflow on small screens */
    overflow-y: auto;
  }

  .login-left,
  .login-right {
    padding: 2rem;
  }

  .login-right {
    min-height: 200px;
  }

  /* Force button container below table */
  .table-responsive+div,
  .position-relative+div {
    clear: both !important;
    display: block !important;
    float: none !important;
  }

  /* Prevent any floating inside modal */
  .modal-body .text-center {
    clear: both;
    float: none;
  }

}

/* DataTables Pagination Customization */
.page-item.active .page-link {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: white !important;
}

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

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

.dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 0 !important;
  margin: 0 2px !important;
  border: none !important;
  background: transparent !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  border: none !important;
  background: transparent !important;
}

.dataTables_wrapper .dataTables_info {
  font-size: 0.8rem !important;
  color: #6c757d !important;
  padding-top: 0.5rem !important;
}

/* ====== ANIMATIONS ====== */

@keyframes skeleton-loading {
  0% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0 50%;
  }
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
  display: inline-block;
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
  width: 100%;
}

.skeleton-title {
  height: 1.5rem;
  margin-bottom: 1rem;
  width: 60%;
}

.skeleton-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInScale 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.hover-lift {
  transition: transform 0.2s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl) !important;
}

/* ====== UTILITIES ====== */

.sticky-lg-top-offset {
  position: sticky;
  top: 90px;
  /* Offset for navbar */
  z-index: 10;
}

.bg-glass {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* ====== DOCUMENT (INVOICE & RECEIPT) STYLES ====== */

.invoice-card,
.receipt-card {
  background: #fff;
  padding: 50px;
  border-radius: 8px;
  position: relative;
  max-width: 900px;
  margin: 40px auto;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

/* Modal specific override to remove shadow and margin */
.modal-body .invoice-card,
.modal-body .receipt-card {
  box-shadow: none !important;
  margin: 0 auto !important;
  padding: 40px;
  max-width: none;
}

.invoice-header,
.receipt-header {
  border-bottom: 2px solid #eee;
  margin-bottom: 30px;
  padding-bottom: 20px;
}

.invoice-title,
.receipt-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.lab-brand {
  text-align: right;
}

.lab-brand h5 {
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--primary);
}

.lab-brand p {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0;
  line-height: 1.4;
}

.info-grid {
  margin-bottom: 30px;
}

.info-label {
  font-weight: 600;
  color: #555;
  width: 180px;
  display: inline-block;
}

.info-value {
  color: #333;
}

.table-invoice,
.table-receipt {
  width: 100%;
  margin-bottom: 30px;
  border-collapse: collapse;
}

.table-invoice th,
.table-receipt th {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  padding: 12px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  text-align: center;
}

.table-invoice td,
.table-receipt td {
  border: 1px solid #dee2e6;
  padding: 10px 12px;
  font-size: 0.85rem;
}

.summary-table {
  width: 100%;
  margin-top: 10px;
}

.summary-table td {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.summary-label {
  text-align: right;
  font-weight: 600;
  color: #555;
}

.summary-value {
  text-align: right;
  width: 180px;
  font-weight: 700;
  color: var(--primary);
}

.total-row {
  background-color: #f8f9fa;
}

.total-row .summary-label {
  font-size: 0.95rem;
  color: var(--primary);
}

.total-row .summary-value {
  font-size: 1.05rem;
  color: #d63384;
}

.receipt-card .total-row .summary-value {
  color: #198754;
}

.paid-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  border: 5px solid #198754;
  color: #198754;
  font-weight: 800;
  padding: 20px 40px;
  font-size: 3.5rem;
  text-transform: uppercase;
  opacity: 0.1;
  border-radius: 12px;
  pointer-events: none;
  z-index: 0;
}

.btn-print {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-print:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  color: white;
}

@media print {

  /* Hide absolutely everything by default */
  body>* {
    display: none !important;
  }

  /* Only show the content to be printed */
  .invoice-card,
  .receipt-card,
  #invoiceModal {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    margin: 0;
    padding: 0;
    width: 100%;
    height: auto;
    overflow: visible !important;
  }

  /* Reset body and html for printing */
  html,
  body {
    height: auto !important;
    overflow: visible !important;
    background: #fff !important;
  }

  #invoiceModal .modal-dialog {
    display: block !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }

  #invoiceModal .modal-content {
    border: none !important;
    box-shadow: none !important;
    display: block !important;
    background: transparent !important;
  }

  #invoiceModal .modal-header,
  #invoiceModal .modal-footer,
  #invoiceModal .btn-close,
  .no-print {
    display: none !important;
  }

  #invoiceModal .modal-body {
    display: block !important;
    overflow: visible !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .invoice-card,
  .receipt-card {
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
  }
}


/* Link detail hover effect - obvious clickable */
.link-detail {
  transition: all 0.2s ease;
  position: relative;
}

.link-detail:hover {
  color: var(--primary) !important;
  text-decoration: underline !important;
  transform: translateX(2px);
}

.link-detail:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Tooltip styling (optional, lebih clean) */
[data-bs-toggle="tooltip"] {
  cursor: help;
}

/* Responsive: di mobile, badge font sedikit lebih besar */
@media (max-width: 768px) {
  .badge {
    font-size: 0.75rem !important;
  }
}

/* MODAL TABLE FULL WIDTH & RESPONSIVE */
#modalDetailSampel .modal-body,
#modalProgress .modal-body {
  max-height: 80vh;
}

#modalDetailSampel .table-responsive,
#modalProgress .table-responsive {
  height: 100%;
  border-radius: 0;
  border: none;
  margin: 0;
  --bs-table-striped-bg: rgba(0, 0, 0, .01);
}

#modalDetailSampel .table,
#modalProgress .table {
  font-size: 0.9rem;
  margin-bottom: 0;
}

#modalDetailSampel th,
#modalDetailSampel td,
#modalProgress th,
#modalProgress td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

/* Custom scrollbar modal */
#modalDetailSampel .table-responsive::-webkit-scrollbar,
#modalProgress .table-responsive::-webkit-scrollbar {
  width: 6px;
}

#modalDetailSampel .table-responsive::-webkit-scrollbar-track,
#modalProgress .table-responsive::-webkit-scrollbar-track {
  background: #f1f1f1;
}

#modalDetailSampel .table-responsive::-webkit-scrollbar-thumb,
#modalProgress .table-responsive::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 3px;
}

/* Button container full width bottom */
#modalDetailSampel .border-top,
#modalProgress .border-top {
  border-top: 1px solid #eee !important;
  margin-top: auto;
  padding: 1.25rem 1.5rem;
}

#modalProgress .bg-light.rounded-3.p-3 {
  background-color: transparent !important;
  border-radius: 0 !important;
  padding: 1.5rem !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  #modalDetailSampel .modal-dialog {
    margin: 0.5rem;
  }

  #modalDetailSampel .table-responsive {
    font-size: 0.8rem;
  }

  #modalDetailSampel .btn {
    width: 100%;
  }
}

/* ====== LANDING PAGE ====== */
body.landing-page-body {
  overflow: hidden;
  background: radial-gradient(circle at top right, #1e3c72, #2a5298);
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  flex-direction: row;
}



/* Glassmorphism Card (The "Modal") */
.landing-card {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 3rem;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
  z-index: 10;
  animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Logo Styling */
.landing-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.landing-title {
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.landing-subtitle {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}

/* Button Styling */
.btn-custom {
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-civitas {
  background: linear-gradient(135deg, #0d47a1, #1976d2);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(13, 71, 161, 0.2);
}

.btn-civitas:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 71, 161, 0.3);
  color: white;
}

.btn-umum {
  background: white;
  color: #333;
  border: 2px solid #e0e0e0;
}

.btn-umum:hover {
  background: #f8f9fa;
  border-color: #d0d0d0;
  transform: translateY(-2px);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}