* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f7fa;
    color: #172033;
}

/* LOGIN */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 430px;
    background: white;
    padding: 40px;
    border-radius: 18px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 40px;
}

.brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 9px;
    display: block;
}

.brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #172033;
    color: white;
    border-radius: 9px;
    font-size: 13px;
}

.eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #667085;
}

.login-header h1 {
    font-size: 32px;
    margin: 10px 0;
}

.login-header p {
    color: #667085;
    line-height: 1.6;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    font-size: 15px;
    outline: none;
}

input:focus {
    border-color: #172033;
}

button {
    cursor: pointer;
    border: none;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: #172033;
    color: white;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 600;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.error {
    color: #c62828;
    font-size: 14px;
    min-height: 20px;
    margin-bottom: 10px;
}

/* CUENTA */

.topbar {
    height: 70px;
    padding: 0 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-bottom: 1px solid #eaecf0;
}

.btn-secondary {
    padding: 10px 16px;
    background: white;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
}

.dashboard {
    max-width: 1000px;
    margin: 60px auto;
    padding: 0 24px;
}

.welcome {
    margin-bottom: 50px;
}

.welcome h1 {
    font-size: 38px;
    margin: 10px 0;
}

.welcome p {
    color: #667085;
}

.dashboard h2 {
    margin-bottom: 20px;
}

.service-card {
    background: white;
    border: 1px solid #eaecf0;
    border-radius: 16px;
    padding: 28px;
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.service-card h3 {
    font-size: 21px;
    margin: 12px 0;
}

.service-card p {
    color: #667085;
    line-height: 1.6;
    max-width: 600px;
}

.service-status {
    color: #087443;
    font-size: 13px;
    font-weight: 700;
}

.service-price {
    min-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.service-price strong {
    font-size: 25px;
}

.service-price span {
    color: #667085;
    font-size: 13px;
}

.service-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
    text-decoration: none;
    color: #172033;
    font-weight: 600;
}

/* ========================================
   SERVICIO
======================================== */

.service-page {
    max-width: 1200px;
}

.service-header {
    margin-bottom: 38px;
}

.service-header h1 {
    font-size: 44px;
    line-height: 1.15;
    margin-top: 12px;
    color: #172033;
}


/* ========================================
   DISTRIBUCIÓN PRINCIPAL
======================================== */

.service-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    align-items: start;
}


/* ========================================
   TARJETA PRINCIPAL
======================================== */

.detail-card {
    background: white;
    border: 1px solid #eaecf0;
    border-radius: 18px;
    padding: 34px;
    box-shadow: 0 8px 22px rgba(23, 32, 51, 0.04);
}

.service-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 14px 18px;
    margin-bottom: 28px;

    background: #ecfdf3;
    border: 1px solid #d1fae5;
    border-radius: 14px;
}

.service-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    color: #087443;
    font-size: 15px;
    font-weight: 700;
}

.status-dot {
    display: inline-block;

    width: 9px;
    height: 9px;

    background: #22a06b;
    border-radius: 50%;
}

.operation-status {
    color: #667085;
    font-size: 15px;
}


/* ========================================
   DATOS DEL SERVICIO
======================================== */

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 26px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;

    padding: 18px 20px;

    background: #f8fafc;
    border: 1px solid #eef2f6;
    border-radius: 12px;
}

.detail-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;

    color: #667085;
    text-transform: uppercase;
}

.detail-value {
    font-size: 20px;
    color: #172033;
    font-weight: 600;
}

.service-description {
    color: #667085;
    line-height: 1.7;
    font-size: 17px;
}


/* ========================================
   TARJETA DE PRECIO
======================================== */

.price-card {
    background: white;
    border: 1px solid #eaecf0;
    border-radius: 18px;

    padding: 32px;

    box-shadow: 0 8px 22px rgba(23, 32, 51, 0.04);
}

.price-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    color: #087443;
    font-size: 14px;
    font-weight: 700;
}

.price-main {
    display: flex;
    align-items: baseline;
    gap: 8px;

    margin-top: 34px;
}

.price-main strong {
    font-size: 52px;
    line-height: 1;

    color: #172033;
}

.price-main span {
    color: #667085;
    font-size: 15px;
}

.price-divider {
    height: 1px;
    background: #eaecf0;

    margin: 30px 0 22px;
}

.price-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.price-info div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.price-info span {
    color: #667085;
    font-size: 15px;
}

.price-info strong {
    color: #172033;
    font-size: 15px;
}

.btn-renew {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;

    margin-top: 26px;
    padding: 17px 20px;

    background: #15151a;
    color: white;

    border-radius: 12px;

    text-decoration: none;

    font-size: 16px;
    font-weight: 700;

    transition: opacity 0.2s ease;
}

.btn-renew:hover {
    opacity: 0.9;
}

