/* Sneat-inspired Admin Panel Styles */

:root {
  --primary-color: #002C5B;
  --primary-dark: #002C5B;
  --secondary-color: #8592a3;
  --success-color: #71dd37;
  --danger-color: #ff3e1d;
  --warning-color: #ffab00;
  --info-color: #03c3ec;
  --light-color: #fcfdfd;
  --dark-color: #233446;
  --body-bg: #f5f5f9;
  --card-bg: #ffffff;
  --border-color: #d9dee3;
  --text-muted: #a1acb8;
  --sidebar-width: 260px;
  --navbar-height: 70px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--body-bg);
  color: var(--dark-color);
  line-height: 1.6;
}

/* Layout */
.layout-wrapper {
  display: flex;
  min-height: 100vh;
}

.layout-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-left: var(--sidebar-width);
  transition: margin-left 0.3s ease;
}

.layout-page {
  flex: 1;
  padding: 1.5rem;
}

/* Sidebar */
.layout-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  z-index: 1000;
  transition: transform 0.3s ease;
  overflow-y: auto;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.app-brand {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.app-brand-text {
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
}

.app-brand-link:hover .app-brand-text {
  transform: scale(1.05);
}

.menu-inner {
  padding: 1rem 0;
}

.menu-item {
  margin: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  overflow: hidden;
}

.menu-link {
  display: flex;
  align-items: center;
  padding: 0.875rem 1rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0.5rem;
  position: relative;
  font-weight: 500;
  overflow: hidden;
}

.menu-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.menu-link:hover::before {
  left: 100%;
}

.menu-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transform: translateX(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.menu-link.active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateX(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-left: 3px solid rgba(255, 255, 255, 0.8);
}

.menu-link.active::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: white;
  border-radius: 2px 0 0 2px;
}

.menu-icon {
  margin-right: 0.75rem;
  font-size: 1.25rem;
  transition: all 0.3s ease;
  min-width: 20px;
}

.menu-link:hover .menu-icon {
  transform: scale(1.1);
}

.menu-link.active .menu-icon {
  transform: scale(1.1);
  color: white;
}

/* Navbar */
.layout-navbar {
  background: var(--card-bg);
  height: var(--navbar-height);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  box-shadow: 0 2px 6px rgba(47, 43, 61, 0.14), 0 0 transparent, 0 0 transparent;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: var(--secondary-color);
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-color);
  background-color: rgba(105, 108, 255, 0.1);
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: 0.5rem;
  box-shadow: 0 2px 6px rgba(47, 43, 61, 0.14), 0 0 transparent, 0 0 transparent;
  border: none;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(47, 43, 61, 0.2);
}

.card-header {
  padding: 1.5rem 1.5rem 0;
  border-bottom: none;
  background: transparent;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.card-body {
  padding: 1.5rem;
}

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

.form-control {
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
  background-color: var(--card-bg);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.25);
  outline: none;
}

.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9375rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(105, 108, 255, 0.4);
}

.btn-outline-secondary {
  border: 1px solid var(--border-color);
  color: var(--secondary-color);
  background: transparent;
}

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

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

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

/* Login Page Specific */
.authentication-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.authentication-inner {
  width: 100%;
  max-width: 600px;
  padding: 2rem;
}

.auth-card {
  background: var(--card-bg);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.app-brand-logo {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  margin-right: 0.75rem;
}

/* Utilities */
.text-muted {
  color: var(--text-muted) !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.mb-4 {
  margin-bottom: 1.5rem !important;
}

.mt-3 {
  margin-top: 1rem !important;
}

.d-flex {
  display: flex !important;
}

.align-items-center {
  align-items: center !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.w-100 {
  width: 100% !important;
}

.text-center {
  text-align: center !important;
}

/* Responsive */
@media (max-width: 768px) {
  .layout-menu {
    transform: translateX(-100%);
  }
  
  .layout-container {
    margin-left: 0;
  }
  
  .layout-menu.show {
    transform: translateX(0);
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Form Alert Styles */
#alert-container {
  margin-bottom: 1rem;
}

#alert-container .alert {
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border-left: 4px solid;
  margin-bottom: 0;
}

#alert-container .alert.alert-success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  border-left-color: var(--success-color);
}

#alert-container .alert.alert-danger {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
  border-left-color: var(--danger-color);
}

#alert-container .alert.alert-warning {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  color: #856404;
  border-left-color: var(--warning-color);
}

