/* Basic cross-browser smoothing and scrollbar defaults */
html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Ensure consistent scrollbar look */
* {
  scrollbar-width: thin;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(0, 179, 255, 0.5);
  border-radius: 8px;
}

::-webkit-scrollbar-track {
  background: #0B1221;
}

/* Cross-browser compatibility styles for IntelliSecurity Dashboard */
.bg-brand-navy {
  background-color: #0B1221 !important;
}

.text-white {
  color: #ffffff !important;
}

.text-brand-cyan {
  color: #00B3FF !important;
}

.text-brand-cyan\/70 {
  color: rgba(0, 179, 255, 0.7) !important;
}

.bg-brand-dark\/50 {
  background-color: rgba(17, 24, 39, 0.5) !important;
}

.border-brand-cyan\/20 {
  border-color: rgba(0, 179, 255, 0.2) !important;
}

.bg-brand-navy\/30 {
  background-color: rgba(11, 18, 33, 0.3) !important;
}

.border-brand-cyan\/10 {
  border-color: rgba(0, 179, 255, 0.1) !important;
}

.text-green-400 {
  color: #4ade80 !important;
}

.text-red-400 {
  color: #f87171 !important;
}

.text-yellow-400 {
  color: #facc15 !important;
}

.text-orange-400 {
  color: #fb923c !important;
}

.bg-red-400 {
  background-color: #f87171 !important;
}

.bg-orange-400 {
  background-color: #fb923c !important;
}

.bg-yellow-400 {
  background-color: #facc15 !important;
}

.bg-green-400 {
  background-color: #4ade80 !important;
}

/* Ensure main content area has proper background */
main {
  background-color: #0B1221 !important;
}

/* Ensure all dashboard cards are visible */
.rounded-lg {
  border-radius: 0.5rem !important;
}

.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

/* Force visibility of all text elements */
h1, h2, h3, h4, h5, h6, p, div, span {
  color: inherit !important;
}

