/* ================================================================
   ব্যাডমিন্টন কোর্ট ম্যানেজার — ডিজাইন টোকেন
   বিষয়বস্তু থেকে অনুপ্রাণিত: কোর্টের সবুজ, লাইনের ক্রিম রঙ, কর্ক/নেট-পোস্টের অ্যাম্বার
   ================================================================ */
:root {
  --court: #0f4c36;
  --court-dark: #0a3626;
  --court-line: rgba(251, 247, 236, 0.14);
  --cream: #fbf7ec;
  --panel: #ffffff;
  --edge: #e7e0cd;
  --cork: #c1793c;
  --cork-dark: #a35f2b;
  --ink: #16241d;
  --ink-soft: #4a5a51;
  --danger: #b3261e;
  --danger-bg: #fbeceb;
  --ok: #2d7d5a;
  --ok-bg: #e9f5ee;
  --whatsapp: #25d366;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 2px 10px rgba(15, 76, 54, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Hind Siliguri", "Noto Sans Bengali", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3, h4, .brand-title {
  font-family: "Baloo Da 2", "Hind Siliguri", sans-serif;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.4em 0;
}

a { color: inherit; text-decoration: none; }

/* ---------- শাটলকক চিহ্ন (সিগনেচার এলিমেন্ট) ---------- */
.shuttle-mark {
  display: inline-block;
  width: 1em;
  height: 1em;
  position: relative;
  flex-shrink: 0;
}
.shuttle-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--cork);
}
.shuttle-mark::after {
  content: "";
  position: absolute;
  top: -55%;
  left: 50%;
  width: 2px;
  height: 90%;
  background: transparent;
  box-shadow:
    -6px -4px 0 -1px var(--cream),
    0 -6px 0 -1px var(--cream),
    6px -4px 0 -1px var(--cream);
  transform: translateX(-50%);
}

/* ---------- লেআউট ---------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--court) 0%, var(--court-dark) 100%);
  color: var(--cream);
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px 18px 6px;
  border-bottom: 1px dashed var(--court-line);
  margin-bottom: 14px;
}
.brand .brand-title { color: var(--cream); font-size: 1.15rem; margin: 0; }
.brand .shuttle-mark { width: 1.3em; height: 1.3em; }

.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(251, 247, 236, 0.85);
  font-size: 0.96rem;
  margin-bottom: 2px;
}
.nav-list a:hover { background: rgba(251, 247, 236, 0.08); color: var(--cream); }
.nav-list a.active { background: var(--cork); color: #fff; font-weight: 600; }
.nav-sep { border: none; border-top: 1px dashed var(--court-line); margin: 12px 6px; }

.user-box {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--court-line);
  font-size: 0.85rem;
  color: rgba(251, 247, 236, 0.65);
  padding-left: 6px;
}
.user-box form { margin-top: 6px; }
.user-box button {
  background: none; border: none; color: var(--cream);
  text-decoration: underline; cursor: pointer; padding: 0; font-size: 0.85rem;
}

.main {
  flex: 1;
  min-width: 0;
  padding: 26px 30px 60px;
}

.topline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.topline .subtitle { color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- কার্ড ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 10px;
  flex-wrap: wrap;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.stat-card .stat-label { font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 6px; }
.stat-card .stat-value { font-family: "Baloo Da 2", sans-serif; font-size: 1.7rem; font-weight: 600; }
.stat-card.accent { border-top: 3px solid var(--cork); }
.stat-card.warn .stat-value { color: var(--danger); }
.stat-card.ok .stat-value { color: var(--ok); }

/* ---------- বাটন ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--court);
  color: #fff;
  transition: transform 0.08s ease, opacity 0.15s ease;
}
.btn:hover { opacity: 0.92; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--cork); }
.btn-outline { background: transparent; color: var(--court); border-color: var(--edge); }
.btn-outline:hover { background: rgba(15, 76, 54, 0.06); }
.btn-danger { background: var(--danger); }
.btn-sm { padding: 5px 12px; font-size: 0.82rem; }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled], .btn.disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- ফর্ম ---------- */
.field-group { margin-bottom: 14px; }
.field-group label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 5px; color: var(--ink); }
.field-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 0.96rem;
  font-family: inherit;
  color: var(--ink);
}
.field-input:focus, .field-check:focus-visible {
  outline: 2px solid var(--cork);
  outline-offset: 1px;
}
.field-check { width: 18px; height: 18px; accent-color: var(--cork); }
.check-row { display: flex; align-items: center; gap: 8px; }
.check-row label { margin: 0; font-weight: 500; }
.help-text { font-size: 0.78rem; color: var(--ink-soft); margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 18px; }
.errorlist { color: var(--danger); font-size: 0.85rem; padding-left: 1.1em; margin: 4px 0; }
.non-field-errors { background: var(--danger-bg); color: var(--danger); padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 0.9rem; }

