/* =====================================
   GLOBAL INHERIT
===================================== */

:root {
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --transition: .25s ease;
}

/* =====================================
   UPCOMING HERO – GLOSSY GRADIENT VERSION
===================================== */
.my-upcoming-wrapper {
  padding: 16px;
  overflow: hidden;
}

.my-upcoming-glass {
  position: relative;
  padding: 24px;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  overflow: hidden;
}

/* ===== GLOSSY OVERLAY EFFECT ===== */
.my-upcoming-glass::before{
  content:"";
  position:absolute;
  top:-40%;
  left:-20%;
  width:140%;
  height:120%;

  background: linear-gradient(
    120deg,
    rgba(255,255,255,.45),
    rgba(255,255,255,.08),
    transparent 60%
  );

  transform: rotate(12deg);
  pointer-events:none;
  opacity:.6;
}

/* ===== LIGHT MODE ===== */
body.light .my-upcoming-glass {

  background: linear-gradient(
    135deg,
    #fbd6d6 0%,
    #e5a9a9 40%,
    #d99696 100%
  );

  box-shadow:
    0 20px 50px rgba(0,0,0,.15),
    inset 0 1px 0 rgba(255,255,255,.6);
}

/* ===== DARK MODE ===== */
body.dark .my-upcoming-glass{

  background: linear-gradient(
    135deg,
    #1f2a22 0%,
    #24352b 50%,
    #1b241e 100%
  );

  border: 1px solid rgba(255,255,255,.05);

  box-shadow:
    0 25px 60px rgba(0,0,0,.7),
    inset 0 1px 0 rgba(255,255,255,.05);
}

/* ===== TITLE ===== */
.my-upcoming-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

/* =====================================
   HORIZONTAL SCROLL AREA
===================================== */

.my-upcoming-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;

  scroll-behavior: smooth;
}

/* Hide scrollbar (webkit) */
.my-upcoming-scroll::-webkit-scrollbar {
  height: 6px;
}

.my-upcoming-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.35);
  border-radius: 999px;
}

.my-upcoming-scroll::-webkit-scrollbar-track {
  background: transparent;
}

/* =====================================
   MINI SESSION CARD
===================================== */

.mini-session-card {
  flex: 0 0 auto;
  min-width: 190px;

  padding: 16px;
  border-radius: var(--radius-md);

  font-size: 13px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  transition: .25s ease;
}

/* LIGHT */
body.light .mini-session-card {
  background: rgba(255,255,255,.8);
  box-shadow: 0 8px 20px rgba(0,0,0,.1);
}

/* DARK */
body.dark .mini-session-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.06);
}

/* Hover lift */
.mini-session-card:hover{
  transform: translateY(-4px);
}

/* EMPTY STATE */
.mini-session-empty {
  opacity: .75;
  font-size: 14px;
}

/* =====================================
   CALENDAR
===================================== */

.month-wrapper {
  padding: 20px 16px;
  animation-duration: .3s;
}

.month-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.month-header {
  font-size: 20px;
  font-weight: 600;
}

/* Month Navigation Button */

.month-header-row button {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  font-size: 18px;
  cursor: pointer;
  transition: .2s ease;
}

.month-header-row button:hover {
  transform: translateY(-2px);
}

