/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', sans-serif; }
body { background-color: #f5f6fa; color: #333; }

html, body { 
  overscroll-behavior-y: none ;
  height: 100%;
  overflow: hidden;
}

body { padding-bottom: 0 !important; }

#splash {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, white, #a6c9fe);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash-logo {
  width: 350px;
  animation: logoPop 0.8s ease;
}

@keyframes logoPop {
  0% { opacity: 0; transform: scale(0.6); }
  60% { transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}

/* Header */
header {
  background-color: #007bff;
  color: white;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* ÚJ: header layout + icon */
.header-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}

.icon-btn{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.14);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.icon-btn:active{ transform: scale(0.98); }
.icon-btn svg{ width: 20px; height: 20px; fill: #fff; }

#salute { text-align: right; flex: 1; }

/* Daily tasks */
.tasks {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-card {
  background-color: #fff;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}

.task-card:active { transform: scale(0.99); }

.task-card.expanded{
  box-shadow: 0 10px 26px rgba(0,0,0,0.16);
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.task-time { font-weight: 800; }
.task-address { font-size: 0.95rem; color: #555; }

/* Status badge */
.status {
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
  color: white;
}
.done { background-color: #28a745; }
.in-progress { background-color: #ff9800; }
.missed { background-color: #dc3545; }
.planned { background-color: #6b7a90; }

.task-actions{
  display: none;
  margin-top: 10px;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;                 /* félrekattintás ellen */
}

.task-card.expanded .task-actions{ 
  display: grid; 
}

/* iOS-like gomb (színek maradnak az action-* classokból) */
.task-actions .action-btn{
  width: 100%;
  min-width: 0;

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

  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.35);

  font-weight: 800;
  line-height: 1.15;
  white-space: normal;       /* törhet 2 sorba */
  word-break: break-word;

  /* “glass”/iOS vibe */
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  /* finom animációk */
  transition: transform 0.08s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.task-actions .action-btn:active{
  transform: scale(0.98);
  filter: brightness(0.96);
  box-shadow: 0 6px 14px rgba(0,0,0,0.10);
}

/* A te színeid maradnak, csak kapnak “glass” réteget */
.action-done{ 
  background: linear-gradient(180deg, rgba(40,167,69,0.95), rgba(40,167,69,0.85));
  color:#fff; 
}
.action-postpone{ 
  background: linear-gradient(180deg, rgba(255,152,0,0.95), rgba(255,152,0,0.85));
  color:#fff; 
}
.action-miss{ 
  background: linear-gradient(180deg, rgba(220,53,69,0.95), rgba(220,53,69,0.85));
  color:#fff; 
}

/* ha van action-map, adjunk neki is (kék iOS-szerű) */
.action-map{
  background: linear-gradient(180deg, rgba(0,123,255,0.95), rgba(0,123,255,0.85));
  color:#fff;
}

/* opcionális: nagyobb tap target mobilon */
@media (max-width: 420px){
  .task-actions .action-btn{
    padding: 14px 10px;
    border-radius: 16px;
    font-size: 0.92rem;
  }
}
.inline-form{
  display:none;
  margin-top: 10px;
  gap: 10px;
  flex-direction: column;
}
.task-card.expanded .inline-form{ display:flex; }

.inline-form input, .inline-form textarea{
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid #e2e2e2;
  background: #f9fafc;
  font-size: 14px;
}
.inline-form textarea{ min-height: 80px; resize: vertical; }

.form-row{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
.form-row > *{ flex: 1; min-width: 140px; }

/* Buttons (generic) */
.button {
  padding: 0.5rem 1rem;
  border-radius: 12px;
  background-color: #007bff;
  color: white;
  text-align: center;
  font-weight: 800;
  border: none;
  cursor: pointer;
  margin-top: 0.5rem;
  align-self: flex-start;
}
.button:active { background-color: #0056b3; }

/* Day strip */
.day-strip {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 15px;
  background: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.day-strip::-webkit-scrollbar { display: none; }

.day-strip .day {
  min-width: 70px;
  min-height: 70px;
  padding: 10px;
  border-radius: 12px;
  text-align: center;
  background: #eee;
  cursor: pointer;
  transition: 0.2s;
  font-size: 16px;
}
.day-strip .day.today { background: #007bff; color: white; font-weight: 800; }
.day-strip .day.active { background: #2ecc71; color: white; }

/* Új munka (megtartva az eredetit) */
.jobinputs {
  max-width: 720px;
  margin: 20px auto 100px auto;
  padding: 20px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeIn 0.4s ease;
}
.jobinputs label {
  font-size: 13px;
  font-weight: 700;
  color: #555;
  margin-bottom: -6px;
}
.input, input[type="date"], input[type="time"], select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid #e2e2e2;
  background: #f9fafc;
  font-size: 15px;
  transition: all 0.2s ease;
}
.input:focus, input[type="date"]:focus, input[type="time"]:focus, select:focus {
  outline: none;
  border-color: #4f8cff;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(79,140,255,0.15);
}
input[type="date"], input[type="time"] {
  width: 40%;
  max-width: 40%;
  min-width: 0;
  display: block;
}
.phone { display: flex; gap: 8px; }
.phone .input:first-child { width: 80px; background: #eef2f7; text-align: center; }

.address {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: #f7f9fc;
}
@media (min-width: 600px) {
  .address { grid-template-columns: 120px 1fr; align-items: end; }
  .address label { grid-column: 1 / -1; }
  #zip { grid-column: 1; }
  #city { grid-column: 2; }
  .address input[name="street"], .address input[name="num"] { grid-column: span 2; }
}
.submit-btn {
  margin-top: 10px;
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #4f8cff, #6fa8ff);
  color: white;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(79,140,255,0.3); }
.submit-btn:active { transform: scale(0.98); }

/* Napló */
h3 { text-align: center; padding: 10px; }
.prevcontainer{
  max-width: 720px;
  margin: 16px auto 110px auto;
  padding: 16px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  animation: fadeIn 0.4s ease;
}
.switchbar{
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f7f9fc;
  border: 1px solid #e8eef8;
  margin-top: 10px;
}
.switch-title{ text-align: center; font-weight: 900; color: #1f2a44; }
.switch-btn{
  height: 40px;
  border-radius: 12px;
  border: 1px solid #dbe6ff;
  background: #ffffff;
  color: #1f2a44;
  font-size: 20px;
  cursor: pointer;
}
.days {
  margin-top: 14px;
  width: 100%;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}
.days .day {
  height: 44px;
  border-radius: 14px;
  border: 1px solid #e6e6e6;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #3a3a3a;
  user-select: none;
}
.days button.day{ cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.days button.day:active{ transform: scale(0.98); }
.days .day.head{ height: 34px; border: none; background: transparent; color: #6b7a90; font-weight: 900; }
.days .day.empty{ border: 1px dashed #e3e7ef; background: #fafbfd; }
.days .day.today{ border-color: #007bff; box-shadow: 0 0 0 3px rgba(0,123,255,0.15); color: #007bff; }
.days .day.active{
  background: #007bff;
  border-color: #007bff;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0,123,255,0.25);
}
.log-list{
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.log-card{
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.193);
  animation: fadeIn 0.3s ease;
}
.log-card .log-time{ font-weight: 900; font-size: 14px; }
.log-card .log-text{ font-size: 13px; color: #555; margin-top: 4px; }

/* ÚJ: Napló kereső */
.search-wrap{
  margin-top: 10px;
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1.5px solid #e2e2e2;
  background: #f9fafc;
}
.search-wrap svg{ width: 18px; height: 18px; opacity: .7; }
.search-wrap input{
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 15px;
}
.hidden{ display:none !important; }

/* Wrapper fix */
.app-wrapper { height: 100%; display: flex; flex-direction: column; }
.page-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
  animation: ease-in 0.35s;
}

/* Bottom nav fix */ 
.bottom-nav {
  position: relative;
  display: flex;
  justify-content: space-around;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: #fff;
  border-top: 1px solid #ddd;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.15);
  padding: 0.5rem 0 /*calc(0.5rem + env(safe-area-inset-bottom))*/;
  transform: none !important;
  will-change: auto; 
  border-radius: 50px;
  width: 97%;
  margin: auto auto 8px auto; 
  overflow: hidden;
}

.bottom-nav button {
  display: flex;
  flex-direction: column;
  background: none;
  border: none;
  font-size: 0.9rem;
  align-items: center;
  cursor: pointer;
  color: #555;
  padding: 0.6rem 1rem;
  border-radius: 50px;
  transition: all 0.2s ease-in-out;
  min-width: 28%;
}
.bottom-nav button.active {
  background-color: #007bff;
  color: white;
}
.bottom-nav button:hover { background-color: #e0e0e0; }
.bottom-nav button:active {
   background-color: #c0c0c0; 
  }
.bottom-nav.hide-nav { display: none; }


/* ===== Stabil, modern bottom nav ===== */
/*
.bottom-nav{
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  border-radius: 18px;

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

  height: 64px;               
  padding-bottom: env(safe-area-inset-bottom);

  background: #ffffff;
  border-top: 1px solid #e8ecf3;

  box-shadow: 0 -6px 18px rgba(0,0,0,0.08);

  z-index: 9999;

  
}


body{
  padding-bottom: 84px; 
}



.bottom-nav button{
  flex: 1;
  background: transparent;
  border: none;

  font-size: 0.8rem;
  font-weight: 700;

  color: #6b7a90;

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

  gap: 4px;

  height: 100%;

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;

  transition: color .15s ease, background .15s ease;
}

.bottom-nav button {
  -webkit-appearance: none;
  appearance: none;
}


.bottom-nav button.active{
  color: #1e88e5;
  background: rgba(30,136,229,0.08);
}


.bottom-nav button:active{
  background: rgba(30,136,229,0.15);
}

@media (hover:hover){
  .bottom-nav button:hover{
    background: rgba(30,136,229,0.08);
  }
}


.bottom-nav.hide-nav{
  display:none;
} */

/* ÚJ: modal */
.modal-backdrop[hidden]{ display:none; }
.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 10000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
}
.modal{
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
  padding: 16px;
}
.modal h4{
  font-size: 16px;
  font-weight: 900;
  color: #1f2a44;
  margin-bottom: 10px;
}
.code-pill{
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
  text-align:center;
  padding: 14px 12px;
  border-radius: 14px;
  background: #f2f6ff;
  border: 1px solid #dbe6ff;
  color: #1f2a44;
}
.modal-actions{
  display:flex;
  justify-content:flex-end;
  gap: 10px;
  margin-top: 12px;
}
.modal-actions button{
  padding: 10px 12px;
  border-radius: 12px;
  border: none;
  font-weight: 900;
  cursor:pointer;
}
.btn-ghost{ background:#f3f4f6; }
.btn-primary{ background:#007bff; color:#fff; }

.action-map{
  background: #1e88e5;
  color: #fff;
}

.empty-state{
  height: 100%;
  min-height: 60vh;

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

  text-align: center;
  color: #6b7a90;
  padding: 20px;
}

.empty-icon{
  font-size: 48px;
  margin-bottom: 14px;
  animation: floatIcon 3s ease-in-out infinite;
}

.empty-text{
  font-size: 16px;
  font-weight: 600;
}

/* Finom lebegés */
@keyframes floatIcon{
  0% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0px); }
}

body.splash-active .bottom-nav{
  display: none !important;
}

.log-card{ cursor: pointer; }
.log-card .log-details{
  display: none;
  margin-top: 10px;
  font-size: 13px;
  color: #445;
  line-height: 1.35;
}
.log-card.expanded{
  box-shadow: 0 12px 26px rgba(0,0,0,0.14);
}
.log-card.expanded .log-details{ display: block; }

.detail-row{
  display:flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.pill{
  background:#f2f6ff;
  border:1px solid #dbe6ff;
  padding:4px 8px;
  border-radius: 999px;
  font-weight:800;
  color:#1f2a44;
}

/* Térképre gomb szín */
.action-map{
  background: #1e88e5;
  color: #fff;
}

.log-card{
  position: relative;
  padding-left: 14px; /* hely a csíknak */
}

.log-card::before{
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 6px;
  border-radius: 8px;
  background: #c7ceda; /* default */
  opacity: 0.9;
}

.log-card.status-done::before{
  background: #2e7d32; /* zöld */
}

.log-card.status-missed::before{
  background: #c62828; /* piros */
}

.log-card.status-planned::before{
  background: #607d8b; /* kékesszürke */
}

.log-card.expanded::before{
  width: 8px;
  opacity: 1;
}

/* newjob: időtól-időig */
.time-range{
  display:flex;
  align-items:center;
  gap: 8px;
}
.time-range .dash{
  padding: 0 6px;
  opacity: .7;
}

/* teendők: kontakt linkek */
.contact-row{
  margin-top: 4px;
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
}
.contact-link{
  font-size: 13px;
  font-weight: 700;
  color: #1e88e5;
  text-decoration: none;
}
.contact-link:active{ opacity: 0.7; }

/* napló: nagyobb nyitás + prefill gomb */
.log-card.expanded{
  transform: scale(1.02);
  padding-top: 14px;
  padding-bottom: 14px;
}
.btn-prefill{
  margin-top: 10px;
  width: 100%;
  border: 1px solid #dbe6ff;
  background: #f2f6ff;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
}

.tasks:empty::before,
.log-list:empty::before {
  content: "Betöltés…";
  opacity: 0.4;
  display: block;
  padding: 1rem;
}

/* ===== SPA transitions + bottom-nav liquid glass + sliding active ===== */
.page-content.spa-fade-out{ opacity: 0.0; transition: opacity 120ms ease; }
.page-content.spa-fade-in{ opacity: 1.0; transition: opacity 180ms ease; }

.bottom-nav{
  background: rgba(255,255,255,0.68);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.55);
}

.bottom-nav button{ position: relative; z-index: 2; }

.bottom-nav .nav-indicator{
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  border-radius: 50px;
  background: linear-gradient(135deg, rgba(0,123,255,0.92), rgba(79,140,255,0.85));
  box-shadow: 0 10px 24px rgba(0,123,255,0.25);
  transform: translateX(0%);
  transition: transform 0.4s cubic-bezier(.22,1,.36,1);
  z-index: 1;
}

.bottom-nav button.active{
  background-color: transparent; /* az indikátor adja a hátteret */
  color: white;
  text-shadow: 0 1px 0 rgba(0,0,0,0.08);
}

@media (prefers-reduced-motion: reduce){
  .bottom-nav .nav-indicator,
  .page-content.spa-fade-out,
  .page-content.spa-fade-in{ transition: none !important; }
}

.monthly-income {
  margin: 12px 0 18px;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg,#f8f9fb,#8da3f4);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.income-title {
  font-size:18px;
  opacity:.8;
}

.income-value {
  font-size:22px;
  font-weight:700;
  color:#181a1a;
}