/* Font faces */
@font-face {
  font-family: 'SF Pro Display';
  src: url('../assets/SF-Pro-Display.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Sharp Grotesk';
  src: url('../assets/SharpGrotesk.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@800&display=swap');

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #E1E1E1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Dashboard Styles */
.dashboard-container {
  width: 100%;
  height: 100vh;
  min-height: 820px;
  position: relative;
  overflow: hidden;
}

.bg-base {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #E1E1E1;
}

.bg-top-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 33.33%;
  background: linear-gradient(180deg, rgba(255, 104, 32, 0.7) 0%, rgba(255, 104, 32, 0) 100%);
}

.bg-bottom-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 33.33%;
  background: linear-gradient(180deg, rgba(4, 106, 56, 0) 0%, rgba(4, 106, 56, 0.7) 100%);
}

.content {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 20px;
  padding: 20px;
  z-index: 1;
}

/* Left Panel */
.left-panel {
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: clamp(18px, 2.3vh, 25px);
  padding: clamp(20px, 2.8vh, 30px) clamp(30px, 3.7vh, 40px) clamp(35px, 4.5vh, 50px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 5px;
  flex-shrink: 0;
}

.title {
  font-weight: 200;
  font-size: clamp(60px, 7.4vh, 80px);
  line-height: 1.05;
  color: #1E1E1E;
}

.alert-count {
  font-family: 'Sharp Grotesk', 'SF Pro Display', -apple-system, sans-serif;
  font-weight: 300;
  font-size: clamp(100px, 13vh, 140px);
  line-height: 0.94;
  color: #EC1C24;
}

.alerts-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-start;
}

/* Alert Cards */
.alert-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(20px, 3.2vh, 35px) 45px;
  height: clamp(80px, 10.2vh, 110px);
  border-radius: clamp(18px, 2.3vh, 25px);
  border-width: 1.5px;
  border-style: solid;
  box-sizing: border-box;
}

.alert-card-active {
  background-color: rgba(236, 28, 36, 0.08);
  border-color: rgba(236, 28, 36, 0.3);
}

.alert-card-answered {
  background-color: rgba(4, 106, 56, 0.08);
  border-color: rgba(4, 106, 56, 0.3);
}

.alert-card-loading {
  background-color: rgba(200, 200, 200, 0.3);
  border-color: rgba(150, 150, 150, 0.3);
}

.alert-card-placeholder {
  height: clamp(80px, 10.2vh, 110px);
  border-radius: clamp(18px, 2.3vh, 25px);
  background-color: rgba(200, 200, 200, 0.3);
  box-sizing: border-box;
}