body.light .month-header-row button {
  background: #ffffff;
  color: #2E5D3A;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

body.dark .month-header-row button {
  background: rgba(255,255,255,.08);
  color: #E3C565;
  border: 1px solid rgba(255,255,255,.1);
}
/* Week Labels */

.week-labels {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  margin-bottom: 10px;
  font-size: 13px;
  text-align: center;
  opacity: .7;
}

.week-labels .weekend {
  color: #10b981;
}

/* ===============================
   CALENDAR GRID (FIX MOBILE SHIFT)
================================= */

.month-wrapper{
  width:100%;
  max-width:100%;
  overflow-x:hidden; /* 🔥 stop geser kanan */
}

.month-grid{
  display:grid;
  grid-template-columns: repeat(7,1fr);
  gap:8px;

  width:100%;
  max-width:100%;
  box-sizing:border-box;
}

.month-day{
  position:relative;
  aspect-ratio:1/1;

  display:flex;
  align-items:center;
  justify-content:center;

  min-width:0; /* 🔥 penting fix overflow */

  background:transparent !important;
  border:none !important;
  border-radius:0 !important;

  cursor:pointer;
  font-size:14px;
  transition: all .2s ease;
}

.month-day:hover{
  transform: translateY(-2px);
}

.month-day.weekend{
  color:#10b981;
}

.month-day.empty{
  background:transparent;
  cursor:default;
}

/* ===============================
   SLIDE ANIMATION
================================= */

.slide-next{ animation: slideRight .3s ease; }
.slide-prev{ animation: slideLeft .3s ease; }

@keyframes slideRight{
  from{ opacity:0; transform:translateX(40px); }
  to{ opacity:1; transform:translateX(0); }
}

@keyframes slideLeft{
  from{ opacity:0; transform:translateX(-40px); }
  to{ opacity:1; transform:translateX(0); }
}

/* subtle pulse */
@keyframes ringPulse{
  0% { box-shadow: 0 0 0 rgba(227,197,101,0); }
  50% { box-shadow: 0 0 12px rgba(227,197,101,.45); }
  100% { box-shadow: 0 0 0 rgba(227,197,101,0); }
}

/* ===============================
   POPUP (MOBILE + IPHONE SAFE)
================================= */

.popup-overlay{
  position:fixed;
  inset:0;

  display:flex;
  align-items:center;
  justify-content:center;

  padding:16px; /* 🔥 biar gak mepet layar */

  z-index:999;
  backdrop-filter:blur(6px);
}

.popup-card{
  width:100%;
  max-width:420px;

  max-height:85vh;
  overflow-y:auto;

  padding:20px;
  border-radius:20px;

  box-shadow:0 20px 50px rgba(0,0,0,.2);

  -webkit-overflow-scrolling: touch;
}

/* ===============================
   LIGHT MODE
================================= */

body.light .popup-overlay{
  background: rgba(242,232,213,.85);
}

body.light .popup-card{
  background:#ffffff;
  color:#2E5D3A;
}

/* ===============================
   DARK MODE (FIX BERANTAKAN)
================================= */

body.dark .popup-overlay{
  background: rgba(0,0,0,.6);
}

body.dark .popup-card{
  background:#121212;
  color:#F2E8D5;
}

/* ===============================
   SESSION CARD
================================= */

.popup-session-card{
  padding:14px;
  border-radius:16px;
  margin-bottom:12px;
  font-size:14px;
}

body.dark .popup-session-card{
  background: rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.08);
}

.popup-card h3{
  margin-bottom:16px;
  font-size:18px;
  font-weight:700;
}

/* ===============================
   EMPTY STATE
================================= */

body.light .empty-session{
  color:#2E5D3A;
}

body.dark .empty-session{
  color:#F2E8D5;
}

/* ===============================
   CLOSE BUTTON (FIX TOTAL)
================================= */

#closePopup{
  width:100%;
  margin-top:16px;

  padding:14px;
  border:none;
  border-radius:16px;

  font-weight:600;
  font-size:14px;

  cursor:pointer;
  transition:all .2s ease;

  position:sticky;
  bottom:0;
}

/* light */
body.light #closePopup{
  background: linear-gradient(135deg,#e5e5e5,#d4d4d4);
  color:#111;
}

/* dark */
body.dark #closePopup{
  background: linear-gradient(135deg,#2a2a2a,#1a1a1a);
  color:#fff;
}

#closePopup:active{
  transform: scale(0.96);
}

/* ===============================
   META TEXT
================================= */

.session-meta strong{
  color:#10b981;
}

body.dark .session-meta strong{
  color:#E3C565;
}


