/* LegalEye Design System — White + #2563EB */
:root {
  --le-primary: #2563EB;
  --le-primary-hover: #1d4ed8;
  --le-primary-soft: rgba(37, 99, 235, 0.08);
  --le-primary-muted: rgba(37, 99, 235, 0.15);
  --le-bg: #ffffff;
  --le-bg-subtle: #f8fafc;
  --le-bg-elevated: #ffffff;
  --le-surface: #ffffff;
  --le-border: #e2e8f0;
  --le-border-strong: #cbd5e1;
  --le-text: #0f172a;
  --le-text-muted: #64748b;
  --le-text-soft: #94a3b8;
  --le-success: #059669;
  --le-warning: #d97706;
  --le-danger: #dc2626;
  --le-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --le-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --le-shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
  --le-radius: 12px;
  --le-radius-lg: 16px;
  --le-max-width: 1140px;
  --le-header-h: 72px;
  --le-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --le-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

[data-theme="dark"] {
  --le-primary: #3b82f6;
  --le-primary-hover: #60a5fa;
  --le-primary-soft: rgba(59, 130, 246, 0.12);
  --le-primary-muted: rgba(59, 130, 246, 0.22);
  --le-bg: #0b1120;
  --le-bg-subtle: #0f172a;
  --le-bg-elevated: #1e293b;
  --le-surface: #1e293b;
  --le-border: #334155;
  --le-border-strong: #475569;
  --le-text: #f1f5f9;
  --le-text-muted: #94a3b8;
  --le-text-soft: #64748b;
  --le-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --le-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --le-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.le-body {
  font-family: var(--le-font);
  background: var(--le-bg-subtle);
  color: var(--le-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.le-container {
  width: 100%;
  max-width: var(--le-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.le-header {
  background: var(--le-bg);
  border-bottom: 1px solid var(--le-border);
  transition: box-shadow 0.2s ease, background 0.2s ease;
  z-index: 1030;
}

.le-header.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  box-shadow: var(--le-shadow-sm);
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--le-bg) 92%, transparent);
}

body.has-sticky-header { padding-top: var(--le-header-h); }

.le-brand {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--le-text) !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.le-brand span { color: var(--le-primary); }

.le-nav-link {
  color: var(--le-text-muted) !important;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.5rem 0.75rem !important;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.le-nav-link:hover,
.le-nav-link.active {
  color: var(--le-primary) !important;
  background: var(--le-primary-soft);
}

.le-card {
  background: var(--le-surface);
  border: 1px solid var(--le-border);
  border-radius: var(--le-radius);
  box-shadow: var(--le-shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.le-card:hover { box-shadow: var(--le-shadow); }

.le-card-interactive:hover {
  border-color: var(--le-primary-muted);
  transform: translateY(-2px);
}

.le-card-body { padding: 1.25rem 1.5rem; }

.le-card-title {
  font-weight: 600;
  font-size: 1.0625rem;
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.le-card-title a { color: var(--le-text); text-decoration: none; }
.le-card-title a:hover { color: var(--le-primary); }

.btn-le-primary {
  background: var(--le-primary);
  border-color: var(--le-primary);
  color: #fff;
  font-weight: 600;
  border-radius: 10px;
  padding: 0.625rem 1.25rem;
}

.btn-le-primary:hover,
.btn-le-primary:focus {
  background: var(--le-primary-hover);
  border-color: var(--le-primary-hover);
  color: #fff;
}

.btn-le-outline {
  border: 1px solid var(--le-border-strong);
  color: var(--le-text);
  background: transparent;
  font-weight: 500;
  border-radius: 10px;
}

.btn-le-outline:hover {
  border-color: var(--le-primary);
  color: var(--le-primary);
  background: var(--le-primary-soft);
}

.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--le-border);
  background: var(--le-bg);
  color: var(--le-text-muted);
  transition: all 0.15s;
}

.btn-icon:hover {
  border-color: var(--le-primary);
  color: var(--le-primary);
  background: var(--le-primary-soft);
}

.le-hero {
  background: linear-gradient(165deg, var(--le-bg) 0%, var(--le-primary-soft) 45%, var(--le-bg-subtle) 100%);
  padding: 3.5rem 0 4rem;
  border-bottom: 1px solid var(--le-border);
}

[data-theme="dark"] .le-hero {
  background: linear-gradient(165deg, var(--le-bg) 0%, rgba(37, 99, 235, 0.08) 50%, var(--le-bg-subtle) 100%);
}

.le-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.le-hero-sub {
  color: var(--le-text-muted);
  font-size: 1.125rem;
  max-width: 36rem;
  margin: 0 auto 2rem;
}

.le-search-wrap { position: relative; max-width: 720px; margin: 0 auto; }

.le-search-input {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3rem;
  font-size: 1.0625rem;
  border: 2px solid var(--le-border);
  border-radius: var(--le-radius-lg);
  background: var(--le-bg);
  color: var(--le-text);
  box-shadow: var(--le-shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.le-search-input:focus {
  outline: none;
  border-color: var(--le-primary);
  box-shadow: 0 0 0 4px var(--le-primary-soft), var(--le-shadow);
}

.le-search-icon {
  position: absolute;
  left: 1.125rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--le-text-soft);
  pointer-events: none;
  z-index: 2;
}

.le-suggest-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--le-bg-elevated);
  border: 1px solid var(--le-border);
  border-radius: var(--le-radius);
  box-shadow: var(--le-shadow-lg);
  max-height: 320px;
  overflow-y: auto;
  z-index: 1050;
  display: none;
}

.le-suggest-dropdown.is-open { display: block; }

.le-suggest-item {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--le-text);
  border-bottom: 1px solid var(--le-border);
  transition: background 0.12s;
}

.le-suggest-item:last-child { border-bottom: none; }
.le-suggest-item:hover,
.le-suggest-item.is-active { background: var(--le-primary-soft); }

.le-suggest-item small {
  display: block;
  color: var(--le-text-muted);
  font-size: 0.8125rem;
  margin-top: 0.15rem;
}

.le-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 999px;
  background: var(--le-bg);
  border: 1px solid var(--le-border);
  color: var(--le-text-muted);
  text-decoration: none;
  transition: all 0.15s;
}

.le-chip:hover {
  border-color: var(--le-primary);
  color: var(--le-primary);
  background: var(--le-primary-soft);
}

.le-section { padding: 3rem 0; }
.le-section-alt { background: var(--le-bg); }

.le-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.le-section-desc { color: var(--le-text-muted); margin-bottom: 1.75rem; }

.le-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: var(--le-primary-soft);
  color: var(--le-primary);
}

.le-meta { font-size: 0.8125rem; color: var(--le-text-muted); }
.le-meta i { opacity: 0.7; }

.le-judgment-body {
  font-family: var(--le-serif);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--le-text);
}

