/* ===================================
   Admin Panel - Main Stylesheet
   Theme: Blue & Orange
   =================================== */

:root {
  --primary-blue: #1e3a8a;
  --secondary-blue: #3b82f6;
  --light-blue: #dbeafe;
  --accent-blue: #0ea5e9;
  --primary-orange: #f97316;
  --secondary-orange: #fb923c;
  --light-orange: #fed7aa;
  --accent-orange: #ea580c;
  --dark: #1e293b;
  --gray: #64748b;
  --light-gray: #f1f5f9;
  --white: #ffffff;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --sidebar-width: 260px;
  --header-height: 70px;
  --transition: all 0.3s ease;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
}

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

body {
  font-family: 'Poppins', 'Segoe UI', Tahoma, sans-serif;
  background: #f5f7fb;
  color: var(--dark);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===== Smooth Scroll ===== */
html {
  scroll-behavior: smooth;
}

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

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.fade-in { animation: fadeIn 0.6s ease forwards; }
.slide-in-left { animation: slideInLeft 0.6s ease forwards; }
.slide-in-right { animation: slideInRight 0.6s ease forwards; }

/* ===== Auth Pages (Login/Register) ===== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 50%, var(--primary-orange) 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.auth-wrapper::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  top: -200px;
  right: -200px;
  animation: pulse 4s infinite;
}

.auth-wrapper::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  bottom: -150px;
  left: -150px;
  animation: pulse 5s infinite;
}

.auth-card {
  background: white;
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 450px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
  animation: fadeIn 0.8s ease;
}

.auth-logo {
  text-align: center;
  margin-bottom: 30px;
}

.auth-logo i {
  font-size: 50px;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-logo h2 {
  margin-top: 10px;
  color: var(--primary-blue);
  font-weight: 700;
}

.auth-card h3 {
  text-align: center;
  margin-bottom: 8px;
  color: var(--dark);
  font-weight: 600;
}

.auth-card p.subtitle {
  text-align: center;
  color: var(--gray);
  margin-bottom: 30px;
}

.form-control:focus {
  border-color: var(--secondary-blue);
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
}

.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
  border: none;
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  width: 100%;
  transition: var(--transition);
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: white;
}

.btn-orange-custom {
  background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange));
  border: none;
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-orange-custom:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: white;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
}

.auth-links a {
  color: var(--secondary-blue);
  text-decoration: none;
  font-size: 14px;
}

.auth-links a:hover {
  color: var(--primary-orange);
}

.divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
  color: var(--gray);
  font-size: 14px;
}

.divider::before, .divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #e5e7eb;
}

.divider::before { left: 0; }
.divider::after { right: 0; }

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

/* ===== Sidebar ===== */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--primary-blue) 0%, #1e40af 100%);
  color: white;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  overflow-y: auto;
  transition: var(--transition);
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.sidebar::-webkit-scrollbar {
  width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  height: var(--header-height);
}

.sidebar-header .logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
}

.sidebar-header h4 {
  margin: 0;
  font-weight: 700;
  font-size: 18px;
}

.sidebar-menu {
  list-style: none;
  padding: 20px 0;
}

.sidebar-menu li {
  margin: 2px 10px;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  border-radius: 10px;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.sidebar-menu a:hover {
  background: rgba(255,255,255,0.1);
  color: white;
  transform: translateX(5px);
}

.sidebar-menu a.active {
  background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange));
  color: white;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.sidebar-menu a i {
  width: 20px;
  font-size: 16px;
}

.sidebar-menu .has-submenu > a::after {
  content: '\f107';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-left: auto;
  transition: var(--transition);
}

.sidebar-menu .has-submenu.open > a::after {
  transform: rotate(180deg);
}

.submenu {
  list-style: none;
  padding-left: 35px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.has-submenu.open .submenu {
  max-height: 300px;
}

.submenu li {
  margin: 5px 0;
}

.submenu a {
  font-size: 13px;
  padding: 8px 12px;
}

/* ===== Main Content ===== */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: var(--transition);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Top Header ===== */
.top-header {
  background: white;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 999;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.hamburger-btn {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--primary-blue);
  cursor: pointer;
  display: none;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--dark);
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.notification-btn {
  position: relative;
  background: var(--light-gray);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--primary-blue);
  font-size: 18px;
}

.notification-btn:hover {
  background: var(--light-blue);
  transform: rotate(15deg);
}

.notification-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: var(--primary-orange);
  color: white;
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.user-menu {
  position: relative;
  cursor: pointer;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px;
  border-radius: 30px;
  transition: var(--transition);
}

.user-info:hover {
  background: var(--light-gray);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-orange));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

.user-name {
  font-weight: 600;
  color: var(--dark);
  font-size: 14px;
}

.user-dropdown {
  position: absolute;
  top: 60px;
  right: 0;
  background: white;
  min-width: 220px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 10px 0;
  display: none;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.user-dropdown.show { display: block; }

.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--dark);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.user-dropdown a:hover {
  background: var(--light-gray);
  color: var(--primary-blue);
}

