/* =====================================================
   KANTINE UI – SHARED (HOME / RESERVIERUNGEN / VA) .
   ===================================================== */

:root{
  --bg-tile:#fafafa;
  --bg-tile-hover:#ffffff;
  --border-tile:#eee;

  --text-main:#111;
  --text-sub:#666;

  --ok:#2e6f04;
  --warn:#d99a1a;
  --danger:#b00020;
}

/* =====================================================
   WRAPPER / GRUNDLAGEN
   ===================================================== */

.km-wrap{
  max-width:900px;
  margin:0 auto;
  padding:16px;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
  color:var(--text-main);
  padding-top:50px;
}

.km-text{
  color:var(--text-sub);
  font-style:italic;
}

/* =====================================================
   HOME – KACHELN
   ===================================================== */

.km-home{
  max-width:1000px;
  margin:0 auto;
  padding:16px;
  padding-top:50px;
}

.km-home h1{
  font-size:18px;
  margin:0 0 20px 0;
  font-weight:600;
}

/* Grid */
.km-tiles{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:16px;
}

@media(min-width:700px){
  .km-tiles{
    grid-template-columns:repeat(3,1fr);
  }
}

/* Kachel */
.tile{
  background:var(--bg-tile);
  border:1px solid var(--border-tile);
  padding:16px;
  min-height:170px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  position:relative;
  text-decoration:none;
  color:var(--text-main);
  transition:background .15s ease,border-color .15s ease;
}

.tile:hover{
  background:var(--bg-tile-hover);
  border-color:#ddd;
}

/* Icon */
.tile-icon{
  font-size:30px;
  color:#888;
  margin-bottom:10px;
  line-height:1;
}

/* Text */
.tile-title{
  font-weight:600;
  font-size:15px;
  margin-bottom:2px;
}

.tile-text{
  font-size:13px;
  color:var(--text-sub);
  line-height:1.25;
}

/* Badge */
.tile-badge{
  position:absolute;
  top:12px;
  right:12px;
  width:22px;
  height:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  font-size:11px;
  font-weight:600;
  line-height:1;
  color:#fff;
  opacity:.95;
}

.badge-ok{ background:var(--ok); }
.badge-warn{ background:var(--warn); }
.badge-danger{ background:var(--danger); }

/* =====================================================
   MONATSNAVIGATION (Reservierungen & VA)
   ===================================================== */

.km-month-nav{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:18px;
}

.km-month-nav a{
  text-decoration:none;
  font-size:18px;
  padding:4px 8px;
  color:var(--text-main);
}

.km-month-title{
  font-size:16px;
  font-weight:600;
}

/* =====================================================
   LISTEN – TAGE
   ===================================================== */

.km-list-day{
  background:#fff;
  border:1px solid var(--border-tile);
  margin-bottom:16px;
  padding:12px;
}

.km-list-day-title{
  font-weight:600;
  font-size:15px;
}

.km-list-day-sub{
  font-size:12px;
  color:var(--text-sub);
  margin-bottom:8px;
}

/* =====================================================
   EINTRÄGE (Reservierungen & VA)
   ===================================================== */

.km-entry{
  padding:8px 0;
  border-top:1px solid #eee;
}

.km-entry:first-of-type{
  border-top:none;
}

.km-entry.has-details{
  cursor:pointer;
}

.km-entry.has-details:hover{
  background:#fafafa;
}

/* Header */
.km-entry-main{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:14px;
}

/* Subline */
.km-entry-sub{
  font-size:13px;
  color:var(--text-sub);
}

/* =====================================================
   DETAILS (aufklappbar)
   ===================================================== */

.km-details{
  display:none;
  margin-top:6px;
  font-size:13px;
  color:#555;
}

.km-entry.open .km-details{
  display:block;
}

/* =====================================================
   CHEVRON (Klapp-Indikator)
   ===================================================== */

.km-chevron{
  font-size:14px;
  color:#999;
  margin-left:8px;
}

.km-entry.has-details .km-chevron::before{
  content:"▾";
}

.km-entry.has-details.open .km-chevron::before{
  content:"▴";
}

.km-entry.has-details:hover .km-chevron{
  color:#111;
}
/* ===== HEADER ICONS (Speisen / Getränke) ===== */

.km-entry-icons{
  display:flex;
  align-items:center;
  gap:8px;
}

.km-entry-icons i{
  font-size:13px;
  color:#999;
}

