.login-alert{
	text-align: center;
	color: red;
}

.sticky-header .body-content {
    padding: 75px 0px 20px 0px;
}

.sticky-header.sidebar-collapsed .right-notification{
	margin-right: 110px;
}

/* Ensure body content doesn't overlap with sidebar when minimized */
.sticky-header.sidebar-collapsed .body-content {
    margin-left: 106px;
}

/* On larger screens, ensure proper margin for expanded sidebar */
@media (min-width: 992px) {
    .sticky-header .body-content {
        margin-left: 240px;
    }
    .sticky-header.sidebar-collapsed .body-content {
        margin-left: 106px;
    }
}

/* Consistent container spacing for all pages */
.container-fluid {
    max-width: 1600px;
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
}

.btn-primary{
	border-color: #a0a9b3 !important;
}

#ErrorDeviceInfo{
	color:red;
}


#SuccessDeviceInfo{
	color:green;
}

.user-img{
	width: 50px;
	height: 50px;
}

.profile-pic{
	width: 80px;
	height: 80px;
	margin: 0 auto;
	display: block;
}

/* Centrera innehåll i alla tabeller */
th,
td {
	vertical-align: middle !important;
	text-align: center;
}

td#viewbild {
    display: grid;
    text-align: center;
}

/* Mobile Filter Sidebar */
.mobile-filter-btn {
  display: none;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #0664aa, #055a98);
  color: white;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  margin-bottom: 0;
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(6, 100, 170, 0.3);
  order: 2;
}

.mobile-filter-btn:hover {
  background: linear-gradient(135deg, #055a98, #044a85);
  box-shadow: 0 4px 12px rgba(6, 100, 170, 0.4);
}

.mobile-filter-btn i {
  font-size: 16px;
  margin-right: 8px;
}

.filter-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 350px;
  height: 100%;
  background: white;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  z-index: 1052;
  transition: right 0.3s ease;
  overflow-y: auto;
  overflow-x: visible;
}

.filter-sidebar.open {
  right: 0;
}

.filter-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #0664aa, #055a98);
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.filter-sidebar-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.filter-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.filter-sidebar-content {
  padding: 20px;
  padding-bottom: 100px;
  overflow: visible;
  min-height: calc(100vh - 200px);
}

.filter-group {
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.filter-group label {
  display: block;
  font-weight: 600;
  color: #495057;
  margin-bottom: 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group input,
.filter-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s ease;
  background-color: white;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.filter-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  padding-right: 35px;
  cursor: pointer;
  direction: ltr;
}

/* Force dropdown to render below the select element */
.filter-group select option {
  direction: ltr;
}

/* Ensure select dropdown appears downward on mobile */
@supports (-webkit-appearance: none) or (-moz-appearance: none) {
  .filter-group select {
    position: relative;
  }
}

.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: #0664aa;
  box-shadow: 0 0 0 3px rgba(6, 100, 170, 0.1);
}

/* Style select dropdowns in thead filters */
#userTable thead select.search,
#deviceTable thead select.search,
#groupTable thead select.search {
  width: 100%;
  padding: 3px 6px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 13px;
  background-color: white;
  margin-top: 4px;
}

.filter-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1051;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.filter-overlay.open {
  opacity: 1;
  visibility: visible;
}

.filter-actions {
  padding: 20px;
  border-top: 1px solid #e9ecef;
  position: sticky;
  bottom: 0;
  background: white;
  display: flex;
  gap: 10px;
}

.filter-actions button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-apply-btn {
  background: linear-gradient(135deg, #0664aa, #055a98);
  color: white;
}

.filter-apply-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(6, 100, 170, 0.3);
}

.filter-clear-btn {
  background: #f8f9fa;
  color: #495057;
  border: 1px solid #ced4da;
}

.filter-clear-btn:hover {
  background: #e9ecef;
}

