*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: #1f2937;
  background: #f5f5f5;
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3 {
  margin: 0;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

/* ---------- Login pages ---------- */

.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
  background: linear-gradient(to bottom, #eff6ff, #dbeafe);
}

.login-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  height: 4rem;
  width: auto;
  margin: 0 auto 1rem;
}

.login-card {
  width: 100%;
  max-width: 28rem;
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

.login-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background: #ffffff;
  color: #1f2937;
}

.form-input:focus {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
  border-color: transparent;
}

.login-footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
}
.btn-primary:hover { background: #1d4ed8; }

.btn-outline {
  background: #ffffff;
  color: #1f2937;
  border-color: #d1d5db;
}
.btn-outline:hover { background: #f9fafb; }

.btn-feedback {
  background: #f97316;
  color: #ffffff;
}
.btn-feedback:hover { background: #ea580c; }

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* ---------- Top bar / layout ---------- */

.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f9fafb;
}

.site-header {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.site-header-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  height: 2.5rem;
  width: auto;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2563eb;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-main {
  flex: 1;
  max-width: 80rem;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.site-footer {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
}

.site-footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
}

/* ---------- Section boxes ---------- */

.section-box {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.section-subtitle {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.notice {
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
  border: 1px solid;
}

.notice-warning {
  background: #fefce8;
  border-color: #fcd34d;
  color: #854d0e;
}

.notice-warning .notice-heading {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

/* ---------- Department buttons ---------- */

.dept-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.dept-button {
  padding: 0.375rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #1f2937;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.dept-button:hover {
  background: #f9fafb;
}

.dept-button.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.dept-empty {
  color: #6b7280;
}

/* ---------- Agent grid + cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

[hidden] {
  display: none !important;
}

.agent-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #f3f4f6;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
}

.agent-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.12);
}

.agent-card-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 8rem;
  padding: 1rem;
  background: linear-gradient(to bottom right, #eff6ff, #dbeafe);
}

.agent-card-image img {
  width: 6rem;
  height: 6rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid #ffffff;
}

.agent-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.25rem;
}

.agent-name {
  font-size: 1.125rem;
  font-weight: 700;
}

.agent-desc {
  font-size: 0.875rem;
  color: #6b7280;
  flex: 1;
}

.tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  margin-top: 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.tag-indgaaende {
  background: #dcfce7;
  color: #15803d;
}

.tag-udgaaende {
  background: #fee2e2;
  color: #b91c1c;
}

.tag-besoeg {
  background: #fef9c3;
  color: #a16207;
}

/* ---------- Error page ---------- */

.error-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #f9fafb;
}

.error-card {
  width: 100%;
  max-width: 28rem;
  background: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  text-align: center;
}

.error-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  background: #fee2e2;
  margin-bottom: 1rem;
}

.error-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: #dc2626;
}

.error-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.75rem;
}

.error-message {
  color: #4b5563;
  margin-bottom: 1.5rem;
}

/* ---------- 404 page ---------- */

.notfound-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  text-align: center;
  padding: 1rem;
}

.notfound-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.notfound-message {
  font-size: 1.25rem;
  color: #4b5563;
  margin-bottom: 1rem;
}

.notfound-link {
  color: #3b82f6;
  text-decoration: underline;
}
.notfound-link:hover { color: #1d4ed8; }

/* ---------- Responsive ---------- */

@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
