/* Admin Panel - Modern layout (Mhtsoftware) */
:root {
  --eg-blue: #1E6BFF;
  --eg-admin-sidebar-bg: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  --eg-admin-sidebar-text: rgba(248, 250, 252, 0.95);
  --eg-admin-sidebar-text-muted: rgba(203, 213, 225, 0.8);
  --eg-admin-sidebar-hover: rgba(30, 107, 255, 0.2);
  --eg-admin-sidebar-active: rgba(30, 107, 255, 0.28);
  --eg-admin-accent: #1E6BFF;
  --eg-admin-card-radius: 16px;
  --eg-admin-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --eg-admin-shadow-hover: 0 12px 40px rgba(15, 23, 42, 0.1);
}

.eg-body .eg-admin {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  gap: 0;
  padding: 0;
  background: #f1f5f9;
}

.eg-admin-sidebar {
  display: flex;
  flex-direction: column;
  background: var(--eg-admin-sidebar-bg);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 10;
}

.eg-admin-brand {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.eg-admin-brand .d-flex {
  justify-content: flex-start;
  padding-left: 4px;
}

.eg-admin-logo {
  max-height: 32px !important;
  max-width: 130px !important;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.eg-admin-brand .eg-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
}

.eg-admin-nav {
  flex: 1;
  padding: 0.75rem 0.5rem;
  overflow-y: auto;
}

.eg-admin-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 2px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--eg-admin-sidebar-text-muted);
  transition: color 0.15s ease, background 0.15s ease;
}

.eg-admin-link:hover {
  color: var(--eg-admin-sidebar-text);
  background: var(--eg-admin-sidebar-hover);
}

.eg-admin-link:focus {
  outline: none;
  color: var(--eg-admin-sidebar-text);
  background: var(--eg-admin-sidebar-hover);
}

.eg-admin-nav .eg-ic {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.9;
}

.eg-admin-link.text-danger {
  color: rgba(248, 113, 113, 0.95);
}

.eg-admin-link.text-danger:hover {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
}

.eg-admin-nav hr {
  margin: 0.75rem 0.5rem;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Version / credit footer in sidebar */
.eg-admin-footer {
  flex-shrink: 0;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: right;
}

.eg-admin-version {
  font-size: 0.7rem;
  color: var(--eg-admin-sidebar-text-muted);
  opacity: 0.85;
}

.eg-admin-credit {
  font-size: 0.7rem;
  color: var(--eg-admin-sidebar-text-muted);
  opacity: 0.7;
  margin-top: 2px;
}

.eg-admin-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
}

.eg-admin-topbar {
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 1rem 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.eg-admin-topbar .fw-bold {
  font-size: 1.15rem;
  color: #0f172a;
}

.eg-admin-topbar .text-muted.small {
  font-size: 0.8rem;
  margin-top: 2px;
}

.eg-admin-content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  background: #f1f5f9;
}

/* Cards in admin content */
.eg-admin-content .eg-card {
  border-radius: var(--eg-admin-card-radius);
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: var(--eg-admin-shadow);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.eg-admin-content .eg-card:hover {
  box-shadow: var(--eg-admin-shadow-hover);
  border-color: #cbd5e1;
}

.eg-admin-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.eg-admin-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, var(--eg-admin-accent), #3b82f6);
  box-shadow: 0 4px 12px rgba(30, 107, 255, 0.35);
}

