/* Intent Web Dashboard Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

.dashboard-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.dashboard-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-section h1 {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #27bdea, #4e7e92);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.logo-section p {
  color: #2a4e53;
  font-size: 0.9rem;
}

.header-buttons {
    display: flex;
    gap: 1rem;
}

.user-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info {
  text-align: right;
}

.user-name {
  font-weight: 600;
  color: #044474;
}

.user-email {
  font-size: 0.8rem;
  color: #2a4e53;
}

.logout-button {
  background: linear-gradient(135deg, #044474, #2a4e53);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(4, 68, 116, 0.3);
}

.logout-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(4, 68, 116, 0.4);
}

/* Authentication Section */
.auth-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-container {
  width: 100%;
  max-width: 400px;
}

.auth-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 0.5rem;
  color: #044474;
}

.auth-card > p {
  text-align: center;
  color: #2a4e53;
  margin-bottom: 2rem;
}

.auth-tabs {
  display: flex;
  margin-bottom: 1.5rem;
  background: #f3f4f6;
  border-radius: 0.5rem;
  padding: 0.25rem;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 0.75rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.auth-tab.active {
  background: white;
  color: #27bdea;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.auth-form {
  margin-bottom: 1.5rem;
}

.auth-form.hidden {
  display: none;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #044474;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #27bdea;
  box-shadow: 0 0 0 3px rgba(39, 189, 234, 0.1);
}

.auth-button {
  width: 100%;
  background: linear-gradient(135deg, #27bdea, #4e7e92);
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(39, 189, 234, 0.3);
}

.auth-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(39, 189, 234, 0.4);
}

.auth-divider {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
  color: #2a4e53;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e5e7eb;
}

.auth-divider span {
  background: rgba(255, 255, 255, 0.95);
  padding: 0 1rem;
}

.google-button {
  width: 100%;
  background: white;
  border: 1px solid #d1d5db;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
  margin-bottom: 1.5rem;
}

.google-button:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.demo-button {
  width: 100%;
  background: linear-gradient(135deg, #f0f73c, #e6e02e);
  color: #044474;
  border: none;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(240, 247, 60, 0.3);
}

.demo-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(240, 247, 60, 0.4);
}

.demo-description {
  text-align: center;
  font-size: 0.8rem;
  color: #2a4e53;
  margin-top: 0.5rem;
}

.auth-error {
  background: rgba(4, 68, 116, 0.1);
  color: #044474;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(4, 68, 116, 0.2);
  margin-top: 1rem;
  font-size: 0.9rem;
}

.auth-error.hidden {
  display: none;
}

/* Main Dashboard */
.dashboard-main {
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.dashboard-main.hidden {
  display: none;
}

/* Stats Overview */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-icon {
  font-size: 2rem;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 0.75rem;
}

.stat-content h3 {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #27bdea, #4e7e92);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.stat-content p {
  color: #2a4e53;
  font-size: 0.9rem;
}

/* Connection Status */
.connection-status {
  margin-bottom: 2rem;
}

.status-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-card.connected {
  border-left: 4px solid #27bdea;
}

.status-card.disconnected {
  border-left: 4px solid #f0f73c;
}

.status-icon {
  font-size: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 0.5rem;
}

.status-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #044474;
  margin-bottom: 0.25rem;
}

.status-content p {
  color: #2a4e53;
  font-size: 0.9rem;
}

.sync-button {
  background: linear-gradient(135deg, #27bdea, #4e7e92);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(39, 189, 234, 0.3);
}

.sync-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(39, 189, 234, 0.4);
}

.sync-button.hidden {
  display: none;
}

/* Filters Section */
.filters-section {
  margin-bottom: 2rem;
}

.filters-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.search-box {
  display: flex;
  flex: 1;
  min-width: 250px;
}

.search-box input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem 0 0 0.5rem;
  font-size: 1rem;
}

