/* ═══════════════════════════════════════════════
   FTNS v3 — Green/Teal Dark Theme
   ═══════════════════════════════════════════════ */
:root {
  /* Arka planlar */
  --bg:       #0e1117;
  --s1:       #131c2e;
  --s2:       #182030;
  --s3:       #1d2640;

  /* Kenarlıklar */
  --b1:       #1e2d45;
  --b2:       #243455;

  /* Yazılar */
  --t1:       #e8f4f0;
  --t2:       #8ba8a0;
  --t3:       #5a7a72;

  /* Ana renkler */
  --teal:     #00d4aa;
  --teal-d:   #00b896;
  --green:    #00e676;
  --yellow:   #ffd740;
  --red:      #ff5252;
  --blue:     #40c4ff;
  --purple:   #b388ff;
  --orange:   #ff9100;

  /* Radius */
  --r:        10px;
  --r-lg:     16px;
  --r-xl:     20px;

  /* Shadows */
  --sh:       0 2px 12px rgba(0,0,0,.4);
  --sh-lg:    0 8px 32px rgba(0,0,0,.6);
  --sh-teal:  0 4px 20px rgba(0,212,170,.2);
}

/* ── RESET ───────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; -webkit-tap-highlight-color:transparent; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--t1);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button { border:none; cursor:pointer; font-family:inherit; outline:none; background:none; }
a      { text-decoration:none; color:inherit; }

input, select, textarea {
  font-family: inherit; font-size: 14px; outline: none; width: 100%;
  background: var(--s2); color: var(--t1);
  border: 1px solid var(--b1); border-radius: var(--r);
  padding: 10px 14px; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0,212,170,.15);
}
input::placeholder { color: var(--t3); }

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--b2); border-radius: 3px; }

/* ── LAYOUT ──────────────────────────────────── */
.page {
  max-width: 480px; margin: 0 auto;
  min-height: 100vh; display: flex; flex-direction: column;
}
.page-body {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 16px 14px 96px;
  -webkit-overflow-scrolling: touch;
}

/* ── BOTTOM NAV ──────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  display: flex;
  background: rgba(13,17,23,.95);
  backdrop-filter: blur(16px) saturate(180%);
  border-top: 1px solid var(--b1);
  z-index: 100;
  box-shadow: 0 -4px 24px rgba(0,0,0,.5);
}
.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 10px 4px 8px;
  color: var(--t3); font-size: 9px; font-weight: 600;
  letter-spacing: .3px; text-transform: uppercase;
  transition: color .2s;
}
.nav-btn svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: filter .2s;
}
.nav-btn.active { color: var(--teal); }
.nav-btn.active svg { filter: drop-shadow(0 0 6px rgba(0,212,170,.6)); }

/* ── CARDS ───────────────────────────────────── */
.card {
  background: var(--s1); border: 1px solid var(--b1);
  border-radius: var(--r-lg); padding: 16px;
  margin-bottom: 12px; box-shadow: var(--sh);
}
.card2 {
  background: var(--s2); border: 1px solid var(--b1);
  border-radius: var(--r); padding: 12px; margin-bottom: 8px;
}
.card-title {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.6px; color: var(--t2); margin-bottom: 14px;
}

/* ── SECTION HEADER ──────────────────────────── */
.sec-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.sec-title {
  font-size: 16px; font-weight: 700; letter-spacing: -.3px;
}

/* ── BUTTONS ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 11px 18px; border-radius: var(--r);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .15s; border: none; font-family: inherit;
  text-align: center;
}
.btn-block { width: 100%; }
.btn-sm    { padding: 7px 14px; font-size: 12px; border-radius: 8px; }

.btn-primary {
  background: linear-gradient(135deg, var(--teal), var(--teal-d));
  color: #000; font-weight: 700;
  box-shadow: var(--sh-teal);
}
.btn-primary:active { opacity: .85; transform: scale(.98); }

.btn-ghost {
  background: var(--s2); color: var(--t2);
  border: 1px solid var(--b1);
}
.btn-ghost:active { background: var(--s3); }

.btn-success { background: rgba(0,230,118,.12); color: var(--green); border: 1px solid rgba(0,230,118,.3); }
.btn-done    { background: rgba(0,212,170,.12); color: var(--teal);  border: 1px solid rgba(0,212,170,.4); }
.btn-danger  { background: rgba(255,82,82,.1);  color: var(--red);   border: 1px solid rgba(255,82,82,.3); }

/* ── BADGES ──────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 700; padding: 3px 9px;
  border-radius: 20px; letter-spacing: .3px;
}
.badge-teal   { background: rgba(0,212,170,.15); color: var(--teal);   border: 1px solid rgba(0,212,170,.3); }
.badge-green  { background: rgba(0,230,118,.15); color: var(--green);  border: 1px solid rgba(0,230,118,.3); }
.badge-yellow { background: rgba(255,215,64,.15); color: var(--yellow); border: 1px solid rgba(255,215,64,.3); }
.badge-red    { background: rgba(255,82,82,.15);  color: var(--red);    border: 1px solid rgba(255,82,82,.3); }
.badge-blue   { background: rgba(64,196,255,.15); color: var(--blue);   border: 1px solid rgba(64,196,255,.3); }
.badge-muted  { background: var(--s2); color: var(--t3); border: 1px solid var(--b1); }

/* ── FORM ────────────────────────────────────── */
.form-row { margin-bottom: 12px; }
.form-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--t2); margin-bottom: 5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.divider   { border: none; border-top: 1px solid var(--b1); margin: 14px 0; }

