:root {
  --bg: #f4f6fa;
  --panel: #ffffff;
  --border: #dfe4ed;
  --text: #1c2430;
  --muted: #66748a;
  --accent: #0a66c2;
  --accent-dark: #08508f;
  --green: #1a7f4b;
  --green-bg: #e6f5ec;
  --red: #c0392b;
  --red-bg: #fdeceb;
  --amber: #b26a00;
  --amber-bg: #fdf3e2;
  --blue: #1d64b5;
  --blue-bg: #e8f1fb;
  --slate: #5b6878;
  --slate-bg: #eef1f5;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20, 32, 50, .08), 0 1px 2px rgba(20, 32, 50, .04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- topbar */
.topbar {
  background: #14273f;
  color: #fff;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 54px;
  flex-wrap: wrap;
}
.brand { color: #fff; font-weight: 700; font-size: 16px; letter-spacing: .3px; }
.brand span { color: #6fb4ff; font-weight: 400; }
.topbar nav { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.topbar nav a { color: #cbd8e8; font-size: 13.5px; padding: 4px 0; }
.topbar nav a:hover { color: #fff; text-decoration: none; border-bottom: 2px solid #6fb4ff; }
.user-box { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.user-name { color: #fff; font-weight: 600; }
.user-dept {
  background: rgba(255,255,255,.14); color: #d6e4f5;
  padding: 2px 8px; border-radius: 20px; font-size: 11.5px;
}
.btn-link { color: #a9c3e0; font-size: 12.5px; }

.container { max-width: 1500px; margin: 0 auto; padding: 22px 20px 60px; }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; }

/* ------------------------------------------------------------------ text */
h1 { font-size: 21px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 0 0 8px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.subtitle { color: var(--muted); font-size: 13px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ----------------------------------------------------------------- panel */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.panel-title {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--muted); margin: 0 0 12px;
}

/* ----------------------------------------------------------------- stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
  border-left: 4px solid var(--slate);
}
.stat .num { font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat .lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.stat.green  { border-left-color: var(--green); } .stat.green .num  { color: var(--green); }
.stat.red    { border-left-color: var(--red); }   .stat.red .num    { color: var(--red); }
.stat.amber  { border-left-color: var(--amber); } .stat.amber .num  { color: var(--amber); }
.stat.blue   { border-left-color: var(--blue); }  .stat.blue .num   { color: var(--blue); }
.stat.total  { border-left-color: var(--accent); } .stat.total .num { color: var(--accent); }
.stat a { color: inherit; }

/* ----------------------------------------------------------------- table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; background: var(--panel); font-size: 13px; }
th {
  text-align: left; padding: 10px 12px; background: #eff2f7;
  border-bottom: 2px solid var(--border); font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .4px; color: var(--muted); white-space: nowrap;
}
td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:hover { background: #f8fafd; }
.nowrap { white-space: nowrap; }
.cell-clip { max-width: 340px; }
.num-cell { text-align: right; font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------------- badge */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.red   { background: var(--red-bg);   color: var(--red); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.blue  { background: var(--blue-bg);  color: var(--blue); }
.badge.slate { background: var(--slate-bg); color: var(--slate); }
.tag {
  display: inline-block; background: var(--slate-bg); color: var(--slate);
  padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 600;
}
.tcode { font-family: Consolas, "Courier New", monospace; font-size: 12.5px; color: var(--accent-dark); font-weight: 600; }

/* ---------------------------------------------------------------- button */
.btn {
  display: inline-block; padding: 7px 14px; border-radius: 6px; border: 1px solid transparent;
  font-size: 13px; font-weight: 600; cursor: pointer; background: var(--accent); color: #fff;
  font-family: inherit; line-height: 1.4;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn.ghost { background: #fff; border-color: var(--border); color: var(--text); }
.btn.ghost:hover { background: #f1f4f9; }
.btn.green { background: var(--green); } .btn.green:hover { background: #14653b; }
.btn.red   { background: var(--red); }   .btn.red:hover   { background: #9c2c20; }
.btn.amber { background: var(--amber); } .btn.amber:hover { background: #8d5400; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ------------------------------------------------------------------ form */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
input[type=text], input[type=password], input[type=email], input[type=number],
input[type=file], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 13px; font-family: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid #bcd8f5; border-color: var(--accent); }
textarea { resize: vertical; min-height: 70px; }
.field { margin-bottom: 12px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.filters .field { margin-bottom: 0; min-width: 150px; }

/* ----------------------------------------------------------------- alert */
.alert { padding: 11px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; border: 1px solid; }
.alert.ok   { background: var(--green-bg); border-color: #bfe3cf; color: var(--green); }
.alert.err  { background: var(--red-bg);   border-color: #f3c6c1; color: var(--red); }
.alert.warn { background: var(--amber-bg); border-color: #f0d9ac; color: var(--amber); }
.alert.info { background: var(--blue-bg);  border-color: #c5ddf5; color: var(--blue); }

/* ----------------------------------------------------------------- login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 8px 28px rgba(20,32,50,.12); padding: 32px; width: 100%; max-width: 380px;
}
.login-card h1 { font-size: 20px; text-align: center; margin-bottom: 4px; }
.login-card .subtitle { text-align: center; margin-bottom: 22px; }

/* ---------------------------------------------------------------- detail */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .detail-grid { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: 13px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; white-space: pre-wrap; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; border-left: 2px solid var(--border); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--slate); border: 2px solid #fff;
}
.timeline li.green::before { background: var(--green); }
.timeline li.red::before   { background: var(--red); }
.timeline li.amber::before { background: var(--amber); }
.timeline li.blue::before  { background: var(--blue); }
.timeline .when { font-size: 11.5px; color: var(--muted); }

.exec-card { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; background: #fcfdff; }
.exec-card.red { border-left: 4px solid var(--red); }
.exec-card.green { border-left: 4px solid var(--green); }
.exec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.shots { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.shots a { display: block; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: #fff; }
.shots img { display: block; width: 108px; height: 78px; object-fit: cover; }

.radio-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.radio-card {
  flex: 1; min-width: 130px; border: 2px solid var(--border); border-radius: 8px;
  padding: 10px 12px; cursor: pointer; background: #fff; text-align: center; font-weight: 600;
}
.radio-card input { margin-right: 6px; }
.radio-card.ok  { color: var(--green); }
.radio-card.bad { color: var(--red); }
.radio-card:has(input:checked).ok  { border-color: var(--green); background: var(--green-bg); }
.radio-card:has(input:checked).bad { border-color: var(--red);   background: var(--red-bg); }

.progress { height: 7px; background: var(--slate-bg); border-radius: 4px; overflow: hidden; min-width: 90px; display: flex; }
.progress i { display: block; height: 100%; }
.progress .p-green { background: var(--green); }
.progress .p-blue  { background: var(--blue); }
.progress .p-red   { background: var(--red); }
.progress .p-amber { background: var(--amber); }

.inline-form { display: inline; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }

/* Panel basligi ile sag taraftaki butonlari ayni satirda tutar */
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 10px;
}

/* Kutu + aciklama metnini hizali gosteren onay satiri */
.check-line {
  display: flex; align-items: flex-start; gap: 9px;
  margin-top: 12px; font-size: 14px; line-height: 1.55;
}
.check-line input { width: auto; margin-top: 3px; flex: none; }
