
/* ÖZAY GRUP V10 • Mobil Uygulama Katmanı */
:root{
  --mobile-nav-h:72px;
  --safe-bottom:env(safe-area-inset-bottom,0px);
  --safe-top:env(safe-area-inset-top,0px);
}
html{-webkit-tap-highlight-color:transparent}
body{overscroll-behavior-y:auto}
.oz-install-btn{
  display:none;
  align-items:center;
  gap:7px;
  border:1px solid rgba(255,255,255,.28);
  background:rgba(255,255,255,.12);
  color:#fff;
  border-radius:9px;
  padding:8px 11px;
  font-weight:700;
}
.oz-install-btn.show{display:inline-flex}
.oz-mobile-nav{display:none}
.oz-more-sheet{display:none}
.oz-mobile-handle{width:44px;height:4px;border-radius:999px;background:#d0d5dd;margin:0 auto 14px}

@media(max-width:820px){
  body{background:#f4f7fb}
  .topbar{
    height:64px;
    padding-top:var(--safe-top);
    min-height:calc(64px + var(--safe-top));
    position:sticky;
    top:0;
  }
  .layout{display:block;min-height:calc(100vh - 64px)}
  .sidebar{display:none!important}
  .content{
    padding:14px 12px calc(var(--mobile-nav-h) + var(--safe-bottom) + 18px);
    min-width:0;
  }
  .oz-brand-logo{width:40px;height:36px}
  .oz-brand-text strong{font-size:16px}
  .oz-brand-text span{display:none}
  .user-area{gap:7px}
  .user-area #currentUser{display:none}
  #logoutBtn{padding:8px 10px;font-size:12px}
  .page-head{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:12px;
    margin-bottom:14px;
  }
  .page-head h2{font-size:22px}
  .page-head .actions{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
  }
  .page-head .actions>*{width:100%!important;margin:0}
  .page-head .actions .btn{min-height:44px}
  .cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .card{padding:14px;border-radius:14px}
  .card strong{font-size:22px}
  .panel{padding:14px;border-radius:14px;margin-bottom:14px}
  .grid2,.grid3,.grid4{grid-template-columns:1fr}
  input,select,textarea,.btn{min-height:44px}
  .filters{display:grid;grid-template-columns:1fr;gap:8px}
  .filters input,.filters select{max-width:none}
  .table-wrap{
    margin-left:-2px;
    margin-right:-2px;
    border-radius:12px;
    -webkit-overflow-scrolling:touch;
  }
  table{min-width:760px}
  .modal{align-items:flex-end;padding:0}
  .modal-box{
    width:100%;
    max-height:92dvh;
    border-radius:20px 20px 0 0;
    padding:18px 14px calc(24px + var(--safe-bottom));
  }
  .oz-extra-modal{align-items:flex-end;padding:0}
  .oz-extra-box{
    width:100%;
    max-height:92dvh;
    border-radius:20px 20px 0 0;
    padding:18px 14px calc(18px + var(--safe-bottom));
  }
  .oz-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .oz-region-grid{grid-template-columns:1fr}
  .oz-extra-toolbar{display:grid;grid-template-columns:1fr;gap:8px}
  .oz-extra-toolbar .field{width:100%;min-width:0}

  body.modal-open{overflow:hidden}
  body.modal-open.ozay-authenticated:not(.expense-entry-user) .oz-mobile-nav{
    opacity:0;
    pointer-events:none;
    transform:translateY(calc(100% + var(--safe-bottom) + 24px));
  }

  body.ozay-authenticated:not(.expense-entry-user) .oz-mobile-nav{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    position:fixed;
    left:0;right:0;bottom:0;
    z-index:450;
    min-height:calc(var(--mobile-nav-h) + var(--safe-bottom));
    padding:7px 6px calc(7px + var(--safe-bottom));
    background:rgba(255,255,255,.97);
    border-top:1px solid #dce3ed;
    box-shadow:0 -10px 28px rgba(18,56,95,.10);
    backdrop-filter:blur(14px);
  }
  .oz-mobile-tab{
    appearance:none;border:0;background:transparent;
    color:#6e7a8f;
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:4px;min-width:0;padding:3px 2px;border-radius:12px;
    font-size:10px;font-weight:700;
  }
  .oz-mobile-tab svg{
    width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;
    stroke-linecap:round;stroke-linejoin:round
  }
  .oz-mobile-tab.active{color:#1c5d96;background:#edf4fb}
  .oz-mobile-tab span{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  body.ozay-authenticated .oz-more-sheet.open{display:flex}
  .oz-more-sheet{
    position:fixed;inset:0;z-index:700;
    background:rgba(7,27,47,.5);
    align-items:flex-end;
  }
  .oz-more-card{
    background:#fff;width:100%;max-height:78dvh;overflow:auto;
    border-radius:22px 22px 0 0;
    padding:12px 14px calc(18px + var(--safe-bottom));
    box-shadow:0 -24px 60px rgba(0,0,0,.22);
  }
  .oz-more-title{font-size:17px;font-weight:800;margin:0 0 10px}
  .oz-more-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}
  .oz-more-item{
    border:1px solid #dce3ed;background:#fff;border-radius:13px;padding:13px;
    display:flex;align-items:center;gap:10px;text-align:left;color:#182235;font-weight:700;
  }
  .oz-more-item svg{
    width:21px;height:21px;fill:none;stroke:#1c5d96;stroke-width:1.8;
    stroke-linecap:round;stroke-linejoin:round;flex:0 0 21px
  }
}
@media(max-width:420px){
  .cards{grid-template-columns:1fr 1fr}
  .oz-kpis{grid-template-columns:1fr 1fr}
  .oz-mobile-tab{font-size:9.5px}
}
@media(display-mode:standalone){
  .oz-install-btn{display:none!important}
}

/* V133 • Android Chrome / WebView giriş sonrası dikey kaydırma garantisi */
@media(max-width:820px){
  html{
    min-height:100%;
    overflow-x:hidden;
    overflow-y:auto;
  }
  body.ozay-authenticated:not(.modal-open):not(.excel-import-open):not(.pe-receipt-choice-open):not(.oz-mobile-splash-active){
    height:auto!important;
    min-height:100svh;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:auto!important;
    touch-action:auto!important;
    -webkit-overflow-scrolling:touch;
  }
  body.ozay-authenticated:not(.modal-open):not(.excel-import-open):not(.pe-receipt-choice-open):not(.oz-mobile-splash-active) #appView,
  body.ozay-authenticated:not(.modal-open):not(.excel-import-open):not(.pe-receipt-choice-open):not(.oz-mobile-splash-active) .layout,
  body.ozay-authenticated:not(.modal-open):not(.excel-import-open):not(.pe-receipt-choice-open):not(.oz-mobile-splash-active) .content{
    height:auto!important;
    overflow-y:visible!important;
  }
}


/* V33 - Mobil + masaüstü açılış Özay Grup karşılama animasyonu */
.oz-mobile-splash{
  position:fixed;
  inset:0;
  z-index:999999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:clamp(24px,4vw,56px);
  background:
    radial-gradient(circle at 50% 35%, rgba(58,112,160,.25), transparent 42%),
    linear-gradient(155deg,#071b30 0%,#0d3255 48%,#123f68 100%);
  opacity:1;
  transition:opacity .55s ease, visibility .55s ease;
}
body.oz-mobile-splash-active{overflow:hidden!important}
body.oz-mobile-splash-active #loginView,
body.oz-mobile-splash-active #appView,
body.oz-mobile-splash-active .oz-mobile-nav,
body.oz-mobile-splash-active .oz-more-sheet{
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
body.oz-mobile-splash-active .oz-mobile-splash{display:flex}
body.oz-mobile-splash-leaving .oz-mobile-splash{
  opacity:0;
  visibility:hidden;
}
.oz-mobile-splash-inner{
  width:min(86vw,520px);
  text-align:center;
  transform:translateY(0);
}
.oz-mobile-splash-logo-wrap{
  width:clamp(156px,14vw,210px);
  height:clamp(156px,14vw,210px);
  margin:0 auto clamp(20px,2vw,28px);
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:clamp(38px,3vw,52px);
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.15);
  box-shadow:0 24px 60px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.12);
  backdrop-filter:blur(8px);
  animation:ozSplashLogoIn .9s cubic-bezier(.2,.85,.25,1) both;
}
.oz-mobile-splash-logo{
  width:76%;
  height:76%;
  object-fit:contain;
  filter:drop-shadow(0 10px 20px rgba(0,0,0,.22));
}
.oz-mobile-splash-title{
  color:#fff;
  font-size:clamp(31px,3.3vw,48px);
  line-height:1;
  font-weight:800;
  letter-spacing:.18em;
  padding-left:.18em;
  text-shadow:0 8px 24px rgba(0,0,0,.28);
  animation:ozSplashTitleIn .8s .28s cubic-bezier(.2,.85,.25,1) both;
}
.oz-mobile-splash-line{
  width:0;
  height:2px;
  margin:clamp(17px,1.8vw,23px) auto clamp(13px,1.4vw,18px);
  border-radius:999px;
  background:linear-gradient(90deg,transparent,#cde4f7,transparent);
  animation:ozSplashLine 1s .55s ease forwards;
}
.oz-mobile-splash-sub{
  color:rgba(255,255,255,.72);
  font-size:clamp(13px,1.2vw,16px);
  font-weight:600;
  letter-spacing:.08em;
  animation:ozSplashSubIn .65s .75s ease both;
}
@keyframes ozSplashLogoIn{
  0%{opacity:0;transform:translateY(34px) scale(.78) rotate(-4deg)}
  65%{opacity:1;transform:translateY(-5px) scale(1.035) rotate(0)}
  100%{opacity:1;transform:translateY(0) scale(1)}
}
@keyframes ozSplashTitleIn{
  from{opacity:0;transform:translateY(20px);letter-spacing:.28em}
  to{opacity:1;transform:translateY(0);letter-spacing:.18em}
}
@keyframes ozSplashLine{to{width:min(220px,58vw)}}
@keyframes ozSplashSubIn{
  from{opacity:0;transform:translateY(10px)}
  to{opacity:1;transform:translateY(0)}
}
@media (max-width:768px){
  .oz-mobile-splash-inner{width:min(86vw,420px)}
  .oz-mobile-splash-logo-wrap{width:156px;height:156px;border-radius:38px}
  .oz-mobile-splash-title{font-size:31px}
  .oz-mobile-splash-sub{font-size:13px}
}
@media (prefers-reduced-motion: reduce){
  .oz-mobile-splash-logo-wrap,.oz-mobile-splash-title,.oz-mobile-splash-line,.oz-mobile-splash-sub{animation-duration:.01ms!important;animation-delay:0s!important}
}


/* V48 • Kurumsal Mobil Arayüz + Küçük Ekran Stabilitesi */
@media(max-width:820px){
  html,body{width:100%;max-width:100%;overflow-x:hidden}
  *,*::before,*::after{box-sizing:border-box}
  body{min-width:0;background:linear-gradient(180deg,#f3f6fa 0%,#f8fafc 100%)}
  #appView,.layout,.content,.page,.panel,.card,.grid2,.grid3,.grid4,.filters,.page-head,
  .oz-extra-page,.oz-extra-card,.oz-extra-toolbar,.accounting-shell,.report-center-shell{
    min-width:0!important;max-width:100%!important
  }
  .content{width:100%;overflow:visible;padding-left:clamp(10px,3.2vw,16px);padding-right:clamp(10px,3.2vw,16px)}
  .topbar{
    width:100%;padding-left:clamp(10px,3vw,16px);padding-right:clamp(10px,3vw,16px);
    gap:8px;overflow:visible
  }
  .topbar>div:first-child,.user-area{min-width:0}
  .topbar .oz-brand,.topbar .brand{min-width:0;max-width:58vw}
  .oz-brand-logo{flex:0 0 auto}
  .oz-brand-text{min-width:0}
  .oz-brand-text strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .user-area{margin-left:auto;flex:0 0 auto}

  .page-head h2{font-size:clamp(20px,6vw,24px);line-height:1.15}
  .page-head p{font-size:12px;line-height:1.45}
  .page-head .actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .page-head .actions>*{min-width:0;white-space:normal}

  .cards,.oz-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .card,.oz-kpis>*{min-width:0;overflow:hidden}
  .card span,.card strong,.oz-kpis span,.oz-kpis strong{overflow-wrap:anywhere}

  input,select,textarea,button,.btn{max-width:100%;font-size:16px}
  input[type="date"],input[type="month"],input[type="number"],select{width:100%;min-width:0}
  textarea{width:100%;resize:vertical}
  label{min-width:0}

  .table-wrap,.oz-table-wrap,.report-table-wrap{
    width:100%;max-width:100%;overflow-x:auto!important;overscroll-behavior-x:contain;
    scrollbar-width:thin
  }
  .table-wrap table,.oz-table-wrap table,.report-table-wrap table{width:max-content;max-width:none}

  body.modal-open{overflow:hidden}
  body.modal-open.ozay-authenticated:not(.expense-entry-user) .oz-mobile-nav{
    opacity:0;
    pointer-events:none;
    transform:translateY(calc(100% + var(--safe-bottom) + 24px));
  }

  body.ozay-authenticated:not(.expense-entry-user) .oz-mobile-nav{
    left:8px;right:8px;bottom:calc(8px + var(--safe-bottom));
    border:1px solid rgba(18,56,95,.12);border-radius:20px;
    min-height:calc(68px + var(--safe-bottom));padding:6px 5px calc(6px + var(--safe-bottom));
    box-shadow:0 18px 45px rgba(10,35,61,.16);overflow:hidden
  }
  .oz-mobile-tab{
    min-height:56px;border-radius:14px;gap:3px;padding:5px 3px;
    transition:background .18s ease,color .18s ease,transform .18s ease
  }
  .oz-mobile-tab:active{transform:scale(.96)}
  .oz-mobile-tab svg{
    width:21px;height:21px;padding:2px;border-radius:8px;
    filter:drop-shadow(0 2px 4px rgba(15,55,92,.08))
  }
  .oz-mobile-tab.active{background:linear-gradient(145deg,#12385f,#1c5d96);color:#fff;box-shadow:0 7px 16px rgba(18,56,95,.18)}
  .oz-mobile-tab span{font-size:9.5px;line-height:1.1;font-weight:800}

  .oz-more-card{padding:12px clamp(12px,3.5vw,18px) calc(18px + var(--safe-bottom));background:linear-gradient(180deg,#fff,#f7f9fc)}
  .oz-more-title{font-size:18px;color:#183a5a}
  .oz-more-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .oz-more-item{
    min-width:0;min-height:76px;padding:12px;border-radius:16px;align-items:center;
    background:linear-gradient(145deg,#fff,#f6f9fc);border-color:#dbe5ee;
    box-shadow:0 7px 18px rgba(18,56,95,.055)
  }
  .oz-more-item svg{
    width:38px;height:38px;padding:8px;border-radius:12px;background:#edf4fb;stroke:#1c5d96;
    flex:0 0 38px
  }
  .oz-more-item span{min-width:0;font-size:12px;line-height:1.25;overflow-wrap:anywhere}

  .modal-box,.oz-extra-box,.pe-mini-box{width:100%!important;max-width:100%!important;overflow-x:hidden}
}

@media(max-width:390px){
  :root{--mobile-nav-h:68px}
  .content{padding-left:10px;padding-right:10px}
  .topbar{padding-left:10px;padding-right:10px}
  .oz-brand-logo{width:35px;height:32px}
  .oz-brand-text strong{font-size:14px}
  #logoutBtn{padding:7px 8px;font-size:11px;min-height:38px}
  .page-head .actions{grid-template-columns:1fr}
  .cards,.oz-kpis{grid-template-columns:1fr 1fr;gap:8px}
  .card{padding:12px}
  .card strong{font-size:19px}
  .oz-mobile-tab span{font-size:8.7px}
  .oz-more-grid{grid-template-columns:1fr 1fr}
  .oz-more-item{padding:10px;min-height:70px}
}

@media(max-width:340px){
  .cards,.oz-kpis{grid-template-columns:1fr}
  .oz-more-grid{grid-template-columns:1fr}
  .oz-mobile-tab span{font-size:8px}
  body.ozay-authenticated:not(.expense-entry-user) .oz-mobile-nav{left:5px;right:5px}
}

/* V49 • Mobil üst bar / Hesabım-Çıkış responsive düzeltmesi */
@media(max-width:820px){
  .topbar{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center!important;
    column-gap:6px!important;
    row-gap:0!important;
    height:auto!important;
    min-height:72px!important;
    padding:10px clamp(8px,2.5vw,12px)!important;
    overflow:visible!important;
  }
  .topbar .oz-brand{
    display:flex!important;
    align-items:center!important;
    min-width:0!important;
    max-width:none!important;
    width:100%!important;
    gap:7px!important;
    overflow:hidden!important;
  }
  .topbar .oz-brand-logo{
    width:clamp(34px,9vw,42px)!important;
    height:clamp(31px,8vw,38px)!important;
    object-fit:contain!important;
    flex:0 0 auto!important;
  }
  .topbar .oz-brand-text{
    min-width:0!important;
    flex:1 1 auto!important;
  }
  .topbar .oz-brand-text strong{
    font-size:clamp(13px,4.1vw,17px)!important;
    letter-spacing:.02em!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  .topbar .oz-brand-text span{display:none!important}
  .topbar .user-area{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:5px!important;
    min-width:0!important;
    margin-left:0!important;
    flex-wrap:nowrap!important;
  }
  .topbar #currentUser{display:none!important}
  .topbar #accountBtn,.topbar #logoutBtn{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:auto!important;
    min-width:58px!important;
    max-width:68px!important;
    min-height:40px!important;
    height:40px!important;
    padding:0 7px!important;
    margin:0!important;
    border-radius:12px!important;
    font-size:11px!important;
    line-height:1!important;
    font-weight:800!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:clip!important;
    touch-action:manipulation!important;
    position:relative!important;
    z-index:3!important;
  }
  .topbar .oz-notification-wrap{flex:0 0 auto!important}
  .topbar .oz-install-btn{display:none!important}
}

/* iPhone / ana ekrana eklenmiş PWA'da saat ve Dynamic Island altında güvenli alan */
@media(max-width:820px) and (display-mode:standalone){
  .topbar{
    padding-top:max(env(safe-area-inset-top,0px),18px)!important;
    min-height:calc(72px + max(env(safe-area-inset-top,0px),18px))!important;
  }
}

@media(max-width:430px){
  .topbar{grid-template-columns:minmax(0,1fr) auto!important;padding-left:8px!important;padding-right:8px!important}
  .topbar .oz-brand{gap:5px!important}
  .topbar .oz-brand-logo{width:34px!important;height:31px!important}
  .topbar .oz-brand-text strong{font-size:13px!important;letter-spacing:.01em!important}
  .topbar #accountBtn,.topbar #logoutBtn{min-width:55px!important;max-width:61px!important;padding:0 5px!important;font-size:10.5px!important}
}

@media(max-width:365px){
  .topbar .oz-brand-text strong{font-size:12px!important}
  .topbar #accountBtn,.topbar #logoutBtn{min-width:50px!important;max-width:55px!important;font-size:9.8px!important;padding:0 4px!important}
}

/* V75 • Açılış animasyonu copyright */
.oz-mobile-splash-copyright{
  margin-top:10px;
  font-size:11px;
  line-height:1.4;
  font-weight:500;
  letter-spacing:.02em;
  color:rgba(255,255,255,.58);
  text-align:center;
  opacity:0;
  animation:ozSplashSubIn .65s .92s ease both;
}
@media(max-width:480px){
  .oz-mobile-splash-copyright{font-size:10px;margin-top:8px}
}
@media(prefers-reduced-motion:reduce){
  .oz-mobile-splash-copyright{animation-duration:.01ms!important;animation-delay:0s!important}
}

/* V76 • Masaüstü uygulama yükleme butonu fallback */
@media(min-width:821px){
  .topbar .oz-install-btn.show{
    display:inline-flex!important;
    min-height:40px;
    padding:0 13px;
    border-radius:10px;
    white-space:nowrap;
    transition:background .18s ease,transform .18s ease,border-color .18s ease;
  }
  .topbar .oz-install-btn.show:hover{
    background:rgba(255,255,255,.20);
    border-color:rgba(255,255,255,.42);
  }
  .topbar .oz-install-btn.show:active{transform:scale(.98)}
}