#alert-container .alert.alert-info {
  background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
  color: #0c5460;
  border-left-color: var(--info-color);
}

#alert-container .alert .btn-close {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

#alert-container .alert .btn-close:hover {
  opacity: 1;
}

#alert-container .alert i {
  font-size: 1.1rem;
  vertical-align: middle;
}

/* Alert fade animation */
#alert-container .alert {
  animation: fadeIn 0.3s ease-out;
}

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

/* Global Loader Styles */
.global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.global-loader.show {
  opacity: 1;
  visibility: visible;
}

.loader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.loader-logo {
  width: 80px;
  height: 80px;
  animation: spin 2s linear infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 93, 230, 0.3));
}

.loader-text {
  color: var(--primary-color);
  font-weight: 500;
  font-size: 1.1rem;
  margin: 0;
  animation: pulse 2s ease-in-out infinite;
}

/* Removed the extra spinner below the logo */

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .global-loader {
    background: rgba(0, 0, 0, 0.8);
  }
  
  .loader-text {
    color: #ffffff;
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .loader-logo {
    width: 60px;
    height: 60px;
  }
  
  .loader-text {
    font-size: 1rem;
  }
  
  .loader-spinner {
    width: 30px;
    height: 30px;
  }
}

/* Custom SweetAlert Styles */
.swal2-custom-popup {
  border-radius: 0.75rem !important;
  box-shadow: 0 8px 32px rgba(0, 44, 91, 0.2) !important;
  border: 1px solid var(--border-color) !important;
  background: var(--card-bg) !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  max-width: 400px !important;
}

.swal2-custom-title {
  color: var(--primary-color) !important;
  font-weight: 600 !important;
  font-size: 1.25rem !important;
  margin-bottom: 0.75rem !important;
}

.swal2-custom-content {
  color: var(--dark-color) !important;
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
  font-weight: 400 !important;
}

.swal2-custom-confirm-btn {
  background: var(--primary-color) !important;
  border: none !important;
  border-radius: 0.5rem !important;
  padding: 0.75rem 1.5rem !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 2px 8px rgba(0, 44, 91, 0.3) !important;
  color: white !important;
}

.swal2-custom-confirm-btn:hover {
  background: #001f3f !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 44, 91, 0.4) !important;
}

.swal2-custom-cancel-btn {
  background: #f8f9fa !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 0.5rem !important;
  padding: 0.75rem 1.5rem !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  transition: all 0.3s ease !important;
  color: var(--dark-color) !important;
}

.swal2-custom-cancel-btn:hover {
  background: #e9ecef !important;
  transform: translateY(-1px) !important;
  border-color: var(--primary-color) !important;
}

/* SweetAlert icon customization */
.swal2-icon.swal2-warning {
  border-color: var(--warning-color) !important;
  color: var(--warning-color) !important;
}

.swal2-icon.swal2-error {
  border-color: var(--danger-color) !important;
  color: var(--danger-color) !important;
}

.swal2-icon.swal2-success {
  border-color: var(--success-color) !important;
  color: var(--success-color) !important;
}

.swal2-icon.swal2-info {
  border-color: var(--info-color) !important;
  color: var(--info-color) !important;
}

/* SweetAlert backdrop - no blur */
.swal2-backdrop-show {
  background: rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: none !important;
}

/* SweetAlert animation */
.swal2-show {
  animation: swal2-show 0.3s ease-out !important;
}

@keyframes swal2-show {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

