/* IELabs - Premium Industrial Dark Theme (Inter Font, Pure Black, Red, Green, Yellow, White) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Requested Color Palette */
  --bg-app: #000000;              /* Pure Black Body */
  --bg-surface: #1e1e1e;          /* Secondary Dark Surface (Cards/Panels) */
  --bg-surface-elevated: #282828; /* Elevated Elements, Inputs, Headers */
  --bg-surface-hover: #333333;    /* Hover State */

  --border-subtle: #2d2d2d;
  --border-muted: #3d3d3d;
  --border-focus: #ff0000;

  /* Typography Colors */
  --text-primary: #ffffff;        /* Pure White for Headings & Main Text */
  --text-secondary: #c0c0c0;      /* Muted Light Gray */
  --text-muted: #808080;          /* Subtle Gray */

  /* Brand Accents */
  --accent-red: #ff0000;          /* Primary Accent Red */
  --accent-red-hover: #d90000;
  --accent-red-glow: rgba(255, 0, 0, 0.35);
  --accent-red-bg: rgba(255, 0, 0, 0.12);

  --color-green: #117A65;         /* Industrial Emerald Green */
  --color-green-glow: rgba(17, 122, 101, 0.35);
  --color-green-bg: rgba(17, 122, 101, 0.15);

  --color-yellow: #C7AA37;        /* Golden Amber Yellow */
  --color-yellow-glow: rgba(199, 170, 55, 0.35);
  --color-yellow-bg: rgba(199, 170, 55, 0.15);

  --color-white: #ffffff;

  /* Compatibility Tokens */
  --accent-primary: var(--accent-red);
  --accent-primary-hover: var(--accent-red-hover);
  --accent-glow: var(--accent-red-glow);
  --accent-light: #ff3333;

  --color-success: var(--color-green);
  --color-success-bg: var(--color-green-bg);
  --color-warning: var(--color-yellow);
  --color-warning-bg: var(--color-yellow-bg);
  --color-danger: var(--accent-red);
  --color-danger-bg: var(--accent-red-bg);

  /* Typography - 100% Inter */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Layout */
  --bottom-nav-height: 68px;
  --header-height: 56px;
  --max-content-width: 768px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.8);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.9);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.95);
  --shadow-red: 0 0 16px var(--accent-red-glow);
  --shadow-green: 0 0 16px var(--color-green-glow);
  --shadow-yellow: 0 0 16px var(--color-yellow-glow);
}

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

html {
  font-size: 15px;
  background-color: var(--bg-app);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  font-weight: 400;
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-nav-height) + 24px + env(safe-area-inset-bottom));
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-white);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.98rem; }

p {
  color: var(--text-secondary);
}

.text-muted { color: var(--text-muted); font-size: 0.85rem; }
.text-accent { color: var(--accent-red); }
.text-success { color: var(--color-green); }
.text-warning { color: var(--color-yellow); }
.text-danger { color: var(--accent-red); }
.text-white { color: var(--color-white); }
.text-right { text-align: right; }
.font-mono {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-feature-settings: "tnum";
  font-feature-settings: "tnum";
}
.font-clean-num {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-feature-settings: "tnum";
  font-feature-settings: "tnum";
  letter-spacing: -0.01em;
}
.font-bold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-regular { font-weight: 400; }

/* SVG Icon Base */
.svg-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }
.icon-xl { width: 36px; height: 36px; }

.icon-accent {
  color: var(--accent-red);
  display: inline-flex;
  align-items: center;
}

.icon-success {
  color: var(--color-green);
  display: inline-flex;
  align-items: center;
}

.icon-warning {
  color: var(--color-yellow);
  display: inline-flex;
  align-items: center;
}

.icon-danger {
  color: var(--accent-red);
  display: inline-flex;
  align-items: center;
}

/* App Header Topbar */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  max-width: 100%;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-logo-img {
  height: 28px;
  width: auto;
  filter: drop-shadow(0 0 6px rgba(255, 0, 0, 0.5));
}

.brand-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--bg-surface);
  border: 1px solid var(--border-muted);
  color: var(--accent-red);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

/* App Main Container */
.app-container {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 16px 14px;
}

.view-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hidden {
  display: none !important;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.25s ease-out forwards;
}

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

.spin-anim {
  animation: spin 0.8s linear infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.loading-pulse {
  animation: pulse 1.5s ease-in-out infinite;
}
