 
/* PWA Install Banner */
.pwa-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #2196f3, #1976d2);
  color: white;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.pwa-banner.show {
  transform: translateY(0);
}

.pwa-banner.hidden {
  display: none;
}

.pwa-banner-content {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  gap: 15px;
}

.pwa-banner-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-banner-text {
  flex: 1;
}

.pwa-banner-text h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.pwa-banner-text p {
  font-size: 14px;
  opacity: 0.9;
}

.pwa-banner-actions {
  display: flex;
  gap: 10px;
}

.pwa-btn-primary {
  background: white;
  color: #2196f3;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pwa-btn-primary:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
}

.pwa-btn-secondary {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pwa-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* iOS Install Banner */
.ios-banner {
  background: linear-gradient(135deg, #007aff, #0056cc);
}

.ios-banner .pwa-banner-text p {
  font-size: 13px;
}

.ios-banner .pwa-banner-text strong {
  font-weight: 700;
}

/* Header */
.app-header {
  background: white;
  padding: 15px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-header h1 {
  color: #2196f3;
  font-size: 24px;
  font-weight: 700;
}

.install-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #2196f3;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.install-btn:hover {
  background: #1976d2;
  transform: translateY(-1px);
}

.install-btn.hidden {
  display: none;
}

/* Main Content */
.app-main {
  padding: 40px 0;
}

.welcome-section {
  text-align: center;
  margin-bottom: 60px;
}

.welcome-section h2 {
  font-size: 32px;
  color: #333;
  margin-bottom: 16px;
}

.welcome-section p {
  font-size: 18px;
  color: #666;
  margin-bottom: 40px;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.feature-card {
  background: white;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 20px;
  color: #333;
  margin-bottom: 12px;
}

.feature-card p {
  color: #666;
  font-size: 14px;
}

/* PWA Status */
.pwa-status {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-top: 40px;
}

.pwa-status h3 {
  font-size: 24px;
  color: #333;
  margin-bottom: 20px;
  text-align: center;
}

.status-grid {
  display: grid;
  gap: 15px;
}

.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.status-item:last-child {
  border-bottom: none;
}

.status-label {
  font-weight: 500;
  color: #333;
}

.status-value {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.status-value.active {
  background: #4caf50;
  color: white;
}

.status-value.inactive {
  background: #f44336;
  color: white;
}

.status-value.checking {
  background: #ff9800;
  color: white;
}

/* Update Toast */
.update-toast {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: #333;
  color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transform: translateY(100px);
  transition: transform 0.3s ease;
}

.update-toast.show {
  transform: translateY(0);
}

.update-toast.hidden {
  display: none;
}

.toast-content {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  gap: 15px;
}

.toast-content span {
  flex: 1;
  font-weight: 500;
}

.toast-btn {
  background: #2196f3;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

.toast-btn-close {
  background: transparent;
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-btn-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .pwa-banner-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .pwa-banner-actions {
    width: 100%;
    justify-content: center;
  }

  .app-header .container {
    flex-direction: column;
    gap: 15px;
  }

  .welcome-section h2 {
    font-size: 28px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .update-toast {
    left: 10px;
    right: 10px;
  }
}

/* PWA Display Mode */
@media (display-mode: standalone) {
  .install-btn {
    display: none;
  }

  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;
    color: #ffffff;
  }

  .app-header {
    background: #1e1e1e;
  }

  .feature-card,
  .pwa-status {
    background: #1e1e1e;
  }

  .feature-card h3,
  .pwa-status h3,
  .status-label {
    color: #ffffff;
  }

  .feature-card p {
    color: #cccccc;
  }

  .status-item {
    border-bottom-color: #333;
  }
}





/* PWA Install Modal Styles - Custom prefixed to avoid conflicts */

.pwa-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px;
  box-sizing: border-box;
}

.pwa-modal-overlay.pwa-modal-show {
  opacity: 1;
  visibility: visible;
}

.pwa-modal-overlay.pwa-modal-hidden {
  display: none;
}

.pwa-modal-container {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.pwa-modal-show .pwa-modal-container {
  transform: scale(1) translateY(0);
}

.pwa-modal-header {
  position: relative;
  padding: 20px 20px 0;
  display: flex;
  justify-content: flex-end;
}

.pwa-modal-close {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 12px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #6b7280;
}

.pwa-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #374151;
  transform: scale(1.05);
}

.pwa-modal-content {
  padding: 0 30px 30px;
  text-align: center;
}

.pwa-modal-icon {
  position: relative;
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

.pwa-modal-app-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
  position: relative;
  z-index: 2;
}

.pwa-modal-sparkles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.pwa-modal-sparkle {
  position: absolute;
  font-size: 16px;
  animation: pwa-modal-sparkle 2s infinite ease-in-out;
}

.pwa-modal-sparkle-1 {
  top: 10px;
  left: 20px;
  animation-delay: 0s;
}

.pwa-modal-sparkle-2 {
  top: 20px;
  right: 15px;
  animation-delay: 0.7s;
}

.pwa-modal-sparkle-3 {
  bottom: 15px;
  left: 15px;
  animation-delay: 1.4s;
}

@keyframes pwa-modal-sparkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.5) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1) rotate(180deg);
  }
}

