/* RoutePin - Shared Styles */

:root {
  --bg: #1a1a2e;
  --card: #16213e;
  --accent: #0f3460;
  --cta: #e94560;
  --cta-hover: #c73652;
  --text: #e8e8f0;
  --text-muted: #8888aa;
  --border: #2a2a4a;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --gray: #6b7280;
  --success: #22c55e;
  --warning: #eab308;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

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

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--cta);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

input, select, textarea {
  background: var(--accent);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--cta);
}

input::placeholder {
  color: var(--text-muted);
}

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
}

button:active, .btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--cta);
  color: white;
}

.btn-primary:hover {
  background: var(--cta-hover);
  text-decoration: none;
}

.btn-secondary {
  background: var(--accent);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #1a3a6a;
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--card);
  color: var(--text);
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: var(--shadow);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-green { background: rgba(34,197,94,0.2); color: var(--green); }
.badge-yellow { background: rgba(234,179,8,0.2); color: var(--yellow); }
.badge-red { background: rgba(239,68,68,0.2); color: var(--red); }
.badge-gray { background: rgba(107,114,128,0.2); color: var(--gray); }

.tag-green { color: var(--green); }
.tag-yellow { color: var(--yellow); }
.tag-red { color: var(--red); }
.tag-gray { color: var(--gray); }

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  max-width: 380px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: var(--shadow);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success { background: #166534; border: 1px solid #22c55e; color: #bbf7d0; }
.toast.error { background: #7f1d1d; border: 1px solid #ef4444; color: #fecaca; }
.toast.info { background: #1e3a5f; border: 1px solid #3b82f6; color: #bfdbfe; }

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--cta); }

/* Responsive utilities */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}