.km-entry.has-details:hover .km-entry-icons i{
  color:#111;
}

/* =====================================================
   KONTAKTE – READ ONLY
   ===================================================== */

.km-list{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.km-list-day{
  background:#fff;
  border:1px solid var(--border-tile);
  padding:12px;
}

.km-list-day-title{
  font-weight:600;
  font-size:15px;
  margin-bottom:8px;
}

.km-entry{
  padding:8px 0;
  border-top:1px solid #eee;
}

.km-entry:first-of-type{
  border-top:none;
}

.km-entry-main{
  font-size:14px;
  font-weight:500;
}

.km-entry-sub{
  font-size:13px;
  color:var(--text-sub);
}
/* ===== KONTAKTE SUCHE ===== */

.km-search{
  margin: 0 0 16px 0;
}

.km-search input{
  width:100%;
  padding:10px 12px;
  font-size:14px;
  border:1px solid var(--border-tile);
  border-radius:0px;
  outline:none;
}

.km-search input:focus{
  border-color:#bbb;
  background:#fff;
}
.km-entry-main{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.km-fav{
  color:#ccc;
  text-decoration:none;
  padding-left:8px;
}

.km-fav .fa-solid{
  color:#d99a1a; /* Gold */
}

.km-entry:hover .km-fav{
  color:#111;
}
/* ===== SECTIONS ===== */
.km-section-title{
  font-size:13px;
  font-weight:600;
  margin:18px 0 6px;
  color:#666;
  text-transform:uppercase;
}

/* ===== INTERN ===== */
.km-intern{
  background:#fff;
  border:1px solid var(--border-tile);
  margin-bottom:16px;
  padding:8px 12px;
}

.km-intern-entry{
  padding:10px 0;
  border-top:1px dashed #eee;
}

.km-intern-entry:first-child{
  border-top:none;
}

.km-intern-entry .km-entry-main{
  display:flex;
  justify-content:space-between;
  font-size:15px;
}

.km-intern-entry strong{
  font-size:16px;
  letter-spacing:1px;
}
/* =====================================================
   KONTAKTE – CLEAN MOBILE UI
   ===================================================== */

.km-search input{
  width:100%;
  padding:12px 14px;
  border:1px solid #ddd;
  border-radius:0px;
  margin-bottom:16px;
  font-size:15px;
}

/* Abschnittstitel */
.km-section-title{
  margin:18px 0 8px;
  font-size:13px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:#666;
}

/* Intern */
.km-intern{
  border-left:4px solid #bbb;
}

/* Eintrag */
.km-entry{
  padding:10px 12px;
  border-top:1px solid #eee;
  cursor:pointer;
}

.km-entry:first-child{
  border-top:none;
}

.km-entry-main{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:15px;
}

.km-entry-sub{
  font-size:13px;
  color:#666;
  margin-top:2px;
}

/* Favorit Stern */
.km-fav{
  color:#aaa;
  text-decoration:none;
  padding-left:10px;
}

.km-fav i{
  transition:transform .15s ease,color .15s ease;
}

.km-fav:active i{
  transform:scale(1.3);
}

.fa-solid.fa-star{
  color:#f5b400;
}

/* Intern Nummer */
.km-intern-entry strong{
  font-size:15px;
  color:#111;
}

/* Leerer Text */
.km-text{
  padding:12px;
  font-size:14px;
  color:#999;
}
/* ===== IDENTIFIKATION / MODALS ===== */

#birthModal .box,
#birthModal > div {
  border-radius: 2px;
  box-shadow: 0 12px 32px rgba(0,0,0,.25);
}

#birthModal h3 {
  margin-top: 0;
  font-size: 18px;
}

#birthModal input {
  border-radius: 2px;
  border: 1px solid #ddd;
}

#birthModal .rl-btn {
  border-radius: 0px;
  padding: 6px 12px;
  font-size: 15px;
}

#birthModal .rl-btn-cancel {
  background: #f3f3f3;
  border: 1px solid #ccc;
  color: #333;
}

/* Signatur-Modal Buttons */
#signModal .rl-btn {
  border-radius: 0px;
}

