#body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 220px; }
  #body *, #body ::before, #body ::after {
    transition: all 400ms; }
  #body .table thead th {
    border-bottom: 1px;
    background-color: rgba(1, 48, 94, 0.1); }
  #body a, #body #main .btn-table {
    background-color: transparent;
    color: #01305e; }
    #body a:hover, #body a:active, #body #main .btn-table:hover, #body #main .btn-table:active {
      color: #fcb042; }
    #body a.btn-danger, #body #main .btn-table.btn-danger {
      color: var(--danger); }
  @media screen and (max-width: 767.98px) {
    #body div.dataTables_wrapper div.dataTables_filter, #body div.dataTables_wrapper div.dataTables_info, #body div.dataTables_wrapper div.dataTables_length {
      text-align: left; } }
  #body div.dataTables_wrapper div.dataTables_processing > div > div {
    background-color: #fcb042; }
  #body div.dataTables_wrapper table.dataTable.dtr-column > tbody > tr > td.dtr-control:before, #body div.dataTables_wrapper table.dataTable.dtr-column > tbody > tr > th.dtr-control:before, #body div.dataTables_wrapper table.dataTable.dtr-column > tbody > tr > td.control:before, #body div.dataTables_wrapper table.dataTable.dtr-column > tbody > tr > th.control:before {
    color: #01305e;
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: bold; }
  #body div.dataTables_wrapper table.dataTable.dtr-column > tbody > tr.parent td.dtr-control:before, #body div.dataTables_wrapper table.dataTable.dtr-column > tbody > tr.parent th.dtr-control:before, #body div.dataTables_wrapper table.dataTable.dtr-column > tbody > tr.parent td.control:before, #body div.dataTables_wrapper table.dataTable.dtr-column > tbody > tr.parent th.control:before {
    content: '\f077'; }
  #body div.dataTables_wrapper table tbody > tr:last-child > td, #body div.dataTables_wrapper table tbody > tr:last-child td.child {
    border-bottom: 1px solid #dee2e6; }
  #body div.dataTables_wrapper table tbody tr.child td {
    border: 0; }
    #body div.dataTables_wrapper table tbody tr.child td.child > table > tr > td[colspan='2'] .btn ~ .btn {
      margin-left: .5rem; }
  #body div.dataTables_wrapper table tbody tr > td[colspan] {
    padding: 0; }
  #body div.dataTables_wrapper table tbody tr > td.fixed:not([style*='display: none']) ~ td.fixed {
    padding-left: 0; }
  #body > div.DTCR_pointer {
    margin-left: -10px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 10px 0;
    border-color: #fcb042 transparent transparent;
    background: transparent; }
  #body > table.DTCR_clonedTable {
    opacity: 0; }
  #body h1, #body h4 {
    color: #01305e; }
  #body .btn-primary {
    background-color: #01305e;
    border-color: #01305e;
    color: white; }
    #body .btn-primary:disabled, #body .btn-primary.disabled {
      background-color: rgba(1, 48, 94, 0.9);
      border-color: rgba(1, 48, 94, 0.9);
      color: white; }
    #body .btn-primary:focus, #body .btn-primary.focus {
      box-shadow: 0 0 0 0.2rem rgba(1, 48, 94, 0.4); }
    #body .btn-primary:hover {
      background-color: rgba(1, 48, 94, 0.8);
      border-color: rgba(255, 255, 255, 0.2);
      color: white; }
    #body .btn-primary:not(:disabled):not(.disabled):active, #body .btn-primary:not(:disabled):not(.disabled).active, .show > #body .btn-primary.dropdown-toggle {
      background-color: rgba(1, 48, 94, 0.9);
      border-color: white;
      color: white; }
    #body .btn-primary:not(:disabled):not(.disabled):active:focus, #body .btn-primary:not(:disabled):not(.disabled).active:focus, .show > #body .btn-primary.dropdown-toggle:focus {
      box-shadow: 0 0 0 0.2rem rgba(1, 48, 94, 0.4); }
  #body .btn-secondary {
    background-color: #fcb042;
    border-color: #fcb042;
    color: white; }
    #body .btn-secondary:disabled, #body .btn-secondary.disabled {
      background-color: rgba(252, 176, 66, 0.9);
      border-color: rgba(252, 176, 66, 0.9);
      color: white; }
    #body .btn-secondary:focus, #body .btn-secondary.focus {
      box-shadow: 0 0 0 0.2rem rgba(252, 176, 66, 0.4); }
    #body .btn-secondary:hover {
      background-color: rgba(252, 176, 66, 0.8);
      border-color: rgba(255, 255, 255, 0.2);
      color: white; }
    #body .btn-secondary:not(:disabled):not(.disabled):active, #body .btn-secondary:not(:disabled):not(.disabled).active, .show > #body .btn-secondary.dropdown-toggle {
      background-color: rgba(252, 176, 66, 0.9);
      border-color: white;
      color: white; }
    #body .btn-secondary:not(:disabled):not(.disabled):active:focus, #body .btn-secondary:not(:disabled):not(.disabled).active:focus, .show > #body .btn-secondary.dropdown-toggle:focus {
      box-shadow: 0 0 0 0.2rem rgba(252, 176, 66, 0.4); }
  #body .chart-color-1 {
    color: #01305e; }
  #body .chart-color-2 {
    color: #fcb042; }
  #body .custom-control-input:checked ~ .custom-control-label::before, #body .custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::before {
    background-color: #01305e;
    border-color: rgba(1, 48, 94, 0.6); }
  #body .custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 0.2rem rgba(1, 48, 94, 0.4); }
  #body .custom-control-input:active:not(:disabled) ~ .custom-control-label::before {
    background-color: rgba(1, 48, 94, 0.6);
    border-color: rgba(1, 48, 94, 0.1); }
  #body .custom-control-input:disabled:checked ~ .custom-control-label::before {
    background-color: rgba(1, 48, 94, 0.7);
    border-color: rgba(1, 48, 94, 0.1); }
  #body .custom-control-input:focus:not(:checked) ~ .custom-control-label::before {
    border-color: rgba(1, 48, 94, 0.6); }
  #body .custom-select:focus {
    border-color: rgba(1, 48, 94, 0.6);
    box-shadow: 0 0 0 0.2rem rgba(1, 48, 94, 0.4); }
  #body .dropdown.show .dropdown-toggle::after {
    border-top: 0;
    border-bottom: .3em solid; }
  #body .dropdown .dropdown-item:hover, #body .dropdown .dropdown-item:active {
    background-color: rgba(1, 48, 94, 0.1); }
  @media screen and (max-width: 767.98px) {
    #body .dropdown .dropdown-item.nav-link {
      padding-left: 1.2rem; }
      #body .dropdown .dropdown-item.nav-link:hover, #body .dropdown .dropdown-item.nav-link:active {
        background-color: unset; } }
  #body .dropdown .dropdown-menu {
    transition: none; }
  #body .dropdown.nav-item .dropdown-menu {
    flex-basis: 100%; }
    @media screen and (max-width: 767.98px) {
      #body .dropdown.nav-item .dropdown-menu {
        border: none;
        margin: 0;
        padding: 0; } }
  #body .form-control:focus {
    border-color: rgba(1, 48, 94, 0.6);
    box-shadow: 0 0 0 0.2rem rgba(1, 48, 94, 0.4); }
  #body .grid-stack-item-content {
    border: 2px solid #eee; }
  #body .manage-nav {
    padding-bottom: 2rem; }
    #body .manage-nav .nav-link.active {
      background-color: #01305e !important;
      color: #ffffff !important;
      font-weight: bold; }
  #body .navbar-nav .nav-link {
    padding: .2rem .5rem; }
  #body .pagination .page-item.active .page-link {
    background-color: #01305e;
    border-color: #01305e;
    color: white; }
  #body .pagination .page-item .page-link:focus, #body .pagination .page-item .page-link.focus {
    box-shadow: 0 0 0 0.2rem rgba(1, 48, 94, 0.4); }
  #body .text-primary {
    color: #01305e !important; }
    #body .text-primary:focus, #body .text-primary.focus {
      border-color: rgba(1, 48, 94, 0.6);
      box-shadow: 0 0 0 0.2rem rgba(1, 48, 94, 0.4); }
  #body .text-secondary {
    color: #fcb042 !important; }
    #body .text-secondary:focus, #body .text-secondary.focus {
      border-color: rgba(252, 176, 66, 0.6);
      box-shadow: 0 0 0 0.2rem rgba(252, 176, 66, 0.4); }
  #body .validation-summary-errors ul {
    padding-left: 1rem; }