/* Mobile Card Design for Tables */
@media (max-width: 768px) {
  /* Show mobile filter button */
  .mobile-filter-btn {
    display: block;
    margin-bottom: 16px;
    margin-top: 0;
  }

  /* Container for table with filter button */
  .table-wrapper-mobile {
    position: relative;
  }
  
  /* Position filter button right after the search filter */
  .dataTables_filter {
    margin-bottom: 0 !important;
  }
  
  .dataTables_filter + .mobile-filter-btn {
    margin-top: 12px;
  }

  /* Hide DataTables controls on mobile */
  .dataTables_length,
  .dataTables_filter,
  .dataTables_info,
  .dataTables_paginate,
  .dt-buttons {
    font-size: 12px;
  }
  
  /* Compact button styling for mobile */
  .dt-buttons .dt-button {
    padding: 4px 8px;
    font-size: 11px;
    margin: 2px;
  }
  
  /* Main data tables - Users, Devices, Groups */
  #userTable, #deviceTable, #groupTable {
    border: none;
    background: transparent;
  }
  
  /* Completely hide thead on mobile - replaced by filter button */
  #userTable thead, 
  #deviceTable thead, 
  #groupTable thead {
    display: none !important;
  }
  
  /* Also hide any DataTables generated header elements */
  .dataTables_scrollHead {
    display: none !important;
  }
  
  #userTable tbody, #deviceTable tbody, #groupTable tbody {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 0;
  }
  
  #userTable tr, #deviceTable tr, #groupTable tr {
    display: block;
    background: #ffffff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    padding: 20px 20px 16px;
    position: relative;
    transition: box-shadow 0.2s ease, transform 0.1s ease;
    /* Ensure enough space for action icons */
    padding-top: 50px;
  }
  
  #userTable tr:hover, #deviceTable tr:hover, #groupTable tr:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
  }
  
  /* Card header with ID on the left */
  #userTable tr::before, #deviceTable tr::before, #groupTable tr::before {
    content: attr(data-card-id);
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #6c757d;
    margin-bottom: 12px;
    padding: 4px 8px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 60px;
    text-align: center;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid #e9ecef;
  }
  
  /* Action icons in top right corner */
  #userTable tr::after, #deviceTable tr::after, #groupTable tr::after {
    content: "";
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 10;
  }
  
  /* Special styling for user cards with name/primary info */
  #userTable tr {
    padding-top: 55px;
  }
  
  #userTable td, #deviceTable td, #groupTable td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid rgba(241, 243, 244, 0.8);
    font-size: 14px;
    text-align: left;
    line-height: 1.4;
    min-height: 24px;
  }
  
  #userTable td:last-child, #deviceTable td:last-child, #groupTable td:last-child {
    border-bottom: none;
    margin-top: 16px;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
    border-top: 2px solid #f8f9fa;
  }
  /* Hide all action button cells to prevent duplicates */
  #userTable td[data-label="Visa mer"],
  #userTable td[data-label="Redigera"], 
  #userTable td[data-label="Radera"],
  #userTable td[data-label="Enhet"],
  #deviceTable td[data-label="Visa mer"], 
  #deviceTable td[data-label="Redigera"], 
  #deviceTable td[data-label="Radera"],
  #groupTable td[data-label="Redigera"], 
  #groupTable td[data-label="Radera"],
  #userTable td:last-child, 
  #deviceTable td:last-child, 
  #groupTable td:last-child {
    display: none !important;
  }
  
  /* Also hide any remaining action columns */
  #userTable td:nth-last-child(1),
  #userTable td:nth-last-child(2),
  #userTable td:nth-last-child(3),
  #userTable td:nth-last-child(4),
  #deviceTable td:nth-last-child(1),
  #deviceTable td:nth-last-child(2),
  #deviceTable td:nth-last-child(3),
  #groupTable td:nth-last-child(1),
  #groupTable td:nth-last-child(2) {
    display: none !important;
  }
  
  /* Style action icons in card header */
  .card-action-icons {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    z-index: 10;
  }
  
  .card-action-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
  }
  
  .card-action-icons a.view-icon {
    color: #007bff;
    border-color: #007bff;
  }
  
  .card-action-icons a.view-icon:hover {
    transform: scale(1.1);
  }
  
  .card-action-icons a.edit-icon {
    color: #28a745;
  }
  
  .card-action-icons a.edit-icon:hover {
    transform: scale(1.1);
  }
  
  .card-action-icons a.delete-icon {
    color: #dc3545;
  }
  
  .card-action-icons a.delete-icon:hover {
    transform: scale(1.1);
  }
  
  .card-action-icons a.device-icon {
    color: #17a2b8;
  }
  
  .card-action-icons a.device-icon:hover {
    transform: scale(1.1);
  }
  
  /* Ensure FontAwesome icons are centered */
  .card-action-icons a i {
    line-height: 1;
  }
  
  #userTable td::before, #deviceTable td::before, #groupTable td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #495057;
    flex: 0 0 35%;
    margin-right: 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.3;
  }
  
  /* Value styling */
  #userTable td > *, #deviceTable td > *, #groupTable td > * {
    text-align: right;
    word-break: break-word;
  }
  
  /* Status indicators */
  .status-success {
    color: #28a745;
    font-weight: 600;
  }
  
  .status-warning {
    color: #ffc107;
    font-weight: 600;
  }
  
  .status-danger {
    color: #dc3545;
    font-weight: 600;
  }
  
  /* Contract status styling */
  .contract-status.contract-ok {
    color: #28a745;
  }
  
  .contract-status.contract-missing {
    color: #dc3545;
  }
  
  /* Action buttons in cards */
  #userTable .btn, #deviceTable .btn, #groupTable .btn,
  #userTable a[class*="btn"], #deviceTable a[class*="btn"], #groupTable a[class*="btn"],
  #userTable a[href*="javascript"], #deviceTable a[href*="javascript"], #groupTable a[href*="javascript"] {
    display: inline-block;
    font-size: 19px;
    text-decoration: none;
    color: black;
    transition: all 0.2s ease;
    font-weight: 500;
    text-transform: capitalize;
    min-width: 35px;
    text-align: center;
  }

  .table-bordered td {
    border: unset;
    }
  
  #userTable a[class*="view"], #deviceTable a[class*="view"], #groupTable a[class*="view"] {
    color: black;
  }
  
  #userTable a[class*="edit"], #deviceTable a[class*="edit"], #groupTable a[class*="edit"] {
    color: black;

  }
  
  #userTable a[class*="delete"], #deviceTable a[class*="delete"], #groupTable a[class*="delete"] {
    color: black;
  }
  
  #userTable a[class*="device"], #deviceTable a[class*="device"], #groupTable a[class*="device"] {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    border-color: #17a2b8;
  }
  
  /* User image in cards */
  #userTable img.user-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  /* Special layout for image field */
  #userTable td[data-label="Bild"] {
    padding: 12px 0;
    justify-content: center;
    border-bottom: 1px solid #e9ecef;
  }
  
  #userTable td[data-label="Bild"]::before {
    display: none;
  }
  
  /* Success status styling */
  #userTable td:contains("Ja"), #deviceTable td:contains("Ja"), #groupTable td:contains("Ja") {
    color: #28a745;
    font-weight: 600;
  }
  
  /* Premium badge styling similar to the image */
  #userTable tr.premium::after {
    content: "Premium";
    position: absolute;
    top: 50px;
    right: 12px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
}