/* Karten ruhiger */
.rl-card {
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
.km-wrap { padding:14px; 0}
.km-card {
  background:#fff;
  border-radius:14px;
  padding:14px;
  margin-bottom:12px;
  box-shadow:0 6px 18px rgba(0,0,0,.08);
}
.km-card.today { outline:2px solid #d72323; }
.km-card-head { font-weight:600; margin-bottom:8px; }
.km-row { display:flex; justify-content:space-between; padding:6px 0; }

.km-modal {
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.6);
  justify-content:center;
  align-items:center;
  z-index:9999;
}
.km-modal-box {
  background:#fff;
  padding:16px;
  border-radius:2px;
  width:90%;
  max-width:420px;
}
.km-modal-box.wide { max-width:620px; }
.km-modal-actions {
  display:flex;
  justify-content:flex-end;
  gap:8px;
}
.km-modal-actions .primary {
  background:#0a7;
  color:#fff;
}
.km-list { padding:12px; }

.rl-card {
  background:#fff;
  border-radius:14px;
  padding:14px;
  margin-bottom:12px;
  box-shadow:0 6px 18px rgba(0,0,0,.08);
}

.rl-card.today {
  outline:2px solid #d72323;
  scroll-margin-top:72px;
}

.rl-card-head {
  display:flex;
  justify-content:space-between;
  font-weight:600;
  margin-bottom:8px;
}

.rl-row {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:8px 0;
}

  .rl-head form { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
  .rl-head select, .rl-head input[type="number"] { padding:6px 8px; }
  .rl-btn { cursor:pointer; padding:6px 10px; border:1px solid #888; background:#f6f6f6; }
  .rl-btn-primary { background:#0a7; color:#fff; border-color:#0a7; }
  //.rl-table { border-collapse:collapse; width:100%; min-width:820px; font-size:14px; }
  //.rl-table th, .rl-table td { border:1px solid #999; padding:6px; }
  //.rl-table th { background:#efece6; text-align:left; }
  .rl-td { height:58px; text-align:center; vertical-align:middle; position:relative; }
  .rl-td img { max-height:48px; max-width:95%; object-fit:contain; display:block; margin:0 auto; }
  .rl-muted { opacity:.55; }
  .rl-toolbar { display:flex; justify-content:space-between; align-items:flex-end; margin:8px 0; }
  .rl-h2 { margin:0; }
  .rl-h2.right { color:#d72323; }
  #signModal { display:none; position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:9999; align-items:center; justify-content:center; }
  #signModal .box { background:#fff; padding:16px; border-radius:2px; width:520px; max-width:95vw; }
  #signCanvas { width:100%; height:200px; border:1px dashed #aaa; }
  @media print {
    .rl-head, .print-hide { display:none !important; }
    .rl-table th, .rl-table td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  }
.rl-app {
  padding: 12px;
  scroll-padding-top: 64px;
}

.rl-card {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}

.rl-card.today {
  outline: 2px solid #d72323;
  scroll-margin-top: 72px;
}

.rl-card.holiday {
  opacity: .6;
}

.rl-card-head {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  color: #d72323;
  margin-bottom: 8px;
}

.rl-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid #eee;
}

.rl-row:first-child {
  border-top: none;
}

.rl-label {
  font-size: 13px;
  color: #555;
}

.rl-value {
  text-align: right;
}
.rl-head {
  position: sticky;
  top: 0;
  z-index: 1000;

  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;

  background: #fff;
  padding: 10px 12px;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 55px;
  padding-top:50px;
}

.km-btn {
  border:none;
  background:#eee;
  padding:6px 12px;
  border-radius:0px;
}
.km-btn-primary {
  background:#0a7;
  color:#fff;
}
.km-muted {
  color:#999;
  font-size:13px;
}
.sigwrap {  
  border-radius:10px;
  padding:6px;
}


.km-wrap {
  padding:12px;
  padding-top:50px;
}

.km-list {
  display:flex;
  flex-direction:column;
  gap:12px;
}
/* =====================================================
   REINIGUNGSLISTEN – SCOPED (nur innerhalb .km-rl)
   ===================================================== */

.km-rl .km-list{
  gap:16px;
}

.km-rl .km-list-day{
  border-radius:0;           /* wie VA/Reservierungen */
  box-shadow:none;           /* wie VA/Reservierungen */
}

.km-rl .km-list-day.today{
  outline:2px solid #d72323;
  scroll-margin-top:72px;
}

.km-rl .km-list-day.holiday{
  opacity:.6;
}

.km-rl .km-entry-main{
  gap:12px;
}

.km-rl .km-rl-value{
  min-width:160px;
  text-align:right;
  display:flex;
  justify-content:flex-end;
  align-items:center;
}

/* Signatur-Zelle etwas “ruhiger” */
.km-rl .sigwrap{
  border-radius:10px;
  padding:6px;
}
/* =====================================================
   BUTTON STATES – EINDEUTIG & KONSISTENT
   ===================================================== */

.km-btn{
  background:#e0e0e0;
  color:#111;
}

.km-btn-primary{
  background:#0a7;
  color:#fff;
}

.km-btn-danger{
  background:#c62828;
  color:#fff;
}

.km-btn-warn{
  background:#f5b400;
  color:#111;
}

.km-btn:disabled{
  opacity:.5;
}

/* =====================================================
   REINIGUNGSLISTEN – FINAL SCOPED
   ===================================================== */

.km-rl .rl-card{
  background:#fff;
  border:1px solid var(--border-tile);
  border-radius:0;
  padding:12px;
  margin-bottom:16px;
  box-shadow:none;
}

.km-rl .rl-card.today{
  outline:2px solid #d72323;
  scroll-margin-top:72px;
}

.km-rl .rl-card.holiday{
  opacity:.6;
}

.km-rl .rl-card-head{
  display:flex;
  justify-content:space-between;
  font-weight:600;
  margin-bottom:8px;
  color:var(--text-main);
}

/* Zeilen wie Reservierungen */
.km-rl .rl-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding:10px 0;
  border-top:1px solid #eee;
}

.km-rl .rl-row:first-child{
  border-top:none;
}

.km-rl .rl-label{
  font-size:13px;
  color:var(--text-sub);
}

.km-rl .rl-value{
  min-width:160px;
  text-align:right;
}

/* Signatur ruhiger */
.km-rl .sigwrap{
  border-radius:10px;
  padding:6px;
}
#page-location {
  position: fixed;
  top: 56px;           /* direkt unter Topbar */
  left: 0;
  right: 0;
  height: 52px;
  line-height: 52px;
  z-index: 4900;

  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 0 14px;

  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #666;
  
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
}


/* Platz für Topbar + Location */

.km-entry{
  cursor:pointer;
}

.km-entry .km-details{
  display:none;
  margin-top:10px;
  padding-top:10px;
  border-top:1px dashed #e5e5e5;
  font-size:14px;
  line-height:1.45;
}

.km-entry.open .km-details{
  display:block;
}

.km-detail-row{
  margin-bottom:10px;
}

.km-actions{
  margin-top:12px;
}

.km-btn-small{
  font-size:13px;
  padding:6px 10px;
}
.recipe-header h1{
  font-size:26px;
  letter-spacing:2px;
  margin-bottom:6px;
}

.recipe-meta{
  color:#777;
  font-size:13px;
  display:flex;
  align-items:center;
  gap:8px;
}

.badge{
  background:#f1f1f1;
  padding:4px 10px;
  border-radius:999px;
  font-weight:700;
}

.recipe-box{
  background:#fafafa;
  border:1px solid #eee;
  padding:14px;
  border-radius:2px;
  margin:18px 0;
}

.recipe-box-title{
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:1px;
  color:#777;
  margin-bottom:8px;
}

.portion-control{
  display:flex;
  align-items:center;
  gap:10px;
}

.portion-control input{
  width:90px;
  padding:8px;
  font-size:15px;
  height:31px;
}

.recipe-section{
  margin-top:24px;
}

.recipe-section h3{
  font-size:15px;
  letter-spacing:1px;
  color:#444;
  margin-bottom:10px;
}

.zutaten-list{
  line-height:1.9;
}

.zubereitung-text{
  line-height:1.7;
  color:#333;
}
/* nur Urlaubsplaner */
.km-urlaub .urlaubs-bottombar{
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}


/* ===== Reinigungslisten: eigene Bottombar ===== */
.km-rl .urlaubs-bottombar{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: auto;           /* 🔥 WICHTIG */
  justify-content: flex-start; /* 🔥 WICHTIG */
  padding: 0;
  font-size:13px;
}

.km-rl .ub-status{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-family: system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
}

.km-rl .ub-left{
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
}

.km-rl .ub-right{
  white-space: nowrap;
  font-family: system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
}
.tile-wide{
  grid-column: span 2;
}
.km-today-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #d62828;
}
.km-list-day.is-today {
  outline: 2px solid #d72323;
}
.rl-card.today{
  outline: 3px dashed #da2341 !important;
  outline-offset: 0px;
}
.km-fav i {
  color:#bbb;
}

.km-fav .fa-solid {
  color:#f5b301;
}
