/*
 * CKO Toolbox – Erkennungsreichweite Rechner
 * Ergänzungen zur bestehenden V1.6.
 * Die Berechnungslogik bleibt unverändert.
 */

body {
  background:
    radial-gradient(circle at 20% 0%, rgba(44, 139, 255, 0.12), transparent 36rem),
    #020b18;
}

.wrap {
  max-width: 1380px;
  margin: 0 auto;
  padding: 32px 28px 48px;
}

header {
  padding: 22px 24px;
  margin-bottom: 20px;
  background: rgba(7, 20, 38, 0.92);
  border: 1px solid rgba(86, 160, 255, 0.2);
  border-radius: 18px;
}


header h1 {
  font-size: 25px;
}

header .sub {
  max-width: 900px;
}

.version-badge {
  top: 18px;
  right: 18px;
}

.grid {
  grid-template-columns: minmax(390px, 430px) minmax(0, 1fr);
  align-items: start;
}

.card {
  background: rgba(7, 20, 38, 0.94);
  border-color: rgba(86, 160, 255, 0.2);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.card .hd {
  min-height: 54px;
}

input,
select {
  min-height: 42px;
}

button,
.btn {
  min-height: 40px;
}

@media (max-width: 980px) {
  .wrap {
    padding: 18px 14px 36px;
  }

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

  header {
    padding: 18px;
  }
}

/* Phase 2 – Toolbox-Arbeitsfläche */

html,
body {
  min-height: 100%;
}

body {
  background-color: #020b18;
}

.wrap {
  width: min(1480px, calc(100% - 48px));
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px 0 50px;
}

/* Kopfbereich */
header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 116px;
  padding: 24px 28px;
  margin-bottom: 18px;
  background:
    linear-gradient(
      135deg,
      rgba(13, 35, 63, 0.98),
      rgba(4, 18, 34, 0.98)
    );
  border: 1px solid rgba(76, 151, 255, 0.28);
  border-radius: 18px;
}

header > div:first-of-type {
  flex: 1;
}

header .title {
  max-width: 900px;
}

header h1 {
  margin: 0 0 7px;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.15;
}

header .sub {
  max-width: 950px;
  font-size: 13px;
  line-height: 1.55;
}

.top-actions {
  padding-right: 48px;
  flex-shrink: 0;
}

.version-badge {
  top: 18px;
  right: 18px;
}

/* Hauptbereich */
.grid {
  display: grid;
  grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.grid > .card:first-child {
  position: sticky;
  top: 18px;
}

.card {
  width: 100%;
}

.card .hd {
  padding: 15px 18px;
}

.card .bd {
  padding: 16px 18px 18px;
}

/* Ergebnisse besser ausnutzen */
.kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.viz svg {
  height: 250px;
}

.demo {
  grid-template-columns: minmax(240px, 310px) minmax(0, 1fr);
}

/* Formulare */
.row {
  gap: 12px;
}

input,
select {
  width: 100%;
}

.table {
  table-layout: fixed;
}

/* Mobil */
@media (max-width: 1050px) {
  .wrap {
    width: min(100% - 28px, 900px);
  }

  header {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    padding-right: 0;
  }

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

  .grid > .card:first-child {
    position: static;
  }
}

@media (max-width: 650px) {
  .wrap {
    width: calc(100% - 20px);
    padding-top: 12px;
  }

  header {
    padding: 20px 16px;
  }

  .row,
  .row3,
  .kpis,
  .demo .dgrid {
    grid-template-columns: 1fr;
  }

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

/* Eingaben scrollen, Ergebnis bleibt sichtbar */
.grid > .card:first-child {
  position: static;
}

.grid > .card:last-child {
  position: sticky;
  top: 18px;
  align-self: start;
}

@media (max-width: 1050px) {
  .grid > .card:last-child {
    position: static;
  }
}


/* =========================================================
   CKOEPPEN Toolbox – zentrale Sidebar
   ========================================================= */

.recognition-tool-content {
  width: 100%;
  min-width: 0;
  padding: 28px 38px 60px;
  box-sizing: border-box;
}

.recognition-tool-content > * {
  max-width: none;
}

@media (max-width: 900px) {
  .recognition-tool-content {
    padding: 20px 16px 40px;
  }
}

@media print {
  #cko-sidebar,
  #cko-topbar {
    display: none !important;
  }

  .main {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .recognition-tool-content {
    padding: 0 !important;
  }
}


/* =========================================================
   Phase 3 – Suite Header, Breadcrumb und Hinweise
   ========================================================= */

.tool-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
}

.tool-breadcrumb a {
  color: #8dbdff;
  text-decoration: none;
}

.tool-breadcrumb a:hover {
  color: #ffffff;
}

.tool-breadcrumb span:last-child {
  color: #dce8fb;
}

.tool-hero {
  overflow: hidden;
}

.tool-hero::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 10px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    #36a3ff,
    #53e0b3
  );
}

