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;
  background-color: #f8fafc;
}

body.auth-shell {
  background: radial-gradient(circle at top, #1e293b 0%, #0f172a 55%, #020617 100%);
}

.auth-main {
  min-height: 100vh;
}

.auth-card {
  border-radius: 1rem;
  background: #0b1220;
  color: #e2e8f0;
}

.auth-card .text-muted {
  color: #94a3b8 !important;
}

.auth-brand {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
}

.auth-card .form-control,
.auth-card .input-group-text {
  background: #111827;
  color: #e5e7eb;
  border-color: #334155;
}

.auth-card .form-control::placeholder {
  color: #94a3b8;
}

.app-shell {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: 280px;
  background: #111827;
  color: #e5e7eb;
  transition: width 0.2s ease;
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.sidebar-subtitle {
  font-size: 0.8rem;
  color: #cbd5e1;
}

.sidebar-group-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin: 0.25rem 0 0.5rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.25rem;
  border-left: 3px solid transparent;
}

.sidebar-link:hover {
  color: #fff;
  background: #1f2937;
}

.sidebar-link.active {
  color: #fff;
  background: #2563eb;
  border-left-color: #93c5fd;
}

.sidebar-link-icon {
  width: 1rem;
  min-width: 1rem;
  font-size: 1rem;
}

.sidebar-link-text {
  white-space: nowrap;
}

.main-panel {
  flex: 1;
  min-width: 0;
}

.topbar {
  background: #fff;
}

.content {
  max-width: 100%;
}

body.sidebar-collapsed .sidebar {
  width: 74px;
}

body.sidebar-collapsed .sidebar-subtitle,
body.sidebar-collapsed .sidebar-group-label {
  display: none;
}

body.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding: 0.85rem 0.4rem;
}

body.sidebar-collapsed .sidebar-link-text {
  display: none;
}

body.sidebar-collapsed .sidebar-header {
  justify-content: center !important;
}

body.sidebar-collapsed .sidebar-header .sidebar-title {
  display: none;
}

body.sidebar-collapsed .sidebar-toggle {
  margin: 0;
}

.sync-page-card .card-header {
  background: #fff;
}

.sync-filter-form label {
  font-size: 0.88rem;
  color: #334155;
}

.sync-filter-form .form-control,
.sync-filter-form .form-select {
  min-width: 160px;
}

.sync-status-badge {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.75rem;
}

.sync-status-success {
  color: #065f46;
  background: #d1fae5;
}

.sync-status-failed {
  color: #991b1b;
  background: #fee2e2;
}

.sync-status-submitted,
.sync-status-pending {
  color: #92400e;
  background: #fef3c7;
}

.sync-client-chip {
  color: #1e3a8a;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.table-cell-wrap {
  max-width: 240px;
  white-space: normal;
  word-break: break-word;
}

@media (max-width: 767.98px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1030;
    transform: translateX(-100%);
    width: 280px;
  }

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

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1020;
  }
}