body {
  font-family: Arial, sans-serif;
  max-width: 1100px;
  margin: 30px auto;
  padding: 20px;
  background-color: #f4f4f4;
  color: #222;
}

h1, h2, h3 {
  color: #333;
}

.box {
  background: white;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

label {
  display: block;
  margin: 12px 0 6px;
  font-weight: bold;
}

input,
select,
textarea,
button {
  padding: 10px;
  width: 100%;
  font-size: 16px;
  box-sizing: border-box;
  margin-bottom: 10px;
}

button {
  cursor: pointer;
  background: #2f6fed;
  color: white;
  border: none;
  border-radius: 6px;
}

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

.meal,
.card {
  padding: 15px;
  background: #eef6ee;
  border-radius: 8px;
  margin-bottom: 12px;
}

.not-allowed {
  background: #fdeeee;
}

.warning {
  color: darkred;
  font-weight: bold;
}

.small {
  font-size: 14px;
  color: #555;
}

ul {
  padding-left: 20px;
}

.tagline {
  margin-top: 4px;
  color: #444;
  font-size: 14px;
}

@media (max-width: 800px) {
  .result-grid {
    grid-template-columns: 1fr;
  }
}

.recipe-detail {
  margin-top: 10px;
  padding: 12px;
  background: #f7f7f7;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.recipe-detail h4 {
  margin: 10px 0 6px;
  font-size: 15px;
  color: #333;
}

.detail-button {
  margin-top: 8px;
  width: auto;
  padding: 8px 12px;
  font-size: 14px;
  background: #666;
}

.detail-button:hover {
  background: #4f4f4f;
}

.detail-list {
  margin: 6px 0 0 18px;
  padding: 0;
}

.detail-list li {
  margin-bottom: 4px;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 16px;
  margin-top: 8px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: normal;
  background: #f7f7f7;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin: 0;
}



.result-summary-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

#openPrintViewButton {
  width: auto;
  min-width: 220px;
  margin: 0;
  background: #f7b267;
  color: #7a3e00;
  border: 1px solid #efc08a;
}

#openPrintViewButton:hover {
  background: #f3a952;
  color: #6a3400;
  border-color: #e2ab6a;
}

@media (max-width: 800px) {
  .result-summary-actions {
    justify-content: stretch;
  }

  #openPrintViewButton {
    width: 100%;
    min-width: 0;
  }
}



@media print {
  body {
    background: white;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  button {
    display: none !important;
  }

  .detail-button {
    display: none !important;
  }

  .recipe-detail {
    display: block !important;
  }

  .result-grid {
    display: block;
  }

  .card,
  .box,
  .meal {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none;
  }
}

/* =========================
   LOGIN PAGE
   ========================= */

.login-page {
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(248, 192, 34, 0.10), transparent 32%),
    radial-gradient(circle at bottom right, rgba(234, 99, 31, 0.08), transparent 28%),
    linear-gradient(135deg, #f8faf6 0%, #ffffff 45%, #f4f8ef 100%);
  color: #243127;
}

.login-shell {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 36px 20px;
}

.login-page-wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.login-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 24px;
}

.login-layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 28px;
  align-items: stretch;
}

.login-brand-card,
.login-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 24px;
  border: 1px solid rgba(91, 123, 55, 0.12);
  box-shadow: 0 18px 42px rgba(61, 82, 40, 0.10);
}

.login-brand-card {
  padding: 44px;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
}

.login-brand-card::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -90px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(248, 192, 34, 0.10);
}

.login-brand-card::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(91, 123, 55, 0.08);
}

.login-card {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-top: 6px solid #5B7B37;
  background: rgba(255, 255, 255, 0.98);
}

.brand-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.login-logo {
  width: 90px;
  height: auto;
  margin-bottom: 10px;
  display: block;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(248, 192, 34, 0.18);
  color: #8a6400;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand-title {
  position: relative;
  z-index: 1;
  margin: 0 0 14px;
  font-family: "Philosopher", serif;
  font-size: 42px;
  line-height: 1.05;
  color: #5B7B37;
}

.brand-lead {
  position: relative;
  z-index: 1;
  margin: 0 0 26px;
  font-size: 18px;
  line-height: 1.65;
  color: #4d5f51;
  max-width: 620px;
}

.info-panel {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  padding: 24px 24px 20px;
  background: linear-gradient(180deg, #f9fcf6 0%, #f4f8ef 100%);
  border: 1px solid rgba(91, 123, 55, 0.14);
  border-radius: 20px;
}

.info-panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
  color: #5B7B37;
}

.info-list {
  margin: 0;
  padding-left: 20px;
  color: #425347;
}

.info-list li {
  margin-bottom: 8px;
  line-height: 1.55;
}

.medical-note {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #fff8f2 0%, #fffdf9 100%);
  border-left: 4px solid #EA631F;
  border-radius: 16px;
  color: #7a4a22;
  line-height: 1.65;
  box-shadow: 0 10px 24px rgba(234, 99, 31, 0.06);
}

.login-card-header h2 {
  margin: 0 0 8px;
  font-family: "Philosopher", serif;
  font-size: 30px;
  color: #5B7B37;
}

.login-card-header p {
  margin: 0 0 22px;
  color: #5e6f62;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  margin-bottom: 8px;
  color: #3b4d3f;
  font-weight: 700;
}

.login-card input[type="password"] {
  height: 54px;
  border: 1px solid #d4decf;
  border-radius: 14px;
  background: #fcfdfb;
  padding: 12px 14px;
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 110px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: auto;
  min-width: 88px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(91, 123, 55, 0.18);
  border-radius: 10px;
  background: #f7faf4;
  color: #5B7B37;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.password-toggle:hover {
  background: #eef5e8;
}

.password-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.login-card input[type="password"],
.login-card input[type="text"] {
  height: 54px;
  border: 1px solid #d4decf;
  border-radius: 14px;
  background: #fcfdfb;
  padding: 12px 14px;
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-card input[type="password"]:focus,
.login-card input[type="text"]:focus {
  outline: none;
  border-color: #5B7B37;
  box-shadow: 0 0 0 4px rgba(91, 123, 55, 0.12);
  background: #ffffff;
}

.input-error {
  border-color: #EA631F !important;
  box-shadow: 0 0 0 4px rgba(234, 99, 31, 0.14) !important;
  background: #fffaf8 !important;
}

.login-card .primary-button {
  position: relative;
  height: 54px;
  margin-top: 8px;
  border: none;
  border-radius: 14px;
  background: #EA631F !important;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 10px 22px rgba(234, 99, 31, 0.25);
  transition: all 0.2s ease;
  overflow: hidden;
}

.login-card .primary-button:hover {
  background: #cf5417 !important;
}

.login-card .primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.95;
}

.button-text,
.button-loader {
  display: inline-block;
  vertical-align: middle;
}

.button-loader {
  display: none;
  width: 18px;
  height: 18px;
  margin-left: 10px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: loginSpin 0.8s linear infinite;
}

.primary-button.is-loading .button-loader {
  display: inline-block;
}

.primary-button.is-loading .button-text {
  opacity: 0.95;
}

.login-error {
  margin-top: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fff3f0 0%, #fff8f7 100%);
  border: 1px solid #f0c6bd;
  border-left: 5px solid #EA631F;
  border-radius: 14px;
  color: #9d361f;
  font-weight: 700;
  line-height: 1.5;
  box-shadow: 0 8px 18px rgba(234, 99, 31, 0.08);
}

@keyframes loginSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.login-card input[type="password"]:focus {
  outline: none;
  border-color: #5B7B37;
  box-shadow: 0 0 0 4px rgba(91, 123, 55, 0.12);
  background: #ffffff;
}

.primary-button {
  height: 54px;
  margin-top: 8px;
  border: none;
  border-radius: 14px;
  background: #EA631F;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(234, 99, 31, 0.25);
  transition: all 0.2s ease;
}

.primary-button:hover {
  background: #cf5417;
}

.login-error {
  margin-top: 14px;
  padding: 12px 14px;
  background: #fff2f0;
  border: 1px solid #f2c7bf;
  border-radius: 12px;
  color: #a23a2a;
  font-weight: 700;
}

.login-footer-note {
  margin-top: 18px;
  font-size: 14px;
  color: #6f8173;
  text-align: center;
}

