/* ── Fortus Portal CSS ── */

:root {
  /* Fortus branding — exact van fortus.nl */
  --primary-color: #292556; /* Navy (donkere secties) */
  --accent-color: #008691; /* Teal (links, CTA's) */
  --gold-color: #FCB140; /* Warm goud (highlights) */
  --text-dark: #000000; /* Zwart (headings) */
  --text-light: #54595F; /* Grijs (subtekst) */
  --bg-light: #EFF9FA; /* Licht teal achtergrond */
  --bg-white: #ffffff;
  --border-light: #EBEBEB;
  --error-color: #e53e3e;
  --success-color: #38a169;
  --warning-color: #f0ad4e;
  --teal-hover: #088D88;
  
  /* Typography — Raleway van fortus.nl */
  --font-sans: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

html {
  font-size: 16px;
  line-height: 1.6;
}

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ── */
h1 { font-size: var(--font-size-3xl); font-weight: 700; margin-bottom: var(--space-4); color: var(--primary-color); }
h2 { font-size: var(--font-size-2xl); font-weight: 600; margin-bottom: var(--space-3); color: var(--primary-color); }
h3 { font-size: var(--font-size-xl); font-weight: 600; margin-bottom: var(--space-2); }
h4 { font-size: var(--font-size-lg); font-weight: 500; margin-bottom: var(--space-2); }

p { margin-bottom: var(--space-3); color: var(--text-light); }
small { font-size: var(--font-size-sm); color: var(--text-light); }

/* ── Layout ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  padding: var(--space-4) 0;
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.main {
  flex: 1;
  padding: var(--space-8) 0;
}

.footer {
  background: var(--primary-color);
  color: var(--bg-white);
  padding: var(--space-6) 0;
  text-align: center;
  font-size: var(--font-size-sm);
}

.footer a { color: var(--gold-color); }

/* ── Cards ── */
.card {
  background: var(--bg-white);
  border-radius: 8px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-base);
  overflow: hidden;
}

.card-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-light);
}

.card-body {
  padding: var(--space-6);
}

.card-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-light);
  background: var(--bg-light);
}

/* ── Forms ── */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--text-dark);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: var(--font-size-base);
  background: var(--bg-white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(27, 42, 74, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-error {
  color: var(--error-color);
  font-size: var(--font-size-sm);
  margin-top: var(--space-1);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-base);
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  min-height: 44px; /* Touch target */
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent-color);
  color: var(--bg-white);
}

.btn-primary:hover:not(:disabled) {
  background: var(--teal-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--accent-color);
  color: var(--bg-white);
}

.btn-accent {
  background: var(--gold-color);
  color: var(--text-dark);
  font-weight: 600;
}

.btn-accent:hover:not(:disabled) {
  background: #e5a039;
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-lg);
  min-height: 52px;
}

.btn-full {
  width: 100%;
}

/* ── Progress & Status ── */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  transition: width 0.3s ease;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-xs);
  font-weight: 500;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-primary { background: var(--primary-color); color: var(--bg-white); }
.badge-accent { background: var(--accent-color); color: var(--bg-white); }
.badge-success { background: var(--success-color); color: var(--bg-white); }
.badge-warning { background: var(--warning-color); color: var(--bg-white); }
.badge-error { background: var(--error-color); color: var(--bg-white); }

/* ── Layout utilities ── */
.text-center { text-align: center; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }

/* ── Responsive Grid ── */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }

/* ── Alerts ── */
.alert {
  padding: var(--space-4);
  border-radius: 6px;
  margin-bottom: var(--space-4);
}

.alert-info {
  background: #ebf8ff;
  color: #2b6cb0;
  border-left: 4px solid #3182ce;
}

.alert-success {
  background: #f0fff4;
  color: #22543d;
  border-left: 4px solid var(--success-color);
}

.alert-warning {
  background: #fffbf0;
  color: #744210;
  border-left: 4px solid var(--warning-color);
}

.alert-error {
  background: #fed7d7;
  color: #742a2a;
  border-left: 4px solid var(--error-color);
}

/* ── Loading States ── */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ── Responsive Design ── */
@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-6);
  }
  
  .grid-cols-md-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-md-3 { grid-template-columns: repeat(3, 1fr); }
  
  .btn-md-auto {
    width: auto;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 var(--space-8);
  }
  
  .grid-cols-lg-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ── Animation & Transitions ── */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Step Wizard ── */
.wizard-steps {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-8);
  padding: 0 var(--space-4);
  overflow-x: auto;
}

.wizard-step {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: var(--space-2);
}

.wizard-step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--font-size-sm);
  background: var(--border-light);
  color: var(--text-light);
  margin-right: var(--space-2);
}

.wizard-step.active .wizard-step-number {
  background: var(--primary-color);
  color: var(--bg-white);
}

.wizard-step.completed .wizard-step-number {
  background: var(--success-color);
  color: var(--bg-white);
}

.wizard-step-title {
  font-weight: 500;
  color: var(--text-light);
  font-size: var(--font-size-sm);
}

.wizard-step.active .wizard-step-title {
  color: var(--primary-color);
}

.wizard-connector {
  flex: 1;
  height: 2px;
  background: var(--border-light);
  margin: 0 var(--space-2);
}

@media (max-width: 640px) {
  .wizard-step-title {
    display: none;
  }
}