/* Primeglobex — Custom Styles (supplementary to TailwindCSS) */

/* ── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #6b7280; }

/* ── Transitions ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
.transition-fast { transition: all 0.15s ease; }

/* ── Loading spinner ────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 1rem; height: 1rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Price flash animation ──────────────────────────── */
.price-up   { animation: flashGreen 0.6s ease; }
.price-down { animation: flashRed   0.6s ease; }
@keyframes flashGreen { 0%,100%{background:transparent} 50%{background:rgba(16,185,129,0.2)} }
@keyframes flashRed   { 0%,100%{background:transparent} 50%{background:rgba(239,68,68,0.2)} }

/* ── Card hover ─────────────────────────────────────── */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
}

/* ── Gradient text ──────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glass card ─────────────────────────────────────── */
.glass {
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ── Range input ────────────────────────────────────── */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.3);
}

/* ── Table ──────────────────────────────────────────── */
.data-table th {
  padding: 0.75rem 1.5rem;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  background: #f9fafb;
}
.data-table td {
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
  white-space: nowrap;
}
.data-table tr:hover td { background: rgba(59,130,246,0.02); }

/* ── Status badges ──────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* ── Form focus ring ────────────────────────────────── */
.form-control:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
  border-color: #3b82f6;
}

/* ── Sidebar active indicator ───────────────────────── */
.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: #3b82f6;
  border-radius: 0 3px 3px 0;
}

/* ── Notification badge pulse ───────────────────────── */
.badge-pulse {
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.15)} }

/* ── Candlestick chart colors ───────────────────────── */
.candle-up   { fill: #10b981; stroke: #10b981; }
.candle-down { fill: #ef4444; stroke: #ef4444; }

/* ── Responsive utilities ───────────────────────────── */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 768px) {
  .hide-desktop { display: none !important; }
}

/* ── Page fade in ───────────────────────────────────── */
.page-enter {
  animation: pageEnter 0.3s ease-out;
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Dark mode overrides ────────────────────────────── */
.dark .data-table th { background: rgba(255,255,255,0.03); color: #9ca3af; }
.dark .data-table td { color: #d1d5db; border-color: rgba(255,255,255,0.06); }
.dark .data-table tr:hover td { background: rgba(255,255,255,0.04); }