@media (max-width: 900px) {
  .login-layout {
    grid-template-columns: 1fr;
    max-width: 760px;
    margin: 0 auto;
  }

  .login-brand-card,
  .login-card {
    padding: 28px 22px;
  }

  .brand-title {
    font-size: 34px;
  }

  .login-card-header h2 {
    font-size: 26px;
  }

  .login-topbar {
    margin-bottom: 16px;
  }
}

@media (max-width: 560px) {
  .brand-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .login-logo {
    width: 76px;
  }

  .brand-title {
    font-size: 30px;
  }

  .brand-lead {
    font-size: 16px;
  }
}

.hidden {
  display: none !important;
}

.forgot-password-row {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 6px;
}

.login-card .forgot-password-link {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: transparent !important;
  border: none;
  border-radius: 0;
  box-shadow: none;

  color: #6f8173;
  font: inherit;
  font-size: 14px;
  font-weight: 400;

  text-decoration: underline;   /* NEU */
  cursor: pointer;
}

.login-card .forgot-password-link:hover,
.login-card .forgot-password-link:focus,
.login-card .forgot-password-link:active {
  background: transparent !important;
  color: #6f8173 !important;
  text-decoration: underline;   /* bleibt unterstrichen */
  box-shadow: none;
  outline: none;
}

.forgot-password-modal {
  position: fixed;
  inset: 0;
  background: rgba(9, 28, 36, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}

.forgot-password-modal.hidden {
  display: none;
}

.forgot-password-box {
  width: 100%;
  max-width: 560px;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  padding: 28px;
  border: 1px solid rgba(11, 59, 74, 0.08);
}

.forgot-password-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.forgot-password-header h2 {
  margin: 0;
  font-size: 1.6rem;
  color: #0b3b4a;
}

.forgot-password-close {
  width: 40px;
  height: 40px;
  min-width: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(11, 59, 74, 0.15);
  background: #f4f7f8;
  color: #0b3b4a;

  font-size: 20px;
  line-height: 1;          /* WICHTIG: verhindert vertikalen Versatz */
  text-align: center;

  cursor: pointer;
}

.forgot-password-close:hover,
.forgot-password-close:focus,
.forgot-password-close:active {
  background: #f4f7f8 !important;
  color: #0b3b4a !important;
  border-color: rgba(11, 59, 74, 0.15);
  box-shadow: none;
}

.forgot-password-text {
  margin: 0 0 18px 0;
  color: #4f636b;
  line-height: 1.5;
}

.forgot-password-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.register-link {
  color: #EA631F;
  font-weight: 700;
  text-decoration: underline;
  margin-left: 4px;
}

.register-link:hover,
.register-link:focus {
  color: #cf5417;
  text-decoration: underline;
}

.register-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.register-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #2b342d;
  line-height: 1.5;

  font-weight: 400;     /* WICHTIG: nicht fett */
  cursor: pointer;
}

.register-checkbox span {
  font-weight: 400;     /* doppelte Absicherung */
}

.register-checkbox input {
  width: auto;
  margin-top: 3px;
  accent-color: #5B7B37;
}

.register-checkbox .inline-link {
  color: #EA631F !important;
  text-decoration: underline !important;
  font-weight: 600 !important;
  cursor: pointer;

  display: inline;
}

.register-checkbox .inline-link:hover,
.register-checkbox .inline-link:focus,
.register-checkbox .inline-link:active {
  color: #cf5417 !important;
  text-decoration: underline !important;
}



/* =========================
   APP LAYOUT REDESIGN
   ========================= */

body {
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top left, rgba(248, 192, 34, 0.10), transparent 28%),
    radial-gradient(circle at bottom right, rgba(234, 99, 31, 0.07), transparent 24%),
    linear-gradient(135deg, #f8faf6 0%, #ffffff 48%, #f3f7ee 100%);
  color: #2b342d;
}

.app-shell {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 20px 40px;
  box-sizing: border-box;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.app-header-left {
  min-width: 0;
}

.app-brand-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.app-logo {
  width: 78px;
  height: auto;
  flex-shrink: 0;
}

.app-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.app-logo-link:hover {
  opacity: 0.92;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(248, 192, 34, 0.18);
  color: #8a6400;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin-bottom: 10px;
}

.app-header-left h1 {
  margin: 0;
  font-family: "Philosopher", serif;
  font-size: 40px;
  line-height: 1.05;
  color: #5B7B37;
}

.app-subtitle {
  margin: 14px 0 0;
  max-width: 820px;
  color: #56685a;
  font-size: 17px;
  line-height: 1.65;
}

.app-header-right {
  display: flex;
  align-items: flex-start;
}

.hero-panel {
  margin-bottom: 24px;
}

.hero-card,
.hero-note,
.content-panel {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(91, 123, 55, 0.12);
  border-radius: 22px;
  box-shadow: 0 18px 42px rgba(61, 82, 40, 0.08);
}

.hero-card {
  padding: 26px 28px;
}

.hero-card h2 {
  margin: 0 0 10px;
  color: #5B7B37;
  font-size: 24px;
}

.hero-card p {
  margin: 0;
  color: #55665a;
  line-height: 1.7;
}

.hero-note {
  padding: 22px 24px;
  background: #fff8f2;
  border-color: rgba(234, 99, 31, 0.18);
  color: #7a4a22;
  line-height: 1.6;
}

/* =========================
   HERO PATIENT CARD
   ========================= */

.hero-patient-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(91, 123, 55, 0.12);
  border-radius: 22px;
  box-shadow: 0 18px 42px rgba(61, 82, 40, 0.08);
  padding: 24px 26px;
}

.hero-patient-photo-column {
  width: 220px;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-patient-photo-trigger {
  width: 220px;
  max-width: 220px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.hero-patient-photo-trigger:hover,
.hero-patient-photo-trigger:focus,
.hero-patient-photo-trigger:active {
  background: transparent;
  box-shadow: none;
  outline: none;
}

.hero-patient-photo-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #dfe7d9;
  background: #f7faf4;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.hero-patient-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-patient-photo-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 14px;
  background: rgba(31, 41, 55, 0.72);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hero-patient-photo-trigger:hover .hero-patient-photo-overlay,
.hero-patient-photo-trigger:focus .hero-patient-photo-overlay {
  opacity: 1;
}

.hero-patient-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-patient-name {
  margin: 0;
  font-family: "Philosopher", serif;
  font-size: 34px;
  line-height: 1.1;
  color: #2f3c32;
}

.hero-patient-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-patient-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.hero-patient-meta-label {
  font-size: 14px;
  font-weight: 700;
  color: #6b7c6e;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.hero-patient-meta-value {
  font-size: 18px;
  font-weight: 600;
  color: #2f3c32;
}

.hero-patient-operation-type .form-section-title {
  margin: 0;
  padding: 0;
}

.hero-patient-operation-type .form-section-title span {
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 12px;
}

@media (max-width: 900px) {
  .hero-patient-card {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .hero-patient-photo-column,
  .hero-patient-photo-trigger,
  .hero-patient-photo-wrap {
    width: 220px;
    max-width: 220px;
  }

  .hero-patient-name {
    font-size: 28px;
  }
}

.hero-patient-name {
  color: #5B7B37;
}

.hero-patient-meta-label {
  color: #5B7B37;
}

.hero-patient-meta-value {
  color: #5B7B37;
}

.hero-patient-card {
  grid-template-columns: 220px minmax(0, 1fr) 190px;
}

.hero-patient-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: stretch;
  justify-content: center;
}

.hero-status-button,
.hero-delete-button {
  width: 100%;
  margin: 0;
  padding: 11px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}

.hero-status-button {
  background: #f6f9f2;
  color: #5B7B37;
  border: 1px solid #d9e4d1;
}

.hero-status-button:hover {
  background: #edf4e7;
}

.hero-delete-button {
  background: #fff4f2;
  color: #a23a2a;
  border: 1px solid #f0c7bf;
}

.hero-delete-button:hover:not(:disabled) {
  background: #fdeeee;
}

.hero-status-button:disabled,
.hero-delete-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hero-patient-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
}

.hero-patient-status-row {
  display: flex;
  align-items: center;
}

.hero-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 94px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
}

.hero-status-badge--active {
  background: #f3f6ef;
  color: #5B7B37;
  border-color: #cddbb2;
}

.hero-status-badge--inactive {
  background: #fff4f2;
  color: #a23a2a;
  border-color: #f0c7bf;
}

.customer-delete-modal-box {
  max-width: 560px;
}

.customer-delete-modal-text {
  margin: 0 0 22px;
  color: #435446;
  line-height: 1.6;
}