/* =====================================
   2. JOIN BUTTON SESI
===================================== */

.join-btn{
  margin-top: 16px;
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: .2s ease;
}

body.light .join-btn{
  background: linear-gradient(135deg,#ff4db8,#ff0080);
  color: white;
  box-shadow: 0 8px 20px rgba(255,0,128,.25);
}

body.dark .join-btn{
  background: linear-gradient(135deg,#E3C565,#caa73f);
  color: #1f1f1f;
  box-shadow: 0 8px 25px rgba(227,197,101,.35);
}

.join-btn:hover{
  transform: translateY(-2px);
  opacity: .95;
}

.join-btn:active{
  transform: scale(.98);
}
.join-btn.session-finished,
.join-btn:disabled{
  background: #9ca3af !important;
  color: #ffffff !important;
  cursor: not-allowed;
  box-shadow: none !important;
  opacity: .8;
}
/* =====================================
   1. PAGE CREATE SESSION – CLEAN MODAL FIXED
===================================== */

#createSessionSheet {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
}

#createSessionSheet.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Overlay */
#createSessionOverlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
}

/* Modal Card */
.premium-sheet {
  position: relative;

  width: 92%;
  max-width: 480px;

  height: 75vh;          /* 🔥 fix tinggi 75% layar */
  max-height: 75vh;      /* safety */

  overflow-y: auto;      /* scroll internal */

  border-radius: 28px;
  padding: 30px 24px 36px;

  z-index: 9999;

  -webkit-overflow-scrolling: touch;
}

/* Light */
body.light .premium-sheet {
  background: var(--color-card);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: 0 25px 70px rgba(0,0,0,.15);
}

/* Dark */
body.light .premium-sheet {
  background: var(--color-card);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: 0 25px 70px rgba(0,0,0,.15);
}

/* Title */
.premium-sheet h2 {
  text-align: center;
  margin-bottom: 26px;
  font-size: 20px;
  font-weight: 700;
}

/* =====================================
   CREATE SESSION – DOVE BOTTOM SHEET STYLE
===================================== */

#createSessionSheet {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
}

#createSessionSheet.active {
  display: block;
}

/* Overlay */
#createSessionOverlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
}

/* ===== BOTTOM SHEET ===== */
.premium-sheet {

  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  background: var(--color-card);
  color: var(--color-text);

  border-radius: 28px 28px 0 0;

  padding: 24px 20px calc(40px + env(safe-area-inset-bottom));

  max-height: 90vh;
  overflow-y: auto;

  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.22,1,.36,1);

  box-shadow: 0 -12px 30px rgba(0,0,0,.12);

  z-index: 9999;

  -webkit-overflow-scrolling: touch;
}

/* ACTIVE STATE */
#createSessionSheet.active .premium-sheet {
  transform: translateY(0);
}

/* ===== HANDLE BAR ===== */
.sheet-handle{
  width:40px;
  height:5px;
  border-radius:999px;
  background:var(--color-border);
  margin:0 auto 18px;
}

/* ===== TITLE ===== */
.premium-sheet h2 {
  text-align: center;
  margin-bottom: 24px;
  font-size: 20px;
  font-weight: 700;
}

/* =====================================
   SHEET SECTION – CLEAN CARD STYLE
===================================== */

.sheet-section {
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 18px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}

/* LABEL */
.sheet-section label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
  letter-spacing: .3px;
  color: var(--color-text-muted);
}

/* INPUTS */
.premium-sheet input,
.premium-sheet select,
.premium-sheet textarea {

  width: 100%;
  padding: 14px 16px;

  border-radius: 14px;
  border: 1px solid var(--color-border);

  font-size: 14px;
  background: var(--color-card);
  color: var(--color-text);

  outline: none;
  transition: .2s ease;
}

.premium-sheet input:focus,
.premium-sheet select:focus,
.premium-sheet textarea:focus {
  border-color: var(--color-highlight);
  box-shadow: 0 0 0 3px rgba(0,0,0,.05);
}

