/* Main Styles */
body {
  font-size: .875rem;
  background-color: #f8f9fa;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  padding: 48px 0 0;
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
  background-color: #212529;
}

@media (max-width: 767.98px) {
  .sidebar {
    position: static;
    padding-top: 20px;
  }
}

.sidebar .nav-link {
  font-weight: 500;
  color: rgba(255, 255, 255, .65);
  padding: .5rem 1rem;
  margin: .2rem 0;
  border-radius: .25rem;
}

.sidebar .nav-link:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, .1);
}

.sidebar .nav-link.active {
  color: #fff;
  background-color: rgba(255, 255, 255, .2);
}

.sidebar .nav-link .bi {
  width: 16px;
  height: 16px;
  color: inherit;
}

/* Pages */
.page {
  display: none;
}

.active-page {
  display: block;
}

/* Logo */
.logo {
  max-width: 120px;
}

/* Cards */
.card {
  margin-bottom: 24px;
  border: none;
  box-shadow: 0 0.15rem 1.75rem 0 rgba(34, 39, 46, 0.15);
}

.card .card-header {
  background-color: #fff;
  border-bottom: 1px solid #e3e6f0;
}

.card-header h6 {
  font-weight: 700;
  font-size: 1rem;
}

/* Custom colored borders for stat cards */
.border-left-primary {
  border-left: .25rem solid #4e73df !important;
}

.border-left-success {
  border-left: .25rem solid #1cc88a !important;
}

.border-left-info {
  border-left: .25rem solid #36b9cc !important;
}

.border-left-warning {
  border-left: .25rem solid #f6c23e !important;
}

/* Form Elements */
.form-control:focus, .form-select:focus {
  border-color: #4e73df;
  box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
}

/* Table Styling */
.table-responsive {
  overflow-x: auto;
}

.table {
  margin-bottom: 0;
  table-layout: fixed;
  word-wrap: break-word;
}

.table thead th {
  vertical-align: middle;
  background-color: #f8f9fc;
  border-top: 0;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

.table td {
  vertical-align: middle;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Device info styling */
.device-name {
  font-weight: 500;
  margin-right: 5px;
}

/* Platform icons styling */
.bi-apple {
  font-size: 1.1rem;
  color: #555;
}

.bi-android2 {
  font-size: 1.1rem;
  color: #3DDC84;
}

.bi-device-unknown {
  font-size: 1.1rem;
  color: #6c757d;
}

/* Token column styling */
.token-cell {
  max-width: 200px;
  position: relative;
}

.token-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  width: 100%;
}

.copy-token {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.8);
  border: none;
  cursor: pointer;
  padding: 2px;
  border-radius: 3px;
}

.copy-token:hover {
  background: rgba(200,200,200,0.8);
}

/* Badge styling for OS version */
.badge.bg-light {
  font-weight: normal;
  font-size: 0.75rem;
  color: #444 !important;
  border: 1px solid #ddd;
}

/* Buttons */
.btn-primary {
  background-color: #4e73df;
  border-color: #4e73df;
}

.btn-primary:hover {
  background-color: #2e59d9;
  border-color: #2653d4;
}

/* Device List */
.device-list-container {
  max-height: 200px;
  overflow-y: auto;
}

/* Notification Action Icon */
.notification-action-icon {
  font-size: 1.2rem;
}

/* Pre blocks for JSON data */
pre {
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Toast Notification */
.toast-container {
  z-index: 1100;
}

/* Modal Customizations */
.modal-content {
  border: none;
  box-shadow: 0 0.15rem 1.75rem 0 rgba(34, 39, 46, 0.15);
}

.modal pre {
  max-height: 200px;
  overflow-y: auto;
}

/* Truncate long text with ellipsis */
.text-truncate-custom {
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}

/* Status Indicators */
.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}

.status-success {
  background-color: #1cc88a;
}

.status-warning {
  background-color: #f6c23e;
}

.status-danger {
  background-color: #e74a3b;
}

/* Custom Checkbox Styling */
.custom-checkbox-container {
  display: block;
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: #eee;
  border-radius: 3px;
}

.custom-checkbox-container:hover input ~ .checkmark {
  background-color: #ccc;
}

.custom-checkbox-container input:checked ~ .checkmark {
  background-color: #4e73df;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.custom-checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.custom-checkbox-container .checkmark:after {
  left: 7px;
  top: 3px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}