/* =====================================================================
   Portal Tim - halaman yang dipakai manajer tim untuk mengelola datanya
   (melengkapi style.css, ikut tema gelap/terang)
   ===================================================================== */

body.team-portal { display: block; }

/* ------------------------------------------------------------- HEADER */
.tp-bar {
  background: var(--nav-bg); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 60;
}
.tp-bar-inner { display: flex; align-items: center; gap: 18px; min-height: 68px; padding: 10px 0; flex-wrap: wrap; }
.tp-bar .brand img { height: 38px; }
.tp-bar .brand-text strong { font-size: .92rem; letter-spacing: 1.4px; }
.tp-bar .brand-text span { font-size: .62rem; }

.tp-team {
  display: flex; align-items: center; gap: 11px;
  padding: 7px 14px 7px 8px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.tp-team-info { min-width: 0; line-height: 1.3; }
.tp-team-info strong { display: block; font-size: .9rem; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-team-info span { display: flex; align-items: center; gap: 4px; font-size: .74rem; color: var(--text-muted); }

@media (max-width: 720px) {
  .tp-team { order: 3; width: 100%; justify-content: flex-start; }
  .hide-sm { display: none; }
}

/* ---------------------------------------------------------------- NAV */
.tp-nav {
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 68px; z-index: 55;
}
.tp-nav-inner { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tp-nav-inner::-webkit-scrollbar { display: none; }
.tp-nav a {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 14px 16px; color: var(--text-muted); font-size: .9rem; font-weight: 500;
  border-bottom: 2px solid transparent; transition: var(--dur) var(--ease);
}
.tp-nav a:hover { color: var(--text); background: var(--shine); }
.tp-nav a.active { color: var(--accent); border-bottom-color: var(--brand-gold); font-weight: 600; }
.tp-nav .tp-nav-out { margin-left: auto; color: var(--text-dim); }
.tp-nav .tp-nav-out.is-off { opacity: .6; cursor: default; }
@media (max-width: 720px) {
  .tp-nav { top: auto; position: static; }
  .tp-nav a { padding: 13px 13px; font-size: .86rem; }
  .tp-nav .tp-nav-out { margin-left: 0; }
}

.tp-main { padding: 28px 0 56px; min-height: 60vh; }
.tp-foot { border-top: 1px solid var(--line); padding: 20px 0; background: var(--bg-2); }

/* ------------------------------------------------------ KELENGKAPAN */
.tp-progress {
  background: linear-gradient(150deg, var(--accent-soft), var(--surface) 60%);
  border: 1px solid var(--accent-line); border-radius: var(--radius); padding: 22px 24px;
}
.tp-ring { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.tp-ring svg { flex-shrink: 0; transform: rotate(-90deg); }
.tp-ring .track { stroke: var(--line-2); }
.tp-ring .bar {
  stroke: url(#tpGrad); stroke-linecap: round;
  transition: stroke-dashoffset 1.1s var(--ease-out);
}
.tp-ring .pct {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; color: var(--accent);
}
.tp-ring-wrap { position: relative; display: inline-grid; place-items: center; }

.tp-check { display: grid; gap: 7px; }
.tp-check li {
  display: flex; align-items: center; gap: 10px; font-size: .89rem;
  padding: 7px 12px; border-radius: var(--radius-xs); background: var(--surface-2);
}
.tp-check li.done { color: var(--text-muted); }
.tp-check li.done .tick { color: var(--ok); }
.tp-check li .tick { color: var(--text-dim); flex-shrink: 0; }
.tp-check li.todo { border-left: 2px solid var(--brand-gold); }

/* -------------------------------------------------- FORM BARIS PEMAIN */
.pl-row {
  display: grid; grid-template-columns: 62px minmax(0,1.2fr) minmax(0,1fr) minmax(0,.9fr) minmax(0,.8fr) auto auto;
  gap: 10px; align-items: center; padding: 11px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px;
  background: var(--surface); transition: border-color var(--dur);
}
.pl-row:focus-within { border-color: var(--accent-line); }
.pl-row > * { min-width: 0; }
.pl-row.sub { border-color: var(--line-2); background: transparent; }
.pl-thumb {
  position: relative; width: 62px; height: 62px; border-radius: 11px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; cursor: pointer;
  transition: border-color var(--dur), box-shadow var(--dur);
}
.pl-thumb:hover { border-color: var(--accent-line); }
.pl-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pl-thumb .ph { color: var(--text-dim); }
.pl-thumb input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 3; }
.pl-thumb .hint-cam {
  position: absolute; inset: auto 0 0 0; padding: 12px 2px 3px; text-align: center;
  background: linear-gradient(to top, rgba(0,0,0,.75), transparent); color: #fff; z-index: 2;
}
.pl-thumb.just-changed { box-shadow: 0 0 0 2px var(--ok); }
.pl-row input, .pl-row select { padding: 9px 11px !important; font-size: .87rem !important; }
.pl-num {
  position: absolute; top: 3px; left: 4px; font-size: .62rem; font-weight: 700;
  background: rgba(0,0,0,.5); color: #fff; padding: 0 5px; border-radius: 4px; z-index: 2;
}
@media (max-width: 1050px) {
  .pl-row { grid-template-columns: 62px minmax(0,1fr) minmax(0,1fr) auto auto; }
  .pl-thumb { grid-row: span 2; }
}
@media (max-width: 640px) {
  .pl-row { grid-template-columns: 62px minmax(0,1fr) auto; }
  .pl-thumb { grid-row: span 4; }
}

/* -------------------------------------------------------- HALAMAN MASUK */
.tp-auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: 
    linear-gradient(180deg, rgba(7, 12, 24, 0.82) 0%, rgba(7, 12, 24, 0.95) 100%),
    radial-gradient(circle at 50% 30%, rgba(245, 196, 81, 0.15) 0%, transparent 60%),
    url('../img/mlbb-heroes-bg.jpg') center center / cover no-repeat fixed;
  position: relative;
}
.tp-auth-card {
  width: min(470px, 100%);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(245, 196, 81, 0.28);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 35px rgba(245, 196, 81, 0.08);
  border-radius: 20px;
  padding: 32px 26px;
}
.tp-auth-head {
  text-align: center;
  margin-bottom: 22px;
}
.tp-auth-head img {
  width: 120px;
  height: 120px;
  max-width: 130px;
  object-fit: contain;
  margin: 0 auto 12px;
  filter: drop-shadow(0 10px 24px rgba(245, 196, 81, 0.4));
  transition: transform 0.3s ease;
}
.tp-auth-head img:hover {
  transform: scale(1.05);
}
.tp-auth-head h1 {
  font-size: 1.55rem;
  margin: 0 0 5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}
.tp-auth-head p {
  color: var(--text-muted);
  margin: 0;
  font-size: .92rem;
}
.tp-auth-card .card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}
.tp-auth-card .card-body {
  padding: 0;
}
@media (max-width: 600px) {
  .tp-auth-head img {
    width: 110px;
    height: 110px;
    margin-bottom: 10px;
  }
  .tp-auth-card {
    padding: 26px 18px;
    border-radius: 16px;
  }
}
.tp-auth-switch {
  text-align: center;
  margin-top: 18px;
  font-size: .88rem;
  color: var(--text-muted);
}
.code-input {
  text-transform: uppercase; letter-spacing: 3px; font-family: var(--font-mono);
  font-size: 1.02rem !important; text-align: center;
}

/* langkah aktivasi */
.step-dots { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 20px; }
.step-dots span {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: .76rem; font-weight: 700; font-family: var(--font-head);
  background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--line);
}
.step-dots span.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.step-dots i { width: 22px; height: 1px; background: var(--line-2); }

/* ---------------------------------------------- BILAH SIMPAN MELAYANG */
.save-bar {
  position: sticky; bottom: 14px; z-index: 40; margin-top: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 13px 18px; border-radius: var(--radius);
  background: var(--surface-3); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg);
}
.save-bar .hint-dirty { font-size: .85rem; color: var(--text-muted); display: none; align-items: center; gap: 7px; }
.save-bar.show .hint-dirty { display: flex; }
.save-bar.show { border-color: var(--accent-line); }

