* {
  box-sizing: border-box;
}

body {
  font-family: "Nunito", "Segoe UI", Roboto, Arial, sans-serif;
}

.glass-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border-radius: 1rem;
  padding: 1rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 60px rgba(4, 8, 24, 0.5);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #2f72ff, #4f6dff);
  color: #f8fbff;
  border-color: rgba(147, 197, 253, 0.4);
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-soft {
  background: rgba(255, 255, 255, 0.08);
  color: #dce8ff;
  border-color: rgba(255, 255, 255, 0.16);
}

.btn-soft:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.18);
  color: #ffd4df;
  border-color: rgba(251, 113, 133, 0.4);
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.28);
}

.form-input {
  width: 100%;
  margin-top: 0.35rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #e4edff;
  padding: 0.55rem 0.75rem;
  outline: none;
  transition: all 0.18s ease;
}

.form-input:focus {
  border-color: rgba(96, 165, 250, 0.75);
  background: rgba(255, 255, 255, 0.11);
}

.form-input::placeholder {
  color: rgba(191, 211, 255, 0.65);
}

.nav-link {
  display: block;
  border-radius: 0.85rem;
  border: 1px solid transparent;
  color: #c1d5ff;
  padding: 0.65rem 0.75rem;
  font-size: 0.92rem;
  transition: all 0.18s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ecf3ff;
}

.nav-link-active {
  color: #f5f9ff;
  border-color: rgba(147, 197, 253, 0.3);
  background: linear-gradient(135deg, rgba(47, 114, 255, 0.28), rgba(79, 109, 255, 0.22));
}

.log-view {
  margin-top: 0.75rem;
  max-height: 38rem;
  overflow: auto;
  white-space: pre-wrap;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.8rem;
  font-size: 0.8rem;
  color: #dbeafe;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(8, 16, 42, 0.96);
  backdrop-filter: blur(6px);
}

body.compact-mode .glass-card {
  padding: 0.75rem;
}

body.compact-mode .btn {
  padding: 0.42rem 0.7rem;
  font-size: 0.78rem;
}

body.compact-mode .data-table th,
body.compact-mode .data-table td {
  padding-top: 0.38rem !important;
  padding-bottom: 0.38rem !important;
}

.log-error {
  color: #fecdd3;
}

.log-warn {
  color: #fde68a;
}

.log-info {
  color: #c7d2fe;
}

.notice {
  border-left: 4px solid rgba(255, 255, 255, 0.18);
}

.notice.success {
  border-left-color: rgba(74, 222, 128, 0.9);
}

.notice.error {
  border-left-color: rgba(251, 113, 133, 0.95);
}

.notice.warning {
  border-left-color: rgba(250, 204, 21, 0.95);
}

@keyframes float {
  0% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-14px) translateX(8px); }
  100% { transform: translateY(0) translateX(0); }
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.42s ease;
}

.animate-fade-in-fast {
  animation: fade-in 0.24s ease;
}

.metric-card strong {
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.metric-card strong:empty::after {
  content: "-";
  opacity: 0.6;
}

.animate-float {
  animation: float 11s ease-in-out infinite;
}

.animate-float-slow {
  animation: float 16s ease-in-out infinite;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(147, 197, 253, 0.35);
  border-radius: 999px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}
