:root {
  --ink: #17233a;
  --muted: #829dc4;
  --line: #dfe5ef;
  --brand: #a0ce3a;
  --brand-dark: #364e72;
  --brand-hover: #7faa2c;
  --accent: #efa80a;
  --bg: #f5f6fa;
  --soft: #f6fbec;
  --danger: #b7472a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Sans Pro", "Open Sans", "Segoe UI", Arial, sans-serif;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

.topbar {
  min-height: 66px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 8px rgba(54, 78, 114, 0.08);
}

.topbar > div {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar strong {
  display: inline-flex;
  align-items: center;
  color: var(--brand-dark);
  font-size: 23px;
  letter-spacing: 0;
}

.topbar strong::before {
  content: "";
  width: 12px;
  height: 30px;
  margin-right: 10px;
  border-radius: 2px;
  background: var(--brand);
  box-shadow: 16px 0 0 var(--brand-dark), 32px 0 0 var(--accent);
}

.topbar > div span {
  padding-left: 14px;
  border-left: 1px solid var(--line);
  color: var(--brand-dark);
  font-weight: 700;
}

.topbar span,
.muted,
.hint {
  color: var(--muted);
}

.topbar nav {
  display: flex;
  gap: 18px;
  align-items: center;
}

.topbar nav a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--brand-dark);
  font-weight: 700;
}

.topbar nav a:hover {
  border-color: var(--brand);
  background: var(--soft);
}

.topbar nav .nav-locked {
  padding: 8px 12px;
  border: 1px solid #d8dee8;
  border-radius: 6px;
  color: #9aa8ba;
  background: #f1f3f7;
  font-weight: 700;
  cursor: not-allowed;
  opacity: .78;
}

.topbar nav .nav-locked::after {
  content: " gesperrt";
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
  color: #aab4c2;
}

.page {
  width: min(1560px, calc(100vw - 32px));
  margin: 18px auto 60px;
}

.login-panel,
.hero,
.card,
.detail,
.lead-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(54, 78, 114, 0.08);
}

.login-panel {
  width: min(460px, 100%);
  margin: 80px auto;
  padding: 30px;
  border-top: 5px solid var(--brand);
}

h1 {
  margin: 0 0 12px;
  font-size: 34px;
  color: var(--brand-dark);
  letter-spacing: 0;
}

h2 {
  margin: 0 0 16px;
  font-size: 20px;
  color: var(--brand-dark);
}

.eyebrow {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--brand-dark);
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  border-top: 5px solid var(--brand);
}

.hero p {
  max-width: 720px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.primary,
button,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: #1d2e20;
  font-weight: 800;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}

.primary:hover,
button:hover,
.secondary:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: .45;
  transform: none;
}

.secondary {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand-dark);
}

.secondary:hover {
  border-color: var(--brand);
  background: var(--soft);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 18px 0;
}

.stats div {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: 8px;
  padding: 18px;
}

.stats .stat-link {
  display: block;
  background: var(--soft);
  border: 1px solid #cfe3ab;
  border-top: 4px solid var(--accent);
  border-radius: 8px;
  padding: 18px;
}

.stats strong {
  display: block;
  font-size: 30px;
  color: var(--brand-dark);
}

.stats span {
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.weekly-goal-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 1.4fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  border-left: 5px solid var(--brand);
}

.weekly-goal-card h2 {
  margin: 4px 0 6px;
}

.weekly-progress {
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  background: #e8edf4;
  box-shadow: inset 0 1px 3px rgba(54, 78, 114, 0.12);
}

.weekly-progress-bar {
  height: 100%;
  min-width: 8px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.weekly-goal-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--brand-dark);
  font-weight: 800;
}

.weekly-goal-footer span {
  color: var(--muted);
}

.employer-match-test-card {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  border-left: 5px solid var(--brand-dark);
}

.employer-match-test-card .table-wrap {
  overflow-x: auto;
}

.employer-match-test-card table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

.employer-match-test-card th,
.employer-match-test-card td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}

.employer-match-test-card th:first-child,
.employer-match-test-card td:first-child {
  text-align: left;
}

.employer-match-test-card .metric-total-row {
  background: var(--soft);
  font-weight: 850;
}

.followup-priority-card {
  display: grid;
  gap: 16px;
  border-top: 5px solid var(--brand);
  background: #fffdf7;
}

.appointment-priority-card {
  display: grid;
  gap: 16px;
  border-top: 5px solid var(--brand-dark);
  background: #f8fbff;
}

.offer-priority-card {
  display: grid;
  gap: 16px;
  border-top: 5px solid var(--accent);
  background: #fffdf7;
}

.employer-match-followup-card {
  display: grid;
  gap: 16px;
  border-top: 5px solid var(--brand-dark);
  background: #f8fff8;
}

.followup-priority-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.followup-priority-head h2 {
  margin-bottom: 6px;
  color: var(--brand-dark);
}

