.panel { padding: 1rem; margin-bottom: 1rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.panel-head h2 { margin-bottom: 0; font-size: 1.25rem; }

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.field {
  min-height: 42px;
  width: min(100%, 280px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  padding: 0.65rem 0.75rem;
}

.primary, .ghost, .danger {
  min-height: 42px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 0.62rem 0.95rem;
  font-weight: 700;
}

.primary { color: #fbf4e8; background: var(--gold); }
.primary:hover { background: var(--gold-strong); }
.ghost { color: var(--ink); background: rgba(255, 251, 243, 0.72); border-color: var(--line); }
.danger { color: #fff; background: var(--rose); }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 0.9rem; border-bottom: 1px solid var(--line); text-align: start; vertical-align: middle; }
th { color: var(--muted); font-size: 0.86rem; }
tr:last-child td { border-bottom: 0; }

.badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.84rem;
  font-weight: 700;
}

.badge.active, .badge.paid, .badge.live { color: var(--date); background: rgba(31, 111, 99, 0.1); }
.badge.inactive, .badge.unpaid, .badge.done { color: var(--rose); background: rgba(155, 77, 69, 0.1); }
.badge.scheduled { color: var(--gold-strong); background: rgba(181, 138, 56, 0.13); }

.row-actions { display: inline-flex; gap: 0.35rem; }
.row-actions button { width: 36px; height: 36px; padding: 0; }

.progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(40, 35, 26, 0.1);
}

.progress span {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  background: linear-gradient(90deg, var(--date), var(--gold));
}

.match-card, .news-card {
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
}

.match-teams { display: flex; justify-content: space-between; gap: 0.75rem; font-weight: 800; }
.match-score { font-size: 1.4rem; color: var(--gold-strong); }

.matches-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
}

.match-card {
  min-height: 0;
  padding: 0.78rem;
  gap: 0.45rem;
}

.match-card .badge {
  justify-self: start;
}

.match-card .muted {
  margin: 0;
  font-size: 0.82rem;
}

.match-teams {
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.match-teams span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.team-logo {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(31, 90, 70, 0.08);
}

.team-initial {
  display: inline-grid;
  place-items: center;
  color: #164535;
  font-size: 0.68rem;
  font-weight: 900;
}

.match-score {
  font-size: 1.08rem;
  line-height: 1.1;
}

.news-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.qibla-dial {
  width: min(70vw, 280px);
  aspect-ratio: 1;
  margin: 1rem auto;
  border-radius: 50%;
  border: 10px solid rgba(181, 138, 56, 0.24);
  display: grid;
  place-items: center;
  position: relative;
  background: radial-gradient(circle, rgba(255,255,255,0.75), rgba(255,244,223,0.68));
}

.qibla-needle {
  width: 8px;
  height: 43%;
  border-radius: 99px;
  left: 50%;
  transform: translateX(-50%);
  transform-origin: 50% 88%;
  background: linear-gradient(var(--rose), var(--gold));
  position: absolute;
  bottom: 50%;
}

.nav svg, .panel-head svg, .service-card svg, .icon-btn svg { width: 20px; height: 20px; }
.brand .logo { position: static; border: 0; box-shadow: none; border-radius: 0; object-fit: contain; }
.primary, .ghost { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

.chat-box {
  min-height: 64vh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.messages {
  padding: 1rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.message {
  max-width: min(82%, 560px);
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.message.mine { align-self: flex-end; color: #fffaf0; background: var(--date); }
.message small { display: block; opacity: 0.74; margin-top: 0.3rem; }

.chat-form {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) auto;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--line);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(33, 25, 14, 0.5);
}

.modal {
  width: min(96vw, 520px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.modal-head, .modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.modal-body { display: grid; gap: 0.75rem; margin: 1rem 0; }

.empty {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

.mobile-only { display: none; }
#menuBtn { display: none; }

#main-content { display: none; }

.nav a {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-align: start;
  padding: 0.72rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.nav a.active {
  color: var(--ink);
  background: linear-gradient(135deg, rgba(181, 138, 56, 0.16), rgba(31, 111, 99, 0.09));
  box-shadow: inset 0 0 0 1px rgba(181, 138, 56, 0.22);
}

.nav a {
  color: rgba(251, 244, 232, 0.88);
}

.nav a.active {
  color: #174f3e;
  background: #f5efe3;
  box-shadow: 0 14px 28px rgba(7, 30, 23, 0.16);
}
