html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow:
    0 0 0 0.1rem white,
    0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin: 0;
  background-color: #f6f9fc;
  font-family:
    "Nunito Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
}

/* Hide Vue templates until the app mounts so {{ }} tags never flash. */
[v-cloak] {
  display: none !important;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ==============================================================
   FreeDash-style layout
   ============================================================== */
#main-wrapper {
  width: 100%;
  overflow: hidden;
}

/* --- Topbar --- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 64px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.topbar .navbar {
  height: 64px;
  padding: 0;
}

.topbar .navbar-header {
  width: 240px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-right: 1px solid #e9ecef;
}

.topbar .navbar-brand {
  font-size: 1.1rem;
  font-weight: 700;
}

.topbar .nav-toggler {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #343a40;
  margin-right: 12px;
}

.topbar .navbar-collapse {
  padding: 0 20px;
}

/* --- Left sidebar --- */
.left-sidebar {
  position: fixed;
  top: 64px;
  bottom: 0;
  left: 0;
  width: 240px;
  background: #fff;
  border-right: 1px solid #e9ecef;
  overflow-y: auto;
  z-index: 40;
  transition: width 0.2s ease;
}

.scroll-sidebar {
  padding: 16px 0;
}

.sidebar-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-nav .sidebar-item {
  margin: 2px 12px;
}

.sidebar-nav .sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #5a6a85;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.sidebar-nav .sidebar-link i {
  font-size: 1.15rem;
  width: 20px;
  text-align: center;
}

.sidebar-nav .sidebar-link:hover {
  background: #e8f5e9;
  color: #1b5e20;
}

.sidebar-nav .sidebar-link.active {
  background: #1b5e20;
  color: #fff;
}

.sidebar-nav .list-divider {
  height: 1px;
  background: #e9ecef;
  margin: 12px 20px;
}

.sidebar-nav .nav-small-cap {
  padding: 8px 24px 4px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #adb5bd;
  font-weight: 700;
}

/* Mini sidebar (mobile toggle) */
#main-wrapper[data-sidebartype="mini"] .left-sidebar {
  width: 70px;
}

#main-wrapper[data-sidebartype="mini"] .left-sidebar .hide-menu,
#main-wrapper[data-sidebartype="mini"] .left-sidebar .nav-small-cap,
#main-wrapper[data-sidebartype="mini"] .left-sidebar .list-divider {
  display: none;
}

#main-wrapper[data-sidebartype="mini"] .left-sidebar .sidebar-link {
  justify-content: center;
}

/* --- Page wrapper --- */
.page-wrapper {
  margin-left: 240px;
  padding-top: 64px;
  min-height: 100vh;
  transition: margin-left 0.2s ease;
}

#main-wrapper[data-sidebartype="mini"] .page-wrapper {
  margin-left: 70px;
}

.page-breadcrumb {
  padding: 20px 24px 0;
}

.page-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #343a40;
}

.container-fluid {
  padding: 20px 24px;
  margin-bottom: 25px;
}
footer {
  bottom: 0;
  position: absolute;
  left: 50%;
}
.footer {
  padding: 16px 24px;
  font-size: 0.85rem;
}

/* --- Dashboard cards --- */
.card {
  border: 1px solid #e9ecef;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card .card-body {
  padding: 20px;
}

.card .font-weight-medium {
  font-weight: 600;
}

.card .display-6 {
  font-size: 2rem;
}

/* --- DataTables --- */
.table-responsive {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e9ecef;
  padding: 16px;
}

/* Let DataTables tables fill their container instead of a fixed inline width
   (autoWidth:false in the TS config prevents DataTables from setting a too-small
   style="width:..." on the table). */
.table-responsive table.dataTable {
  width: 100% !important;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1px solid #ced4da;
  border-radius: 6px;
  padding: 4px 8px;
}

/* --- Forms --- */
.form-control,
.form-select {
  border-radius: 8px;
}

.btn {
  border-radius: 8px;
}

.btn-success {
  background-color: #1b5e20;
  border-color: #1b5e20;
}

.btn-success:hover {
  background-color: #14521a;
  border-color: #14521a;
}
