:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
  --light-color: #f8f9fa;
  --dark-color: #1f2937;
  --sidebar-width: 260px;
  --topbar-height: 60px;
}

body {
  margin: 0;
  background-color: #f4f6f9;
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  line-height: 1.6;
}

.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background-color: var(--dark-color);
  color: white;
  z-index: 1000;
  overflow-y: auto;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.sidebar .sidebar-header {
  padding: 1.25rem 1.5rem;
  font-size: 1.3rem;
  font-weight: bold;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.1);
}

.sidebar a,
.sidebar .active {
  color: #cbd5e1;
  text-decoration: none;
  display: block;
  padding: 0.75rem 1.25rem;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.sidebar a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border-left-color: var(--primary-color);
}

.sidebar .active {
  background-color: var(--primary-color);
  color: white;
  border-left-color: white;
}

.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: white;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 1.5rem;
  z-index: 1050;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.content-wrapper {
  margin-left: var(--sidebar-width);
  margin-top: var(--topbar-height);
  padding: 2rem;
  min-height: calc(100vh - var(--topbar-height));
  box-sizing: border-box;
}

.auth-content-wrapper {
  padding: 5rem 2rem 2rem;
  min-height: 100vh;
  box-sizing: border-box;
}

.auth-language-switcher {
  position: fixed;
  top: 1rem;
  right: 1.5rem;
  z-index: 1050;
}

.content-inner {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

.card {
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

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

.card-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  font-weight: 600;
}

.btn {
  border-radius: 0.375rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
  border: none;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

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

.btn-success {
  background: linear-gradient(135deg, var(--success-color) 0%, #146c43 100%);
}

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

.btn-warning {
  background: linear-gradient(135deg, var(--warning-color) 0%, #e0a800 100%);
  color: #000;
}

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

.table {
  border-radius: 0.5rem;
  overflow: hidden;
}

.table thead th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  color: var(--dark-color);
}

.table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.form-control,
.form-select {
  border-radius: 0.375rem;
  border: 1px solid #dee2e6;
  transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.modal-content {
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.stat-item h4 {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.stat-item small {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary-color);
}

@media (max-width: 992px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
  }

  .topbar {
    left: 0;
  }

  .content-wrapper {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .content-wrapper {
    padding: 1rem;
  }

  .stat-item h4 {
    font-size: 1.5rem;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in;
}

.sidebar-auth {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 0.5rem 0 1rem;
  background-color: var(--dark-color);
}

.sidebar-auth form {
  margin: 0;
}

.sidebar-auth .sidebar-auth-button {
  width: 100%;
  color: #cbd5e1 !important;
  background-color: transparent !important;
  border: 0 !important;
  border-left: 3px solid transparent !important;
  border-radius: 0 !important;
  display: block;
  text-align: left;
  padding: 0.75rem 1.25rem;
  transition: all 0.3s ease;
  box-shadow: none !important;
}

.sidebar-auth .sidebar-auth-button:hover {
  background-color: rgba(255,255,255,0.1) !important;
  color: white !important;
  border-left-color: var(--primary-color) !important;
}

.profile-button {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.25rem;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.border-gradient {
  border: 2px solid transparent;
  background:
    linear-gradient(white, white) padding-box,
    linear-gradient(135deg, var(--primary-color), #0056b3) border-box;
}
