:root {
  --eu-blue: #003399;
  --eu-yellow: #ffcc00;
  --accent: #0a58ca;
  --bg: #f6f9ff;
  --surface: #ffffff;
  --muted: #627d98;
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }
body {
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  background: linear-gradient(180deg, var(--bg) 0%, #eef4ff 100%);
  color: #102a43;
  display: flex;
  flex-direction: column;
}

header.site-header {
  background: linear-gradient(90deg, var(--eu-blue), var(--accent));
  color: white;
  padding: 18px 24px;
  box-shadow: 0 4px 10px rgba(3, 27, 78, 0.08);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .wrap {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

main.site-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.content {
  width: 100%;
  max-width: 980px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(2, 42, 100, 0.06);
  padding: 28px;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero .lead {
  font-size: 18px;
  color: #12303f;
  margin: 0;
}

.hero .sub {
  color: var(--muted);
  margin: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.btn {
  padding: 10px 16px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--eu-blue);
  color: var(--eu-yellow);
  box-shadow: 0 6px 18px rgba(2, 40, 100, 0.12);
}

.btn-primary:hover {
  background: #002147;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--eu-blue);
  color: var(--eu-blue);
}

.btn-outline:hover {
  background: rgba(0, 51, 153, 0.06);
}

.card {
  margin-top: 18px;
  padding: 18px;
  background: transparent;
  border-radius: 8px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

label {
  font-size: 14px;
  color: #203140;
  font-weight: 500;
}

input[type=text],
input[type=password],
input[type=email] {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #e2eefb;
  background: #fbfdff;
  font-size: 14px;
}

input[type=text]:focus,
input[type=password]:focus,
input[type=email]:focus {
  outline: none;
  border-color: var(--eu-blue);
  background: white;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

footer.site-footer {
  background: transparent;
  padding: 18px 12px;
  border-top: 1px solid rgba(0, 51, 153, 0.08);
}

.footer-wrap {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.footer-logo {
  width: 140px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  padding: 6px;
}

.back-link {
  text-decoration: none;
  color: var(--eu-blue);
  font-weight: 500;
  margin-bottom: 12px;
  display: inline-block;
}

.back-link:hover {
  text-decoration: underline;
}

.msg {
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}

.msg.error {
  background: #fee;
  color: #c00;
}

.msg.success {
  background: #efe;
  color: #0a0;
}

.step-indicator {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  align-items: center;
}

.step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e2eefb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #627d98;
  font-size: 14px;
}

.step.active {
  background: var(--eu-blue);
  color: white;
}

.step.done {
  background: #0a0;
  color: white;
}

@media (min-width: 900px) {
  .hero {
    flex-direction: row;
    align-items: center;
  }

  .hero .left {
    flex: 1;
  }

  .hero .right {
    flex: 1;
  }
}

@media (max-width: 720px) {
  .content {
    padding: 18px;
  }

  .footer-logo {
    width: 100px;
    height: 56px;
  }

  .site-title {
    font-size: 16px;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: #1f2937;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: #dc2626;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid #e5e7eb;
  justify-content: flex-end;
}

/* ============================================
   Design Tokens & Variables
   ============================================ */
:root {
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 24px;
  
  /* Border Radius - Standardized to 8px */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(2, 42, 100, 0.08);
  
  /* Status Colors */
  --status-pending: #f59e0b;
  --status-approved: #10b981;
  --status-rejected: #ef4444;
  --status-active: #3b82f6;
  --status-completed: #059669;
  --status-cancelled: #6b7280;
  --status-draft: #9ca3af;
}

/* ============================================
   Unified Status Badge Component
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Size variants */
.badge-sm {
  padding: 2px 6px;
  font-size: 10px;
}

.badge-lg {
  padding: 6px 14px;
  font-size: 14px;
}

/* Status color variants */
.badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.badge-submitted {
  background: #dbeafe;
  color: #1e40af;
}

.badge-under-review {
  background: #e0e7ff;
  color: #3730a3;
}

.badge-approved, .badge-accepted {
  background: #d1fae5;
  color: #065f46;
}

.badge-rejected, .badge-declined {
  background: #fee2e2;
  color: #991b1b;
}

.badge-active, .badge-in-progress {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-completed {
  background: #a7f3d0;
  color: #047857;
}

.badge-cancelled, .badge-withdrawn {
  background: #e5e7eb;
  color: #4b5563;
}

.badge-draft {
  background: #f3f4f6;
  color: #6b7280;
}

.badge-confirmed {
  background: #fef3c7;
  color: #d97706;
}

.badge-ready {
  background: #c7d2fe;
  color: #4338ca;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-error, .badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
}

.badge-neutral {
  background: #f3f4f6;
  color: #4b5563;
}

/* ============================================
   Data Table Component
   ============================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.data-table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Sortable headers */
.data-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.data-table th.sortable:hover {
  background: #f1f5f9;
}

/* Empty state */
.data-table-empty {
  text-align: center;
  padding: 48px 24px;
  color: #64748b;
}

/* ============================================
   Card Component Improvements
   ============================================ */
.card-elevated {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--spacing-lg);
}

.card-flat {
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  padding: var(--spacing-lg);
}

/* ============================================
   Button Improvements
   ============================================ */
.btn-danger {
  background: #dc2626;
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-success {
  background: #059669;
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-success:hover {
  background: #047857;
}

.btn-secondary {
  background: #6b7280;
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: #4b5563;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-lg {
  padding: 14px 24px;
  font-size: 16px;
  border-radius: 12px;
}

/* ============================================
   Form Improvements
   ============================================ */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: var(--spacing-xs);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-md);
  font-size: 14px;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--eu-blue);
  box-shadow: 0 0 0 3px rgba(0, 51, 153, 0.1);
}

.form-help {
  font-size: 12px;
  color: #6b7280;
  margin-top: var(--spacing-xs);
}

.form-error {
  font-size: 12px;
  color: #dc2626;
  margin-top: var(--spacing-xs);
}

/* ============================================
   Alert Component
   ============================================ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 12px; }
.text-lg { font-size: 18px; }

.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); }

.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); }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--spacing-sm); }
.gap-2 { gap: var(--spacing-md); }
.gap-3 { gap: var(--spacing-lg); }
