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

:root {
  --primary-orange: #ff6b35;
  --secondary-orange: #f7931e;
  --deep-orange: #e85d04;
  --golden: #ffd60a;
  --cream: #fff8dc;
  --white: #ffffff;
  --text-dark: #2c3e50;
  --text-light: #34495e;
  --shadow-light: rgba(255, 107, 53, 0.1);
  --shadow-medium: rgba(255, 107, 53, 0.2);
  --shadow-heavy: rgba(255, 107, 53, 0.3);
  --gradient-bg: linear-gradient(
    135deg,
    #ffe5b4 0%,
    #ffcb69 25%,
    #ff8e53 75%,
    #ff6b35 100%
  );
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #fef9f3 100%);
  --gradient-header: linear-gradient(
    135deg,
    #ff6b35 0%,
    #f7931e 50%,
    #ffd60a 100%
  );
}

body {
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont,
    sans-serif;
  background: var(--gradient-bg);
  min-height: 100vh;
  padding: 0;
  animation: backgroundShift 10s ease-in-out infinite alternate;
}

@keyframes backgroundShift {
  0% {
    background: linear-gradient(
      135deg,
      #ffe5b4 0%,
      #ffcb69 25%,
      #ff8e53 75%,
      #ff6b35 100%
    );
  }

  100% {
    background: linear-gradient(
      135deg,
      #ffcb69 0%,
      #ff8e53 25%,
      #ff6b35 75%,
      #e85d04 100%
    );
  }
}

/* Header Section */
.header-section {
  background: var(--gradient-header);
  padding: 4rem 1rem;
  text-align: center;
  box-shadow: 0 8px 32px var(--shadow-medium);
  position: relative;
  overflow: hidden;
}

.header-section::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: shimmer 3s infinite;
}

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

  100% {
    left: 100%;
  }
}

.logo-container {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.logo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--white);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  animation: float 3s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.1) rotate(5deg);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

.header-title {
  color: var(--white);
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.header-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  font-weight: 300;
  margin-bottom: 1rem;
}

/* Stats Overview */
.stats-overview {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  color: var(--white);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  display: block;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-top: 0.25rem;
}

/* Main Container */
.main-container {
  max-width: 1400px;
  margin: -3rem auto 0;
  padding: 0 1rem 2rem;
  position: relative;
  z-index: 10;
}

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

/* Enhanced Cards */
.metric-card {
  background: var(--gradient-card);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 40px var(--shadow-light);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-orange),
    var(--secondary-orange),
    var(--golden)
  );
  border-radius: 20px 20px 0 0;
}

.metric-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 20px 60px var(--shadow-medium);
  border-color: var(--primary-orange);
}

.card-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.card-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(
    135deg,
    var(--primary-orange),
    var(--secondary-orange)
  );
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  box-shadow: 0 4px 15px var(--shadow-light);
}

.card-icon i {
  color: var(--white);
  font-size: 1.2rem;
}

.card-title {
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  background: linear-gradient(
    135deg,
    var(--deep-orange),
    var(--primary-orange)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-subtitle {
  color: var(--text-light);
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Status Badges */
.status-good {
  color: #27ae60;
}

.status-warning {
  color: #f39c12;
}

.status-danger {
  color: #e74c3c;
}

/* Transactions Section */
.transactions-section {
  background: var(--white);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 15px 50px var(--shadow-light);
  border: 1px solid rgba(255, 255, 255, 0.8);
  animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f8f9fa;
}

.section-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-orange), var(--golden));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  box-shadow: 0 6px 20px var(--shadow-light);
}

.section-icon i {
  color: var(--white);
  font-size: 1.5rem;
}

.section-title {
  color: var(--text-dark);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
}

/* Enhanced Table */
.table-container {
  overflow-x: auto;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.modern-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
}

.modern-table th {
  background: linear-gradient(
    135deg,
    var(--primary-orange),
    var(--secondary-orange)
  );
  color: var(--white);
  padding: 1.2rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modern-table td {
  padding: 1rem;
  border-bottom: 1px solid #f1f3f4;
  color: var(--text-dark);
  font-weight: 500;
}

.modern-table tbody tr {
  transition: all 0.3s ease;
}

.modern-table tbody tr:hover {
  background: linear-gradient(
    90deg,
    rgba(255, 107, 53, 0.05),
    rgba(247, 147, 30, 0.05)
  );
  transform: scale(1.01);
}

.modern-table tbody tr:last-child td {
  border-bottom: none;
}

/* Loading States */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 107, 53, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-orange);
  animation: spin 1s ease-in-out infinite;
}

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

/* Refresh Button */
.refresh-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: linear-gradient(
    135deg,
    var(--primary-orange),
    var(--secondary-orange)
  );
  border: none;
  border-radius: 50%;
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 6px 25px var(--shadow-medium);
  transition: all 0.3s ease;
  z-index: 1000;
}

.refresh-btn:hover {
  transform: scale(1.1) rotate(180deg);
  box-shadow: 0 8px 30px var(--shadow-heavy);
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-title {
    font-size: 2rem;
  }

  .stats-overview {
    gap: 1rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .metric-card {
    padding: 1.5rem;
  }

  .card-value {
    font-size: 1.8rem;
  }

  .transactions-section {
    padding: 1.5rem;
  }

  .refresh-btn {
    bottom: 1rem;
    right: 1rem;
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .header-section {
    padding: 3rem 1rem;
  }

  .logo {
    width: 150px;
    height: 150px;
  }

  .header-title {
    font-size: 1.6rem;
  }

  .main-container {
    margin-top: -2rem;
    padding: 0 0.5rem 1rem;
  }

  .metric-card {
    padding: 1.2rem;
  }

  .card-value {
    font-size: 1.6rem;
  }

  .modern-table th,
  .modern-table td {
    padding: 0.8rem 0.6rem;
    font-size: 0.85rem;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    135deg,
    var(--primary-orange),
    var(--secondary-orange)
  );
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    135deg,
    var(--deep-orange),
    var(--primary-orange)
  );
}

/* Fade in animation for all elements */
.fade-in {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
