/* Takip Paneli — onaylanan taslak (ortak.css) temel alınarak */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  background: #eef2f7; color: #0f172a;
  font-family: "Noto Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 13.5px; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
a { color: #1d4ed8; text-decoration: none; }
a:hover { text-decoration: underline; }
.app { display: flex; min-height: 100vh; }

/* Sol menü */
.sidebar { width: 236px; flex-shrink: 0; background: #0b1220; color: #cbd5e1; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { padding: 18px 18px 16px; border-bottom: 1px solid #1e293b; }
.brand-row { display: flex; align-items: center; gap: 10px; }
.logo { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, #38bdf8, #2563eb); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.brand-name { color: #f8fafc; font-weight: 700; font-size: 15.5px; letter-spacing: -0.02em; }
.brand-name.dark { color: #0f172a; }
.brand-sub { color: #64748b; font-size: 11px; margin-top: 1px; }
.nav { padding: 12px 10px; flex: 1; }
.nav-label { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: #64748b; padding: 8px 12px 6px; font-weight: 600; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; color: #94a3b8; margin-bottom: 2px; font-weight: 500; font-size: 13.5px; }
.nav-item:hover { background: #111c33; color: #e2e8f0; text-decoration: none; }
.nav-item svg { flex-shrink: 0; opacity: 0.85; }
.nav-item.active { background: #1d4ed8; color: #fff; }
.nav-item.active svg { opacity: 1; }
.nav-foot { padding: 10px 10px 16px; border-top: 1px solid #1e293b; }

/* Ana alan */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #eef2f7; }
.topbar { height: 56px; background: #fff; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; padding: 0 22px; gap: 16px; flex-shrink: 0; position: sticky; top: 0; z-index: 5; }
.menu-toggle { display: none; background: none; border: 1px solid #cbd5e1; border-radius: 7px; height: 32px; width: 36px; font-size: 16px; cursor: pointer; }
.search { flex: 1; max-width: 560px; height: 36px; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 8px; display: flex; align-items: center; gap: 8px; padding: 0 12px; color: #64748b; }
.search:focus-within { border-color: #93c5fd; background: #fff; box-shadow: 0 0 0 3px #dbeafe; }
.search svg { flex-shrink: 0; color: #94a3b8; }
.search input { border: 0; background: transparent; outline: none; flex: 1; font: inherit; font-size: 13px; color: #0f172a; height: 34px; }
.top-meta { margin-left: auto; display: flex; align-items: center; gap: 14px; color: #475569; font-size: 12.5px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #1e3a8a; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.userbox { display: flex; align-items: center; gap: 8px; }
.userbox strong { display: block; font-size: 13px; color: #0f172a; }
.userbox span { font-size: 11px; color: #64748b; }
.banner { background: #fff7ed; border-bottom: 1px solid #fdba74; color: #9a3412; font-size: 12px; font-weight: 600; padding: 7px 22px; }
.content { padding: 16px 22px 18px; flex: 1; display: flex; flex-direction: column; gap: 0; }
.foot { padding: 10px 22px 14px; font-size: 11.5px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; }
.page-head p { color: #64748b; font-size: 12.5px; margin-top: 3px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumb { font-size: 12px; color: #64748b; margin-bottom: 4px; }

/* Butonlar */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 7px; border: 1px solid #cbd5e1; background: #fff; color: #0f172a; font-family: inherit; font-weight: 600; font-size: 12.5px; line-height: 1; white-space: nowrap; cursor: pointer; text-decoration: none; }
.btn:hover { background: #f8fafc; text-decoration: none; }
.btn-primary { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.btn-primary:hover { background: #1e40af; }
.btn-danger { color: #b91c1c; border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 6px; }
.btn-link { background: none; border: none; color: #1d4ed8; font-weight: 650; padding: 0 4px; height: auto; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
form.inline { display: inline; }

/* Kartlar */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.metric { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 16px; display: block; color: inherit; }
a.metric:hover { border-color: #93c5fd; text-decoration: none; }
.metric .k { font-size: 12px; color: #64748b; font-weight: 600; }
.metric .v { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; margin-top: 4px; }
.metric .d { font-size: 11.5px; color: #64748b; margin-top: 2px; }
.metric.warn .v { color: #b45309; }
.metric.danger .v { color: #b91c1c; }
.metric.ok .v { color: #047857; }
.card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 14px 10px; margin-bottom: 12px; min-width: 0; }
.card h2 { font-size: 14px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card h2 > span:not(.badge), .card h2 .muted { font-weight: 500; color: #64748b; font-size: 12px; }
.card p { margin-bottom: 8px; }
.empty { color: #64748b; padding: 14px 4px; font-size: 13px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; flex-wrap: wrap; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid #e2e8f0; background: #fff; color: #334155; font-family: inherit; font-weight: 600; font-size: 12.5px; line-height: 30px; display: inline-block; }
.chip:hover { text-decoration: none; border-color: #93c5fd; }
.chip.on { background: #1e3a8a; border-color: #1e3a8a; color: #fff; }

/* Tablo */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #64748b; padding: 0 10px 8px; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
th a { color: inherit; }
th a.sorted { color: #1d4ed8; }
td { padding: 8px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; font-size: 13px; }
tr:last-child td { border-bottom: none; }
.name { font-weight: 650; color: #0f172a; }
a.name:hover { color: #1d4ed8; }
.sub { display: block; font-size: 11.5px; color: #64748b; font-weight: 500; margin-top: 1px; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; white-space: nowrap; }
.muted { color: #64748b; }
.right { text-align: right; }
.badge { display: inline-flex; align-items: center; justify-content: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.b-ok { background: #d1fae5; color: #065f46; }
.b-warn { background: #fef3c7; color: #92400e; }
.b-orange { background: #ffedd5; color: #9a3412; }
.b-danger { background: #fee2e2; color: #991b1b; }
.b-neutral { background: #e2e8f0; color: #334155; }
.b-blue { background: #dbeafe; color: #1e40af; }
.row-warn { background: #fffbeb; }
.row-orange { background: #fff7ed; }
.row-danger { background: #fef2f2; }
.row-old td { color: #94a3b8; }
.row-old td .name { color: #94a3b8; text-decoration: line-through; }
.ops { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
td.ops { display: table-cell; text-align: right; white-space: nowrap; }
td.ops > * { margin-left: 4px; vertical-align: middle; }
td.ops > *:first-child { margin-left: 0; }
.pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding-top: 10px; flex-wrap: wrap; }
.pager .muted { margin-right: auto; font-size: 12px; }

/* Izgaralar */
.cols-2 { display: grid; grid-template-columns: 340px 1fr; gap: 12px; }
.cols-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.cols-even { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: 13px; }
.kv dt { color: #64748b; }
.kv dd { font-weight: 550; word-break: break-word; }
.note, .event { padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 12.5px; }
.note:last-child, .event:last-child { border-bottom: none; }
.event time, .note time { display: block; color: #64748b; font-size: 11px; margin-bottom: 2px; font-weight: 600; }
.loc { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 16px; display: flex; align-items: center; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.loc strong { font-size: 14.5px; }
.loc .meta { color: #64748b; font-size: 12.5px; margin-top: 2px; }
.loc .grow { flex: 1; min-width: 240px; }

/* Formlar */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.field > span { color: #475569; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=url], input[type=tel], input[type=search]:not(.search input), select, textarea {
  height: 34px; border: 1px solid #cbd5e1; border-radius: 7px; padding: 0 10px; font: inherit; font-size: 13px; background: #fff; color: #0f172a; width: 100%;
}
textarea { height: auto; min-height: 70px; padding: 8px 10px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #60a5fa; box-shadow: 0 0 0 3px #dbeafe; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.form-actions { display: flex; gap: 8px; margin-top: 14px; align-items: center; flex-wrap: wrap; }
.hint { font-size: 11.5px; color: #64748b; }
.box-soft { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 10px 12px; }
fieldset { border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px 12px; }
legend { font-size: 12px; font-weight: 700; color: #334155; padding: 0 4px; }
.hidden { display: none !important; }

/* Bildirimler */
.flash { padding: 9px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 13px; font-weight: 550; border: 1px solid; }
.flash-ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.flash-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.flash-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.flash-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

/* Menüsüz sayfalar */
body.bare { display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; }
.bare-wrap { width: 100%; max-width: 440px; }
.bare-wrap.wide { max-width: 720px; }
.bare-brand { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }
.bare .card { padding: 20px; }
.bare h1 { font-size: 20px; margin-bottom: 4px; }
.qr { background: #fff; padding: 8px; display: inline-block; border: 1px solid #e2e8f0; border-radius: 8px; }
.qr img, .qr svg { display: block; }
code, .code { font-family: ui-monospace, Consolas, monospace; background: #f1f5f9; padding: 2px 6px; border-radius: 5px; font-size: 12.5px; word-break: break-all; }
pre.code { display: block; padding: 10px; white-space: pre-wrap; }
.err-cell { color: #b91c1c; font-size: 12px; }

@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .cols-2, .cols-3, .cols-even { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .sidebar { position: fixed; left: -250px; z-index: 20; transition: left .2s; }
  .sidebar.open { left: 0; }
  .menu-toggle { display: inline-block; }
  .hide-sm { display: none; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .content { padding: 12px; }
}
@media print {
  .sidebar, .topbar, .banner, .actions, .ops, .foot { display: none !important; }
}