#cookie, #header {
  background-color: white;
  box-shadow: 0 0.1rem 1rem 0.1rem rgba(0, 0, 0, 0.1); }
  #cookie img, #header img {
    max-height: 3.2rem; }

#main {
  flex: 1 1 auto; }
  #main .form-block {
    background-color: rgba(1, 48, 94, 0.02);
    border: 1px solid rgba(1, 48, 94, 0.05);
    border-radius: .25rem;
    margin-bottom: 1rem; }
    #main .form-block > .form-group:last-child {
      margin-bottom: 0; }
  #main .note-editor.note-frame.card *, #main .note-editor.note-frame.card ::before, #main .note-editor.note-frame.card ::after {
    transition: none; }

/* --- LIGHT MODE ELEGANTE --- */
body, #body {
  background-color: #f4f7f6 !important;
  color: #2c3e50 !important;
}

#cookie, #header {
  background-color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
  border-bottom: none !important;
}

#main .form-block {
  background-color: #ffffff !important;
  border: none !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 2rem;
}

/* Typography & Titles */
#body h1, #body h2, #body h3, #body h4, #body h5, #body h6 {
  color: #01305e !important;
  font-weight: 700;
}

/* Inputs and Forms */
.form-control {
  background-color: #f8f9fa !important;
  border: 1px solid #e9ecef !important;
  color: #495057 !important;
  border-radius: 8px !important;
  padding: 0.75rem 1rem;
}