.followup-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.employer-match-followup-list {
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.employer-match-followup-item {
  border-color: #cfe3ab;
}

.followup-preview-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #d8e8b7;
  border-radius: 8px;
  background: #fff;
}

.followup-preview-item:hover {
  background: var(--soft);
}

.followup-preview-item strong {
  color: var(--ink);
}

.followup-preview-item span {
  color: var(--brand-dark);
  font-weight: 800;
}

.followup-preview-item small {
  color: var(--muted);
}

.dashboard-followup-list.compact {
  display: grid;
  gap: 6px;
}

.dashboard-followup-row {
  display: grid;
  grid-template-columns: 140px minmax(210px, 1.1fr) minmax(180px, 0.9fr) minmax(260px, 1.4fr);
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #d8e8b7;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.dashboard-followup-row:hover {
  background: var(--soft);
}

.dashboard-followup-row strong,
.dashboard-followup-row span,
.dashboard-followup-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-followup-row strong {
  color: var(--ink);
}

.dashboard-followup-row span,
.dashboard-followup-row small {
  color: var(--muted);
}

.dashboard-followup-date {
  color: var(--brand-dark) !important;
  font-weight: 800;
}

.appointment-preview-item {
  border-color: #cdd8ee;
}

.offer-preview-item {
  border-color: #f2d28d;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.card {
  padding: 22px;
}

.quota-card {
  display: block;
  padding: 22px;
  border: 1px solid #cfe3ab;
  border-top: 5px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(54, 78, 114, 0.08);
}

.quota-card:hover {
  background: var(--soft);
}

.quota-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.quota-mini span {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}

.quota-mini strong {
  display: block;
  color: var(--brand-dark);
  font-size: 26px;
}

.quota-table-card {
  overflow: auto;
}

.quota-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1280px;
}

.quota-table th,
.quota-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.quota-table th {
  color: var(--brand-dark);
  font-size: 12px;
  text-transform: uppercase;
  background: #f8fbff;
}

.table-input {
  width: 100%;
  min-width: 220px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.table-input.small-money {
  min-width: 120px;
}

.table-input.compact-select {
  min-width: 190px;
}

.research-admin-list {
  display: grid;
  gap: 12px;
}

.research-admin-card {
  display: grid;
  grid-template-columns: minmax(180px, .35fr) minmax(320px, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.research-instruction-input {
  width: 100%;
  min-height: 118px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  resize: vertical;
  font: inherit;
}

.small-action {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.admin-table {
  min-width: 1500px;
}

.module-permission-table {
  min-width: 1180px;
}

.project-create-form {
  display: grid;
  gap: 14px;
}

.project-create-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
}

.success-banner {
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid #cfe3ab;
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  background: var(--soft);
  color: var(--brand-dark);
  font-weight: 800;
}

.check-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--brand-dark);
}

.check-line.compact {
  font-size: 12px;
}

.admin-count {
  display: block;
  font-weight: 800;
  color: var(--brand-dark);
}

.script-template-list {
  display: grid;
  gap: 12px;
}

.script-template-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.script-template-editor summary {
  cursor: pointer;
  padding: 14px;
  font-weight: 800;
  color: var(--brand-dark);
}

.script-template-editor summary span {
  margin-left: 10px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.script-template-editor form {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.script-json-editor {
  width: 100%;
  min-height: 380px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.45;
}

.gatekeeper-alternatives-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #cfe3ab;
  border-radius: 8px;
  background: var(--soft);
}

.gatekeeper-alternatives-editor h3 {
  margin: 0;
  color: var(--brand-dark);
}

.alternative-edit-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(280px, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.alternative-textarea {
  min-height: 84px;
}

.autosave-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.autosave-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.contact-save-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.contact-save-row h3 {
  margin: 0;
}

.inline-button-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.contact-hard-save {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
  white-space: normal;
  text-align: center;
}

.delete-mini-button {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #f0b5a6;
  background: #fff1f1;
  color: var(--danger);
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.delete-mini-button:hover {
  background: #ffe3df;
}

.contact-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.contact-fields .contact-phone-row {
  grid-column: 1 / -1;
}

.contact-fields input,
.followup-box input,
.panel textarea,
.contact-candidates-input {
  min-width: 0;
  max-width: 100%;
}

.followup-box {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 2px solid #cfe3ab;
  border-radius: 8px;
  background: var(--soft);
  min-width: 0;
}

.arbeitsamt-data-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 2px solid #cdd8ee;
  border-radius: 8px;
  background: #f8fbff;
  min-width: 0;
}

.arbeitsamt-data-input {
  min-height: 92px;
}

.followup-box .follow-grid {
  grid-template-columns: minmax(0, 1fr) minmax(110px, .55fr);
}

.followup-box input[name="follow_reason"] {
  min-height: 42px;
}

.appointment-box {
  background: #f8fbff;
  border-color: #cdd8ee;
}

.saved-summary {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid #d8e8b7;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
}

.saved-summary strong {
  color: var(--brand-dark);
  font-size: 12px;
  text-transform: uppercase;
}

.saved-summary span {
  font-weight: 800;
}

.saved-summary small,
.compact {
  color: var(--muted);
}

.appointment-summary {
  border-color: #cdd8ee;
}

.readonly-select {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  background: #fff;
  color: var(--brand-dark);
  font-weight: 800;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--brand-dark);
  font-weight: 800;
  border: 1px solid #cfe3ab;
}

.conversation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.conversation-script {
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--brand);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(54, 78, 114, 0.08);
}

.conversation-placeholder {
  min-height: 460px;
  max-height: none;
}

.pipeline-list {
  display: grid;
  gap: 10px;
}

.pipeline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, auto);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pipeline-card-row {
  align-items: start;
}

