/* Base Styles */
:root {
  --primary: #4361ee;
  --primary-dark: #3a56d4;
  --secondary: #3f37c9;
  --accent: #4895ef;
  --danger: #f72585;
  --success: #4cc9f0;
  --warning: #f8961e;
  --info: #577590;
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
  --light-gray: #e9ecef;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: #f5f7fa;
  color: var(--dark);
  line-height: 1.6;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.col-md-4 {
  flex: 0 0 33.333%;
  max-width: 33.333%;
  padding: 0 15px;
  margin-bottom: 30px;
}

/* Cards */
.card {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
  padding: 15px 20px;
  background-color: var(--primary);
  color: white;
  font-weight: 500;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 15px 20px;
  background-color: var(--light);
  border-top: 1px solid #eee;
  font-size: 14px;
}

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

/* Login Page */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 20px;
}

.login-box {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 40px;
  width: 100%;
  max-width: 450px;
  text-align: center;
}

.logo-container {
  margin-bottom: 30px;
}

.logo {
  max-width: 150px;
  height: auto;
}

.login-form .form-group {
  margin-bottom: 20px;
  text-align: left;
}

.login-form input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: all 0.3s;
}

.login-form input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 25px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 14px;
}

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

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

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

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

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 250px;
  background-color: white;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding-top: 20px;
}

.sidebar-header {
  padding: 0 20px 20px;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
}

.sidebar-logo {
  max-width: 180px;
  height: auto;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: 5px;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--dark);
  text-decoration: none;
  transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: rgba(67, 97, 238, 0.2);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

.sidebar-menu a i {
  margin-right: 10px;
  font-size: 18px;
}

.menu-section {
  padding: 10px 20px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray);
  font-weight: 600;
  margin-top: 20px;
}

.main-content {
  margin-left: 250px;
  padding: 20px;
  min-height: 100vh;
  background-color: #f5f7fa;

}

.top-bar {
  display: flex;
  justify-content: flex-end;
  padding: 10px 0;
  margin-bottom: 20px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar i {
  font-size: 20px;
  color: var(--gray);
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.table th,
.table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.table th {
  background-color: var(--light);
  font-weight: 500;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: #f9f9f9;
}

/* Thumbnails */
.thumbnail-preview {
  width: 80px;
  height: auto;
  border-radius: 4px;
}

.no-thumbnail {
  width: 80px;
  height: 45px;
  background-color: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--gray);
  border-radius: 4px;
}

/* Progress Bar */
.progress-container {
  margin-top: 20px;
}

.progress-bar {
  height: 10px;
  background-color: var(--light-gray);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 5px;
}

.progress {
  height: 100%;
  background-color: var(--primary);
  width: 0%;
  transition: width 0.3s;
}

.progress-text {
  font-size: 14px;
  color: var(--gray);
}

/* Alerts */
.alert {
  padding: 12px 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  border-left: 4px solid transparent;
}

.alert-success {
  background-color: rgba(76, 201, 240, 0.2);
  border-left-color: var(--success);
  color: var(--success);
}

.alert-danger {
  background-color: rgba(247, 37, 133, 0.2);
  border-left-color: var(--danger);
  color: var(--danger);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: white;
  border-radius: 10px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: auto;
  transform: translateY(-50px);
  transition: transform 0.3s;
}

.modal.show .modal-content {
  transform: translateY(0);
}

.modal-header {
  padding: 15px 20px;
  background-color: var(--primary);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-weight: 500;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 15px 20px;
  background-color: var(--light);
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
}

.close {
  background: none;
  border: none;
  font-size: 24px;
  color: white;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.close:hover {
  opacity: 1;
}

/* Responsive */
@media (max-width: 992px) {
  .col-md-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 768px) {
  .col-md-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .sidebar {
    width: 70px;
    overflow: hidden;
  }
  
  .sidebar-header, .sidebar-menu span {
    display: none;
  }
  
  .sidebar-menu a {
    justify-content: center;
    padding: 12px 0;
  }
  
  .sidebar-menu a i {
    margin-right: 0;
    font-size: 20px;
  }
  
  .main-content {
    margin-left: 70px;
  }
  
  .menu-section {
    display: none;
  }
}

@media (max-width: 576px) {
  .login-box {
    padding: 30px 20px;
  }
  
  .modal-content {
    width: 95%;
  }
}