/* ===== BACKGROUND ===== */
body {
  background: linear-gradient(135deg, #e8f5e9, #ffffff);
  font-family: 'Segoe UI', sans-serif;
}

/* Background motif */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.72), rgba(232,245,233,0.72)),
    url('../gambar/bg-klinik.png') repeat;
  background-size: 420px auto;
  opacity: 1;
  z-index: -1;
}

/* ===== NAVBAR ===== */
.navbar {
  background: linear-gradient(to right, #2e7d32, #66bb6a) !important;
}

.navbar-brand {
  color: #fff !important;
  font-weight: bold;
}

/* ===== SIDEBAR ===== */
.sidebar {
  background: #f1f8f4;
  border-right: 1px solid #c8e6c9;
}

.sidebar .nav-link {
  color: #2e7d32;
  font-weight: 500;
  border-radius: 6px;
  margin: 4px 8px;
  padding: 8px 12px;
}

.sidebar .nav-link:hover {
  background: #c8e6c9;
  color: #1b5e20;
}

/* ===== TITLE ===== */
h1, h2 {
  color: #2e7d32;
  font-weight: bold;
}

/* ===== TABLE ===== */
.table {
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

.table thead {
  background: #2e7d32;
  color: white;
}

.table-hover tbody tr:hover {
  background: #e8f5e9;
}

/* ===== BUTTON ===== */
.btn-primary {
  background: #2e7d32;
  border: none;
}

.btn-primary:hover {
  background: #1b5e20;
}

.btn-warning {
  background: #fbc02d;
  border: none;
}

.btn-danger {
  background: #e53935;
  border: none;
}

.btn-info {
  background: #26a69a;
  border: none;
}

/* ===== DATATABLE ===== */
.dataTables_wrapper .dataTables_filter input {
  border-radius: 8px;
  border: 1px solid #a5d6a7;
  padding: 5px;
}

.dataTables_wrapper .dataTables_length select {
  border-radius: 8px;
  border: 1px solid #a5d6a7;
}

/* ===== WRAP TEXT ===== */
#myTable td {
  white-space: normal !important;
  word-wrap: break-word;
}

/* ===== TAMBAHAN VISUAL AGAR LEBIH MENARIK ===== */

/* Navbar lebih premium */
.navbar {
  background: linear-gradient(90deg, #1b5e20, #2e7d32, #66bb6a) !important;
  box-shadow: 0 4px 14px rgba(27, 94, 32, 0.25);
}

/* Sidebar lebih clean */
.sidebar {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(4px);
}

/* Link sidebar lebih hidup */
.sidebar .nav-link {
  transition: all 0.2s ease-in-out;
}

.sidebar .nav-link:hover {
  transform: translateX(6px);
  background: #dff3e3 !important;
  color: #1b5e20 !important;
}

/* Judul halaman ada aksen */
h1.h2,
h1,
h2 {
  position: relative;
  padding-bottom: 10px;
}

h1.h2::after,
h1::after,
h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  margin-top: 10px;
  border-radius: 10px;
  background: linear-gradient(90deg, #2e7d32, #81c784);
}

/* Card dashboard lebih manis */
.card {
  border-radius: 18px !important;
  transition: all 0.25s ease;
  border-left: 6px solid #43a047 !important;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(46, 125, 50, 0.18) !important;
}

/* Angka dashboard lebih tegas */
.card-body h3 {
  font-size: 36px;
  color: #1b5e20;
}

/* Area grafik lebih elegan */
.card:has(canvas) {
  border-left: none !important;
  background: rgba(255, 255, 255, 0.96) !important;
}

/* Tombol lebih modern */
.btn {
  border-radius: 10px !important;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
}

.btn:hover {
  transform: translateY(-2px);
}

/* Table lebih lembut */
.table {
  border-radius: 16px !important;
  overflow: hidden;
}

.table thead th {
  background: #2e7d32 !important;
  color: #ffffff !important;
}

.table tbody tr:hover {
  background: #eef8f0 !important;
}

/* Search dan dropdown DataTables */
.dataTables_wrapper input,
.dataTables_wrapper select {
  border-radius: 10px !important;
  border: 1px solid #a5d6a7 !important;
}

/* Background motif agak lebih natural */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.62), rgba(232,245,233,0.62)),
    url('../gambar/bg-klinik.png') repeat;
  background-size: 380px auto;
  z-index: -1;
}

/* Scrollbar hijau */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: #66bb6a;
  border-radius: 10px;
}

::-webkit-scrollbar-track {
  background: #e8f5e9;
}

/* ==================================================
   FINAL POLISH UI - HIJAU PUTIH KLINIK HEWAN
   Aman: hanya tampilan, tidak mengubah fitur
================================================== */