/* Modal tables card styles */
.viewusertable,.delusertable,.viewdevicetable,.delusertypetable,.deldevicetable {
	border: unset;
	border-collapse: collapse;
	margin: 0 auto;
	padding: 0;
	width: 100%;
	table-layout: fixed;
	border: 0;
  }
  
  .viewusertable th,
  .viewusertable td,.delusertable th,
  .delusertable td,.viewdevicetable th,.viewdevicetable td ,.delusertypetable td,.delusertypetable th
  ,.deldevicetable th, .deldevicetable td {
	padding: .625em;
	text-align: center;
	word-break: break-word;
  }
  
  .viewusertable thead,.delusertable thead,.viewdevicetable thead,
  .delusertypetable thead, .deldevicetable thead {
	  border: none;
	  clip: rect(0 0 0 0);
	  height: 1px;
	  margin: -1px;
	  overflow: hidden;
	  padding: 0;
	  position: absolute;
	  width: 1px;
	}
	
	.viewusertable tr,.delusertable tr,.viewdevicetable tr,
	.delusertypetable tr,.deldevicetable tr {
		border: unset;
	  display: block;
	  margin-bottom: .625em;
	  background: #ffffff;
	  border-radius: 8px;
	  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	  padding: 16px;
	}
	
	.viewusertable td,.delusertable td,.viewdevicetable td,
	.delusertypetable td,.deldevicetable td{
	  display: block;
	  font-size: 1.1em;
	  text-align: right;
	  padding: 8px 0;
	  border-bottom: 1px solid #f1f3f4;
	}
	
	.viewusertable td::before,.delusertable td::before,.viewdevicetable td::before,
	.delusertypetable td::before,.deldevicetable td::before{
	  content: attr(data-label);
	  float: left;
	  font-weight: bold;
	  color: #495057;
	}
	
	.viewusertable td:last-child,.delusertable td:last-child,
	.viewdevicetable td:last-child,.deldevicetable td:last-child {
	  border-bottom: 0;
	}

	#aktiv,#kontrakt{
		width: 7%;
		top: 8px;
		height: 16px;
	}

	#alert{
		display: none;
	}

	.visible{
		display: block !important;
	}

	.row{
		/* Låt Bootstrap styra radens padding för bättre responsivitet */
		padding-left: 0;
		padding-right: 0;
	}

.active{
	background-color: #337ab7 !important;
    color: white !important;
}

.pagination{
	display: flex;
    justify-content: center;
}

a.disabled {
	pointer-events: none;
	cursor: default;
	color: grey !important;
  }

  tfoot input {
	width: 100%;
	padding: 3px;
	box-sizing: border-box;
}

#example thead input{
	width: 100%;
}

.center {
	text-align: center;
}


/* Start Header */

#header-container{
	background-color: #1f1f1f;
	color: #fff;
	position: relative;
	z-index: 4;
}

h1{
	margin-top: 0;
}

/* End Header */

a:not([href]):not([tabindex]){
	color: #0664aa;
}

a {
	color: #0664aa;
}

.btn-primary{
	background-color: #0664aa !important;
    color: #fff;
}

input.search {
    color: #2d3540;
	width: 100%;
}

/*---------------
	table
---------------*/
.device{
	width: 90%;
}

.deviceNotFound {
    text-align: center;
}

span.select-item:nth-child(2),span.select-item:nth-child(3) {
    display: none;
}

tbody tr.checked td {
  background-color: #ffbbbb;
  color: #333;
}

