/* ========================================
   👥 Admin Management Styles
   ======================================== */

/* ========== COMMON ADMIN STYLES ========== */
.admin-container {
  max-width: 98%;
  padding: 0 20px;
  margin: 0 auto;
}

/* ========== HERO SECTION ========== */
.admin-hero,
.admin-list-hero,
.admin-logs-hero,
.admin-form-hero {
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 80px 20px;
  border-radius: 24px;
  margin-bottom: 40px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

.admin-form-hero {
  padding: 60px 20px;
}

.hero-gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content-wrapper {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
}

.hero-icon-container {
  margin-bottom: 30px;
}

.admin-form-hero .hero-icon-container {
  margin-bottom: 20px;
}

.icon-circle {
  width: 100px;
  height: 100px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  animation: float 3s ease-in-out infinite;
}

.admin-form-hero .icon-circle {
  width: 80px;
  height: 80px;
}

.icon-circle i {
  font-size: 3rem;
}

.admin-form-hero .icon-circle i {
  font-size: 2.5rem;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-main-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 15px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.admin-form-hero .hero-main-title {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.hero-description {
  font-size: 1.2rem;
  opacity: 0.95;
}

.admin-form-hero .hero-description {
  font-size: 1.1rem;
}

.floating-element {
  position: absolute;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float-random 15s ease-in-out infinite;
}

.element-1 { top: 10%; left: 5%; animation-delay: 0s; }
.element-2 { top: 60%; right: 10%; animation-delay: -5s; }
.element-3 { bottom: 20%; left: 15%; animation-delay: -10s; }

@keyframes float-random {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* ========== ACTIONS BAR ========== */
.actions-bar-modern {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 20px 30px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.date-filter-modern {
  display: flex;
  align-items: center;
  gap: 12px;
}

.date-filter-modern label {
  font-weight: 600;
  color: #495057;
}

.date-input-modern {
  padding: 10px 16px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.date-input-modern:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.add-admin-btn {
  padding: 12px 30px;
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.add-admin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
  color: white;
}

/* ========== SEARCH AND EXPORT BAR ========== */
.search-export-bar-modern {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 20px 30px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.search-form-logs {
  flex: 1;
  min-width: 300px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.search-input-logs {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.search-input-logs:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.search-btn-logs {
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-btn-logs:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.export-btn-logs {
  padding: 12px 28px;
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.export-btn-logs:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
  color: white;
}

/* ========== TABLE STYLES ========== */
.table-modern-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  margin-bottom: 30px;
}

.table-card-header {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 20px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 700;
}

.header-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}

.table-container-modern {
  overflow-x: auto;
  padding: 20px;
}

.admins-table-modern,
.logs-table-modern {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  font-size: 0.95rem;
}

.logs-table-modern {
  font-size: 0.9rem;
}

.admins-table-modern thead th,
.logs-table-modern thead th {
  background: #f8f9fa;
  color: #495057;
  font-weight: 600;
  padding: 15px 12px;
  text-align: center;
  white-space: nowrap;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.logs-table-modern thead th {
  font-size: 0.85rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.admins-table-modern tbody tr,
.logs-table-modern tbody tr {
  background: #f8f9ff;
  transition: all 0.3s ease;
}

.admins-table-modern tbody tr:hover,
.logs-table-modern tbody tr:hover {
  background: linear-gradient(90deg, #e8ecff, #f0f4ff);
  transform: scale(1.01);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.admins-table-modern tbody td,
.logs-table-modern tbody td {
  padding: 15px 12px;
  text-align: center;
  vertical-align: middle;
}

/* ========== BADGES ========== */
.id-badge,
.log-id-badge {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
}

.username-cell,
.admin-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  color: #2c3e50;
}

.username-cell i,
.admin-cell i {
  color: #667eea;
  font-size: 1.1rem;
}

.role-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.role-superadmin {
  background: linear-gradient(135deg, #ffc107, #ff9800);
  color: white;
}

.role-admin {
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
  color: white;
}

.role-operation {
  background: linear-gradient(135deg, #6c757d, #5a6268);
  color: white;
}

.stat-badge {
  padding: 6px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-block;
}

.stat-approve {
  background: linear-gradient(135deg, #d1e7dd, #a3cfbb);
  color: #0f5132;
}

.stat-reject {
  background: linear-gradient(135deg, #f8d7da, #f1aeb5);
  color: #842029;
}

.stat-total {
  background: linear-gradient(135deg, #cfe2ff, #9ec5fe);
  color: #084298;
}

.action-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.action-insert {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
}

.action-update {
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
  color: white;
}

.action-delete {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
}

.table-badge {
  background: linear-gradient(135deg, #e8ecff, #f0f4ff);
  color: #667eea;
  padding: 6px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-block;
}

.target-id {
  background: linear-gradient(135deg, #ffc107, #ff9800);
  color: white;
  padding: 6px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-block;
}

/* ========== ACTION BUTTONS ========== */
.action-buttons-cell {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.btn-action-cell {
  padding: 8px 14px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.btn-edit {
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
  color: white;
  text-decoration: none;
}

.btn-delete {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
}

.btn-action-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ========== TEXT CELLS ========== */
.description-cell {
  text-align: left;
  padding: 10px;
  font-size: 0.85rem;
  color: #495057;
  line-height: 1.5;
  max-width: 400px;
}

.date-cell {
  font-size: 0.8rem;
  font-family: monospace;
  color: #6c757d;
  white-space: nowrap;
}

.text-truncate-cell {
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  display: inline-block;
  max-width: 200px;
}

.text-truncate-cell.truncated:hover {
  color: #667eea;
  text-decoration: underline;
}

.text-truncate-cell.expanded {
  color: #28a745;
  font-weight: 600;
  max-width: none;
}

/* ========== FORM STYLES ========== */
.form-card-modern {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  margin-bottom: 40px;
}

.admin-form-modern {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.form-section-modern {
  display: flex;
  gap: 20px;
  padding: 25px;
  background: #f8f9ff;
  border-radius: 16px;
  border-left: 4px solid #667eea;
  transition: all 0.3s ease;
}

.form-section-modern:hover {
  background: linear-gradient(90deg, #f0f4ff, #f8f9ff);
  transform: translateX(5px);
}

.section-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.section-content {
  flex: 1;
}

.form-label-modern {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 10px;
}

.form-input-modern,
.form-select-modern {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
  box-sizing: border-box;
}

.form-input-modern:focus,
.form-select-modern:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-hint {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 8px;
  font-style: italic;
}

.role-descriptions {
  margin-top: 15px;
  padding: 15px;
  background: white;
  border-radius: 10px;
  border: 2px solid #e9ecef;
}

.role-desc {
  padding: 8px 0;
  color: #495057;
  font-size: 0.9rem;
}

.role-desc strong {
  color: #667eea;
}

.form-actions-modern {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 2px solid #f0f0f0;
}

.btn-action-modern {
  padding: 14px 32px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-cancel {
  background: #6c757d;
  color: white;
}

.btn-save {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.btn-action-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ========== PAGINATION ========== */
.pagination-modern-logs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 20px 30px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 20px;
}

.pagination-info {
  font-size: 1rem;
  color: #495057;
  font-weight: 600;
}

.per-page-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.per-page-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.per-page-form label {
  font-weight: 600;
  color: #495057;
  font-size: 0.95rem;
}

.per-page-select {
  padding: 8px 16px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  background: white;
  color: #495057;
  transition: all 0.3s ease;
}

.per-page-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.pagination-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.pagination-list-logs {
  display: flex;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  align-items: center;
}

.pagination-list-logs li {
  display: inline-block;
}

.page-btn-logs {
  padding: 8px 14px;
  background: white;
  border: 2px solid #e9ecef;
  color: #495057;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.page-btn-logs:hover {
  border-color: #667eea;
  color: #667eea;
  transform: translateY(-2px);
}

.page-btn-logs.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: transparent;
}

.pagination-list-logs li.disabled .page-btn-logs {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.ellipsis span {
  padding: 8px 14px;
  color: #6c757d;
  font-weight: 600;
}

.page-info-text {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 600;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .hero-main-title {
    font-size: 2rem;
  }

  .admin-form-hero .hero-main-title {
    font-size: 1.8rem;
  }
  
  .actions-bar-modern,
  .search-export-bar-modern {
    flex-direction: column;
  }
  
  .search-form-logs {
    width: 100%;
    min-width: 100%;
  }
  
  .add-admin-btn,
  .export-btn-logs {
    width: 100%;
    justify-content: center;
  }
  
  .table-container-modern {
    overflow-x: auto;
  }
  
  .admins-table-modern,
  .logs-table-modern {
    font-size: 0.85rem;
  }
  
  .admins-table-modern thead th,
  .admins-table-modern tbody td,
  .logs-table-modern thead th,
  .logs-table-modern tbody td {
    padding: 10px 6px;
  }
  
  .description-cell,
  .text-truncate-cell {
    max-width: 200px;
  }
  
  .pagination-modern-logs {
    flex-direction: column;
  }
  
  .pagination-nav {
    width: 100%;
  }
  
  .pagination-list-logs {
    justify-content: center;
  }
  
  .per-page-control {
    width: 100%;
    justify-content: center;
  }
  
  .page-info-text {
    text-align: center;
  }

  .form-card-modern {
    padding: 25px;
  }
  
  .form-section-modern {
    flex-direction: column;
  }
  
  .form-actions-modern {
    flex-direction: column;
  }
  
  .btn-action-modern {
    width: 100%;
    justify-content: center;
  }
}
