/* ==========================================================================
   Sure Soccer Tip — User Panel theme (no frameworks)
   Palette matches the public site: navy #0a1730 / panel #16294d / blue #1c6ef2
   ========================================================================== */

* { box-sizing: border-box; }

body.panel, body.auth {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #0a1730;
  color: #dbe4f5;
  min-height: 100vh;
}

a { color: #4d8ff7; text-decoration: none; }
a:hover { color: #7eaefb; }

/* ---------- Layout ---------- */
.panel-layout { display: flex; min-height: 100vh; }

.panel-side {
  width: 240px;
  flex: 0 0 240px;
  background: #0d1f42;
  border-right: 1px solid #1c2f52;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.panel-brand { display: block; padding: 20px 22px 14px; }
.panel-brand img { max-width: 170px; width: 100%; height: auto; }

.panel-userchip {
  margin: 0 16px 14px;
  padding: 12px 14px;
  background: #16294d;
  border: 1px solid #1c2f52;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.panel-userchip-name { font-weight: 600; font-size: 14px; color: #fff; }
.panel-points {
  display: inline-block;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.45);
  color: #4ade80;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  width: fit-content;
}

.panel-nav { display: flex; flex-direction: column; padding: 4px 12px 20px; gap: 2px; }
.panel-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  color: #a8b8d8;
  font-size: 14px;
  font-weight: 500;
}
.panel-nav-link:hover { background: rgba(28, 110, 242, 0.12); color: #fff; }
.panel-nav-link.active {
  background: linear-gradient(90deg, rgba(28, 110, 242, 0.30), rgba(28, 110, 242, 0.08));
  color: #fff;
  border-right: 3px solid #1c6ef2;
}
.panel-nav-logout { color: #f0889a; margin-top: 8px; }
.panel-nav-logout:hover { background: rgba(230, 57, 70, 0.12); color: #ffb3bb; }

.panel-badge {
  background: #e63946;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.panel-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.panel-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  background: #0d1f42;
  border-bottom: 1px solid #1c2f52;
  position: sticky;
  top: 0;
  z-index: 50;
}
.panel-topbar-title { font-weight: 600; color: #fff; font-size: 15px; }
.panel-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.panel-topbar-logout { color: #f0889a; font-size: 13px; font-weight: 600; }
.panel-topbar-logout:hover { color: #ffb3bb; }
.panel-burger {
  display: none;
  background: none;
  border: 1px solid #1c2f52;
  color: #dbe4f5;
  border-radius: 8px;
  font-size: 18px;
  padding: 4px 10px;
  cursor: pointer;
}

.panel-content { flex: 1; padding: 26px 28px; }
.panel-footer {
  padding: 16px 28px;
  color: #51678f;
  font-size: 12px;
  border-top: 1px solid #16294d;
}

.panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 10, 24, 0.6);
  z-index: 90;
}
.panel-overlay.show { display: block; }
body.panel-locked { overflow: hidden; }

/* ---------- Cards & grids ---------- */
.card {
  background: #142343;
  border: 1px solid #1c2f52;
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 22px;
}
.card-title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}
.card-sub { margin: 0 0 18px; color: #7f93bd; font-size: 13px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.stat {
  background: #142343;
  border: 1px solid #1c2f52;
  border-radius: 12px;
  padding: 18px;
}
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: #7f93bd; }
.stat-value { font-size: 26px; font-weight: 800; color: #fff; margin-top: 6px; }
.stat-value.accent { color: #4ade80; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #7f93bd;
  padding: 10px 12px;
  border-bottom: 2px solid #1c2f52;
  white-space: nowrap;
}
table.tbl td {
  padding: 12px;
  border-bottom: 1px solid #1a2c50;
  color: #c6d3ec;
  vertical-align: middle;
}
table.tbl tr:hover td { background: rgba(28, 110, 242, 0.06); }

/* ---------- Badges & chips ---------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-success { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.4); }
.badge-danger  { background: rgba(230, 57, 70, 0.15); color: #ff8f9d; border: 1px solid rgba(230, 57, 70, 0.4); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-info    { background: rgba(28, 110, 242, 0.15); color: #6ea6ff; border: 1px solid rgba(28, 110, 242, 0.4); }
.badge-premium { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }

/* ---------- Forms ---------- */
label.f-label { display: block; font-size: 13px; font-weight: 600; color: #a8b8d8; margin: 0 0 6px; }
.f-input, select.f-input, textarea.f-input {
  width: 100%;
  background: #0d1b38;
  border: 1.5px solid #24406e;
  border-radius: 8px;
  color: #fff;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
}
.f-input:focus { outline: none; border-color: #1c6ef2; box-shadow: 0 0 0 3px rgba(28, 110, 242, 0.22); }
.f-input::placeholder { color: #51678f; }
select.f-input option { background: #0d1b38; color: #fff; }
textarea.f-input { resize: vertical; }
.f-group { margin-bottom: 16px; }

.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: filter 0.15s ease;
  font-family: inherit;
}
.btn:hover { filter: brightness(1.12); }
.btn-primary { background: linear-gradient(90deg, #1c6ef2, #3a83f5); color: #fff; }
.btn-success { background: linear-gradient(90deg, #16a34a, #22c55e); color: #fff; }
.btn-danger  { background: #e63946; color: #fff; }
.btn-ghost   { background: transparent; border: 1.5px solid #24406e; color: #a8b8d8; }
.btn-ghost:hover { border-color: #1c6ef2; color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ---------- Alerts ---------- */
.alert {
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.alert-success { background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.45); color: #86efac; }
.alert-error, .alert-danger { background: rgba(230, 57, 70, 0.12); border-color: rgba(230, 57, 70, 0.45); color: #ffb3bb; }
.alert-info { background: rgba(28, 110, 242, 0.12); border-color: rgba(28, 110, 242, 0.45); color: #9cc2ff; }

/* ---------- Auth pages ---------- */
body.auth {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(1200px 600px at 80% -10%, #16294d 0%, #0a1730 55%) fixed;
  padding: 20px;
}
.auth-wrap { width: 100%; max-width: 430px; }
.auth-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  padding: 36px 32px;
  backdrop-filter: blur(6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.auth-brand { display: block; text-align: center; margin-bottom: 18px; }
.auth-brand img { max-width: 220px; width: 100%; height: auto; }
.auth-card h2 { color: #fff; font-size: 18px; font-weight: 600; text-align: center; margin: 0 0 4px; }
.auth-card .auth-sub { color: #7f93bd; text-align: center; font-size: 13px; margin: 0 0 22px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 16px; font-size: 13px; }
.auth-foot { text-align: center; color: #51678f; font-size: 12px; margin-top: 22px; }

/* ---------- Prediction cards ---------- */
.pred-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.pred-card {
  background: #142343;
  border: 1px solid #1c2f52;
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pred-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pred-league { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #7f93bd; min-width: 0; }
.pred-league span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pred-teams { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pred-team { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 40%; text-align: center; }
.pred-team img { width: 38px; height: 38px; object-fit: contain; }
.pred-team .tname { font-weight: 600; font-size: 13px; color: #fff; }
.pred-vs { color: #51678f; font-weight: 700; font-size: 13px; }
.pred-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pred-pick { font-size: 14px; color: #c6d3ec; }
.pred-pick strong { color: #fff; }
.pred-conf { font-size: 12px; color: #7f93bd; }
.pred-odds { font-size: 12px; color: #7f93bd; }
.pred-date { font-size: 12px; color: #98a5c0; }

.form-box { display: flex; gap: 3px; justify-content: center; }
.form-box span {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; border-radius: 4px; color: #fff;
}
.form-box span.W { background: #22c55e; }
.form-box span.D { background: #64748b; }
.form-box span.L { background: #e63946; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 20px; }
.filters .f-group { margin-bottom: 0; min-width: 140px; flex: 1; }
.filters .f-group.grow-0 { flex: 0 0 auto; }

/* ---------- Pagination ---------- */
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 22px; list-style: none; padding: 0; }
.pager a, .pager span {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid #1c2f52;
  color: #a8b8d8;
  font-size: 13px;
  font-weight: 600;
}
.pager a:hover { border-color: #1c6ef2; color: #fff; }
.pager .current { background: #1c6ef2; border-color: #1c6ef2; color: #fff; }
.pager .disabled { opacity: 0.4; }

/* ---------- Chat ---------- */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 190px); min-height: 420px; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 6px 4px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { max-width: 72%; }
.chat-msg .bubble {
  padding: 10px 14px;
  border-radius: 12px;
  background: #1a2c50;
  color: #dbe4f5;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-msg.mine { align-self: flex-end; text-align: right; }
.chat-msg.mine .bubble { background: linear-gradient(90deg, #1c6ef2, #3a83f5); color: #fff; }
.chat-msg .meta { font-size: 11px; color: #51678f; margin-top: 4px; }
.chat-form { display: flex; gap: 10px; margin-top: 14px; }
.chat-form textarea { flex: 1; }
.chat-form .btn { align-self: flex-end; }

/* ---------- Paywall ---------- */
.paywall {
  text-align: center;
  padding: 44px 24px;
  background: linear-gradient(160deg, #16294d, #142343);
  border: 1px solid #2a3f6b;
  border-radius: 14px;
}
.paywall h3 { color: #fff; margin: 0 0 8px; font-size: 20px; }
.paywall p { color: #a8b8d8; font-size: 14px; max-width: 420px; margin: 0 auto 20px; }
.paywall .price { font-size: 30px; font-weight: 800; color: #fbbf24; margin-bottom: 20px; }
.paywall .price small { font-size: 14px; color: #7f93bd; font-weight: 500; }

/* ---------- Packages ---------- */
.pkg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pkg {
  background: #142343;
  border: 1px solid #1c2f52;
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.pkg:hover { transform: translateY(-4px); border-color: #1c6ef2; }
.pkg-name { font-weight: 700; color: #fff; font-size: 15px; }
.pkg-points { font-size: 30px; font-weight: 800; color: #4ade80; }
.pkg-price { color: #a8b8d8; font-size: 14px; }

/* ---------- Radio cards (payment methods) ---------- */
.pay-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pay-method { position: relative; }
.pay-method input { position: absolute; opacity: 0; pointer-events: none; }
.pay-method label {
  display: block;
  border: 1.5px solid #24406e;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #a8b8d8;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pay-method input:checked + label {
  border-color: #1c6ef2;
  background: rgba(28, 110, 242, 0.12);
  color: #fff;
}
.pay-method small { display: block; font-weight: 400; color: #7f93bd; margin-top: 3px; }

/* ---------- Misc ---------- */
.muted { color: #7f93bd; }
.small { font-size: 12px; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.divider { border: none; border-top: 1px solid #1c2f52; margin: 20px 0; }

.avatar-preview {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 3px solid #1c2f52; background: #0d1b38;
}

.empty-state { text-align: center; color: #7f93bd; padding: 40px 16px; font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .panel-side {
    position: fixed;
    left: -260px;
    z-index: 100;
    transition: left 0.25s ease;
  }
  .panel-side.open { left: 0; }
  .panel-burger { display: inline-block; }
  .pred-grid, .pkg-grid, .pay-methods { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .panel-content { padding: 18px 16px; }
  .chat-msg { max-width: 85%; }
}

/* ---------- Manual payment detail box (checkout) ---------- */
.pay-detail-box {
  background: #0d1b38;
  border: 1px solid #1e3a6e;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.pay-detail-box > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed #1a3055;
  font-size: 13px;
}
.pay-detail-box > div:last-child { border-bottom: none; }
.pay-detail-box span { color: #7f93bd; }
.pay-detail-box strong { color: #e6edff; font-weight: 700; }
