/* web/ui.css — alt sekme çubuğu ve alttan açılan paneller (index.html ve hesapla.html ortak) */
/* Seçim ve bağlantı rengi: açık temada marka laciverti, koyu temada (lacivert zeminde görünmediği için) açık mavi */
:root { --sel: var(--brand, #0f2a52); --link: var(--brand, #0f2a52);
        --coin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 108 108'%3E%3Crect width='108' height='108' rx='24' fill='%230F2A52'/%3E%3Cpolygon points='20,22 32,22 32,86 20,86' fill='%23FFD24D'/%3E%3Cpolygon points='32,76 42,86 32,86' fill='%23C98A00'/%3E%3Cpolygon points='44,22 58,22 88,86 74,86' fill='%237DBBF7'/%3E%3Cpolygon points='74,22 88,22 58,86 44,86' fill='%23B9DCFF'/%3E%3Cpolygon points='66,39.07 73,54 66,68.93 59,54' fill='%232F7BD0'/%3E%3C/svg%3E"); }   /* logodaki LX monogramı (uygulama ikonuyla aynı) */
@media (prefers-color-scheme: dark) { :root { --sel: var(--accent, #6ea8ff); --link: var(--accent, #6ea8ff); } }
.tabbar, .tabbar-spacer, .sheet-bg { display: none; }
@media (max-width: 1023px) {
  .tabbar-spacer { display: block; height: calc(84px + env(safe-area-inset-bottom)); }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr);
            align-items: end; background: var(--panel); border-top: 1px solid var(--line);
            padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(0,0,0,.08); }
  .tabbar .tab { display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; padding: 4px 0;
                 color: var(--muted); font: inherit; font-size: 11px; line-height: 1.2; text-decoration: none; cursor: pointer;
                 -webkit-tap-highlight-color: transparent; }
  .tabbar .tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar .tab.on { color: var(--text); font-weight: 600; }
  .tabbar .tab.on .ico { color: var(--accent); stroke-width: 2.2; }
  .ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .fab { justify-self: center; width: 56px; height: 56px; margin-top: -28px; border-radius: 50%; border: 4px solid var(--panel);
         background: var(--gold); color: #1a1300; display: grid; place-items: center; cursor: pointer;
         box-shadow: 0 8px 18px rgba(0,0,0,.22); -webkit-tap-highlight-color: transparent; }
  .fab .ico { width: 26px; height: 26px; stroke-width: 2.4; transition: transform .2s ease; }
  .fab.open .ico { transform: rotate(45deg); }
  .sheet-bg { position: fixed; inset: 0; z-index: 55; background: rgba(8,14,28,.5); display: flex; align-items: flex-end;
              animation: fadeIn .15s ease-out; }
  .sheet { width: 100%; max-height: 82vh; overflow-y: auto; overscroll-behavior: contain; background: var(--panel); color: var(--text);
           border-radius: 20px 20px 0 0; padding: 10px 16px calc(96px + env(safe-area-inset-bottom)); animation: sheetUp .22s ease-out; }
  .sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 10px; }
  .sheet-h { display: block; font-size: 15px; margin: 2px 4px 12px; }
  .quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .quick-grid button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px; border: 1px solid var(--line);
                       border-radius: 14px; background: var(--bg); color: var(--text); font: inherit; font-size: 13px; text-align: center; cursor: pointer; }
  .qi { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--neu-bg); color: var(--text); }
  .qi.neg { background: color-mix(in srgb, var(--neg) 16%, transparent); color: var(--neg); }
  .qi.pos { background: color-mix(in srgb, var(--pos) 16%, transparent); color: var(--pos); }
  .qi.gold { background: color-mix(in srgb, var(--gold) 22%, transparent); color: var(--text); }
  .quick-grid button:active, .quick-grid a:active { background: var(--neu-bg); }
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 1023px) {
  .sheet-h.sec { margin-top: 18px; color: var(--muted); font-size: 13px; font-weight: 600; }
  .quick-grid a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px; border: 1px solid var(--line);
                  border-radius: 14px; background: var(--bg); color: var(--text); font-size: 13px; text-align: center; text-decoration: none; }
  .quick-grid button.on { border-color: var(--accent); }
  .ico.mini { width: 13px; height: 13px; margin-left: 4px; vertical-align: -1px; color: var(--muted); }
}