/* ------------------------------------------------------------- LAINNYA */
.tp-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.tp-stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 15px 17px; display: flex; align-items: center; gap: 13px;
}
.tp-stat .n { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; line-height: 1; }
.tp-stat .l { font-size: .72rem; text-transform: uppercase; letter-spacing: 1.1px; color: var(--text-muted); margin-top: 3px; }

.tip-box {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--accent-2-soft); border: 1px solid var(--accent-2-line);
  font-size: .88rem; color: var(--text); line-height: 1.6;
}
.tip-box .ic { color: var(--accent-2); flex-shrink: 0; margin-top: 2px; }

/* ------------------------------------------------- UNGGAH LOGO TIM */
.logo-drop {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 18px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--surface-2); transition: border-color var(--dur), background var(--dur);
}
.logo-drop:hover, .logo-drop:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.logo-drop .lp {
  position: relative; width: 104px; height: 104px; border-radius: 20px; flex-shrink: 0;
  background: var(--surface-3); border: 1px solid var(--line); display: grid; place-items: center;
  overflow: hidden; cursor: pointer;
}
.logo-drop .lp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.logo-drop .lp .ph { color: var(--text-dim); font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; }
.logo-drop .lp input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 3; }
.logo-drop .lp .hint-cam {
  position: absolute; inset: auto 0 0 0; padding: 20px 4px 6px; text-align: center;
  background: linear-gradient(to top, rgba(0,0,0,.78), transparent); color: #fff; font-size: .7rem; z-index: 2;
}
.logo-drop .lp.just-changed { box-shadow: 0 0 0 2px var(--ok); }
.logo-drop .lt { min-width: 0; flex: 1 1 220px; }
.logo-drop .lt strong { display: block; margin-bottom: 4px; }
.logo-drop .lt p { margin: 0; font-size: .84rem; color: var(--text-muted); line-height: 1.6; }