.pipeline-row:hover {
  border-color: var(--brand);
  background: var(--soft);
}

.pipeline-row strong,
.pipeline-row small {
  display: block;
}

.pipeline-row strong {
  color: var(--brand-dark);
}

.pipeline-row small {
  margin-top: 3px;
  color: var(--muted);
}

.pipeline-row b {
  color: var(--brand-dark);
}

.offer-followup-form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  min-width: min(100%, 310px);
}

.offer-followup-form input {
  min-width: 0;
}

.offer-followup-form .follow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(104px, .6fr);
  gap: 8px;
}

.training-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.training-card {
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--brand);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(54, 78, 114, 0.08);
}

.training-card-disabled {
  border-top-color: var(--accent);
  background: #fffdf7;
}

.training-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 16px;
  border: 1px solid #cfe3ab;
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  background: var(--soft);
}

.training-banner strong {
  color: var(--brand-dark);
}

.training-cockpit .manual-counter button,
.training-cockpit .script-actions button {
  cursor: default;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.row:hover,
.lead-card:hover {
  border-color: var(--brand);
  background: var(--soft);
}

.row small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.toolbar form {
  display: flex;
  gap: 8px;
}

select,
input,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

select:focus,
input:focus,
textarea:focus {
  outline: 2px solid rgba(160, 206, 58, 0.35);
  border-color: var(--brand);
}

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

label {
  display: block;
  margin-bottom: 13px;
  font-weight: 700;
}

label input,
label textarea,
label select {
  margin-top: 6px;
  font-weight: 400;
}

.lead-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 12px;
}

.lead-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
}

.lead-card strong {
  font-size: 18px;
  color: var(--brand-dark);
}

.lead-card span,
.lead-card em,
.project {
  color: var(--muted);
  font-style: normal;
}

.admin-lead-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 12px;
}

.admin-lead-list .lead-card {
  min-height: 0;
}

.admin-lead-list .lead-card b {
  color: var(--ink);
}

.lead-search-form {
  display: grid !important;
  grid-template-columns: minmax(260px, 1.6fr) minmax(160px, 1fr) minmax(140px, 0.8fr) minmax(150px, 0.9fr) auto;
  align-items: center;
  width: min(100%, 980px);
}

.detail {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  padding: 26px;
  margin: 12px 0 18px;
  border-top: 5px solid var(--brand);
}

.call-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
  margin: 18px 0;
}

.call-main,
.call-side,
.script-box,
.person-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(54, 78, 114, 0.08);
}

.call-main {
  padding: 26px;
  border-top: 5px solid var(--brand);
}

.call-side {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 12px;
  padding: 18px;
}

.call-side form {
  display: grid;
  gap: 8px;
}

.call-side button {
  width: 100%;
}

.contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.contact-strip span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbff;
  color: var(--brand-dark);
  font-weight: 700;
}

.person-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 16px;
  margin: 16px 0;
  background: var(--soft);
}

.person-card small,
.person-card span {
  display: block;
  color: var(--muted);
}

.person-card strong {
  display: block;
  margin: 4px 0;
  color: var(--brand-dark);
  font-size: 20px;
}

.script-box {
  padding: 18px;
  margin-top: 14px;
  min-height: 170px;
}

.script-box:first-of-type {
  min-height: 240px;
}

.back {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--muted);
}