.customer-delete-confirm-button {
  background: #EA631F;
}

@media (max-width: 900px) {
  .hero-patient-card {
    grid-template-columns: 1fr;
  }

.hero-patient-info {
  order: 2;
}

.hero-patient-actions {
  order: 3;
}

  .hero-patient-meta-grid {
    grid-template-columns: 1fr;
  }
}

.app-main-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: stretch;
}

.content-panel {
  padding: 0;
  overflow: hidden;
}

.panel-header {
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(91, 123, 55, 0.10);
  background: linear-gradient(180deg, #fdfefb 0%, #f7faf2 100%);
}

.panel-header h2 {
  margin: 0 0 6px;
  font-size: 24px;
  color: #5B7B37;
}

.panel-header p {
  margin: 0;
  color: #66776b;
  line-height: 1.5;
}

.form-section {
  padding: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 22px;
}

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

.form-section-title {
  margin: 4px 0 14px;
  padding: 0 2px;
}

.form-section-title span {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(91, 123, 55, 0.14);
  color: #5B7B37;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.form-section-title-orange span {
  background: rgba(234, 99, 31, 0.14);
  color: #EA631F;
}

.form-grid .box {
  margin-bottom: 0;
}

.box-full {
  grid-column: 1 / -1;
}

.result-panel {
  position: static;
}

.result-body {
  padding: 22px;
  min-height: 260px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcf8 100%);
}

.box {
  background: #ffffff;
  padding: 18px;
  border-radius: 16px;
  margin-bottom: 18px;
  border: 1px solid #e5ece0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.box:hover {
  border-color: #d6e3cd;
  box-shadow: 0 10px 24px rgba(91, 123, 55, 0.05);
}

label {
  display: block;
  margin: 0 0 8px;
  font-weight: 700;
  color: #3d4d40;
}

input,
select,
textarea,
button {
  font-size: 16px;
}

input,
select,
textarea {
  border: 1px solid #5B7B37;
  border-radius: 8px;
  background: #fff;
}

input,
select {
  padding: 12px 14px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0;
  border: 1px solid #d3ddcd;
  border-radius: 12px;
  background: #fcfdfb;
  color: #2b342d;
}

textarea {
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  min-height: 140px;
  resize: vertical;
}

input:focus,
select:focus {
  outline: none;
  border-color: #5B7B37;
  box-shadow: 0 0 0 4px rgba(91, 123, 55, 0.12);
  background: #ffffff;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 12px;
}

.primary-button {
  background: #EA631F;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 10px 22px rgba(234, 99, 31, 0.22);
  transition: all 0.2s ease;
}

.primary-button:hover {
  background: #cf5417;
}

.secondary-button {
  width: auto;
  min-width: 150px;
  padding: 12px 18px;
  background: #f6f9f2;
  color: #5B7B37;
  border: 1px solid #d9e4d1;
  font-weight: 700;
}

.secondary-button:hover {
  background: #edf4e7;
}

.logout-button {
  min-width: 170px;
}

.form-actions {
  margin-top: 10px;
}

.form-actions .primary-button {
  width: 100%;
  padding: 15px 18px;
  min-height: 56px;
  background: #EA631F;
  box-shadow: 0 10px 22px rgba(234, 99, 31, 0.22);
  position: relative;
  overflow: hidden;
}

.form-actions .primary-button:hover {
  background: #cf5417;
}

.form-actions .primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.95;
}

.button-text,
.button-loader {
  display: inline-block;
  vertical-align: middle;
}

.button-loader {
  display: none;
  width: 18px;
  height: 18px;
  margin-left: 10px;
  border: 2px solid rgba(255, 255, 255, 0.40);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: planButtonSpin 0.8s linear infinite;
}

.primary-button.is-loading .button-loader {
  display: inline-block;
}

.primary-button.is-loading .button-text {
  opacity: 0.96;
}

@media (max-width: 980px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 16px;
  margin-top: 10px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-weight: 500;
  color: #435446;
  background: #fafcf8;
  border: 1px solid #e4ebe0;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.checkbox-group label:hover {
  background: #f4f8ef;
  border-color: #d6e3cd;
  transform: translateY(-1px);
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: #5B7B37;
}

.meal,
.card {
  padding: 16px;
  background: #f7fbf3;
  border: 1px solid #dde8d6;
  border-radius: 14px;
  margin-bottom: 14px;
}

.not-allowed {
  background: #fff6f4;
  border-color: #f1d7cf;
}

.tagline {
  margin-top: 6px;
  color: #54665a;
  font-size: 14px;
}

.small {
  font-size: 13px;
  color: #6a7d6d;
  margin-top: 10px;
}

.warning {
  color: #a23a2a;
  font-weight: 700;
}

.recipe-detail {
  margin-top: 12px;
  padding: 14px;
  background: #fcfdfb;
  border-radius: 12px;
  border: 1px solid #e1e9dc;
}

.recipe-detail h4 {
  margin: 12px 0 6px;
  font-size: 15px;
  color: #5B7B37;
}

.detail-button {
  margin-top: 10px;
  width: auto;
  padding: 8px 12px;
  font-size: 14px;
  background: #5B7B37;
  color: white;
  border-radius: 10px;
}

.detail-button:hover {
  background: #4f6b31;
}

.detail-list {
  margin: 6px 0 0 18px;
  padding: 0;
}

.detail-list li {
  margin-bottom: 4px;
}

.result-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.result-summary-header h2,
.result-summary-header h3 {
  margin: 0;
}

.result-summary-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
  padding-right: 4px;
}

#openPrintViewButton {
  width: auto;
  min-width: 220px;
  margin: 0;
}

.result-summary h2,
.result-plan h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 22px;
  color: #5B7B37;
}

.result-summary-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.result-block.box {
  padding: 24px 26px;
  border: 1px solid #dfe7d9;
  box-shadow: none;
}

.result-block h2 {
  margin: 0 0 18px;
  font-size: 22px;
  color: #5B7B37;
}

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

.result-kpi-card {
  background: linear-gradient(180deg, #fbfcf8 0%, #f5f9f1 100%);
  border: 1px solid #dbe6d3;
  border-radius: 16px;
  padding: 18px;
}

.result-kpi-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25px;
  color: #6b7c6e;
  margin-bottom: 8px;
}

.result-kpi-value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  color: #2f3c32;
}

.result-kpi-phase {
  color: #5B7B37;
}

.result-kpi-subvalue {
  margin-top: 10px;
}

.result-info-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-line {
  margin-bottom: 0;
  line-height: 1.6;
  color: #5B7B37;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf2e8;
}

.result-line:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.result-line strong {
  font-weight: 700;
  color: #5B7B37;
}

.result-notes-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.result-note {
  padding: 16px 18px;
  border-radius: 14px;
  line-height: 1.55;
}

.result-note-warning {
  background: #fff8f2;
  border-left: 4px solid #EA631F;
  color: #7a4a22;
}

.result-note-neutral {
  background: #f8fbf4;
  border-left: 4px solid #5B7B37;
  color: #425347;
}

.result-line {
  margin-bottom: 7px;
  line-height: 1.5;
  color: #5B7B37;
}

.result-line strong {
  font-weight: 700;
  color: #5B7B37;
}

.bmi-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid transparent;
  vertical-align: middle;
}

.bmi-badge--red {
  background: #fdf2f2;
  color: #b42318;
  border-color: #f5c2c0;
}

.bmi-badge--green {
  background: #f3f6ef;
  color: #5B7B37;
  border-color: #cddbb2;
}

.bmi-badge--orange {
  background: #fff6ed;
  color: #b45309;
  border-color: #f5d0a6;
}

.bmi-badge--neutral {
  background: #f3f4f6;
  color: #4b5563;
  border-color: #d1d5db;
}

.result-plan {
  margin-top: 10px;
}

.result-plan h2 {
  font-size: 24px;
  line-height: 1.25;
}

.result-summary.box,
.result-plan.box {
  border: 1px solid #dfe7d9;
  box-shadow: none;
}

.result-summary.box {
  padding: 24px 26px;
}

.result-plan.box {
  padding: 24px 26px;
}

@media (max-width: 1100px) {
  .hero-panel {
    grid-template-columns: 1fr;
  }
}

.form-panel,
.result-panel {
  width: 100%;
}

