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-bottom: 60px;
  background: #f8f9fa;
}

.main-header {
  background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sidebar {
  min-width: 220px;
  max-width: 220px;
  min-height: 100vh;
  background: #212529;
  color: #fff;
  box-shadow: 2px 0 8px rgba(0,0,0,0.03);
}
.sidebar .nav-link {
  color: #fff;
  font-weight: 500;
  border-radius: 4px;
  transition: background 0.2s;
}
.sidebar .nav-link.active, .sidebar .nav-link:hover {
  background: #343a40;
  color: #ffc107;
}
.footer {
  background: #212529;
  color: #fff;
  position: relative;
  bottom: 0;
  width: 100%;
}

/* Global CRUD theme for Index/Create/Edit/Delete pages */
body.crud-theme .container.py-4 {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 18px;
  padding: 1.25rem !important;
  box-shadow: 0 16px 36px rgba(18, 44, 88, 0.12);
}

body.crud-theme .container.py-4 h2 {
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #14335f;
  margin-bottom: 1rem !important;
}

body.crud-theme .card.shadow-sm {
  border: 0;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(18, 44, 88, 0.1) !important;
}

body.crud-theme .card .card-body {
  padding: 1.25rem;
}

body.crud-theme .table {
  margin-bottom: 0;
}

body.crud-theme .table thead th {
  background: #f1f6ff;
  color: #1e3f74;
  border-bottom: 0;
  font-weight: 700;
}

body.crud-theme .table tbody tr {
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

body.crud-theme .table tbody tr:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 9999px rgba(26, 115, 232, 0.06);
}

body.crud-theme .form-label {
  font-weight: 600;
  color: #25384f;
}

body.crud-theme .form-control,
body.crud-theme .form-select,
body.crud-theme textarea.form-control {
  border-radius: 10px;
  border-color: #d6deea;
}

body.crud-theme .form-control:focus,
body.crud-theme .form-select:focus,
body.crud-theme textarea.form-control:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 0.2rem rgba(26, 115, 232, 0.16);
}

body.crud-theme .btn {
  border-radius: 10px;
  font-weight: 600;
}

body.crud-theme .btn-primary {
  background: linear-gradient(135deg, #1a73e8, #0d47a1);
  border: 0;
}

body.crud-theme .btn-primary:hover {
  background: linear-gradient(135deg, #1869d2, #0b3f8a);
}

body.crud-theme .btn-outline-secondary {
  border-color: #9aa9bf;
  color: #334a6b;
}

body.crud-theme .btn-outline-danger {
  border-color: #d9534f;
}

body.crud-theme .dt-toolbar-left,
body.crud-theme .dt-toolbar-right,
body.crud-theme .dt-footer {
  display: flex;
  align-items: center;
}

body.crud-theme .dt-toolbar-left {
  flex-wrap: wrap;
  gap: 0.5rem;
}

body.crud-theme .dt-toolbar-right {
  justify-content: flex-end;
}

body.crud-theme div.dt-container div.dt-search input,
body.crud-theme div.dt-container div.dt-length select {
  border-radius: 10px;
  border: 1px solid #d6deea;
  padding: 0.45rem 0.75rem;
}

body.crud-theme .dt-buttons .btn {
  border-radius: 10px;
  font-weight: 600;
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
}

body.crud-theme .dt-buttons .btn-secondary,
body.crud-theme .dt-buttons .btn-primary {
  background: linear-gradient(135deg, #1a73e8, #0d47a1);
  border: 0;
}

body.crud-theme .dt-buttons .btn-secondary:hover,
body.crud-theme .dt-buttons .btn-primary:hover {
  background: linear-gradient(135deg, #1869d2, #0b3f8a);
}

body.crud-theme .dataTables_wrapper .pagination .page-link,
body.crud-theme div.dt-container .dt-paging .dt-paging-button {
  border-radius: 10px !important;
  margin: 0 0.15rem;
  border: 1px solid #d6deea;
  color: #334a6b;
}

body.crud-theme div.dt-container .dt-paging .dt-paging-button.current,
body.crud-theme div.dt-container .dt-paging .dt-paging-button.current:hover,
body.crud-theme .pagination .page-item.active .page-link {
  background: #1a73e8 !important;
  border-color: #1a73e8 !important;
  color: #fff !important;
}

body.crud-theme .instance-period-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  background: rgba(26, 115, 232, 0.08);
  color: #14335f;
  font-weight: 600;
}

body.crud-theme .instance-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ---- Page-navigation loader ---- */
.pg-nav-loader {
  position: fixed;
  inset: 0;
  z-index: 19000;
  display: grid;
  place-items: center;
  background: rgba(3, 10, 22, 0.68);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
  pointer-events: none;
}

.pg-nav-loader.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.pg-nav-loader__ring {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 4px solid rgba(49, 230, 255, 0.18);
  border-top-color: #31e6ff;
  border-right-color: rgba(49, 230, 255, 0.55);
  box-shadow: 0 0 24px rgba(49, 230, 255, 0.5), inset 0 0 12px rgba(49, 230, 255, 0.12);
  animation: navLoaderSpin 750ms linear infinite;
}

@keyframes navLoaderSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pg-nav-loader__ring {
    animation: none;
    border-top-color: #31e6ff;
  }
}



