/* ================================
   HorlogeTV Dashboard - Premium Metallic Theme
   Matches horlogetv.com design system
   ================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Backgrounds - Deep black */
  --bg-primary: #0d0d0d;
  --bg-secondary: #111111;
  --bg-card: #1a1a1a;
  --bg-elevated: #222222;

  /* Accent - Luxury Gold */
  --accent-primary: #c9a84c;
  --accent-secondary: #e8c55a;
  --accent-gradient: linear-gradient(135deg, #b8860b 0%, #ffd700 100%);
  --accent-gradient-btn: linear-gradient(135deg, #b8860b 0%, #d4a017 25%, #ffd700 50%, #d4a017 75%, #b8860b 100%);

  /* Text */
  --text-primary: #f0f0f0;
  --text-secondary: #999999;
  --text-muted: #666666;

  /* Borders */
  --border-color: #2a2a2a;
  --border-light: #3a3a3a;

  /* Status */
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;

  /* Effects */
  --glow: 0 0 40px rgba(201, 168, 76, 0.15);
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  --glass-bg: rgba(26, 26, 26, 0.6);
  --glass-border: rgba(201, 168, 76, 0.06);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 16px;
  letter-spacing: 0.01em;
}

/* ================================
   BACKGROUND CLOCK
================================ */
.clock-bg {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90vmin;
  height: 90vmin;
  max-width: 800px;
  max-height: 800px;
  opacity: 0.04;
  z-index: 0;
  pointer-events: none;
}

.clock-bg svg {
  width: 100%;
  height: 100%;
}

/* ================================
   CONTAINER
================================ */
.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ================================
   HEADER
================================ */
.dashboard-header {
  text-align: center;
  padding: 60px 20px 40px;
  position: relative;
}

.dashboard-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 1px;
}

/* Logo - identical to horlogetv.com */
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.logo:hover {
  color: var(--text-primary);
}

.logo-svg {
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.1em;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ================================
   SECTIONS
================================ */
.dashboard-section {
  margin-bottom: 48px;
}

.dashboard-section h2 {
  font-size: 1.3em;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  letter-spacing: -0.01em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-section h2 svg {
  color: var(--accent-primary);
  flex-shrink: 0;
}

/* ================================
   CARDS GRID
================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

/* ================================
   CARD - Glass Metallic Style
================================ */
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 18px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  position: relative;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

/* Top metallic reflection line */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

/* Shine sweep effect on hover */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}

.card:hover::after {
  left: 150%;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-light);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 30px rgba(201, 168, 76, 0.06);
}

.card-primary:hover {
  border-color: rgba(201, 168, 76, 0.3);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), var(--glow);
}

.card-external:hover {
  border-color: rgba(180, 180, 180, 0.3);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 30px rgba(180, 180, 180, 0.08);
}

/* SVG icon inside cards */
.card-icon {
  margin-bottom: 16px;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon svg {
  filter: drop-shadow(0 2px 6px rgba(201, 168, 76, 0.2));
}

.card-title {
  font-size: 1.05em;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 0.8em;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.5;
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
}

/* ================================
   QUICK ACTIONS - Gold Metallic Buttons
================================ */
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent-gradient-btn);
  background-size: 200% 100%;
  border: none;
  border-radius: 10px;
  color: #0d0d0d;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
}

.btn-action svg {
  flex-shrink: 0;
}

/* Metallic shine sweep on buttons */
.btn-action::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: left 0.5s;
}

.btn-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(201, 168, 76, 0.25);
}

.btn-action:hover::after {
  left: 150%;
}

.btn-action:active {
  transform: translateY(0);
}

/* ================================
   STATUS GRID
================================ */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.status-item {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 18px 22px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.status-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
}

.status-label {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.status-value {
  font-weight: 700;
  font-size: 14px;
}

.status-ok {
  color: var(--success);
}

.status-error {
  color: var(--error);
}

.status-checking {
  color: var(--warning);
}

/* ================================
   FOOTER
================================ */
.dashboard-footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid var(--border-color);
  margin-top: 20px;
}

.dashboard-footer p {
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 0.03em;
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 768px) {
  .dashboard-header {
    padding: 40px 16px 30px;
  }

  .logo-text {
    font-size: 1.3rem;
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .card {
    padding: 22px 14px;
  }

  .card-icon svg {
    width: 26px;
    height: 26px;
  }

  .quick-actions {
    flex-direction: column;
  }

  .btn-action {
    width: 100%;
    justify-content: center;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  .clock-bg {
    width: 120vmin;
    height: 120vmin;
  }
}

@media (max-width: 480px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}