.user-dropdown hr {
  margin: 5px 0;
  border-color: #e5e7eb;
}

/* ===== Content Area ===== */
.content-area {
  padding: 25px;
  flex: 1;
}

.page-header {
  margin-bottom: 25px;
  animation: fadeIn 0.5s ease;
}

.page-header h2 {
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 5px;
}

.page-header .breadcrumb {
  background: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
}

.page-header .breadcrumb a {
  color: var(--secondary-blue);
  text-decoration: none;
}

/* ===== Stats Cards ===== */
.stat-card {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: none;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  animation: fadeIn 0.5s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-blue);
}

.stat-card.orange::before { background: var(--primary-orange); }
.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }

.stat-card .stat-icon {
  width: 55px;
  height: 55px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: var(--light-blue);
  color: var(--primary-blue);
  margin-bottom: 15px;
}

.stat-card.orange .stat-icon {
  background: var(--light-orange);
  color: var(--primary-orange);
}

.stat-card.success .stat-icon {
  background: #d1fae5;
  color: var(--success);
}

.stat-card.warning .stat-icon {
  background: #fef3c7;
  color: var(--warning);
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
}

.stat-card .stat-label {
  color: var(--gray);
  font-size: 14px;
  margin: 5px 0;
}

.stat-card .stat-change {
  font-size: 12px;
  font-weight: 600;
}

.stat-card .stat-change.up { color: var(--success); }
.stat-card .stat-change.down { color: var(--danger); }

/* ===== Cards/Panels ===== */
.dash-card {
  background: white;
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
  border: none;
  margin-bottom: 25px;
  animation: fadeIn 0.6s ease;
  overflow: hidden;
}

.dash-card .card-header {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dash-card .card-header h5 {
  margin: 0;
  font-weight: 600;
  color: var(--dark);
}

.dash-card .card-body {
  padding: 22px;
}

/* ===== Parallax Section ===== */
.parallax-section {
  height: 350px;
  background-image: linear-gradient(rgba(30,58,138,0.85), rgba(249,115,22,0.7)), 
                    url('https://images.unsplash.com/photo-1497366216548-37526070297c?ixlib=rb-4.0.3&auto=format&fit=crop&w=1950&q=80');
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  border-radius: 15px;
  margin-bottom: 25px;
  position: relative;
}

.parallax-section h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 10px;
}

.parallax-section p {
  font-size: 18px;
  opacity: 0.95;
}

/* ===== Tables ===== */
.table-modern {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-modern thead th {
  background: var(--light-blue);
  color: var(--primary-blue);
  font-weight: 600;
  padding: 12px 15px;
  border: none;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table-modern tbody td {
  padding: 14px 15px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}

.table-modern tbody tr {
  transition: var(--transition);
}

.table-modern tbody tr:hover {
  background: var(--light-gray);
}

.badge-status {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-active { background: #d1fae5; color: var(--success); }
.badge-pending { background: #fef3c7; color: var(--warning); }
.badge-inactive { background: #fee2e2; color: var(--danger); }
.badge-completed { background: var(--light-blue); color: var(--primary-blue); }

.action-btn {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  margin: 0 2px;
}

.action-btn:hover { transform: scale(1.1); }
.action-btn.edit { background: var(--light-blue); color: var(--primary-blue); }
.action-btn.delete { background: #fee2e2; color: var(--danger); }
.action-btn.view { background: var(--light-orange); color: var(--primary-orange); }

/* ===== Forms ===== */
.form-label {
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 6px;
  font-size: 14px;
}

.form-control, .form-select {
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 10px 14px;
  transition: var(--transition);
  font-size: 14px;
}

.form-control:focus, .form-select:focus {
  border-color: var(--secondary-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ===== Footer ===== */
.app-footer {
  background: white;
  padding: 18px 25px;
  text-align: center;
  color: var(--gray);
  font-size: 14px;
  border-top: 1px solid #e5e7eb;
}

.app-footer a {
  color: var(--primary-blue);
  text-decoration: none;
}

/* ===== Sidebar Overlay ===== */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  display: none;
}

.sidebar-overlay.show { display: block; }

/* ===== Mouse Tracker / Cursor Effect ===== */
.cursor-follower {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249,115,22,0.4), transparent);
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s ease;
  display: none;
}

@media (min-width: 992px) {
  .cursor-follower { display: block; }
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .hamburger-btn {
    display: block;
  }
  .user-name {
    display: none;
  }
  .parallax-section {
    background-attachment: scroll;
    height: 250px;
  }
  .parallax-section h2 {
    font-size: 26px;
  }
}

@media (max-width: 576px) {
  .content-area {
    padding: 15px;
  }
  .page-title {
    font-size: 16px;
  }
  .auth-card {
    padding: 25px;
  }
  .stat-card .stat-value {
    font-size: 22px;
  }
}

/* ===== DataTables Custom Styling ===== */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 6px 12px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--primary-blue) !important;
  color: white !important;
  border-color: var(--primary-blue) !important;
  border-radius: 6px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--primary-orange) !important;
  color: white !important;
  border-color: var(--primary-orange) !important;
}
