/* SempreID Platform - Base Styles */
/* NIM Theme with #0674bb and grey shades */

:root {
  /* Primary Colors */
  --nim-primary: #0674bb;
  --nim-primary-dark: #054d8a;
  --nim-primary-light: #3a92d0;
  
  /* Grey Shades */
  --grey-900: #1a1a1a;
  --grey-800: #2d2d2d;
  --grey-700: #404040;
  --grey-600: #595959;
  --grey-500: #737373;
  --grey-400: #999999;
  --grey-300: #b3b3b3;
  --grey-200: #d9d9d9;
  --grey-100: #f0f0f0;
  
  /* Functional Colors */
  --white: #ffffff;
  --success: #28a745;
  --warning: #ffc107;
  --error: #dc3545;
  
  /* Typography */
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Courier New', Courier, monospace;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;
  
  /* Borders */
  --border-radius: 4px;
  --border-radius-lg: 8px;
  --border-width: 1px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  color: var(--grey-900);
  background-color: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--grey-900);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
}

a {
  color: var(--nim-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* Lists */
ul, ol {
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-xl);
}

li {
  margin-bottom: var(--spacing-xs);
}

/* Code */
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.125rem 0.25rem;
  background-color: var(--grey-100);
  border-radius: 3px;
}

pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  padding: var(--spacing-md);
  background-color: var(--grey-100);
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin-bottom: var(--spacing-md);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--spacing-md);
}

th, td {
  padding: var(--spacing-sm);
  text-align: left;
  border-bottom: var(--border-width) solid var(--grey-200);
}

th {
  font-weight: 600;
  background-color: var(--grey-100);
}

/* Forms */
label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  color: var(--grey-700);
}

input, textarea, select {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 1rem;
  font-family: inherit;
  border: var(--border-width) solid var(--grey-300);
  border-radius: var(--border-radius);
  background-color: var(--white);
  transition: border-color var(--transition-fast);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--nim-primary);
  box-shadow: 0 0 0 3px rgba(6, 116, 187, 0.1);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

/* Buttons */
button {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  padding: var(--spacing-sm) var(--spacing-lg);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Utility Classes */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

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

.text-muted {
  color: var(--grey-600);
}

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

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

.pt-sm { padding-top: var(--spacing-sm); }
.pt-md { padding-top: var(--spacing-md); }
.pt-lg { padding-top: var(--spacing-lg); }
.pt-xl { padding-top: var(--spacing-xl); }

.pb-sm { padding-bottom: var(--spacing-sm); }
.pb-md { padding-bottom: var(--spacing-md); }
.pb-lg { padding-bottom: var(--spacing-lg); }
.pb-xl { padding-bottom: var(--spacing-xl); }

/* Loading State */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--grey-300);
  border-top-color: var(--nim-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}