/* Simple optional styles */
.gmlm-card{border:1px solid #e5e7eb;border-radius:12px;padding:16px;margin:12px 0;background:#fff}
.gmlm-grid{display:flex;gap:12px;flex-wrap:wrap}
.gmlm-plan{border:1px solid #e5e7eb;border-radius:12px;padding:12px;min-width:220px}
.gmlm-card button{border-radius:10px;padding:10px 14px;background:#1b8f3a;color:#fff;border:0;cursor:pointer}

/* Popup */
.gmlm-popup-overlay{position:fixed;inset:0;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;z-index:99999;padding:16px}
.gmlm-popup{background:#fff;border-radius:16px;max-width:420px;width:100%;padding:18px;border:1px solid #e5e7eb;box-shadow:0 18px 50px rgba(0,0,0,.25)}
.gmlm-popup-title{font-size:18px;font-weight:700;margin-bottom:8px;color:#0f172a}
.gmlm-popup-msg{font-size:14px;color:#334155;margin-bottom:14px}
.gmlm-popup-btn{border-radius:12px;padding:10px 16px;background:#1b8f3a;color:#fff;border:0;cursor:pointer;width:100%}
.gmlm-stat{background:#e9f7ef;border:1px solid #ccebd6;border-radius:14px;padding:14px;min-width:210px}
.gmlm-stat .label{font-size:13px;color:#14532d}
.gmlm-stat .value{font-size:22px;font-weight:800;color:#064e3b;margin-top:6px}

/* Plans Grid */
.gmlm-plan-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:16px;
}
.gmlm-plan{
  background:#ffffff;
  border:1px solid #e5e7eb;
  border-radius:16px;
  padding:16px;
  box-shadow:0 10px 22px rgba(0,0,0,0.05);
}
.gmlm-plan h4{margin:0 0 8px;font-size:18px}
.gmlm-plan .price{font-size:22px;font-weight:800;color:#065f46;margin:10px 0}
.gmlm-plan button{width:100%}


.gmlm-pass-wrap{position:relative; display:inline-block; width:100%; max-width:420px;}
.gmlm-pass-wrap input{width:100%; padding-right:44px;}
.gmlm-eye{position:absolute; right:6px; top:50%; transform:translateY(-50%); border:0; background:transparent; cursor:pointer; font-size:16px; line-height:1; padding:6px;}

/* ===== Team page ([mlm_team]) grid alignment fix ===== */
/* Team shortcode uses two .gmlm-grid blocks (stats + level cards).
   Make them 5-column CSS grids on desktop for proper spacing/alignment. */
.gmlm-team .gmlm-grid{
  display:grid !important;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:18px;
  align-items:stretch;
}
.gmlm-team .gmlm-stat,
.gmlm-team .gmlm-plan{
  min-width:0; /* override older min-width that breaks alignment */
  width:100%;
  height:100%;
  box-sizing:border-box;
}

@media (max-width: 1200px){
  .gmlm-team .gmlm-grid{grid-template-columns:repeat(3, minmax(0, 1fr));}
}
@media (max-width: 768px){
  .gmlm-team .gmlm-grid{grid-template-columns:repeat(2, minmax(0, 1fr));}
}
@media (max-width: 480px){
  .gmlm-team .gmlm-grid{grid-template-columns:1fr;}
}

.gmlm-mini-card{border:1px solid #e5e7eb;border-radius:12px;padding:12px;min-width:220px;flex:1 1 220px}
.gmlm-big{font-size:20px;margin-top:4px}
.gmlm-muted{color:#64748b;font-size:13px;margin-top:6px}


/* v5.2.x UI refresh */
.gmlm-dashboard-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:18px;
  margin-top:14px;
}
.gmlm-stat-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:16px;
  box-shadow:0 10px 25px rgba(0,0,0,.06);
}
.gmlm-stat-card > div:first-child{
  font-size:14px;
  color:#334155;
  font-weight:600;
}
.gmlm-plan-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:16px;
}
.gmlm-plan-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:16px;
  padding:16px;
  box-shadow:0 10px 25px rgba(0,0,0,.06);
}
.gmlm-plan-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.gmlm-plan-name{font-size:16px;font-weight:800;color:#0f172a}
.gmlm-badge{
  font-size:12px;
  padding:4px 10px;
  border-radius:999px;
  background:#e2e8f0;
  color:#0f172a;
  font-weight:700;
}
.gmlm-status-active .gmlm-badge{background:#dcfce7;color:#166534}
.gmlm-status-closed .gmlm-badge{background:#fee2e2;color:#991b1b}
.gmlm-status-expired .gmlm-badge{background:#fef9c3;color:#854d0e}
.gmlm-plan-meta{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.gmlm-plan-meta span{display:block;font-size:12px;color:#64748b;margin-bottom:2px}
.gmlm-plan-meta b{font-size:13px;color:#0f172a}
.gmlm-progress{height:10px;background:#e5e7eb;border-radius:999px;overflow:hidden;margin-top:12px}
.gmlm-progress-bar{height:10px;background:#1b8f3a}


/* TradeLine Dashboard UI (strong, theme-safe) */
.gmlm-card.tl-dashboard-wrap{border-radius:18px !important;padding:18px !important}
.tl-dashboard-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.tl-dashboard-title{margin:0 !important;font-size:24px !important;line-height:1.2;font-weight:900;color:#0f172a}
.tl-dashboard-grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr)) !important;
  gap:16px !important;
  margin-top:8px !important;
}
.tl-stat{
  background:#ffffff !important;
  border:1px solid #e5e7eb !important;
  border-radius:16px !important;
  padding:16px !important;
  box-shadow:0 10px 25px rgba(0,0,0,.06) !important;
  min-height:92px;
}
.tl-stat.tl-wide{grid-column:span 2}
@media (max-width: 720px){
  .tl-stat.tl-wide{grid-column:span 1}
}
.tl-label{font-size:13px !important;color:#475569 !important;font-weight:800 !important;margin-bottom:8px !important}
.tl-value{font-size:18px !important;font-weight:900 !important;color:#0f172a !important}
.tl-unit{font-size:12px !important;font-weight:800 !important;color:#64748b !important;margin-left:6px}
.tl-sub{margin-top:6px !important;font-size:12px !important;color:#64748b !important}
.tl-minirow{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px;font-size:13px;color:#334155}
.tl-minirow b{font-weight:900;color:#0f172a}
.tl-badge{
  display:inline-block;
  padding:6px 12px;
  border-radius:999px;
  font-weight:900;
  font-size:13px;
  background:#e2e8f0;
  color:#0f172a;
}
.tl-approved{background:#dcfce7;color:#166534}
.tl-pending{background:#fef9c3;color:#854d0e}
.tl-rejected{background:#fee2e2;color:#991b1b}


/* TradeLine My Plans UI */
.tl-myplans{border-radius:18px !important;padding:18px !important}
.tl-myplans-title{
  margin:0 0 14px 0 !important;
  font-size:26px !important;
  line-height:1.2 !important;
  font-weight:900 !important;
  color:#0f172a !important;
}
.tl-myplans .gmlm-plan-grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr)) !important;
  gap:16px !important;
}
.tl-myplans .gmlm-plan-card{
  background:#fff !important;
  border:1px solid #e5e7eb !important;
  border-radius:16px !important;
  padding:16px !important;
  box-shadow:0 10px 25px rgba(0,0,0,.06) !important;
}
.tl-myplans .gmlm-plan-top{
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:10px !important;
  margin-bottom:12px !important;
}
.tl-myplans .gmlm-plan-name{
  font-size:16px !important;
  font-weight:900 !important;
  color:#0f172a !important;
  text-transform:uppercase;
  letter-spacing:.3px;
}
.tl-myplans .gmlm-badge{
  display:inline-flex !important;
  align-items:center !important;
  gap:6px;
  font-size:12px !important;
  padding:6px 10px !important;
  border-radius:999px !important;
  font-weight:900 !important;
  background:#e2e8f0 !important;
  color:#0f172a !important;
  white-space:nowrap;
}
.tl-myplans .gmlm-status-active .gmlm-badge{background:#dcfce7 !important;color:#166534 !important}
.tl-myplans .gmlm-status-closed .gmlm-badge{background:#fee2e2 !important;color:#991b1b !important}
.tl-myplans .gmlm-status-expired .gmlm-badge{background:#fef9c3 !important;color:#854d0e !important}

.tl-myplans .gmlm-plan-meta{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:12px 14px !important;
  margin-top:8px !important;
}
.tl-myplans .gmlm-plan-meta > div{
  background:#f8fafc !important;
  border:1px solid #eef2f7 !important;
  border-radius:12px !important;
  padding:10px 12px !important;
}
.tl-myplans .gmlm-plan-meta span{
  display:block !important;
  font-size:12px !important;
  color:#64748b !important;
  font-weight:800 !important;
  margin-bottom:4px !important;
}
.tl-myplans .gmlm-plan-meta b{
  display:block !important;
  font-size:13px !important;
  color:#0f172a !important;
  font-weight:900 !important;
  word-break:break-word;
}

.tl-myplans .gmlm-progress{
  height:10px !important;
  background:#e5e7eb !important;
  border-radius:999px !important;
  overflow:hidden !important;
  margin-top:14px !important;
}
.tl-myplans .gmlm-progress-bar{
  height:10px !important;
  background:#0ea5e9 !important;
  border-radius:999px !important;
}


/* ===== Trade TEAM: Premium Members UI ===== */
.gmlm-team .gmlm-grid + .gmlm-grid{ margin-top:22px; }

/* Members header */
.gmlm-team .gmlm-members-header{
  margin-top:18px;
  margin-bottom:10px;
}
.gmlm-team .gmlm-members-title{
  margin:0;
  font-size:22px;
  font-weight:800;
  color:#0f172a;
}

/* Accordion */
.gmlm-team .gmlm-accordion{
  border:1px solid #e5e7eb;
  border-radius:16px;
  background:#fff;
  box-shadow:0 10px 25px rgba(0,0,0,.06);
  overflow:hidden;
  margin:12px 0;
}
.gmlm-team .gmlm-accordion-summary{
  list-style:none;
  cursor:pointer;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-weight:800;
  color:#0f172a;
  background:linear-gradient(180deg,#ffffff 0%, #f8fafc 100%);
}
.gmlm-team details.gmlm-accordion summary::-webkit-details-marker{ display:none; }
.gmlm-team .gmlm-accordion-summary:after{
  content:'›';
  font-size:22px;
  transform:rotate(90deg);
  opacity:.65;
  transition:transform .15s ease;
}
.gmlm-team details[open] .gmlm-accordion-summary:after{
  transform:rotate(-90deg);
}
.gmlm-team .gmlm-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:34px;
  height:26px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid #d1fae5;
  background:#ecfdf5;
  color:#065f46;
  font-weight:800;
  font-size:12px;
}
.gmlm-team .gmlm-accordion-body{
  padding:14px 16px 16px;
  border-top:1px solid #eef2f7;
}
.gmlm-team .gmlm-empty{
  padding:10px 12px;
  border-radius:12px;
  background:#f8fafc;
  border:1px dashed #e2e8f0;
  color:#475569;
  font-size:14px;
}

/* Table */
.gmlm-team .gmlm-table-wrap{
  width:100%;
  overflow:auto;
  border-radius:14px;
  border:1px solid #e5e7eb;
}
.gmlm-team .gmlm-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  background:#fff;
}
.gmlm-team .gmlm-table thead th{
  text-align:left;
  font-size:12px;
  letter-spacing:.02em;
  text-transform:uppercase;
  color:#475569;
  padding:12px 14px;
  background:#f8fafc;
  border-bottom:1px solid #e5e7eb;
}
.gmlm-team .gmlm-table tbody td{
  padding:12px 14px;
  border-bottom:1px solid #f1f5f9;
  color:#0f172a;
  font-size:14px;
}
.gmlm-team .gmlm-table tbody tr:hover td{
  background:#f8fafc;
}
.gmlm-team .gmlm-table tbody tr:last-child td{
  border-bottom:0;
}

/* Mobile: table to cards */
@media (max-width: 680px){
  .gmlm-team .gmlm-table-wrap{ border:0; }
  .gmlm-team .gmlm-table,
  .gmlm-team .gmlm-table thead,
  .gmlm-team .gmlm-table tbody,
  .gmlm-team .gmlm-table th,
  .gmlm-team .gmlm-table td,
  .gmlm-team .gmlm-table tr{
    display:block;
    width:100%;
  }
  .gmlm-team .gmlm-table thead{ display:none; }
  .gmlm-team .gmlm-table tbody tr{
    margin:10px 0;
    border:1px solid #e5e7eb;
    border-radius:14px;
    background:#fff;
    box-shadow:0 10px 25px rgba(0,0,0,.06);
    overflow:hidden;
  }
  .gmlm-team .gmlm-table tbody td{
    border:0;
    border-bottom:1px solid #f1f5f9;
    padding:10px 12px;
  }
  .gmlm-team .gmlm-table tbody td:last-child{ border-bottom:0; }
  .gmlm-team .gmlm-table tbody td:before{
    content:attr(data-label);
    display:block;
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.02em;
    color:#64748b;
    margin-bottom:4px;
    font-weight:700;
  }
}


/* ===== v5.4.6 Team 2-column premium layout (summary left, members right) ===== */
.gmlm-team .gmlm-team-layout{
  display:grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap:22px;
  margin-top:14px;
  align-items:start;
}
.gmlm-team .gmlm-team-left{
  min-width:0;
}
.gmlm-team .gmlm-team-right{
  min-width:0;
}
/* Make members header + accordions fit nicely in right column */
.gmlm-team .gmlm-team-right .gmlm-members-header{
  margin-top:0;
}
/* Slightly tighten grids inside left column */
.gmlm-team .gmlm-team-left .gmlm-grid{ margin-top:0; }

/* Responsive: stack columns on smaller screens */
@media (max-width: 1024px){
  .gmlm-team .gmlm-team-layout{
    grid-template-columns: 1fr;
  }
}


/* ===== TEAM PAGE: Revert to single-column (premium centered) ===== */
.gmlm-team .gmlm-team-layout{ display:block !important; }
.gmlm-team .gmlm-team-left,
.gmlm-team .gmlm-team-right{ width:100% !important; max-width:100% !important; }

.gmlm-team .gmlm-members-header,
.gmlm-team details.gmlm-accordion{
  max-width: 760px;
  margin-left:auto;
  margin-right:auto;
}

.gmlm-team .gmlm-members-header{ margin-top: 26px; margin-bottom: 14px; }
.gmlm-team .gmlm-members-title,
.gmlm-team .gmlm-muted{ text-align:center; }

@media (max-width: 768px){
  .gmlm-team .gmlm-members-header,
  .gmlm-team details.gmlm-accordion{ max-width: 100%; }
}


/* ==== FORCE UNIFORM PLAN COLORS (FINAL FIX) ==== */

.plan-gold .gmlm-plan-btn{
  background:#1b8f3a !important;
  color:#fff !important;
  border:0 !important;
}

.gmlm-card button,
.gmlm-plan-btn,
.gmlm-card .gmlm-plan-btn{
  background:#1b8f3a !important;
  color:#fff !important;
  border:0 !important;
}

.gmlm-card,
.gmlm-card *{
  color:#111 !important;
}

.gmlm-plan-price{
  color:#111 !important;
  font-weight:900;
}
