/* MyApp — arayüz stilleri */
:root {
  --bg: #0d1017; --bg2: #131826; --card: #161c2c; --card2: #1c2338;
  --border: #252d45; --text: #e6e9f2; --muted: #8b93ab; --faint: #5b6280;
  --accent: #6c7cff; --accent2: #8b5cf6; --ok: #34d399; --warn: #fbbf24; --danger: #f87171;
  --radius: 12px; --shadow: 0 4px 24px rgba(0,0,0,.35);
}
:root[data-theme="light"] {
  --bg: #f4f5fa; --bg2: #ffffff; --card: #ffffff; --card2: #f0f1f7;
  --border: #e3e5ef; --text: #1a1f33; --muted: #5f6680; --faint: #9aa0b5;
  --shadow: 0 2px 12px rgba(30,35,60,.08);
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 15px; }

.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; flex-shrink: 0; background: var(--bg2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 16px 10px; position: sticky; top: 0; height: 100vh;
}
.brand { font-weight: 800; font-size: 18px; padding: 6px 12px 18px; letter-spacing: .3px; display:flex; align-items:center; gap:8px; }
.brand-dot { width: 12px; height: 12px; border-radius: 4px; background: linear-gradient(135deg, var(--accent), var(--accent2)); display:inline-block; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px;
  color: var(--muted); font-weight: 500; font-size: 14px;
}
.sidebar nav a svg { width: 19px; height: 19px; fill: currentColor; }
.sidebar nav a:hover { background: var(--card2); color: var(--text); }
.sidebar nav a.active { background: linear-gradient(135deg, rgba(108,124,255,.16), rgba(139,92,246,.12)); color: var(--accent); }
.sidebar-foot { display: flex; gap: 8px; align-items: center; padding: 10px 8px 0; border-top: 1px solid var(--border); }
.user-chip {
  width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.btn-ghost { background: none; border: none; color: var(--muted); font-size: 17px; cursor: pointer; padding: 6px; border-radius: 8px; }
.btn-ghost:hover { background: var(--card2); color: var(--text); }

.main { flex: 1; padding: 26px 30px 90px; max-width: 1280px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 3px; }

.bottomnav { display: none; }

/* Kartlar ve ızgaralar */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.grid { display: grid; gap: 14px; }
.grid-kpi { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.kpi { padding: 14px 16px; }
.kpi .num { font-size: 26px; font-weight: 800; margin-top: 2px; }
.kpi .lbl { color: var(--muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.kpi.warn .num { color: var(--danger); }
.kpi.good .num { color: var(--ok); }

/* Form elemanları */
input[type=text], input[type=url], input[type=date], input[type=email], input[type=password],
input[type=number], select, textarea {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 9px; padding: 9px 12px; font: inherit; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,124,255,.15); }
textarea { resize: vertical; min-height: 90px; }
label { font-size: 13px; font-weight: 600; color: var(--muted); display: block; margin-bottom: 5px; }
.field { margin-bottom: 13px; }
.frow { display: flex; gap: 10px; flex-wrap: wrap; }
.frow > * { flex: 1; min-width: 130px; }
.btn {
  display: inline-flex; align-items: center; gap: 7px; background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; border: none; border-radius: 9px; padding: 9px 18px; font: inherit; font-weight: 600;
  cursor: pointer; transition: opacity .15s;
}
.btn:hover { opacity: .88; }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 7px; }
.btn-outline { background: none; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }
.btn-danger { background: none; border: 1px solid transparent; color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); opacity: 1; }

/* Rozetler ve çipler */
.badge { font-size: 11.5px; font-weight: 700; padding: 2.5px 9px; border-radius: 20px; white-space: nowrap; }
.b-low { background: rgba(139,146,171,.18); color: var(--muted); }
.b-normal { background: rgba(108,124,255,.16); color: var(--accent); }
.b-high { background: rgba(251,191,36,.16); color: var(--warn); }
.b-crit { background: rgba(248,113,113,.18); color: var(--danger); }
.b-ok { background: rgba(52,211,153,.15); color: var(--ok); }
.chip {
  display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 3px 11px;
  border-radius: 20px; background: var(--card2); color: var(--muted); border: 1px solid var(--border);
}
a.chip:hover, .chip.active { color: var(--accent); border-color: var(--accent); }
.chip.active { background: rgba(108,124,255,.12); }
.tag { font-size: 11.5px; padding: 2px 9px; border-radius: 6px; background: rgba(139,92,246,.14); color: #a78bfa; font-weight: 600; }

/* Listeler */
.list-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 6px; border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: none; }
.list-item .meta { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.muted { color: var(--muted); font-size: 13px; }
.faint { color: var(--faint); font-size: 12.5px; }
.done-title { text-decoration: line-through; color: var(--faint); }

/* Görev checkbox */
.tchk { width: 19px; height: 19px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }

/* İlerleme çubuğu */
.progress { height: 6px; background: var(--card2); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 4px; }

/* Proje kartı */
.pcard { display: flex; flex-direction: column; gap: 10px; border-top: 3px solid var(--accent); }
.pcard h3 a { color: var(--text); }
.pcard h3 a:hover { color: var(--accent); }

/* Görev ağacı */
.ttree { list-style: none; padding-left: 0; }
.ttree .ttree { padding-left: 26px; border-left: 1px dashed var(--border); margin-left: 9px; }
.trow { display: flex; align-items: center; gap: 9px; padding: 7px 4px; border-radius: 8px; }
.trow:hover { background: var(--card2); }
.trow .acts { margin-left: auto; display: flex; gap: 4px; opacity: 0; transition: opacity .12s; align-items: center; }
.trow:hover .acts { opacity: 1; }
@media (hover: none) { .trow .acts { opacity: 1; } }

/* Not & link kartları */
.ncard { display: flex; flex-direction: column; gap: 8px; min-height: 130px; position: relative; }
.ncard .npin { position: absolute; top: 12px; right: 12px; color: var(--warn); }
.ncard .npreview { color: var(--muted); font-size: 13px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; flex: 1; }
.ncard h3 a { color: var(--text); }
.ncard h3 a:hover { color: var(--accent); }
.catstrip { height: 3px; border-radius: 3px; margin: -18px -18px 8px; }

.lcard { display: flex; flex-direction: column; gap: 8px; }
.lcard .lhead { display: flex; align-items: center; gap: 8px; }
.lcard img.fav { width: 18px; height: 18px; border-radius: 4px; }
.lcard .ldom { color: var(--faint); font-size: 12px; }
.lcard h3 { font-size: 14.5px; line-height: 1.4; }
.lcard h3 a { color: var(--text); }
.lcard h3 a:hover { color: var(--accent); }
.lcard .ldesc { color: var(--muted); font-size: 12.5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.lcard .lfoot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: auto; }

/* Hedef ilerleme halkası */
.ring { width: 62px; height: 62px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ring > i { width: 48px; height: 48px; border-radius: 50%; background: var(--card); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; font-style: normal; }
.ring.lg { width: 96px; height: 96px; }
.ring.lg > i { width: 76px; height: 76px; font-size: 19px; }
.exp-bar { position: relative; }
.exp-bar .exp-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--warn); border-radius: 2px; }

/* Sekmeler */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 7px 15px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 13.5px; border: 1px solid transparent; }
.tabs a:hover { color: var(--text); background: var(--card2); }
.tabs a.active { background: var(--card); border-color: var(--accent); color: var(--accent); }
.tabs .cnt { font-size: 11px; background: var(--card2); border-radius: 10px; padding: 1px 7px; margin-left: 5px; }

