/* EUFA SEO Dashboard — Shared Styles */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f6f8;
  color: #333;
  min-height: 100vh;
}

/* Top bar */
.topbar {
  background: #1a1a1a;
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar .brand {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
  text-decoration: none;
}
.topbar .client {
  font-size: 13px;
  color: #999;
}

/* Breadcrumb */
.breadcrumb {
  padding: 12px 40px;
  font-size: 13px;
  color: #888;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
}
.breadcrumb a { color: #2c7be5; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 8px; color: #ccc; }
.breadcrumb .current { color: #555; font-weight: 500; }

/* Hero */
.hero {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 48px 40px 40px;
}
.hero h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
}
.hero p {
  font-size: 15px;
  color: #888;
  max-width: 600px;
}

/* Dashboard hub grid */
.dashboard-grid {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* Cards (hub) */
.card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8e8e8;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.card.disabled {
  cursor: default;
  opacity: 0.6;
}
.card.disabled:hover {
  box-shadow: none;
  transform: none;
}
.card-header {
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
}
.card-body {
  padding: 16px 24px 24px;
}
.card-body p {
  font-size: 13px;
  color: #888;
  line-height: 1.6;
}
.card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 12px;
}
.tag-live { background: #e8f5e9; color: #27ae60; }
.tag-soon { background: #fff3e0; color: #f39c12; }
.tag-planned { background: #f0f0f0; color: #999; }

/* Page container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 40px 60px;
}

/* KPI cards row */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.kpi-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8e8e8;
  padding: 24px;
}
.kpi-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #999;
  margin-bottom: 8px;
}
.kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  font-variant-numeric: tabular-nums;
}
.kpi-delta {
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.delta-up { color: #27ae60; }
.delta-down { color: #e74c3c; }
.delta-neutral { color: #999; }

/* Section headers */
.section-title {
  font-size: 15px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e0e0e0;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  margin-bottom: 32px;
}
.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #999;
  padding: 10px 16px;
  border-bottom: 2px solid #e0e0e0;
  background: #fafbfc;
}
.data-table th.num { text-align: right; }
.data-table td {
  padding: 10px 16px;
  border-bottom: 1px solid #f0f0f0;
  font-variant-numeric: tabular-nums;
}
.data-table td.num {
  text-align: right;
  font-weight: 500;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover { background: #fafbfc; }
.data-table .query-text, .data-table .page-text {
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Position badges */
.pos-good { color: #27ae60; font-weight: 600; }
.pos-mid { color: #f39c12; font-weight: 600; }
.pos-bad { color: #e74c3c; font-weight: 600; }

/* Chart container */
.chart-container {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8e8e8;
  padding: 24px;
  margin-bottom: 32px;
}
.chart-container h3 {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  margin-bottom: 16px;
}

/* SVG chart */
.chart-svg {
  width: 100%;
  height: 200px;
}

/* Horizontal bars */
.hbar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.hbar-label {
  width: 80px;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  text-align: right;
}
.hbar-track {
  flex: 1;
  height: 24px;
  background: #e8ecef;
  border-radius: 4px;
  overflow: hidden;
}
.hbar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}
.hbar-value {
  width: 60px;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  font-variant-numeric: tabular-nums;
}

/* Loading & error states */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 14px;
}
.loading::after {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  margin: 16px auto 0;
  border: 3px solid #e8e8e8;
  border-top-color: #2c7be5;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-msg {
  text-align: center;
  padding: 40px 20px;
  color: #e74c3c;
  font-size: 14px;
}

/* Timestamp */
.last-updated {
  font-size: 12px;
  color: #bbb;
  text-align: right;
  margin-top: 8px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px;
  font-size: 12px;
  color: #bbb;
}
.footer a { color: #999; text-decoration: none; }
.footer a:hover { color: #555; }

/* Two-column layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

/* Responsive */
@media (max-width: 768px) {
  .topbar { padding: 12px 20px; }
  .breadcrumb { padding: 10px 20px; }
  .hero { padding: 32px 20px 28px; }
  .hero h1 { font-size: 22px; }
  .dashboard-grid { padding: 0 20px; margin: 24px auto; }
  .container { padding: 24px 20px 40px; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .two-col { grid-template-columns: 1fr; }
  .data-table { font-size: 12px; }
  .data-table th, .data-table td { padding: 8px 10px; }
}
@media (max-width: 480px) {
  .kpi-row { grid-template-columns: 1fr; }
}
