:root {
  --mc-orange: #ff4813;
  --mc-orange-dark: #d93605;
  --mc-ink: #1b1b1b;
  --mc-muted: #8e8e8e;
  --mc-surface: #f4f4f3;
  --bs-primary: var(--mc-orange);
  --bs-primary-rgb: 255, 72, 19;
}

body {
  background: var(--mc-surface);
}

.app-header,
.app-sidebar {
  background: var(--mc-ink);
}

.brand-link {
  border-bottom: 1px solid rgb(255 255 255 / 12%);
}

.brand-mark {
  align-items: center;
  background: var(--mc-orange);
  border-radius: 0.4rem;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  height: 2rem;
  justify-content: center;
  letter-spacing: -0.08em;
  margin-right: 0.55rem;
  width: 2.35rem;
}

.sidebar-menu .nav-link.active,
.sidebar-menu .nav-link:hover {
  background: var(--mc-orange);
  color: #fff;
}

.btn-primary {
  --bs-btn-bg: var(--mc-orange);
  --bs-btn-border-color: var(--mc-orange);
  --bs-btn-hover-bg: var(--mc-orange-dark);
  --bs-btn-hover-border-color: var(--mc-orange-dark);
}

.text-bg-primary {
  background: var(--mc-orange) !important;
}

.card-primary.card-outline {
  border-top-color: var(--mc-orange);
}

.mc-page {
  display: none;
}

.mc-page.active {
  display: block;
}

.small-box {
  min-height: 128px;
}

.dashboard-stat-card {
  color: #fff;
  display: block;
  overflow: hidden;
  position: relative;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.dashboard-stat-card:hover {
  box-shadow: 0 0.65rem 1.25rem rgb(0 0 0 / 18%);
  color: #fff;
  transform: translateY(-2px);
}

.dashboard-stat-card:focus-visible {
  box-shadow: 0 0 0 0.25rem rgb(255 72 19 / 30%);
  color: #fff;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.dashboard-stat-link {
  align-items: center;
  background: rgb(0 0 0 / 12%);
  bottom: 0;
  display: flex;
  font-size: 0.82rem;
  gap: 0.35rem;
  justify-content: center;
  left: 0;
  padding: 0.3rem 0.75rem;
  position: absolute;
  right: 0;
}

.table td,
.table th {
  vertical-align: middle;
}

.status-dot {
  border-radius: 50%;
  display: inline-block;
  height: 0.55rem;
  margin-right: 0.4rem;
  width: 0.55rem;
}

.status-dot.online,
.status-dot.active {
  background: #198754;
}

.status-dot.offline,
.status-dot.blocked,
.status-dot.revoked {
  background: #dc3545;
}

.status-dot.unknown {
  background: #ffc107;
}

.empty-state {
  color: var(--mc-muted);
  padding: 2.5rem 1rem;
  text-align: center;
}

.toast-container {
  z-index: 1090;
}

.mc-loading-bar {
  align-items: center;
  background: var(--mc-orange);
  color: #fff;
  display: flex;
  font-size: 0.875rem;
  gap: 0.5rem;
  left: 0;
  padding: 0.45rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1025;
}

.mc-danger-icon {
  align-items: center;
  background: rgb(220 53 69 / 10%);
  border-radius: 50%;
  color: #dc3545;
  display: flex;
  font-size: 1.6rem;
  height: 3.5rem;
  justify-content: center;
  margin-bottom: 1rem;
  width: 3.5rem;
}

.mc-result {
  border-left: 4px solid;
  border-radius: 0.35rem;
  padding: 1rem;
}

.mc-result.success {
  background: rgb(25 135 84 / 8%);
  border-color: #198754;
}

.mc-result.error {
  background: rgb(220 53 69 / 8%);
  border-color: #dc3545;
}

.status-dot.scheduled {
  background: #0d6efd;
}

.status-dot.expired {
  background: #6c757d;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgb(255 72 19 / 35%);
  outline-offset: 2px;
}

#tenant-modal .modal-content {
  max-height: calc(100vh - 2rem);
}

#tenant-modal .modal-body {
  overflow-y: auto;
}

.mc-checklist-item {
  align-items: flex-start;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  cursor: pointer;
  display: flex;
  gap: 0.75rem;
  min-height: 100%;
  padding: 0.85rem;
}

.mc-checklist-item:has(input:checked) {
  background: rgb(25 135 84 / 7%);
  border-color: rgb(25 135 84 / 45%);
}

.mc-checklist-item small {
  color: var(--bs-secondary-color);
  display: block;
  margin-top: 0.2rem;
}

.mc-integration-options {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.mc-integration-option {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  padding: 1rem;
}

@media (max-width: 767.98px) {
  .table .btn-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .table .btn-group > .btn {
    border-radius: var(--bs-border-radius-sm) !important;
  }
}
