body.sp-drawer-open {
  overflow: hidden;
}

.sp-body {
  margin: 0;
  background: #f1f5f9;
  color: #0f172a;
  font-family: var(--font, "Inter", system-ui, sans-serif);
}

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

.sp-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(272px, 88vw);
  z-index: 300;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
  box-shadow: 8px 0 40px rgba(15, 23, 42, 0.18);
  transform: translateX(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sp-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sp-sidebar-brand img {
  height: 40px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}

.sp-sidebar-brand strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.sp-sidebar-brand span {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.sp-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sp-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #cbd5e1;
  transition: background 0.2s ease, color 0.2s ease;
}

.sp-nav-link .icon {
  width: 20px;
  height: 20px;
  opacity: 0.85;
}

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

.sp-nav-link.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 45%, transparent);
}

.sp-nav-link.active .icon {
  opacity: 1;
}

.sp-sidebar-foot {
  padding: 14px 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sp-sidebar-foot .sp-nav-link {
  font-weight: 500;
  font-size: 13px;
}

.sp-nav-link--muted {
  color: #94a3b8;
}

.sp-nav-link--danger {
  color: #fca5a5;
}

.sp-nav-link--danger:hover {
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
}

.sp-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 280;
  background: rgba(15, 23, 42, 0.45);
}

.sp-backdrop.is-open {
  display: block;
}

.sp-main {
  flex: 1;
  min-width: 0;
  margin-left: 272px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sp-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
}

.sp-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  padding: 0;
  color: #0f172a;
}

.sp-topbar-title {
  flex: 1;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.sp-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sp-topbar-actions .btn {
  height: 40px;
  padding: 0 16px;
  font-size: 13px;
  border-radius: 12px;
}

.sp-content {
  flex: 1;
  padding: 24px;
}

.sp-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
  padding: 24px 28px;
}

.sp-card h1,
.sp-card h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.sp-card > p.muted,
.sp-card > p {
  color: #64748b;
  margin: 0 0 16px;
}

.sp-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.sp-stat {
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 20px;
}

.sp-stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 6px;
}

.sp-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.sp-form {
  display: grid;
  gap: 18px;
  max-width: 640px;
}

.panel-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.panel-field input,
.panel-field select,
.panel-field textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.panel-field input:focus,
.panel-field select:focus,
.panel-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.alert-ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 600;
}

.sp-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

.sp-login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.sp-login-card h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.sp-login-card p {
  color: #64748b;
  font-size: 14px;
  margin: 0 0 24px;
}

.sp-login-card label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #334155;
}

.sp-login-card input {
  width: 100%;
  height: 46px;
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 14px;
}

.sp-login-card input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

@media (max-width: 900px) {
  .sp-sidebar {
    transform: translateX(-105%);
  }

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

  .sp-main {
    margin-left: 0;
  }

  .sp-menu-btn {
    display: inline-flex;
  }

  .sp-content {
    padding: 16px;
  }

  .sp-topbar {
    padding: 12px 16px;
  }

  .sp-topbar-actions .sp-hide-mobile {
    display: none;
  }
}