@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Bengali:wght@300;400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

@font-face {
  font-family: 'NotoSansBengali-Regular';
  src: local('NotoSansBengali-Regular'), local('Noto Sans Bengali Regular'), local('Noto Sans Bengali');
  font-weight: 400;
  font-style: normal;
}

:root {
  --admin-primary: #097237;
  --admin-primary-dark: #054e24;
  --admin-primary-light: #e8f5ec;
  --admin-accent: #0284c7;
  --admin-danger: #dc2626;
  --admin-warning: #f59e0b;
  --admin-bg: #f1f5f9;
  --admin-card-bg: #ffffff;
  --admin-text: #0f172a;
  --admin-muted: #64748b;
  --admin-border: #e2e8f0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans Bengali', 'NotoSansBengali-Regular', 'Inter', -apple-system, sans-serif;
  background-color: var(--admin-bg);
  color: var(--admin-text);
  font-size: 14px;
}

/* Admin Dashboard Container */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: 260px;
  background: #06401d;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #043116;
}

.sidebar-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #fff;
  background: #fff;
}

.sidebar-title h2 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.sidebar-title span {
  font-size: 11.5px;
  color: #86efac;
}

.sidebar-nav {
  list-style: none;
  padding: 12px 0;
  flex: 1;
  overflow-y: auto;
}

.nav-section-title {
  padding: 10px 20px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #86efac;
  font-weight: 600;
}

.sidebar-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-item a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sidebar-item.active a {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-left-color: #4ade80;
  font-weight: 600;
}

.sidebar-item i {
  width: 18px;
  font-size: 15px;
  text-align: center;
}

/* Main Content Area */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Top Navbar */
.admin-navbar {
  height: 60px;
  background: #ffffff;
  border-bottom: 1px solid var(--admin-border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.nav-left h1 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-view-site {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-view-site:hover {
  background: #0284c7;
  color: #fff;
}

.btn-logout {
  background: #fee2e2;
  color: #b91c1c;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-logout:hover {
  background: #dc2626;
  color: #fff;
}

/* Page Content */
.admin-content {
  padding: 24px;
  flex: 1;
}

.admin-tab {
  display: none;
  animation: fadeIn 0.2s ease-in;
}

.admin-tab.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Statistics Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #ffffff;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid var(--admin-border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-info h3 {
  font-size: 13px;
  color: var(--admin-muted);
  font-weight: 500;
}

.stat-info .stat-number {
  font-size: 26px;
  font-weight: 700;
  color: var(--admin-text);
  margin-top: 4px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-icon.green { background: #dcfce7; color: #15803d; }
.stat-icon.blue { background: #e0f2fe; color: #0284c7; }
.stat-icon.amber { background: #fef3c7; color: #d97706; }
.stat-icon.purple { background: #f3e8ff; color: #7e22ce; }

/* Admin Content Box */
.content-box {
  background: #ffffff;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  margin-bottom: 24px;
}

.content-box-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.content-box-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.content-box-body {
  padding: 20px;
}

/* Buttons */
.btn-primary {
  background: var(--admin-primary);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary:hover {
  background: var(--admin-primary-dark);
}

.btn-sm {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-edit { background: #e0f2fe; color: #0369a1; }
.btn-edit:hover { background: #0284c7; color: #fff; }
.btn-delete { background: #fee2e2; color: #b91c1c; }
.btn-delete:hover { background: #dc2626; color: #fff; }

/* Tables */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.admin-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--admin-border);
}

.admin-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--admin-border);
  color: #1e293b;
}

.admin-table tbody tr:hover {
  background: #f8fafc;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  color: #1e293b;
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(9, 114, 55, 0.15);
}

textarea.form-control {
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.form-help {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

/* Image preview box */
.preview-box {
  width: 90px;
  height: 90px;
  border: 1px dashed #94a3b8;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  margin-top: 6px;
}

.preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 12px 18px;
  border-radius: 6px;
  background: #0f172a;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease-out;
}

.toast.success { background: #065f2a; border-left: 4px solid #4ade80; }
.toast.error { background: #991b1b; border-left: 4px solid #f87171; }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Modal Dialog Styling */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.modal-content {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  margin: auto;
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  padding: 16px 20px;
  background: var(--admin-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  font-size: 24px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: #dc2626;
  color: #ffffff;
}

.modal-body {
  padding: 22px;
  overflow-y: auto;
  max-height: calc(90vh - 65px);
}

/* Responsive */
@media (max-width: 860px) {
  .admin-sidebar {
    width: 70px;
  }
  .sidebar-title, .sidebar-item span, .nav-section-title {
    display: none;
  }
  .sidebar-item a {
    justify-content: center;
    padding: 12px 0;
  }
}
