:root {
  --sidebar-width: 250px;
}

body {
  background: #f4f6f9;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: #1a1d23;
  color: #c2c7d0;
  overflow-y: auto;
  z-index: 1000;
}

.sidebar-brand {
  padding: 20px;
  border-bottom: 1px solid #2d3239;
  text-align: center;
}

.sidebar-brand h5 {
  color: #fff;
  margin: 0;
  font-weight: 700;
  font-size: 18px;
}

.sidebar-brand small {
  color: #8b95a2;
  font-size: 11px;
}

.sidebar-nav {
  padding: 12px 0;
}

.nav-item {
  padding: 0 12px;
  margin-bottom: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: #c2c7d0;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.15s;
}

.nav-link:hover {
  background: #2d3239;
  color: #fff;
}

.nav-link.active {
  background: #0d6efd;
  color: #fff;
}

.nav-link i {
  font-size: 18px;
  width: 22px;
  text-align: center;
}

.nav-divider {
  border-top: 1px solid #2d3239;
  margin: 12px 20px;
}

/* Main content */
.main-content {
  margin-left: var(--sidebar-width);
  padding: 24px;
  min-height: 100vh;
}

/* Stat cards */
.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 0.15s;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #1a1d23;
}

.stat-card .stat-label {
  font-size: 13px;
  color: #8b95a2;
  margin-top: 4px;
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

/* Badges */
.badge-active { background: #28a745 !important; }
.badge-expired { background: #dc3545 !important; }
.badge-suspended { background: #ffc107 !important; color: #000 !important; }
.badge-revoked { background: #6c757d !important; }
.badge-trial { background: #0d6efd !important; }
.badge-basic { background: #20c997 !important; }
.badge-pro { background: #6610f2 !important; }
.badge-enterprise { background: #6f42c1 !important; }

/* License key */
.license-key {
  font-family: 'Courier New', monospace;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
}

/* Tables */
.table-container {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  overflow: hidden;
}

.table-container .table {
  margin-bottom: 0;
}

.table-container .table th {
  background: #f8f9fa;
  font-size: 12px;
  text-transform: uppercase;
  color: #8b95a2;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
}

.table-container .table td {
  font-size: 14px;
  vertical-align: middle;
}

/* Page header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-header h4 {
  margin: 0;
  font-weight: 700;
  color: #1a1d23;
}

/* Login page */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1d23 0%, #2d3239 100%);
}

.login-card {
  background: #fff;
  border-radius: 12px;
  padding: 40px;
  width: 400px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.login-card h3 {
  font-weight: 700;
  margin-bottom: 8px;
}

.login-card .text-muted {
  font-size: 14px;
}

/* Filters bar */
.filters-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filters-bar .form-control,
.filters-bar .form-select {
  max-width: 200px;
}

/* Usage bars */
.usage-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 4px;
}

/* Copy button */
.btn-copy {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.btn-copy:hover {
  opacity: 1;
}

/* Pagination */
.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
  font-size: 13px;
}

/* Chart cards */
.chart-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.chart-card .chart-title {
  font-weight: 700;
  font-size: 14px;
  color: #1a1d23;
  margin-bottom: 16px;
}

.chart-card canvas {
  max-height: 280px;
}

/* Tenant portal accent */
.sidebar .nav-link.active.tenant-active {
  background: #198754;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
}