/* Tablo */
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }

/* Flash */
.flash { padding: 11px 16px; border-radius: 10px; margin-bottom: 14px; font-weight: 500; font-size: 14px; }
.flash-ok { background: rgba(52,211,153,.12); color: var(--ok); border: 1px solid rgba(52,211,153,.3); }
.flash-err { background: rgba(248,113,113,.12); color: var(--danger); border: 1px solid rgba(248,113,113,.3); }

/* Detay/özet (açılır formlar) */
details.reveal > summary { list-style: none; cursor: pointer; display: inline-flex; }
details.reveal > summary::-webkit-details-marker { display: none; }
details.reveal[open] > .card { margin-top: 12px; }

/* Not içeriği */
.md h1 { font-size: 20px; margin: 14px 0 8px; }
.md h2 { font-size: 17px; margin: 12px 0 7px; }
.md h3 { font-size: 15px; margin: 10px 0 6px; }
.md p { margin: 8px 0; }
.md ul { margin: 8px 0 8px 22px; }
.md code { background: var(--card2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-size: 13px; }
.md blockquote { border-left: 3px solid var(--accent); padding: 4px 12px; color: var(--muted); margin: 8px 0; }
.md .chk { padding: 2px 0; }
.md .chk.done { color: var(--faint); }

/* Giriş sayfası */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(1200px 600px at 20% -10%, rgba(108,124,255,.14), transparent), radial-gradient(900px 500px at 110% 110%, rgba(139,92,246,.12), transparent), var(--bg); }
.login-box { width: 100%; max-width: 380px; }
.login-box .card { padding: 30px; box-shadow: var(--shadow); }
.login-logo { text-align: center; font-size: 26px; font-weight: 800; margin-bottom: 22px; }

/* Mobil */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { padding: 18px 14px 90px; }
  .bottomnav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: var(--bg2); border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 600; padding: 4px 0; border-radius: 8px; }
  .bottomnav a svg { width: 21px; height: 21px; fill: currentColor; }
  .bottomnav a.active { color: var(--accent); }
}
