/* ============================================
   Config Page - Trainify
   ============================================ */

/* Responsividade: ficar para baixo do header */
@media (max-width: 430px) {
    .config-container {
        margin-top: 4rem;
    }
}

/* ---- Seções ---- */
.cfg-section {
    margin-bottom: 2.5rem;
}

.cfg-section__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.cfg-section__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(3, 221, 194, 0.15), rgba(60, 254, 165, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #03DDC2;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.cfg-section__title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    letter-spacing: -0.01em;
}

/* ---- Grid do Plano ---- */
.cfg-plan-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 768px) {
    .cfg-plan-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Cards ---- */
.cfg-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.cfg-card:hover {
    border-color: rgba(3, 221, 194, 0.15);
}

.cfg-card--plan {
    position: relative;
}

.cfg-card__glow {
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #03DDC2, #3cfea5, transparent);
    opacity: 0.6;
}

.cfg-card__content {
    padding: 1.5rem;
}

.cfg-card__content--center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
    gap: 0.75rem;
}

.cfg-card__label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.cfg-card__plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cfg-card__detail {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin: 0.5rem 0;
}

.cfg-card__detail strong {
    color: #fff;
}

/* ---- Stats ---- */
.cfg-card__stats {
    margin: 1rem 0;
}

.cfg-stat {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.cfg-stat__value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #03DDC2;
    line-height: 1;
}

.cfg-stat__value i {
    font-size: 1.8rem;
}

.cfg-stat__label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.3;
}

/* ---- Ações do Card ---- */
.cfg-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

/* ---- Canceled Badge ---- */
.cfg-canceled-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.25);
    color: #ffc107;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ---- Credit Card Visual ---- */
.cfg-credit-card {
    background: linear-gradient(145deg, rgba(3, 221, 194, 0.08), rgba(60, 254, 165, 0.03));
    border: 1px solid rgba(3, 221, 194, 0.12);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 0.75rem 0 1rem;
    position: relative;
    overflow: hidden;
}

.cfg-credit-card::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(3, 221, 194, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.cfg-credit-card__chip {
    margin-bottom: 1rem;
    opacity: 0.7;
}

.cfg-credit-card__number {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
}

.cfg-credit-card__dots {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 2px;
}

.cfg-credit-card__last {
    font-size: 1.1rem;
    color: #fff;
    font-weight: 600;
    letter-spacing: 2px;
}

.cfg-credit-card__footer {
    display: flex;
    justify-content: flex-end;
}

.cfg-credit-card__brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cfg-credit-card__brand i {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ---- Payment Info ---- */
.cfg-payment-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.cfg-payment-info__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.cfg-payment-info__row:last-child {
    border-bottom: none;
}

.cfg-payment-info__label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.cfg-payment-info__value {
    font-size: 0.85rem;
    color: #fff;
    font-weight: 500;
}

/* ---- Badges ---- */
.cfg-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cfg-badge--success {
    background: rgba(3, 221, 194, 0.12);
    color: #3cfea5;
    border: 1px solid rgba(3, 221, 194, 0.2);
}

.cfg-badge--warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.cfg-badge--danger {
    background: rgba(220, 53, 69, 0.1);
    color: #ff6b7a;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.cfg-badge--neutral {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ---- Botões ---- */
.cfg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1.25rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    border: none;
    white-space: nowrap;
}

.cfg-btn--primary {
    background: linear-gradient(135deg, #03DDC2, #3cfea5);
    color: #040404;
    font-weight: 600;
}

.cfg-btn--primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: #040404;
}

.cfg-btn--outline {
    background: transparent;
    color: #03DDC2;
    border: 1px solid rgba(3, 221, 194, 0.3);
}

.cfg-btn--outline:hover {
    background: rgba(3, 221, 194, 0.08);
    border-color: rgba(3, 221, 194, 0.5);
    color: #3cfea5;
}

.cfg-btn--ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    border: none;
    padding: 0.55rem 0.75rem;
}

.cfg-btn--ghost:hover {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.04);
}

.cfg-btn--ghost.btn-cancel-plan {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.75rem;
}

