/* Modern Dashboard Design System */
:root {
  --primary: #224966;
  --primary-dark: #19364c;
  --primary-light: #3783bd;
  --secondary: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #596751;
  --light: #f8fafc;
  --dark: #0f172a;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar { color: white !important; }
.btn-primary { color: white !important; }
.btn-success { color: white !important; }
.bg-gradient { color: rgb(104, 139, 182) !important; }
.stats-card:hover { color: white !important; }
.service-item:hover { color: white !important; }
.readmore:hover { color: white !important; }
.footer { color: white !important; }
.status-badge.active { color: white !important; }
.status-badge.inactive { color: white !important; }
.status-badge.pending { color: white !important; }

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui !important;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
  color: var(--gray-900);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Animated Background */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
  z-index: -1;
  animation: backgroundFloat 20s ease-in-out infinite;
}

@keyframes backgroundFloat {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-20px) rotate(1deg);
  }
  66% {
    transform: translateY(10px) rotate(-1deg);
  }
}

/* Header Redesign */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: var(--transition);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
}

.topbar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 0.5rem 0;
  position: relative;
  overflow: hidden;
}

.topbar::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.topbar .contact-info a,
.topbar .contact-info span {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: var(--transition);
}

.topbar .contact-info a:hover {
  color: white;
  transform: translateY(-1px);
}

.branding {
  padding: 1rem 0;
  background: white;
}

.sitename {
  background: linear-gradient(135deg, var(--primary), var(--info));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: -0.025em;
  position: relative;
}

.sitename::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(135deg, var(--primary), var(--info));
  border-radius: var(--radius);
  transition: var(--transition);
}

.logo:hover .sitename::after {
  width: 100%;
}

/* Modern Navigation */
.navbar-nav {
  gap: 0.5rem;
}

.navbar-nav .nav-link {
  color: var(--gray-700) !important;
  font-weight: 500;
  /*padding: 0!important;*/
  border-radius: var(--radius-lg);
  position: relative;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
}

.navbar-nav .nav-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  transition: var(--transition);
  z-index: -1;
}

.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
  left: 0;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: white !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.navbar-nav .nav-link i {
  font-size: 1rem;
  transition: var(--transition);
}

.navbar-nav .nav-link:hover i {
  transform: scale(1.1);
}

/* Dropdown Enhancement */
.dropdown-menu {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 0.75rem;
  margin-top: 0.5rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  animation: dropdownSlide 0.3s ease-out;
}

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

.dropdown-item {
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dropdown-item:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: white;
  transform: translateX(4px);
}

/* Main Content */
.main {
  margin-top: 170px;
  min-height: calc(100vh - 340px);
  position: relative;
}

/* Dashboard Cards */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.stats-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.stats-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--primary), var(--info));
  transform: scaleX(0);
  transition: var(--transition);
}

.stats-card:hover::before {
  transform: scaleX(1);
}

.stats-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.stats-card .icon {
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.stats-card .icon::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  animation: iconShine 3s infinite;
}

@keyframes iconShine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  50% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
  100% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
}

.stats-card .number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stats-card .label {
  color: var(--gray-600);
  font-weight: 500;
  font-size: 1rem;
}

/* Service Items */
.service-item {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
}

.service-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--primary), var(--info));
  transform: scaleX(0);
  transition: var(--transition);
}

.service-item:hover::before {
  transform: scaleX(1);
}

.service-item:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.service-item .icon {
  width: 4rem;
  height: 4rem;
  background: linear-gradient(135deg, var(--primary), var(--info));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  color: white;
  font-size: 1.5rem;
  position: relative;
  overflow: hidden;
}

.service-item .icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: var(--transition);
}

.service-item:hover .icon::after {
  width: 100%;
  height: 100%;
}

