:root {
  --bg: #f4ede1;
  --bg-2: #efe6d6;
  --card: #fffdf9;
  --ink: #2c241c;
  --ink-soft: #6b5d4d;
  --line: #e3d7c4;
  --accent: #8a3b2e;       /* tavla kırmızısı / kiremit */
  --accent-d: #6f2e23;
  --walnut: #3a2c20;
  --gold: #b9892f;
  --ok: #2f7d4f;
  --ok-bg: #e6f3ea;
  --err: #a83232;
  --err-bg: #fbeaea;
  --bek: #9a7b1f;
  --shadow: 0 10px 30px rgba(58, 44, 32, .10), 0 2px 6px rgba(58, 44, 32, .06);
  --radius: 16px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- Backgammon üçgen motifi (hero için) ---- */
.hero {
  background:
    linear-gradient(180deg, rgba(58,44,32,.0), rgba(58,44,32,.0)),
    var(--walnut);
  color: #f6efe2;
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid var(--gold);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  height: 16px; top: 0;
  background-image:
    linear-gradient(135deg, var(--accent) 25%, transparent 25%),
    linear-gradient(225deg, var(--accent) 25%, transparent 25%);
  background-size: 36px 16px;
  opacity: .9;
}
.hero-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px 40px;
  text-align: center;
}
.hero-arma { display: block; width: 156px; height: 156px; margin: 0 auto 10px; }
@media (max-width: 480px) { .hero-arma { width: 132px; height: 132px; } }
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4.4vw, 2.4rem);
  margin: .4em 0 .2em;
  letter-spacing: .2px;
}
.hero .lead { color: #e6dcc9; max-width: 32em; margin: .4em auto 0; }

.admin-quick {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  background: rgba(255, 255, 255, .12); color: #f6efe2;
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px;
  padding: 5px 13px; font-size: .8rem; font-weight: 700; letter-spacing: .5px;
  text-decoration: none;
}
.admin-quick:hover { background: rgba(255, 255, 255, .24); }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-name { font-family: var(--serif); letter-spacing: .3px; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0 18%, var(--accent) 19% 100%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.5);
  display: inline-block;
}
.brand.small .brand-mark { width: 18px; height: 18px; }
.brand-link { text-decoration: none; }
.brand-logo { width: 22px; height: 22px; display: block; }

/* ---- Yerleşim ---- */
.wrap { width: 100%; max-width: 680px; margin: 0 auto; padding: 28px 20px 48px; flex: 1; }
.wrap.wide { max-width: 1040px; }
.wrap.narrow { max-width: 440px; }
.center-screen { display: flex; align-items: center; justify-content: center; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.card.center { text-align: center; }
.card-title { font-family: var(--serif); margin: 0 0 16px; font-size: 1.25rem; }

/* ---- Form ---- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: var(--ink); }
.req { color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
input, select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fffdf8;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(138, 59, 46, .15);
}
textarea { resize: vertical; }
.hint { color: var(--ink-soft); font-size: .82rem; margin: 6px 0 0; }
.hint.center, .center { text-align: center; }
.hint a { color: var(--accent); }

/* honeypot gizle */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Butonlar ---- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 20px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--accent-d); }
.btn:active { transform: translateY(1px); }
.btn-lg { width: 100%; padding: 14px; font-size: 1.05rem; margin-top: 6px; }
.btn-sm { padding: 7px 12px; font-size: .85rem; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-danger { background: transparent; color: var(--err); border: 1.5px solid #e3c4c4; }
.btn-danger:hover { background: var(--err); color: #fff; border-color: var(--err); }
.delete-row { margin-top: 14px; }
.inline { display: inline; }
.row { display: flex; gap: 10px; align-items: center; }

/* ---- Uyarılar ---- */
.alert { border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-size: .92rem; }
.alert.error { background: var(--err-bg); color: var(--err); border: 1px solid #eecccc; }
.alert.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #cfe6d6; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

/* ---- Başarı ---- */
.success-card { text-align: center; }
.check {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--ok-bg); color: var(--ok);
  font-size: 2rem; line-height: 64px; margin: 0 auto 8px;
}
.success-card h2 { font-family: var(--serif); margin: .2em 0; }

/* ---- Yönetim ---- */
.admin-bar { background: var(--walnut); color: #f3ead9; border-bottom: 3px solid var(--gold); }
.admin-bar-inner { max-width: 1040px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-bar .brand-name { color: #f3ead9; }
.admin-bar .btn-ghost { color: #f3ead9; border-color: rgba(255,255,255,.25); }
.admin-bar .btn-ghost:hover { background: rgba(255,255,255,.1); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.toolbar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.search { display: flex; align-items: center; gap: 6px; }
.search input[type="search"] { width: 220px; padding: 7px 12px; border-radius: 10px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  text-decoration: none; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line);
  padding: 7px 14px; border-radius: 999px; font-size: .9rem; font-weight: 600;
}
.chip .count { color: var(--ink-soft); font-weight: 700; margin-left: 4px; }
.chip.active { background: var(--walnut); color: #fff; border-color: var(--walnut); }
.chip.active .count { color: #e6dcc9; }

.table-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tbl th { background: var(--bg-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: #fbf6ed; }
.nowrap { white-space: nowrap; }
.muted { color: var(--ink-soft); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.b-onay { background: var(--ok-bg); color: var(--ok); }
.b-ret { background: var(--err-bg); color: var(--err); }
.b-bek { background: #fbf2d6; color: var(--bek); }

.empty { text-align: center; color: var(--ink-soft); }

/* detay */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.info { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin: 0; }
.info dt { color: var(--ink-soft); font-size: .85rem; }
.info dd { margin: 0; font-weight: 500; }
.info dd a { color: var(--accent); }
.pre { white-space: pre-wrap; }
.status-only { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); }
.status-only label { font-size: .85rem; color: var(--ink-soft); display: block; margin-bottom: 8px; }
.login-title { font-family: var(--serif); text-align: center; margin: 0 0 18px; }

.span2 { grid-column: 1 / -1; }
.resp-log { list-style: none; margin: 0; padding: 0; }
.resp-log li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.resp-log li:last-child { border-bottom: none; }
.resp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.resp-head strong { font-weight: 600; }
.resp-log details { margin-top: 8px; }
.resp-log summary { cursor: pointer; color: var(--accent); font-size: .88rem; }
.resp-body { margin: 8px 0 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: .9rem; }

.site-foot { text-align: center; color: var(--ink-soft); font-size: .82rem; padding: 20px; }

@media (max-width: 760px) {
  .detail-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .table-card { overflow-x: auto; }
}