/* TIME ROW */
.time-row{
  display:flex;
  gap:12px;
}

/* SUBMIT BUTTON */
.btn-create-session {

  width: 100%;
  padding: 16px;

  border: none;
  border-radius: 18px;

  font-weight: 600;
  font-size: 15px;

  cursor: pointer;
  margin-top: 14px;

  background: var(--color-primary);
  color: #fff;

  transition: .2s ease;
}

.btn-create-session:hover {
  transform: translateY(-2px);
}

/* =====================================
   MEMBER AVATAR SECTION
===================================== */

.session-members {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}

.member-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 60px;
}

.member-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #eee;
}

.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;

  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg,#ff2f92,#ff6ec7);
}

.member-name {
  font-size: 11px;
  margin-top: 6px;
  text-align: center;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60px;
}

/* =====================================
   CREATE BUTTON WRAPPER (OUTSIDE MODAL)
===================================== */

.create-session-wrapper {
  padding: 20px;
  display: flex;
  justify-content: center;
}

.premium-create-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 14px 26px;
  border-radius: 999px;

  font-weight: 600;
  font-size: 15px;

  border: none;
  cursor: pointer;
  transition: .2s ease;
}

/* Light */
body.light .premium-create-btn {
  background: #ffffff;
  color: #2E5D3A;
  box-shadow: 0 8px 25px rgba(0,0,0,.1);
}

/* Dark */
body.dark .premium-create-btn {
  background: rgba(255,255,255,.08);
  color: #E3C565;
  border: 1px solid rgba(255,255,255,.1);
}

.premium-create-btn:hover {
  transform: translateY(-2px);
}


.session-admin-actions{
  margin-top:14px;
  display:flex;
  justify-content:flex-end;
}

/* =====================================
   CREATE BUTTON WRAPPER (OUTSIDE MODAL)
===================================== */
.edit-session-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;

  padding:8px 14px;
  border-radius:14px;

  font-size:13px;
  font-weight:600;

  border:none;
  cursor:pointer;
  transition:.2s ease;
}

/* LIGHT */
body.light .edit-session-btn{
  background: var(--color-primary);
  color: white;
  box-shadow: 0 6px 14px rgba(0,0,0,.1);
}

/* DARK */
body.dark .edit-session-btn{
  background: var(--color-highlight);
  color: #1f1f1f;
  box-shadow: 0 6px 14px rgba(0,0,0,.4);
}

.edit-session-btn:hover{
  transform: translateY(-2px);
}

/* =====================================
   COACH DROPDOWN
===================================== */

.coach-dropdown{
  position:relative;
}

.coach-dropdown-trigger{
  display:flex;
  justify-content:space-between;
  align-items:center;

  padding:14px 16px;
  border-radius:14px;

  background:var(--color-card);
  border:1px solid var(--color-border);

  cursor:pointer;
  font-size:14px;
}

.coach-arrow{
  font-size:14px;
  opacity:.6;
  transition:.2s ease;
}

.coach-dropdown.active .coach-arrow{
  transform:rotate(180deg);
}

.coach-dropdown-list{

  position:absolute;
  left:0;
  right:0;
  top:110%;

  max-height:220px;
  overflow-y:auto;

  background:var(--color-card);
  border:1px solid var(--color-border);
  border-radius:16px;

  box-shadow:0 10px 25px rgba(0,0,0,.1);

  padding:8px;
  display:none;

  z-index:20;
}

.coach-dropdown.active .coach-dropdown-list{
  display:block;
}

/* Coach Item */
.coach-item{
  padding:10px 12px;
  border-radius:12px;
  transition:.2s ease;
}

.coach-item:hover{
  background:var(--color-bg);
}

.coach-item label{
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
}

.coach-item input{
  width:18px;
  height:18px;
  flex-shrink:0;
}