.secure-payment {
    margin-top: 16px;

    color: #98a2b3;
    text-align: center;

    font-size: 13px;
    line-height: 1.5;
}


/* ========================================
   SECCIONES
======================================== */

.detail-section {
    margin-top: 44px;
}

.detail-section h2 {
    margin-bottom: 20px;

    color: #172033;
    font-size: 30px;
}


/* ========================================
   TARJETAS DE CARACTERÍSTICAS
======================================== */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    background: white;

    border: 1px solid #eaecf0;
    border-radius: 16px;

    overflow: hidden;
}

.feature-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;

    padding: 30px 28px;

    min-height: 155px;

    background: white;
}

.feature-card:nth-child(1),
.feature-card:nth-child(2) {
    border-bottom: 1px solid #eaecf0;
}

.feature-card:nth-child(1),
.feature-card:nth-child(3) {
    border-right: 1px solid #eaecf0;
}

.feature-icon {
    flex-shrink: 0;

    width: 52px;
    height: 52px;

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

    background: #f3f5f8;
    border-radius: 50%;

    color: #172033;
    font-size: 22px;
    font-weight: 600;
}

.feature-card h3 {
    margin: 3px 0 10px;

    color: #172033;
    font-size: 18px;
}

.feature-card p {
    color: #667085;
    line-height: 1.6;
    font-size: 15px;
}


/* ========================================
   CONDICIONES
======================================== */

.conditions-section p {
    max-width: 850px;

    color: #667085;

    font-size: 16px;
    line-height: 1.7;
}


/* ========================================
   HISTORIAL DE PAGOS
======================================== */

.payments-section {
    margin-top: 48px;
}

.payment-empty {
    background: white;

    border: 1px solid #eaecf0;
    border-radius: 16px;

    padding: 28px 24px;

    color: #667085;
    font-size: 15px;
}


/* ========================================
   BOTÓN VOLVER
======================================== */

.action-row {
    display: flex;
    justify-content: flex-start;

    margin-top: 34px;
}

.btn-inline {
    width: auto;
    min-width: 210px;

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

    text-decoration: none;
}


/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 900px) {

    .service-layout {
        grid-template-columns: 1fr;
    }

    .price-card {
        width: 100%;
    }

}


@media (max-width: 640px) {

    .service-page {
        padding: 0 16px;
    }

    .service-header h1 {
        font-size: 30px;
    }

    .detail-card {
        padding: 20px 16px;
    }

    .service-status-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        border-right: none !important;
        border-bottom: 1px solid #eaecf0;
    }

    .feature-card:last-child {
        border-bottom: none;
    }

    .price-main strong {
        font-size: 44px;
    }

    .btn-inline {
        width: 100%;
    }

}

/* ========================================
   HISTORIAL DE PAGOS
   ======================================== */

.payments-section {
    margin-top: 32px;
}

#paymentsContainer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    padding: 18px 20px;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;

    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.payment-item > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.payment-item > div:last-child {
    display: flex;
    align-items: center;
    gap: 16px;
}

.payment-item strong {
    color: #172033;
    font-size: 15px;
    font-weight: 600;
}

.payment-item span {
    color: #64748b;
    font-size: 14px;
}

.payment-item > div:last-child strong {
    font-size: 17px;
}

.payment-status {
    display: inline-flex;
    align-items: center;

    padding: 6px 10px;

    border-radius: 999px;

    background: #ecfdf5;
    color: #15803d !important;

    font-size: 12px !important;
    font-weight: 600;
}

.payment-empty {
    padding: 24px;

    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;

    color: #64748b;
    text-align: center;
}


/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 600px) {

    .payment-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .payment-item > div:last-child {
        width: 100%;
        justify-content: space-between;
    }

}

.payment-status-failed {
    background: #fef2f2;
    color: #dc2626 !important;
}

/* ========================================
   ESTADOS DEL SERVICIO
   ======================================== */

#serviceStatus.status-canceled,
#priceStatus.status-canceled {
    color: #dc2626;
}

#serviceStatus.status-canceled .status-dot,
#priceStatus.status-canceled .status-dot {
    background: #dc2626;
}

#serviceStatus.status-past-due,
#priceStatus.status-past-due {
    color: #b45309;
}

#serviceStatus.status-past-due .status-dot,
#priceStatus.status-past-due .status-dot {
    background: #f59e0b;
}

/* ========================================
   ESTADOS EN MI CUENTA
   ======================================== */

.service-status.active {
    color: #15803d;
}

.service-status.past-due {
    color: #b45309;
}

.service-status.canceled {
    color: #dc2626;
}

#serviceStatus.status-canceled {
    background: #fef2f2;
}

#priceStatus.status-canceled {
    background: transparent;
}

#serviceStatus.status-past-due {
    background: #fffbeb;
}