/* Açılış: Vue şablonu işlemeden önce ham şablon görünmesin; yerine lacivert üst bant */
[v-cloak] { display: none !important; }
.boot { background: #0f2a52; height: 64px; display: flex; align-items: center; padding: 0 16px; }
.boot-mark { color: #fff; font: 600 22px/1 Georgia, "Times New Roman", serif; display: flex; align-items: center; gap: 8px; }
.boot-mark i { width: 26px; height: 26px; border-radius: 6px; background: var(--coin) center / contain no-repeat; display: inline-block; }
@media (prefers-color-scheme: dark) { .boot { background: #13254a; } }

/* Sayfalar arası geçiş: beyaz parlama yerine yumuşak solma (Chrome / Android) */
@view-transition { navigation: auto; }

/* ===== Material 3 yüzeyleri: yuvarlak köşeler, yumuşak katmanlı gölge, yüzen kartlar (iki sayfada ortak) ===== */
:root {
  --r-card: 20px; --r-ctl: 12px; --r-dialog: 28px;
  --elev-1: 0 1px 2px rgba(13,27,46,.06), 0 1px 3px 1px rgba(13,27,46,.05);
  --elev-2: 0 1px 2px rgba(13,27,46,.08), 0 3px 8px 2px rgba(13,27,46,.07);
  --elev-3: 0 4px 10px 3px rgba(13,27,46,.10), 0 1px 3px rgba(13,27,46,.12);
  --ease: cubic-bezier(.2, 0, 0, 1);
}
@media (prefers-color-scheme: dark) {
  :root { --elev-1: 0 1px 2px rgba(0,0,0,.35), 0 1px 3px 1px rgba(0,0,0,.20);
          --elev-2: 0 1px 2px rgba(0,0,0,.40), 0 3px 8px 2px rgba(0,0,0,.25);
          --elev-3: 0 4px 10px 3px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.4); }
}

/* Kartlar: çerçeve yerine gölge */
.panel, .tile { border-color: transparent; border-radius: var(--r-card); box-shadow: var(--elev-1);
                transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
@media (hover: hover) { .tile:hover, .panel.goal:hover, .res-grid > .panel:hover { box-shadow: var(--elev-2); } }
/* Özet kutucukları: tek çerçeve yerine ayrı yüzen kartlar */
.tiles, .pf-tiles { gap: 12px; background: none; border: 0; border-radius: 0; overflow: visible; }
.tiles .tile, .pf-tiles .tile { border-radius: var(--r-card); box-shadow: var(--elev-1); }
@media (max-width: 640px) { .tiles, .pf-tiles { gap: 10px; } }
.tbl-wrap.panel { overflow: auto; }

/* Düğmeler: hap biçimi, basınca hafif küçülme */
button.primary, .btn { border-radius: 999px; padding: 10px 20px; box-shadow: var(--elev-1);
                       transition: transform .15s var(--ease), box-shadow .2s var(--ease), opacity .2s; }
button.primary:active:not(:disabled), .btn:active, button.sm:active, .chips button:active, .acct-btn.cta:active { transform: scale(.97); }
button.sm { border-radius: 999px; padding: 5px 12px; }
.acct-btn.cta { border-radius: 999px; }
.chips button, nav.calcs a { border-radius: 10px; }
.seg { border-radius: 999px; padding: 3px; overflow: hidden; }
.seg button { border-radius: 999px; }

/* Form alanları */
input, select, textarea { border-radius: var(--r-ctl); }
.pill, .tier-tag { border-radius: 999px; }
.badge { border-radius: 8px; }
.warn { border-radius: var(--r-ctl); }

/* Pencereler ve açılır menüler */
.modal.panel, .modal { border-radius: var(--r-dialog); box-shadow: var(--elev-3); }
.navdrop, .av-drop { border-color: transparent; border-radius: 16px; box-shadow: var(--elev-3); }
.panel.gate, .landing .auth { border-radius: var(--r-dialog); }

@media (max-width: 1023px) {
  /* Alttan açılan paneller: 28px köşe */
  .sheet { border-radius: var(--r-dialog) var(--r-dialog) 0 0; }
  .quick-grid button, .quick-grid a { border: 0; border-radius: var(--r-card); background: var(--neu-bg);
                                       transition: transform .15s var(--ease), background .2s; }
  .quick-grid button:active, .quick-grid a:active { transform: scale(.96); }
  .qi { background: var(--panel); box-shadow: var(--elev-1); }
  /* Alt menü: etkin sekmede simgenin arkasında hap biçimli gösterge (Material 3 gezinme çubuğu) */
  .tabbar { border-top: 0; box-shadow: 0 -1px 0 var(--line), 0 -4px 16px rgba(13,27,46,.06); }
  .tabbar .tab .ico { width: 60px; height: 32px; padding: 4px 18px; box-sizing: border-box; border-radius: 16px;
                      transition: background .25s var(--ease); }
  .tabbar .tab.on { color: var(--sel); }
  .tabbar .tab.on .ico { color: var(--sel); background: color-mix(in srgb, var(--sel) 12%, transparent); }
  /* Ortadaki düğme: çubuğun içine oturan yuvarlatılmış kare (halka ve taşma yok) */
  .tabbar { align-items: center; }
  .fab { width: 50px; height: 50px; margin-top: 0; border: 0; border-radius: 16px; box-shadow: 0 2px 8px rgba(13,27,46,.16);
         transition: transform .2s var(--ease), border-radius .2s var(--ease); }
  .fab:active { transform: scale(.94); }
  .fab.open { border-radius: 50%; }
}
/* Tablet: alt menü kenardan kenara uzamasın; ortada yüzen bir çubuk olsun */
@media (min-width: 700px) and (max-width: 1023px) {
  .tabbar { left: 50%; right: auto; width: 560px; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom));
            padding-bottom: 6px; border-radius: 28px; box-shadow: var(--elev-2, 0 8px 24px rgba(13,27,46,.14)); }
  .tabbar-spacer { height: calc(100px + env(safe-area-inset-bottom)); }
}

/* Ekleme formları: telefonda alttan açılan panel, bilgisayarda ortada pencere */
.fsheet-bg { position: fixed; inset: 0; z-index: 80; background: rgba(8,14,28,.5); display: flex; align-items: center; justify-content: center;
             padding: 16px; animation: fadeIn .15s ease-out; }
.fsheet { width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; background: var(--panel);
          color: var(--text); border-radius: var(--r-dialog, 28px); padding: 20px 22px 22px; display: grid; gap: 14px; box-shadow: var(--elev-3); }
.fsheet label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.fsheet .fs-h { display: flex; align-items: center; justify-content: space-between; }
.fsheet .fs-h b { font-size: 17px; }
.fsheet .fs-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fsheet .seg { display: flex; }
.fsheet .seg button { flex: 1; }
.fsheet button.primary { padding: 13px; font-size: 15px; }
@media (max-width: 1023px) {
  .fsheet-bg { align-items: flex-end; padding: 0; }
  .fsheet { max-width: none; border-radius: 28px 28px 0 0; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); animation: sheetUp .22s ease-out; }
  .fsheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 2px; }
}
.fsheet input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.fsheet input[type=number]::-webkit-inner-spin-button, .fsheet input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Android uygulamasının WebView'ı (?source=app): üst çubuk ve alt menü native, web'inkiler tekrar etmesin */
html.in-app .masthead, html.in-app .tabbar, html.in-app .pg-h.dup, html.in-app .home-h { display: none !important; }
html.in-app body { padding-top: 8px; padding-bottom: env(safe-area-inset-bottom); }