.tool-hero .title::before {
  content: "VIDEO SECURITY SUITE";
  display: block;
  margin-bottom: 8px;
  color: #78b7ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px 16px;
  background: rgba(20, 112, 83, 0.16);
  border: 1px solid rgba(70, 214, 164, 0.32);
  border-radius: 14px;
}

.privacy-note-icon {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(70, 214, 164, 0.18);
  color: #63e8b9;
  font-weight: 900;
}

.privacy-note strong {
  display: block;
  margin-bottom: 3px;
  color: #dffdf3;
  font-size: 13px;
}

.privacy-note span {
  display: block;
  color: #a9cabc;
  font-size: 12px;
  line-height: 1.5;
}

.calculation-note {
  width: min(1480px, calc(100% - 48px));
  margin: 18px auto 40px;
  padding: 16px 18px;
  background: rgba(7, 20, 38, 0.76);
  border: 1px solid rgba(86, 160, 255, 0.18);
  border-radius: 14px;
  color: #a9b6d6;
  font-size: 12px;
  line-height: 1.55;
}

.calculation-note strong {
  display: block;
  margin-bottom: 5px;
  color: #dbe9ff;
}

.calculation-note p {
  margin: 3px 0;
}

@media (max-width: 650px) {
  .tool-breadcrumb {
    flex-wrap: wrap;
    margin-left: 2px;
  }

  .privacy-note {
    padding: 13px;
  }

  .calculation-note {
    width: calc(100% - 20px);
  }

  .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .top-actions button {
    width: 100%;
  }
}

@media print {
  #cko-sidebar,
  #cko-topbar,
  .tool-breadcrumb,
  .privacy-note,
  .top-actions {
    display: none !important;
  }

  body {
    background: #ffffff !important;
  }

  .main,
  .recognition-tool-content,
  .wrap {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  header,
  .card,
  .calculation-note {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    border-color: #bbbbbb !important;
  }

  .grid {
    display: block !important;
  }

  .grid > .card {
    position: static !important;
    break-inside: avoid;
    margin-bottom: 14px;
  }
}


/* =========================================================
   Phase 3 – Suite Header, Breadcrumb und Hinweise
   ========================================================= */

.tool-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
}

.tool-breadcrumb a {
  color: #8dbdff;
  text-decoration: none;
}

.tool-breadcrumb a:hover {
  color: #ffffff;
}

.tool-breadcrumb span:last-child {
  color: #dce8fb;
}

.tool-hero {
  overflow: hidden;
}

.tool-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(
    180deg,
    #36a3ff,
    #53e0b3
  );
}

.tool-hero .title::before {
  content: "VIDEO SECURITY SUITE";
  display: block;
  margin-bottom: 8px;
  color: #78b7ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px 16px;
  background: rgba(20, 112, 83, 0.16);
  border: 1px solid rgba(70, 214, 164, 0.32);
  border-radius: 14px;
}