.search-box button {
  background: linear-gradient(135deg, #27bdea, #4e7e92);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 0 0.5rem 0.5rem 0;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(39, 189, 234, 0.3);
}

.filter-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-controls select {
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  background: white;
}

.export-button {
  display: none;
}

/* Intentions Section */
.intentions-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-header h2 {
  color: #044474;
  font-size: 1.5rem;
}

.view-controls {
  display: flex;
  gap: 0.5rem;
}

.view-button {
  background: #f3f4f6;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.view-button.active {
  background: linear-gradient(135deg, #27bdea, #4e7e92);
  color: white;
  box-shadow: 0 4px 12px rgba(39, 189, 234, 0.3);
}

/* Intentions Container */
.intentions-container {
  min-height: 300px;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: #2a4e53;
}

.spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid #aeccd0;
  border-top: 3px solid #27bdea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

.spinner.large {
  width: 3rem;
  height: 3rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: #2a4e53;
}

.empty-state.hidden {
  display: none;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  color: #044474;
  margin-bottom: 0.5rem;
}

.install-link {
  display: inline-block;
  background: linear-gradient(135deg, #27bdea, #4e7e92);
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(39, 189, 234, 0.3);
}

.install-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(39, 189, 234, 0.4);
}

/* Intentions List */
.intentions-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.intentions-list.hidden {
  display: none;
}

.intention-item {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: all 0.2s;
}

.intention-item:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.intention-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.intention-domain {
  font-weight: 600;
  background: linear-gradient(135deg, #27bdea, #4e7e92);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.1rem;
}

.intention-time {
  color: #2a4e53;
  font-size: 0.9rem;
}

.intention-url {
  color: #2a4e53;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  word-break: break-all;
}

.intention-text {
  color: #044474;
  font-style: italic;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.intention-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: #2a4e53;
  flex-wrap: wrap;
}

.time-limit {
  background: linear-gradient(135deg, #aeccd0, #9bb8bd);
  color: #044474;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-weight: 500;
}

/* Chart */
.intentions-chart {
  padding: 2rem;
  text-align: center;
}

.intentions-chart.hidden {
  display: none;
}

#chart-canvas {
  max-width: 100%;
  height: 300px;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: white;
}

/* Load More */
.load-more-container {
  text-align: center;
  margin-top: 2rem;
}

.load-more-container.hidden {
  display: none;
}

.load-more-button {
  background: linear-gradient(135deg, #27bdea, #4e7e92);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(39, 189, 234, 0.3);
}

.load-more-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(39, 189, 234, 0.4);
}

/* Footer */
.dashboard-footer {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2rem;
  margin-top: 2rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-content p {
  color: #2a4e53;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #27bdea;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #1fa7d4;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loading-overlay.hidden {
  display: none;
}

.loading-content {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .dashboard-header {
    padding: 1rem;
  }
  
  .header-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .dashboard-main {
    padding: 1rem;
  }
  
  .stats-overview {
    grid-template-columns: 1fr;
  }
  
  .filters-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-box {
    min-width: auto;
  }
  
  .filter-controls {
    justify-content: center;
  }
  
  .section-header {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .intention-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .auth-section {
    padding: 1rem;
  }
  
  .auth-card {
    padding: 1.5rem;
  }
  
  .stat-card {
    flex-direction: column;
    text-align: center;
  }
  
  .status-card {
    flex-direction: column;
    text-align: center;
  }
  
  .filter-controls {
    flex-direction: column;
  }
  
  .filter-controls select,
  .export-button {
    width: 100%;
  }
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
/* Premium link styling */
#premium-link {
  background: linear-gradient(135deg, #f0f73c, #e6e02e) !important;
  color: #044474 !important;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(240, 247, 60, 0.2);
}

#premium-link:hover {
  background: linear-gradient(135deg, #e6e02e, #d4d026) !important;
  color: #044474 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(240, 247, 60, 0.3);
}

/* Site Management Section */
.lists-section {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

.list-container {
  margin-top: 1.5rem;
}

.list-header {
  margin-bottom: 1.5rem;
}

.list-header h3 {
  color: #1f2937;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.list-header p {
  color: #6b7280;
  margin: 0;
}

.add-domain-section {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.domain-input {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.domain-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.domain-list {
  min-height: 200px;
}

.domain-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.domain-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.domain-item:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.domain-name {
  font-weight: 500;
  color: #1f2937;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.domain-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-remove {
  background: #ef4444;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-remove:hover {
  background: #dc2626;
}

.btn-sync {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-sync:hover {
  background: #2563eb;
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

.sync-status.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.sync-status.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.sync-status.info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* View controls for lists */
.lists-section .view-controls {
  display: flex;
  gap: 0.5rem;
}

.lists-section .view-button {
  padding: 0.5rem 1rem;
  border: 2px solid #e5e7eb;
  background: white;
  color: #6b7280;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
  font-weight: 500;
}

.lists-section .view-button:hover {
  border-color: #d1d5db;
  color: #374151;
}

.lists-section .view-button.active {
  border-color: #4f46e5;
  background: #4f46e5;
  color: white;
}