@media (max-width: 780px) {
  .app-header {
    flex-direction: column;
    align-items: stretch;
  }

  .app-header-left h1 {
    font-size: 32px;
  }

  .panel-header h2,
  .hero-card h2 {
    font-size: 22px;
  }

  .app-shell {
    padding: 20px 14px 30px;
  }

  .form-section,
  .result-body {
    padding: 16px;
  }

  .panel-header,
  .hero-card,
  .hero-note {
    padding: 18px;
  }

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

.result-block.box {
  padding: 18px;
}

.result-kpi-value {
  font-size: 21px;
}

  .app-brand-row {
    align-items: flex-start;
  }

  .app-logo {
    width: 64px;
  }
}

@keyframes planButtonSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

input[type="checkbox"]:disabled + span,
input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.checkbox-group label:has(input:disabled) {
  opacity: 0.52;
  cursor: not-allowed;
  background: #f2f4f1;
  border-color: #e1e5de;
}

.checkbox-group input[type="checkbox"]:disabled {
  cursor: not-allowed;
}

.ayuno-hint {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(248, 192, 34, 0.12);
  border-left: 4px solid #F8C022;
  border-radius: 10px;
  color: #7a6400;
  font-weight: 600;
}

.diet-conflict-hint {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(234, 99, 31, 0.10);
  border-left: 4px solid #EA631F;
  border-radius: 10px;
  color: #9a3f16;
  font-weight: 600;
}

.checkbox-group label:has(input[name="dietas"]:disabled) {
  opacity: 0.52;
  cursor: not-allowed;
  background: #f4f4f2;
  border-color: #e4e2dd;
}

.activity-inline-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.activity-inline-field {
  min-width: 0;
}

.activity-inline-field .small {
  margin-top: 8px;
}

@media (max-width: 780px) {
  .activity-inline-fields {
    grid-template-columns: 1fr;
  }
}
.field-error {
  border-color: #d93025 !important;
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.12) !important;
  background: #fffafa !important;
}

.box-error {
  border-color: #d93025 !important;
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.08);
}

.field-error-message {
  margin-top: 8px;
  font-size: 13px;
  color: #b3261e;
  font-weight: 600;
}

.checkbox-group.field-error {
  border: 1px solid #d93025;
  border-radius: 12px;
  padding: 10px;
  background: #fffafa;
}

.protein-note {
  margin-top: 14px;
  padding: 16px 18px;
  background: #fff8f2;
  border-left: 4px solid #EA631F;
  border-radius: 14px;
  color: #7a4a22;
  line-height: 1.55;
}

.recipe-edit-textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  margin-top: 6px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #d3ddcd;
  border-radius: 10px;
  background: #ffffff;
  color: #2b342d;
  box-sizing: border-box;
  font-size: 14px;
  line-height: 1.5;
}

.recipe-edit-input {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #d3ddcd;
  border-radius: 10px;
  background: #ffffff;
  color: #2b342d;
  box-sizing: border-box;
  font-size: 14px;
}

.recipe-edit-textarea:focus,
.recipe-edit-input:focus {
  outline: none;
  border-color: #5B7B37;
  box-shadow: 0 0 0 3px rgba(91, 123, 55, 0.12);
}

.recipe-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin-top: 8px;
}

.recipe-edit-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #3d4d40;
}

@media (max-width: 780px) {
  .recipe-edit-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .recipe-edit-toggle,
  .recipe-detail-actions {
    display: none !important;
  }

  .recipe-edit-mode textarea,
  .recipe-edit-mode input {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
  }
}

.recipe-detail-top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.recipe-edit-toggle,
.recipe-save-button {
  width: auto;
  min-width: auto;
  margin: 0;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.2;
  border-radius: 10px;
  box-shadow: none;
}

/* Standardzustand: Editar receta = orange */
.recipe-edit-toggle {
  background: #f7b267;
  color: #7a3e00;
  border: 1px solid #efc08a;
}

.recipe-edit-toggle:hover {
  background: #f3a952;
  color: #6a3400;
  border-color: #e2ab6a;
}

/* Editiermodus: Finalizar edición = grün */
.recipe-edit-toggle.edit-active {
  background: #5B7B37;
  color: #ffffff;
  border: 1px solid #4e6a2f;
}

.recipe-edit-toggle.edit-active:hover {
  background: #4f6b31;
  color: #ffffff;
  border-color: #445c2a;
}

/* Guardar cambios = orange/neutral und standardmäßig unsichtbar */
.recipe-save-button {
  display: none;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: #f7b267;
  color: #7a3e00;
  border: 1px solid #efc08a;
}

.recipe-save-button:hover {
  background: #f3a952;
  color: #6a3400;
  border-color: #e2ab6a;
}

.recipe-save-notice {
  margin-top: 0;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: rgba(91, 123, 55, 0.10);
  border-left: 4px solid #5B7B37;
  border-radius: 10px;
  color: #486138;
  font-weight: 600;
}

.recipe-info-warning {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #fff8f2;
  border-left: 4px solid #EA631F;
  border-radius: 10px;
  color: #7a4a22;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
}

.recipe-image-wrap {
  margin-bottom: 14px;
}

.recipe-image {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 14px;
  border: 1px solid #dfe7d9;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  object-fit: cover;
}

.report-module-section {
  margin-top: 8px;
}

.app-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.language-switcher {
  display: flex;
  align-items: center;
}

.language-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 46px;
  padding: 0 10px;
}

.language-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.language-select {
  width: auto;
  min-width: auto;
  padding-right: 4px;
  margin: 0;
  border: none;
  background: transparent;
  color: #5B7B37;
  font-weight: 700;
  box-shadow: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

.language-select:focus {
  border: none;
  box-shadow: none;
  background: transparent;
}

.logout-button {
  min-width: auto;
  height: 46px;
  padding: 0 16px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.user-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
}

.user-menu-toggle {
  width: 46px;
  height: 46px;
  min-width: 46px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f6f9f2;
  border: 1px solid #d9e4d1;
  border-radius: 12px;
  box-shadow: none;
}

.user-menu-toggle:hover {
  background: #edf4e7;
}

.user-menu-toggle.is-open {
  background: #edf4e7;
  border-color: #cddbbf;
}

.user-icon {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 280px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(91, 123, 55, 0.14);
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(61, 82, 40, 0.16);
  z-index: 1200;
}

.user-menu-dropdown.hidden {
  display: none;
}

.user-menu-item {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #5B7B37;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  box-shadow: none;
}

.user-menu-item:hover {
  background: #f4f8ef;
  color: #5B7B37;
}

.user-menu-item-danger {
  color: #a23a2a;
}

.user-menu-item-danger:hover {
  background: #fff4f2;
  color: #8f2f22;
}

@media (max-width: 780px) {
  .user-menu-dropdown {
    right: 0;
    width: min(280px, calc(100vw - 32px));
  }
}

/* =========================
   FOOTER
   ========================= */

.app-footer {
  margin-top: auto;
  padding: 10px 20px 28px;
}

.app-footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.app-footer-brand {
  font-size: 14px;
  font-weight: 700;
  color: #5B7B37;
}

.app-footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.footer-social-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.app-footer-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-link {
  color: #5B7B37;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.footer-link:hover {
  color: #EA631F;
  text-decoration: underline;
}

@media (max-width: 780px) {
  .app-footer {
    margin-top: 24px;
    padding: 8px 14px 4px;
  }

  .app-footer-inner {
    gap: 10px;
  }

  .footer-social-icon {
    width: 22px;
    height: 22px;
  }
}

.footer-link:not(:last-child)::after {
  content: "|";
  margin-left: 18px;
  color: #c5d3bd;
}

/* =========================
   COOKIE POPUP
   ========================= */

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(36, 49, 39, 0.42);
  backdrop-filter: blur(4px);
}

.cookie-modal.hidden {
  display: none;
}

.cookie-box {
  width: min(860px, 100%);
  max-height: min(88vh, 920px);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(91, 123, 55, 0.12);
  border-radius: 24px;
  box-shadow: 0 24px 56px rgba(61, 82, 40, 0.16);
  padding: 26px 26px 22px;
}

.cookie-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.cookie-header h2 {
  margin: 0;
  font-family: "Philosopher", serif;
  font-size: 30px;
  line-height: 1.15;
  color: #5B7B37;
}

.cookie-close-button {
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  border: 1px solid #d8e2d2;
  border-radius: 12px;
  background: #f8fbf5;
  color: #5B7B37;
  font-size: 24px;
  line-height: 1;
  box-shadow: none;
}

.cookie-close-button:hover {
  background: #eef5e8;
}