/* Ensure grid layouts work in all browsers */
.grid {
  display: grid !important;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.gap-6 {
  gap: 1.5rem !important;
}

.gap-4 {
  gap: 1rem !important;
}

/* Flexbox compatibility */
.flex {
  display: flex !important;
}

.items-center {
  align-items: center !important;
}

.justify-between {
  justify-content: space-between !important;
}

.justify-center {
  justify-content: center !important;
}

.flex-col {
  flex-direction: column !important;
}

.flex-row {
  flex-direction: row !important;
}

/* Spacing utilities */
.p-6 {
  padding: 1.5rem !important;
}

.p-3 {
  padding: 0.75rem !important;
}

.px-4 {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

.py-6 {
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}

.py-3 {
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

.py-2 {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

.px-2\.5 {
  padding-left: 0.625rem !important;
  padding-right: 0.625rem !important;
}

.py-0\.5 {
  padding-top: 0.125rem !important;
  padding-bottom: 0.125rem !important;
}

.mb-2 {
  margin-bottom: 0.5rem !important;
}

.mr-2 {
  margin-right: 0.5rem !important;
}

.mt-1 {
  margin-top: 0.25rem !important;
}

.mt-3 {
  margin-top: 0.75rem !important;
}

.ml-2 {
  margin-left: 0.5rem !important;
}

.space-x-2 > * + * {
  margin-left: 0.5rem !important;
}

.space-x-3 > * + * {
  margin-left: 0.75rem !important;
}

.space-y-4 > * + * {
  margin-top: 1rem !important;
}

.space-y-6 > * + * {
  margin-top: 1.5rem !important;
}

/* Typography */
.text-3xl {
  font-size: 1.875rem !important;
  line-height: 2.25rem !important;
}

.text-2xl {
  font-size: 1.5rem !important;
  line-height: 2rem !important;
}

.text-lg {
  font-size: 1.125rem !important;
  line-height: 1.75rem !important;
}

.text-sm {
  font-size: 0.875rem !important;
  line-height: 1.25rem !important;
}

.text-xs {
  font-size: 0.75rem !important;
  line-height: 1rem !important;
}

.font-bold {
  font-weight: 700 !important;
}

.font-medium {
  font-weight: 500 !important;
}

.font-semibold {
  font-weight: 600 !important;
}

.font-mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace !important;
}

/* Border utilities */
.border {
  border-width: 1px !important;
}

.rounded-lg {
  border-radius: 0.5rem !important;
}

.rounded-full {
  border-radius: 9999px !important;
}

.rounded-md {
  border-radius: 0.375rem !important;
}

/* Width and height utilities */
.w-2 {
  width: 0.5rem !important;
}

.h-2 {
  height: 0.5rem !important;
}

.w-4 {
  width: 1rem !important;
}

.h-4 {
  height: 1rem !important;
}

.w-6 {
  width: 1.5rem !important;
}

.h-6 {
  height: 1.5rem !important;
}

.w-8 {
  width: 2rem !important;
}

.h-8 {
  height: 2rem !important;
}

.h-20 {
  height: 5rem !important;
}

.h-9 {
  height: 2.25rem !important;
}

.w-full {
  width: 100% !important;
}

.h-full {
  height: 100% !important;
}

.min-h-screen {
  min-height: 100vh !important;
}

/* Container */
.container {
  width: 100% !important;
}

.mx-auto {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Responsive utilities */
@media (min-width: 768px) {
  .md\\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1024px) {
  .lg\\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  
  .lg\\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  
  .lg\\:col-span-2 {
    grid-column: span 2 / span 2 !important;
  }
  
  .lg\\:ml-80 {
    margin-left: 20rem !important;
  }
  
  .lg\\:block {
    display: block !important;
  }
  
  .lg\\:flex {
    display: flex !important;
  }
  
  .lg\\:hidden {
    display: none !important;
  }
  
  .lg\\:fixed {
    position: fixed !important;
  }
  
  .lg\\:inset-y-0 {
    top: 0 !important;
    bottom: 0 !important;
  }
  
  .lg\\:left-0 {
    left: 0 !important;
  }
  
  .lg\\:z-30 {
    z-index: 30 !important;
  }
}

/* Hidden utilities */
.hidden {
  display: none !important;
}

/* Fixed positioning */
.fixed {
  position: fixed !important;
}

.top-4 {
  top: 1rem !important;
}

.left-4 {
  left: 1rem !important;
}

.z-50 {
  z-index: 50 !important;
}

/* Text alignment */
.text-right {
  text-align: right !important;
}

.text-center {
  text-align: center !important;
}

/* Overflow */
.overflow-y-auto {
  overflow-y: auto !important;
}

/* Truncate */
.truncate {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Flex utilities */
.flex-1 {
  flex: 1 1 0% !important;
}

.flex-shrink-0 {
  flex-shrink: 0 !important;
}

.min-w-0 {
  min-width: 0px !important;
}

/* SVG styling */
svg {
  display: inline-block !important;
  vertical-align: middle !important;
}

/* Button styles */
button {
  cursor: pointer !important;
}

/* Focus styles */
.focus\\:outline-none:focus {
  outline: 2px solid transparent !important;
  outline-offset: 2px !important;
}

.focus\\:ring-2:focus {
  box-shadow: 0 0 0 2px rgba(0, 179, 255, 0.5) !important;
}

.focus\\:ring-offset-2:focus {
  box-shadow: 0 0 0 2px rgba(0, 179, 255, 0.5) !important;
}

/* Hover styles */
.hover\\:bg-brand-cyan\\/10:hover {
  background-color: rgba(0, 179, 255, 0.1) !important;
}

.hover\\:text-brand-cyan:hover {
  color: #00B3FF !important;
}

.hover\\:bg-brand-light\\/20:hover {
  background-color: rgba(17, 24, 39, 0.2) !important;
}

.hover\\:text-white:hover {
  color: #ffffff !important;
}

.hover\\:bg-brand-light\\/80:hover {
  background-color: rgba(17, 24, 39, 0.8) !important;
}

.hover\\:bg-destructive\\/80:hover {
  background-color: rgba(248, 113, 113, 0.8) !important;
}

.hover\\:bg-primary\\/80:hover {
  background-color: rgba(0, 179, 255, 0.8) !important;
}

.hover\\:bg-secondary\\/80:hover {
  background-color: rgba(17, 24, 39, 0.8) !important;
}

/* Transition styles */
.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke !important;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
  transition-duration: 150ms !important;
}

.transition-all {
  transition-property: all !important;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
  transition-duration: 150ms !important;
}

.transition-transform {
  transition-property: transform !important;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
  transition-duration: 150ms !important;
}

.duration-200 {
  transition-duration: 200ms !important;
}

/* Disabled styles */
.disabled\\:pointer-events-none:disabled {
  pointer-events: none !important;
}

.disabled\\:opacity-50:disabled {
  opacity: 0.5 !important;
}

/* Ring utilities */
.ring-offset-background {
  --tw-ring-offset-color: hsl(var(--background)) !important;
}

/* Backdrop blur */
.backdrop-blur-sm {
  backdrop-filter: blur(4px) !important;
}

/* Shadow utilities */
.shadow-2xl {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

.shadow-glow-sm {
  box-shadow: 0 0 10px rgba(0, 179, 255, 0.3) !important;
}

/* Border color utilities */
.border-current {
  border-color: currentColor !important;
}

.border-transparent {
  border-color: transparent !important;
}

/* Background color utilities */
.bg-destructive {
  background-color: #f87171 !important;
}

.bg-primary {
  background-color: #00B3FF !important;
}

.bg-secondary {
  background-color: rgba(17, 24, 39, 0.8) !important;
}

.bg-transparent {
  background-color: transparent !important;
}

/* Text color utilities */
.text-destructive-foreground {
  color: #ffffff !important;
}

.text-primary-foreground {
  color: #0B1221 !important;
}

.text-secondary-foreground {
  color: #ffffff !important;
}

.text-accent-foreground {
  color: #ffffff !important;
}

.text-neutral-300 {
  color: #d1d5db !important;
}

.text-neutral-400 {
  color: #9ca3af !important;
}

/* Inline flex */
.inline-flex {
  display: inline-flex !important;
}

/* Items center */
.items-start {
  align-items: flex-start !important;
}

/* Whitespace */
.whitespace-nowrap {
  white-space: nowrap !important;
}

/* Font size adjustments */
.text-xs {
  font-size: 0.75rem !important;
  line-height: 1rem !important;
}

/* Font weight */
.font-semibold {
  font-weight: 600 !important;
}

/* Leading */
.leading-none {
  line-height: 1 !important;
}

/* Tracking */
.tracking-tight {
  letter-spacing: -0.025em !important;
}

/* Capitalize */
.capitalize {
  text-transform: capitalize !important;
}

/* Relative positioning */
.relative {
  position: relative !important;
}

/* Absolute positioning */
.absolute {
  position: absolute !important;
}

.right-2 {
  right: 0.5rem !important;
}

/* Gradient backgrounds */
.bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)) !important;
}

.from-brand-cyan {
  --tw-gradient-from: #00B3FF !important;
  --tw-gradient-to: rgba(0, 179, 255, 0) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

.to-brand-teal {
  --tw-gradient-to: #00ffd1 !important;
}

/* Ensure all elements are visible */
* {
  box-sizing: border-box !important;
}

/* Force visibility of dashboard content */
main .container .space-y-6 > * {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure cards are visible */
.rounded-lg.border {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure text is visible */
.text-white, .text-brand-cyan, .text-green-400, .text-red-400, .text-yellow-400, .text-orange-400 {
  display: inline !important;
  visibility: visible !important;
  opacity: 1 !important;
}
