:root {
  --navy: #0b2a4a;
  --navy-2: #123d68;
  --red: #c8102e;
  --gold: #b8892d;
  --green: #138a4b;
  --wa: #25d366;
  --bg: #f3f5f8;
  --card: #ffffff;
  --text: #1b2430;
  --muted: #5f6b7a;
  --line: #e1e6ed;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 32, 56, .06), 0 4px 16px rgba(16, 32, 56, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5;
}
a { color: var(--navy-2); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* Üst menü */
header.top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.top .inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 10px 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; white-space: nowrap; }
.brand .mark { width: 36px; height: 36px; border-radius: 8px; background: var(--red); display: grid; place-items: center; font-weight: 800; letter-spacing: -.5px; }
.brand small { display: block; font-weight: 400; opacity: .75; font-size: .72rem; }
nav.main { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
nav.main a { color: #dbe6f3; text-decoration: none; padding: 7px 10px; border-radius: 8px; font-size: .9rem; white-space: nowrap; }
nav.main a:hover, nav.main a.active { background: rgba(255,255,255,.12); color: #fff; }
.userbox { display: flex; align-items: center; gap: 10px; font-size: .85rem; white-space: nowrap; }
.userbox .who { text-align: right; line-height: 1.2; }
.menu-btn { display: none; background: none; border: 0; color: #fff; font-size: 1.5rem; cursor: pointer; }

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

/* Bileşenler */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 16px; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; margin: 28px 0 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 8px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; background: var(--navy-2); color: #fff; }
.btn:hover { filter: brightness(1.1); }
.btn.red { background: var(--red); }
.btn.ghost { background: transparent; color: var(--navy-2); border: 1px solid var(--line); }
.btn.light { background: rgba(255,255,255,.14); color: #fff; }
.btn.wa { background: var(--wa); color: #073b1c; }
.btn.sm { padding: 5px 10px; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 4px; }
input, select, textarea { width: 100%; font: inherit; padding: 9px 11px; border: 1px solid #c9d2dd; border-radius: 8px; background: #fff; color: var(--text); }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #7aa7d9; border-color: transparent; }
.field { margin-bottom: 14px; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .75rem; font-weight: 700; background: #e8edf3; color: var(--navy-2); }
.badge.open { background: #fdecea; color: #a4161a; }
.badge.done { background: #e3f4ea; color: #116b3a; }
.badge.wa { background: #dcf8e6; color: #0d6b33; }
.badge.gold { background: #f8efd9; color: #7a5a14; }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: .92rem; }
.alert.err { background: #fdecea; color: #8a1116; }
.alert.ok { background: #e3f4ea; color: #0f5c32; }
.alert.info { background: #e7f0fb; color: #123d68; }

/* Ana sayfa */
.hero { background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 70%); color: #fff; border-radius: var(--radius); padding: 28px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.hero h1 { font-size: 1.8rem; }
.hero p { opacity: .85; margin: 0 0 16px; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick a { background: rgba(255,255,255,.1); border-radius: 10px; padding: 12px; color: #fff; text-decoration: none; font-weight: 600; font-size: .92rem; }
.quick a span { display: block; font-size: 1.3rem; }
.quick a:hover { background: rgba(255,255,255,.18); }

.deal { position: relative; display: flex; flex-direction: column; gap: 6px; border-top: 4px solid var(--gold); }
.deal .cat { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gold); }
.deal .old { text-decoration: line-through; color: var(--muted); font-size: .9rem; }
.deal .price { font-size: 1.5rem; font-weight: 800; color: var(--navy); }
.deal .off { position: absolute; top: 14px; right: 14px; background: var(--red); color: #fff; font-weight: 800; border-radius: 8px; padding: 4px 8px; font-size: .9rem; }
.deal .meta { font-size: .8rem; color: var(--muted); }
.deal.ended { opacity: .65; border-top-color: #9aa5b1; }

.news-item { display: block; text-decoration: none; color: inherit; }
.news-item:hover h3 { color: var(--red); }
.news-body { white-space: pre-wrap; }

/* Tablo / liste */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.table-wrap { overflow-x: auto; }
.list-item { padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover h3 { color: var(--red); }

.stat { text-align: center; }
.stat b { display: block; font-size: 1.7rem; color: var(--navy); }
.stat span { font-size: .82rem; color: var(--muted); }

.thread { border-left: 3px solid var(--line); padding-left: 14px; }
.msg { background: #f6f8fb; border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; }
.msg.committee { background: #eaf2fb; border-left: 3px solid var(--navy-2); }
.msg .h { font-size: .8rem; color: var(--muted); margin-bottom: 4px; }

/* Vize */
.cons { cursor: pointer; border: 2px solid transparent; }
.cons.sel { border-color: var(--navy-2); }
.cons .flag { font-size: 2rem; }
.day { margin-bottom: 14px; }
.day h4 { margin: 0 0 6px; font-size: .9rem; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { border: 1px solid #c9d2dd; background: #fff; border-radius: 8px; padding: 6px 12px; cursor: pointer; font: inherit; font-size: .88rem; }
.slot:hover:not(:disabled) { border-color: var(--navy-2); background: #eef4fb; }
.slot.full { background: #f1f1f1; color: #999; cursor: not-allowed; text-decoration: line-through; }
.slot.mine { background: var(--green); color: #fff; border-color: var(--green); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; }
.tabs button.on { color: var(--navy); border-bottom-color: var(--red); }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(10, 20, 35, .55); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: var(--radius); padding: 22px; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; }

.auth-wrap { max-width: 440px; margin: 30px auto; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 60; box-shadow: var(--shadow); }
footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 20px; }

@media (max-width: 900px) {
  .g3, .g4 { grid-template-columns: 1fr 1fr; }
  .hero { grid-template-columns: 1fr; }
  .menu-btn { display: block; margin-left: auto; }
  nav.main { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy); flex-direction: column; padding: 8px 16px 16px; }
  nav.main.open { display: flex; }
  .top .inner { position: relative; flex-wrap: wrap; }
  .userbox .who { display: none; }
}
@media (max-width: 600px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .quick { grid-template-columns: 1fr 1fr; }
  main { padding: 16px 16px 40px; }
  .hero { padding: 20px; }
  .brand small { display: none; }
}
