@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

:root {
  --primary-color: #4361ee;
  --primary-gradient: linear-gradient(135deg, #4361ee, #3a0ca3);
  --secondary-color: #3f37c9;
  --success-color: #4caf50;
  --success-gradient: linear-gradient(135deg, #4caf50, #2e7d32);
  --danger-color: #f44336;
  --danger-gradient: linear-gradient(135deg, #f44336, #c62828);
  --warning-color: #ff9800;
  --dark-color: #333;
  --light-color: #f4f6f9;
  --grey-color: #ced4da;
  --sidebar-width: 260px;
  --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: var(--light-color);
}

.sidebar {
  position: fixed;
  width: var(--sidebar-width);
  height: 100%;
  background: #073042;
  color: white;
  padding: 20px 0;
  transition: var(--transition);
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 3px 0 15px rgba(0, 0, 0, 0.15);
}

.sidebar-header {
  padding: 0 20px 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  margin-bottom: 15px;
}

.sidebar-header h3 {
  margin-bottom: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  font-size: 22px;
}

.sidebar-menu {
  padding: 10px 0;
}

.sidebar-menu ul {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: 5px;
}

.sidebar-menu a {
  padding: 12px 25px;
  display: flex;
  align-items: center;
  color: white;
  text-decoration: none;
  transition: var(--transition);
  font-size: 15px;
  border-radius: 0 30px 30px 0;
  margin-right: 15px;
}

.sidebar-menu a i {
  margin-right: 10px;
  font-size: 18px;
  width: 25px;
  text-align: center;
}

.sidebar-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
  color: #fff;
}

.sidebar-menu a.active {
  background: rgba(255, 255, 255, 0.2);
  border-left: 4px solid white;
  font-weight: 500;
}

.main-content {
  margin-left: var(--sidebar-width);
  padding: 25px;
  background-color: var(--light-color);
  min-height: 100vh;
  transition: var(--transition);
}

.header {
  background: white;
  padding: 20px 25px;
  color: var(--dark-color);
  margin-bottom: 25px;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h2 {
  font-weight: 600;
  font-size: 22px;
  display: flex;
  align-items: center;
}

.header h2 i {
  margin-right: 10px;
  font-size: 24px;
  color: var(--primary-color);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 25px;
  background: white;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
  margin-bottom: 25px;
}

.form-row {
  display: flex;
  gap: 15px;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--dark-color);
}

.int {
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid var(--grey-color);
  background: white;
  outline: none;
  transition: var(--transition);
  font-size: 14px;
}

.int:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.txtar {
  padding: 14px 18px;
  resize: none;
  height: 120px;
  border-radius: 8px;
  border: 1px solid var(--grey-color);
  background: white;
  outline: none;
  transition: var(--transition);
  font-size: 14px;
}

.txtar:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.btn {
  padding: 12px 25px;
  border: none;
  color: #fff;
  font-weight: 500;
  background: var(--primary-gradient);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

.btn i {
  margin-right: 8px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(67, 97, 238, 0.4);
}

.btn-success {
  background: var(--success-gradient);
  box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
}

.btn-success:hover {
  box-shadow: 0 6px 15px rgba(76, 175, 80, 0.4);
}

.btn-danger {
  background: var(--danger-gradient);
  box-shadow: 0 4px 10px rgba(244, 67, 54, 0.3);
}

.btn-danger:hover {
  box-shadow: 0 6px 15px rgba(244, 67, 54, 0.4);
}

.card {
  background: white;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
  padding: 25px;
  margin-bottom: 25px;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.table-container {
  overflow-x: auto;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
  background: white;
  margin-bottom: 25px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 10px;
  overflow: hidden;
}

table th {
  background: #073042;
  color: white;
  padding: 15px 20px;
  text-align: left;
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
}

table td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 14px;
  vertical-align: middle;
}

table tr:last-child td {
  border-bottom: none;
}

table tr:hover {
  background: rgba(67, 97, 238, 0.03);
}

table .action-cell {
  display: flex;
  gap: 10px;
}

input[type="file"] {
  padding: 12px;
  background: white;
  border: 1px solid var(--grey-color);
  border-radius: 8px;
  width: 100%;
}

input[type="file"]::file-selector-button {
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  background: var(--primary-gradient);
  color: white;
  cursor: pointer;
  margin-right: 15px;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 500;
}

input[type="file"]::file-selector-button:hover {
  box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-color);
}

.custom-alert {
  position: fixed;
  top: 25px;
  right: 25px;
  padding: 16px 20px;
  border-radius: 10px;
  background: white;
  color: var(--dark-color);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  z-index: 1001;
  transform: translateX(150%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  min-width: 300px;
  display: flex;
  align-items: center;
}

.custom-alert.show {
  transform: translateX(0);
}

.custom-alert.success {
  border-left: 4px solid var(--success-color);
}

.custom-alert.error {
  border-left: 4px solid var(--danger-color);
}

.custom-alert.warning {
  border-left: 4px solid var(--warning-color);
}

.custom-alert i {
  margin-right: 12px;
  font-size: 20px;
}

.custom-alert.success i {
  color: var(--success-color);
}

.custom-alert.error i {
  color: var(--danger-color);
}

.custom-alert.warning i {
  color: var(--warning-color);
}

.stat-card {
  background: white;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
}

.stat-info h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 5px;
}

.stat-info p {
  font-size: 14px;
  color: #777;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 25px;
}

@media (max-width: 992px) {
  .form-row {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 0px;
  }
  
  .sidebar {
    width: 0;
    box-shadow: none;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .sidebar.active {
    width: 260px;
    box-shadow: 3px 0 15px rgba(0, 0, 0, 0.15);
  }

  .toggle-sidebar {
    display: flex !important;
  }
}

.toggle-sidebar {
  cursor: pointer;
  font-size: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  margin-left: 15px;
}

/* Custom switch toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Badges */
.badge {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge-primary {
  background: rgba(67, 97, 238, 0.1);
  color: var(--primary-color);
}

.badge-success {
  background: rgba(76, 175, 80, 0.1);
  color: var(--success-color);
}

.badge-danger {
  background: rgba(244, 67, 54, 0.1);
  color: var(--danger-color);
}
  