/* ---------- টেবিল ---------- */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data-table th {
  text-align: right;
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 8px 10px;
  border-bottom: 2px solid var(--edge);
}
.data-table th:first-child, .data-table td:first-child { text-align: right; }
.data-table td {
  padding: 10px;
  border-bottom: 1px dashed var(--edge);
  vertical-align: middle;
}
.data-table tr:hover td { background: rgba(15, 76, 54, 0.03); }
.data-table .num { font-family: "Baloo Da 2", sans-serif; font-weight: 600; }

/* ---------- ব্যাজ ---------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--danger-bg); color: var(--danger); }
.badge-neutral { background: #f0ede0; color: var(--ink-soft); }
.badge-member { background: #fdf0e3; color: var(--cork-dark); }

/* ---------- মেসেজ/অ্যালার্ট ---------- */
.messages { list-style: none; padding: 0; margin: 0 0 18px 0; }
.messages li {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 0.9rem;
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid rgba(45, 125, 90, 0.25);
}
.messages li.error { background: var(--danger-bg); color: var(--danger); border-color: rgba(179, 38, 30, 0.25); }
.messages li.info { background: #eef3fb; color: #2c4a7c; border-color: rgba(44, 74, 124, 0.2); }

/* ---------- বিবিধ ---------- */
.empty-state { text-align: center; padding: 40px 20px; color: var(--ink-soft); }
.divider-dashed { border: none; border-top: 1px dashed var(--edge); margin: 18px 0; }
.player-slot-list { display: flex; flex-wrap: wrap; gap: 8px; }
.player-chip {
  background: var(--cream);
  border: 1px solid var(--edge);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.86rem;
}
.section-eyebrow { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cork-dark); font-weight: 700; margin-bottom: 4px; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--court); }
.login-card { background: var(--cream); border-radius: var(--radius); padding: 34px 30px; width: 100%; max-width: 360px; box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
.login-card input[type="text"], .login-card input[type="password"] {
  width: 100%; padding: 9px 12px; border: 1px solid var(--edge); border-radius: var(--radius-sm);
  background: #fff; font-size: 0.96rem; font-family: inherit; color: var(--ink);
}
.money::after { content: " ৳"; }

/* ---------- রেসপনসিভ ---------- */
@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; padding: 14px; }
  .nav-list { display: flex; flex-wrap: wrap; gap: 2px; }
  .nav-list a { padding: 7px 10px; font-size: 0.86rem; }
  .nav-sep { display: none; }
  .user-box { border-top: none; margin-top: 8px; padding-top: 0; }
  .main { padding: 18px 16px 40px; }
}
@media (max-width: 860px) {
  .app-shell {
    flex-direction: column;
    padding-top: 60px;
  }

  .sidebar {
    width: 280px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    padding: 20px 16px;
    overflow-y: auto;
    border-right: 2px solid var(--court-line);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar .nav-list {
    display: flex;
    flex-direction: column;
  }

  .sidebar .nav-sep {
    display: block;
  }

  .sidebar .user-box {
    border-top: 1px dashed var(--court-line);
    margin-top: 18px;
    padding-top: 14px;
  }

  .main {
    margin-left: 0 !important;
    padding: 20px 16px 40px !important;
  }

  /* মোবাইল হেডার ইতিমধ্যে base.html-এ স্টাইল করা আছে */
}