:root{
  --bg:#151719;--card:#24272b;--line:#3a3f45;--yellow:#c69a16;--yellow2:#e1b62f;
  --text:#f4f4f0;--muted:#aeb3b8;--green:#79b86d;--red:#d35a50;--shadow:0 18px 46px rgba(0,0,0,.28)
}
*{box-sizing:border-box}
html,body{margin:0;width:100%;min-height:100%;height:100%;background:#111315;color:var(--text);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;overscroll-behavior:none}
button,input,select,textarea{font:inherit}button{cursor:pointer}.hidden{display:none!important}
.shell{max-width:920px;margin:auto;padding:calc(22px + env(safe-area-inset-top)) calc(22px + env(safe-area-inset-right)) calc(22px + env(safe-area-inset-bottom)) calc(22px + env(safe-area-inset-left))}
.brand{display:flex;align-items:center;gap:12px}.crown{width:58px;height:58px;border-radius:16px;overflow:hidden;border:1px solid rgba(225,182,47,.55);box-shadow:0 0 20px rgba(198,154,22,.16)}.crown img{width:100%;height:100%;object-fit:cover;display:block}
.brand h1{margin:0;color:var(--yellow2);font-family:Georgia,serif;font-style:italic;font-weight:500;font-size:30px}.brand p{margin:3px 0 0;color:var(--muted)}
.export-actions{display:flex;gap:8px;flex-wrap:wrap}.card{background:linear-gradient(180deg,#282b2f,#202327);border:1px solid var(--line);border-radius:17px;padding:18px;box-shadow:var(--shadow);margin-bottom:16px}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:15px}.section-head h2{margin:0;font-size:18px}.section-head p{margin:4px 0 0;color:var(--muted);font-size:13px}.save-state{font-size:12px;color:var(--yellow2)}
.btn{border:1px solid #4a5057;background:#171a1d;color:#fff;border-radius:11px;padding:11px 15px}.btn:hover{border-color:#676e75}.btn.primary{background:linear-gradient(135deg,#96720f,#c69a16);border-color:#d3a71f;color:#fffbea;font-weight:700}.btn.danger{background:#6d2626;border-color:#8b3737}.btn.small{padding:8px 11px;font-size:13px}.btn.wide{width:100%;margin-top:12px}
.summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:16px}.summary-box{background:#202327;border:1px solid var(--line);border-radius:14px;padding:13px 15px}.summary-box span{display:block;color:var(--muted);font-size:12px}.summary-box strong{display:block;color:var(--yellow2);font-size:21px;margin-top:4px}
.type{border:1px solid #41464c;background:#1d2023;color:#ececec;border-radius:12px;padding:12px 7px;display:flex;flex-direction:column;align-items:center;gap:5px;font-size:12px}.type span{font-size:23px}.type.active,.type:hover{border-color:var(--yellow);background:linear-gradient(180deg,#3a3726,#292a25);box-shadow:0 0 0 1px rgba(198,154,22,.12)}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field{display:block;color:#cdd0d3;font-size:13px}.field.full{grid-column:1/-1}
input,select,textarea{width:100%;margin-top:6px;background:#1a1d20;border:1px solid #454a50;color:#fff;border-radius:10px;padding:11px 12px;outline:none}input:focus,select:focus,textarea:focus{border-color:var(--yellow);box-shadow:0 0 0 3px rgba(198,154,22,.10)}textarea{resize:vertical}
.remaining{display:flex;justify-content:space-between;align-items:center;background:#1b1e21;border:1px dashed #565046;border-radius:10px;padding:11px 12px}.remaining strong{color:var(--yellow2);font-size:18px}
.form-actions{display:flex;gap:9px;margin-top:15px}.grow{flex:1}.filters{display:grid;grid-template-columns:1fr 210px;gap:10px;margin-bottom:12px}.list{display:grid;gap:10px}
.item{display:grid;grid-template-columns:66px 1fr auto;gap:12px;align-items:center;border:1px solid #3b4046;background:#1c1f22;border-radius:13px;padding:12px}.item:hover{border-color:#78601e}.item.today{border-color:var(--yellow);box-shadow:0 0 0 1px rgba(198,154,22,.12)}
.datebox{border:1px solid #42474d;background:#151719;border-radius:10px;text-align:center;padding:8px 5px}.datebox b{display:block;color:var(--yellow2);font-size:22px}.datebox small{color:#ddd}
.meta strong{display:block;font-size:15px}.meta .sub{display:block;color:var(--muted);font-size:12px;margin-top:4px}.kind{display:inline-block;margin-top:6px;color:var(--yellow2);font-size:12px}.balance{color:#f1cf66!important}
.badge{border-radius:8px;padding:6px 8px;font-size:11px;white-space:nowrap}.badge.ok{background:#1d3b22;color:#a7dda0}.badge.wait{background:#49390e;color:#f4cf67}.badge.cancel{background:#4a1d1d;color:#ffaaa3}
.quick{display:flex;gap:7px;margin-top:8px;flex-wrap:wrap}.quick a{font-size:11px;text-decoration:none;color:#eee;border:1px solid #444a50;border-radius:8px;padding:5px 8px;background:#171a1d}.quick a:hover{border-color:var(--yellow)}
.empty{padding:26px;text-align:center;color:var(--muted)}footer{display:flex;justify-content:space-between;gap:12px;padding:10px 4px 22px;color:#848a91;font-size:12px}footer b{color:var(--yellow2);font-family:Georgia,serif;font-style:italic}








/* v2.7 — fixed login background and iPhone bottom-white-bar fix */
html,body{background-color:#111315!important}
body{min-height:100dvh}

@supports (height:100dvh){
  
}

/* v2.8 — collapsible Termin Bilgileri */
.section-head-actions{display:flex;align-items:center;gap:8px}
.collapse-btn{
  width:38px;height:38px;border-radius:10px;
  border:1px solid #4a5057;background:#171a1d;color:var(--yellow2);
  font-size:16px;line-height:1;padding:0;display:grid;place-items:center
}
.collapse-btn:hover{border-color:var(--yellow)}
.form-content{display:block}
.form-content.collapsed{display:none}

/* v3.0 — iPhone input focus zoom fix */
input,
select,
textarea,
button {
  font-size:16px;
}

@media (max-width:680px) {
  input,
  select,
  textarea {
    font-size:16px !important;
    line-height:1.25;
  }

  
}

/* Prevent accidental text-size inflation in iOS standalone/Safari */
html {
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}

/* v3.3 — first-open login flicker/jump fix */








/* Keep the first paint stable while iOS calculates safe-area */
@supports (height:100svh){
  body{
    min-height:100svh;
  }
}

/* v3.4 — map app chooser */
.map-picker{
  position:fixed;
  inset:0;
  z-index:120;
  display:grid;
  place-items:center;
  padding:calc(18px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left));
  background:rgba(8,10,12,.78);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.map-picker-card{
  width:min(390px,100%);
  background:linear-gradient(180deg,#292c30,#1f2225);
  border:1px solid rgba(225,182,47,.35);
  border-radius:18px;
  padding:18px;
  box-shadow:0 24px 70px rgba(0,0,0,.5);
}
.map-picker-card h3{margin:0 0 6px;color:var(--yellow2)}
.map-picker-card p{margin:0 0 14px;color:var(--muted);font-size:13px;line-height:1.45}
.map-picker-actions{display:grid;gap:8px}
.map-picker-actions .btn{width:100%;text-align:left}


/* v4.1 — Terminler bölümü açılır/kapanır */
.list-content{display:block}
.list-content.collapsed{display:none}

@media(max-width:680px){
  .section-head.responsive .section-head-actions{
    width:100%;
    justify-content:space-between;
  }

  .section-head.responsive .export-actions{
    flex:1 1 auto;
  }

  .section-head.responsive .collapse-btn{
    flex:0 0 38px;
  }
}

/* v4.2 — keyboard-safe input visibility */
html,body{
  scroll-behavior:smooth;
}





input,
textarea,
select,


.form-card{
  scroll-margin-top:calc(70px + env(safe-area-inset-top));
}

@media(max-width:680px){
  

  

  input:focus,
  textarea:focus,
  select:focus{
    position:relative;
    z-index:5;
  }
}

/* v4.4 — arka plan sabit, giriş paneli serbest */


/* Arka plan bağımsız ve sabit kalır */




/* Panel artık sabit değil, normal akışta hareket eder */




@media(max-width:680px){
  

  
}

/* Klavye açıldığında panelin doğal olarak yukarı kaymasına izin ver */
@supports (height:100svh){
  
}

/* v4.9 — giriş sonrası login ekranını gerçekten tamamen kaldır */




#app:not(.hidden){
  display:block !important;
}

/* v5.1 — Toplam Kazanç özeti */
.summary{
  grid-template-columns:repeat(4,1fr);
}
.earnings-box strong{
  color:#e6c45b;
}
@media(max-width:680px){
  .summary{
    grid-template-columns:1fr 1fr !important;
  }
  .summary-box{
    min-width:0;
  }
}

/* v5.3 — aylık kazanç paneli */
.earnings-button{
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  text-align:left;
  color:inherit;
  cursor:pointer;
  font-family:inherit;
}
.earnings-button small{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:10px;
}
.earnings-button:active{
  transform:scale(.99);
}

.earnings-modal{
  position:fixed;
  inset:0;
  z-index:130;
  display:grid;
  place-items:center;
  padding:calc(18px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left));
  background:rgba(8,10,12,.80);
  backdrop-filter:blur(9px);
  -webkit-backdrop-filter:blur(9px);
}
.earnings-modal-card{
  width:min(430px,100%);
  max-height:min(680px,85dvh);
  overflow:auto;
  background:linear-gradient(180deg,#292c30,#1f2225);
  border:1px solid rgba(225,182,47,.35);
  border-radius:18px;
  padding:18px;
  box-shadow:0 24px 70px rgba(0,0,0,.52);
}
.earnings-modal-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:14px;
}
.earnings-modal-head h3{
  margin:0;
  color:var(--yellow2);
}
.earnings-modal-head p{
  margin:4px 0 0;
  color:var(--muted);
  font-size:12px;
}
.earnings-total{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:13px 14px;
  margin-bottom:10px;
  border:1px solid #4a4540;
  border-radius:12px;
  background:#1a1d20;
}
.earnings-total span{
  color:var(--muted);
  font-size:12px;
}
.earnings-total strong{
  color:var(--yellow2);
  font-size:20px;
}
.monthly-earnings-list{
  display:grid;
  gap:8px;
}
.monthly-income-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:12px 13px;
  border:1px solid #3d4248;
  border-radius:11px;
  background:#1c1f22;
}
.monthly-income-row span{
  text-transform:capitalize;
  color:#e4e5e6;
}
.monthly-income-row strong{
  color:#e6c45b;
}

/* v5.4 — Kalan Tahsilat + Toplam Kazanç yan yana ve eşit boyut */
.summary{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:10px !important;
}

.summary-box,
.earnings-button{
  width:100% !important;
  min-width:0 !important;
  height:100% !important;
  min-height:74px !important;
  box-sizing:border-box !important;
  margin:0 !important;
}

.summary-box:last-child,
.earnings-box{
  grid-column:auto !important;
}

@media(max-width:680px){
  .summary{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
  }

  .summary-box,
  .earnings-button{
    min-height:76px !important;
  }

  .summary-box:last-child,
  .earnings-box{
    grid-column:auto !important;
  }
}

/* v6.1 — giriş arka planı tam ekran sabit + tüm cihazlarda responsive */
html,
body{
  width:100%;
  min-height:100%;
  background:#111315 !important;
}



/* Arka plan ekranın tamamını kaplar ve sabit kalır */


/* Okunabilirlik için sabit karartma katmanı */


/* Telefon */
@media(max-width:680px){
  
}

/* Tablet */
@media(min-width:681px) and (max-width:1180px){
  
}

/* PC / geniş ekran */
@media(min-width:1181px){
  
}

/* Yatay kullanım */
@media(orientation:landscape){
  
}

/* iOS modern viewport */
@supports(height:100dvh){
  
}

/* v6.3 — Sıradaki Termin: daha belirgin gold kalp atışı */
#nextEventCard{
  position:relative !important;
  border:1.5px solid rgba(238,204,92,.95) !important;
  box-shadow:none !important;
  overflow:visible !important;
  animation:none !important;
}

#nextEventCard::before{
  content:"" !important;
  position:absolute !important;
  inset:-2px !important;
  border-radius:inherit !important;
  pointer-events:none !important;
  border:1.5px solid rgba(245,211,103,.98) !important;
  opacity:.62;
  animation:nextTerminHeartbeat 1.65s ease-in-out infinite !important;
}

@keyframes nextTerminHeartbeat{
  0%, 34%, 100%{
    opacity:.50;
    box-shadow:
      0 0 3px rgba(245,211,103,.38),
      0 0 6px rgba(245,211,103,.18);
  }
  7%{
    opacity:1;
    box-shadow:
      0 0 6px rgba(255,224,116,1),
      0 0 13px rgba(245,211,103,.72);
  }
  13%{
    opacity:.58;
    box-shadow:
      0 0 3px rgba(245,211,103,.40),
      0 0 6px rgba(245,211,103,.20);
  }
  20%{
    opacity:1;
    box-shadow:
      0 0 7px rgba(255,224,116,1),
      0 0 15px rgba(245,211,103,.78);
  }
  28%{
    opacity:.52;
    box-shadow:
      0 0 3px rgba(245,211,103,.38),
      0 0 6px rgba(245,211,103,.18);
  }
}

@media (prefers-reduced-motion:reduce){
  #nextEventCard::before{
    animation:none !important;
    opacity:.85;
    box-shadow:0 0 7px rgba(245,211,103,.55) !important;
  }
}

/* v6.4 — Gider alanları ve aylık kazanç düzenleme */
.monthly-edit-wrap{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
}
.monthly-income-input{
  width:118px !important;
  margin:0 !important;
  padding:8px 9px !important;
  text-align:right;
  font-size:15px !important;
}
.monthly-save-btn{
  flex:0 0 auto;
}
@media(max-width:420px){
  .monthly-income-row{
    align-items:flex-start;
    flex-direction:column;
  }
  .monthly-edit-wrap{
    width:100%;
  }
  .monthly-income-input{
    flex:1 1 auto;
    width:auto !important;
  }
}

/* v6.5 — çoğaltılabilir Giderler paneli */
.expense-panel{
  border:1px solid #3f444a;
  background:#1b1e21;
  border-radius:12px;
  padding:12px;
}
.expense-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}
.expense-panel-head > div{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.expense-title{
  color:#e8e9ea;
  font-weight:700;
}
.expense-panel-head small{
  color:var(--muted);
  font-size:11px;
}
.expense-list{
  display:grid;
  gap:8px;
}
.expense-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 120px 38px;
  gap:8px;
  align-items:center;
}
.expense-row input{
  margin:0 !important;
}
.expense-remove{
  width:38px;
  height:38px;
  border-radius:9px;
  border:1px solid #5b3a3a;
  background:#371d1d;
  color:#ffaaa3;
  font-size:22px;
  line-height:1;
  padding:0;
}
.expense-total-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:10px;
  padding-top:10px;
  border-top:1px dashed #454a50;
  color:var(--muted);
  font-size:12px;
}
.expense-total-row strong{
  color:var(--yellow2);
  font-size:17px;
}
@media(max-width:520px){
  .expense-panel-head{
    align-items:flex-start;
    flex-direction:column;
  }
  .expense-row{
    grid-template-columns:minmax(0,1fr) 96px 36px;
  }
}

/* v6.6 — cihaz içi aylık iş geçmişi */
.monthly-income-group{
  border:1px solid #3a3f45;
  border-radius:12px;
  overflow:hidden;
  background:#181b1e;
}
.monthly-income-group .monthly-income-row{
  border:0;
  border-radius:0;
  border-bottom:1px solid #34393f;
}
.monthly-job-list{
  display:grid;
  gap:7px;
  padding:9px;
}
.monthly-job-row{
  display:grid;
  grid-template-columns:130px minmax(0,1fr) 100px auto 38px;
  gap:7px;
  align-items:center;
}
.monthly-job-row input{
  margin:0 !important;
  min-width:0;
}
.history-empty{
  color:var(--muted);
  font-size:12px;
  padding:8px 4px;
}
@media(max-width:680px){
  .monthly-job-row{
    grid-template-columns:1fr 1fr;
  }
  .monthly-job-row .history-name{
    grid-column:1/-1;
  }
  .history-delete-btn{
    width:100%;
  }
}

/* v6.8 — Giderler paneli Kapora altında, açılır/kapanır */
.expense-head-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
#expenseTotalTop{
  color:var(--yellow2);
  font-size:15px;
  white-space:nowrap;
}
.expense-content{
  display:block;
}
.expense-content.collapsed{
  display:none;
}
.expense-content-actions{
  display:flex;
  justify-content:flex-end;
  margin-bottom:8px;
}
@media(max-width:520px){
  .expense-panel-head{
    flex-direction:row !important;
    align-items:center !important;
  }
  .expense-head-actions{
    flex:0 0 auto;
  }
}

/* v7.0 — Organizasyon türü kompakt açılır liste */
.event-type-select-field{
  margin-bottom:4px;
}
#eventTypeSelect{
  width:100%;
  min-height:46px;
  margin-top:6px;
  padding:10px 12px;
  border:1px solid #454a50;
  border-radius:10px;
  background:#1a1d20;
  color:#fff;
  font-size:16px;
  box-sizing:border-box;
}
#eventTypeSelect:focus{
  border-color:var(--yellow);
  box-shadow:0 0 0 3px rgba(198,154,22,.10);
  outline:none;
}

/* v7.4 — temiz mobil temel düzen */
@media(max-width:680px){
  .shell{
    padding:
      calc(14px + env(safe-area-inset-top))
      calc(14px + env(safe-area-inset-right))
      calc(14px + env(safe-area-inset-bottom))
      calc(14px + env(safe-area-inset-left));
  }
  .form-grid{grid-template-columns:1fr}
  .field.full{grid-column:auto}
  .filters{grid-template-columns:1fr}
  .item{grid-template-columns:56px 1fr}
  .item .badge{grid-column:2;justify-self:start}
  .section-head.responsive{align-items:flex-start;flex-direction:column}
  footer{flex-direction:column}
}


/* v7.4 — Tarih diğer inputlarla birebir aynı boyut */
.field > .date-input{
  display:block !important;
  position:relative !important;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  height:46px !important;
  min-height:46px !important;
  max-height:46px !important;
  margin:6px 0 0 !important;
  padding:0 12px !important;
  border:1px solid #454a50 !important;
  border-radius:10px !important;
  box-sizing:border-box !important;
  background:#1a1d20 !important;
  color:#fff !important;
  font-family:inherit !important;
  font-size:16px !important;
  font-weight:400 !important;
  line-height:44px !important;
  overflow:hidden !important;
  -webkit-appearance:none !important;
  appearance:none !important;
  color-scheme:dark;
}

.field > .date-input:focus{
  border-color:var(--yellow) !important;
  box-shadow:0 0 0 3px rgba(198,154,22,.10) !important;
  outline:none !important;
}

.field > .date-input::-webkit-date-and-time-value{
  display:block !important;
  width:100% !important;
  height:44px !important;
  min-height:44px !important;
  padding:0 !important;
  margin:0 !important;
  line-height:44px !important;
  text-align:left !important;
}

.field > .date-input::-webkit-calendar-picker-indicator{
  opacity:.9 !important;
  width:20px !important;
  height:20px !important;
  margin:0 !important;
  padding:0 !important;
}

@media(max-width:680px){
  .field > .date-input{
    height:46px !important;
    min-height:46px !important;
    max-height:46px !important;
    line-height:44px !important;
  }
}


/* v7.6 — Aylık kazançlarda tarihli geçmiş iş ekleme */
.history-add-btn{
  white-space:nowrap;
}
.history-new-row{
  display:grid;
  grid-template-columns:130px minmax(0,1fr) 100px auto 38px;
  gap:7px;
  align-items:center;
  padding-top:8px;
  margin-top:3px;
  border-top:1px dashed #3b4046;
}
.history-new-row input{
  margin:0 !important;
  min-width:0;
}
@media(max-width:680px){
  .monthly-edit-wrap{
    flex-wrap:wrap;
  }
  .history-add-btn{
    width:100%;
  }
  .history-new-row{
    grid-template-columns:1fr 1fr;
  }
  .history-new-row .history-new-name{
    grid-column:1/-1;
  }
  .history-new-row .history-create-btn,
  .history-new-row .history-cancel-btn{
    width:100%;
  }
}

/* v7.7 — dikey görünümü koru, yatay görünümü kompaktlaştır */

/* Dikey / varsayılan: mevcut güzel görünümü koru */
.dashboard-top-row{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  margin-bottom:18px;
}

.dashboard-top-row .summary{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:10px !important;
  margin:0 !important;
}

.dashboard-top-row .summary-box,
.dashboard-top-row .earnings-button{
  min-height:76px !important;
  height:auto !important;
}

.dashboard-top-row .top-actions{
  display:grid !important;
  grid-template-columns:1fr 1fr;
  gap:8px;
  width:100%;
}

.dashboard-top-row .top-actions .btn{
  width:100% !important;
  min-height:42px !important;
  height:auto !important;
}

/* Yatay telefon / tablet / PC */
@media (orientation:landscape){
  .shell{
    display:block !important;
    max-width:1240px !important;
  }

  .dashboard-top-row{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 210px !important;
    grid-template-rows:auto !important;
    gap:14px !important;
    align-items:stretch !important;
    margin-bottom:16px !important;
  }

  .dashboard-top-row .summary{
    grid-column:1 !important;
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
    width:100% !important;
    margin:0 !important;
  }

  .dashboard-top-row .summary-box,
  .dashboard-top-row .earnings-button{
    min-height:108px !important;
    height:108px !important;
    padding:16px 18px !important;
    align-self:stretch !important;
  }

  .dashboard-top-row .top-actions{
    grid-column:2 !important;
    display:grid !important;
    grid-template-columns:1fr !important;
    grid-template-rows:1fr 1fr !important;
    gap:10px !important;
    height:108px !important;
    align-self:stretch !important;
  }

  .dashboard-top-row .top-actions .btn{
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
    padding:8px 12px !important;
    font-size:14px !important;
    border-radius:10px !important;
    margin:0 !important;
  }

  /* Buton sırası */
  #newBtn{
    order:1 !important;
  }

  #logoutBtn{
    order:2 !important;
  }

}

/* Geniş masaüstü yatay */
@media (orientation:landscape) and (min-width:1200px){
  .dashboard-top-row{
    grid-template-columns:minmax(0,1fr) 230px !important;
    gap:16px !important;
  }

  .dashboard-top-row .summary-box,
  .dashboard-top-row .earnings-button,
  .dashboard-top-row .top-actions{
    height:112px !important;
  }
}

/* v7.8 — Sıradaki Termin üst grid dışında, kesin tam genişlik */
#nextEventCard{
  width:100% !important;
  max-width:none !important;
  height:auto !important;
  min-height:0 !important;
  margin:0 0 18px !important;
  box-sizing:border-box !important;
}

@media(orientation:landscape){
  .dashboard-top-row{
    grid-template-columns:minmax(0,1fr) 220px !important;
    align-items:stretch !important;
  }

  .dashboard-top-row .summary{
    grid-column:1 !important;
    grid-row:1 !important;
  }

  .dashboard-top-row .top-actions{
    grid-column:2 !important;
    grid-row:1 !important;
    height:108px !important;
  }

  #nextEventCard{
    display:block !important;
    width:100% !important;
    margin-top:0 !important;
  }
}