/* Mobile: Better visual indicator for selected cards */
@media (max-width: 768px) {
  /* Support both custom .checked class and DataTables .selected class */
  #userTable tr.checked, 
  #deviceTable tr.checked, 
  #groupTable tr.checked,
  table.dataTable tbody > tr.selected,
  #userTable tbody > tr.selected,
  #deviceTable tbody > tr.selected,
  #groupTable tbody > tr.selected {
    background-color: #fff !important;
    border: 3px solid #0664aa !important;
    box-shadow: 0 4px 20px rgba(6, 100, 170, 0.3) !important;
  }
  
  #userTable tr.checked td,
  #deviceTable tr.checked td,
  #groupTable tr.checked td,
  table.dataTable tbody > tr.selected td,
  #userTable tbody > tr.selected td,
  #deviceTable tbody > tr.selected td,
  #groupTable tbody > tr.selected td {
    background-color: transparent !important;
    color: #333 !important;
  }
  
  /* Add a selection badge to checked/selected cards */
  #userTable tr.checked::before,
  #deviceTable tr.checked::before,
  #groupTable tr.checked::before,
  table.dataTable tbody > tr.selected::before,
  #userTable tbody > tr.selected::before,
  #deviceTable tbody > tr.selected::before,
  #groupTable tbody > tr.selected::before {
    content: "✓ Vald";
    background: linear-gradient(135deg, #0664aa, #055a98);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    position: absolute;
    top: 12px;
    right: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 11;
    box-shadow: 0 2px 8px rgba(6, 100, 170, 0.4);
  }
}
/* Kontraktsstatus-ikon i enhetslistan */
.contract-status {
	font-size: 16px;
	font-weight: 700;
}
.contract-ok {
	color: #28a745;
}
.contract-missing {
	color: #dc3545;
}
div.dataTables_wrapper div.dataTables_filter {
    text-align: right;
	float: right;
}

caption{
	color: #2d3540;
    text-align: center;
    caption-side: top;
    font-size: 28px;
    font-weight: 900;
}

.buttons-copy,.buttons-excel,.buttons-pdf,.buttons-print,.buttons-collection,.buttons-select-all,.buttons-select-none,.buttons-csv{
    background-color: #0664aa !important;
}

/* DataTables Buttons: ensure hand cursor, white text, and hover effect */
.dt-buttons .dt-button {
    cursor: pointer;
    color: #fff !important;
    background-color: #0664aa !important;
    border: none !important;
    transition: background-color .15s ease-in-out, color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.dt-buttons .dt-button:hover,
.dt-buttons .dt-button:focus {
    background-color: #055a98 !important;
    color: #fff !important;
}

/* Dropdown items in the export collection */
.dt-button-collection .dt-button {
    cursor: pointer;
    color: #fff !important;
    background-color: #0664aa !important;
    border: none !important;
}
.dt-button-collection .dt-button:hover,
.dt-button-collection .dt-button:focus {
    background-color: #055a98 !important;
    color: #fff !important;
}

/* Container for the button collection dropdown */
div.dt-button-collection {
    background-color: #0664aa !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

#filter0,#filter1,#filter8,#filter9,#filter10,#filter11,#filter12,#filter13{
	display: none;
}

a.dt-button.dropdown-item.buttons-columnVisibility {
    background-color: red;
    color: white;
    font-weight: 600;
	text-decoration: line-through;
}

.table .thead-dark th{
	color: #fff;
    background-color: #2678b4;
    border-color: #2678b4;
}

th.tablesorter-header.tablesorter-headerUnSorted {
    width: 9%;
}


.table{
    max-width: 100%;
    margin: 0 auto;
}

div#table {
    max-width: 90%;
    margin: 0 auto;
}

#add {
	margin-left: 5%;
}



/*---------------
	Pagination
---------------*/

.pagination>li>a, .pagination>li>span {
    position: relative;
    float: left;
    padding: 6px 12px;
    margin-left: -1px;
    line-height: 1.42857143;
    color: #337ab7;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #ddd;
}

.active {
    background-color: #337ab7 !important;
    color: white !important;
	text-decoration: none !important;
}
.pagination>li {
    display: inline;
}
.pagination {
    display: flex;
    justify-content: center;
}
.pagination {
    display: inline-block;
    padding-left: 0;
    margin: 20px 0;
    border-radius: 4px;
}

nav{
	text-align: center;
}



/*---------------
	Modal
---------------*/

.modal-dialog{
	margin: 89px auto;
}

.modal-footer{
		text-align: left;
	}


@media (min-width: 768px){
	.modal-dialog {
		width: 600px;
		margin: 89px auto;
	}
}

.modal-header{
	display: block;
}

tfoot {
    display: table-header-group;
}

/* Keep view modal within viewport and make content scrollable */
#viewmem .modal-body {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* Edit modal: fixed height with scrollable body */
#editmem .modal-content {
    display: flex;
    flex-direction: column;
    height: 80vh;
    max-height: 80vh;
}
#editmem .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0; /* required for proper flex overflow on some browsers */
}

@media (max-width: 767px){
    #editmem .modal-dialog,
    #viewmem .modal-dialog {
        width: auto;
        margin: 20px 10px;
    }
    #viewmem .modal-body {
        max-height: calc(100vh - 140px);
    }
}

/*
   Extra responsiva justeringar
   ----------------------------
   Små skärmar: gör sidofältet smalare och ge innehållet mer utrymme.
*/

@media (max-width: 991.98px) {
	.sidebar-left {
		position: relative;
		width: 100%;
		margin-bottom: 15px;
	}
	
	.body-content {
		padding-top: 60px;
		margin-left: 0 !important;
	}
}

@media (max-width: 575.98px) {
	.header-section .logo svg {
		width: 80px;
		height: auto;
	}
	.notification-wrap .right-notification ul.notification-menu > li > a img {
		width: 32px;
		height: 32px;
	}
	.card-body {
		padding: 0.75rem;
	}
	.table-responsive {
		overflow-x: auto;
	}
}