/* ── PROGRESS BAR ────────────────────────────── */
.prog-track { background: var(--s3); border-radius: 99px; overflow: hidden; }
.prog-fill  { height: 100%; border-radius: 99px; transition: width .8s cubic-bezier(.4,0,.2,1); }
.prog-h4  { height: 4px; }
.prog-h6  { height: 6px; }
.prog-h8  { height: 8px; }

/* ── STAT CARDS ──────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.stat-card { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--r-lg); padding: 14px 12px; text-align: center; box-shadow: var(--sh); }
.stat-val  { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.5px; line-height: 1.2; }
.stat-lbl  { font-size: 9px; color: var(--t2); text-transform: uppercase; letter-spacing: .8px; margin-top: 3px; }

/* ── CHART ───────────────────────────────────── */
.chart-wrap { width:100%; height:160px; background:var(--s2); border-radius:var(--r); padding:4px; position:relative; }
.chart-wrap canvas { width:100%!important; }

/* ── MODAL ───────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(4px);
  z-index: 200; display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: var(--s1); border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 20px 16px 40px; width: 100%; max-width: 480px;
  max-height: 88vh; overflow-y: auto;
  border-top: 1px solid var(--b2);
  box-shadow: 0 -8px 40px rgba(0,0,0,.7);
  position: relative;
}
.modal-handle { width: 40px; height: 4px; background: var(--b2); border-radius: 2px; margin: 0 auto 18px; }
.modal-title  { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.modal-close  {
  position: absolute; top: 16px; right: 16px;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--s2); border: 1px solid var(--b1);
  color: var(--t2); display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px; line-height: 1; transition: all .15s;
}
.modal-close:active { background: var(--red); border-color: var(--red); color: #fff; }

/* ── TOAST ───────────────────────────────────── */
.toast {
  position: fixed; bottom: 82px; left: 50%; transform: translateX(-50%);
  padding: 10px 22px; border-radius: 99px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  z-index: 500; pointer-events: none;
  box-shadow: var(--sh-lg); opacity: 0; transition: opacity .25s;
}
.toast.show { opacity: 1; }
.toast.ok  { background: var(--s1); color: var(--teal); border: 1px solid rgba(0,212,170,.4); }
.toast.err { background: var(--s1); color: var(--red);  border: 1px solid rgba(255,82,82,.4); }

/* ── LOGIN ───────────────────────────────────── */
.login-wrap {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 24px;
}
.login-logo {
  width: 72px; height: 72px; border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--teal), var(--green));
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; margin-bottom: 20px;
  box-shadow: var(--sh-teal);
}
.login-box {
  width: 100%; max-width: 340px; background: var(--s1);
  border: 1px solid var(--b1); border-radius: var(--r-xl);
  padding: 24px; box-shadow: var(--sh-lg);
}

/* ── PWA BANNER ──────────────────────────────── */
.pwa-banner {
  position: fixed; bottom: 76px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 24px); max-width: 456px;
  background: var(--s1); border: 1px solid var(--teal);
  border-radius: var(--r-xl); padding: 14px 16px;
  z-index: 150; box-shadow: var(--sh-lg);
  display: flex; align-items: center; gap: 12px;
  animation: slide-up .3s ease;
}
@keyframes slide-up { from { transform: translateX(-50%) translateY(20px); opacity:0; } }

/* ── UTILS ───────────────────────────────────── */
.hidden { display: none !important; }
.tc  { color: var(--teal); }
.gc  { color: var(--green); }
.yc  { color: var(--yellow); }
.rc  { color: var(--red); }
.bc  { color: var(--blue); }
.mc  { color: var(--t2); }