.privacy-note-icon {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(70, 214, 164, 0.18);
  color: #63e8b9;
  font-weight: 900;
}

.privacy-note strong {
  display: block;
  margin-bottom: 3px;
  color: #dffdf3;
  font-size: 13px;
}

.privacy-note span {
  display: block;
  color: #a9cabc;
  font-size: 12px;
  line-height: 1.5;
}

.calculation-note {
  width: min(1480px, calc(100% - 48px));
  margin: 18px auto 40px;
  padding: 16px 18px;
  background: rgba(7, 20, 38, 0.76);
  border: 1px solid rgba(86, 160, 255, 0.18);
  border-radius: 14px;
  color: #a9b6d6;
  font-size: 12px;
  line-height: 1.55;
}

.calculation-note strong {
  display: block;
  margin-bottom: 5px;
  color: #dbe9ff;
}

.calculation-note p {
  margin: 3px 0;
}

@media (max-width: 650px) {
  .tool-breadcrumb {
    flex-wrap: wrap;
    margin-left: 2px;
  }

  .privacy-note {
    padding: 13px;
  }

  .calculation-note {
    width: calc(100% - 20px);
  }

  .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .top-actions button {
    width: 100%;
  }
}

@media print {
  #cko-sidebar,
  #cko-topbar,
  .tool-breadcrumb,
  .privacy-note,
  .top-actions {
    display: none !important;
  }

  body {
    background: #ffffff !important;
  }

  .main,
  .recognition-tool-content,
  .wrap {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  header,
  .card,
  .calculation-note {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    border-color: #bbbbbb !important;
  }

  .grid {
    display: block !important;
  }

  .grid > .card {
    position: static !important;
    break-inside: avoid;
    margin-bottom: 14px;
  }
}

.tool-hero {
  padding-left: 34px;
}


/* =========================================================
   Seitenkopf wie Videospeicher-Rechner
   ========================================================= */

.tool-hero,
.tool-hero::before {
  display: none !important;
}

.tool-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 10px 2px 24px;
}

.tool-page-heading {
  min-width: 0;
  max-width: 1080px;
}

.tool-eyebrow {
  margin-bottom: 12px;
  color: #3f8cff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.tool-page-header h1 {
  margin: 0;
  color: #f4f7ff;
  font-size: clamp(34px, 4vw, 49px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.tool-page-description {
  max-width: 1080px;
  margin: 12px 0 0;
  color: #aab8ce;
  font-size: 16px;
  line-height: 1.55;
}

.tool-page-description strong {
  color: #c4cede;
}

.tool-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.tool-version {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  color: #b9c8dc;
  font-size: 12px;
  border: 1px solid rgba(117, 153, 198, 0.35);
  border-radius: 999px;
  background: rgba(8, 24, 43, 0.5);
}

.tool-header-divider {
  height: 1px;
  margin-bottom: 28px;
  background: rgba(104, 139, 183, 0.22);
}

.privacy-note {
  margin-bottom: 26px;
  padding: 17px 18px;
  background:
    linear-gradient(
      90deg,
      rgba(3, 54, 45, 0.82),
      rgba(3, 39, 42, 0.72)
    );
  border-color: rgba(17, 181, 112, 0.45);
  border-radius: 15px;
}

.privacy-note-icon {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  border-radius: 11px;
  background: rgba(0, 116, 73, 0.32);
  color: #67e8b4;
  font-size: 19px;
}

.privacy-note strong {
  margin-bottom: 5px;
  color: #ffffff;
  font-size: 14px;
}

.privacy-note span {
  color: #a9c8c2;
  font-size: 14px;
}

@media (max-width: 1050px) {
  .tool-page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .tool-page-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 650px) {
  .tool-page-header h1 {
    font-size: 32px;
  }

  .tool-page-description {
    font-size: 14px;
  }

  .tool-page-actions {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr 1fr;
  }
}