.activity {
  display: grid;
  grid-template-columns: 110px 1fr 170px;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.activity small {
  color: var(--muted);
}

.cockpit {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.cockpit-aside {
  position: sticky;
  top: 70px;
  height: calc(100vh - 82px);
  max-height: calc(100vh - 82px);
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

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

.timer,
.manual-counter,
.cockpit-card,
.stage,
.panel,
.meta,
.open-position {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(54, 78, 114, 0.08);
}

.timer {
  padding: 9px;
  display: grid;
  gap: 7px;
  flex: 0 0 auto;
}

.timer .row,
.manual-counter,
.actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.timer .row > * {
  flex: 1 1 82px;
}

.timer-time {
  font-size: 30px;
  font-weight: 800;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}

.button,
a.button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}

.button:hover,
a.button:hover {
  border-color: var(--brand);
  background: var(--soft);
}

.blue {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
  font-weight: 800;
}

.blue:hover {
  background: #20324c;
  border-color: #20324c;
}

.danger {
  background: var(--accent);
  border-color: var(--accent);
  color: #1f2937;
  font-weight: 800;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.aside-bottom {
  display: grid;
  gap: 8px;
  flex: 0 0 auto;
}

.metric-grid div,
.manual-counter {
  padding: 10px;
}

.metric-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.metric-grid .wide {
  grid-column: 1 / -1;
}

.followup-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #d8e8b7;
  border-radius: 8px;
  background: #fffdf7;
  color: var(--brand-dark);
  font-weight: 800;
}

.followup-alert strong {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
}

.followup-alert span {
  color: var(--brand-dark);
}

.metric-grid strong {
  display: block;
  font-size: 24px;
  color: var(--brand-dark);
}

.metric-grid span,
.small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.payout-metric {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.payout-button {
  width: 100%;
  min-height: 36px;
}

.manual-counter h3 {
  width: 100%;
}

.toolbar input,
.toolbar select {
  min-width: 0;
}

.call-leads-panel {
  display: flex;
  flex-direction: column;
  min-height: 470px;
  max-height: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(54, 78, 114, 0.08);
  overflow: hidden;
  flex: 1 1 auto;
}

.call-leads-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.call-leads-head h3 {
  margin: 0;
  color: var(--brand-dark);
}

.call-leads-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.call-leads-filter {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 9px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.lead-list {
  display: block;
  overflow: auto;
  min-height: 330px;
  flex: 1;
  background: #fff;
}

.empty-lead-list {
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}

.lead-item {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  background: #fff;
}

.lead-item.active {
  background: var(--soft);
}

.lead-item .name {
  font-weight: 800;
  color: var(--brand-dark);
}

.candidate-count-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 2px 7px;
  border: 1px solid #c7d9a9;
  border-radius: 6px;
  background: #eef8df;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.candidate-count-badge.low {
  border-color: #e3c27f;
  background: #fff5d8;
  color: #72520d;
}

.candidate-count-badge.unknown {
  border-color: var(--line);
  background: #f3f5f7;
  color: var(--muted);
}

.lead-list-candidate-count {
  display: flex;
  margin-top: 4px;
}

.lead-item .place {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.num {
  color: var(--brand-dark);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 800;
  padding-top: 2px;
}

.cockpit-main {
  min-width: 0;
}

.cockpit-card {
  padding: 14px;
  border-top: 5px solid var(--brand);
}

.headline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.headline h2 {
  margin: 1px 0 6px;
  font-size: 25px;
  line-height: 1.14;
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
}

.phone {
  font-size: 28px;
  font-weight: 800;
  color: var(--brand-dark);
  white-space: nowrap;
}

.inline-phone-input {
  width: 210px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--brand-dark);
  font-weight: 800;
}

.headline-phone-form {
  display: grid;
  gap: 6px;
}

.headline-phone-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.headline-phone-row .small-action {
  min-height: 40px;
}

.admin-lead-delete-form {
  margin-top: 9px;
  text-align: right;
}

.admin-lead-delete-button {
  min-height: 36px;
  padding: 8px 13px;
  border-color: var(--danger);
}

.admin-lead-detail-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-lead-detail-title h1 {
  margin: 0;
}

.actions {
  margin: 10px 0;
}

.open-position {
  padding: 10px 12px;
  margin: 10px 0;
}

.stage {
  padding: 12px;
  margin-top: 10px;
  box-shadow: none;
}

.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.stage-head h3 {
  margin: 0;
}

.connection-target {
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #cfe3ab;
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  background: var(--soft);
}

.connection-target strong,
.connection-target span {
  display: block;
}

.connection-target strong {
  color: var(--brand-dark);
  font-size: 19px;
}

.connection-target > .button {
  margin-top: 8px;
}

.script-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 12px;
  align-items: start;
}

.script {
  padding: 18px;
  font-size: 22px;
  line-height: 1.48;
  min-height: 575px;
  max-height: calc(100vh - 230px);
}

.script-actions {
  display: grid;
  gap: 10px;
  align-content: start;
  position: sticky;
  top: 76px;
}

.employer-result-stack {
  display: grid;
  gap: 12px;
  align-content: start;
  position: sticky;
  top: 76px;
}

.employer-result-stack > .script-actions {
  position: static;
}

.employer-test-tracking {
  padding: 12px;
  border: 2px solid var(--brand-dark);
  border-radius: 8px;
  background: #f7f9fc;
}

.employer-test-tracking h3 {
  margin: 0 0 4px;
  color: var(--brand-dark);
}

.employer-test-tracking .manual-counter {
  display: grid;
  grid-template-columns: minmax(90px, 0.55fr) minmax(150px, 1fr);
  gap: 8px;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.employer-test-tracking .manual-counter label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.employer-test-tracking .manual-counter input {
  width: 100%;
}

.result-section {
  padding: 12px;
  border: 2px solid #cfe3ab;
  border-radius: 8px;
  background: var(--soft);
}

.result-section h3 {
  margin: 0 0 4px;
  color: var(--brand-dark);
}

.result-section button {
  min-height: 40px;
  font-weight: 800;
}

.script-detail > div {
  max-height: 220px;
}

.work {
  display: grid;
  grid-template-columns: minmax(320px, .8fr) minmax(430px, 1.2fr);
  gap: 12px;
  margin-top: 12px;
}

.panel {
  padding: 12px;
  gap: 8px;
}

.contact-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.contact-fields .contact-phone-row {
  grid-column: span 2;
}

.contact-candidates-input {
  min-height: 70px;
}

.arbeitsamt-data-input {
  min-height: 74px;
}

.followup-box,
.arbeitsamt-data-box {
  padding: 10px;
}

.log {
  max-height: 210px;
}

.activity-note-input {
  min-height: 68px;
}

.aside-bottom .metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.aside-bottom .metric-grid div {
  padding: 8px 6px;
}

.aside-bottom .metric-grid strong {
  font-size: 18px;
}

.aside-bottom .metric-grid span {
  font-size: 10px;
}

.aside-bottom .metric-grid .wide {
  grid-column: 1 / -1;
}

@media (max-width: 1320px) {
  .cockpit {
    grid-template-columns: 310px minmax(0, 1fr);
  }

  .script-workspace {
    grid-template-columns: minmax(0, 1fr) 285px;
  }

  .contact-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-fields .contact-phone-row {
    grid-column: 1 / -1;
  }
}

/* Arbeitgebermatch: kompakte Praxisansicht */
.employer-match-focus {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.employer-arbeitsamt-form {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #cdd8ee;
  border-radius: 8px;
  background: #f8fbff;
}

.employer-form-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.45fr) repeat(3, minmax(150px, .75fr));
  gap: 8px;
  align-items: stretch;
}

.employer-form-grid label {
  display: grid;
  gap: 5px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.employer-form-grid input,
.employer-form-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.employer-form-grid textarea {
  min-height: 82px;
  resize: vertical;
}

.employer-contact-zone {
  padding: 8px 10px;
  border: 1px solid #cfe3ab;
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  background: var(--soft);
}

.employer-contact-zone.compact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.employer-contact-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.employer-contact-pill {
  display: grid;
  gap: 2px;
  flex: 0 0 225px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #d8e8b7;
  border-radius: 7px;
  background: #fff;
}

.employer-contact-pill span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.employer-contact-pill strong {
  color: var(--brand-dark);
  font-size: 13px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.employer-contact-pill small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.employer-contact-pill .button {
  min-height: 28px;
  margin-top: 3px;
  padding: 0 8px;
  font-size: 12px;
}

.employer-contact-edit {
  flex-basis: 270px;
  gap: 5px;
}

.employer-contact-edit input {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.employer-contact-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
}

.employer-contact-inline .button {
  min-height: 30px;
  margin: 0;
  font-size: 11px;
  white-space: nowrap;
}

.employer-contact-edit .small-action {
  min-height: 30px;
  font-size: 12px;
  padding: 0 8px;
}

.employer-contact-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 5px;
}

.employer-contact-actions .ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand-dark);
}

.employer-contact-actions .danger-lite {
  color: #9b1c1c;
}

.employer-contact-add {
  border-style: dashed;
  background: #fbfff5;
}

.employer-contact-add .primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #17233a;
  font-weight: 900;
}

