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;
  padding: 0;
  overflow-x: hidden;
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 250px;
  background: linear-gradient(180deg, #0d6efd 0%, #0a58ca 100%);
  color: white;
  transition: width 0.3s ease;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar.minimized {
  width: 70px;
}

.sidebar-header {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-toggle {
  padding: 0.25rem 0.5rem;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.sidebar.minimized .sidebar-toggle i {
  transform: rotate(180deg);
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.sidebar-link:hover {
  background-color: rgba(255,255,255,0.1);
  color: white;
  border-left-color: white;
}

.sidebar-link.active {
  background-color: rgba(255,255,255,0.15);
  color: white;
  border-left-color: white;
  font-weight: 600;
}

.sidebar-link i {
  font-size: 1.25rem;
  min-width: 1.5rem;
  margin-right: 0.75rem;
}

.sidebar.minimized .sidebar-link {
  justify-content: center;
  padding: 0.75rem 0.5rem;
}

.sidebar-divider {
  border-color: rgba(255,255,255,0.2);
  margin: 0.5rem 0;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-user {
  padding: 0.5rem;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
}

.sidebar-user i {
  font-size: 1.5rem;
}

.sidebar-text {
  transition: opacity 0.3s ease;
}

.sidebar.minimized .sidebar-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

/* Main Content */
.main-content {
  margin-left: 250px;
  transition: margin-left 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sidebar.minimized ~ .main-content {
  margin-left: 70px;
}

.top-header {
  background: white;
  border-bottom: 1px solid #dee2e6;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.page-title {
  font-size: 1.75rem;
  margin: 0;
  color: #212529;
}

.content-wrapper {
  flex: 1;
  padding: 1.5rem;
}

.footer {
  background: #f8f9fa;
  padding: 1rem 0;
  border-top: 1px solid #dee2e6;
}

/* Clickable Table Rows */
.clickable-row {
  transition: background-color 0.15s ease;
}

.clickable-row:hover {
  background-color: rgba(13, 110, 253, 0.05) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    width: 70px;
  }

  .sidebar .sidebar-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
  }

  .main-content {
    margin-left: 70px;
  }

  .sidebar.expanded {
    width: 250px;
  }

  .sidebar.expanded .sidebar-text {
    opacity: 1;
    width: auto;
  }
}

/* Slide-In Panel (Offcanvas) */
.slide-in-panel {
  position: fixed;
  top: 0;
  right: -600px;
  width: 600px;
  max-width: 90vw;
  height: 100vh;
  background: white;
  box-shadow: -3px 0 20px rgba(0, 0, 0, 0.15);
  z-index: 1050;
  transition: right 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.slide-in-panel.active {
  right: 0;
}

.slide-in-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.slide-in-overlay.active {
  opacity: 1;
  visibility: visible;
}

.slide-in-header {
  padding: 1.5rem;
  border-bottom: 1px solid #dee2e6;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.slide-in-header h5 {
  margin: 0;
  font-size: 1.25rem;
}

.slide-in-body {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.slide-in-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #dee2e6;
  background: #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slide-in-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  transition: color 0.2s ease;
  border-radius: 4px;
}

.slide-in-close:hover {
  color: #000;
  background: rgba(0, 0, 0, 0.05);
}

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

/* Responsive Slide-In */
@media (max-width: 768px) {
  .slide-in-panel {
    width: 100vw;
    right: -100vw;
  }
}