/* SPDX-License-Identifier: Apache-2.0
/* Copyright (c) 2025 OrchIntel Systems Ltd.
/* https://orchintel.com | https://ioa.systems
/*
/* Part of IOA Core (Open Source Edition). See LICENSE at repo root.
*/

/* IOA Design System Integration for Trust Portal - Self-Contained */

/* CSS Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--color-bg, #f8fafc);
  color: var(--color-fg, #1f2937);
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif);
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* OrchIntel Theme - Base Styles */
:root {
  /* Primary Colors */
  --color-primary-50: #eff6ff;
  --color-primary-100: #dbeafe;
  --color-primary-200: #bfdbfe;
  --color-primary-300: #93c5fd;
  --color-primary-400: #60a5fa;
  --color-primary-500: #3b82f6;
  --color-primary-600: #2563eb;
  --color-primary-700: #1d4ed8;
  --color-primary-800: #1e40af;
  --color-primary-900: #1e3a8a;

  /* Secondary Colors */
  --color-secondary-50: #f8fafc;
  --color-secondary-100: #f1f5f9;
  --color-secondary-200: #e2e8f0;
  --color-secondary-300: #cbd5e1;
  --color-secondary-400: #94a3b8;
  --color-secondary-500: #64748b;
  --color-secondary-600: #475569;
  --color-secondary-700: #334155;
  --color-secondary-800: #1e293b;
  --color-secondary-900: #0f172a;

  /* Accent Colors */
  --color-accent-50: #f0f9ff;
  --color-accent-100: #e0f2fe;
  --color-accent-200: #bae6fd;
  --color-accent-300: #7dd3fc;
  --color-accent-400: #38bdf8;
  --color-accent-500: #0ea5e9;
  --color-accent-600: #0284c7;
  --color-accent-700: #0369a1;
  --color-accent-800: #075985;
  --color-accent-900: #0c4a6e;

  /* Status Colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;

  /* Typography */
  --font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-family-mono: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  --spacing-4xl: 6rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;

  /* Layout */
  --container-max-width: 1312px;
  --container-padding: 1.5rem;
  --header-height: 4rem;

  /* Trust Portal Specific Overrides */
  --trust-primary: var(--color-primary-600);
  --trust-secondary: var(--color-secondary-100);
  --trust-text: var(--color-secondary-800);
  --trust-text-muted: var(--color-secondary-600);
  --trust-border: var(--color-secondary-200);
  --trust-success: var(--color-success);
  --trust-warning: var(--color-warning);
  --trust-error: var(--color-error);
}

/* Container */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
}

/* Typography */
body {
  font-family: var(--font-family-sans);
  line-height: 1.6;
  color: var(--trust-text);
  background-color: var(--color-secondary-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 1rem 0;
  font-weight: 600;
  line-height: 1.2;
  color: var(--trust-text);
}

h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  line-height: 1.15;
}

h3 {
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 700;
  line-height: 1.2;
}

p {
  margin: 0 0 1rem 0;
  color: var(--trust-text-muted);
  line-height: 1.6;
}

a {
  color: var(--trust-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-700);
  text-decoration: underline;
}

/* Badge styling for CI status */
.ci-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--trust-border);
  transition: all 0.2s ease;
}

.ci-badge:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Status indicators */
.status-operational {
  color: var(--trust-success);
  font-weight: 600;
}

.status-warning {
  color: var(--trust-warning);
  font-weight: 600;
}

.status-error {
  color: var(--trust-error);
  font-weight: 600;
}

/* Button styles */
button {
  background: var(--trust-primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

button:hover {
  background: var(--color-primary-700);
}

/* Card styles */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--trust-border);
  padding: var(--spacing-lg);
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.p-1 { padding: var(--spacing-sm); }
.p-2 { padding: var(--spacing-md); }
.p-3 { padding: var(--spacing-lg); }
.p-4 { padding: var(--spacing-xl); }

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--spacing-md);
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
}