* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background: #faf9f8;
  min-height: 100vh;
  color: #323130;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.g360-dash-header {
  background: #ffffff;
  border-bottom: 1px solid #edebe9;
  position: sticky;
  top: 0;
  z-index: 50;
}

.g360-dash-header-content {
  /* max-width: 1400px; */
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.g360-dash-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #323130;
}

.g360-dash-date {
  color: #605e5c;
  font-size: 0.8125rem;
  font-weight: 400;
}

.g360-dash-tabs {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 0.25rem;
  border-top: 1px solid #edebe9;
  background: #ffffff;
}

.g360-dash-tab {
  padding: 0.5rem 1rem;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-weight: 400;
  font-size: 0.875rem;
  color: #605e5c;
  background: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
  border-radius: 0;
}

.g360-dash-tab:hover {
  color: #323130;
  background: #f3f2f1;
}
.g360-dash-tab.g360-dash-active {
  color: #0078d4;
  border-bottom-color: #0078d4;
  background: transparent;
  font-weight: 600;
}

.g360-dash-container {
  /* max-width: 1400px; */
  margin: 1rem auto;
  padding: 1rem 1.5rem;
}

.g360-dash-dashboard {
  display: none;
  animation: g360-dash-fadeIn 0.2s ease;
}
.g360-dash-dashboard.g360-dash-active {
  display: block;
}

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

.g360-dash-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.g360-dash-metric-card {
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 1.6px 3.6px rgba(0, 0, 0, 0.13),
    0 0.3px 0.9px rgba(0, 0, 0, 0.11);
  border: 1px solid #edebe9;
  padding: 0.875rem;
  transition: box-shadow 0.15s ease;
  position: relative;
}

.g360-dash-metric-card:hover {
  box-shadow: 0 3.2px 7.2px rgba(0, 0, 0, 0.13),
    0 0.6px 1.8px rgba(0, 0, 0, 0.11);
}

.g360-dash-metric-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}
.g360-dash-metric-content {
  flex: 1;
  z-index: 1;
  position: relative;
}
.g360-dash-metric-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #605e5c;
  margin-bottom: 0.375rem;
}
.g360-dash-metric-value {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
  line-height: 1.2;
  color: #323130;
}
.g360-dash-metric-subtitle {
  font-size: 0.75rem;
  color: #8a8886;
  font-weight: 400;
}
.g360-dash-metric-trend {
  font-size: 0.75rem;
  color: #107c10;
  font-weight: 600;
  margin-top: 0.25rem;
  display: inline-block;
}

.g360-dash-metric-icon {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: #f3f2f1;
  color: #605e5c;
}

.g360-dash-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 0.75rem;
  justify-content: center;
}

.g360-dash-chart-card {
  background: #ffffff;
  border-radius: 4px;
  padding: 1rem;
  box-shadow: 0 1.6px 3.6px rgba(0, 0, 0, 0.13),
    0 0.3px 0.9px rgba(0, 0, 0, 0.11);
  border: 1px solid #edebe9;
}
.g360-dash-chart-card:hover {
  box-shadow: 0 3.2px 7.2px rgba(0, 0, 0, 0.13),
    0 0.6px 1.8px rgba(0, 0, 0, 0.11);
}
.g360-dash-chart-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #323130;
}

.g360-dash-chart-container {
  position: relative;
  height: 240px;
}

.g360-dash-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #323130;
  margin-bottom: 0.75rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Document Renewal Alerts */
.g360-dash-renewal-alert {
  background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
  border-left: 4px solid #ff9800;
  border-radius: 4px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2);
  animation: g360-dash-slideInDown 0.5s ease,
    g360-dash-pulse 2s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

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

.g360-dash-renewal-alert.g360-dash-urgent {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  border-left-color: #dc3545;
  box-shadow: 0 2px 12px rgba(220, 53, 69, 0.3);
  animation: g360-dash-slideInDown 0.5s ease,
    g360-dash-urgentPulse 1.5s ease-in-out infinite;
}

@keyframes g360-dash-slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes g360-dash-slideOutUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

@keyframes g360-dash-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2);
  }
  50% {
    transform: scale(1.01);
    box-shadow: 0 4px 16px rgba(255, 152, 0, 0.3);
  }
}

@keyframes g360-dash-urgentPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 2px 12px rgba(220, 53, 69, 0.3);
    border-left-width: 4px;
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
    border-left-width: 6px;
  }
}

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

.g360-dash-alert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.g360-dash-alert-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #323130;
}

.g360-dash-alert-close-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #605e5c;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  width: 28px;
  height: 28px;
}

