:root {
  --primary: #0f766e;
  --primary-light: #14b8a6;
  --primary-dark: #042f2e;
  --accent: #f59e0b;
  --bg-main: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --sidebar-w: 270px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 14px rgba(15, 118, 110, 0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
}

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

body {
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
}

/* Sidebar */
.admin-sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #042f2e 0%, #0f4c47 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 4px 0 15px rgba(0,0,0,0.15);
  overflow-y: auto;
}

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

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #14b8a6, #f59e0b);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.brand-text h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.brand-text span {
  font-size: 11px;
  color: #99f6e4;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
}

.nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #99f6e4;
  margin: 16px 10px 8px;
  font-weight: 700;
  opacity: 0.7;
}

.nav-link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: #ccfbf1;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}

.nav-link-item i {
  font-size: 18px;
  width: 22px;
  text-align: center;
}

.nav-link-item:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  transform: translateX(3px);
}

.nav-link-item.active {
  background: linear-gradient(90deg, #14b8a6, #0d9488);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.25);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 12px;
  color: #99f6e4;
}

/* Main Content */
.admin-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.admin-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 99;
  box-shadow: var(--shadow-sm);
}

.topbar-left h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.topbar-left p {
  font-size: 13px;
  color: var(--text-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.api-badge {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.api-badge .dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
}

.admin-body {
  padding: 28px;
  flex: 1;
}

/* Cards & Stats */
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.stat-info span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-info h3 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 4px;
}

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

.stat-icon.primary { background: #ccfbf1; color: #0f766e; }
.stat-icon.warning { background: #fef3c7; color: #b45309; }
.stat-icon.info { background: #e0f2fe; color: #0369a1; }
.stat-icon.success { background: #dcfce7; color: #15803d; }

/* Panels & Tables */
.content-panel {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
}

.panel-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.panel-title {
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-body {
  padding: 24px;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
}

.custom-table th {
  background: var(--surface-alt);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.custom-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

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

/* Badges */
.badge-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
}

.badge-approved, .badge-verified, .badge-active { background: #dcfce7; color: #166534; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-rejected, .badge-blocked { background: #fee2e2; color: #991b1b; }
.badge-sell { background: #e0e7ff; color: #3730a3; }
.badge-buy { background: #fce7f3; color: #9d174d; }
.badge-surplus { background: #ffedd5; color: #9a3412; }

/* Buttons */
.btn-primary-custom {
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary-custom:hover {
  background: linear-gradient(135deg, #115e59, #0f766e);
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}

.btn-sm-custom {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 6px;
}
