:root {
  --bg-default: #f4feff;
  --bg-paper: #ffffff;
  --bg-input: #def7f8;
  --primary: #00a9b4;
  --primary-dark: #007299;
  --primary-light: #56e0e0;
  --secondary: #c4c4c4;
  --text-primary: #000000;
  --text-secondary: #c4c4c4;
  --text-teal: #00a9b4;
  --text-accent1: #45bdbf;
  --text-accent2: #005c7b;
  --error: #f44336;
  --success: #4caf50;
  --gradient-button: linear-gradient(90deg, #56e0e0 0%, #007299 100%);
  --gradient-text: linear-gradient(90deg, #45bdbf, #005c7b);
  --decorative-faint: rgba(86, 224, 224, 0.12);
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 70px;
  --topbar-height: 60px;
  --footer-height: 48px;
}

body {
  background-color: var(--bg-default);
  font-family: "Poppins", "Roboto", sans-serif;
}

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

.admin-sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #005c7b 0%, #007299 100%);
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
  transition: width 0.3s ease;
  display: flex;
  flex-direction: column;
}

.admin-sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-header {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.sidebar-brand:hover {
  color: #fff;
}

.sidebar-brand svg {
  flex-shrink: 0;
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 700;
  white-space: nowrap;
}

.admin-sidebar.collapsed .brand-text {
  display: none;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: #fff;
  padding: 4px;
  cursor: pointer;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-list .nav-item {
  margin: 2px 0;
}

.nav-list .nav-section {
  padding: 12px 16px 4px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
}

.nav-list .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.2s;
  border-radius: 0;
}

.nav-list .nav-link:hover,
.nav-list .nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-list .nav-link i {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.admin-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

.admin-sidebar.collapsed + .admin-main {
  margin-left: var(--sidebar-collapsed-width);
}

/* Top Bar */
.admin-topbar {
  height: var(--topbar-height);
  background: var(--bg-paper);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 900;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

/* Footer */
.admin-footer {
  height: var(--footer-height);
  background: var(--bg-paper);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.admin-footer .container-fluid {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

/* Cards */
.kpi-card {
  background: var(--bg-paper);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 169, 180, 0.1);
}

.kpi-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.kpi-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.chart-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 16px 20px;
}

/* Buttons */
.btn-primary {
  background: var(--gradient-button);
  border: none;
  border-radius: 12px;
  font-weight: 600;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
  border-radius: 12px;
}

.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
}

/* Badges */
.tier-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tier-premium {
  background: var(--gradient-button);
  color: #fff;
}

.tier-free {
  background: #e9ecef;
  color: #6c757d;
}

/* Tables */
.table th {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

/* Breadcrumb */
.breadcrumb-item a {
  color: var(--primary);
  text-decoration: none;
}

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

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

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

  .admin-sidebar.collapsed + .admin-main {
    margin-left: 0;
  }
}