.pwa-modal-title {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.pwa-modal-subtitle {
  font-size: 16px;
  color: #6b7280;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.pwa-modal-features {
  display: grid;
  gap: 16px;
  margin-bottom: 32px;
  text-align: left;
}

.pwa-modal-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.pwa-modal-feature:hover {
  background: #f1f5f9;
  transform: translateX(4px);
}

.pwa-modal-feature-icon {
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pwa-modal-feature span {
  font-size: 15px;
  font-weight: 500;
  color: #374151;
}

.pwa-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.pwa-modal-btn {
  border: none;
  border-radius: 16px;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.pwa-modal-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.pwa-modal-btn:hover::before {
  left: 100%;
}

.pwa-modal-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.pwa-modal-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.pwa-modal-btn-primary:active {
  transform: translateY(0);
}

.pwa-modal-btn-secondary {
  background: #f8fafc;
  color: #6b7280;
  border: 2px solid #e5e7eb;
}

.pwa-modal-btn-secondary:hover {
  background: #f1f5f9;
  border-color: #d1d5db;
  color: #374151;
}

.pwa-modal-footer {
  border-top: 1px solid #f3f4f6;
  padding-top: 16px;
}

.pwa-modal-footer-text {
  font-size: 14px;
  color: #9ca3af;
  margin: 0;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .pwa-modal-overlay {
    padding: 16px;
  }

  .pwa-modal-container {
    border-radius: 20px;
  }

  .pwa-modal-content {
    padding: 0 24px 24px;
  }

  .pwa-modal-title {
    font-size: 24px;
  }

  .pwa-modal-subtitle {
    font-size: 15px;
  }

  .pwa-modal-features {
    gap: 12px;
  }

  .pwa-modal-feature {
    padding: 10px 14px;
  }

  .pwa-modal-btn {
    padding: 14px 20px;
    font-size: 15px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .pwa-modal-container {
    background: #1f2937;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  }

  .pwa-modal-title {
    color: #f9fafb;
  }

  .pwa-modal-subtitle {
    color: #d1d5db;
  }

  .pwa-modal-feature {
    background: #374151;
  }

  .pwa-modal-feature:hover {
    background: #4b5563;
  }

  .pwa-modal-feature-icon {
    background: #4b5563;
  }

  .pwa-modal-feature span {
    color: #f3f4f6;
  }

  .pwa-modal-btn-secondary {
    background: #374151;
    color: #d1d5db;
    border-color: #4b5563;
  }

  .pwa-modal-btn-secondary:hover {
    background: #4b5563;
    border-color: #6b7280;
    color: #f3f4f6;
  }

  .pwa-modal-footer {
    border-top-color: #374151;
  }

  .pwa-modal-footer-text {
    color: #9ca3af;
  }

  .pwa-modal-close {
    background: rgba(255, 255, 255, 0.1);
    color: #d1d5db;
  }

  .pwa-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #f3f4f6;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .pwa-modal-overlay,
  .pwa-modal-container,
  .pwa-modal-btn,
  .pwa-modal-feature,
  .pwa-modal-close {
    transition: none;
  }

  .pwa-modal-sparkle {
    animation: none;
  }

  .pwa-modal-btn::before {
    display: none;
  }
}