.cookie-intro {
  margin-bottom: 20px;
  padding: 18px 20px;
  background: linear-gradient(180deg, #fdfefb 0%, #f7faf2 100%);
  border: 1px solid #e2eadb;
  border-radius: 18px;
}

.cookie-intro-text,
.cookie-intro-full p {
  margin: 0;
  color: #55665a;
  font-size: 15px;
  line-height: 1.7;
}

.cookie-intro-full p + p {
  margin-top: 12px;
}

.cookie-intro-full.hidden {
  display: none;
}

.cookie-more-link {
  display: inline;
  margin-left: 6px;
  padding: 0;
  border: none;
  background: transparent;
  color: #EA631F;
  font-size: 15px;
  font-weight: 700;
  text-decoration: underline;
  box-shadow: none;
}

.cookie-more-link:hover {
  color: #cf5417;
  background: transparent;
}

.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cookie-category {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;

  /* Optional für saubere Kante */
  border: 1px solid rgba(0, 0, 0, 0.04);

}

.cookie-category:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.10);
  transform: box-shadow 0.15s ease;
}

.cookie-category-text {
  flex: 1;
  min-width: 0;
}

.cookie-category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 700;
  color: #2f3c32;
}

.cookie-category-text p {
  margin: 0;
  color: #58695c;
  line-height: 1.65;
  font-size: 15px;
}

.cookie-always-on {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(91, 123, 55, 0.14);
  color: #5B7B37;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.cookie-switch {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: 56px;
  height: 32px;
  margin-top: 4px;
}

.cookie-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d8ddd6;
  transition: background 0.2s ease;
  cursor: pointer;
}

.cookie-slider::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  left: 4px;
  top: 4px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
  transition: transform 0.2s ease;
}

.cookie-switch input:checked + .cookie-slider {
  background: #5B7B37;
}

.cookie-switch input:checked + .cookie-slider::before {
  transform: translateX(24px);
}

.cookie-switch.is-disabled {
  opacity: 1;
}

.cookie-switch.is-disabled .cookie-slider {
  cursor: not-allowed;
  background: #5B7B37;
}

.cookie-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.cookie-action-button {
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  box-shadow: none;
}

.cookie-action-secondary {
  background: #ffffff;
  color: #5B7B37;
  border: 2px solid #5B7B37;
}

.cookie-action-secondary:hover {
  background: #f1f6ec;
}

.cookie-action-primary {
  background: #5B7B37;
  color: #ffffff;
  border: 2px solid #5B7B37;
  box-shadow: 0 10px 22px rgba(34, 184, 154, 0.22);
}

.cookie-action-primary:hover {
  background: #4f6b31;
  border-color: #4f6b31;
}

@media (max-width: 780px) {
  .cookie-modal {
    padding: 14px;
    align-items: flex-end;
  }

  .cookie-box {
    width: 100%;
    max-height: 92vh;
    border-radius: 22px 22px 16px 16px;
    padding: 20px 16px 16px;
  }

  .cookie-header h2 {
    font-size: 24px;
  }

  .cookie-category {
    flex-direction: column;
    gap: 14px;
  }

  .cookie-switch {
    align-self: flex-end;
  }

  .cookie-actions {
    grid-template-columns: 1fr;
  }
}
.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  margin-bottom: 10px;
}

.cookie-category-title {
  flex: 1;
}

.cookie-category-text {
  width: 100%;
}

.cookie-switch {
  margin-left: auto;
  flex-shrink: 0;
}

#postReportSymptoms {
  min-height: 130px;
  resize: vertical;
}

label {
  color: #5B7B37;
  font-weight: 700;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #5B7B37;
  box-shadow: 0 0 0 2px rgba(91, 123, 55, 0.15);
}


.post-report-box-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.post-report-box-title {
  margin: 0;
  flex: 1;
}

.post-report-info-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.post-report-info-icon {
  width: 20px;
  height: 20px;
  display: block;
  cursor: pointer;
}

.post-report-tooltip-content {
  position: absolute;
  top: 28px;
  right: 0;
  width: min(650px, 90vw);
  padding: 18px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #dfe7d9;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  color: #5B7B37;
  font-size: 13px;
  line-height: 1.5;
  z-index: 100;
  display: none;
}

.post-report-tooltip-content.active {
  display: block;
}

.tooltip-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.tooltip-table th,
.tooltip-table td {
  padding: 8px 10px;
  border: 1px solid #e5ece0;
  text-align: left;
  vertical-align: top;
}

.tooltip-table th {
  background: #f7faf2;
  color: #5B7B37;
  font-weight: 700;
}

.tooltip-title {
  font-weight: 700;
  color: #5B7B37;
  margin-bottom: 10px;
}

.tooltip-footer {
  margin-top: 12px;
  font-size: 12px;
  color: #56685a;
  line-height: 1.5;
}

.post-report-lab-groups {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.post-report-lab-group {
  padding: 14px 16px;
  border: 1px solid #e5ece0;
  border-radius: 14px;
  background: #fcfdfb;
}

.post-report-subtitle {
  margin-bottom: 12px;
  font-weight: 700;
  color: #5B7B37;
}

.post-report-lab-group .checkbox-group {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: stretch;
}

.post-report-lab-group .checkbox-group label {
  min-height: unset;
  height: auto;
  display: flex;
  align-items: center;
  padding: 6px 8px;
}

.form-section-spacing {
  margin-top: 28px;
}

.post-report-checkup-section {
  margin-top: 18px;
}

.post-report-anthro-head {
  font-weight: 700;
  color: #5B7B37;
}

.post-report-anthro-label {
  font-weight: 700;
  color: #5B7B37;
}

@media (max-width: 780px) {
  .post-report-box-header {
    align-items: center;
  }

  .post-report-tooltip-content {
    right: -8px;
    width: min(360px, 88vw);
  }
}

.full-width-textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #dfe7d9;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
}

.post-report-checkup-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-report-checkup-head,
.post-report-checkup-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 12px;
  align-items: center;
}

.post-report-checkup-head {
  font-weight: 700;
  color: #5B7B37;
  padding: 0 2px 4px;
}

.post-report-checkup-row {
  padding: 12px;
  border: 1px solid #e5ece0;
  border-radius: 12px;
  background: #fcfdfb;
}

.post-report-checkup-row select:disabled {
  background: #f2f4f1;
  color: #6f7b72;
  cursor: not-allowed;
}

@media (max-width: 980px) {
  .post-report-checkup-head {
    display: none;
  }

  .post-report-checkup-row {
    grid-template-columns: 1fr;
  }
}

.post-report-anthro-grid {
  margin-top: 8px;
}

.post-report-toggle-buttons {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: flex-start; 
}

.post-report-toggle-button {
  width: auto;
  min-width: 160px;
  max-width: 220px;
  margin: 0;
  flex: 0 0 auto;
}

.post-report-toggle-button.is-active {
  background: #5B7B37;
  color: #ffffff;
  border: 1px solid #4e6a2f;
}

.post-report-toggle-button.is-active:hover {
  background: #4f6b31;
  color: #ffffff;
  border-color: #445c2a;
}

@media (max-width: 780px) {
  .post-report-toggle-buttons {
    flex-direction: column;
  }

  .post-report-toggle-button {
    width: 100%;
  }
}



.nutritionist-logo-preview {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #dfe7d9;
  border-radius: 12px;
  background: #fcfdfb;
}

.nutritionist-logo-preview img {
  max-width: 140px;
  max-height: 70px;
  width: auto;
  height: auto;
  display: block;
}

#nutricionistaColor {
  text-transform: none;
}

@media (max-width: 980px) {
  #nutricionistaLogo,
  #nutricionistaColor,
  #nutricionistaEmail,
  #nutricionistaCountry {
    width: 100%;
  }
}
/* Risiko-Farblogik */

.risk-ok {
  border: 2px solid #2ecc71;
  background: #eafaf1;
}

.risk-elevated {
  border: 2px solid #f1c40f;
  background: #fff8e6;
}

.risk-high {
  border: 2px solid #e74c3c;
  background: #fdeeee;
}

.calc-hint {
  font-size: 12px;
  color: #888;
  margin-top: -6px;
  margin-bottom: 8px;
}

.anthro-auto-wrap {
  position: relative;
}

.anthro-auto-field {
  padding-right: 72px;
  pointer-events: none;
  cursor: not-allowed;
  background: #f3f5f2;
  color: #4b5a4e;
}

.anthro-auto-field:focus {
  outline: none;
  box-shadow: none;
}

