html {
  font-size: 14px;
  min-height: 100%;
}
@media (min-width: 768px) {
  html { font-size: 16px; }
}
body {
  margin: 0;
  padding: 0;
  background-color: #fff;
  color: #333;
}
.dx-theme-dark body,
body.dx-theme-dark {
  background-color: #363640;
  color: #ccc;
}

#toolbar {
  border-bottom: 1px solid #ddd;
}
.dx-theme-dark #toolbar {
  border-bottom-color: #444;
}
.toolbar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.toolbar-brand .bi-gem { color: #3498db; }
@media (max-width: 575.98px) {
  .brand-text { display: none; }
}
.toolbar-user {
  padding: 0 8px;
  font-size: 0.85rem;
  opacity: 0.8;
}
@media (max-width: 767.98px) {
  .toolbar-user { display: none; }
}

.panel-list {
  height: 100%;
  background-color: #fff;
  border-right: 1px solid #ddd;
}
.dx-theme-dark .panel-list {
  background-color: #363640;
  border-right-color: #444;
}

.nav-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  font-size: 0.9rem;
}
.nav-item-row i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}
.nav-active {
  font-weight: 600;
  color: #3498db;
}

.main-content {
  padding: 20px;
  min-width: 0;
  width: 100%;
}
@media (max-width: 991.98px) {
  .main-content { padding: 12px; }
}
@media (max-width: 575.98px) {
  .main-content { padding: 8px; }
}

.page-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.content-box {
  padding: 16px;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  background: #fff;
  margin-bottom: 16px;
}
.dx-theme-dark .content-box {
  border-color: #444;
  background: #363640;
}
.content-box-header {
  font-weight: 600;
  font-size: 0.95rem;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dx-theme-dark .content-box-header {
  border-bottom-color: #444;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
@media (min-width: 992px) {
  .stat-cards { grid-template-columns: repeat(4, 1fr); }
}
.stat-card {
  padding: 12px 16px;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  border-left: 4px solid #3498db;
  background: #fff;
}
.dx-theme-dark .stat-card {
  border-color: #444;
  border-left-color: #3498db;
  background: #363640;
}
.stat-card.warning { border-left-color: #f39c12; }
.stat-card.success { border-left-color: #27ae60; }
.stat-card.danger  { border-left-color: #e74c3c; }
.stat-card-label {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 4px;
}
.stat-card-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.grid-row {
  display: grid;
  gap: 16px;
}
.grid-row.cols-2 {
  grid-template-columns: 1fr;
}
@media (min-width: 992px) {
  .grid-row.cols-2 { grid-template-columns: 1fr 1fr; }
}

.form-container {
  max-width: 600px;
  width: 100%;
}

.page-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.page-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (min-width: 768px) {
  .filter-row { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1200px) {
  .filter-row { grid-template-columns: repeat(6, 1fr); }
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}
.badge-success { background-color: #27ae60; }
.badge-danger  { background-color: #e74c3c; }
.badge-warning { background-color: #f39c12; color: #333; }
.badge-secondary { background-color: #95a5a6; }
.badge-primary { background-color: #3498db; }

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2c3e50, #3498db);
}
.auth-card {
  max-width: 420px;
  width: 100%;
  padding: 40px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.dx-theme-dark .auth-card {
  background: #363640;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.auth-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.dx-alert {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.dx-alert-danger {
  background: #fce4e4;
  color: #c0392b;
  border: 1px solid #f5c6cb;
}
.dx-alert-success {
  background: #d5f5e3;
  color: #1e8449;
  border: 1px solid #a9dfbf;
}
.dx-theme-dark .dx-alert-danger {
  background: #4a1a1a;
  color: #ff6b6b;
  border-color: #6b2c2c;
}
.dx-theme-dark .dx-alert-success {
  background: #1a3a1a;
  color: #6bff6b;
  border-color: #2c6b2c;
}

.text-center { text-align: center; }
.text-end { text-align: right; }
.text-muted { opacity: 0.6; }
.fw-bold { font-weight: 700; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.w-100 { width: 100%; }
