@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
  /* Colors */
  --primary: #0F172A;
  --primary-hover: #1E293B;
  --accent: #0F172A;
  --accent-hover: #1E293B;
  --success: #16A34A;
  --warning: #D97706;
  --danger: #DC2626;
  --background: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --text-primary: #0F172A;
  --text-secondary: #64748B;
  --text-disabled: #94A3B8;
  --surface-dim: #E2E8F0;
  --surface-bright: #FFFFFF;
  --surface-container-lowest: #FFFFFF;
  --surface-container-low: #F8FAFC;
  --surface-container: #F1F5F9;
  --surface-container-high: #E2E8F0;
  --surface-container-highest: #CBD5E1;
  --on-surface: #0F172A;
  --on-surface-variant: #475569;
  --inverse-surface: #1E293B;
  --inverse-on-surface: #F8FAFC;
  --outline: #94A3B8;
  --outline-variant: #CBD5E1;
  --surface-tint: #0F172A;
  --on-primary: #FFFFFF;
  --primary-container: #1E293B;
  --on-primary-container: #F8FAFC;
  --inverse-primary: #CBD5E1;
  --secondary: #0F172A;
  --on-secondary: #FFFFFF;
  --secondary-container: #1E293B;
  --on-secondary-container: #F8FAFC;
  --tertiary: #0F172A;
  --on-tertiary: #FFFFFF;
  --tertiary-container: #1E293B;
  --on-tertiary-container: #F8FAFC;
  --error: #DC2626;
  --on-error: #FFFFFF;
  --error-container: #FEE2E2;
  --on-error-container: #991B1B;
  --primary-fixed: #E2E8F0;
  --primary-fixed-dim: #CBD5E1;
  --on-primary-fixed: #0F172A;
  --on-primary-fixed-variant: #334155;
  --secondary-fixed: #E2E8F0;
  --secondary-fixed-dim: #CBD5E1;
  --on-secondary-fixed: #0F172A;
  --on-secondary-fixed-variant: #334155;
  --tertiary-fixed: #E2E8F0;
  --tertiary-fixed-dim: #CBD5E1;
  --on-tertiary-fixed: #0F172A;
  --on-tertiary-fixed-variant: #334155;
  --on-background: #0F172A;
  --surface-variant: #F1F5F9;
  --text-muted: #94A3B8;

  /* Typography */
  --font-family: 'Inter', system-ui, sans-serif;
  --h-xl: 36px;
  --h-l: 30px;
  --h-m: 24px;
  --h-s: 20px;
  --body: 14px;
  --small: 13px;
  --caption: 12px;

  /* Spacing */
  --base: 4px;
  --xs: 4px;
  --sm: 8px;
  --md: 12px;
  --lg: 16px;
  --xl: 24px;

  /* Roundness */
  --rounded-sm: 0.125rem;
  --rounded: 0.25rem;
  --rounded-md: 0.375rem;
  --rounded-lg: 0.5rem;
  --rounded-xl: 0.75rem;
  --rounded-full: 9999px;
  
  --radius-input: 6px;
  --radius-card: 8px;
  --radius-modal: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 8px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.10);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--background);
  color: var(--text-primary);
  font-size: var(--body);
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--md);
}

h1 { font-size: var(--h-xl); line-height: 1.2; letter-spacing: -0.02em; }
h2 { font-size: var(--h-l); line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: var(--h-m); line-height: 1.3; }

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

a {
  color: var(--text-primary);
  text-decoration: underline;
  cursor: pointer;
}

/* Compact First UI Components */
.input-group {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--md);
}

.input-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.input-field {
  height: 36px;
  padding: 0 var(--sm);
  font-family: var(--font-family);
  font-size: var(--body);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background-color: var(--surface);
  color: var(--text-primary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--primary-fixed);
}

.input-field::placeholder {
  color: var(--text-disabled);
}

/* Select */
select.input-field {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  padding-right: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 var(--lg);
  font-family: var(--font-family);
  font-size: var(--body);
  font-weight: 500;
  border-radius: var(--radius-input);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--on-primary);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-outline {
  background-color: var(--surface);
  border-color: var(--border);
  color: var(--text-primary);
}

.btn-outline:hover {
  background-color: var(--surface-container-lowest);
  border-color: var(--outline-variant);
}

.btn-block {
  width: 100%;
}

.card {
  background-color: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  padding: var(--xl);
}

/* 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-sm { gap: var(--sm); }
.gap-md { gap: var(--md); }
.gap-lg { gap: var(--lg); }

.w-full { width: 100%; }
.h-screen { height: 100vh; }

.text-center { text-align: center; }
.text-sm { font-size: var(--small); }
.text-muted { color: var(--text-muted); }

/* Split Screen Layout (Register) */
.split-layout {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}

.split-left {
  flex: 1;
  background-color: var(--primary);
  color: var(--on-primary);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.split-right {
  flex: 1;
  background-color: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.register-container {
  width: 100%;
  max-width: 420px;
}

/* Center Layout (Login) */
.center-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: radial-gradient(circle at 50% -20%, #E2E8F0 0%, var(--background) 100%);
}

.login-card-container {
  width: 100%;
  max-width: 400px;
  margin-top: var(--lg);
}

/* Brand Link (Clean Isotipo + Wordmark) */
a.brand-link,
a.brand-link:hover,
a.brand-link:focus,
a.brand-link:active {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  cursor: pointer;
  user-select: none;
  outline: none;
}

.brand-link .brand-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: block;
}

.brand-link .brand-text {
  font-family: 'Exo 2', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none !important;
}

/* Light Background: Dark text and dark icon */
.brand-link-dark .brand-icon {
  color: #0F172A;
  fill: currentColor;
}
.brand-link-dark .brand-text {
  color: #0F172A;
}

/* Dark Background: White text and white icon */
.brand-link-light .brand-icon {
  color: #FFFFFF;
  fill: currentColor;
}
.brand-link-light .brand-text {
  color: #FFFFFF;
}


.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: var(--xl) 0;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.divider:not(:empty)::before {
  margin-right: var(--md);
}
.divider:not(:empty)::after {
  margin-left: var(--md);
}
.divider-text {
  font-size: var(--caption);
  color: var(--text-disabled);
  text-transform: uppercase;
}

/* Responsiveness */
@media (max-width: 900px) {
  .split-layout {
    flex-direction: column;
  }
  .split-left {
    padding: 40px 24px;
    flex: none; /* Let it size to its content */
  }
  .split-right {
    padding: 32px 24px;
  }
}

/* Alerts & Validation Summaries */
.alert-danger,
.validation-summary-errors {
  color: var(--danger);
  font-size: 13px;
  line-height: 1.4;
}

.alert-danger ul,
.validation-summary-errors ul,
.text-danger ul {
  list-style-position: inside;
  padding: 0;
  margin: 0;
}

.alert-danger li,
.validation-summary-errors li,
.text-danger li {
  line-height: 1.4;
}

