/* ===== Reset & Global Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f7fa;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

.text-center {
  text-align: center;
}

/* ===== Login Page ===== */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
}

.login-box h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #667eea;
}

.login-info {
  text-align: center;
  margin-top: 15px;
  font-size: 12px;
  color: #666;
  background: #f0f0f0;
  padding: 10px;
  border-radius: 5px;
}

/* ===== Admin Layout ===== */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background-color: #f4f7fa;
}

/* ===== Sidebar ===== */
.sidebar {
  width: 260px;
  background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
  color: white;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  overflow-y: auto;
  transition: transform 0.3s ease;
  z-index: 1000;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
  padding: 25px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.sidebar-menu {
  padding: 20px 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 25px;
  color: #ecf0f1;
  text-decoration: none;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-left-color: #3498db;
}

.menu-item.active {
  background: rgba(52, 152, 219, 0.2);
  border-left-color: #3498db;
  color: white;
}

.menu-item i {
  font-size: 18px;
  width: 20px;
}

.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 15px 25px;
}

.logout-menu {
  color: #e74c3c;
}

.logout-menu:hover {
  background: rgba(231, 76, 60, 0.1);
  border-left-color: #e74c3c;
}

.sidebar-footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.admin-info i {
  font-size: 16px;
}

/* ===== Main Content ===== */
.main-content {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
  background-color: #f4f7fa;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: white;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #2c3e50;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.admin-name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2c3e50;
  font-weight: 500;
}

.content-wrapper {
  flex: 1;
  padding: 30px;
}

/* ===== Page Header ===== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.page-header h1 {
  color: #2c3e50;
  font-size: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.page-header h1 i {
  color: #3498db;
}

/* ===== Dashboard Cards ===== */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.3s;
  border-left: 4px solid;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card-blue {
  border-left-color: #3498db;
}
.card-green {
  border-left-color: #2ecc71;
}
.card-purple {
  border-left-color: #9b59b6;
}
.card-orange {
  border-left-color: #e67e22;
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.card-blue .stat-icon {
  background: rgba(52, 152, 219, 0.1);
  color: #3498db;
}

.card-green .stat-icon {
  background: rgba(46, 204, 113, 0.1);
  color: #2ecc71;
}

.card-purple .stat-icon {
  background: rgba(155, 89, 182, 0.1);
  color: #9b59b6;
}

.card-orange .stat-icon {
  background: rgba(230, 126, 34, 0.1);
  color: #e67e22;
}

.stat-details {
  flex: 1;
}

.stat-details h3 {
  color: #7f8c8d;
  font-size: 14px;
  margin-bottom: 5px;
  font-weight: 500;
}

.stat-number {
  font-size: 32px;
  font-weight: bold;
  color: #2c3e50;
  margin: 0;
}

/* ===== Welcome Section ===== */
.welcome-section {
  margin-bottom: 30px;
}

.welcome-section .card {
  background: white;
  padding: 0;
}

/* ===== Card ===== */
.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-bottom: 20px;
}

.card-header {
  padding: 20px 25px;
  background: #f8f9fa;
  border-bottom: 1px solid #ecf0f1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.card-header h3 {
  color: #2c3e50;
  font-size: 18px;
  margin: 0;
}

.card-body {
  padding: 30px;
}

.card-body h2 {
  color: #2c3e50;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-body p {
  color: #7f8c8d;
  margin-bottom: 20px;
}

.quick-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

/* ===== Search Box ===== */
.search-box {
  flex: 1;
  max-width: 500px;
}

.search-input-group {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.search-input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn-search {
  padding: 10px 20px;
  white-space: nowrap;
}

/* ===== Table ===== */
.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.data-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.data-table th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.data-table td {
  padding: 15px;
  text-align: left;
  font-size: 14px;
  color: #2c3e50;
}

.data-table tbody tr {
  border-bottom: 1px solid #ecf0f1;
  transition: background 0.2s;
}

.data-table tbody tr:hover {
  background-color: #f8f9fa;
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.action-buttons {
  display: flex;
  gap: 8px;
}

/* ===== Form ===== */
.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #2c3e50;
  font-weight: 500;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-actions {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background-color: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
  transform: translateY(-2px);
}

.btn-warning {
  background-color: #f39c12;
  color: white;
}

.btn-warning:hover {
  background-color: #e67e22;
  transform: translateY(-2px);
}

.btn-danger {
  background-color: #e74c3c;
  color: white;
}

.btn-danger:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-search {
  background: #3498db;
  color: white;
}

.btn-search:hover {
  background: #2980b9;
}

/* ===== Info Box ===== */
.info-box {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
  color: #856404;
  padding: 15px 20px;
  border-radius: 6px;
  margin-top: 25px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.info-box i {
  font-size: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}

.info-box p {
  margin: 0;
}

.info-box strong {
  display: block;
  margin-bottom: 5px;
}

/* ===== Alert Messages ===== */
.alert {
  padding: 15px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.alert i {
  font-size: 18px;
  flex-shrink: 0;
}

.alert-success {
  background-color: #d4edda;
  border-left: 4px solid #28a745;
  color: #155724;
}

.alert-danger {
  background-color: #f8d7da;
  border-left: 4px solid #dc3545;
  color: #721c24;
}

.alert-warning {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
  color: #856404;
}

.alert-info {
  background-color: #d1ecf1;
  border-left: 4px solid #17a2b8;
  color: #0c5460;
}

.required {
  color: #e74c3c;
  font-weight: bold;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .menu-toggle {
    display: block;
  }

  .stat-card {
    flex-direction: column;
    text-align: center;
  }

  .stat-icon {
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .content-wrapper {
    padding: 20px 15px;
  }

  .page-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .page-header h1 {
    font-size: 22px;
  }

  .dashboard-cards {
    grid-template-columns: 1fr;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-box {
    width: 100%;
    max-width: 100%;
  }

  .search-input-group {
    width: 100%;
  }

  .search-input {
    width: 100%;
  }

  .data-table {
    font-size: 12px;
  }

  .data-table th,
  .data-table td {
    padding: 10px 8px;
  }

  .action-buttons {
    flex-wrap: wrap;
  }

  .topbar-right .admin-name {
    display: none;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .quick-actions {
    flex-direction: column;
  }

  .quick-actions .btn {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .topbar {
    padding: 12px 15px;
  }

  .sidebar-footer {
    padding: 15px;
  }

  .card-body {
    padding: 20px;
  }
}
