:root {
    --bg: #FFFFFF;
    --panel: #303E51;
    --accent: #214D42;
    --accent-2: #798F76;
    --text: #303E51;
    --muted: #9ca3af;
    --danger: #ef4444;
    --border: #1f2937;
}

* {
    box-sizing: border-box;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
}

.app-shell {
    background: var(--panel);      /* dunkles L */
    border-bottom-right-radius: 16px;
    overflow: hidden;              /* alles sauber „abgeschnitten“ */
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

.login-screen{
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  background-color: #ffffff; /* fallback */
  background-image: url("/static/login-wave.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover; /* oder 100% 100% wenn du es stretchen willst */
}

.centered-card {
    max-width: 420px;
    width: 80%;
    margin: 0;
    padding: 40px;
    background: #F5F8FA;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    text-align: center;
    color: #214D42;
    position:relative; 
    z-index:1;
}

/* Hintergrund-Logo auf Login Seite*/
#background-logo {
    position: absolute;
    top: 30px;
    left: 30px;
}

#background-logo img {
    height: 40px;
    width: auto;
}

#company-info {
    position: absolute;
    bottom: 5px;
    left: 50%; 
    transform: translateX(-50%);
    
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 400;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.form-control {
    text-align: left;
    margin-bottom: 16px;
    color: #214D42;
}

.form-control label {
    display: block;
    margin-bottom: 6px;
    color: #214D42;
}

.form-control input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #FFFFFF;
    color: #214D42;
}

button {
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

button:active {
    transform: translateY(1px);
}

button.primary {
    background: #214D42;
    color: #FFFFFF;
}

button.secondary {
    background: #214D42;
    color: #FFFFFF;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: transparent;
}

.brand {
    font-weight: 500;
    font-size: 25px;
    color: #FFFFFF;
}

/* Logo-Bereich im Header 
.logo-area{
  display: flex;
  align-items: center;
  justify-content: center;

  background: #fff;
  padding: 6px 10px;
  border-radius: 12px;

  box-shadow: 0 6px 18px rgba(0,0,0,.15);
  border: 1px solid rgba(48,62,81,.12);
}*/

.logo-area img{
  height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
}

.layout {
    display: grid;
    grid-template-columns: 50px 1fr;
    min-height: calc(100vh - 60px);
}

.side-bar {
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 12px;
}

.icon-button {
    width: 48px;
    height: 48px;
    background: transparent;
    border: 1px solid #303E51;
    display: grid;
    place-items: center;
    border-radius: 12px;
}

.icon-button img {
    height: 24px;
}

.content {
    padding: 24px;
    background: #FFFFFF;
    border-top-left-radius: 10px;  /* die „innere“ Rundung */
    display: flex;
    flex-direction: column;
}

.card {
    background: #FFFFFF;
    border: 1px solid #FFFFFF;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.button-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.rapport-output {
    position: relative;
    white-space: normal;
    background: #F5F8FA;
    border-radius: 10px;
    padding: 12px;
    margin-top: 12px;
    min-height: 200px;
    overflow: auto;
}

#rapport-output {
    font-size: 14px;
    line-height: 1.4; 
}

#rapport-output h1,
#rapport-output h2,
#rapport-output h3 {
    margin-top: 16px;   /* Abstand vor einer neuen Sektion */
    margin-bottom: 2px; /*Abstand zur nächsten Zeile */
    font-size: 16px;
}

#rapport-content{
  white-space: normal; /* wichtig */
}

/* aber Codeblöcke sollen weiterhin korrekt umbrechen */
#rapport-content pre{
  white-space: pre;     /* oder pre-wrap, je nach Wunsch */
  overflow: auto;
}

.copy-button {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 6px;
    background: #214D42;
    color: #ffffff;
    border: none;
    cursor: pointer;
    opacity: 0.4;
}

.copy-button:hover {
    opacity: 0.7;
}

.template-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.template-card {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 10px;
    background: #F5F8FA;
}

.template-card select {
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #FFFFFF;
    color: #303E51;
}

.template-card .icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.insert-line {
    height: 5px;
    background: #303E51;        /* standard: unsichtbar */
    opacity: 0.05;
    position: relative;
    cursor: pointer;                /* optional */
}

.insert-line .plus {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 4px;
    border-radius: 50%;
    height: 25px;
    width: 25px;
    opacity: 0.1;                     /* unsichtbar */
    pointer-events: none;           /* nicht klickbar wenn unsichtbar */
    background: #FFFFFF;
}

/* Beim Hover: Linie + Plus zeigen */
.insert-line:hover {
    opacity: 0.8;            /* Linie wird sichtbar */
}

.insert-line:hover .plus {
    opacity: 1;                     /* Plus wird sichtbar */
    pointer-events: auto;           /* jetzt klickbar */
}

#save-template {
    margin-top: 20px;  /* oder 30, 40, was gut aussieht */
}

.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}

.modal-content{
  position: relative;
  width: min(640px, 92vw);
  background: #FFFFFF;
  border-radius: 14px;
  box-shadow: 0 20px 80px rgba(0,0,0,.35);
  padding: 22px 22px 18px;
  color: var(--text);
}

.modal-close{
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid rgba(48,62,81,.2);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.modal-paragraph{
  margin: 10px 0 14px;
  font-size: 14px;
  line-height: 1.4;
}

.modal-feature{
  display: flex;
  align-items: center;
  gap: 12px;
  background: #F5F8FA;
  border-radius: 12px;
  padding: 18px;
  margin: 10px 0;
}

.modal-icon{
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.modal-feature-title{
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  margin-left: 10px;
}

.modal-feature-desc{
  font-size: 13px;
  opacity: .85;
  margin-top: 4px;
  margin-left: 10px;
}

.modal-footer{
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.button-row{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.upload-button{
  padding: 10px 14px;
  border-radius: 10px;
  background: #F5F8FA;
  border: 1px solid rgba(48,62,81,.2);
  color: #214D42;
  font-weight: 600;
}

.upload-button:hover{ opacity: .9; }

#generate-button{
  margin-left: auto;
}

/* Record-Kreis-Button */
.record-circle{
  width: 54px;
  height: 54px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: #214D42;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
  transition: transform .08s ease, background .15s ease, box-shadow .2s ease;
}

.record-circle img{
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: brightness(0) invert(1); /* Icon weiss */
}

/* Zustand: Recording läuft */
.record-circle.is-recording{
  background: #ef4444; /* rot */
}

.record-circle:hover{ box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.record-circle:active{ transform: translateY(1px); }

.loading{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.spinner{
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(48,62,81,.25); /* “heller” Ring */
  border-top-color: #214D42;            /* Akzent */
  animation: spin 0.8s linear infinite;
}

@keyframes spin{
  to { transform: rotate(360deg); }
}

.loading-text{
  font-size: 14px;
  color: rgba(48,62,81,.8);
}