.le-judgment-body mark.le-highlight {
  background: rgba(250, 204, 21, 0.45);
  padding: 0 2px;
  border-radius: 2px;
}

[data-theme="dark"] .le-judgment-body mark.le-highlight {
  background: rgba(250, 204, 21, 0.25);
  color: var(--le-text);
}

.le-ai-panel {
  border-left: 3px solid var(--le-primary);
  background: var(--le-primary-soft);
  border-radius: 0 var(--le-radius) var(--le-radius) 0;
  padding: 1.25rem;
}

.le-footer {
  background: var(--le-bg);
  border-top: 1px solid var(--le-border);
  margin-top: auto;
  padding: 3rem 0 1.5rem;
}

.le-footer a {
  color: var(--le-text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
}

.le-footer a:hover { color: var(--le-primary); }

.form-control, .form-select {
  background: var(--le-bg);
  border-color: var(--le-border);
  color: var(--le-text);
  border-radius: 10px;
}

.form-control:focus, .form-select:focus {
  background: var(--le-bg);
  border-color: var(--le-primary);
  color: var(--le-text);
  box-shadow: 0 0 0 3px var(--le-primary-soft);
}

[data-theme="dark"] .form-control::placeholder { color: var(--le-text-soft); }

.le-admin-wrap {
  display: flex;
  min-height: 100vh;
  background: var(--le-bg-subtle);
}

.le-admin-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--le-bg);
  border-right: 1px solid var(--le-border);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.le-admin-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1.25rem;
  color: var(--le-text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}

.le-admin-nav a:hover,
.le-admin-nav a.active {
  color: var(--le-primary);
  background: var(--le-primary-soft);
  border-left-color: var(--le-primary);
}

.le-admin-main { flex: 1; padding: 1.75rem 2rem; min-width: 0; }

.le-stat-card { text-align: center; padding: 1.25rem; }
.le-stat-card .value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--le-primary);
  line-height: 1.2;
}
.le-stat-card .label { font-size: 0.8125rem; color: var(--le-text-muted); margin-top: 0.25rem; }

.le-workspace-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--le-border);
}

.le-workspace-nav a {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--le-text-muted);
  text-decoration: none;
  border: 1px solid transparent;
}

.le-workspace-nav a:hover,
.le-workspace-nav a.active {
  color: var(--le-primary);
  background: var(--le-primary-soft);
  border-color: var(--le-primary-muted);
}

.le-plan-card { height: 100%; position: relative; }
.le-plan-card.featured {
  border-color: var(--le-primary);
  box-shadow: 0 0 0 1px var(--le-primary), var(--le-shadow);
}

.le-plan-price {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.le-plan-price small {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--le-text-muted);
}

.table-le { --bs-table-bg: transparent; color: var(--le-text); }
.table-le thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--le-text-muted);
  border-bottom-color: var(--le-border);
  font-weight: 600;
}
.table-le td { border-color: var(--le-border); vertical-align: middle; }

.alert { border-radius: var(--le-radius); border: none; }

.pagination .page-link {
  border-radius: 8px !important;
  margin: 0 2px;
  color: var(--le-text-muted);
  border-color: var(--le-border);
  background: var(--le-bg);
}

.pagination .page-item.active .page-link {
  background: var(--le-primary);
  border-color: var(--le-primary);
}

@media print {
  .le-header, .le-footer, .le-no-print, .le-judgment-actions { display: none !important; }
  body.le-body { background: #fff; color: #000; }
  .le-judgment-body { font-size: 11pt; }
}

@media (max-width: 991.98px) {
  .le-admin-sidebar {
    position: fixed;
    left: -280px;
    z-index: 1040;
    transition: left 0.25s;
    box-shadow: var(--le-shadow-lg);
  }
  .le-admin-sidebar.is-open { left: 0; }
  .le-admin-main { padding: 1rem; }
}
