:root {
  --admin-bg: #f6f8fb;
  --admin-panel: #ffffff;
  --admin-sidebar: #111827;
  --admin-sidebar-soft: #1f2937;
  --admin-sidebar-text: #d1d5db;
  --admin-sidebar-muted: #9ca3af;
  --admin-primary: #2563eb;
  --admin-success: #16a34a;
  --admin-danger: #dc2626;
  --admin-border: #e5e7eb;
  --admin-radius: 8px;
}

body {
  background: var(--admin-bg);
  font-family: "Inter", "Roboto", Arial, sans-serif;
}

.sidebar-wrapper {
  background: var(--admin-sidebar) !important;
  border-right: 0;
  box-shadow: 0 0 24px rgba(15, 23, 42, 0.16);
}

.sidebar-header {
  min-height: 72px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}

.logo-text {
  max-width: 156px;
  margin: 0;
  color: #fff !important;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  white-space: normal;
}

.sidebar-search {
  padding: 12px 14px 8px;
}

.sidebar-search .form-control {
  height: 38px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--admin-radius);
}

.sidebar-search .form-control::placeholder {
  color: var(--admin-sidebar-muted);
}

.sidebar-empty {
  display: none;
  padding: 10px 18px;
  color: var(--admin-sidebar-muted);
  font-size: 13px;
}

.metismenu {
  padding: 8px 10px 18px;
}

.metismenu .menu-label {
  margin: 18px 8px 8px;
  color: #93c5fd !important;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.metismenu a {
  min-height: 42px;
  margin: 2px 0;
  padding: 8px 10px;
  color: var(--admin-sidebar-text) !important;
  border-radius: var(--admin-radius);
  gap: 10px;
}

.metismenu a:hover,
.metismenu .mm-active > a,
.metismenu a.active {
  color: #fff !important;
  background: rgba(37, 99, 235, 0.22);
}

.metismenu .parent-icon {
  width: 34px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.metismenu .parent-icon i {
  font-size: 17px;
  color: #bfdbfe !important;
}

.metismenu .parent-icon img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border-radius: 8px !important;
}

.metismenu .menu-title {
  min-width: 0;
  color: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
}

.metismenu ul {
  margin: 4px 0 8px 16px;
  padding: 4px 0 4px 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.metismenu ul a {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.badge-instant,
.badge-instant2 {
  border-radius: 999px !important;
  font-size: 10px !important;
  letter-spacing: 0;
}

.topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--admin-border);
  backdrop-filter: blur(14px);
}

.page-wrapper .page-content {
  padding: 20px;
}

.card {
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.btn {
  border-radius: var(--admin-radius);
}

.app-toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 20000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 28px));
}

.app-toast {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 12px 12px 12px 0;
  color: #111827;
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.18);
  animation: appToastIn 180ms ease-out;
}

.app-toast::before {
  content: "";
  width: 4px;
  height: 100%;
  min-height: 42px;
  border-radius: 999px;
  background: var(--admin-primary);
  justify-self: center;
}

.app-toast.success::before { background: var(--admin-success); }
.app-toast.error::before { background: var(--admin-danger); }
.app-toast.warning::before { background: #d97706; }
.app-toast.info::before { background: var(--admin-primary); }

.app-toast-title {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 800;
}

.app-toast-message {
  margin: 0;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.35;
}

.app-toast-close {
  width: 28px;
  height: 28px;
  border: 0;
  color: #6b7280;
  background: transparent;
  border-radius: 6px;
  font-size: 20px;
  line-height: 1;
}

.app-toast-close:hover {
  color: #111827;
  background: #f3f4f6;
}

.adsense-page-stack {
  display: grid;
  gap: 12px;
  width: min(100%, 1180px);
  margin: 18px auto;
  padding: 0 14px;
}

.adsense-slot {
  width: 100%;
  min-height: 0;
  overflow: hidden;
}

.adsense-page-stack .adsense-slot {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

@keyframes appToastIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .app-toast-stack {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .page-wrapper .page-content {
    padding: 14px;
  }
}
