:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --border: #e4e7ec;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #f5a11b;
  --accent-dark: #16324f;
  --danger: #e6483f;
  --success: #17a54a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

/* ---------- Giris ---------- */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #16324f 0%, #1d4468 100%);
}

.login-card {
  background: var(--panel);
  width: 360px;
  padding: 36px 32px;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(10, 25, 45, .28);
  text-align: center;
}

.login-logo {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card h1 { font-size: 20px; margin: 0 0 4px; color: var(--accent-dark); }
.login-card .sub { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.login-card label { display: block; text-align: left; font-size: 12px; color: var(--muted); margin: 12px 0 4px; }
.login-card input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
.login-card input:focus { border-color: var(--accent); }
.login-card button {
  width: 100%;
  margin-top: 20px;
  padding: 11px;
  border: 0;
  border-radius: 8px;
  background: var(--accent-dark);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.login-card button:hover { background: #0f2438; }
.btn-link { display: inline-block; margin-top: 16px; color: var(--accent-dark); }

/* ---------- Ust bar / menu ---------- */
.topbar {
  height: 58px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--accent-dark); letter-spacing: .3px; }
.logo-circle {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.topbar-user { display: flex; align-items: baseline; gap: 8px; }
.topbar-username { font-weight: 600; }
.topbar-role { font-size: 12px; color: var(--muted); }

.app { display: flex; min-height: calc(100vh - 58px); }

.sidebar {
  width: 200px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 0;
}
.sidebar nav { display: flex; flex-direction: column; }
.sidebar nav a {
  padding: 10px 20px;
  color: var(--text);
  text-decoration: none;
  border-left: 3px solid transparent;
}
.sidebar nav a:hover { background: #f7f9fb; }
.sidebar nav a.active { border-left-color: var(--accent); background: #fff7ea; font-weight: 600; color: var(--accent-dark); }
.user-box { padding: 0 20px; }
.logout { color: var(--danger); text-decoration: none; font-size: 13px; }

.content { flex: 1; padding: 24px 28px; }

.page-title { font-size: 22px; margin: 0 0 4px; color: var(--accent-dark); }
.page-sub { margin: 0 0 20px; color: var(--muted); }

/* ---------- Panel / tablo ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 20px;
  overflow: hidden;
}
.panel-head { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.panel-head h2 { margin: 0; font-size: 15px; color: var(--accent-dark); }
.empty { padding: 18px; color: var(--muted); margin: 0; }
.empty-inline { color: var(--muted); }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 18px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); background: #fafbfc; }
.table tr:last-child td { border-bottom: 0; }
.table .right { text-align: right; }

/* ---------- Formlar ---------- */
.row-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 16px 18px; }
.field { display: flex; flex-direction: column; }
.field.grow { flex: 1; min-width: 180px; }
.field label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.field input, .field select, .assign-form select, .sifre-form input {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13px;
  outline: none;
  background: #fff;
}
.field input:focus, .field select:focus { border-color: var(--accent); }
.inline { display: inline-block; margin-left: 6px; }

.btn {
  padding: 8px 14px;
  border: 0;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #dc8f11; }
.btn-soft { background: #eef1f5; color: var(--text); }
.btn-soft:hover { background: #e2e7ee; }
.btn-danger { background: #fdecea; color: var(--danger); }
.btn-danger:hover { background: #f9d9d6; }

.alert {
  background: #fdecea;
  border: 1px solid #f5c6c2;
  color: #a32d24;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
}
.alert-ok { background: #e9f8ee; border-color: #b9e6c8; color: #12703a; }

/* ---------- Istatistik ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 26px; font-weight: 700; color: var(--accent-dark); }

/* ---------- Vezne kartlari ---------- */
.vezne-card { border-bottom: 1px solid var(--border); padding: 16px 18px; }
.vezne-card:last-child { border-bottom: 0; }
.vezne-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.vezne-ad { font-size: 15px; font-weight: 700; color: var(--accent-dark); margin-right: 8px; }
.vezne-aciklama { color: var(--muted); margin-left: 10px; font-size: 13px; }
.vezne-actions { display: flex; }
.vezne-body { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.vezne-personel { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mini-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef3f8;
  border: 1px solid #dbe4ee;
  border-radius: 20px;
  padding: 4px 6px 4px 12px;
  font-size: 13px;
}
.chip-user { color: var(--muted); font-size: 12px; }
.chip-x {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 4px;
}
.chip-x:hover { color: var(--danger); }
.chip .inline { margin-left: 0; }

.assign-form { display: flex; gap: 8px; align-items: center; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-ok { background: #e9f8ee; color: #12703a; }
.badge-off { background: #f1f3f5; color: var(--muted); }

/* ---------- Toplam Para ---------- */
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.panel-head-not { font-size: 12px; color: var(--muted); }
.mini-not { font-weight: 400; text-transform: none; letter-spacing: 0; }

.para-toplam {
  padding: 20px 18px 14px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  border-bottom: 1px solid var(--border);
}
.para-toplam-label { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.para-toplam-deger { font-size: 34px; font-weight: 700; color: var(--accent-dark); letter-spacing: -.5px; }
.para-toplam-deger small { font-size: 16px; font-weight: 600; color: var(--muted); }

.para-liste { display: flex; flex-direction: column; }
.para-satir {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
}
.para-satir:last-child { border-bottom: 0; }
a.para-satir:hover { background: #fff7ea; }
.para-ad { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.para-deger { font-size: 17px; font-weight: 700; color: var(--accent-dark); }
.para-ek { display: block; font-size: 12px; font-weight: 400; color: var(--muted); text-align: right; }
.para-ek-yan { font-size: 12px; font-weight: 400; color: var(--muted); }
.para-pasif .para-ad { color: var(--muted); font-weight: 500; }
.para-pasif .para-deger { color: var(--muted); font-weight: 400; }

/* ---------- Sekmeler ---------- */
.sekme-serit {
  display: flex;
  gap: 2px;
  padding: 0 10px;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
  overflow-x: auto;
}
.sekme {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.sekme:hover { background: #fff; color: var(--text); }
.sekme-aktif {
  color: var(--accent-dark);
  border-bottom-color: var(--accent);
  background: var(--panel);
  font-weight: 600;
}
.sekme-ad { font-weight: inherit; }
.sekme-kod { font-size: 12px; color: var(--muted); font-family: ui-monospace, Menlo, monospace; }
.nokta { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.nokta-ok { background: var(--success); }
.nokta-uyari { background: #e0a83a; }

/* ---------- Canli izle ---------- */
.canli-cerceve {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #101820;
}
.canli-cerceve iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.satir-iptal { opacity: .55; }
.satir-iptal .para-deger, .satir-iptal td { text-decoration: line-through; }
.satir-iptal td:last-child { text-decoration: none; }

/* ---------- Bankalar ---------- */
.stat-foot { font-size: 12px; color: var(--muted); }
.bank-card { text-decoration: none; transition: box-shadow .15s, border-color .15s; }
.bank-card:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(20,40,70,.08); }
.pos { color: var(--success); }
.neg { color: var(--danger); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.aciklama { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-active { background: #fff7ea; }
.table-foot { padding: 10px 18px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.badge-warn { background: #fdf0dc; color: #92610a; }
.table td.empty { padding: 18px; }

.role-tag { display: inline-block; padding: 2px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; background: #f1f3f5; color: var(--muted); }
.role-admin { background: #fdeee0; color: #b06a08; }
.role-yonetici { background: #e8f0fb; color: #1d5aa8; }
.role-personel { background: #eef5ec; color: #35682c; }
