/* ===== Base ===== */
body {
  background: #f0f4f8;
  min-height: 100vh;
}

/* ===== Navbar ===== */
.navbar {
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%) !important;
}

/* ===== Tabs ===== */
.nav-tabs .nav-link {
  border-radius: 0.5rem 0.5rem 0 0;
  font-weight: 500;
  color: #495057;
  transition: background 0.2s, color 0.2s;
}
.nav-tabs .nav-link.active {
  color: #0d6efd;
  font-weight: 600;
}
.nav-tabs .nav-link:hover:not(.active) {
  background: #e9ecef;
}

/* ===== Card ===== */
.card {
  border-radius: 1rem !important;
}

/* ===== Dropzone ===== */
.dropzone {
  border: 2.5px dashed #0d6efd;
  background: #f8fbff;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.dropzone.dragover {
  background: #dbeafe;
  border-color: #0a58ca;
}
.dropzone:hover {
  background: #eef4ff;
}

/* ===== Table ===== */
.table-wrapper {
  max-height: 420px;
  overflow-y: auto;
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
}
.table-wrapper .sticky-top {
  top: 0;
  z-index: 2;
}
.table thead th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.table tbody td {
  font-size: 0.88rem;
  vertical-align: middle;
}

/* ===== Amount colors ===== */
.amount-neg { color: #dc3545; font-weight: 600; }
.amount-pos { color: #198754; font-weight: 600; }

/* ===== Stat cards ===== */
.stat-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 0.9rem 1.1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.stat-card .stat-icon {
  font-size: 1.6rem;
  line-height: 1;
}
.stat-card .stat-label {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.stat-card .stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: #212529;
}

/* ===== Textarea ===== */
textarea.form-control {
  resize: vertical;
  font-size: 0.82rem;
  line-height: 1.5;
}

/* ===== Editable cells ===== */
td.editable {
  outline: none;
  transition: background 0.15s;
}
td.editable:hover {
  background: #fffbe6 !important;
  cursor: text;
}
td.editable:focus {
  background: #fff9c4 !important;
  box-shadow: inset 0 0 0 2px #ffc107;
  border-radius: 2px;
}

/* ===== Inline select (Tipe / DB-CR) ===== */
.tipe-select, .dbcr-select {
  min-width: 80px;
  font-size: 0.8rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.4rem;
  cursor: pointer;
}
.tipe-select option[value="Debit"], .dbcr-select option[value="DB"] { color: #dc3545; }
.tipe-select option[value="Credit"], .dbcr-select option[value="CR"] { color: #198754; }

@media (max-width: 576px) {
  .nav-tabs .nav-link { font-size: 0.78rem; padding: 0.4rem 0.5rem; }
  .dropzone { padding: 2rem 1rem !important; }
}