.avatar-circle{
  width:40px;
  height:40px;
  border-radius:50%;
  background:var(--color-highlight);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:600;
}

/* =====================================
  Z. ALL ANIMATIONS
===================================== */
@keyframes modalFade {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Animation */
@keyframes modalFade {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* =====================================
  date calendar active session
===================================== */
.sport-filter-bar{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding:10px 10px 5px;
}

.sport-item{
  padding:6px 12px;
  border-radius:20px;
  background:rgba(255,255,255,0.05);
  font-size:12px;
  white-space:nowrap;
  cursor:pointer;
  transition:all .2s;
}

.sport-item.active{
  background:#00c896;
  color:#000;
  font-weight:600;
}

.sport-filter-bar::-webkit-scrollbar{
  display:none;
}

/* ===============================
   CALENDAR BASE (UNCHANGED)
================================= */

.month-day{
  position:relative;
  padding:6px 0 12px; /* atas kecil, bawah cukup buat dot */
  text-align:center;
}

/* 🔥 BALIK KE STYLE AWAL (ini yang bener) */
.day-number{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  width:28px;
  height:28px;
  border-radius:50%;

  font-size:13px;
  font-weight:600;
  margin:0 auto;

  border:none;          /* 🔥 reset semua dulu */
  box-shadow:none;      /* 🔥 matiin shadow lingkaran */
  outline:none;         /* 🔥 matiin outline */
}

/* 🔥 hanya yang ada session */
.day-number.active-day{
  border:2px solid #00c896;
}

.month-day *{
  box-shadow:none !important;
  outline:none !important;
}

/* 🔥 DOT DI LUAR LINGKARAN */
.day-dots{
  position:absolute;
  bottom:2px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  gap:3px;
}

/* DOT */
.day-dot{
  width:3px;
  height:3px;
  border-radius:50%;
}

/* WARNA */
.dot-tennis{ background:#22c55e; }
.dot-coffee{ background:#a16207; }
.dot-golf{ background:#c0c0c0; }
.dot-swim{ background:#38bdf8; }
.dot-pound{ background:#f97316; }
.dot-dance{ background:#a855f7; }
.dot-counselling{ background:#ffffff; border:1px solid #ccc; }
.dot-science{ background:#000000; }
.dot-run{ background:#7c3aed; }
.dot-badminton{ background:#111827; }

.dot-more{
  font-size:8px;
  opacity:0.6;
}


/* ===============================
   WA BUTTON
================================= */

.wa-contact-btn{
  margin-top:10px;
  width:100%;
  padding:10px;
  border:none;
  border-radius:10px;
  background:#25D366;
  color:#fff;
  font-weight:600;
  cursor:pointer;
  transition:all .2s;
}

.wa-contact-btn:hover{
  transform:scale(1.03);
}

/* ===============================
   ADMIN ACTION
================================= */

.session-admin-actions{
  display:flex;
  gap:10px;
  margin-top:10px;
}

.delete-session-btn{
  padding:8px 14px;
  border-radius:10px;
  border:1px solid #ff4d4f;
  font-size:13px;
  font-weight:600;
  cursor:pointer;

  background:transparent;
  color:#ff4d4f;

  transition:all .2s ease;
}

.delete-session-btn:hover{
  background:#ff4d4f;
  color:#fff;
}

.simple-slot .slot{
  width:44px;
  height:44px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
}

.simple-slot .avatar-initial{
  width:100%;
  height:100%;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:bold;
  font-size:16px;
  background:#ec4899; /* 🔥 pink sama kayak tennis */
  color:white;
}.simple-slot .empty .avatar-initial{
  background:#eee;
  color:#999;
}.simple-slot .filled .avatar-initial{
  background:linear-gradient(135deg,#ec4899,#f472b6);
}


/* ===============================
   RESET KHUSUS MATCH SYSTEM
================================= */
.matches-popup,
.matches-popup *{
  box-sizing:border-box;
  font-family: system-ui, sans-serif;
  color:#111;
  transition:none !important;
  animation:none !important;
}

/* ===============================
   CONTAINER
================================= */
.matches-popup{
  background:#f5e7e4;
  padding:16px;
  border-radius:18px;
}

/* ===============================
   TITLE
================================= */
.matches-title{
  text-align:center;
  font-size:20px;
  font-weight:700;
  margin-bottom:12px;
}

/* ===============================
   TAB (FIXED)
================================= */
.matches-tabs{
  display:flex;
  gap:8px;
  margin-bottom:14px;
}

.tab-btn{
  flex:1;
  padding:10px;
  border:none;
  border-radius:12px;
  background:#e5e7eb;
  font-weight:600;
  cursor:pointer;
}

.tab-btn.active{
  background:#22c55e;
  color:#fff;
}

/* CONTENT SWITCH */
.matches-tab-content{
  display:none;
}

.matches-tab-content.active{
  display:block;
}

/* ===============================
   BUTTONS
================================= */
#addMatchBtn{
  width:100%;
  padding:12px;
  border:none;
  border-radius:12px;
  background:#22c55e;
  color:#fff;
  font-weight:600;
  margin-bottom:12px;
}

.close-popup-btn{
  width:100%;
  margin-top:12px;
  padding:12px;
  border:none;
  border-radius:14px;
  background:#e5e7eb;
  font-weight:600;
}

/* ===============================
   MATCH CARD
================================= */
.match-card{
  background:#ffffff;
  border-radius:14px;
  padding:14px;
  margin-bottom:12px;
  box-shadow:0 2px 6px rgba(0,0,0,0.05);
}

/* HEADER */
.match-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px;
}

.match-title{
  font-weight:600;
  font-size:14px;
}

/* ACTION BUTTON */
.match-header button{
  border:none;
  border-radius:10px;
  width:34px;
  height:34px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size:14px;
}

/* EDIT */
.edit-btn{
  background:#e5e7eb;
}

/* EDIT ACTIVE */
.match-card.editing .edit-btn{
  background:#fde68a;
}

/* DELETE */
.delete-match-btn{
  background:#ef4444;
  color:#fff;
}

/* ===============================
   TEAM ROW (FIX ALIGN)
================================= */
.team-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

/* NAME AREA (🔥 LEBIH BESAR) */
.team-players{
  flex:3;
  font-size:14px;
  font-weight:500;
}

/* SELECT */
.team-players select{
  width:100%;
  padding:8px;
  border-radius:10px;
  border:none;
  background:#f3f4f6;
  font-size:13px;
}

/* ===============================
   SCORE (FIX — TIDAK MELEBAR)
================================= */
/* 🔥 SCORE AREA (30%) */
.score-box,
.score-input{
  flex:1;
  max-width:70px;
  height:60px;

  display:flex;
  align-items:center;
  justify-content:center;

  border-radius:14px;
  font-weight:700;
  font-size:22px;
}

/* VIEW */
.score-box{
  background:#e5e7eb;
}

/* INPUT */
.score-input{
  background:#dbeafe;
  border:none;
  text-align:center;
}

/* EDIT MODE */
.match-card .score-input{
  display:none;
}

.match-card.editing .score-box{
  display:none;
}

.match-card.editing .score-input{
  display:flex;
}

/* ===============================
   VS
================================= */
.vs{
  text-align:center;
  font-size:12px;
  color:#666;
  margin:4px 0;
}

/* ===============================
   SAVE / CANCEL
================================= */
.match-actions{
  display:none;
  margin-top:10px;
}

.match-card.editing .match-actions{
  display:flex;
  gap:8px;
}

.save-btn{
  flex:1;
  background:#22c55e;
  color:#fff;
  border:none;
  border-radius:10px;
  padding:10px;
  font-weight:600;
}

.cancel-btn{
  flex:1;
  background:#e5e7eb;
  border:none;
  border-radius:10px;
}

/* ===============================
   RANKING (FIX TOTAL)
================================= */
.m-ranking-group{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px;
  border-radius:14px;
  margin-bottom:10px;
  background:#fff;
}

/* LEFT */
.m-rank-left{
  flex:2;
}

.m-rank-title{
  font-weight:700;
  font-size:16px;
}

.m-rank-names{
  font-size:14px;
  font-weight:600;
}

/* CENTER */
.m-rank-center{
  flex:1;
  text-align:center;
  font-weight:700;
}

/* RIGHT */
.m-rank-right{
  flex:1;
  text-align:right;
  font-size:13px;
  font-weight:600;
}


.m-rank-default{
  background:#fff;
}

/* DIFF COLOR */
.m-diff-pos{
  color:#2563eb;
}

.m-diff-neg{
  color:#dc2626;
}

/* ===============================
   RANKING SYSTEM (M PREFIX SAFE)
================================= */
.m-ranking-card{
  display:flex;
  align-items:center;
  justify-content:space-between;

  background:#fff;
  padding:14px;
  border-radius:16px;
  margin-bottom:12px;
}

/* BADGE */
.m-rank-badge{
  font-weight:700;
  width:40px;
}

/* NAMES */
.m-rank-names{
  flex:2;
  font-weight:600;
  font-size:14px;
}

/* CHAMPION */
.m-champion{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  font-weight:700;
}

/* STATS */
.m-rank-stats{
  display:flex;
  gap:12px;
}

.m-stat{
  text-align:right;
}

.m-stat-value{
  font-size:16px;
  font-weight:700;
}

.m-stat-label{
  font-size:11px;
  color:#666;
}

/* DIFF */
.m-pos{
  color:#1d4ed8;
  font-weight:800;
  text-shadow:0 1px 0 rgba(0,0,0,0.05);
}

.m-neg{
  color:#dc2626;
  font-weight:800;
  text-shadow:0 1px 0 rgba(0,0,0,0.05);
}
.m-stat-value.m-pos,
.m-stat-value.m-neg{
  font-size:17px;
}
/* ===============================
   TOP RANK COLOR
================================= */
.m-rank-1{
  background:linear-gradient(135deg,#facc15,#fde68a);
}

.m-rank-2{
  background:#e5e7eb;
}

.m-rank-3{
  background:#e5e7eb;
}


.popup-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.4);

  display:flex;
  justify-content:center;
  align-items:center;

  z-index:9999;
}

.popup-card{
  width:100%;
  max-width:420px;
  max-height:90vh;

  overflow-y:auto;

  border-radius:20px;
}

.matches-entry{
  display:flex;
  justify-content:space-between;
  align-items:center;

  margin-top:10px; /* 🔥 ini penting */
  padding:10px 12px;
  border-radius:12px;

  cursor:pointer;
  background:rgba(255,255,255,0.05);

  backdrop-filter:blur(6px);

  position:relative;
  z-index:1;
}

/* HOVER */
.matches-entry:hover{
  background:rgba(255,255,255,0.1);
}

/* CLICK */
.matches-entry:active{
  transform:scale(0.98);
}

/* TEXT */
.matches-text{
  font-size:13px;
  opacity:0.7;
}

/* ARROW */
.matches-arrow{
  font-size:16px;
  opacity:0.5;
}

/* ===============================
   FIX SPACING PROGRESS VERIFIED
================================= */

/* wrapper section progress */
.progress-verified-wrapper{
  margin-top: 28px; /* 🔥 turunin ke bawah */
  padding: 0 16px;
}

/* card dalamnya */
.progress-verified-card{
  margin-top: 12px;
  padding: 18px;
  border-radius: 16px;

  backdrop-filter: blur(10px);
}

/* LIGHT MODE */
body.light .progress-verified-card{
  background: rgba(255,255,255,0.9);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* DARK MODE */
body.dark .progress-verified-card{
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