/* Mobile header: arrange into three sections: menu | logo | search+profile */
.mobile-search-btn{display:none;color:#0664aa;text-decoration:none}
.mobile-search-btn i{font-size:22px;vertical-align:middle}
/* Default: keep mobile search form hidden (toggled via JS on mobile) */
.mobile-search-form{display:none}
/* Profile icon default styling (all sizes) */
.profile-icon { font-size: 22px; color: #0664aa; vertical-align: middle; }
.profile-name { color: black; }

/* Ensure mobile-specific controls never appear on desktop */
@media (min-width: 768px){
  .mobile-search-form,
  .mobile-search-btn{
    display:none !important;
  }
}

@media (max-width: 767.98px) {
    .header-section {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 12px;
        height: 50px;
    }
    .header-section .toggle-btn {
        order: 1;
        font-size: 22px;
        color: #fff;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
    }
    .header-section .toggle-btn i {
        font-size: 22px;
        line-height: 1;
    }
    .header-section .logo {
        display: none;
    }
    .header-section .notification-wrap {
        order: 2;
        display: flex;
        align-items: center;
        margin-left: auto;
        height: 40px;
    }
    /* Hide the full search form on small screens */
    .right-notification .form-inline { display: none !important; }
    /* Show compact mobile search button */
    .mobile-search-btn { 
        display: inline-flex; 
        align-items: center; 
        justify-content: center;
        margin-right: 12px; 
        width: 40px;
        height: 40px;
        color: #0664aa;
        text-decoration: none;
    }
    .mobile-search-btn i {
        font-size: 22px;
        line-height: 1;
    }
    .profile-name { display: none; }
    .notification-wrap .right-notification img {
        width: 36px;
        height: 36px;
        border-radius: 50%;
    }
    .notification-menu > li > a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
    }
    .profile-icon {
        font-size: 22px;
        line-height: 1;
    }
    
    /* Mobile search form styling */
    .mobile-search-form {
        display: none;
        align-items: center;
        gap: 5px;
        flex: 1;
        max-width: 300px;
        margin-right: 10px;
    }
    .mobile-search-form input {
        flex: 1;
        height: 35px;
        border: 1px solid #ccc;
        border-radius: 4px;
        padding: 5px 10px;
        font-size: 14px;
    }
    .mobile-search-form button {
        height: 35px;
        width: 35px;
        padding: 0;
        border: none;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .mobile-search-form .btn-primary {
        background-color: #0664aa;
        color: white;
    }
    .mobile-search-form .btn-secondary {
        background-color: #6c757d;
        color: white;
    }
}

/*---------------
	Footer
---------------*/

.footer-heading,ul.list-unstyled.mb-0{
	text-align: left;
}

ul.list-unstyled.mb-0 li{
	padding-top: 10px;
	padding-bottom: 10px;
}

footer section .row {
	justify-content: center;
}

/* Sticky footer layout: footer stays at page bottom without overlay */
html, body { height: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; }
.body-content { flex: 1 0 auto; }
footer.bg-dark.text-center.text-white { flex-shrink: 0; }


/*---------------
	Profile
---------------*/


.form-control:focus {
    box-shadow: none;
}

.profile-button {
    background: rgb(99, 39, 120);
    box-shadow: none;
    border: none
}

.profile-button:hover {
    background: #682773
}

.profile-button:focus {
    background: #682773;
    box-shadow: none
}

.profile-button:active {
    background: #682773;
    box-shadow: none
}

.back:hover {
    color: #682773;
    cursor: pointer
}

.labels {
    font-size: 11px
}

/* ========================================
   NEW MOBILE SIDEBAR MENU - Complete Redesign
   ======================================== */
@media (max-width: 991.98px) {
    /* Sidebar container - slides from left with smooth animation */
    .sidebar-left {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 85%;
        max-width: 320px;
        z-index: 1055;
        background: #ffffff;
        overflow-y: auto;
        overflow-x: hidden;
        transform: translateX(-100%);
        transition: transform 0.2s cubic-bezier(0.2, 0, 0.2, 1);
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
        will-change: transform;
        display: block;
    }

    /* Smooth custom scrollbar */
    .sidebar-left::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar-left::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .sidebar-left::-webkit-scrollbar-thumb {
        background: #0664aa;
        border-radius: 3px;
    }

    .sidebar-left::-webkit-scrollbar-thumb:hover {
        background: #055a98;
    }

    /* Open state - slide in */
    body.sidebar-open .sidebar-left {
        transform: translateX(0);
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.25);
    }

    /* Overlay backdrop */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0);
        z-index: 1054;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        backdrop-filter: blur(0px);
    }

    body.sidebar-open .mobile-menu-overlay {
        opacity: 1;
        visibility: visible;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(2px);
        z-index: 2;
    }

    /* Sidebar inner container */
    .sidebar-left-info {
        position: relative;
        padding: 0;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    /* Header section with gradient and profile */
    .sidebar-left .user-box {
        background: linear-gradient(145deg, #0664aa 0%, #044a85 100%);
        padding: 40px 20px 25px;
        margin: 0;
        position: relative;
        box-shadow: 0 4px 15px rgba(6, 100, 170, 0.3);
        border-bottom: 3px solid rgba(255, 255, 255, 0.1);
    }

    /* Animated gradient overlay */
    .sidebar-left .user-box::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(145deg, 
            rgba(255, 255, 255, 0.1) 0%, 
            rgba(255, 255, 255, 0) 50%, 
            rgba(0, 0, 0, 0.1) 100%);
        opacity: 0;
        transition: opacity 0.4s ease;
        pointer-events: none;
    }

    body.sidebar-open .sidebar-left .user-box::before {
        opacity: 1;
    }

    /* Profile image with animation */
    .sidebar-left .user-box img {
        width: 80px;
        height: 80px;
        border: 4px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
        opacity: 0;
        transform: scale(0.8);
    }

    body.sidebar-open .sidebar-left .user-box img {
        animation: fadeInScale 0.5s ease 0.2s both;
    }

    @keyframes fadeInScale {
        from {
            opacity: 0;
            transform: scale(0.8);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }

    body.sidebar-open .sidebar-left .user-box img:hover {
        transform: scale(1.05);
        border-color: rgba(255, 255, 255, 0.6);
    }
    
    /* Profile text */
    .sidebar-left .user-box h6 {
        color: #ffffff !important;
        margin-bottom: 4px;
        font-weight: 700;
        font-size: 18px;
        letter-spacing: 0.3px;
        opacity: 0;
        transform: translateY(10px);
    }

    body.sidebar-open .sidebar-left .user-box h6 {
        animation: fadeInUp 0.5s ease 0.3s both;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .sidebar-left .user-box .text-muted {
        color: rgba(255, 255, 255, 0.85) !important;
        font-size: 13px;
        font-weight: 500;
        opacity: 0;
        transform: translateY(10px);
    }

    body.sidebar-open .sidebar-left .user-box .text-muted {
        animation: fadeInUp 0.5s ease 0.4s both;
    }

    /* Close button - modern design */
    .mobile-menu-close {
        position: absolute;
        top: 15px;
        right: 15px;
        font-size: 26px;
        line-height: 1;
        color: white;
        background: rgba(255, 255, 255, 0.15);
        border: none;
        cursor: pointer;
        width: 38px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border-radius: 50%;
        transition: all 0.3s ease;
        backdrop-filter: blur(10px);
        opacity: 0;
        transform: rotate(-90deg) scale(0.5);
    }

    body.sidebar-open .mobile-menu-close {
        animation: fadeInRotate 0.5s ease 0.1s both;
    }

    @keyframes fadeInRotate {
        from {
            opacity: 0;
            transform: rotate(-90deg) scale(0.5);
        }
        to {
            opacity: 1;
            transform: rotate(0deg) scale(1);
        }
    }

    .mobile-menu-close:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: rotate(90deg) scale(1.1);
    }

    .mobile-menu-close:active {
        transform: rotate(90deg) scale(0.95);
    }
    
    /* Navigation container */
    .sidebar-left .side-navigation {
        padding: 15px 12px;
        flex: 1;
        background: #ffffff;
    }
    
    /* Section titles */
    .sidebar-left .navigation-title {
        color: #6c757d;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1.2px;
        margin-top: 15px;
        margin-bottom: 10px;
        padding: 0 12px;
        opacity: 0;
        transform: translateX(-20px);
    }

    body.sidebar-open .sidebar-left .navigation-title {
        animation: slideInLeft 0.2s ease 0.2s both;
    }

    @keyframes slideInLeft {
        from {
            opacity: 0;
            transform: translateX(-20px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    /* Menu items - modern card style */
    .sidebar-left .side-navigation > li {
        margin-bottom: 6px;
        opacity: 0;
        transform: translateX(-20px);
    }

    body.sidebar-open .sidebar-left .side-navigation > li {
        animation: slideInLeft 0.25s ease both;
    }

    body.sidebar-open .sidebar-left .side-navigation > li:nth-child(1) { animation-delay: 0.23s; }
    body.sidebar-open .sidebar-left .side-navigation > li:nth-child(2) { animation-delay: 0.23s; }
    body.sidebar-open .sidebar-left .side-navigation > li:nth-child(3) { animation-delay: 0.23s; }
    body.sidebar-open .sidebar-left .side-navigation > li:nth-child(4) { animation-delay: 0.23s; }
    body.sidebar-open .sidebar-left .side-navigation > li:nth-child(5) { animation-delay: 0.23s; }
    body.sidebar-open .sidebar-left .side-navigation > li:nth-child(6) { animation-delay: 0.23s; }
    body.sidebar-open .sidebar-left .side-navigation > li:nth-child(7) { animation-delay: 0.23s; }
    
    .sidebar-left .side-navigation li a {
        color: #495057;
        padding: 14px 16px;
        border-radius: 10px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        font-weight: 600;
        font-size: 15px;
        position: relative;
        overflow: hidden;
    }

    /* Ripple effect background */
    .sidebar-left .side-navigation li a::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(6, 100, 170, 0.1);
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }

    .sidebar-left .side-navigation li a:active::before {
        width: 300px;
        height: 300px;
    }

    /* Icon styling */
    .sidebar-left .side-navigation li a i {
        font-size: 20px;
        margin-right: 12px;
        width: 24px;
        text-align: center;
        transition: all 0.3s ease;
    }
    
    .sidebar-left .side-navigation li a:hover {
        background: linear-gradient(135deg, rgba(6, 100, 170, 0.08) 0%, rgba(6, 100, 170, 0.12) 100%);
        color: #0664aa;
        transform: translateX(4px);
        box-shadow: 0 2px 8px rgba(6, 100, 170, 0.15);
    }

    .sidebar-left .side-navigation li a:hover i {
        transform: scale(1.15) rotateZ(5deg);
    }
    
    /* Active menu item */
    .sidebar-left .side-navigation li.active > a {
        background: linear-gradient(135deg, #0664aa 0%, #055a98 100%);
        color: white;
        box-shadow: 0 4px 15px rgba(6, 100, 170, 0.4);
        transform: translateX(4px);
    }

    .sidebar-left .side-navigation li.active > a::after {
        content: '';
        position: absolute;
        right: -2px;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 70%;
        background: white;
        border-radius: 2px 0 0 2px;
        box-shadow: -2px 0 8px rgba(255, 255, 255, 0.5);
    }

    /* Submenu styling */
    .sidebar-left .side-navigation .menu-list > a::after {
        content: '\f105';
        font-family: 'FontAwesome';
        position: absolute;
        right: 16px;
        transition: transform 0.3s ease;
        font-size: 18px;
    }

    .sidebar-left .side-navigation .menu-list.nav-active > a::after {
        transform: rotate(90deg);
    }

    .sidebar-left .side-navigation .child-list {
        padding-left: 0;
        margin-top: 6px;
        margin-bottom: 6px;
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar-left .side-navigation .menu-list.nav-active .child-list {
        max-height: 500px;
    }
    
    .sidebar-left .side-navigation .child-list li {
        margin-bottom: 2px;
    }

    .sidebar-left .side-navigation .child-list li a {
        color: #6c757d;
        padding: 10px 16px 10px 52px;
        font-size: 14px;
        font-weight: 500;
        border-radius: 8px;
        position: relative;
    }

    /* Submenu indicator dot */

    .sidebar-left .side-navigation .child-list li a:hover::before {
        background: #0664aa;
        transform: translateY(-50%) scale(1.3);
    }

    .sidebar-left .side-navigation .child-list li.active a {
        background: rgba(6, 100, 170, 0.15);
        color: white;
        font-weight: 700;
    }

    .sidebar-left .side-navigation .child-list li.active a::before {
        background: #0664aa;
        box-shadow: 0 0 0 3px rgba(6, 100, 170, 0.2);
    }

    /* Smooth reveal animation for submenu items */
    .sidebar-left .side-navigation .child-list li {
        opacity: 0;
        transform: translateX(-10px);
        transition: all 0.3s ease;
    }

    .sidebar-left .side-navigation .menu-list.nav-active .child-list li {
        opacity: 1;
        transform: translateX(0);
    }

    .sidebar-left .side-navigation .menu-list.nav-active .child-list li:nth-child(1) { transition-delay: 0.05s; }
    .sidebar-left .side-navigation .menu-list.nav-active .child-list li:nth-child(2) { transition-delay: 0.1s; }
    .sidebar-left .side-navigation .menu-list.nav-active .child-list li:nth-child(3) { transition-delay: 0.15s; }
    .sidebar-left .side-navigation .menu-list.nav-active .child-list li:nth-child(4) { transition-delay: 0.2s; }

    /* Prevent body scroll when sidebar is open */
    body.sidebar-open {
        overflow: hidden;
    }
}

/* No special handling needed on small screens with flex layout */

/* (tidigare sticky-header för #loanTable borttagen – tabellen använder nu standardbeteende) */

/* Hide card action icons on desktop, show on mobile */
@media (min-width: 769px) {
  .card-action-icons { display: none !important; }
}

/* ========================================
   RIPPLE EFFECT FOR MOBILE SIDEBAR
   ======================================== */
.sidebar-left .side-navigation li a {
    position: relative;
    overflow: hidden;
}

.sidebar-left .side-navigation li a .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    from {
        transform: scale(0);
        opacity: 1;
    }
    to {
        transform: scale(20);
        opacity: 0;
    }
}

/* Mobile menu close button clicked effect */
.mobile-menu-close.clicked {
    transform: rotate(90deg) scale(0.9);
}

/* ========================================
   CLASS OVERVIEW TABLE - MOBILE RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  /* Class Overview Table */
  #classOverviewTable {
    border: none;
    background: transparent;
  }
  
  /* Hide thead on mobile */
  #classOverviewTable thead {
    display: none !important;
  }
  
  #classOverviewTable tbody {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 0;
  }
  
  #classOverviewTable tr {
    display: block;
    background: #ffffff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    padding: 20px;
    position: relative;
    transition: box-shadow 0.2s ease, transform 0.1s ease;
    z-index: 1;
  }
  
  /* Higher z-index when dropdown is open */
  #classOverviewTable tr:has(.btn-group.show) {
    z-index: 1050;
  }
  
  #classOverviewTable tr:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
  }
  
  #classOverviewTable td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(241, 243, 244, 0.8);
    font-size: 14px;
    text-align: left;
    line-height: 1.4;
    min-height: 24px;
  }
  
  #classOverviewTable td:last-child {
    border-bottom: none;
    margin-top: 12px;
    justify-content: center;
    padding-top: 12px;
    border-top: 2px solid #f8f9fa;
  }
  
  #classOverviewTable td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #495057;
    flex: 0 0 45%;
    margin-right: 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.3;
  }
  
  /* Hide label for export button cell */
  #classOverviewTable td:last-child::before {
    display: none;
  }
  
  /* Value styling */
  #classOverviewTable td > * {
    text-align: right;
    word-break: break-word;
  }
  
  /* Export dropdown styling */
  #classOverviewTable .btn-group {
    width: 100%;
    position: relative;
    z-index: 1;
  }
  
  #classOverviewTable .btn-group.show {
    z-index: 1051;
  }
  
  #classOverviewTable .btn-group .btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
  }
  
  #classOverviewTable .dropdown-menu {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1052;
    position: absolute;
  }
  
  #classOverviewTable .dropdown-item {
    padding: 12px 16px;
    font-size: 14px;
  }
  
  /* Status indicators */
  #classOverviewTable td:contains("Ja") {
    color: #28a745;
    font-weight: 600;
  }
  
  #classOverviewTable td:contains("Nej") {
    color: #6c757d;
    font-weight: 600;
  }
}