.employer-script-workspace {
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 10px;
}

.employer-script-panel {
  min-height: 330px;
  max-height: calc(100vh - 335px);
  padding: 12px;
}

.employer-match-script {
  display: grid;
  gap: 10px;
}

.employer-step-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.employer-match-script h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 16px;
}

.employer-match-script h4 span {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
}

.employer-match-script p {
  margin: 0 0 8px;
  color: #17233a;
  font-size: 19px;
  line-height: 1.36;
  font-weight: 650;
}

.employer-match-script p:last-child {
  margin-bottom: 0;
}

.employer-match-focus .result-section button {
  min-height: 38px;
  font-size: 13px;
}

.employer-edit-drawer {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.employer-edit-drawer summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--brand-dark);
  font-weight: 900;
}

.employer-edit-drawer .employer-arbeitsamt-form {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.employer-match-box {
  padding: 10px 12px;
}

.employer-match-main {
  grid-template-columns: minmax(0, .9fr) minmax(520px, 1.4fr);
  gap: 10px;
}

.employer-match-actions {
  justify-content: flex-end;
  gap: 7px;
}

.compact-link {
  margin-top: 7px;
  padding: 6px 8px;
  font-size: 11px;
  max-height: 30px;
  overflow: hidden;
}

@media (max-width: 1320px) {
  .employer-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .employer-contact-zone.compact {
    grid-template-columns: 1fr;
  }

  .employer-script-workspace {
    grid-template-columns: minmax(0, 1fr) 270px;
  }
}

.actions {
  margin: 18px 0;
}

.actions .primary {
  min-height: 54px;
  padding: 0 22px;
  font-size: 19px;
}

.actions .research-button {
  border-color: #cfe3ab;
  background: var(--soft);
  color: var(--brand-dark);
  font-weight: 800;
}

.open-position {
  margin-bottom: 14px;
  padding: 12px;
  background: var(--soft);
}

.stage {
  padding: 16px;
  margin-top: 14px;
  box-shadow: none;
}

.stage.hidden,
.hidden {
  display: none;
}

.stage-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.connection-target {
  margin: 14px 0;
  padding: 13px;
  border-radius: 8px;
  border: 1px solid #cfe3ab;
  background: var(--soft);
}

.connection-target strong {
  display: block;
  margin: 4px 0;
  color: var(--brand-dark);
  font-size: 20px;
}

.connection-target span {
  color: var(--muted);
}

.contact-email-notice {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin-top: 8px;
  padding: 6px 9px;
  border: 1px solid #bfd89d;
  border-radius: 7px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.contact-email-notice.is-empty {
  color: var(--muted);
  border-color: var(--line);
  font-weight: 700;
}

.quick-contact-form {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto;
  gap: 8px;
  align-items: end;
  max-width: 520px;
  margin-top: 9px;
}

.quick-contact-form label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.quick-contact-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.quick-contact-form input {
  min-width: 0;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid #cfe3ab;
  border-radius: 7px;
  background: #fff;
}

.quick-contact-form .small-action {
  min-height: 34px;
}

.connection-target .primary {
  display: inline-flex;
  min-height: 34px;
  margin-top: 9px;
  padding: 0 11px;
  font-size: 13px;
  text-decoration: none;
}

.contact-candidates {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.contact-candidates span {
  padding: 6px 9px;
  border: 1px solid #cfe3ab;
  border-radius: 6px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.contact-candidates-input {
  min-height: 96px;
}

.script-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 14px;
  align-items: stretch;
}

.script {
  padding: 16px;
  border-radius: 8px;
  background: #fbfcff;
  border: 1px solid var(--line);
  font-size: 22px;
  line-height: 1.5;
  min-height: 520px;
  max-height: calc(100vh - 290px);
  overflow: auto;
}

.script h4 {
  margin: 0 0 14px;
  font-size: 24px;
  color: var(--brand-dark);
}

.script-structure {
  margin: 18px 0 8px;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand-dark);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
}

.forwarding-field {
  margin: 18px 0 14px;
  padding: 14px;
  border: 1px solid #cfe3ab;
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  background: var(--soft);
}

.forwarding-field h4 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--brand-dark);
  text-transform: uppercase;
}