/* v7.9 — İçe Aktar / Geri Yükle */
#importBtn{white-space:nowrap}
@media(max-width:680px){
  .export-actions{gap:7px}
  .export-actions .btn{flex:1 1 auto}
}

/* v8.0 — Logo/başlık ile finans kutularını net ayır */
.topbar{
  margin-bottom:24px !important;
}

.dashboard-top-row{
  margin-top:0 !important;
}

.brand{
  padding-bottom:2px;
}

@media(max-width:680px) and (orientation:portrait){
  .topbar{
    margin-bottom:16px !important;
  }
}

@media(orientation:landscape){
  .topbar{
    margin-bottom:28px !important;
  }

  .dashboard-top-row{
    margin-top:0 !important;
  }
}

/* v8.1 — PWA / çevrim dışı durum */
html.is-offline body::after{
  content:"Çevrim dışı";
  position:fixed;
  right:10px;
  bottom:calc(10px + env(safe-area-inset-bottom));
  z-index:9999;
  padding:5px 9px;
  border-radius:999px;
  background:rgba(20,22,24,.92);
  border:1px solid rgba(224,187,61,.55);
  color:#e0bb3d;
  font-size:11px;
  pointer-events:none;
}
@media(display-mode:standalone){
  body{
    -webkit-user-select:none;
    user-select:none;
  }
  input,textarea,select{
    -webkit-user-select:text;
    user-select:text;
  }
}

