* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  background-color: #f5f5f5;
  padding-top: 56px; /* Height of navbar */
}

#app {
  display: flex;
  height: calc(100vh - 56px); /* Fills the viewport below the fixed navbar */
  overflow: hidden;
}

.app-body {
  display: flex;
  flex: 1;
}

/* Fixed top navbar — pin to the 56px the layout reserves so the BroadVail
   logo is vertically centered with proper edge offset and never clipped. */
.navbar.fixed-top {
  height: 56px;
  min-height: 56px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e0e0e0;
}
.navbar.fixed-top .container-fluid {
  padding: 0;
  align-items: center;
}
.navbar-brand {
  display: inline-flex;
  align-items: center;
  height: 100%;
  margin: 0;
  padding: 0;
}
.navbar-brand img {
  display: block;
  height: 30px;
  width: auto;
}

#main-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background-color: #fff;
  margin-left: 250px; /* Width of sidebar */
}

/* Loading Overlay */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
}

#loading-spinner {
  border: 8px solid rgba(0, 0, 0, 0.1);
  border-left-color: #3498db;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Buttons */
.btn {
  padding: 10px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #545b62;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 5px;
}

/* Form elements */
input[type="text"],
input[type="search"],
select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

input[type="text"]:focus,
input[type="search"]:focus,
select:focus {
  outline: none;
  border-color: #007bff;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
}

thead {
  background-color: #f8f9fa;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

th {
  font-weight: 600;
  color: #495057;
}

tr:hover {
  background-color: #f8f9fa;
}

/* Tags */
.tag {
  display: inline-block;
  padding: 4px 8px;
  margin: 2px;
  background-color: #e9ecef;
  border-radius: 12px;
  font-size: 12px;
  color: #495057;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background-color: #007bff;
  color: white;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
}

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
  color: #6c757d;
}

/* Utility classes */
.hidden {
  display: none;
}

.text-center {
  text-align: center;
}

.mt-10 {
  margin-top: 10px;
}

.mt-20 {
  margin-top: 20px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-20 {
  margin-bottom: 20px;
}