/* ========================================
   LOAN OVERVIEW TABLE - MOBILE RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  /* Loan Overview Table */
  #loanTable {
    border: none;
    background: transparent;
  }
  
  /* Hide thead on mobile */
  #loanTable thead {
    display: none !important;
  }
  
  /* Also hide any DataTables generated header elements */
  #loanTable_wrapper .dataTables_scrollHead {
    display: none !important;
  }
  
  #loanTable tbody {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 0;
  }
  
  #loanTable tr {
    display: block;
    background: #ffffff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    padding: 20px;
    position: relative;
    transition: box-shadow 0.2s ease, transform 0.1s ease;
  }
  
  #loanTable tr:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
  }
  
  /* Card header with ID badge */
  #loanTable tr::before {
    content: "ID: " attr(data-enhet-id);
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #6c757d;
    margin-bottom: 12px;
    padding: 4px 8px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 60px;
    text-align: center;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid #e9ecef;
  }
  
  #loanTable td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(241, 243, 244, 0.8);
    font-size: 14px;
    text-align: left;
    line-height: 1.4;
    min-height: 24px;
  }
  
  /* Hide first cell (Enhet ID) since it's shown in badge */
  #loanTable td:first-child {
    display: none !important;
  }
  
  /* Add extra top margin to second cell (Serienummer) for spacing */
  #loanTable td:nth-child(2) {
    margin-top: 30px;
  }
  
  #loanTable td:last-child {
    border-bottom: none;
  }
  
  #loanTable td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #495057;
    flex: 0 0 40%;
    margin-right: 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.3;
  }
  
  /* Value styling */
  #loanTable td > * {
    text-align: right;
    word-break: break-word;
  }
  
  /* Status indicators */
  #loanTable td[data-label="Status"] {
    font-weight: 600;
  }
  
  /* Contract status styling */
  #loanTable td[data-label="Kontrakt"]:contains("Ja") {
    color: #28a745;
    font-weight: 600;
  }
  
  #loanTable td[data-label="Kontrakt"]:contains("Nej") {
    color: #dc3545;
    font-weight: 600;
  }
}