.form-control:focus {
  border-color: #fcb042 !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 0.2rem rgba(252, 176, 66, 0.25) !important;
}

/* Custom Checkbox/Radio */
#body .custom-control-label::before {
  background-color: #f8f9fa !important;
  border-color: #ced4da !important;
}

/* Primary and Secondary Buttons */
#body .btn-primary {
  background-color: #01305e !important;
  border-color: #01305e !important;
  color: #ffffff !important;
  border-radius: 8px;
  font-weight: bold;
  padding: 0.6rem 1.5rem;
}
#body .btn-primary:hover {
  background-color: #014182 !important;
  box-shadow: 0 4px 15px rgba(1, 48, 94, 0.3);
}

#body .btn-secondary {
  background-color: #fcb042 !important;
  border-color: #fcb042 !important;
  border-radius: 8px;
  color: #ffffff !important;
  font-weight: bold;
  padding: 0.6rem 1.5rem;
}
#body .btn-secondary:hover {
  background-color: #fca326 !important;
  box-shadow: 0 4px 15px rgba(252, 176, 66, 0.3);
}

/* DataTables and Lists */
#body .table {
  color: #2c3e50 !important;
}
#body .table thead th {
  background-color: rgba(1, 48, 94, 0.05) !important;
  border-bottom: 2px solid #e9ecef !important;
  border-top: none !important;
}
#body .table td, #body .table th {
  border-top: 1px solid #e9ecef !important;
}

/* Header Logo Fix */
#header img {
  filter: none;
}

/* General links */
#body a {
  color: #01305e !important;
  font-weight: 500;
}
#body a:hover {
  color: #fcb042 !important;
  text-decoration: none;
}