/* ------------------------------------------------- RINGKASAN PERTANDINGAN */
.tp-vs {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px;
  padding: 18px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line);
}
.tp-vs .side { display: flex; align-items: center; gap: 11px; min-width: 0; }
.tp-vs .side.right { flex-direction: row-reverse; text-align: right; }
.tp-vs .side strong { font-size: .96rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-vs .side.me strong { color: var(--accent); }
.tp-vs .mid { text-align: center; }
.tp-vs .sc { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; letter-spacing: 1px; }
.tp-vs .sc.win { color: var(--ok); }
.tp-vs .sc.lose { color: var(--bad); }
@media (max-width: 560px) {
  .tp-vs { grid-template-columns: 1fr; text-align: center; }
  .tp-vs .side, .tp-vs .side.right { flex-direction: column; text-align: center; }
}

.tp-sub {
  display: flex; align-items: center; gap: 9px; margin: 0 0 12px;
  font-size: 1.05rem; font-family: var(--font-head); letter-spacing: .4px; text-transform: uppercase;
}
.tp-sub .ic { color: var(--accent); }

/* ------------------------------------------------------ KARTU AKSI CEPAT */
.tp-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.tp-quick a {
  display: flex; align-items: center; gap: 13px; padding: 15px 17px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: var(--dur) var(--ease); color: var(--text);
}
.tp-quick a:hover { border-color: var(--accent-line); transform: translateY(-2px); box-shadow: var(--shadow); }
.tp-quick a strong { display: block; font-size: .92rem; }
.tp-quick a span { font-size: .78rem; color: var(--text-muted); }
.tp-quick a .go { margin-left: auto; color: var(--text-dim); flex-shrink: 0; }