/* Konten utama lebih lega */
main {
  padding-top: 26px !important;
  padding-left: 34px !important;
  padding-right: 34px !important;
}

/* Navbar lebih premium */
.navbar {
  min-height: 58px;
  background: linear-gradient(90deg, #14532d, #1f7a35, #63b96b) !important;
  box-shadow: 0 5px 18px rgba(20, 83, 45, 0.28);
}

.navbar-brand {
  letter-spacing: 0.2px;
}

.navbar .nav-link {
  font-weight: 600;
}

/* Sidebar lebih halus */
.sidebar {
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 3px 0 18px rgba(0, 0, 0, 0.05);
}

.sidebar .nav-link {
  font-size: 16px;
  margin: 6px 10px;
  padding: 11px 14px;
  border-radius: 12px;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background: #dcf5df !important;
  color: #14532d !important;
  font-weight: 700;
}

/* Heading halaman */
h1,
h1.h2,
h2 {
  font-weight: 800 !important;
  letter-spacing: 0.2px;
  color: #17202a !important;
}

h1::after,
h1.h2::after,
h2::after {
  width: 92px !important;
  height: 5px !important;
  background: linear-gradient(90deg, #1f7a35, #8fd19e) !important;
  box-shadow: 0 3px 8px rgba(31, 122, 53, 0.25);
}

/* Tombol tambah data */
a.btn,
button.btn {
  border-radius: 14px !important;
  padding: 9px 16px;
}

.btn-primary {
  background: linear-gradient(135deg, #1f7a35, #49a65b) !important;
  border: none !important;
  box-shadow: 0 6px 14px rgba(31, 122, 53, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #14532d, #2f8f45) !important;
  transform: translateY(-2px);
}

/* Card dashboard lebih hidup */
.card {
  border-radius: 22px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08) !important;
}

.card-body h6 {
  color: #555 !important;
  font-weight: 700;
}

.card-body h3 {
  color: #14532d !important;
  font-size: 38px;
  font-weight: 800;
}

/* Table container terasa seperti kartu */
.dataTables_wrapper {
  background: rgba(255, 255, 255, 0.86) !important;
  padding: 18px;
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
}

/* Tabel lebih rapi */
table.dataTable,
#myTable {
  border-radius: 18px !important;
  overflow: hidden;
  background: white !important;
}

#myTable thead th {
  background: #267d34 !important;
  color: white !important;
  font-weight: 800 !important;
  vertical-align: middle;
  border-bottom: none !important;
}

#myTable tbody td {
  border-color: #e5eee6 !important;
  vertical-align: middle !important;
}

#myTable tbody tr {
  transition: background 0.2s ease;
}

#myTable tbody tr:hover {
  background: #eef9f0 !important;
}

/* Search dan show entries */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.dt-search input,
.dt-length select {
  border: 1px solid #9dccaa !important;
  border-radius: 12px !important;
  padding: 7px 10px !important;
  background: rgba(255, 255, 255, 0.88) !important;
}

.dataTables_wrapper .dataTables_filter input:focus,
.dt-search input:focus {
  outline: none !important;
  border-color: #1f7a35 !important;
  box-shadow: 0 0 0 4px rgba(31, 122, 53, 0.14) !important;
}

/* Pagination */
.dataTables_wrapper .dataTables_paginate .paginate_button,
.dt-paging-button {
  border-radius: 10px !important;
  border: 1px solid #c9e7ce !important;
  background: white !important;
  color: #1f7a35 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dt-paging-button.current {
  background: #1f7a35 !important;
  color: white !important;
}

/* Tombol aksi lebih konsisten */
.btn-info {
  background: #22b8a6 !important;
  border: none !important;
  color: #062925 !important;
}

.btn-warning {
  background: #ffc928 !important;
  border: none !important;
  color: #1f2937 !important;
}

.btn-danger {
  background: #e63946 !important;
  border: none !important;
  color: white !important;
}

/* Form input di halaman tambah/edit */
.form-control,
.form-select,
input,
select,
textarea {
  border-radius: 12px !important;
  border: 1px solid #b7d9bd !important;
}

.form-control:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: #1f7a35 !important;
  box-shadow: 0 0 0 4px rgba(31, 122, 53, 0.14) !important;
}

/* Background motif lebih elegan */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.58), rgba(232, 245, 233, 0.58)),
    url('../gambar/bg-klinik.png') repeat;
  background-size: 360px auto;
  z-index: -1;
}

/* Biar teks panjang tidak bikin tabel kabur ke kanan */
#myTable th,
#myTable td {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

/* Mobile/tablet sedikit lebih aman */
@media (max-width: 768px) {
  main {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .navbar-brand {
    font-size: 14px !important;
  }

  .dataTables_wrapper {
    padding: 12px;
  }
}