/* Modals */
.modal-content {
  background-color: #ffffff !important;
  border: none !important;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.modal-header, .modal-footer {
  border-color: #e9ecef !important;
}
.modal-title {
  color: #01305e !important;
}

/* ADMIN SIDEBAR LAYOUT */
@media (min-width: 768px) {
  .admin-sidebar-layout header {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background-color: #ffffff !important;
    border-right: 1px solid #e9ecef;
    box-shadow: 4px 0 15px rgba(0,0,0,0.03);
    z-index: 1000;
  }
  .admin-sidebar-layout header .navbar {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 20px;
  }
  .admin-sidebar-layout header .navbar-collapse {
    width: 100%;
  }
  .admin-sidebar-layout header .navbar-nav {
    flex-direction: column !important;
    width: 100%;
  }
  .admin-sidebar-layout header .nav-item,
  .admin-sidebar-layout header .form-inline {
    width: 100%;
    margin-bottom: 5px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-sidebar-layout header .form-inline .btn {
    width: 100% !important;
    text-align: left !important;
    padding-left: 15px !important;
    margin-top: 5px;
  }
  .admin-sidebar-layout #main, .admin-sidebar-layout footer {
    margin-left: 250px;
  }
}

/* HOTSPOT LOGIN PAGE STYLES */
body.hotspot-login-page {
  background: linear-gradient(135deg, #01305e 0%, #001529 100%) !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

body.hotspot-login-page #header {
  display: none !important;
}

body.hotspot-login-page #main {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

body.hotspot-login-page .container {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body.hotspot-login-page #main > .container > .container {
  max-width: 450px !important;
  background-color: #ffffff !important;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.5) !important;
  padding: 40px 30px !important;
  text-align: center;
  margin: 20px auto !important;
}

body.hotspot-login-page #main > .container > .container::before {
  content: "";
  display: block;
  width: 150px;
  height: 70px;
  background: url('/img/logo.jpg') center;
  background-size: contain;
  background-repeat: no-repeat;
  margin: 0 auto 30px auto;
}

body.hotspot-login-page h1 {
  font-size: 1.8rem;
  color: #01305e !important;
  margin-bottom: 5px;
  font-weight: 700;
}

body.hotspot-login-page h4 {
  font-size: 1rem;
  color: #777 !important;
  margin-bottom: 30px;
}

body.hotspot-login-page .form-group {
  text-align: left;
}

body.hotspot-login-page .form-control {
  border-radius: 25px !important;
  padding: 12px 20px;
  background-color: #f8f9fa !important;
  border: 1px solid #ced4da !important;
  font-size: 1rem;
  margin-bottom: 15px;
}

body.hotspot-login-page .btn-primary {
  width: 100%;
  border-radius: 25px !important;
  padding: 15px;
  font-size: 1.2rem;
  background-color: #fcb042 !important;
  border-color: #fcb042 !important;
  color: #ffffff !important;
  box-shadow: 0 5px 15px rgba(252, 176, 66, 0.4);
  margin-top: 10px;
  font-weight: bold;
}

body.hotspot-login-page .btn-primary:hover {
  background-color: #fca326 !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(252, 176, 66, 0.5);
}

body.hotspot-login-page a {
  display: inline-block;
  margin-top: 15px;
  color: #01305e !important;
  font-weight: bold;
}

/* RESPONSIVE LAYOUT FOR ADMIN PANEL */
.mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  background-color: #ffffff;
  padding: 0 20px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1020;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  border-bottom: 1px solid #f0f2f5;
}

.menu-toggle-btn {
  background: none;
  border: none;
  color: #004a8c;
  padding: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle-btn:hover {
  color: #fcb042;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1030;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.open {
  display: block;
}

/* Base styles for sidebar to move away from inline styling */
.sidebar {
  width: 260px;
  height: 100vh;
  background: #ffffff;
  position: fixed;
  left: 0;
  top: 0;
  box-shadow: 4px 0 15px rgba(0,0,0,0.05);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 1040;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base style for main and main-content */
main, .main-content {
  margin-left: 260px !important;
  padding: 40px !important;
  min-height: 100vh;
  background: #f8f9fa;
  transition: margin-left 0.3s ease-in-out, padding 0.3s ease-in-out, width 0.3s ease-in-out;
}

/* Large display (Desktop) override to ensure correct layout */
@media (min-width: 992px) {
  .sidebar {
    transform: translateX(0) !important;
  }
}

/* Mobile & Tablet responsiveness */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 10px 0 25px rgba(0,0,0,0.1);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  main, .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 85px 15px 30px 15px !important; /* Extra top padding to clear fixed mobile header */
  }
}

