/* ============================================
   MATRIX — GLASS NOC DESIGN SYSTEM
   Centro de Operações | Premium UI
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --matrix-orange: #E84A1D;
  --matrix-orange-hsl: 16, 83%, 51%;
  --matrix-glow: rgba(232, 74, 29, 0.15);
  --matrix-glow-strong: rgba(232, 74, 29, 0.30);
  --bg-deep: #05070d;
  --bg-mid: #080b14;
  --bg-surface: rgba(255, 255, 255, 0.03);
  --bg-surface-hover: rgba(255, 255, 255, 0.055);
  --border-light: rgba(255, 255, 255, 0.08);
  --border-orange: rgba(232, 74, 29, 0.4);
  --text-main: #e2e8f0;
  --text-muted: #64748b;
  --text-subtle: #475569;
  --green-live: #10b981;
  --green-glow: rgba(16, 185, 129, 0.25);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --easing: cubic-bezier(0.4, 0, 0.2, 1);
  --radius-card: 14px;
  --radius-input: 9px;
}

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(232, 74, 29, 0.06) 0%, transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(10, 14, 26, 0.8) 0%, transparent 50%),
    linear-gradient(160deg, #0a0e1a 0%, #05070d 100%);
  color: var(--text-main);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Glass Panel ── */
.glass-panel {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-card);
  box-shadow:
    0 0 0 1px var(--border-light),
    0 8px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.3s var(--easing);
}

.glass-panel:hover {
  box-shadow:
    0 0 0 1px rgba(232, 74, 29, 0.2),
    0 12px 40px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ── Header ── */
header {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(5, 7, 13, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--border-light), 0 4px 24px rgba(0, 0, 0, 0.4);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 34px;
  width: auto;
  filter: drop-shadow(0 0 12px var(--matrix-glow-strong));
}

.header-divider {
  width: 1px;
  height: 24px;
  background: var(--border-light);
}

.header-subtitle {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* ── Status Live ── */
.status-live {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--green-live);
  text-transform: uppercase;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--green-live);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--green-glow);
  animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 var(--green-glow); opacity: 1; }
  50%  { box-shadow: 0 0 0 6px transparent; opacity: 0.7; }
  100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
}

/* ── Clock ── */
.clock {
  font-family: 'SF Mono', 'Roboto Mono', 'Fira Code', monospace;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  border-radius: 6px;
}

/* ── Typography helpers ── */
.label {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.label::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 10px;
  background: var(--matrix-orange);
  border-radius: 2px;
}

/* ── Select / Dropdown ── */
select {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 12px 16px;
  border-radius: var(--radius-input);
  outline: none;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.2s var(--easing), box-shadow 0.2s var(--easing), background 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 14px) center;
  padding-right: 40px;
}

select:hover {
  border-color: rgba(232, 74, 29, 0.3);
  background-color: rgba(0, 0, 0, 0.45);
}

select:focus {
  border-color: var(--matrix-orange);
  box-shadow: 0 0 0 3px var(--matrix-glow), 0 0 16px var(--matrix-glow);
  background-color: rgba(0, 0, 0, 0.5);
}

select option {
  background: #0d1117;
  color: var(--text-main);
  padding: 8px;
}

/* ── Buttons ── */
.btn-apply {
  width: 100%;
  background: linear-gradient(135deg, #E84A1D 0%, #c73d18 100%);
  color: #fff;
  border: none;
  padding: 16px 28px;
  border-radius: 10px;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: transform 0.15s var(--easing), box-shadow 0.25s var(--easing), filter 0.2s;
  box-shadow:
    0 4px 20px var(--matrix-glow-strong),
    0 1px 0 rgba(255, 255, 255, 0.15) inset,
    0 0 0 1px rgba(232, 74, 29, 0.5);
  position: relative;
  overflow: hidden;
}

.btn-apply::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.5s;
}

.btn-apply:hover {
  filter: brightness(1.1);
  box-shadow:
    0 6px 28px var(--matrix-glow-strong),
    0 1px 0 rgba(255, 255, 255, 0.15) inset,
    0 0 0 1px rgba(232, 74, 29, 0.7);
  transform: translateY(-1px);
}

.btn-apply:hover::before {
  left: 100%;
}

.btn-apply:active {
  transform: scale(0.98) translateY(0);
  filter: brightness(0.95);
}

/* ── Badges (active filters) ── */
.badge-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.badge {
  background: var(--matrix-glow);
  border: 1px solid var(--border-orange);
  color: var(--matrix-orange);
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 0 8px var(--matrix-glow);
  animation: badge-appear 0.25s var(--easing) both;
}

@keyframes badge-appear {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Toast notification ── */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: rgba(10, 14, 26, 0.95);
  border: 1px solid var(--matrix-orange);
  border-radius: 10px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  box-shadow: 0 0 20px var(--matrix-glow), 0 8px 32px rgba(0,0,0,0.6);
  z-index: 999;
  transform: translateY(80px);
  opacity: 0;
  transition: transform 0.35s var(--easing), opacity 0.35s var(--easing);
}

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

.toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--matrix-orange);
  flex-shrink: 0;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); border-radius: 3px; }
::-webkit-scrollbar-thumb { background: rgba(232, 74, 29, 0.35); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(232, 74, 29, 0.6); }

/* ── Noise texture overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  z-index: 9999;
}