.anthro-auto-badge {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #6c7b6f;
  background: #e7ece5;
  border: 1px solid #d4ddd0;
  border-radius: 999px;
  padding: 3px 8px;
  pointer-events: none;
}

.user-icon {
  width: 22px;
  height: 22px;
  margin: 0 10px;
  vertical-align: middle;
}

.language-switcher {
  display: flex;
  align-items: center;
}

/* =========================
   SECURITY / PRIVACY PAGE
   ========================= */

.security-privacy-card {
  padding: 22px;
}

.security-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.security-section-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.security-section-title-wrap h3 {
  margin: 0;
  font-size: 18px;
  color: #5B7B37;
}

.security-section-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.security-consent-group + .security-consent-group {
  margin-top: 26px;
}

.security-consent-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.security-consent-label-row label {
  margin: 0;
  color: #5B7B37; /* gleich wie Hauptseite */
  font-size: 15px;
  font-weight: 700;
}

.security-info-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
}

.security-info-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.security-select-wrap {
  position: relative;
}

.security-select {
  width: 100%;
  min-height: 50px;
  padding: 12px 44px 12px 14px;
  border: 1px solid #d3ddcd;
  border-radius: 14px;
  background: #fcfdfb;
  color: #2b342d;
  font-size: 15px;
  font-weight: 500;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

.security-select:focus {
  outline: none;
  border-color: #8eb4ff;
  box-shadow: 0 0 0 3px rgba(142, 180, 255, 0.18);
  background: #ffffff;
}

.security-select-wrap::after {
  content: "⌄";
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 18px;
  color: #6f7b72;
  line-height: 1;
}

@media (max-width: 780px) {
  .security-consent-label-row {
    align-items: center;
  }

  .security-section-title-wrap h3 {
    font-size: 17px;
  }
}

.section-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: #e7efe6;
  color: #5B7B37;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.security-section-header {
  margin-top: 24px;
}

.security-section-header:first-child {
  margin-top: 0;
}

.twofactor-modal-box {
  max-width: 560px;
  width: calc(100% - 32px);
  border-radius: 16px;
  overflow: hidden;
  padding: 0;
}

.twofactor-modal-header {
  background: #edf4e7;
  border-bottom: 1px solid #d9e4d1;
  padding: 18px 20px;
}

.twofactor-modal-header .modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.twofactor-modal-header h3 {
  margin: 0;
  color: #5B7B37;
  font-size: 28px;
  line-height: 1.2;
  font-family: "Philosopher", serif;
}

.twofactor-modal-header .modal-icon {
  color: #5B7B37;
  font-size: 20px;
  line-height: 1;
}

.twofactor-modal-close {
  color: #5B7B37;
}

.twofactor-modal-close:hover {
  background: #e4eedb;
  color: #4f6b31;
}

.twofactor-code-input {
  width: 100%;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #d3ddcd;
  border-radius: 10px;
  background: #ffffff;
  color: #2b342d;
  box-sizing: border-box;
  font-size: 16px;
}

.twofactor-code-input:focus {
  outline: none;
  border-color: #5B7B37;
  box-shadow: 0 0 0 3px rgba(91, 123, 55, 0.12);
}

.twofactor-modal-actions {
  justify-content: space-between;
  gap: 12px;
}

.twofactor-confirm-btn {
  background: #EA631F;
  color: #ffffff;
  border: 1px solid #EA631F;
}

.twofactor-confirm-btn:hover {
  background: #cf5417;
  border-color: #cf5417;
}

@media (max-width: 640px) {
  .twofactor-modal-header h3 {
    font-size: 22px;
  }

  .twofactor-modal-actions {
    flex-direction: column-reverse;
  }

  .twofactor-modal-actions .modal-btn {
    width: 100%;
  }
}

/* =========================
   MODAL (DECLINE WARNING)
   ========================= */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 40, 30, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-overlay.hidden {
  display: none;
}

.modal-box {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fde8dd;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-icon {
  font-size: 18px;
  color: #c25b2a;
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
  color: #c25b2a;
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  font-size: 22px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: #c0392b;

  display: flex;
  align-items: center;
  justify-content: center;

  outline: none;
  box-shadow: none;

  transition: all 0.2s ease;
}

.modal-close:hover,
.modal-close:focus,
.modal-close:active {
  color: #7a1c1c;
  background: transparent;
  outline: none;
  box-shadow: none;
}

.modal-body {
  padding: 18px 20px;
  color: #2b342d;
  font-size: 14px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  padding: 16px 20px 20px;
}

.modal-btn {
  width: 120px;              /* vorher ~140 → halbiert */
  padding: 6px 8px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  transition: all 0.2s ease;
}

.modal-btn-secondary {
  background: #EA631F; 
  color: #ffffff;
}

.modal-btn-secondary:hover {
   background: #d97706;  
}

.modal-btn-primary {
  background: #f1caca;   /* deutlich roter */
  color: #7a1c1c;
}

.modal-btn-primary:hover {
     background: #dc3545;   /* starkes Rot */
  color: #ffffff;
}

/* =========================
   SETTINGS PAGE - QUESTIONNAIRE DIET CONFIG
   ========================= */

.settings-selector-trigger {
  width: 100%;
  min-height: 54px;
  padding: 10px 12px;
  background: #fcfdfb;
  border: 1px solid #d3ddcd;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  box-shadow: none;
}

.settings-selector-trigger:hover {
  background: #f7faf4;
  border-color: #c7d5c0;
}

.settings-selector-preview-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef3ea;
  color: #5B7B37;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.settings-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(36, 49, 39, 0.42);
  backdrop-filter: blur(4px);
}

.settings-modal-overlay.hidden {
  display: none;
}

.settings-modal-box {
  width: min(820px, 100%);
  background: rgba(255, 255, 255, 0.99);
  border: 1px solid rgba(91, 123, 55, 0.14);
  border-radius: 20px;
  box-shadow: 0 24px 56px rgba(61, 82, 40, 0.16);
  padding: 22px 22px 20px;
}

.settings-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.settings-modal-header h3 {
  margin: 0;
  font-size: 30px;
  font-family: "Philosopher", serif;
  color: #5B7B37; /* Primärgrün */
}

