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

:root {
  /* Light Theme New Classic Color Palette */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-header: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #ecfdf5;
  --primary-border: #a7f3d0;
  
  --secondary: #0f766e;
  --secondary-light: #f0fdfa;
  
  --accent: #d97706;
  --accent-light: #fffbeb;
  
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --danger-light: #fef2f2;
  --danger-border: #fecaca;
  
  --info: #0284c7;
  --info-light: #f0f9ff;
  
  --border: #e2e8f0;
  --border-subtle: #f1f5f9;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
}

/* App Wrapper */
.admin-wrapper {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

/* Sidebar - Light Classic Design */
.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.sidebar-header {
  padding: 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.brand-logo-img {
  max-height: 48px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.sidebar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--primary-border);
  width: fit-content;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sidebar-nav {
  padding: 1.25rem 1rem;
  flex-grow: 1;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-light);
  margin: 1.4rem 0.75rem 0.6rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
  transition: all 0.2s ease;
  position: relative;
}

.nav-item:hover {
  background: var(--border-subtle);
  color: var(--primary);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  border: 1px solid var(--primary-border);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 4px;
  background-color: var(--primary);
  border-radius: 0 4px 4px 0;
}

.nav-icon {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
}

.badge-count {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  box-shadow: 0 2px 5px rgba(220, 38, 38, 0.3);
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: white;
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
}

.user-details h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.user-details p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Main Content Area */
.main-content {
  margin-left: 280px;
  flex-grow: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Navbar */
.top-navbar {
  height: 72px;
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border);
  padding: 0 2.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar-brand-mobile {
  display: none;
  height: 36px;
}

.toggle-sidebar-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Buttons - Classic Elegant Style */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #047857 100%);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-secondary {
  background-color: white;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-danger {
  background-color: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.btn-danger:hover {
  background-color: var(--danger);
  color: white;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Page Layout */
.page-container {
  padding: 2.25rem;
  flex-grow: 1;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.page-title h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.page-title p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* Metrics & Stats Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-info h4 {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.8px;
}

.stat-info .stat-value {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 0.2rem;
  letter-spacing: -0.5px;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Classic Tables */
.card-table {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.table-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.custom-table th {
  padding: 0.9rem 1rem;
  color: var(--text-muted);
  font-weight: 700;
  background-color: var(--border-subtle);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.8px;
}

.custom-table th:first-child {
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
}

.custom-table th:last-child {
  border-top-right-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}

.custom-table td {
  padding: 1.1rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.custom-table tr:hover td {
  background-color: #fafafa;
}

.custom-table tr:last-child td {
  border-bottom: none;
}

/* Classic Form Cards */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  max-width: 800px;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.35rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

textarea.form-control {
  resize: vertical;
}

/* Responsive Rules */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
  }

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

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

  .navbar-brand-mobile {
    display: block;
  }
}
