/* Teodor-spezifische Ergänzungen. Die Shell, Sidebar, Header, Usercard,
   Buttons und Basisfarben kommen bewusst 1:1 aus dem DMAV kit-board.css. */

.teodor-page-intro {
  margin-top: 0;
  padding: 22px 24px;
}
.teodor-page-intro h2 {
  margin: 0 0 6px;
  font-size: 22px;
}
.teodor-page-intro p {
  margin: 0;
  color: var(--text-soft);
}
.teodor-section-eyebrow {
  color: var(--kit-green);
  margin-bottom: 8px;
}

.teodor-module-grid {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: stretch;
}

.teodor-module-card {
  flex: 1 1 540px;
  max-width: calc(50% - 9px);
  min-height: 330px;
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(240px, 42%) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.teodor-module-card:hover {
  border-color: #9eb7d4;
  box-shadow: 0 6px 20px rgba(18,32,47,0.10);
  transform: translateY(-1px);
}
.teodor-module-card__media {
  display: flex;
}
.teodor-module-card__media-frame {
  width: 100%;
  min-height: 100%;
  border: 2px solid #18324a;
  background: var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}
.teodor-module-card__image {
  width: min(100%, 170px);
  max-height: 170px;
  object-fit: contain;
}
.teodor-module-card__media-frame.is-scale-to-fit {
  padding: 14px;
}
.teodor-module-card__media-frame.is-scale-to-fit .teodor-module-card__image {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}
.teodor-module-card__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.teodor-module-card__topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.teodor-module-card__heading-group {
  min-width: 0;
  display: grid;
  gap: 6px;
}
.teodor-module-card__heading-group strong {
  font-size: 22px;
  line-height: 1.15;
}
.teodor-module-card__versionline {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}
.teodor-module-card__divider {
  display: block;
  width: 100%;
  height: 3px;
  background: #18324a;
  opacity: 0.9;
  margin: 2px 0 10px;
}
.teodor-module-card__description-label {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}
.teodor-module-card__description-line {
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.45;
  border-bottom: 2px solid rgba(24, 50, 74, 0.28);
  padding-bottom: 7px;
}
.teodor-module-card__description-line:last-of-type {
  margin-bottom: 12px;
}
.teodor-module-card__footer-note {
  margin-top: auto;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.45;
  padding-top: 10px;
  border-top: 2px solid rgba(24, 50, 74, 0.18);
}
.teodor-module-card__badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}
.teodor-module-card__badge.is-sso,
.status-pill.is-active {
  color: #006451;
  background: rgba(0,150,130,0.14);
}
.teodor-module-card__badge.is-external,
.status-pill {
  color: var(--kit-blue-dark);
  background: #e6eef6;
}
.teodor-empty-card {
  width: 100%;
  padding: 24px;
}

.primary-button,
.ghost-button,
.danger-button {
  border: 1px solid transparent;
  min-height: 40px;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
.primary-button {
  color: #fff;
  background: var(--kit-blue);
  border-color: var(--kit-blue);
}
.primary-button:hover { background: var(--kit-blue-dark); }
.ghost-button {
  color: var(--kit-blue);
  background: var(--surface-muted);
  border-color: var(--border);
}
.ghost-button:hover { border-color: #9eb7d4; }
.ghost-button--small { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.danger-button {
  color: #fff;
  background: #8a1f2b;
  border-color: #8a1f2b;
}

.messages,
.flash-stack { margin-bottom: 18px; display: grid; gap: 10px; }
.message,
.flash {
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: #fff;
}
.message-success,
.flash--success { border-left: 4px solid var(--kit-green); }
.message-error,
.flash--error { border-left: 4px solid var(--error); }
.message-info,
.flash--info { border-left: 4px solid var(--kit-blue); }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.admin-table th {
  font-size: 12px;
  color: var(--text-soft);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.admin-module-cell { display: flex; gap: 12px; align-items: center; min-width: 180px; }
.admin-module-cell__image {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  padding: 6px;
}
.actions-col { min-width: 250px; }
.inline-form { display: inline-flex; margin: 3px; }
.admin-form hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid__wide { grid-column: 1 / -1; }
.admin-form label { display: flex; flex-direction: column; gap: 7px; font-weight: 700; }
.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
  color: var(--text);
}
.admin-form small { color: var(--text-soft); font-weight: 400; }
.checkbox-label { flex-direction: row !important; align-items: center; }
.checkbox-label input { width: auto; }
.form-help {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }

.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background: var(--page-bg);
  font-family: Arial, Helvetica, sans-serif;
}
.login-card {
  width: min(470px, calc(100vw - 32px));
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.login-logo {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--kit-blue);
  font-weight: 900;
}
.login-card p { color: var(--text-soft); line-height: 1.55; }
.login-card .primary-button { width: 100%; margin-top: 10px; }

@media (max-width: 1240px) {
  .teodor-module-card {
    max-width: 100%;
    flex-basis: 100%;
  }
}

@media (max-width: 900px) {
  .teodor-module-card {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 20px;
    gap: 18px;
  }
  .teodor-module-card__media-frame {
    min-height: 220px;
  }
  .teodor-module-card__topline {
    flex-direction: column;
    align-items: flex-start;
  }
  .form-grid { grid-template-columns: 1fr; }
}