/* ========================================
   MOBILE SIDEBAR FOOTER SECTION (Optional)
   ======================================== */
@media (max-width: 991.98px) {
    .sidebar-footer {
        padding: 20px;
        background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
        border-top: 1px solid #dee2e6;
        text-align: center;
        margin-top: auto;
    }

    .sidebar-footer p {
        margin: 0;
        font-size: 12px;
        color: #6c757d;
        font-weight: 500;
    }
}

/* ========================================
   MOBILE SIDEBAR ACCESSIBILITY
   ======================================== */
@media (max-width: 991.98px) {
    /* Focus styles for keyboard navigation */
    .sidebar-left .side-navigation li a:focus {
        outline: 2px solid #0664aa;
        outline-offset: 2px;
    }

    .mobile-menu-close:focus {
        outline: 2px solid white;
        outline-offset: 2px;
    }

    /* High contrast mode support */
    @media (prefers-contrast: high) {
        .sidebar-left .side-navigation li.active > a {
            border: 2px solid white;
        }
    }

    /* Reduced motion support */
    @media (prefers-reduced-motion: reduce) {
        .sidebar-left,
        .mobile-menu-overlay,
        .sidebar-left .side-navigation li a,
        .sidebar-left .user-box img,
        .mobile-menu-close {
            animation: none;
            transition: none;
        }

        body.sidebar-open .sidebar-left {
            transform: translateX(0);
        }

        .sidebar-left {
            transform: translateX(-100%);
        }
    }
}

/* ========================================
   HÄNDELSELOGG - Förhindra textmarkering vid scroll
   ======================================== */
#deviceEventsList,
#userEventsList {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
