:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --light-bg: #f9fafb;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --hover-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

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

html,
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f7fa;
  height: 100%;
}

/* Login Body */
.login-body {
  background: var(--primary-gradient);
  min-height: 100vh;
}

.login-container {
  max-width: 450px;
  width: 100%;
}

.login-card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--hover-shadow);
  padding: 40px;
  animation: slideUp 0.5s ease-out;
}

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

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.brand-title {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.login-form .form-label {
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.login-form .form-control {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 16px;
  transition: all 0.3s ease;
}

.login-form .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-btn {
  background: var(--primary-gradient);
  border: none;
  font-weight: 600;
  border-radius: 8px;
  padding: 12px;
  transition: transform 0.2s ease;
}

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

.login-footer {
  text-align: center;
  margin-top: 20px;
}

.login-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.login-footer a:hover {
  text-decoration: underline;
}

/* Dashboard */
.dashboard-body {
  background-color: #f5f7fa;
}

.bg-gradient {
  background: var(--primary-gradient) !important;
}

.navbar-brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: #1f2937;
}

/* Cards */
.form-card {
  background: white;
  border: none;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.form-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hover-shadow);
}

.form-card .card-header {
  background: linear-gradient(to right, #f3f4f6, #ffffff);
  border-bottom: 2px solid #e5e7eb;
  padding: 20px;
}

.form-card .card-title {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.form-card .card-body {
  padding: 30px;
}

.table-card {
  background: white;
  border: none;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.table-card .card-body {
  padding: 0;
}

/* Tables */
.table {
  margin-bottom: 0;
}

.table-header {
  background-color: #f3f4f6;
  font-weight: 700;
  color: #374151;
}

.table thead th {
  border-bottom: 2px solid #e5e7eb;
  padding: 16px;
}

.table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}

.table tbody tr:hover {
  background-color: #f9fafb;
}

/* Form Elements */
.form-label {
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.form-control {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 14px;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-select {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 14px;
}

.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Section Styling */
.form-section {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e5e7eb;
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Buttons */
.btn {
  border-radius: 8px;
  font-weight: 600;
  padding: 10px 16px;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
  color: white;
}

.btn-success {
  background: var(--success-color);
}

.btn-success:hover {
  background: #059669;
}

.btn-secondary {
  background: #6b7280;
  color: white;
}

.btn-secondary:hover {
  background: #4b5563;
}

.btn-warning {
  background: var(--warning-color);
  color: white;
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 16px;
}

.btn-outline-secondary {
  border: 2px solid #d1d5db;
  color: #6b7280;
  background: white;
}

.btn-outline-secondary:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

/* Dashboard Cards */
.dashboard-body .row {
  margin-bottom: 0;
}

.dashboard-card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 40px 30px;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.dashboard-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--hover-shadow);
  border-color: var(--primary-color);
}

.dashboard-card .card-icon {
  font-size: 48px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-brand .card-icon {
  color: #667eea;
}

.card-inventory .card-icon {
  color: #10b981;
}

.dashboard-card .card-title {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 10px;
}

.dashboard-card .card-description {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 20px;
}

/* Add statistics card styles */
.stat-card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 24px;
  transition: all 0.3s ease;
  border-left: 5px solid;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.stat-card-today {
  border-left-color: #3b82f6;
}

.stat-card-week {
  border-left-color: #8b5cf6;
}

.stat-card-month {
  border-left-color: #ec4899;
}

.stat-card-year {
  border-left-color: #14b8a6;
}

.stat-header {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}

.stat-icon {
  font-size: 28px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #f3f4f6;
}

.stat-card-today .stat-icon {
  background: #dbeafe;
  color: #3b82f6;
}

.stat-card-week .stat-icon {
  background: #ede9fe;
  color: #8b5cf6;
}

.stat-card-month .stat-icon {
  background: #fbcfe8;
  color: #ec4899;
}

.stat-card-year .stat-icon {
  background: #ccfbf1;
  color: #14b8a6;
}

.stat-label {
  font-size: 13px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 12px;
}

.stat-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.stat-brand,
.stat-inventory {
  color: #6b7280;
  font-weight: 500;
}

.stat-brand::before {
  content: "▪ ";
  color: #667eea;
  font-weight: bold;
  margin-right: 4px;
}

.stat-inventory::before {
  content: "▪ ";
  color: #10b981;
  font-weight: bold;
  margin-right: 4px;
}

/* Input Group */
.input-group {
  gap: 8px;
}

.input-group .form-control {
  flex: 1;
}

/* Alerts */
.alert {
  border: none;
  border-radius: 8px;
  animation: slideDown 0.3s ease-out;
}

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

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
}

.alert-danger {
  background-color: #fee2e2;
  color: #7f1d1d;
}

/* Button Group */
.button-group {
  display: flex;
  gap: 12px;
  margin-top: 30px;
  justify-content: flex-start;
}

.button-group .btn {
  flex: 1;
}

/* Modal */
.modal-content {
  border: none;
  border-radius: 12px;
  box-shadow: var(--hover-shadow);
}

.modal-header {
  background: var(--light-bg);
  border-bottom: 2px solid #e5e7eb;
  padding: 20px;
}

.modal-title {
  font-weight: 700;
  color: #1f2937;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  background: var(--light-bg);
  border-top: 2px solid #e5e7eb;
  padding: 16px;
}

/* Min Height */
.min-vh-100 {
  min-height: 100vh;
}

/* Responsive */
@media (max-width: 768px) {
  .page-title {
    font-size: 24px;
  }

  .form-card .card-body {
    padding: 20px;
  }

  .button-group {
    flex-direction: column;
  }

  .button-group .btn {
    width: 100%;
  }

  .table {
    font-size: 12px;
  }

  .table thead th,
  .table tbody td {
    padding: 10px 8px;
  }
}