.settings-modal-close {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: #4b5563;
  font-size: 24px;
  line-height: 1;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.settings-modal-close:hover,
.settings-modal-close:focus,
.settings-modal-close:active {
  background: transparent;
  color: #842029;
  outline: none;
  box-shadow: none;
}

.settings-modal-subtitle {
  margin: 0 0 20px;
  color: #66776b;
  line-height: 1.6;
  font-size: 15px;
}

.settings-diet-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.settings-diet-option-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 16px;
  border: 1px solid #dfe7d9;
  border-radius: 14px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-diet-option-card:hover {
  background: #f8fbf4;
  border-color: #5B7B37;
}

.settings-diet-option-checkbox,
.settings-cuisine-option-checkbox {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: #5B7B37;
  flex-shrink: 0;
}

.settings-cuisine-option-checkbox {
  display: inline-block;
}

.settings-diet-option-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.settings-diet-option-title {
  color: #5B7B37; /* gleiches Grün */
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.settings-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* beide nach rechts */
  gap: 16px; /* Abstand zwischen Buttons */
  margin-top: 24px;
}

.settings-modal-btn {
  min-width: 110px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: none;
}

.settings-modal-btn-secondary {
  background: #ffffff;
  color: #5B7B37;
  border: 1px solid #d9e4d1;
}

.settings-modal-btn-secondary:hover {
  background: #edf4e7;
}

.settings-modal-btn-primary {
  background: #EA631F; /* Orange */
  color: #ffffff;
}

.settings-modal-btn-primary:hover {
  background: #cf5417; /* dunkleres Orange */
}

@media (max-width: 780px) {
  .settings-modal-box {
    padding: 18px 16px 16px;
    border-radius: 18px;
  }

  .settings-modal-header h3 {
    font-size: 24px;
  }

  .settings-diet-option-grid {
    grid-template-columns: 1fr;
  }

  .settings-modal-actions {
    gap: 12px;
  }

  .settings-modal-btn {
    min-width: 0;
    width: 100%;
  }

  .settings-modal-actions {
    flex-direction: column;
  }
}

.profile-password-button {
  width: 100%;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-label-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.profile-label-row label {
  margin: 0;
}

.required-star {
  color: #EA631F;
  font-weight: 700;
  line-height: 1;
}

.profile-blocked-modal .cookie-intro {
  margin-bottom: 0;
}

.profile-blocked-modal .cookie-intro p {
  margin: 0;
}

.danger-button {
  background: #c0392b;
  color: #fff;
}

.danger-button:hover {
  background: #a93226;
}

.danger-button {
  background: #c0392b;
  color: #fff;
}

.danger-button:hover {
  background: #a93226;
}

.profile-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.profile-header-copy {
  min-width: 0;
  flex: 1;
}

.profile-delete-button {
  width: auto;
  min-width: 180px;
  max-width: 260px;
  margin: 0;
  padding: 12px 18px;
  flex-shrink: 0;
  align-self: flex-start;
}

@media (max-width: 780px) {
  .profile-header-top {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-delete-button {
    width: 100%;
    max-width: none;
  }
}

/* =========================
   SUBSCRIPTION PAGE
   ========================= */

.subscription-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.subscription-label-row label {
  margin-bottom: 0;
}

.subscription-icon-button,
.subscription-download-button {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8fbf5;
  border: 1px solid #d9e4d1;
  border-radius: 10px;
  box-shadow: none;
}

.subscription-icon-button:hover,
.subscription-download-button:hover {
  background: #eef5e8;
}

.subscription-inline-icon,
.subscription-download-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.subscription-plan-card {
  padding: 22px 24px;
  border: 1px solid #dfe7d9;
  box-shadow: none;
}

.subscription-plan-header {
  margin-bottom: 18px;
  font-weight: 700;
  color: #2f3c32;
}

.subscription-plan-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.subscription-plan-name {
  font-size: 18px;
  font-weight: 700;
  color: #5B7B37;
  margin-bottom: 4px;
}

.subscription-plan-period {
  color: #4d5f51;
  line-height: 1.5;
}

.subscription-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f3f6ef;
  color: #5B7B37;
  border: 1px solid #cddbb2;
  font-weight: 700;
  font-size: 14px;
}

.subscription-next-charge {
  margin: 0 0 14px;
  color: #5B7B37;
  line-height: 1.7;
}

.subscription-cancel-note {
  margin: 0;
  color: #56685a;
  line-height: 1.6;
}

.subscription-inline-link {
  color: #EA631F;
  text-decoration: underline;
  font-weight: 700;
}

.subscription-inline-link:hover {
  color: #cf5417;
}

.subscription-history-box {
  padding: 20px 22px;
  box-shadow: none;
}

.subscription-history-table {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.subscription-history-head,
.subscription-history-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.9fr 0.6fr;
  gap: 14px;
  align-items: center;
}

.subscription-history-head {
  padding: 0 0 12px;
  border-bottom: 1px solid #e5ece0;
  font-size: 13px;
  font-weight: 700;
  color: #6b7c6e;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.subscription-history-row {
  padding: 16px 0;
  border-bottom: 1px solid #edf2e8;
  color: #5B7B37;
}

.subscription-history-row:last-child {
  border-bottom: none;
}

.subscription-paid-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e8f7ef;
  color: #2e8b57;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 980px) {
  .subscription-history-head {
    display: none;
  }

  .subscription-history-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .subscription-plan-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

.form-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.form-tab {
  border: 1px solid #d9e3d2;
  background: #ffffff;
  color: #355b2f;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-tab:hover {
  background: #f4f8f1;
}

.form-tab.is-active {
  background: #5b7b37;
  color: #ffffff;
  border-color: #5b7b37;
}

.tab-panels {
  width: 100%;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.result-panel-embedded {
  margin-top: 4px;
}

.form-tabs-bar {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 18px 0 26px;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.10);
  overflow-x: auto;
  scrollbar-width: none;
}

.form-tabs-bar::-webkit-scrollbar {
  display: none;
}

.form-tab-link {
  position: relative;
  border: none;
  background: transparent;
  padding: 0 2px 12px;
  margin: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.form-tab-link:hover {
  color: #355b2f;
}

.form-tab-link.is-active {
  color: #5b7b37;
}

.form-tab-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -11px;
  height: 2px;
  background: #1f2937;
  border-radius: 2px;
}

.tab-panels {
  width: 100%;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

/* =========================
   CUSTOMERS PAGE
   ========================= */

.customers-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.customers-add-button {
  width: auto;
  min-width: 240px;
  margin: 0;
  padding: 14px 18px;
  flex-shrink: 0;
}

.customers-filter-bar {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}

.customers-filter-box {
  margin-bottom: 0;
  box-shadow: none;
}

.customers-list-wrapper {
  border: 1px solid #e1e9dc;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
}

.customers-list-head,
.customers-row {
  display: grid;
  grid-template-columns: 1.5fr 1.15fr 0.9fr 0.95fr 1fr 0.8fr;
  gap: 14px;
  align-items: center;
}

.customers-list-head {
  padding: 16px 18px;
  background: linear-gradient(180deg, #fdfefb 0%, #f7faf2 100%);
  border-bottom: 1px solid #e5ece0;
  font-size: 13px;
  font-weight: 700;
  color: #6b7c6e;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.customers-list-body {
  display: flex;
  flex-direction: column;
}

.customers-row {
  width: 100%;
  margin: 0;
  padding: 18px;
  background: #ffffff;
  color: #2b342d;
  border: none;
  border-bottom: 1px solid #edf2e8;
  border-radius: 0;
  box-shadow: none;
  text-align: left;
}

.customers-row:last-child {
  border-bottom: none;
}

.customers-row:hover {
  background: #f9fcf6;
}

.customers-cell {
  min-width: 0;
  font-size: 15px;
  color: #435446;
}

.customers-cell-name {
  display: flex;
  align-items: center;
}

.customers-name {
  font-weight: 700;
  color: #2f3c32;
}

.customers-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 94px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
}

.customers-status-badge--active {
  background: #f3f6ef;
  color: #5B7B37;
  border-color: #cddbb2;
}

.customers-status-badge--inactive {
  background: #fff4f2;
  color: #a23a2a;
  border-color: #f0c7bf;
}

.customers-empty-state {
  padding: 24px 18px;
  text-align: center;
  color: #6a7d6d;
  background: #fbfcf8;
}

@media (max-width: 1100px) {
  .customers-filter-bar {
    grid-template-columns: 1fr;
  }

  .customers-panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .customers-add-button {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .customers-list-head {
    display: none;
  }

  .customers-row {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
  }

  .customers-cell::before {
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #6b7c6e;
    letter-spacing: 0.2px;
  }

  .customers-row .customers-cell:nth-child(1)::before { content: "Name"; }
  .customers-row .customers-cell:nth-child(2)::before { content: "Telefon"; }
  .customers-row .customers-cell:nth-child(3)::before { content: "Geschlecht"; }
  .customers-row .customers-cell:nth-child(4)::before { content: "Geburtsdatum"; }
  .customers-row .customers-cell:nth-child(5)::before { content: "Wohnort"; }
  .customers-row .customers-cell:nth-child(6)::before { content: "Status"; }
}

/* =========================
   DASHBOARD PAGE
   ========================= */

.dashboard-empty-panel {
  min-height: 420px;
}

.dashboard-empty-body {
  min-height: 320px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcf8 100%);
}

/* =========================
   MAIN NAVIGATION (HEADER)
   ========================= */

.main-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-button {
  height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid #d9e4d1;
  background: #f6f9f2;
  color: #5B7B37;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-button:hover {
  background: #edf4e7;
}

.nav-button.active {
  background: #5B7B37;
  color: white;
  border-color: #4e6a2f;
}

/* =========================
   GENERAL TAB LAYOUT
   ========================= */

.general-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
}

.general-right .box {
  height: 100%;
}

.general-right textarea {
  height: 100%;
  min-height: 320px;
}

/* RESPONSIVE */
@media (max-width: 980px) {
  .general-layout {
    grid-template-columns: 1fr;
  }
}

.general-files-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.general-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e1e9dc;
  border-radius: 12px;
  background: #fcfdfb;
}

.general-file-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.general-file-name {
  font-weight: 600;
  color: #2f3c32;
  word-break: break-word;
}

.general-file-meta {
  font-size: 13px;
  color: #6a7d6d;
}

.general-file-remove {
  width: auto;
  min-width: auto;
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff4f2;
  color: #a23a2a;
  border: 1px solid #f0c7bf;
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
}

.general-file-remove:hover {
  background: #fdeeee;
}

/* =========================
   TODOS SECTION
   ========================= */

.todos-panel {
  background: #ffffff;
  border: 1px solid #e5ece0;
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 18px 18px 0;
  overflow: hidden;
}

.todos-panel-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.todos-panel-toolbar-right {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.todos-filter-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}

.todos-filter-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #6b7c6e;
}

