/* app/static/css/style.css */
/* Custom styles for Sales & Financial Management System */

/* Sticky Footer dengan Flexbox */
html {
  height: 100%;
}

body {
  background-color: #f8f9fc;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding-top: 1rem; /* Tambahkan padding untuk menghindari content tertutup navbar */
}

/* Navbar Styling */
.navbar {
  backdrop-filter: blur(10px);
  background-color: rgba(33, 37, 41, 0.95) !important;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background-color: rgba(33, 37, 41, 1) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Footer Styling */
footer {
  margin-top: auto; /* Push footer to bottom */
  background-color: #212529 !important;
}

/* Card styles */
.card {
  border-radius: 0.5rem;
  box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.card .card-header {
  font-weight: 700;
}

.sidebar {
  min-height: 100vh;
}

.bg-gradient-primary {
  background-color: #4e73df;
  background-image: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
}

.navbar-brand {
  font-weight: 800;
}

.btn-primary {
  background-color: #4e73df;
  border-color: #4e73df;
}

.btn-primary:hover {
  background-color: #2e59d9;
  border-color: #2653d4;
}

/* Dashboard cards */
.card-border-left-primary {
  border-left: 0.25rem solid #4e73df;
}

.card-border-left-success {
  border-left: 0.25rem solid #1cc88a;
}

.card-border-left-info {
  border-left: 0.25rem solid #36b9cc;
}

.card-border-left-warning {
  border-left: 0.25rem solid #f6c23e;
}

/* Table styles */
.table th {
  border-top: none;
  font-weight: 700;
  color: #6e707e;
}

/* Form styles */
.form-control:focus {
  border-color: #4e73df;
  box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* Alert styles */
.alert {
  border: none;
  border-radius: 0.5rem;
}

/* Badge styles */
.badge {
  font-weight: 500;
}

/* Chart container */
.chart-area {
  position: relative;
  height: 20rem;
  width: 100%;
}

/* Login page specific styles */
.login-container {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  border-radius: 1rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sidebar {
    min-height: auto;
  }

  .chart-area {
    height: 15rem;
  }

  main {
    padding-top: 0.5rem;
  }
}

/* Semua tabel ledger memiliki lebar kolom seragam */
.ledger-table {
  table-layout: fixed;
  width: 100%;
}

.ledger-table th,
.ledger-table td {
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Atur lebar kolom sesuai kebutuhan */
.col-date {
  width: 100px;
}
.col-entry {
  width: 120px;
}
.col-desc {
  width: 50%;
} /* paling fleksibel */
.col-debit,
.col-credit {
  width: 150px;
  text-align: right;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Prevent content jump when navbar becomes fixed */
body {
  padding-top: 0;
}

/* Add shadow to navbar when scrolled */
.navbar-shadow {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