/* v8.2 — çevrim dışı senkron kuyruğu */
html[data-sync-count]:not([data-sync-count="0"]) body::before{
  content:"Senkron bekliyor: " attr(data-sync-count);
  position:fixed;
  left:10px;
  bottom:calc(10px + env(safe-area-inset-bottom));
  z-index:9999;
  padding:5px 9px;
  border-radius:999px;
  background:rgba(20,22,24,.92);
  border:1px solid rgba(224,187,61,.55);
  color:#e0bb3d;
  font-size:11px;
  pointer-events:none;
}

/* v8.3 — termin bildirimleri */
.notification-settings{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:0 0 16px;
  padding:10px 12px;
  border:1px solid #34393f;
  border-radius:12px;
  background:#1b1e21;
}
.notification-settings-head{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.notification-settings-head > div{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.notification-settings-head strong{
  color:#e8e9ea;
}
.notification-settings-head small{
  color:var(--muted);
  font-size:11px;
}
#notificationMode{
  min-height:38px;
  padding:7px 10px;
  border:1px solid #454a50;
  border-radius:9px;
  background:#17191c;
  color:#fff;
}
.termin-notice{
  position:fixed;
  top:calc(12px + env(safe-area-inset-top));
  left:50%;
  transform:translate(-50%,-18px);
  z-index:10000;
  display:flex;
  flex-direction:column;
  gap:3px;
  width:min(420px,calc(100vw - 28px));
  padding:12px 14px;
  border:1px solid rgba(230,196,91,.72);
  border-radius:12px;
  background:rgba(22,24,27,.96);
  box-shadow:0 12px 34px rgba(0,0,0,.35);
  opacity:0;
  pointer-events:none;
  transition:.22s ease;
}
.termin-notice.show{
  opacity:1;
  transform:translate(-50%,0);
}
.termin-notice strong{color:#e6c45b}
.termin-notice span{color:#e7e8e9;font-size:13px}
@media(max-width:680px){
  .notification-settings{
    align-items:stretch;
    flex-direction:column;
  }
  .notification-settings-head{
    justify-content:space-between;
  }
}

/* v8.4 — Ana merkez: Termin + Alışveriş */
.hub-screen{
  position:fixed;
  inset:0;
  z-index:20000;
  overflow:auto;
  background:#0d0f11;
}
.hub-backdrop{
  position:fixed;
  inset:0;
  background:
    linear-gradient(rgba(8,9,10,.60),rgba(8,9,10,.78)),
    url('/home-bg.png') center/cover no-repeat;
  filter:saturate(.85) contrast(1.05);
}
.hub-center{
  position:relative;
  z-index:1;
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:16px;
  width:min(660px,calc(100% - 30px));
  margin:auto;
  padding:calc(28px + env(safe-area-inset-top)) 0 calc(28px + env(safe-area-inset-bottom));
  box-sizing:border-box;
}
.hub-welcome{
  text-align:center;
  margin-bottom:12px;
}
.hub-welcome h1{
  margin:0;
  font-size:clamp(28px,5vw,44px);
  letter-spacing:.03em;
}
.hub-welcome p{
  margin:8px 0 0;
  color:#c7c9cc;
}
.hub-card{
  width:100%;
  min-height:142px;
  display:grid;
  grid-template-columns:88px 1fr 44px;
  align-items:center;
  gap:18px;
  padding:24px 26px;
  border-radius:22px;
  border:1px solid rgba(224,187,61,.78);
  background:linear-gradient(135deg,rgba(35,27,17,.95),rgba(24,25,28,.96));
  color:#fff;
  text-align:left;
  box-shadow:0 18px 48px rgba(0,0,0,.35),0 0 22px rgba(222,179,39,.12);
}
.hub-card-shop{
  background:linear-gradient(135deg,rgba(50,39,13,.92),rgba(25,25,25,.97));
}
.hub-icon{
  font-size:54px;
  text-align:center;
}
.hub-copy{
  display:flex;
  flex-direction:column;
  gap:7px;
}
.hub-copy strong{
  font-size:clamp(23px,4vw,34px);
  letter-spacing:.01em;
}
.hub-copy small{
  color:#d1d2d4;
  font-size:15px;
}
.hub-lock{
  font-size:24px;
  opacity:.9;
}
.hub-password-modal{
  position:fixed;
  inset:0;
  z-index:21000;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(5,6,7,.72);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.hub-password-card{
  position:relative;
  width:min(390px,100%);
  padding:24px;
  border-radius:18px;
  border:1px solid rgba(224,187,61,.45);
  background:#202327;
  box-shadow:0 24px 70px rgba(0,0,0,.50);
}
.hub-password-card h2{margin:0 0 5px;color:#e3bd42}
.hub-password-card p{margin:0 0 16px;color:#aaaeb3}
.hub-password-card input{
  width:100%;
  min-height:48px;
  margin-bottom:12px;
  box-sizing:border-box;
}
.hub-password-card .btn{width:100%}
.hub-modal-close{
  position:absolute;
  top:12px;
  right:12px;
  width:36px;
  height:36px;
  border-radius:10px;
  border:1px solid #4a4f55;
  background:#17191c;
  color:#fff;
  font-size:22px;
}
.hub-password-state{
  min-height:20px;
  margin-top:10px;
  color:#e3a46a;
  text-align:center;
}
.shopping-screen{
  min-height:100dvh;
  background:#111315;
  padding:calc(20px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
  box-sizing:border-box;
}
.shopping-shell{
  width:min(900px,100%);
  margin:auto;
}
.shopping-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-bottom:20px;
}
.shopping-head h1{margin:0}
.shopping-head p{margin:4px 0 0;color:#9da1a6}
.shopping-placeholder{
  padding:26px;
  border:1px solid #3a3f45;
  border-radius:18px;
  background:#202327;
}
.shopping-placeholder h2{margin-top:0;color:#e3bd42}

@media(max-width:680px){
  .hub-center{justify-content:center}
  .hub-card{
    min-height:118px;
    grid-template-columns:64px 1fr 30px;
    padding:18px;
    gap:12px;
  }
  .hub-icon{font-size:42px}
  .hub-copy strong{font-size:21px}
  .hub-copy small{font-size:13px}
  .shopping-head{align-items:flex-start;flex-direction:column}
}

@media(orientation:landscape) and (max-height:600px){
  .hub-center{
    justify-content:flex-start;
    padding-top:24px;
    padding-bottom:24px;
  }
  .hub-card{min-height:98px;padding:14px 18px}
  .hub-welcome{margin-bottom:2px}
}

/* v8.6 — oda arka planı + Görüntü 2 tarzı giriş kartları */
.hub-screen{
  background:#0c0d0e !important;
}
.hub-backdrop{
  background:
    linear-gradient(rgba(8,8,9,.25),rgba(8,8,9,.52)),
    url('/home-bg.jpg') center center / cover no-repeat !important;
  filter:none !important;
}
.hub-center{
  width:min(720px,calc(100% - 32px)) !important;
  gap:18px !important;
}
.hub-welcome{
  padding:10px 18px;
  border-radius:16px;
  background:rgba(13,14,16,.50);
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
}
.hub-welcome h1{
  color:#fff;
  text-shadow:0 2px 14px rgba(0,0,0,.75);
}
.hub-welcome p{
  color:#e1e1e1 !important;
}
.hub-card{
  position:relative;
  min-height:190px !important;
  display:grid !important;
  grid-template-columns:112px 1fr !important;
  grid-template-rows:1fr 48px !important;
  column-gap:22px !important;
  row-gap:12px !important;
  padding:24px 28px 20px !important;
  border-radius:24px !important;
  overflow:hidden;
  backdrop-filter:blur(13px);
  -webkit-backdrop-filter:blur(13px);
}
.hub-card-termin{
  border:1.5px solid #e98225 !important;
  background:linear-gradient(135deg,rgba(76,31,5,.92),rgba(28,20,15,.95)) !important;
  box-shadow:0 16px 48px rgba(0,0,0,.42),0 0 18px rgba(235,126,28,.22) !important;
}
.hub-card-shop{
  border:1.5px solid #dfb640 !important;
  background:linear-gradient(135deg,rgba(52,43,19,.94),rgba(24,24,24,.96)) !important;
  box-shadow:0 16px 48px rgba(0,0,0,.42),0 0 18px rgba(222,181,64,.18) !important;
}
.hub-icon{
  grid-column:1;
  grid-row:1 / span 2;
  align-self:center;
  font-size:66px !important;
  filter:drop-shadow(0 3px 8px rgba(0,0,0,.3));
}
.hub-copy{
  grid-column:2;
  grid-row:1;
  align-self:end;
}
.hub-copy strong{
  font-size:clamp(24px,4vw,34px) !important;
  color:#fff;
}
.hub-copy small{
  font-size:15px !important;
  color:#eee !important;
}
.hub-entry{
  grid-column:2;
  grid-row:2;
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  border:1px solid currentColor;
  border-radius:11px;
  font-size:15px;
  font-weight:800;
  letter-spacing:.02em;
}
.hub-card-termin .hub-entry{color:#f49a49}
.hub-card-shop .hub-entry{color:#e8c65e}
@media(max-width:680px){
  .hub-center{
    width:min(100% - 24px,560px) !important;
  }
  .hub-card{
    min-height:154px !important;
    grid-template-columns:74px 1fr !important;
    grid-template-rows:1fr 42px !important;
    column-gap:14px !important;
    padding:18px !important;
  }
  .hub-icon{font-size:48px !important}
  .hub-copy strong{font-size:20px !important}
  .hub-copy small{font-size:12.5px !important}
  .hub-entry{min-height:40px;font-size:13px}
}
@media(orientation:landscape){
  .hub-backdrop{
    background-position:center center !important;
  }
  .hub-center{
    width:min(920px,calc(100% - 36px)) !important;
    padding-top:20px !important;
    padding-bottom:20px !important;
  }
  .hub-card{
    min-height:125px !important;
    grid-template-columns:88px 1fr !important;
    grid-template-rows:1fr 40px !important;
    padding:14px 22px !important;
  }
  .hub-icon{font-size:50px !important}
}

/* v8.8 — Ana merkez arka planı tüm cihazlarda gerçek tam ekran */
html,
body{
  width:100%;
  min-width:100%;
  min-height:100%;
  margin:0;
  padding:0;
}

.hub-screen{
  position:fixed !important;
  inset:0 !important;
  width:100vw !important;
  height:100vh !important;
  min-height:100dvh !important;
  overflow:auto !important;
  background:#0b0c0d !important;
}

.hub-backdrop{
  position:fixed !important;
  inset:0 !important;
  width:100vw !important;
  height:100vh !important;
  min-height:100dvh !important;
  background-image:
    linear-gradient(rgba(8,8,9,.22),rgba(8,8,9,.48)),
    url('/home-bg.jpg') !important;
  background-repeat:no-repeat !important;
  background-position:center center !important;
  background-size:cover !important;
  background-attachment:fixed !important;
  transform:translateZ(0);
  will-change:transform;
}

.hub-center{
  position:relative !important;
  z-index:1 !important;
  min-height:100dvh !important;
  box-sizing:border-box !important;
}

/* iPhone / dar dikey ekran */
@media(max-width:680px) and (orientation:portrait){
  .hub-backdrop{
    background-position:center center !important;
    background-size:cover !important;
  }
}

/* Tablet / PC */
@media(min-width:681px){
  .hub-backdrop{
    background-position:center center !important;
    background-size:cover !important;
  }
}

/* Yatay ekran */
@media(orientation:landscape){
  .hub-screen,
  .hub-backdrop{
    width:100vw !important;
    height:100vh !important;
    min-height:100dvh !important;
  }

  .hub-backdrop{
    background-position:center center !important;
    background-size:cover !important;
  }
}

/* iOS PWA'da fixed background davranışını daha stabil tut */
@supports (-webkit-touch-callout:none){
  .hub-backdrop{
    background-attachment:scroll !important;
  }
}

/* v9.0 — tamamlanmış alışveriş sistemi */
.shop-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px}
.shop-summary>div,.shop-card{background:rgba(27,30,33,.94);border:1px solid #3b4046;border-radius:15px}
.shop-summary>div{padding:14px;display:flex;flex-direction:column;gap:5px}
.shop-summary small{color:#9da2a7}.shop-summary strong{font-size:22px;color:#e4bd45}
.shop-card{padding:16px;margin-bottom:14px}.shop-card-title,.shop-toolbar,.shop-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}
.shop-card-title h2{margin:0}.shop-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:10px;margin:14px 0}
.shop-grid label{display:flex;flex-direction:column;gap:5px;color:#b9bdc1;font-size:12px}.shop-grid input,.shop-grid select,.shop-toolbar input,.shop-toolbar select{min-height:44px;box-sizing:border-box}
.shop-wide{grid-column:1/-1}.shop-toolbar{margin-bottom:12px}.shop-toolbar input{flex:1}
.shop-list{display:flex;flex-direction:column;gap:8px}.shop-item{display:grid;grid-template-columns:42px 1fr auto 38px;align-items:center;gap:8px;padding:10px;border:1px solid #3b4046;border-radius:11px;background:#17191c}
.shop-item.done{opacity:.55}.shop-item.done strong{text-decoration:line-through}.shop-check,.shop-delete{border:0;background:transparent;color:#e4bd45;font-size:24px}
.shop-delete{color:#c88787}.shop-item-main{display:flex;flex-direction:column;gap:3px}.shop-item-main span{font-size:12px;color:#9ca0a5}.shop-item-price{font-weight:700}.shop-actions{margin-top:12px;justify-content:flex-end}
@media(max-width:680px){.shop-summary{grid-template-columns:1fr 1fr}.shop-summary>div:last-child{grid-column:1/-1}.shop-grid{grid-template-columns:1fr 1fr}.shop-wide{grid-column:1/-1}.shop-toolbar{align-items:stretch;flex-direction:column}.shop-item{grid-template-columns:36px 1fr 34px}.shop-item-price{grid-column:2}}

/* v9.3 — global auto-update is invisible; no layout changes */
html[data-sync-count]:not([data-sync-count="0"]) body::before{
  transition:opacity .15s ease;
}

/* v9.4 — Aylık Kazançlar: her ay ayrı, yalnız tarih + fiyat */
.simple-month{
  margin-bottom:12px;
  overflow:hidden;
  border:1px solid #3b4046;
  border-radius:14px;
  background:#191c1f;
}
.simple-month-head{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  padding:14px 16px !important;
  border-bottom:1px solid #353a40;
}
.simple-month-head strong:first-child{
  color:#f1f2f3;
  font-size:18px;
  text-transform:capitalize;
}
.simple-month-head strong:last-child{
  color:#e4bd45;
  font-size:18px;
  white-space:nowrap;
}
.simple-history-list{
  display:flex;
  flex-direction:column;
}
.simple-history-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:13px 16px;
  border-top:1px solid #30353a;
}
.simple-history-row:first-child{
  border-top:0;
}
.simple-history-row span{
  color:#e8e9ea;
  font-size:16px;
}
.simple-history-row strong{
  color:#e4bd45;
  font-size:16px;
  white-space:nowrap;
}
.simple-history-list .history-empty{
  padding:14px 16px;
}

/* v9.5 — Aylık kazanç düzenleme / silme */
.edit-month{margin-bottom:12px;border:1px solid #3b4046;border-radius:14px;overflow:hidden;background:#191c1f}
.edit-month-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid #34393f}
.edit-month-title{font-size:20px;color:#f1f2f3;text-transform:capitalize}
.edit-month-actions{display:flex;gap:8px}
.mini-icon-btn{width:38px;height:38px;display:grid;place-items:center;border:1px solid #484e55;border-radius:10px;background:#17191c;color:#fff;font-size:16px}
.mini-icon-btn.danger{color:#e39797;border-color:#664044}
.month-edit-panel,.history-backfill-panel{display:flex;gap:8px;align-items:center;padding:10px 16px;border-bottom:1px solid #30353a}
.month-edit-panel input,.history-backfill-panel input{min-height:42px;margin:0}
.monthly-history-edit-list{display:flex;flex-direction:column}
.history-edit-row{display:grid;grid-template-columns:minmax(120px,1fr) auto 40px 40px;gap:8px;align-items:center;padding:12px 16px;border-top:1px solid #30353a}
.history-edit-row:first-child{border-top:0}
.history-display-date{font-size:16px;color:#e8e9ea}
.history-display-price{font-size:16px;color:#e4bd45;font-weight:800;white-space:nowrap}
.history-inline-editor{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr auto auto;gap:8px;padding-top:8px}
.history-inline-editor input{margin:0;min-width:0}
.legacy-month-empty{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:14px 16px}
.legacy-month-empty .history-backfill-panel{width:100%;padding:8px 0 0;border:0}
@media(max-width:680px){
 .history-edit-row{grid-template-columns:1fr auto 36px 36px}
 .history-display-price{grid-column:1/3;grid-row:2}
 .history-inline-editor{grid-template-columns:1fr 1fr}
 .month-edit-panel,.history-backfill-panel{flex-wrap:wrap}
 .month-edit-panel input,.history-backfill-panel input{flex:1 1 150px}
}

/* v9.6 — Toplam Kazanç kartı kesin tıklanabilir */
#earningsBtn{
  position:relative !important;
  z-index:20 !important;
  pointer-events:auto !important;
  touch-action:manipulation !important;
  cursor:pointer !important;
  -webkit-tap-highlight-color:rgba(230,196,91,.16);
}
#earningsBtn *{
  pointer-events:none !important;
}
#earningsBtn::before,
#earningsBtn::after{
  pointer-events:none !important;
}
.earnings-modal.hidden{
  display:none !important;
}
.earnings-modal:not(.hidden){
  display:grid !important;
  pointer-events:auto !important;
}


/* v9.8 — Aylık kazanç kompakt hizalama */
.edit-month-head{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:9px !important;
  padding:11px 13px !important;
}
.edit-month-actions{
  display:flex !important;
  align-items:center !important;
  gap:4px !important;
  flex:0 0 auto !important;
  order:0 !important;
}
.edit-month-title{
  order:1 !important;
  margin-left:2px !important;
  font-size:18px !important;
}
.mini-icon-btn{
  width:28px !important;
  height:28px !important;
  min-width:28px !important;
  min-height:28px !important;
  padding:0 !important;
  border-radius:7px !important;
  font-size:12px !important;
  line-height:1 !important;
}
.history-edit-row{
  display:grid !important;
  grid-template-columns:auto minmax(105px,1fr) auto !important;
  grid-template-areas:"actions date price" "editor editor editor" !important;
  column-gap:10px !important;
  row-gap:8px !important;
  align-items:center !important;
  padding:10px 13px !important;
}
.history-row-actions{
  grid-area:actions !important;
  display:flex !important;
  align-items:center !important;
  gap:4px !important;
  justify-self:start !important;
}
.history-display-date{
  grid-area:date !important;
  justify-self:start !important;
  font-size:15px !important;
  white-space:nowrap !important;
}
.history-display-price{
  grid-area:price !important;
  justify-self:end !important;
  font-size:15px !important;
  white-space:nowrap !important;
}
.history-inline-editor{
  grid-area:editor !important;
  grid-column:auto !important;
}
@media(max-width:680px){
  .history-edit-row{
    grid-template-columns:auto 1fr auto !important;
    grid-template-areas:"actions date price" "editor editor editor" !important;
    column-gap:7px !important;
    padding:9px 10px !important;
  }
  .history-display-date{font-size:14px !important}
  .history-display-price{font-size:14px !important}
  .edit-month-head{padding:10px !important}
  .edit-month-title{font-size:17px !important}
}

/* v9.9 — Aylık Kazançlar kapatma/silme düğmeleri sağda */
.monthly-income-group .month-actions,
.monthly-income-group .history-actions,
.simple-month-head .month-actions,
.simple-history-row .history-actions{
  display:flex !important;
  align-items:center !important;
  gap:5px !important;
  width:100% !important;
}

.monthly-income-group .month-actions .edit-btn,
.monthly-income-group .history-actions .edit-btn,
.simple-month-head .month-actions .edit-btn,
.simple-history-row .history-actions .edit-btn{
  order:1 !important;
  margin-right:auto !important;
}

.monthly-income-group .month-actions .delete-btn,
.monthly-income-group .history-actions .delete-btn,
.simple-month-head .month-actions .delete-btn,
.simple-history-row .history-actions .delete-btn,
.monthly-income-group .month-actions .close-btn,
.monthly-income-group .history-actions .close-btn{
  order:99 !important;
  margin-left:auto !important;
}

/* Generic fallback for icon buttons created in v9.8 */
.monthly-income-group button[data-month-delete],
.monthly-income-group button[data-history-delete],
.monthly-income-group .month-delete-btn,
.monthly-income-group .history-delete-btn{
  margin-left:auto !important;
  justify-self:end !important;
}

/* Keep icon buttons compact */
.monthly-income-group .month-actions button,
.monthly-income-group .history-actions button,
.simple-month-head button,
.simple-history-row button{
  width:28px !important;
  min-width:28px !important;
  height:28px !important;
  min-height:28px !important;
  padding:0 !important;
  display:inline-grid !important;
  place-items:center !important;
}

/* v10.0 — Aylık Kazançlar ikon butonları ekstra kompakt */
.monthly-income-group .month-actions button,
.monthly-income-group .history-actions button,
.simple-month-head button,
.simple-history-row button{
  width:22px !important;
  min-width:22px !important;
  max-width:22px !important;
  height:22px !important;
  min-height:22px !important;
  max-height:22px !important;
  padding:0 !important;
  margin-top:0 !important;
  margin-bottom:0 !important;
  border-radius:6px !important;
  font-size:12px !important;
  line-height:1 !important;
  display:inline-grid !important;
  place-items:center !important;
  flex:0 0 22px !important;
}

.monthly-income-group .month-actions,
.monthly-income-group .history-actions,
.simple-month-head .month-actions,
.simple-history-row .history-actions{
  gap:3px !important;
}

.simple-month-head,
.simple-history-row{
  min-height:0 !important;
}

/* v10.1 — Aylık Kazançlar: TÜM işlem düğmeleri sağ tarafta */
.monthly-income-group .month-actions,
.monthly-income-group .history-actions,
.simple-month-head .month-actions,
.simple-history-row .history-actions{
  width:auto !important;
  margin-left:auto !important;
  margin-right:0 !important;
  justify-content:flex-end !important;
  flex:0 0 auto !important;
}

.monthly-income-group .month-actions .edit-btn,
.monthly-income-group .history-actions .edit-btn,
.simple-month-head .month-actions .edit-btn,
.simple-history-row .history-actions .edit-btn,
.monthly-income-group .month-actions .delete-btn,
.monthly-income-group .history-actions .delete-btn,
.simple-month-head .month-actions .delete-btn,
.simple-history-row .history-actions .delete-btn{
  margin-left:0 !important;
  margin-right:0 !important;
}

/* v9.x'ten kalan "edit solda" kuralını kesin geçersiz kıl */
.monthly-income-group .month-actions .edit-btn,
.monthly-income-group .history-actions .edit-btn{
  order:1 !important;
}
.monthly-income-group .month-actions .delete-btn,
.monthly-income-group .history-actions .delete-btn{
  order:2 !important;
}

/* fallback: action grubu olmayan satırlarda son ikonlar sağa */
.simple-month-head,
.simple-history-row{
  display:flex !important;
  align-items:center !important;
}
.simple-month-head > button:first-of-type,
.simple-history-row > button:first-of-type{
  margin-left:auto !important;
}

/* v10.2 — Aylık Kazançlar ikon butonları daha da küçük */
.monthly-income-group .month-actions button,
.monthly-income-group .history-actions button,
.simple-month-head button,
.simple-history-row button{
  width:18px !important;
  min-width:18px !important;
  max-width:18px !important;
  height:18px !important;
  min-height:18px !important;
  max-height:18px !important;
  flex:0 0 18px !important;
  padding:0 !important;
  border-radius:5px !important;
  font-size:10px !important;
  line-height:1 !important;
  display:inline-grid !important;
  place-items:center !important;
}

.monthly-income-group .month-actions,
.monthly-income-group .history-actions,
.simple-month-head .month-actions,
.simple-history-row .history-actions{
  gap:2px !important;
}

/* v10.3 — GERÇEK sınıflar: işlem butonları kesin sağda */
.edit-month-head{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:8px !important;
}

.edit-month-title{
  grid-column:1 !important;
  order:initial !important;
  margin:0 !important;
  justify-self:start !important;
}

.edit-month-actions{
  grid-column:2 !important;
  order:initial !important;
  justify-self:end !important;
  margin-left:auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:3px !important;
  width:auto !important;
}

.history-edit-row{
  display:grid !important;
  grid-template-columns:minmax(105px,1fr) auto auto !important;
  grid-template-areas:
    "date price actions"
    "editor editor editor" !important;
  align-items:center !important;
  column-gap:9px !important;
}

.history-display-date{
  grid-area:date !important;
  justify-self:start !important;
}

.history-display-price{
  grid-area:price !important;
  justify-self:end !important;
}

.history-row-actions{
  grid-area:actions !important;
  justify-self:end !important;
  margin-left:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:3px !important;
  width:auto !important;
}

/* Butonların gerçek sınıfı mini-icon-btn: 18px */
.edit-month-actions .mini-icon-btn,
.history-row-actions .mini-icon-btn{
  width:18px !important;
  min-width:18px !important;
  max-width:18px !important;
  height:18px !important;
  min-height:18px !important;
  max-height:18px !important;
  flex:0 0 18px !important;
  padding:0 !important;
  margin:0 !important;
  border-radius:4px !important;
  font-size:9px !important;
  line-height:1 !important;
  display:inline-grid !important;
  place-items:center !important;
}

@media(max-width:680px){
  .history-edit-row{
    grid-template-columns:minmax(95px,1fr) auto auto !important;
    grid-template-areas:
      "date price actions"
      "editor editor editor" !important;
    column-gap:6px !important;
  }

  .edit-month-actions,
  .history-row-actions{
    gap:2px !important;
  }
}

/* v10.7 — Termin kartı sağ üst işlem düğmeleri */
.item{
  position:relative !important;
  cursor:default !important;
  padding-right:78px !important;
}

.item-actions{
  position:absolute !important;
  top:14px !important;
  right:14px !important;
  z-index:8 !important;
  display:flex !important;
  align-items:center !important;
  gap:5px !important;
}

.item-edit-btn,
.item-delete-btn{
  width:28px !important;
  min-width:28px !important;
  height:28px !important;
  min-height:28px !important;
  padding:0 !important;
  margin:0 !important;
  border-radius:8px !important;
  background:#17191c !important;
  display:grid !important;
  place-items:center !important;
  font-size:13px !important;
  line-height:1 !important;
  touch-action:manipulation !important;
}

.item-edit-btn{
  border:1px solid #65552a !important;
  color:#e4bd45 !important;
}

.item-delete-btn{
  border:1px solid #703539 !important;
  color:#ff6a72 !important;
}

/* Separate Termin edit modal */
.termin-edit-modal{
  position:fixed;
  inset:0;
  z-index:30000;
  display:grid;
  place-items:center;
  padding:
    max(16px,env(safe-area-inset-top))
    max(14px,env(safe-area-inset-right))
    max(16px,env(safe-area-inset-bottom))
    max(14px,env(safe-area-inset-left));
  box-sizing:border-box;
  background:rgba(5,6,7,.78);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  overflow:auto;
}

.termin-edit-modal.hidden{
  display:none !important;
}

.termin-edit-card{
  width:min(760px,100%);
  max-height:calc(100dvh - 28px);
  overflow:auto;
  box-sizing:border-box;
  padding:20px;
  border-radius:20px;
  border:1px solid rgba(225,187,66,.55);
  background:#202327;
  box-shadow:0 28px 90px rgba(0,0,0,.55);
}

.termin-edit-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}

.termin-edit-head h2{
  margin:0;
  color:#e4bd45;
}

.termin-edit-head p{
  margin:4px 0 0;
  color:#aeb2b6;
  font-size:13px;
}

.termin-edit-close{
  width:34px;
  min-width:34px;
  height:34px;
  border-radius:9px;
  border:1px solid #4a4f55;
  background:#17191c;
  color:#fff;
  font-size:21px;
}

.termin-edit-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.termin-edit-grid label{
  display:flex;
  flex-direction:column;
  gap:6px;
  color:#c7cacf;
  font-size:13px;
}

.termin-edit-grid .wide{
  grid-column:1/-1;
}

.termin-edit-grid input,
.termin-edit-grid select,
.termin-edit-grid textarea{
  width:100%;
  box-sizing:border-box;
  margin:0 !important;
}

.termin-edit-expenses{
  margin-top:14px;
  padding:12px;
  border:1px solid #3c4147;
  border-radius:12px;
  background:#191c1f;
}

.termin-edit-expenses-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}

.modal-expense-row{
  display:grid;
  grid-template-columns:1fr 120px 28px;
  gap:7px;
  align-items:center;
  margin-top:7px;
}

.modal-expense-row input{
  min-width:0;
  margin:0 !important;
}

.modal-expense-delete{
  width:28px;
  min-width:28px;
  height:28px;
  padding:0;
  border-radius:7px;
  border:1px solid #703539;
  background:#17191c;
  color:#ff6a72;
  font-size:18px;
}

.termin-edit-actions{
  display:flex;
  justify-content:flex-end;
  gap:9px;
  margin-top:16px;
}

html.modal-open{
  overflow:hidden !important;
}

@media(max-width:680px){
  .item{
    padding-right:70px !important;
  }

  .item-actions{
    top:11px !important;
    right:11px !important;
    gap:4px !important;
  }

  .item-edit-btn,
  .item-delete-btn{
    width:25px !important;
    min-width:25px !important;
    height:25px !important;
    min-height:25px !important;
    font-size:11px !important;
  }

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

  .termin-edit-grid .wide{
    grid-column:1;
  }

  .modal-expense-row{
    grid-template-columns:minmax(0,1fr) 86px 26px;
  }
}

/* v10.8 — Legacy login removed; Hub password is the only access field */
#hubPasswordInput{
  -webkit-text-security:disc;
  appearance:none;
  -webkit-appearance:none;
}

#hubPasswordInput::-webkit-credentials-auto-fill-button,
#hubPasswordInput::-webkit-contacts-auto-fill-button{
  visibility:hidden !important;
  display:none !important;
  pointer-events:none !important;
  position:absolute !important;
  right:0 !important;
}

/* v10.9 — Home Hub giriş kartları kesin etkileşimli */
.hub-center{
  position:relative !important;
  z-index:10 !important;
  pointer-events:auto !important;
}
.hub-card,
#openTerminHubBtn,
#openShopHubBtn{
  position:relative !important;
  z-index:20 !important;
  pointer-events:auto !important;
  cursor:pointer !important;
  touch-action:manipulation !important;
  -webkit-tap-highlight-color:rgba(255,255,255,.08);
}
.hub-card *{
  pointer-events:none !important;
}
.hub-backdrop{
  pointer-events:none !important;
}
.hub-password-modal{
  z-index:40000 !important;
  pointer-events:auto !important;
}
.hub-password-card,
.hub-password-card *{
  pointer-events:auto !important;
}

/* v11.1 — Home Hub tamamen yeniden bağlandı */
#hubScreen{
  z-index:20000 !important;
}

#openTerminHubBtn,
#openShopHubBtn{
  position:relative !important;
  z-index:21000 !important;
  pointer-events:auto !important;
  touch-action:manipulation !important;
  cursor:pointer !important;
}

#openTerminHubBtn *,
#openShopHubBtn *{
  pointer-events:none !important;
}

#hubPasswordModal{
  z-index:50000 !important;
  pointer-events:auto !important;
}

#hubPasswordModal.hidden{
  display:none !important;
}

#hubPasswordModal:not(.hidden){
  display:grid !important;
}

#hubPasswordInput{
  pointer-events:auto !important;
  -webkit-user-select:text !important;
  user-select:text !important;
  touch-action:manipulation !important;
}

/* v11.2 — Oda resmi SADECE ön Home Hub ekranında */
html,
body{
  margin:0 !important;
  padding:0 !important;
  min-height:100% !important;
  background:#111315 !important;
  background-image:none !important;
}

/* Only the first system-selection screen gets the room image */
#hubScreen{
  position:fixed !important;
  inset:0 !important;
  width:100vw !important;
  height:100vh !important;
  min-height:100dvh !important;
  margin:0 !important;
  padding:0 !important;
  overflow:auto !important;
  background:#0d0f11 !important;
}

#hubScreen .hub-backdrop{
  position:fixed !important;
  inset:0 !important;
  width:100vw !important;
  height:100vh !important;
  min-height:100dvh !important;
  z-index:0 !important;
  background:
    linear-gradient(rgba(8,8,9,.22),rgba(8,8,9,.48)),
    url('/home-bg.jpg') center center / cover no-repeat !important;
  background-color:#0d0f11 !important;
  filter:none !important;
  transform:none !important;
  pointer-events:none !important;
}

#hubScreen .hub-center{
  position:relative !important;
  z-index:1 !important;
  min-height:100dvh !important;
  box-sizing:border-box !important;
  padding-top:max(18px,env(safe-area-inset-top)) !important;
  padding-bottom:max(18px,env(safe-area-inset-bottom)) !important;
}

/* All inner modules return to their own dark application backgrounds */
#app,
.shopping-screen,
.termin-edit-modal{
  background-image:none !important;
}

#app{
  background:#111315 !important;
}

.shopping-screen{
  background:#111315 !important;
}

/* iPhone: only Home Hub draws the room behind the status area */
@supports (-webkit-touch-callout:none){
  #hubScreen,
  #hubScreen .hub-backdrop{
    min-height:100dvh !important;
  }
}