.todos-filter-select {
  min-height: 42px;
  padding: 10px 36px 10px 12px;
  border: 1px solid #d3ddcd;
  border-radius: 10px;
  background: #fcfdfb;
  color: #2b342d;
  font-size: 14px;
  font-weight: 500;
}

.todos-filter-select:focus {
  outline: none;
  border-color: #5B7B37;
  box-shadow: 0 0 0 3px rgba(91, 123, 55, 0.12);
}

.todos-plan-button {
  width: auto;
  min-width: 0;
  height: 42px;
  margin: 0;
  padding: 0 16px;
  border-radius: 10px;
  background: #1f2937;
  color: #ffffff;
  border: 1px solid #1f2937;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: none;
}

.todos-plan-button:hover {
  background: #111827;
  border-color: #111827;
}

.todos-plan-button-icon {
  font-size: 15px;
  line-height: 1;
}

.todos-panel-divider {
  height: 1px;
  background: #edf2e8;
  margin: 16px 0 0;
}

.todos-empty-state {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #8b98a5;
  text-align: center;
  padding: 24px 16px;
}

.todos-empty-icon {
  font-size: 24px;
  opacity: 0.75;
}

.todos-empty-text {
  font-size: 16px;
  font-weight: 500;
  color: #7b8794;
}

.todos-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 0;
}

.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #e5ece0;
  border-radius: 12px;
  background: #fcfdfb;
}

.todo-item-title {
  font-weight: 600;
  color: #2f3c32;
}

.todo-item-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.todo-item-status--open {
  background: #fff6ed;
  color: #b45309;
  border: 1px solid #f5d0a6;
}

.todo-item-status--done {
  background: #e8f7ef;
  color: #2e8b57;
  border: 1px solid #bfe6cf;
}

@media (max-width: 780px) {
  .todos-panel-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .todos-panel-toolbar-right {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .todos-filter-wrap {
    width: 100%;
  }

  .todos-plan-button {
    width: 100%;
  }
}

/* =========================
   TAB NAVIGATION FOOTER
   ========================= */

.tab-navigation-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.next-tab-button {
  width: auto !important;
  min-width: 240px;
  max-width: none;
  height: 40px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 0 14px;
  margin: 0;

  border-radius: 10px;
  background: #EA631F;
  color: #ffffff;
  border: 1px solid #EA631F;

  font-size: 14px;
  font-weight: 600;
  box-shadow: none;

  cursor: pointer;
  transition: all 0.2s ease;
}

.next-tab-button:hover {
  background: #d65316;
  border-color: #d65316;
}

.next-tab-button.is-disabled,
.next-tab-button:disabled {
  background: #ffffff;
  color: #EA631F;
  border: 1px solid #EA631F;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 1;
}

.next-tab-button.is-disabled:hover,
.next-tab-button:disabled:hover {
  background: #ffffff;
  color: #EA631F;
  border-color: #EA631F;
}

.next-tab-icon {
  font-size: 16px;
}

/* Pflichtfeld-Stern */
.required-marker::after {
  content: " *";
  color: #EA631F;
  font-weight: 700;
}

.table-shell {
  overflow-x: auto;
}

.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.admin-users-table th,
.admin-users-table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid #e7e7e7;
  vertical-align: middle;
}

.admin-users-table th {
  font-weight: 700;
  color: #24411a;
}

.admin-restore-button {
  min-width: 160px;
}

.admin-users-actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-restore-button,
.admin-delete-button {
  width: auto;
  min-width: 160px;
  margin: 0;
  padding: 10px 14px;
  box-shadow: none;
}

.admin-delete-button {
  min-width: 190px;
}

@media (max-width: 900px) {
  .admin-users-actions-cell {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-restore-button,
  .admin-delete-button {
    width: 100%;
    min-width: 0;
  }
}

.readonly-field {
  background-color: #f3f4f6;
  cursor: not-allowed;
}

.subscription-info-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.subscription-tooltip {
  position: absolute;
  right: 0;
  bottom: 130%;
  width: 240px;
  background: #6f7789;
  color: #ffffff;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 50;
}

.subscription-tooltip::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 100%;
  border-width: 7px;
  border-style: solid;
  border-color: #6f7789 transparent transparent transparent;
}

.subscription-info-wrap:hover .subscription-tooltip,
.subscription-info-wrap:focus-within .subscription-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.field-error {
  border-color: #b42318 !important;
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.12) !important;
  background: #fffafa !important;
}

.box-error {
  border-color: #f3b4ad !important;
}

.field-error-message {
  margin-top: 8px;
  color: #b42318;
  font-size: 13px;
  font-weight: 700;
}

.todo-modal {
  position: fixed;
  inset: 0;
  background: rgba(9, 28, 36, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}

.todo-modal-box {
  width: 100%;
  max-width: 720px;
  background: #ffffff;
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.todo-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.todo-modal-header h2 {
  margin: 0;
  color: #5B7B37;
}

.todo-modal-close {
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  background: #f4f7f8;
  color: #0b3b4a;
  box-shadow: none;
}

.todo-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.todo-item-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.todo-item-meta {
  font-size: 13px;
  color: #6a7d6d;
}

.todo-priority-high {
  border-left: 5px solid #EA631F;
}

.todo-priority-medium {
  border-left: 5px solid #F8C022;
}

.todo-priority-low {
  border-left: 5px solid #5B7B37;
}

.todo-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.todo-item-edit {
  width: auto;
  min-width: 86px;
  padding: 6px 10px;
  margin: 0;
  border-radius: 999px;
  background: #f6f9f2;
  color: #5B7B37;
  border: 1px solid #d9e4d1;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

.todo-item-edit:hover {
  background: #edf4e7;
}

.todo-item-delete {
  width: auto;
  min-width: 86px;
  padding: 6px 10px;
  margin: 0;
  border-radius: 999px;
  background: #fff6f4;
  color: #EA631F;
  border: 1px solid #f1c7bd;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

.todo-item-delete:hover {
  background: #ffe9e3;
}

.todo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.todo-item-main {
  flex: 1;
}

.todo-item-status-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 120px;
}

.todo-item-status {
  width: auto;
  min-width: 110px;
}

.settings-selector-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: transparent;
  padding: 0;
}

.settings-selector-preview-item {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef3ea;
  color: #5B7B37;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

#postReportNoBtn.is-active {
  background: #F8C022;
  color: #ffffff;
  border: 1px solid #F8C022;
}

#postReportNoBtn.is-active:hover {
  background: #e0ab00;
  color: #ffffff;
  border-color: #e0ab00;
}

.form-actions .primary-button.is-disabled {
  background: #ffffff;
  color: #EA631F;
  border: 1px solid #EA631F;
  box-shadow: none;
  opacity: 1;
}

.phase-plan-actions {
  display: flex;
  justify-content: center;
  margin-top: 0;
}

.phase-plan-actions .primary-button {
  width: 75%;
  max-width: 900px;
}

@media (max-width: 800px) {
  .phase-plan-actions .primary-button {
    width: 100%;
  }
}

.todo-item-status--cancelled {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.post-report-checkup-head,
.post-report-checkup-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 48px;
  gap: 12px;
  align-items: center;
}

.recommended-checkup-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.recommended-checkup-add-button {
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  background: #F8C022;
  color: #ffffff;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(248, 192, 34, 0.28);
}

.recommended-checkup-add-button:hover {
  background: #e0ad1d;
  color: #ffffff;
}

.recommended-checkup-remove-button {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  margin: 0;
  border-radius: 10px;
  background: #fff4f2;
  color: #a23a2a;
  border: 1px solid #f2c7bf;
  box-shadow: none;
  font-size: 17px;
}

.recommended-checkup-remove-button:hover {
  background: #ffe9e5;
}

.recommended-checkup-remove-cell {
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (max-width: 900px) {
  .post-report-checkup-head {
    display: none;
  }

  .post-report-checkup-row {
    grid-template-columns: 1fr;
  }

  .recommended-checkup-remove-cell {
    justify-content: flex-end;
  }
}

.customer-create-modal-box {
  max-width: 720px;
}

.customer-create-modal-box .box {
  margin-bottom: 0;
}

.customer-create-modal-box .todo-modal-actions {
  margin-top: 18px;
}