/* * * Head Admin - Custom Styles * Location: Include as a custom CSS file in Bootstrap Studio *  * Custom styling for the head admin interface */

/* ===========================   Color Variables & Theme   =========================== */

:root {
  --admin-primary: #2c3e50;
  --admin-secondary: #34495e;
  --admin-accent: #3498db;
  --admin-success: #27ae60;
  --admin-danger: #e74c3c;
  --admin-warning: #f39c12;
  --admin-light: #ecf0f1;
  --admin-dark: #2c3e50;
  --admin-border: #bdc3c7;
  --admin-hover: #34495e;
  --admin-shadow: rgba(0, 0, 0, 0.1);
}

/* ===========================   Layout   =========================== */

.admin-container {
  display: flex;
  min-height: 100vh;
  background-color: #f8f9fa;
}

.admin-sidebar {
  width: 320px;
  background-color: var(--admin-primary);
  color: white;
  padding: 0;
  box-shadow: 2px 0 10px var(--admin-shadow);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.admin-sidebar-header {
  padding: 2rem 1.5rem;
  background-color: var(--admin-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar-header h4 {
  margin: 0;
  font-weight: 600;
  font-size: 1.25rem;
}

.admin-sidebar-header small {
  opacity: 0.8;
  font-size: 0.85rem;
}

.admin-main {
  flex: 1;
  margin-left: 320px;
  padding: 2rem;
  max-width: 1400px;
}

/* ===========================   Projects List Sidebar   =========================== */

.projects-section {
  padding: 1.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-header h5 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

#btn-create-project {
  background-color: var(--admin-accent);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

#btn-create-project:hover {
  background-color: #2980b9;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#projects-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.project-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
  border-color: rgba(255, 255, 255, 0.2);
}

.project-item.active {
  background-color: var(--admin-accent);
  border-color: var(--admin-accent);
}

.project-item-content {
  flex: 1;
  min-width: 0;
}

.project-name {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-slug, .project-domain {
  font-size: 0.75rem;
  opacity: 0.7;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: 0.75rem;
}

.project-actions .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-radius: 4px;
  opacity: 0;
  transition: all 0.2s ease;
}

.project-item:hover .project-actions .btn {
  opacity: 1;
}

/* ===========================   Main Content Views   =========================== */

.content-view {
  background-color: white;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 2px 8px var(--admin-shadow);
}

.view-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--admin-light);
}

.view-header h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--admin-dark);
  margin: 0 0 0.5rem 0;
}

.view-header p {
  color: #6c757d;
  margin: 0;
  font-size: 1rem;
}

/* ===========================   Forms   =========================== */

.form-section {
  margin-bottom: 2rem;
}

.form-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--admin-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--admin-light);
}

.form-label {
  font-weight: 500;
  color: var(--admin-dark);
  margin-bottom: 0.5rem;
}

.form-control, .form-select {
  border: 1px solid #ced4da;
  border-radius: 6px;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-text {
  font-size: 0.875rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

.required-field::after {
  content: " *";
  color: var(--admin-danger);
}

/* ===========================   Buttons   =========================== */

.btn-group-form {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--admin-light);
}

.btn-primary-admin {
  background-color: var(--admin-accent);
  border-color: var(--admin-accent);
  color: white;
  padding: 0.625rem 1.5rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-primary-admin:hover {
  background-color: #2980b9;
  border-color: #2980b9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-secondary-admin {
  background-color: #6c757d;
  border-color: #6c757d;
  color: white;
  padding: 0.625rem 1.5rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-secondary-admin:hover {
  background-color: #5a6268;
  border-color: #545b62;
}

.btn-danger-admin {
  background-color: var(--admin-danger);
  border-color: var(--admin-danger);
  color: white;
  padding: 0.625rem 1.5rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-danger-admin:hover {
  background-color: #c0392b;
  border-color: #c0392b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* ===========================   Loading Overlay   =========================== */

#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-spinner {
  text-align: center;
  color: white;
}

.loading-spinner .spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3rem;
}

.loading-spinner p {
  margin-top: 1rem;
  font-size: 1rem;
}

/* ===========================   Toast Container   =========================== */

#toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9998;
  min-width: 300px;
}

.toast {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

/* ===========================   Modal Customization   =========================== */

.modal-content {
  border-radius: 12px;
  border: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.modal-header {
  background-color: var(--admin-light);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border-bottom: 1px solid #dee2e6;
}

.modal-title {
  font-weight: 600;
  color: var(--admin-dark);
}

.modal-footer {
  border-top: 1px solid #dee2e6;
}

/* ===========================   Empty State   =========================== */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
}

.empty-state i {
  font-size: 3rem;
  opacity: 0.5;
  margin-bottom: 1rem;
}

.empty-state h5 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.empty-state p {
  margin: 0;
}

/* ===========================   Alert Boxes   =========================== */

.alert {
  border-radius: 8px;
  border: none;
  padding: 1rem 1.25rem;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
}

/* ===========================   Responsive Design   =========================== */

@media (max-width: 992px) {
  .admin-sidebar {
    width: 280px;
  }
}

@media (max-width: 992px) {
  .admin-main {
    margin-left: 280px;
  }
}

@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
}

@media (max-width: 768px) {
  .admin-sidebar.show {
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  .admin-main {
    margin-left: 0;
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .content-view {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .btn-group-form {
    flex-direction: column;
  }
}

/* ===========================   Utility Classes   =========================== */

.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.badge-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
}

.badge-active {
  background-color: var(--admin-success);
  color: white;
}

.badge-inactive {
  background-color: #6c757d;
  color: white;
}

/* ===========================   Animations   =========================== */

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

.fade-in {
  animation: fadeIn 0.3s ease;
}

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

.slide-in-left {
  animation: slideInLeft 0.3s ease;
}

