* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
}
nav {
  display: flex;
  align-items: center;
  gap: 24px;
  background: #16213e;
  color: #fff;
  padding: 0 20px;
  height: 52px;
}
.nav-brand { font-weight: 600; font-size: 16px; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a {
  color: #cdd5e0;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
}
.nav-links a:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-user { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.nav-user a { text-decoration: none; }

main { max-width: 1100px; margin: 24px auto; padding: 0 16px; }

.card {
  background: #fff;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.card-narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
.card-header { display: flex; justify-content: space-between; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }

h1 { font-size: 20px; margin: 0 0 16px; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 16px 0 8px; }

label { display: block; margin-bottom: 12px; font-size: 14px; font-weight: 500; }
input, select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}
input:focus, select:focus { outline: 2px solid #4361ee55; border-color: #4361ee; }
input.readonly { background: #f5f6f8; color: #666; }
input[type="file"] { padding: 6px; }

button[type="submit"], .btn-secondary {
  background: #4361ee;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button[type="submit"]:hover { background: #3651d4; }
.btn-secondary { background: #eef1f7; color: #16213e; }
.btn-secondary:hover { background: #dfe4ef; }

.link-btn {
  background: none;
  border: none;
  color: #cdd5e0;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  font-family: inherit;
}
main .link-btn { color: #4361ee; }
.link-btn.danger { color: #d33; }
.link-btn:hover { text-decoration: underline; }
.inline { display: inline; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eceef2; }
th { font-weight: 600; color: #555; font-size: 13px; }
tr:hover td { background: #f8f9fc; }
code { background: #f0f2f7; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.flash-success { background: #e6f6ec; color: #14683a; border: 1px solid #bfe6ce; }
.flash-error { background: #fdecec; color: #a12626; border: 1px solid #f5c6c6; }

.muted { color: #888; font-size: 13px; }
.req { color: #d33; }
.badge {
  background: #eef1f7;
  border-radius: 10px;
  padding: 2px 10px;
  font-size: 12px;
  color: #555;
}
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: 6px 0; border-bottom: 1px solid #eceef2; font-size: 14px; }

.search-form { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.search-form input { width: 280px; margin: 0; }
.search-form a { font-size: 13px; }

input.checkbox { width: auto; display: inline-block; margin: 0; transform: scale(1.3); }
table input:not(.checkbox) { margin-top: 0; }

/* Barkod okuma */
.input-with-btn { display: flex; gap: 8px; margin-top: 4px; }
.input-with-btn input { margin-top: 0; flex: 1; }
.input-with-btn button {
  background: #eef1f7;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 0 14px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.input-with-btn button:hover { background: #dfe4ef; }
.input-with-btn button:disabled { opacity: .5; cursor: default; }
#scanner-box { margin-bottom: 12px; }
#scanner {
  border: 2px solid #4361ee;
  border-radius: 8px;
  overflow: hidden;
  min-height: 60px;
}
#scanner video { width: 100% !important; display: block; }
.btn-block { display: block; width: 100%; text-align: center; padding: 10px; margin-top: 8px; }

/* Mobil */
@media (max-width: 600px) {
  main { margin: 12px auto; }
  .card { padding: 16px; }
  nav { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px; }
  table { display: block; overflow-x: auto; }
  .search-form { flex-wrap: wrap; }
  .search-form input { width: 100%; }
  input, select, button[type="submit"] { font-size: 16px; } /* iOS zoom'u engelle */
}