.g360-dash-alert-close-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #323130;
  transform: rotate(90deg);
}

.g360-dash-renewal-alert.g360-dash-hidden {
  display: none;
}

.g360-dash-alert-icon {
  font-size: 1.25rem;
  animation: g360-dash-bounce 2s ease-in-out infinite;
}

@keyframes g360-dash-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.g360-dash-alert-badge {
  background: #dc3545;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  animation: g360-dash-badgePulse 2s ease-in-out infinite;
}

@keyframes g360-dash-badgePulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.9;
  }
}

.g360-dash-renewal-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.5rem;
}

/* Scrollbar styling for renewal list */
.g360-dash-renewal-list::-webkit-scrollbar {
  width: 8px;
}

.g360-dash-renewal-list::-webkit-scrollbar-track {
  background: #f3f2f1;
  border-radius: 4px;
}

.g360-dash-renewal-list::-webkit-scrollbar-thumb {
  background: #c8c6c4;
  border-radius: 4px;
}

.g360-dash-renewal-list::-webkit-scrollbar-thumb:hover {
  background: #8a8886;
}

.g360-dash-renewal-item {
  background: white;
  border-radius: 4px;
  padding: 0.75rem;
  border-left: 3px solid;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  animation: g360-dash-fadeInUp 0.5s ease backwards;
}

.g360-dash-renewal-item:nth-child(1) {
  animation-delay: 0.1s;
}
.g360-dash-renewal-item:nth-child(2) {
  animation-delay: 0.2s;
}
.g360-dash-renewal-item:nth-child(3) {
  animation-delay: 0.3s;
}
.g360-dash-renewal-item:nth-child(4) {
  animation-delay: 0.4s;
}

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

.g360-dash-renewal-item.g360-dash-urgent {
  border-left-color: #dc3545;
  background: #fff5f5;
  animation: g360-dash-urgentBlink 2s ease-in-out infinite;
}

.g360-dash-renewal-item.g360-dash-warning {
  border-left-color: #ff9800;
  background: #fffbf0;
}

.g360-dash-renewal-item.g360-dash-info {
  border-left-color: #0078d4;
  background: #f3f9ff;
}

@keyframes g360-dash-urgentBlink {
  0%,
  100% {
    border-left-width: 3px;
  }
  50% {
    border-left-width: 5px;
  }
}

.g360-dash-renewal-item:hover {
  transform: translateX(4px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.g360-dash-renewal-item-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 0.5rem;
}

.g360-dash-renewal-item-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: #323130;
}

.g360-dash-renewal-item-doc {
  font-size: 0.75rem;
  color: #605e5c;
  margin-top: 0.25rem;
}

.g360-dash-days-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.g360-dash-days-badge.g360-dash-urgent {
  background: #dc3545;
  color: white;
  animation: g360-dash-urgentBadge 1.5s ease-in-out infinite;
}

.g360-dash-days-badge.g360-dash-warning {
  background: #ff9800;
  color: white;
}

.g360-dash-days-badge.g360-dash-info {
  background: #0078d4;
  color: white;
}

@keyframes g360-dash-urgentBadge {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes g360-dash-urgentGlow {
  0%,
  100% {
    box-shadow: 0 1.6px 3.6px rgba(0, 0, 0, 0.13),
      0 0.3px 0.9px rgba(0, 0, 0, 0.11), 0 0 0 0 rgba(255, 152, 0, 0.4);
  }
  50% {
    box-shadow: 0 1.6px 3.6px rgba(0, 0, 0, 0.13),
      0 0.3px 0.9px rgba(0, 0, 0, 0.11), 0 0 0 8px rgba(255, 152, 0, 0);
  }
}

@keyframes g360-dash-rotate {
  0%,
  100% {
    transform: rotate(-10deg);
  }
  50% {
    transform: rotate(10deg);
  }
}

@keyframes g360-dash-iconPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.g360-dash-expiry-date {
  font-size: 0.75rem;
  color: #605e5c;
  margin-top: 0.25rem;
}

.g360-dash-empty-state {
  text-align: center;
  padding: 2rem;
  color: #8a8886;
  font-size: 0.875rem;
}

@media (max-width: 820px) {
  .g360-dash-charts-grid {
    grid-template-columns: 1fr;
  }
  .g360-dash-metrics-grid {
    grid-template-columns: 1fr;
  }
  .g360-dash-header-content {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  .g360-dash-tabs {
    overflow-x: auto;
    gap: 0.25rem;
  }
  .g360-dash-renewal-list {
    grid-template-columns: 1fr;
  }
}