.alert-name {
  font-weight: 500;
  font-size: clamp(22px, 2.6vh, 28px);
  line-height: 1.14;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alert-name-active {
  color: #EC1C24;
}

.alert-name-answered {
  color: #046A38;
}

.alert-name-loading {
  color: #888888;
}

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

.alert-icon-wrapper {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 100px;
}

.alert-time-wrapper {
  width: 200px;
  flex-shrink: 0;
  text-align: right;
}

.alert-time {
  font-weight: 600;
  font-size: clamp(18px, 2.2vh, 24px);
  line-height: 1.33;
  white-space: nowrap;
}

.alert-time-active {
  color: #EC1C24;
}

.alert-time-answered {
  color: #046A38;
}

.alert-time-loading {
  color: #888888;
}

/* Overflow Cards */
.overflow-card-wrapper {
  position: relative;
  margin-bottom: 15px;
}

.overflow-card-stack {
  position: absolute;
  bottom: -15px;
  left: 0;
  right: 0;
  height: 15px;
  overflow: hidden;
}

.overflow-card-back1 {
  position: absolute;
  bottom: 0;
  left: 40px;
  right: 40px;
  height: 80px;
  background-color: #F4E5E4;
  border-radius: 20px;
  border: 1.5px solid rgba(236, 28, 36, 0.3);
}

.overflow-card-back2 {
  position: absolute;
  bottom: 5px;
  left: 12px;
  right: 12px;
  height: 80px;
  background-color: #F4E5E4;
  border-radius: 20px;
  border: 1.5px solid rgba(236, 28, 36, 0.3);
}

.overflow-card-back1-green {
  position: absolute;
  bottom: 0;
  left: 40px;
  right: 40px;
  height: 80px;
  background-color: #CAD7CD;
  border-radius: 20px;
  border: 1.5px solid rgba(4, 106, 56, 0.3);
}

.overflow-card-back2-green {
  position: absolute;
  bottom: 7px;
  left: 12px;
  right: 12px;
  height: 80px;
  background-color: #CAD7CD;
  border-radius: 20px;
  border: 1.5px solid rgba(4, 106, 56, 0.3);
}

.overflow-card {
  position: relative;
  justify-content: center;
}

.overflow-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.overflow-text {
  font-weight: 500;
  font-size: clamp(36px, 4.6vh, 50px);
  line-height: 1;
  color: #EC1C24;
}

.overflow-text-green {
  font-weight: 500;
  font-size: clamp(36px, 4.6vh, 50px);
  line-height: 1;
  color: #046A38;
}

/* Right Panel */
.right-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.right-header {
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: clamp(15px, 1.9vh, 20px);
  padding: clamp(10px, 1.4vh, 15px) 30px;
  height: clamp(90px, 11.1vh, 120px);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.right-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo-section img {
  width: 80px;
  height: 80px;
}

.sayhelp-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(30px, 3.7vh, 40px);
  line-height: 1;
  color: #1E1E1E;
}

.region-section {
  display: flex;
  align-items: center;
  gap: 20px;
}

.region-section img {
  height: 80px;
  width: auto;
}

.region-badge {
  text-align: left;
}

.region-label {
  font-weight: 300;
  font-size: clamp(17px, 2.1vh, 23px);
  line-height: 1.74;
  color: #646464;
}

.region-name {
  font-weight: 500;
  font-size: clamp(48px, 6vh, 65px);
  line-height: 1.08;
  color: #1E1E1E;
}

/* Stats Panel */
.stats-panel {
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: clamp(15px, 1.9vh, 20px);
  padding: clamp(20px, 2.8vh, 30px) clamp(35px, 4.6vh, 50px);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.stat-section {
  /* No special styles needed */
}

.divider {
  height: 0;
  border-bottom: 1.5px dashed #6E6E6E;
  margin: 10px 0;
}

.stat-section-title {
  font-weight: 500;
  font-size: clamp(26px, 3.3vh, 36px);
  line-height: 1.11;
  color: #1E1E1E;
  text-align: center;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.stat-label {
  font-weight: 100;
  font-size: clamp(28px, 3.7vh, 40px);
  line-height: 1;
  color: #646464;
}

.stat-label-right {
  font-weight: 100;
  font-size: clamp(28px, 3.7vh, 40px);
  line-height: 1;
  color: #646464;
  text-align: right;
}

.stat-value-group {
  display: flex;
  align-items: baseline;
  gap: 40px;
}

.stat-value-large {
  font-family: 'Sharp Grotesk', 'SF Pro Display', -apple-system, sans-serif;
  font-weight: 300;
  font-size: clamp(80px, 11.1vh, 120px);
  line-height: 1;
  color: #EC1C24;
}

.stat-value-large-right {
  font-family: 'Sharp Grotesk', 'SF Pro Display', -apple-system, sans-serif;
  font-weight: 300;
  font-size: clamp(80px, 11.1vh, 120px);
  line-height: 1;
  color: #EC1C24;
  text-align: right;
}

.stat-unit {
  font-family: 'Sharp Grotesk', 'SF Pro Display', -apple-system, sans-serif;
  font-weight: 300;
  font-size: clamp(28px, 3.7vh, 40px);
  line-height: 1.2;
  color: #EC1C24;
}

.stat-unit-right {
  font-family: 'Sharp Grotesk', 'SF Pro Display', -apple-system, sans-serif;
  font-weight: 300;
  font-size: clamp(28px, 3.7vh, 40px);
  line-height: 1.2;
  color: #EC1C24;
  text-align: right;
}

/* Fullscreen Button */
.fullscreen-button {
  position: absolute;
  bottom: 15px;
  right: 15px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  z-index: 10;
  border: none;
}

.fullscreen-button:hover {
  background-color: rgba(255, 255, 255, 1);
  transform: scale(1.05);
}

.fullscreen-button.active {
  background-color: rgba(0, 0, 0, 0.5);
  box-shadow: none;
}

.fullscreen-button.active:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Error Banner */
.error-banner {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(255, 165, 0, 0.9);
  padding: 10px 20px;
  border-radius: 8px;
  z-index: 100;
  display: none;
}

.error-banner.visible {
  display: block;
}

.error-banner-text {
  color: #333;
  font-size: 14px;
}

/* Page Loading */
.page-loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #E1E1E1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.page-loading .spinner {
  width: 50px;
  height: 50px;
  border: 3px solid #ddd;
  border-radius: 50%;
  border-top-color: #EC1C24;
  animation: spin 0.8s ease-in-out infinite;
}

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

/* SVG Icons */
.icon {
  display: inline-block;
}