.cfg-btn--ghost.btn-cancel-plan:hover {
    color: #ff6b7a;
}

.cfg-btn--warning {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.cfg-btn--warning:hover {
    background: rgba(255, 193, 7, 0.25);
    color: #ffc107;
}

.cfg-btn--full {
    width: 100%;
}

/* ---- Empty States ---- */
.cfg-empty-icon {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.15);
}

.cfg-empty-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.2);
}

.cfg-empty-card i {
    font-size: 2rem;
}

.cfg-empty-card p {
    font-size: 0.8rem;
    margin: 0;
}

/* ---- Notificações ---- */
.cfg-notification-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s ease;
}

.cfg-notification-item:last-child {
    border-bottom: none;
}

.cfg-notification-item__info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.cfg-notification-item__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.cfg-notification-item__label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    margin: 0;
    line-height: 1.3;
}

/* ---- Switch Override ---- */
.cfg-switch .form-check-input {
    width: 2.75rem;
    height: 1.4rem;
    cursor: pointer;
}

.cfg-switch .form-check-input[type="checkbox"]:checked {
    background-color: #03DDC2;
    border-color: #03DDC2;
}

.cfg-switch .form-check-input[type="checkbox"]:not(:checked) {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.cfg-switch .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(3, 221, 194, 0.15);
}

/* ---- Section disabled (no active plan) ---- */
.cfg-section--disabled {
    opacity: 0.4;
    pointer-events: none;
}

.cfg-section__lock {
    font-size: 13px;
    margin-left: 8px;
    opacity: 0.7;
}

/* ---- Modal ---- */
.cfg-modal {
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    max-height: 90vh;
}

.cfg-modal__header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.25rem 1.5rem;
}

.cfg-modal__title-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.cfg-modal__icon {
    color: #03DDC2;
    font-size: 1rem;
}

.cfg-modal__body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.cfg-modal__footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ---- Form Sections ---- */
.cfg-form-section {
    margin-bottom: 1.5rem;
}

.cfg-form-section__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #03DDC2;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(3, 221, 194, 0.1);
}

.cfg-form-section__title i {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ---- Form Grid ---- */
.cfg-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.cfg-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.cfg-form-field--full {
    grid-column: 1 / -1;
}

.cfg-form-field--small {
    grid-column: span 1;
}

.cfg-form-field--large {
    grid-column: span 1;
}

@media (min-width: 768px) {
    .cfg-form-field--small {
        grid-column: span 1;
        max-width: 120px;
    }

    .cfg-form-grid:has(.cfg-form-field--small) {
        grid-template-columns: auto 1fr;
    }
}

.cfg-form-field label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.cfg-form-field .form-control {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #fff;
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cfg-form-field .form-control::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.cfg-form-field .form-control:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(3, 221, 194, 0.4);
    box-shadow: 0 0 0 3px rgba(3, 221, 194, 0.08);
    color: #fff;
}

/* ---- SweetAlert: Cancel Plan Modal ---- */
.cfg-swal-btn--danger {
    background: rgba(220, 53, 69, 0.15) !important;
    color: #ff6b7a !important;
    border: 1px solid rgba(220, 53, 69, 0.4) !important;
    padding: 0.55rem 1.5rem !important;
    transition: all 0.25s ease !important;
}

.cfg-swal-btn--danger:hover {
    background: rgba(220, 53, 69, 0.3) !important;
    color: #ff8a96 !important;
    border-color: rgba(220, 53, 69, 0.6) !important;
}

.cfg-swal-btn--keep {
    background: linear-gradient(135deg, #03DDC2, #3cfea5) !important;
    color: #040404 !important;
    border: none !important;
    padding: 0.55rem 1.5rem !important;
    font-weight: 700 !important;
    transition: all 0.25s ease !important;
}

.cfg-swal-btn--keep:hover {
    opacity: 0.9 !important;
    transform: translateY(-1px);
}

@media (max-width: 576px) {
    .cfg-form-grid {
        grid-template-columns: 1fr;
    }

    .cfg-form-field--small,
    .cfg-form-field--large {
        grid-column: span 1;
        max-width: none;
    }
}
