/*
.meu-plano { 
	max-width:1200px; 
	margin:auto; 
	font-family:sans-serif; 
}
*/

.user-plano {
  border: 2px solid var(--gray-700);
  padding: 10px;
  border-radius: 8px;
}

.user-plano .details-wrapper {
	margin-top: 20px;
}

.status { 
	font-weight:bold; 
}

.status-ativo { 
	color: var(--color-success); 
}

.status-pendente { 
	color: var(--color-warning); 
}

.status-inadimplente { 
	color: var(--color-danger);
}

.status-free { 
	color: var(--text-muted); 
}

.status-cancelado { 
	color: var(--color-danger); 
}

.acoes-plano a,
.meu-plano .form-submit {
  display: inline-block;
  margin: 10px 10px 10px 0;
  padding: 10px 18px;
  border-radius:5px;
  text-decoration: none;
  color: var(--text-inverse);
}

.btn-premium { 
	background: var(--yellow-500);
}
	
.btn-regularizar { 
	background: var(--color-primary);
}

.btn-cancelar { 
	background: var(--gray-700);
	border-color: var(--gray-700);
}

/* ==========================
   HISTÓRICO DE PAGAMENTOS
========================== */

.premium-history {
  margin: 20px 0;
}

.premium-history table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
  font-family: 'Segoe UI', Roboto, sans-serif;
  border-radius: 12px;
  overflow: hidden;
}

/* ==========================
   DESKTOP
========================== */

@media (min-width: 769px) {

  .premium-history thead tr {
    background: var(--color-primary);
    color: var(--text-inverse);
  }

  .premium-history th,
  .premium-history td {
    padding: 15px;
    border-bottom: 1px solid var(--border-primary);
    text-align: left;
  }

  .premium-history tbody tr:hover {
    background: var(--color-danger-bg);
  }

  .premium-history td:last-child {
    font-weight: bold;
  }

  .premium-history td:last-child {
    text-transform: uppercase;
  }

}

/* ==========================
   MOBILE (estilo cards)
========================== */

@media (max-width: 768px) {

  .premium-history table,
  .premium-history thead,
  .premium-history tbody,
  .premium-history th,
  .premium-history td,
  .premium-history tr {
    display: block;
  }

  .premium-history thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .premium-history tr {
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    margin-bottom: 15px;
    padding: 10px;
    background: var(--bg-surface);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }

  .premium-history td {
    border: none;
    position: relative;
    padding-left: 45% !important;
    text-align: right;
    border-bottom: 1px solid var(--border-soft);
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  /* Labels mobile */

  .premium-history td:nth-child(1)::before {
    content: "Data";
  }

  .premium-history td:nth-child(2)::before {
    content: "Valor";
  }

  .premium-history td:nth-child(3)::before {
    content: "Status";
  }

  .premium-history td::before {
    position: absolute;
    left: 10px;
    width: 40%;
    white-space: nowrap;
    text-align: left;
    font-weight: bold;
    color: var(--color-primary);
  }

}

/* ==========================
   STATUS VISUAL
========================== */

.premium-history td:last-child {
  font-weight: bold;
}

.premium-history td:last-child:contains("AUTHORIZED"),
.premium-history td:last-child:contains("ACTIVE") {
  color: var(--color-success);
}

.premium-history td:last-child:contains("PENDING") {
  color: var(--color-warning);
}

.premium-history td:last-child:contains("FAILED"),
.premium-history td:last-child:contains("CANCELLED") {
  color: var(--color-danger);
}