.service-item h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.service-item p {
  color: var(--gray-600);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.readmore {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  position: relative;
}

.readmore::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.readmore:hover::after {
  width: 100%;
}

.readmore:hover {
  color: var(--primary-dark);
  gap: 0.75rem;
}

.readmore i {
  transition: var(--transition);
}

.readmore:hover i {
  transform: translateX(4px);
}

/* Buttons */
.btn {
  border-radius: var(--radius-lg);
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border: none;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: var(--transition);
}

.btn:hover::before {
  width: 300%;
  height: 300%;
}

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

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

.btn-success {
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

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

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

.btn-info {
  background: linear-gradient(135deg, #515a67, #0c54b6);
  color: white;
}

.btn-info:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  color: white;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

/* Forms */
.form-control,
.form-select {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  /*padding: 1rem 1.25rem;*/
  background: rgb(211 210 210 / 68%);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  outline: none;
  background: white;
}

.form-label {
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Alerts */
.alert {
  border: none;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  border-left: 4px solid;
  position: relative;
  overflow: hidden;
}

.alert::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-100%);
  animation: alertShine 2s infinite;
}

@keyframes alertShine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.alert-success {
  background: linear-gradient(135deg, #f0fdf4, #3d7d53);
  color: #166534;
  border-left-color: var(--success);
}

.alert-danger {
    background: linear-gradient(135deg, #ffebeb, #f79f9f);
    color: #991b1b;
    border-left-color: var(--danger);
}

.alert-info {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  color: #0c4a6e;
  border-left-color: var(--info);
}

/* Tables */
.table-container {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
}

.table {
  margin: 0;
}

.table thead th {
  background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
  border: none;
  font-weight: 700;
  color: var(--gray-900);
  padding: 1.5rem 1.25rem;
  position: relative;
}

.table thead th::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(135deg, var(--primary), var(--info));
}

.table tbody td {
  padding: 0.3rem;
  border-color: var(--gray-200);
  vertical-align: middle;
  transition: var(--transition);
}

.table tbody tr:hover {
  background: linear-gradient(135deg, var(--gray-50), rgba(99, 102, 241, 0.05));
  transform: scale(1.01);
}

/* Status Badges */
.status-badge {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}

.status-badge::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: badgeShine 2s infinite;
}

@keyframes badgeShine {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.status-badge.active {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #166534;
}

.status-badge.inactive {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
}

.status-badge.pending {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
}

/* Quick Actions */
.quick-actions {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.quick-actions::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--primary), var(--info));
}

.quick-actions h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quick-actions .btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #224966, #9aabb7);
  color: white;
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
  animation: footerFloat 15s ease-in-out infinite;
}

@keyframes footerFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.footer-top {
  padding: 4rem 0;
  position: relative;
  z-index: 1;
}

.footer h4 {
  color: white;
  font-weight: 700;
  margin-bottom: 2rem;
  position: relative;
}

.footer h4::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(135deg, var(--primary), var(--info));
  border-radius: var(--radius);
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links a:hover {
  color: white;
  transform: translateX(8px);
}

.copyright {
  background: rgba(0, 0, 0, 0.3);
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

/* Animations */
.fade-in {
  animation: fadeInUp 0.8s ease-out forwards;
}

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

.slide-in-left {
  animation: slideInLeft 0.8s ease-out forwards;
}

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

.slide-in-right {
  animation: slideInRight 0.8s ease-out forwards;
}

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

.scale-in {
  animation: scaleIn 0.6s ease-out forwards;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .stats-card,
  .service-item {
    padding: 1.5rem;
  }

  .quick-actions {
    padding: 2rem;
  }

  .quick-actions .btn-group {
    justify-content: center;
  }

  .navbar-nav .nav-link {
    padding: 0.5rem 1rem !important;
  }

  .main {
    margin-top: 120px;
  }
}

/* Loading States */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Utility Classes */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--info));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient {
  background: linear-gradient(135deg, var(--primary), var(--info));
}

.glass {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.floating {
  animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Scroll Animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease-out;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
