/* Signal Sentinel Dashboard - Compiled CSS */
/* This is a pre-built version. For development, run: npm run css:watch */

/* Reset and base styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: #0d0f1f;
  color: #eee;
  font-size: 0.9rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Page-level headings (trading-dashboard style) */
h1, .h1 {
  font-size: 1.6rem;
  font-weight: 600;
  color: #eee;
  margin: 0 0 4px 0;
}

h2, .h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #eee;
  margin: 0;
}

/* Small uppercase label (reusable) */
.eyebrow {
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 6px 0;
}

/* Large hero metric */
.metric {
  font-size: 2rem;
  font-weight: 700;
  color: #eee;
  line-height: 1.1;
}

.metric.positive { color: #2ecc71; }
.metric.negative { color: #e74c3c; }

.metric-label {
  font-size: 0.8rem;
  color: #888;
  margin-top: 4px;
}

/* Theme colors - Trading dashboard palette (navy + blue) */
:root {
  --sentinel-primary: #3498db;
  --sentinel-primary-dark: #2980b9;
  --sentinel-secondary: #1a1a2e;
  --sentinel-accent: #2ecc71;
  --sentinel-warning: #f39c12;
  --sentinel-danger: #e74c3c;
  --sentinel-caution: #f1c40f;

  /* Dark navy theme surfaces (matching trading dashboard) */
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-tertiary: #1a1a2e;
  --text-primary: #eee;
  --text-secondary: #aaa;
  --text-muted: #888;
  --text-subtle: #666;
  --border-color: #333;
  --card-bg: #16213e;
  --input-bg: #1a1a2e;
}

/* Dark mode (same palette - this is a dark-first design) */
html.dark {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-tertiary: #1a1a2e;
  --text-primary: #eee;
  --text-secondary: #aaa;
  --text-muted: #888;
  --text-subtle: #666;
  --border-color: #333;
  --card-bg: #16213e;
  --input-bg: #1a1a2e;
}

html.dark body {
  background-color: #0d0f1f;
  color: var(--text-primary);
}

html.dark .card {
  background-color: var(--card-bg);
  border-color: #2a3555;
}

html.dark .card-header {
  border-color: var(--border-color);
}

html.dark .card-footer {
  background-color: var(--bg-tertiary);
  border-color: var(--border-color);
}

html.dark .input {
  background-color: var(--input-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
}

html.dark .input:focus {
  border-color: var(--sentinel-primary);
}

html.dark .top-bar {
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
}

html.dark .text-gray-500 { color: var(--text-muted); }
html.dark .text-gray-600 { color: var(--text-secondary); }
html.dark .text-gray-700 { color: var(--text-secondary); }
html.dark .text-gray-900 { color: var(--text-primary); }
html.dark .bg-white { background-color: var(--bg-secondary); }
html.dark .bg-gray-50 { background-color: var(--bg-primary); }
html.dark .bg-gray-100 { background-color: var(--bg-tertiary); }
html.dark .border { border-color: var(--border-color); }
html.dark .border-t { border-color: var(--border-color); }
html.dark .border-b { border-color: var(--border-color); }

html.dark .btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

html.dark .btn-secondary:hover:not(:disabled) {
  background-color: #4b5563;
}

html.dark .btn-outline {
  border-color: var(--border-color);
  color: var(--text-secondary);
}

html.dark .btn-outline:hover:not(:disabled) {
  background-color: var(--bg-tertiary);
}

html.dark .label {
  color: var(--text-secondary);
}

html.dark .alert-error {
  background-color: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

html.dark .alert-warning {
  background-color: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
}

html.dark .alert-success {
  background-color: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
}

html.dark .alert-info {
  background-color: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

/* Login page dark mode */
html.dark .login-card {
  background: var(--bg-secondary);
}

html.dark .login-header h1 {
  color: var(--text-primary);
}

html.dark .login-header p {
  color: var(--text-muted);
}

html.dark .login-footer {
  border-color: var(--border-color);
}

html.dark .login-footer p {
  color: var(--text-muted);
}

/* Button component */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--sentinel-primary);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--sentinel-primary-dark);
}

.btn-secondary {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--border-color);
}

.btn-danger {
  background-color: var(--sentinel-danger);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background-color: #c0392b;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-outline:hover:not(:disabled) {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Card component - trading-dashboard style (flat, generous padding) */
.card {
  background-color: var(--card-bg);
  border-radius: 12px;
  border: 1px solid #2a3555;
  color: var(--text-primary);
  padding: 20px;
  transition: border-color 0.15s, transform 0.1s;
}

.card.clickable,
a.card {
  cursor: pointer;
}

.card.clickable:hover,
a.card:hover {
  border-color: #3498db;
}

.card-header {
  padding: 0 0 12px 0;
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

.card-body {
  padding: 0;
}

.card-footer {
  padding: 12px 0 0 0;
  margin-top: 12px;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: #888;
}

/* Form inputs */
.input {
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  background-color: var(--input-bg);
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus {
  outline: none;
  border-color: var(--sentinel-primary);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.input-error {
  border-color: var(--sentinel-danger);
}

.input-error:focus {
  border-color: var(--sentinel-danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

/* Badge component */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background-color: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
}

.badge-warning {
  background-color: rgba(243, 156, 18, 0.2);
  color: #f39c12;
}

.badge-danger {
  background-color: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
}

.badge-info {
  background-color: rgba(52, 152, 219, 0.2);
  color: #3498db;
}

/* Tier badges */
.tier-professional {
  background-color: rgba(52, 152, 219, 0.2);
  color: #3498db;
}

.tier-enterprise {
  background-color: rgba(155, 89, 182, 0.2);
  color: #9b59b6;
}

.tier-defence {
  background-color: rgba(243, 156, 18, 0.2);
  color: #f39c12;
}

/* Status indicators */
.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  display: inline-block;
}

.status-healthy { background-color: #2ecc71; }
.status-warning { background-color: #f39c12; }
.status-error { background-color: #e74c3c; }
.status-unknown { background-color: #888; }

/* Pulse animation for live indicators */
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Alert component */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 0.5rem;
}

.alert-error {
  background-color: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.4);
  color: #e74c3c;
}

.alert-warning {
  background-color: rgba(243, 156, 18, 0.1);
  border: 1px solid rgba(243, 156, 18, 0.4);
  color: #f39c12;
}

.alert-success {
  background-color: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.4);
  color: #2ecc71;
}

.alert-info {
  background-color: rgba(52, 152, 219, 0.1);
  border: 1px solid rgba(52, 152, 219, 0.4);
  color: #3498db;
}

/* Layout utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Spacing utilities */
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }

/* Text utilities */
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-gray-500 { color: var(--text-muted); }
.text-gray-600 { color: var(--text-secondary); }
.text-gray-700 { color: var(--text-secondary); }
.text-gray-900 { color: var(--text-primary); }
.text-white { color: var(--text-primary); }
.text-center { text-align: center; }

/* Width utilities */
.w-full { width: 100%; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }

/* Background utilities */
.bg-white { background-color: var(--card-bg); }
.bg-gray-50 { background-color: var(--bg-primary); }
.bg-gray-100 { background-color: var(--bg-tertiary); }

/* Border utilities */
.border { border: 1px solid var(--border-color); }
.border-t { border-top: 1px solid var(--border-color); }
.border-b { border-bottom: 1px solid var(--border-color); }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }

/* Shadow utilities */
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.shadow { box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05); }

/* Grid utilities */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Responsive grid */
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* (Old sidebar layout removed - now using top nav in MainLayout.razor.css) */

/* Responsive typography */
@media (max-width: 640px) {
  .text-2xl { font-size: 1.25rem; }
  .text-xl { font-size: 1.125rem; }
  .text-lg { font-size: 1rem; }
  
  .card-body { padding: 1rem; }
  .card-header { padding: 0.75rem 1rem; }
}

/* Responsive utilities */
.hidden { display: none; }

@media (min-width: 640px) {
  .sm\:inline { display: inline; }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:col-span-1 { grid-column: span 1; }
  .lg\:col-span-3 { grid-column: span 3; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Navigation menu */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-logo {
  width: 2rem;
  height: 2rem;
}

.nav-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.nav-menu {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 1.5rem;
}

.nav-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 1rem;
  margin-bottom: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: all 0.2s;
}

.nav-link:hover {
  background-color: rgba(255,255,255,0.1);
  color: white;
}

.nav-link.active {
  background-color: rgba(255,255,255,0.15);
  color: white;
  border-left: 3px solid var(--sentinel-primary);
  padding-left: calc(1rem - 3px);
}

.nav-icon {
  font-size: 1.125rem;
  width: 1.5rem;
  text-align: center;
}

.nav-footer {
  padding: 1rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Login page */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 1.25rem;
}

.login-card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  padding: 2.5rem;
  width: 100%;
  max-width: 26rem;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 0.5rem 0;
}

.login-header p {
  font-size: 0.875rem;
  color: #aaaaaa;
  margin: 0;
}

.login-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.login-footer p {
  font-size: 0.75rem;
  color: #9ca3af;
  margin: 0.25rem 0;
}

/* Misc */
.min-h-screen { min-height: 100vh; }
.h-16 { height: 4rem; }
.w-16 { width: 4rem; }

/* Blazor specific */
#blazor-error-ui {
  background: #ffcccc;
  bottom: 0;
  display: none;
  left: 0;
  padding: 1rem;
  position: fixed;
  right: 0;
  z-index: 1000;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  float: right;
}