.forwarding-target {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.forwarding-field p {
  margin: 0;
  color: #17233a;
  font-size: 24px;
  font-weight: 850;
  line-height: 1.35;
}

.script-line {
  margin: 0 0 12px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
}

.script-label {
  align-self: start;
  padding: 4px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.script-agent .script-text {
  color: #17233a;
  font-weight: 750;
}

.script-customer .script-text {
  color: #7c8da6;
  font-style: italic;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
}

.script-customer {
  margin-bottom: 6px;
  opacity: .72;
}

.script-customer .script-label {
  font-size: 10px;
  padding: 2px 6px;
  background: #f6f8fb;
}

.script-note .script-text {
  color: #6b4a00;
  background: #fff7df;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 17px;
}

.script-coach-note {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 7px;
  border-radius: 8px;
  background: #fff7df;
  color: #6b4a00;
  font-size: 16px;
  font-weight: 600;
}

.coach-label {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #1f2937;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.script-actions {
  display: grid;
  gap: 10px;
  align-content: start;
}

.script-actions button {
  width: 100%;
  justify-content: flex-start;
  min-height: 38px;
  white-space: normal;
}

.result-section {
  order: -10;
  padding: 13px;
  border: 2px solid #cfe3ab;
  background: var(--soft);
  border-radius: 8px;
}

.result-section h3 {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-size: 19px;
}

.result-section button {
  min-height: 52px;
  margin-bottom: 8px;
  padding: 10px 13px;
  justify-content: center;
  text-align: center;
  font-size: 16px;
  font-weight: 850;
}

.result-section button:last-child {
  margin-bottom: 0;
}

.result-section .blue,
.result-section .primary {
  font-size: 17px;
  min-height: 58px;
}

.support-section {
  order: 10;
}

.support-section h3 {
  font-size: 14px;
  margin-bottom: 7px;
  color: var(--muted);
}

.support-section button,
.support-section summary {
  font-size: 13px;
}

.alternatives-section {
  margin-top: 6px;
}

.script-actions .alternative-select {
  border: 1px solid #cfe3ab;
  background: #fff;
  color: var(--brand-dark);
}

.script-actions .alternative-select.active {
  background: var(--soft);
  border-color: var(--brand);
  box-shadow: inset 4px 0 0 var(--brand);
}

.side-section {
  display: grid;
  gap: 7px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.script-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.script-detail summary {
  cursor: pointer;
  padding: 9px 10px;
  color: var(--brand-dark);
  font-weight: 800;
}

.script-detail > div {
  max-height: 320px;
  overflow: auto;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: #fbfcff;
}

.script-detail .script-line {
  grid-template-columns: 82px minmax(0, 1fr);
  font-size: 14px;
}

.script-detail .script-label {
  font-size: 10px;
}

.script-detail .script-structure,
.script-detail h4 {
  font-size: 13px;
}

.work {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 430px);
  gap: 14px;
  margin-top: 14px;
}

.panel {
  padding: 16px;
  display: grid;
  gap: 10px;
  box-shadow: none;
  min-width: 0;
  overflow: hidden;
}

.log {
  max-height: 260px;
  overflow: auto;
}

.activity-note-input {
  min-height: 82px;
}

.contact-phone-row,
.follow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  min-width: 0;
}

.contact-phone-row .primary {
  min-width: 112px;
  padding-left: 10px;
  padding-right: 10px;
  white-space: normal;
  text-align: center;
}

.disabled {
  opacity: .55;
  pointer-events: none;
}

.error {
  padding: 10px;
  border-radius: 6px;
  background: #fff1f1;
  color: var(--danger);
}

.employer-match-box {
  border: 1px solid #cfe7dc;
  background: #f4fbf7;
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  gap: 7px;
}

.employer-match-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.employer-match-main strong {
  display: block;
  color: var(--brand-dark);
}

.employer-match-main span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.employer-match-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.arbeitsamt-link-control {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
}

.arbeitsamt-link-missing {
  width: min(100%, 560px);
  padding: 7px;
  border: 1px solid var(--line);
  background: #f6f7f9;
  border-radius: 6px;
}

.arbeitsamt-link-missing > .small {
  width: 100%;
}

.arbeitsamt-link-editor {
  position: relative;
}

.arbeitsamt-link-editor > summary {
  list-style: none;
  cursor: pointer;
}

.arbeitsamt-link-editor > summary::-webkit-details-marker {
  display: none;
}

.arbeitsamt-link-editor[open] .arbeitsamt-link-form {
  position: absolute;
  z-index: 20;
  right: 0;
  top: calc(100% + 6px);
  width: min(540px, 78vw);
  padding: 9px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 8px 24px rgba(30, 50, 80, .14);
  border-radius: 6px;
}

.arbeitsamt-link-form {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.arbeitsamt-link-form input {
  flex: 1 1 280px;
  min-width: 0;
}

@media (max-width: 760px) {
  .arbeitsamt-link-editor[open] .arbeitsamt-link-form {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 80px;
    width: auto;
  }

  .arbeitsamt-link-form {
    align-items: stretch;
    flex-direction: column;
  }
}

.inline-mail-form {
  margin: 0;
  display: inline-flex;
}

.employer-match-link {
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
}

@media (max-width: 760px) {
  .hero,
  .detail,
  .toolbar,
  .call-shell,
  .cockpit,
  .headline,
  .script-workspace,
  .work {
    display: block;
  }

  .cockpit-aside {
    position: static;
    height: auto;
    margin-bottom: 14px;
  }

  .script {
    min-height: 440px;
    max-height: 70vh;
  }

  .stats,
  .grid {
    grid-template-columns: 1fr;
  }

  .activity {
    grid-template-columns: 1fr;
  }

  .lead-search-form {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .alternative-edit-card {
    grid-template-columns: 1fr;
  }
}

/* Telefonie-Aufräumrunde: finaler Arbeitsmodus */
.cockpit {
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 14px;
}

.cockpit-aside {
  top: 70px;
  height: calc(100vh - 82px);
  max-height: calc(100vh - 82px);
}

.timer {
  padding: 9px;
  gap: 7px;
}

.timer-time {
  font-size: 30px;
}

.timer .row {
  gap: 6px;
}

.timer .row > * {
  flex: 1 1 82px;
}

.call-leads-panel {
  min-height: 470px;
  flex: 1 1 auto;
}

.lead-list {
  min-height: 330px;
}

.lead-item {
  min-height: 52px;
  padding: 8px 10px;
}

.aside-bottom .metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.aside-bottom .metric-grid div {
  padding: 8px 6px;
}

.aside-bottom .metric-grid strong {
  font-size: 18px;
}

.aside-bottom .metric-grid span {
  font-size: 10px;
}

.aside-bottom .metric-grid .wide {
  grid-column: 1 / -1;
}

.cockpit-card {
  padding: 14px;
}

.headline {
  gap: 12px;
  padding-bottom: 10px;
}

.headline h2 {
  margin: 1px 0 6px;
  font-size: 25px;
}

.actions {
  margin: 10px 0;
}

.actions .primary {
  min-height: 44px;
  padding: 0 16px;
  font-size: 16px;
}

.stage {
  padding: 12px;
  margin-top: 10px;
}

.stage-head {
  padding-bottom: 8px;
}

.connection-target {
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 5px solid var(--brand);
}

.script-workspace {
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 12px;
  align-items: start;
}

.script {
  padding: 18px;
  min-height: 575px;
  max-height: calc(100vh - 230px);
  font-size: 22px;
  line-height: 1.48;
}

.script-actions {
  position: sticky;
  top: 76px;
  gap: 10px;
}

.result-section {
  order: -20;
  padding: 12px;
}

.result-section h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

.result-section button {
  min-height: 42px;
  margin-bottom: 6px;
  padding: 8px 11px;
  font-size: 14px;
}

.result-section .blue,
.result-section .primary {
  min-height: 50px;
  font-size: 15px;
}

.support-section {
  order: -5;
}

.alternatives-section {
  order: 20;
}

.script-detail > div {
  max-height: 220px;
}

.work {
  grid-template-columns: minmax(320px, .8fr) minmax(430px, 1.2fr);
  gap: 12px;
  margin-top: 12px;
}

.panel {
  padding: 12px;
  gap: 8px;
}

.contact-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.contact-fields .contact-phone-row {
  grid-column: span 2;
}

.contact-candidates-input {
  min-height: 70px;
}

.arbeitsamt-data-input {
  min-height: 74px;
}

.followup-box,
.arbeitsamt-data-box {
  padding: 10px;
}

.log {
  max-height: 210px;
}

.activity-note-input {
  min-height: 68px;
}

@media (max-width: 1320px) {
  .cockpit {
    grid-template-columns: 310px minmax(0, 1fr);
  }

  .script-workspace {
    grid-template-columns: minmax(0, 1fr) 285px;
  }

  .contact-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-fields .contact-phone-row {
    grid-column: 1 / -1;
  }
}

.headline-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.headline-title-row h2 {
  margin-right: auto;
}

.headline-candidate-count {
  min-height: 30px;
  padding: 4px 9px;
}

.permanent-lead-number {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid #cadcb0;
  border-radius: 6px;
  background: #f4faeb;
  color: var(--brand-dark);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.headline-favorite-form {
  margin: 0;
}

.headline-favorite-star {
  width: 42px;
  height: 42px;
  border: 1px solid #d6e6bf;
  border-radius: 10px;
  background: #fff;
  color: #9bae82;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.headline-favorite-star.active {
  color: #9bd22c;
  background: #f4ffe8;
  border-color: #9bd22c;
}

.headline-favorite-star:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 60, 90, 0.10);
}

.weekly-project-list {
  display: grid;
  gap: 12px;
}

.weekly-project-row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid #dbe9c8;
  border-radius: 8px;
  background: #fbfff5;
}

.weekly-project-row strong,
.weekly-project-row span,
.weekly-project-row small {
  display: block;
}

.weekly-project-row span,
.weekly-project-row small {
  color: #6a7c90;
}

.weekly-project-progress {
  display: grid;
  gap: 6px;
}

@media (max-width: 760px) {
  .weekly-project-row {
    grid-template-columns: 1fr;
  }
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.compact-hero {
  align-items: center;
}

.standalone-appointment-form-card {
  max-width: 980px;
  margin-inline: auto;
}

.standalone-appointment-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.standalone-appointment-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 700;
}

.standalone-appointment-form input,
.standalone-appointment-form select,
.standalone-appointment-form textarea {
  width: 100%;
}

.form-span-full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.form-success,
.form-error {
  padding: 12px 14px;
  border-radius: 6px;
  font-weight: 700;
}

.form-success {
  background: #edf8d8;
  color: #365600;
}

.form-error {
  background: #fff0ee;
  color: #9b241c;
}

.manual-appointment-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.manual-appointment-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid #d9e3c5;
  border-radius: 6px;
  background: #fff;
}

.manual-appointment-item > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.manual-appointment-item span,
.manual-appointment-item small {
  overflow-wrap: anywhere;
}

.danger-button {
  color: #9b241c;
  border-color: #efc1bc;
  background: #fff;
}

@media (max-width: 720px) {
  .standalone-appointment-form {
    grid-template-columns: 1fr;
  }

  .form-span-full {
    grid-column: auto;
  }

  .manual-appointment-item {
    grid-template-columns: 1fr;
  }

  .manual-appointment-item form,
  .manual-appointment-item button {
    width: 100%;
  }
}
