/* =========================================================
   ADMIN - CREAR PEDIDO MANUAL
========================================================= */

.admin-manual-order-page {
    width: 100%;
    min-height: 100%;
    padding: 35px 20px 60px;
    background: #f6f8fb;
}

.admin-manual-order-container {
    width: 100%;
    max-width: 1050px;
    margin: 0 auto;
}


/* =========================================================
   HEADER
========================================================= */

.manual-order-header {
    margin-bottom: 30px;
}

.manual-order-label {
    display: block;
    margin-bottom: 7px;
    color: #048ABF;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.manual-order-header h1 {
    margin: 0;
    color: #17324d;
    font-size: 30px;
    font-weight: 700;
}

.manual-order-header p {
    margin: 7px 0 0;
    color: #7b8794;
    font-size: 14px;
}


/* =========================================================
   ALERTA DE ERRORES
========================================================= */

.manual-order-alert {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 25px;
    padding: 16px 18px;
    border: 1px solid #f1c6c6;
    border-radius: 12px;
    background: #fff7f7;
    color: #842029;
}

.manual-order-alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fde8e8;
    color: #b42318;
    font-weight: 800;
}

.manual-order-alert strong {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
}

.manual-order-alert ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
}

.manual-order-alert li {
    margin-bottom: 3px;
}


/* =========================================================
   TARJETAS
========================================================= */

.manual-order-card {
    margin-bottom: 25px;
    padding: 25px;
    background: #ffffff;
    border: 1px solid #e8edf2;
    border-radius: 16px;
    box-shadow: 0 5px 18px rgba(25, 55, 80, 0.05);
}


/* =========================================================
   HEADER DE SECCIÓN
========================================================= */

.manual-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.manual-section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #e9f7fc;
    font-size: 18px;
}

.manual-section-header h2 {
    margin: 0;
    color: #17324d;
    font-size: 18px;
    font-weight: 700;
}

.manual-section-header p {
    margin: 3px 0 0;
    color: #8793a0;
    font-size: 13px;
}


/* =========================================================
   FORMULARIOS
========================================================= */

.manual-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.manual-form-group {
    display: flex;
    flex-direction: column;
}

.manual-form-full {
    grid-column: span 2;
}

.manual-form-group label,
.manual-payment-field label,
.manual-product-label {
    margin-bottom: 7px;
    color: #42586a;
    font-size: 13px;
    font-weight: 600;
}

.manual-form-control {
    width: 100%;
    min-height: 43px;
    padding: 10px 13px;
    border: 1px solid #dce3e8;
    border-radius: 9px;
    outline: none;
    background: #ffffff;
    color: #30485b;
    font-size: 14px;
    transition: .2s ease;
}

.manual-form-control:focus {
    border-color: #048ABF;
    box-shadow: 0 0 0 3px rgba(4, 138, 191, 0.10);
}

textarea.manual-form-control {
    min-height: 95px;
    resize: vertical;
}

.manual-form-control.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    margin-top: 5px;
    font-size: 12px;
}


/* =========================================================
   PRODUCTOS
========================================================= */

.manual-products-header {
    align-items: center;
}

.manual-products-header > div:nth-child(2) {
    flex: 1;
}

.manual-add-product {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid #b9dce9;
    border-radius: 8px;
    background: #ffffff;
    color: #048ABF;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

.manual-add-product span {
    font-size: 17px;
    line-height: 1;
}

.manual-add-product:hover {
    background: #e9f7fc;
    border-color: #048ABF;
}


/* =========================================================
   FILA DE PRODUCTO
========================================================= */

.manual-product-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px 45px;
    align-items: end;
    gap: 12px;
    padding: 18px;
    margin-bottom: 12px;
    border: 1px solid #e7edf1;
    border-radius: 12px;
    background: #fafcfd;
}

.manual-product-row:last-child {
    margin-bottom: 0;
}

.manual-product-field {
    min-width: 0;
}

.manual-product-remove {
    display: flex;
    align-items: flex-end;
}

.manual-product-remove button {
    width: 45px;
    height: 43px;
    border: 1px solid #edc5c5;
    border-radius: 9px;
    background: #ffffff;
    color: #c62828;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
    transition: .2s ease;
}

.manual-product-remove button:hover {
    background: #fde8e8;
    border-color: #dc9999;
}


/* =========================================================
   PAGO
========================================================= */

.manual-payment-field {
    width: 100%;
    max-width: 480px;
}

.manual-payment-field .manual-form-control.is-invalid {
    border-color: #dc3545;
}


/* =========================================================
   ACCIONES
========================================================= */

.manual-order-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 5px;
}

.manual-cancel-button,
.manual-submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: .2s ease;
    cursor: pointer;
}

.manual-cancel-button {
    border: 1px solid #dce2e7;
    background: #ffffff;
    color: #536675;
}

.manual-cancel-button:hover {
    background: #f3f5f7;
    color: #30485b;
}

.manual-submit-button {
    border: none;
    background: #048ABF;
    color: #ffffff;
}

.manual-submit-button:hover {
    background: #03779f;
    transform: translateY(-1px);
}


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

@media (max-width: 800px) {

    .manual-form-grid {
        grid-template-columns: 1fr;
    }

    .manual-form-full {
        grid-column: span 1;
    }

    .manual-product-row {
        grid-template-columns: minmax(0, 1fr) 120px 45px;
    }

}


@media (max-width: 650px) {

    .admin-manual-order-page {
        padding: 25px 12px 45px;
    }

    .manual-order-header h1 {
        font-size: 25px;
    }

    .manual-order-card {
        padding: 18px;
    }

    .manual-products-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .manual-products-header > div:nth-child(2) {
        min-width: calc(100% - 55px);
    }

    .manual-add-product {
        width: 100%;
        margin-top: 5px;
    }

    .manual-product-row {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }

    .manual-product-remove {
        width: 100%;
    }

    .manual-product-remove button {
        width: 100%;
    }

    .manual-order-actions {
        flex-direction: column-reverse;
    }

    .manual-cancel-button,
    .manual-submit-button {
        width: 100%;
    }

}


@media (max-width: 480px) {

    .manual-section-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .manual-section-header h2 {
        font-size: 16px;
    }

    .manual-section-header p {
        font-size: 12px;
    }

    .manual-form-control {
        min-height: 42px;
        font-size: 13px;
    }

}