:root {
  --admin-sidebar-width: 270px;
  --admin-topbar-height: 72px;
  --admin-bg: #f4f7fb;
  --admin-surface: #ffffff;
  --admin-border: #e2e8f0;
  --admin-text: #0f172a;
  --admin-muted: #64748b;
  --admin-sidebar: #0b1220;
  --admin-sidebar-hover: rgba(255, 255, 255, 0.06);
  --admin-sidebar-active: rgba(59, 130, 246, 0.18);
  --admin-primary: #2563eb;
  --admin-primary-dark: #1d4ed8;
  --admin-cyan: #06b6d4;
  --admin-purple: #7c3aed;
  --admin-amber: #f59e0b;
  --admin-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --admin-radius: 16px;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body.admin-body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--admin-bg);
  color: var(--admin-text);
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--admin-sidebar-width);
  background: linear-gradient(180deg, #0b1220 0%, #111827 100%);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem;
  z-index: 1040;
  border-right: 1px solid rgba(148, 163, 184, 0.08);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.85rem 1.5rem;
}

.sidebar-brand strong {
  display: block;
  font-size: 1rem;
}

.sidebar-brand small {
  color: #94a3b8;
  font-size: 0.78rem;
}

.sidebar-brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 12px;
  filter: drop-shadow(0 6px 18px rgba(37, 99, 235, 0.3));
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
  font-size: 1.2rem;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar-nav .nav-link i {
  font-size: 1.1rem;
  width: 1.25rem;
}

.sidebar-nav .nav-link:hover {
  background: var(--admin-sidebar-hover);
  color: #fff;
}

.sidebar-nav .nav-link.active {
  background: var(--admin-sidebar-active);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.25);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
}

.sidebar-footer-card {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.sidebar-footer-card i {
  color: #22d3ee;
  font-size: 1.2rem;
  margin-top: 0.15rem;
}

.sidebar-footer-card strong {
  display: block;
  font-size: 0.92rem;
}

.sidebar-footer-card small {
  color: #94a3b8;
}

.admin-main {
  margin-left: var(--admin-sidebar-width);
  min-height: 100vh;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--admin-topbar-height);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--admin-border);
}

.topbar-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}

.topbar-search i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--admin-muted);
}

.topbar-search input {
  width: 100%;
  border: 1px solid var(--admin-border);
  background: #f8fafc;
  border-radius: 999px;
  padding: 0.7rem 1rem 0.7rem 2.6rem;
  outline: none;
}

.topbar-search input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--admin-border);
  background: #fff;
  color: var(--admin-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.notification-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
}

.notification-btn {
  text-decoration: none;
}

.notification-btn.has-notifications {
  border-color: #fecaca;
  background: #fff7f7;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  line-height: 1;
}

.feedback-row-unread {
  background: rgba(239, 68, 68, 0.04);
}

.feedback-text-cell {
  max-width: 360px;
}

.feedback-preview {
  white-space: pre-wrap;
  word-break: break-word;
}

.feedback-user-info summary {
  cursor: pointer;
  color: var(--admin-primary);
  font-weight: 500;
}

.feedback-user-info pre {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  font-size: 0.78rem;
  max-height: 220px;
  overflow: auto;
}

.inquiry-row-unread {
  background: rgba(37, 99, 235, 0.04);
}

.inquiry-message-cell {
  max-width: 420px;
}

.inquiry-preview {
  white-space: pre-wrap;
  word-break: break-word;
}

.user-form-card .user-form-body {
  padding: 1.5rem;
}

.user-form-grid {
  display: grid;
  gap: 1.15rem;
}

.user-form .form-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.user-form .input-group-text {
  background: #f8fafc;
  border-color: var(--admin-border);
  color: var(--admin-primary);
}

.user-form .form-control {
  border-color: var(--admin-border);
  padding: 0.72rem 0.9rem;
}

.user-form .form-control:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.user-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--admin-border);
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--admin-border);
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.85rem 0.35rem 0.35rem;
}

.profile-btn::after {
  margin-left: 0.25rem;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.profile-meta {
  text-align: left;
  line-height: 1.2;
}

.profile-meta strong {
  display: block;
  font-size: 0.88rem;
}

.profile-meta small {
  color: var(--admin-muted);
  font-size: 0.75rem;
}

.dropdown-menu {
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  padding: 0.5rem;
}

.dropdown-item {
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.admin-content {
  padding: 1.5rem;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.85rem;
  font-weight: 700;
}

.page-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.stat-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  box-shadow: var(--admin-shadow);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.stat-label {
  display: block;
  color: var(--admin-muted);
  font-size: 0.86rem;
  margin-bottom: 0.2rem;
}

.stat-value {
  font-size: 1.7rem;
  line-height: 1;
}

.stat-card-blue .stat-icon {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

.stat-card-cyan .stat-icon {
  background: rgba(6, 182, 212, 0.12);
  color: #0891b2;
}

.stat-card-amber .stat-icon {
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
}

.stat-card-purple .stat-icon {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
}

.panel-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  overflow: hidden;
}

.panel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--admin-border);
}

.panel-card-header h2 {
  margin: 0;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.activity-list {
  padding: 0.5rem 1.25rem 1rem;
}

.activity-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-body p {
  color: var(--admin-muted);
  font-size: 0.92rem;
}

.quick-actions {
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
}

.quick-action-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--admin-text);
  background: #f8fafc;
  border: 1px solid var(--admin-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-action-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  color: var(--admin-primary);
}

.admin-table thead th {
  background: #f8fafc;
  color: var(--admin-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--admin-border);
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e0e7ff;
  color: #4338ca;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
}

.placeholder-card {
  background: var(--admin-surface);
  border: 1px dashed #cbd5e1;
  border-radius: var(--admin-radius);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--admin-shadow);
}

.placeholder-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(6, 182, 212, 0.12));
  color: var(--admin-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.placeholder-card h2 {
  margin-bottom: 0.75rem;
}

.placeholder-card p {
  color: var(--admin-muted);
  max-width: 520px;
  margin: 0 auto 1.25rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--admin-primary), #3b82f6);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--admin-primary-dark), #2563eb);
}

.login-body {
  min-height: 100vh;
  background: #030712;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.login-bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 50% 0%, rgba(59, 130, 246, 0.18), transparent 60%),
    radial-gradient(ellipse 40% 35% at 100% 100%, rgba(34, 211, 238, 0.1), transparent 55%),
    radial-gradient(ellipse 35% 30% at 0% 80%, rgba(168, 85, 247, 0.08), transparent 50%);
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  padding: 2.25rem 2rem 2rem;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.login-brand-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-brand-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 0.85rem;
  filter: drop-shadow(0 8px 24px rgba(37, 99, 235, 0.25));
}

.login-brand-text strong {
  display: block;
  font-size: 1.15rem;
  color: var(--admin-text);
  letter-spacing: -0.02em;
}

.login-brand-text span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--admin-muted);
  font-weight: 500;
}

.login-card h1 {
  margin: 0 0 0.35rem;
  text-align: center;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.login-subtitle {
  color: var(--admin-muted);
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 0.95rem;
}

.login-form .input-group-text {
  background: #f8fafc;
  border-color: var(--admin-border);
  color: var(--admin-primary);
}

.login-form .form-control {
  border-color: var(--admin-border);
  padding: 0.72rem 0.9rem;
}

.login-form .form-control:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.login-submit {
  padding: 0.82rem 1rem;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.28);
}

.sidebar-toggle {
  display: none;
}

@media (max-width: 991.98px) {
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

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

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

  .sidebar-toggle {
    display: inline-flex;
  }

  .profile-meta {
    display: none;
  }
}