/* PC / tablet / landscape: room still only belongs to Home Hub */
@media(orientation:landscape){
  #hubScreen .hub-backdrop{
    background-position:center center !important;
    background-size:cover !important;
  }
}

/* v11.3 — Ekranları kesin olarak birbirinden ayır */
html,
body{
  margin:0 !important;
  padding:0 !important;
  min-height:100% !important;
  background:#111315 !important;
  background-image:none !important;
}

/* Ön seçim ekranı: oda resmi SADECE burada */
body[data-screen="hub"]{
  background:#0d0f11 !important;
}
body[data-screen="hub"] #hubScreen{
  display:block;
}
body[data-screen="hub"] #hubScreen .hub-backdrop{
  background:
    linear-gradient(rgba(8,8,9,.22),rgba(8,8,9,.48)),
    url('/home-bg.jpg') center center / cover no-repeat !important;
}

/* Termin ekranı: tamamen koyu uygulama arka planı */
body[data-screen="termin"]{
  background:#111315 !important;
  background-image:none !important;
}
body[data-screen="termin"] #app{
  min-height:100dvh !important;
  background:#111315 !important;
  background-image:none !important;
}

/* Alışveriş ekranı: tamamen koyu uygulama arka planı */
body[data-screen="shop"]{
  background:#111315 !important;
  background-image:none !important;
}
body[data-screen="shop"] .shopping-screen{
  min-height:100dvh !important;
  background:#111315 !important;
  background-image:none !important;
}

/* İç paneller hiçbir şekilde oda resmini miras almasın */
#app,
#app *,
.shopping-screen,
.shopping-screen *,
.termin-edit-modal,
.termin-edit-card{
  background-image:none;
}

/* Kartların kendi gradient/renkleri korunur; yalnız page background oda resmi taşımaz */
#app .card,
#app .summary-box,
#app .item,
#app .notification-settings,
#app .next-event,
.shopping-screen .shop-card,
.shopping-screen .shop-summary > div{
  background-image:initial;
}

/* Eski login kalıntıları için son güvenlik */
#loginMsg,
.login-msg{
  display:none !important;
}