.eg-admin-topbar .dropdown .btn {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Tables in admin */
.eg-admin-content .table {
  font-size: 0.9rem;
}

.eg-admin-content .table thead th {
  font-weight: 600;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.75rem;
}

.eg-admin-content .table tbody td {
  padding: 0.75rem;
  vertical-align: middle;
}

/* Buttons – Admin panelinde kesin mavi arka plan ve okunaklı yazı (Bootstrap/app override) */
body.eg-body .eg-admin .btn.eg-btn-primary,
body.eg-body .eg-admin a.btn.eg-btn-primary,
.eg-admin .eg-admin-content .btn.eg-btn-primary,
.eg-admin .eg-admin-content a.btn.eg-btn-primary {
  background: #1E6BFF !important;
  background-color: #1E6BFF !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(30, 107, 255, 0.35);
}
body.eg-body .eg-admin .btn.eg-btn-primary:hover,
body.eg-body .eg-admin a.btn.eg-btn-primary:hover,
.eg-admin .eg-admin-content .btn.eg-btn-primary:hover,
.eg-admin .eg-admin-content a.btn.eg-btn-primary:hover {
  background: #1557e6 !important;
  background-color: #1557e6 !important;
  color: #fff !important;
}

body.eg-body .eg-admin .btn.eg-btn-ghost,
body.eg-body .eg-admin a.btn.eg-btn-ghost,
.eg-admin .eg-admin-content .btn.eg-btn-ghost,
.eg-admin .eg-admin-content a.btn.eg-btn-ghost {
  background: #e2e8f0 !important;
  background-color: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}
body.eg-body .eg-admin .btn.eg-btn-ghost:hover,
body.eg-body .eg-admin a.btn.eg-btn-ghost:hover,
.eg-admin .eg-admin-content .btn.eg-btn-ghost:hover,
.eg-admin .eg-admin-content a.btn.eg-btn-ghost:hover {
  background: #cbd5e1 !important;
  color: #0f172a !important;
}
body.eg-body .eg-admin .btn.eg-btn-ghost.text-danger,
body.eg-body .eg-admin a.btn.eg-btn-ghost.text-danger {
  color: #dc2626 !important;
  border-color: #dc2626 !important;
}
body.eg-body .eg-admin .btn.eg-btn-ghost.text-danger:hover,
body.eg-body .eg-admin a.btn.eg-btn-ghost.text-danger:hover {
  background: rgba(220, 38, 38, 0.1) !important;
  color: #b91c1c !important;
}

.eg-admin .btn .eg-ic,
.eg-admin a.btn .eg-ic {
  color: inherit !important;
}

/* Bootstrap modifier butonları */
.eg-admin .btn-outline-success { color: #16a34a !important; border-color: #16a34a !important; background: transparent !important; }
.eg-admin .btn-outline-success:hover { background: #16a34a !important; color: #fff !important; }
.eg-admin .btn-outline-warning { color: #ca8a04 !important; border-color: #ca8a04 !important; background: transparent !important; }
.eg-admin .btn-outline-warning:hover { background: #ca8a04 !important; color: #fff !important; }
.eg-admin .btn-outline-danger { color: #dc2626 !important; border-color: #dc2626 !important; background: transparent !important; }
.eg-admin .btn-outline-danger:hover { background: #dc2626 !important; color: #fff !important; }
.eg-admin .btn-outline-secondary { color: #64748b !important; border-color: #94a3b8 !important; background: transparent !important; }
.eg-admin .btn-outline-secondary:hover { background: #64748b !important; color: #fff !important; }
.eg-admin .btn-success { background: #16a34a !important; color: #fff !important; border: none !important; }
.eg-admin .btn-warning { background: #ca8a04 !important; color: #fff !important; border: none !important; }
.eg-admin .btn-danger { background: #dc2626 !important; color: #fff !important; border: none !important; }
.eg-admin .btn-sm { padding: 0.35rem 0.65rem; font-size: 0.875rem; }

/* Forms */
.eg-admin-content .form-control,
.eg-admin-content .form-select {
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.eg-admin-content .form-control:focus,
.eg-admin-content .form-select:focus {
  border-color: var(--eg-admin-accent);
  box-shadow: 0 0 0 3px rgba(30, 107, 255, 0.15);
}

/* Alerts */
.eg-admin-content .alert {
  border-radius: 12px;
  font-size: 0.9rem;
}

/* Mobile */
@media (max-width: 991.98px) {
  .eg-body .eg-admin {
    grid-template-columns: 1fr;
  }

  .eg-admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 1030;
  }

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

  .eg-admin-footer {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }
}
