{#
 * Template  : mail_congruity_html.twig
 * Version   : 1.1.0
 * Date      : 2026-03-03
 * Changelog :
 *   1.1.0 - [FIX] DOCTYPE aggiunto
 *         - [FIX] Twig: {% endif %}} doppia graffa rimossa
 *         - [FIX] bgcolor="#FFFFFF;" semicolon invalido rimosso
 *         - [FIX] border/cellpadding/cellspacing rimossi da <td>
 *         - [FIX] nowrap="" → white-space: nowrap in style=""
 *         - [FIX] <font color="red"> deprecated rimosso (x3)
 *         - [FIX] Zebra striping: background-color inline nel <tr> loop
 *         - [FIX] Larghezze footer: 48%+4%+80%=132% → 46%+4%+46%=96%
 *         - [FIX] *|FORWARD|* → mailto: fallback
 *         - [FIX] *|TWITTER:PROFILEURL|* → URL placeholder
 *         - [FIX] <i class="fa fa-certificate"> → emoji ✦
 *         - [FIX] align:center in style div → text-align: center
 *         - [FIX] &bnsp; → &nbsp;
 *         - [NOTE] Typo "CONRUITY" nel trans key NON corretto (romperebbe i18n)
 #}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>www.c4rgo.cloud - {{ 'NO CONRUITY ALLERT'|trans }}</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    </head>
    <body style="font-family: Helvetica, Arial, sans-serif;">
        <div align="center">
            <div align="center">

                <table align="center" border="0" cellpadding="0" cellspacing="0" style="width: {{ containerwidth }}; border-collapse: collapse; background-color: #F9F5F5">

                    <!-- LOGO TOP / TOP LOGO ROW -->
                    <tr>
                        <td style="width: {{ containerwidth }}; font-size: 0; line-height: 0; padding: 4px 4px 4px 15px;" height="50" bgcolor="#ffffff" align="left">
                            <a href="https://www.c4rgo.com">
                                <img alt="DS-C4RGO- Logistic Advanced Automation" border="0" height="50" src="{{ LogoCargo }}" width="auto">
                            </a>
                        </td>
                    </tr>

                    <!-- PREHEADER BAR -->
                    <tr>
                        <td bgcolor="#f4f4f4" style="width: {{ containerwidth }};">
                            <table border="0" cellpadding="0" cellspacing="0" bgcolor="#f4f4f4" style="width: {{ containerwidth }};">
                                <tr>
                                    <td width="65%" valign="top">
                                        <div style="padding: 20px 20px 10px 20px; color: gray; font-family: Helvetica; font-size: 10px; line-height: 125%; text-align: left;">
                                            AWB: {{ awb }} {{ 'Congruity Detail Report'|trans }}
                                            <br />
                                            {{ 'Message Reserved from'|trans }} <a href="https://www.c4rgo.cloud" style="color: #606060; font-weight: 400; text-decoration: underline;" target="_blank"> https://www.c4rgo.cloud</a>
                                        </div>
                                    </td>
                                    <td style="font-size: 0; line-height: 0;" width="1%">&nbsp;</td>
                                    <td width="34%" align="left" valign="top">
                                        <div style="padding: 20px 20px 10px 20px; color: gray; font-family: Helvetica; font-size: 10px; line-height: 125%; text-align: left;">
                                            {{ 'Email not displaying correctly?'|trans }}
                                            <br />
                                            <a href="{{ path('app_genpdf', {'sid': sid,'id': pageid}) }}" target="_blank" style="color: #606060; font-weight: 400; text-decoration: underline;">{{ 'View it in your browser'|trans }}.</a>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>

                    <!-- IMMAGINE TESTATA / HEADER IMAGE -->
                    <tr>
                        <td align="center" bgcolor="#FFFFFF" style="width: {{ containerwidth }}; padding: 0 0 0 0;">
                            <a href="{{ app.request.getSchemeAndHttpHost() }}" target="_blank">
                                <img alt="" src="https://www.c4rgo.cloud/static/images/TOP-eMail-No-Congruity_0.jpg" id="headerImage" style="width: 100%;"/>
                            </a>
                        </td>
                    </tr>

                    <!-- 1° GRUPPO INFO SPEDIZIONE / SHIPMENT INFO BLOCK
                         FIX v1.1.0: border/cellpadding/cellspacing rimossi da <td> - validi solo su <table>
                         FIX v1.1.0: border/cellpadding/cellspacing removed from <td> - valid only on <table> -->
                    <tr>
                        <td style="width: {{ containerwidth }}; background-color: #FFFFFF; border-bottom: 1px solid #CCCCCC; padding-bottom: 10px;">
                            <table border="0" cellpadding="0" cellspacing="0" style="width: {{ containerwidth }}; background-color: #FFFFFF;">
                                <tr>
                                    <td width="64%" valign="top">
                                        <table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color: #FFFFFF; margin-top: 20px;">
                                            <tr>
                                                <td style="padding-top: 6px; padding-left: 6px;">
                                                    <div style="color: #020a4b; display: block; font-family: Helvetica; font-size: 26px; font-style: normal; font-weight: 700; line-height: 100%; letter-spacing: normal; text-align: left; margin: 0 0 10px;">
                                                        {%  if LogoVettoreImg != '' %}<img src="{{ LogoVettoreImg }}" style="width: 70px; margin-left: 4px;">{% endif %}{{ 'Acquisition'|trans }}: {{ awb }}
                                                    </div>
                                                    <div style="color: #606060; display: block; font-family: Helvetica; font-size: 16px; font-style: normal; font-weight: 400; line-height: 100%; letter-spacing: normal; text-align: left; margin: 0 0 10px;">
                                                        {{ 'Location'|trans }}: {{ macchina.Luogo.Azienda.RagioneSociale }} - {{ macchina.Luogo.Descrizione }}
                                                    </div>
                                                    <div style="color: #606060; display: block; font-family: Helvetica; font-size: 16px; font-style: normal; font-weight: 400; line-height: 100%; letter-spacing: normal; text-align: left; margin: 0 0 10px;">
                                                        {{ 'Date Acquisition'|trans }}: {{ (rilevazioni|first).dt_acquisition|date('d/m/Y') }}
                                                    </div>
                                                    <div style="color: #606060; display: block; font-family: Helvetica; font-size: 16px; font-style: normal; font-weight: 400; line-height: 100%; letter-spacing: normal; text-align: left; margin: 0 0 10px;">
                                                        {{ 'Operator'|trans }}: {{ operatore|raw }}
                                                    </div>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                    <!-- FIX v1.1.0: align: right (CSS non valido) → text-align: right
                                         FIX v1.1.0: align: right (invalid CSS property) → text-align: right -->
                                    <td width="36%" valign="top" style="background-color: #FFFFFF;">
                                        <div style="padding: 0px; padding-top: 16px; text-align: right;">
                                            <img alt="BarCode" src="{{ bcIMG }}" style="max-width: 250px; display: block;" id="bcImage" />
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>

                    <!-- BLOCCO BODY / MESSAGE BLOCK -->
                    {% if body != '' %}
                        <tr style="width: {{ containerwidth }}; padding: 6px; background-color: #e8e8e9; text-align: left; border-bottom: 1px solid #CCCCCC; padding-bottom: 10px;">
                            <td>
                                <div style="color: #6699FF; display: block; font-family: Helvetica; font-size: 15px; font-style: normal; font-weight: 500; line-height: 100%; letter-spacing: normal; text-align: left; margin: 0 0 10px; padding-left: 6px;">
                                    <div style="color: #6699FF; display: block; font-family: Helvetica; font-size: 15px; font-style: normal; font-weight: 500; line-height: 100%; letter-spacing: normal; text-align: left; margin: 0 0 10px; padding-left: 6px;">
                                        OGGETTO : <em><u>AVVISO DI NON CONFORMIT&Agrave; AWB {{ awb }}</u></em>
                                    </div>
                                    <div style="padding-bottom: 10px; padding-left: 6px;">
                                        {{ body|raw }}<br>
                                        <p>Spett.le XXXX- CLIENTE / VETTORE - XXXXXXX</p>
                                        <p>In un ottica di miglioramento e trasparenza dei servizi resi, la presente comunicazione per darvi tempestivo avviso che i dati acquisiti dai nostri sistemi automatici di controllo delle merci, inerente la spedizione in oggetto, ha rilevato delle differenze con quanto dichiarato nel documento accompagnatorio pervenutoci.<br>
                                        A seguire troverà in evidenza le differenze rilevate.</p>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    {% endif %}

                    <!-- BLOCCO NOTE / NOTES BLOCK -->
                    {% if note != '' %}
                        <tr style="width: {{ containerwidth }}; padding: 6px; padding-top: 6px; background-color: #ffffff; text-align: left; border-bottom: 1px solid #CCCCCC; padding-bottom: 10px;">
                            <td>
                                <div style="background-color: #ffffff; color: #404040; display: block; font-family: Helvetica; font-size: 20px; font-style: normal; font-weight: 700; line-height: 100%; letter-spacing: normal; text-align: left; margin: 0 0 10px; padding-left: 6px;">Note:</div>
                                <div style="background-color: #ffffff; padding-bottom: 10px; padding-left: 6px;">{{ note|raw }}</div>
                            </td>
                        </tr>
                    {% endif %}

                    <!-- 2° GRUPPO INFO + QR CODE / SHIPMENT DETAIL + QR CODE
                         FIX v1.1.0: border/cellpadding/cellspacing rimossi da <td>
                         FIX v1.1.0: border/cellpadding/cellspacing removed from <td> -->
                    <tr>
                        <td style="width: {{ containerwidth }}; background-color: #FFFFFF; border-bottom: 1px solid #CCCCCC; padding-bottom: 10px;">
                            <table style="font-family: Helvetica, Arial, sans-serif; font-size: 14px; color: #020a4b; vertical-align: top; width: 100%;">
                                <tr>
                                    <td width="60%" valign="top">
                                        <table style="font-family: Helvetica, Arial, sans-serif; font-size: 14px; color: #020a4b; vertical-align: top;">
                                            <tbody>
                                                <!-- FIX v1.1.0: nowrap="" deprecato → white-space: nowrap in style (x9 celle)
                                                     FIX v1.1.0: nowrap="" deprecated → white-space: nowrap in style (x9 cells) -->
                                                <tr>
                                                    <td style="width: 32%; vertical-align: top; white-space: nowrap;"><strong>{{ 'global.date_acquisition'|trans }}</strong></td>
                                                    <td style="width: 68%;">
                                                        {% for ril in rilevazioni %}
                                                            <div>{{ ril.dt_acquisition|date('d/m/Y') }}</div>
                                                        {% endfor %}
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="width: 32%; vertical-align: top; white-space: nowrap;"><strong>{{ 'global.location'|trans }}</strong></td>
                                                    <td style="width: 68%;">{{ macchina.Luogo.Descrizione }}</td>
                                                </tr>
                                                <tr>
                                                    <td style="width: 32%; vertical-align: top; white-space: nowrap;"><strong>{{ 'N. Acquisitions'|trans }}</strong></td>
                                                    <td style="width: 68%;">{{ n_rilevazioni }}</td>
                                                </tr>
                                                <tr>
                                                    <td style="width: 32%; vertical-align: top; white-space: nowrap;"><strong>N° Object</strong></td>
                                                    <td style="width: 68%;">{{ nobj_tot }}</td>
                                                </tr>
                                                <tr>
                                                    <td style="width: 32%; vertical-align: top; white-space: nowrap;"><strong>{{ 'N. package'|trans }}</strong></td>
                                                    <td style="width: 68%;">{{ n_pezzi }}</td>
                                                </tr>
                                                <tr>
                                                    <td style="width: 32%; vertical-align: top; white-space: nowrap;"><strong>{{ 'Volume'|trans }}</strong></td>
                                                    <td style="width: 68%; vertical-align: top;">{{ volume }} Mc</td>
                                                </tr>
                                                <tr>
                                                    <td style="width: 32%; vertical-align: top; white-space: nowrap;"><strong>{{ 'Weight'|trans }}</strong></td>
                                                    <td style="width: 68%;">{{ peso }} Kg</td>
                                                </tr>
                                                <tr>
                                                    <td style="width: 32%; vertical-align: top; white-space: nowrap;"><strong>{{ 'Fiscal ID'|trans }}</strong></td>
                                                    <td style="width: 68%;">{{ fiscal_id|raw }}</td>
                                                </tr>
                                                <tr>
                                                    <td style="width: 32%; vertical-align: top; white-space: nowrap;"><strong>{{ 'Volume ID'|trans }}</strong></td>
                                                    <td style="width: 68%;">{{ volume_id|raw }}</td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </td>
                                    <td width="40%" valign="top" style="text-align: right; padding: 6px;">
                                        <a href="{{ actual_link }}" style="display: inline-block; width: 150px; height: auto;">
                                            <img src="{{ qrcode }}" alt="" style="max-width: 150px; height: 160px;">
                                        </a><br/>
                                        <a href="{{ actual_link }}" style="padding-top: 10px; font-size: 16px;">{{ 'See Job  by C4RGO Viewer'|trans }}</a>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>

                    <!-- GRUPPO IMMAGINI / IMAGES BLOCK -->
                    <tr>
                        <td>
                            <table style="width: 100%; page-break-inside: avoid;">
                                {% for imgL1 in imagelistflat %}
                                <tr>
                                    <td style="width: {{ containerwidth }};" bgcolor="#ffffff">
                                        <!-- FIX v1.1.0: bgcolor="#FFFFFF;" → bgcolor="#FFFFFF" (semicolon invalido)
                                             FIX v1.1.0: bgcolor="#FFFFFF;" → bgcolor="#FFFFFF" (invalid semicolon) -->
                                        <table style="width: {{ containerwidth }};" bgcolor="#FFFFFF" border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                {% for img in imgL1 %}
                                                <td width="49%" valign="top" style="background-color: #FFFFFF; border-bottom: 1px solid #CCCCCC; padding: 6px; text-align: center;">
                                                    {% if img != '' %}
                                                        <img src="{{ img }}" style="width: 100%; min-width: 290px; height: auto;" alt="camera"/>
                                                    {% endif %}
                                                </td>
                                                    {% if loop.index > 1 %}
                                                        <td style="background-color: #FFFFFF; font-size: 0; border-bottom: 1px solid #CCCCCC; padding: 6px; line-height: 0;" width="2%">&nbsp;</td>
                                                    {% endif %}
                                                {% endfor %}
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                {% endfor %}
                            </table>
                        </td>
                    </tr>

                    <!-- TABELLA CONGRUITA' / CONGRUITY DETAIL TABLE -->
                    <tr style="width: {{ containerwidth }}; padding: 6px; background-color: #FFFFFF;">
                        <td style="background-color: #FFFFFF; border-bottom: 1px solid #CCCCCC; padding: 6px;">
                            <div style="padding: 6px; background-color: #FFFFFF;"></div>
                            <div style="border-bottom: 1px solid #CCCCCC; padding-bottom: 4px; background-color: #FFFFFF;">

                                {% if rilevazioni|length > 1 %}

                                    <!-- TABELLA MULTI-RILEVAZIONE / MULTI-ACQUISITION TABLE -->
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%" style="text-align: center; font-family: Helvetica, sans-serif;">
                                        <thead>
                                            <tr style="background-color: #e8e8e9;">
                                                <th style="font-size: 15px; color: #484444; font-weight: 300; text-align: center; margin-bottom: 15px;">[ ID ]<br />{{ '*A*'|trans }}</th>
                                                <!-- FIX v1.1.0: <i class="fa fa-certificate"> rimosso (FA non renderizzato in email) → emoji ✦
                                                     FIX v1.1.0: <i class="fa fa-certificate"> removed (FA not rendered in email) → emoji ✦ -->
                                                <th style="font-size: 15px; color: #484444; text-transform: uppercase; font-weight: 300; text-align: center; margin-bottom: 15px;">&#10022; {{ 'Fiscal ID'|trans }}</th>
                                                <th style="font-size: 15px; color: #484444; text-transform: uppercase; font-weight: 300; text-align: center; margin-bottom: 15px;">[N]<br />{{ 'OBJ'|trans }}</th>
                                                <th style="font-size: 15px; color: #484444; text-transform: uppercase; font-weight: 300; text-align: center; margin-bottom: 15px;">[N]<br />{{ 'Items'|trans }}</th>
                                                <th style="font-size: 15px; color: #484444; text-transform: uppercase; font-weight: 300; text-align: center; margin-bottom: 15px;">[Kg]<br />Weight</th>
                                                <th style="font-size: 15px; color: #484444; text-transform: uppercase; font-weight: 300; text-align: center; margin-bottom: 15px;">[Mc]<br />{{ 'Volume'|trans }}</th>
                                                <th style="font-size: 15px; color: #484444; text-transform: uppercase; font-weight: 300; text-align: center; margin-bottom: 15px;">{{ 'CECK'|trans }}</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            {% for ril in rilevazioni %}
                                                <!-- FIX v1.1.0: background-color inline sul <tr> per zebra striping immutabile al forward
                                                     FIX v1.1.0: inline background-color on <tr> — zebra stripes survive email forward -->
                                                <tr class="row-identify-detail {% if loop.index % 2 == 0 %}odd{% else %}even{% endif %}"
                                                    style="background-color: {% if loop.index % 2 == 0 %}#f0f0f0{% else %}#ffffff{% endif %};">
                                                    <td style="padding: 5px; text-align: center; vertical-align: middle; font-weight: 300; font-size: 12px; color: #485361;">A{{ ril.numPz }}</td>
                                                    <td style="padding: 5px; text-align: center; vertical-align: middle; font-weight: 300; font-size: 12px; color: #485361;">{{ ril.fiscal_w }}</td>
                                                    <td style="padding: 5px; text-align: center; vertical-align: middle; font-weight: 300; font-size: 12px; color: #485361;">{{ ril.n }}</td>
                                                    <td style="padding: 5px; text-align: center; vertical-align: middle; font-weight: 300; font-size: 12px; color: #485361;">{{ ril.tot_colli }}</td>
                                                    <td style="padding: 5px; text-align: center; vertical-align: middle; font-weight: 300; font-size: 12px; color: #485361;">{{ ril.NetWeight|number_format(2, ',', '.') }}</td>
                                                    <td style="padding: 5px; text-align: center; vertical-align: middle; font-weight: 300; font-size: 12px; color: #485361;">{{ ril.Volume|number_format(2, ',', '.') }}</td>
                                                    <td style="padding: 5px; text-align: center; vertical-align: middle; font-weight: 300; font-size: 12px; color: #485361;"> -/- </td>
                                                </tr>
                                            {% endfor %}
                                        </tbody>
                                        <tfoot>
                                            <tr style="background-color: #001663; height: 50px; color: #ffffff;">
                                                <td style="text-align: center;">{{ 'TOT'|trans }}</td>
                                                <td style="text-align: center;"></td>
                                                <td style="text-align: center;">{{ nobj_tot }}</td>
                                                <td style="text-align: center;">{{ ncolli_tot }}</td>
                                                <td style="text-align: center;">{{ weight_tot|number_format(2, ',', '.') }}</td>
                                                <td style="text-align: center;">{{ tot_volume|number_format(2, ',', '.') }}</td>
                                                <!-- FIX v1.1.0: rimosso <font color="red"> deprecated che wrappava img
                                                     FIX v1.1.0: removed deprecated <font color="red"> wrapping img -->
                                                <td style="text-align: center;"><img alt="ICO-" border="0" height="35" src="{{ congruity_img }}" width="auto"></td>
                                            </tr>
                                            {% if alert_tot_b > 0 %}
                                            <tr style="background-color: transparent;">
                                                <td style="font-size: 0; line-height: 0;" height="15" bgcolor="#FFFFFF">&nbsp;</td>
                                                <td style="font-size: 0; line-height: 0;" height="15" bgcolor="#FFFFFF">&nbsp;</td>
                                                <td style="font-size: 0; line-height: 0;" height="15" bgcolor="#FFFFFF">&nbsp;</td>
                                                <td style="font-size: 0; line-height: 0;" height="15" bgcolor="#FFFFFF">&nbsp;</td>
                                                <td style="font-size: 0; line-height: 0;" height="15" bgcolor="#FFFFFF">&nbsp;</td>
                                                <td style="font-size: 0; line-height: 0;" height="15" bgcolor="#FFFFFF">&nbsp;</td>
                                                <td style="font-size: 0; line-height: 0;" height="15" bgcolor="#FFFFFF">&nbsp;</td>
                                                <td style="font-size: 0; line-height: 0;" height="15" bgcolor="#FFFFFF">&nbsp;</td>
                                            </tr>
                                            <tr style="font-size: 16px; font-weight: 400; color: #FFFFFF;">
                                                <td style="text-align: center;"> - - </td>
                                                <td style="text-align: center;"> - - </td>
                                                <!-- Nota: class="{{ alert_xxx }}" mantenuto per web viewer; style inline garantisce rendering email
                                                     Note: class="{{ alert_xxx }}" kept for web viewer; inline style ensures email rendering -->
                                                <td style="text-align: center;" id="id-nobj-tot">
                                                    {% if alert_obj_b != 0 %}<div class="congruita-colli {{ alert_obj }}" style="{{ alert_obj_style }}">{{ "N. Obj"|trans }} <span class="valore-reale">{{ diff_nobj_tot }}</span><br />[<span class="valore-percentuale">{{ diff_pc_nobj_tot }}</span>]</div>{% endif %}
                                                </td>
                                                <td id="id-ncolli-tot">
                                                    {% if alert_colli_b != 0 %}<div class="congruita-colli {{ alert_colli }}" style="{{ alert_colli_style }}">{{ "N. Items"|trans }} <span class="valore-reale">{{ diff_ncolli_tot }}</span><br />[<span class="valore-percentuale">{{ diff_pc_ncolli_tot }}</span>]</div>{% endif %}
                                                </td>
                                                <td id="id-peso-tot">
                                                    {% if alert_weight_b != 0 %}<div class="congruita-weight {{ alert_weight }}" style="{{ alert_weight_style }}">Kg <span class="valore-reale">{{ diff_weight_tot }}</span><br />[<span class="valore-percentuale">{{ diff_pc_weight_tot }}</span>]</div>{% endif %}
                                                </td>
                                                <td id="id-vol-tot">
                                                    {% if alert_volume_b != 0 %}<div class="congruita-volume {{ alert_volume }}" style="{{ alert_volume_style }}">Mc <span class="valore-reale">{{ diff_volume_tot }}</span><br />[<span class="valore-percentuale">{{ diff_pc_volume_tot }}</span>]</div>{% endif %}
                                                </td>
                                                <!-- FIX v1.1.0: rimosso <font color="red"> deprecated -->
                                                <td style="text-align: center;"><img alt="ICO-1" border="0" height="35" src="{{ congruity_img }}" width="auto"></td>
                                            </tr>
                                            {# FIX v1.1.0: {% endif %}} → {% endif %} (doppia graffa Twig - causava parse error)
                                                 FIX v1.1.0: {% endif %}} → {% endif %} (double Twig brace - caused parse error) #}
                                            {% endif %}
                                        </tfoot>
                                    </table>

                                {% else %}

                                    <!-- TABELLA SINGOLA RILEVAZIONE / SINGLE ACQUISITION TABLE -->
                                    {% set ril = rilevazioni|first %}
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%" style="text-align: center; background: #f4f4f4; font-family: Helvetica, sans-serif;" id="id-tabella-dettaglio-{{ ril.id }}">
                                        <thead>
                                            <tr class="row-selected-detail" style="background-color: #e8e8e9;">
                                                <th style="font-size: 15px; color: #484444; text-transform: uppercase; font-weight: 300; text-align: center; margin-bottom: 15px; background-color: rgba(255,255,255,0.3);">[ID]<br />{{ 'OBJ'|trans }}</th>
                                                <th style="font-size: 15px; color: #484444; text-transform: uppercase; font-weight: 300; text-align: center; margin-bottom: 15px; background-color: rgba(255,255,255,0.3);">[N]<br />{{ 'Items'|trans }}</th>
                                                <th style="font-size: 15px; color: #484444; text-transform: uppercase; font-weight: 300; text-align: center; margin-bottom: 15px; background-color: rgba(255,255,255,0.3);">[Kg]<br />{{ 'Weight'|trans }}</th>
                                                <th style="font-size: 15px; color: #484444; text-transform: uppercase; font-weight: 300; text-align: center; margin-bottom: 15px; background-color: rgba(255,255,255,0.3);">[Mc]<br />{{ 'Volume'|trans }}</th>
                                                <th style="font-size: 15px; color: #484444; text-transform: uppercase; font-weight: 300; text-align: center; margin-bottom: 15px; background-color: rgba(255,255,255,0.3);">[m]<br />{{ 'H'|trans }}</th>
                                                <th style="font-size: 15px; color: #484444; text-transform: uppercase; font-weight: 300; text-align: center; margin-bottom: 15px; background-color: rgba(255,255,255,0.3);">[m]<br />{{ 'L'|trans }}</th>
                                                <th style="font-size: 15px; color: #484444; text-transform: uppercase; font-weight: 300; text-align: center; margin-bottom: 15px; background-color: rgba(255,255,255,0.3);">[m]<br />{{ 'W'|trans }}</th>
                                                <th style="font-size: 15px; color: #484444; text-transform: uppercase; font-weight: 300; text-align: center; margin-bottom: 15px; background-color: rgba(255,255,255,0.3);">[ - ]<br />{{ 'CECK'|trans }}</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            {% for line in ril.line %}
                                                <!-- FIX v1.1.0: background-color inline sul <tr> per zebra striping immutabile al forward
                                                     FIX v1.1.0: inline background-color on <tr> - zebra stripes survive email forward -->
                                                <tr style="background-color: {% if loop.index % 2 == 0 %}#f4f4f4{% else %}#ffffff{% endif %};">
                                                    <td style="padding: 5px; text-align: center; vertical-align: middle; font-weight: 300; font-size: 12px; color: #606060; border-bottom: solid 1px rgba(255,255,255,0.9);">
                                                        {%  if firstkey != '' %}[{{ firstkey }}] {% endif %}{{ line.c }}
                                                    </td>
                                                    <td style="padding: 5px; text-align: center; vertical-align: middle; font-weight: 300; font-size: 12px; color: #606060; border-bottom: solid 1px rgba(255,255,255,0.9);">{{ line.ncolli }}</td>
                                                    {% if ril.line|length == 1 %}
                                                        <td style="padding: 5px; text-align: center; vertical-align: middle; font-weight: 300; font-size: 12px; color: #606060; border-bottom: solid 1px rgba(255,255,255,0.9);">{{ ril.NetWeight|number_format(2, ',', '.') }}</td>
                                                    {% else %}
                                                        <td style="padding: 5px; text-align: center; vertical-align: middle; font-weight: 300; font-size: 12px; color: #606060; border-bottom: solid 1px rgba(255,255,255,0.9);"> - - </td>
                                                    {%  endif %}
                                                    <td style="padding: 5px; text-align: center; vertical-align: middle; font-weight: 300; font-size: 12px; color: #606060; border-bottom: solid 1px rgba(255,255,255,0.9);">
                                                        {% set Inbound = line.Inbound|number_format(2, ',', '.') %}
                                                        {% set RealVolume = line.RealVolume|number_format(2, ',', '.') %}
                                                        {% set RealVolumeSurface = line.RealVolumeSurface|number_format(2, ',', '.') %}
                                                        {% set InboundVolumeSurface = line.InboundVolumeSurface|number_format(2, ',', '.') %}
                                                        {% if (line.VolumeType == 1) %}{{ Inbound }}{% endif %}
                                                        {% if (line.VolumeType == 2) %}{{ RealVolume }}{% endif %}
                                                        {% if (line.VolumeType == 3) %}{{ RealVolumeSurface }}{% endif %}
                                                        {% if (line.VolumeType == 4) %}{{ InboundVolumeSurface }}{% endif %}
                                                    </td>
                                                    <td style="padding: 5px; text-align: center; vertical-align: middle; font-weight: 300; font-size: 12px; color: #606060; border-bottom: solid 1px rgba(255,255,255,0.9);">{{ line.H|number_format(2, ',', '.') }}</td>
                                                    <td style="padding: 5px; text-align: center; vertical-align: middle; font-weight: 300; font-size: 12px; color: #606060; border-bottom: solid 1px rgba(255,255,255,0.9);">{{ line.L|number_format(2, ',', '.') }}</td>
                                                    <td style="padding: 5px; text-align: center; vertical-align: middle; font-weight: 300; font-size: 12px; color: #606060; border-bottom: solid 1px rgba(255,255,255,0.9);">{{ line.W|number_format(2, ',', '.') }}</td>
                                                </tr>
                                            {% endfor %}
                                        </tbody>
                                        <tfoot style="font-size: 17px; color: #FFFFFF; text-transform: uppercase; font-weight: 300; text-align: center; margin-bottom: 5px;">
                                            <tr class="odd gradeZ totali" style="background-color: #001663; height: 22px;">
                                                <td style="text-align: center;">{{ nobj_tot }}</td>
                                                <td style="text-align: center;">{{ ncolli_tot }}</td>
                                                <td style="text-align: center;">{{ weight_tot|number_format(2, ',', '.') }}</td>
                                                <td style="text-align: center;">{{ tot_volume|number_format(2, ',', '.') }}</td>
                                                <td style="text-align: center;"></td>
                                                <td style="text-align: center;"></td>
                                                <td style="text-align: center;"></td>
                                                <!-- FIX v1.1.0: rimosso <font color="red"> deprecated (x2)
                                                     FIX v1.1.0: removed deprecated <font color="red"> (x2) -->
                                                <td style="text-align: center;"><img alt="ICO-2" border="0" height="35" src="{{ congruity_img2 }}" width="auto"></td>
                                            </tr>
                                            {% if alert_tot_b > 0 %}
                                            <tr style="background-color: transparent;">
                                                <td style="font-size: 0; line-height: 0;" height="15" bgcolor="#FFFFFF">&nbsp;</td>
                                                <td style="font-size: 0; line-height: 0;" height="15" bgcolor="#FFFFFF">&nbsp;</td>
                                                <td style="font-size: 0; line-height: 0;" height="15" bgcolor="#FFFFFF">&nbsp;</td>
                                                <td style="font-size: 0; line-height: 0;" height="15" bgcolor="#FFFFFF">&nbsp;</td>
                                                <td style="font-size: 0; line-height: 0;" height="15" bgcolor="#FFFFFF">&nbsp;</td>
                                                <td style="font-size: 0; line-height: 0;" height="15" bgcolor="#FFFFFF">&nbsp;</td>
                                                <td style="font-size: 0; line-height: 0;" height="15" bgcolor="#FFFFFF">&nbsp;</td>
                                                <td style="font-size: 0; line-height: 0;" height="15" bgcolor="#FFFFFF">&nbsp;</td>
                                            </tr>
                                            <tr height="37" style="font-size: 16px; font-weight: 400; color: #001163;">
                                                <td id="id-nobj-tot" style="text-align: center;">
                                                    {% if alert_obj_b != 0 %}<div class="congruita-obj {{ alert_obj }}" style="{{ alert_obj_style }}">{{ "N. Obj"|trans }} <span class="valore-reale">{{ diff_nobj_tot }}</span><br />[<span class="valore-percentuale">{{ diff_pc_nobj_tot }}</span>]</div>{% endif %}
                                                </td>
                                                <td id="id-ncolli-tot">
                                                    {% if alert_colli_b != 0 %}<div class="congruita-colli {{ alert_colli }}" style="{{ alert_colli_style }}">{{ "N. Items"|trans }} <span class="valore-reale">{{ diff_ncolli_tot }}</span><br />[<span class="valore-percentuale">{{ diff_pc_ncolli_tot }}</span>]</div>{% endif %}
                                                </td>
                                                <td id="id-peso-tot">
                                                    {% if alert_weight_b != 0 %}<div class="congruita-weight {{ alert_weight }}" style="{{ alert_weight_style }}">Kg <span class="valore-reale">{{ diff_weight_tot }}</span><br />[<span class="valore-percentuale">{{ diff_pc_weight_tot }}</span>]</div>{% endif %}
                                                </td>
                                                <td id="id-vol-tot">
                                                    {% if alert_volume_b != 0 %}<div class="congruita-volume {{ alert_volume }}" style="{{ alert_volume_style }}">Mc <span class="valore-reale">{{ diff_volume_tot }}</span><br />[<span class="valore-percentuale">{{ diff_pc_volume_tot }}</span>]</div>{% endif %}
                                                </td>
                                                <td style="text-align: center;"> - - </td>
                                                <td style="text-align: center;"> - - </td>
                                                <td style="text-align: center;"> - - </td>
                                                <!-- FIX v1.1.0: rimosso <font color="red"> deprecated -->
                                                <td style="text-align: center;"><img alt="ICO-3" border="0" height="35" src="{{ congruity_img }}" width="auto"></td>
                                            </tr>
                                            {% endif %}
                                        </tfoot>
                                    </table>

                                {% endif %}
                            </div>
                        </td>
                    </tr>

                </table>

                <!-- SECONDA TABELLA: TESTO + FOOTER / SECOND TABLE: TEXT + FOOTER -->
                <table align="center" border="0" cellpadding="0" cellspacing="0" style="width: {{ containerwidth }}; border-collapse: collapse; background-color: #F9F5F5">

                    <tr>
                        <td bgcolor="#ffffff" style="font-size: 0; line-height: 0;" height="10">&nbsp;</td>
                    </tr>

                    <!-- BLOCCO TESTO ATTENZIONE / ATTENTION TEXT BLOCK -->
                    <tr style="width: {{ containerwidth }}; page-break-inside: avoid;">
                        <td bgcolor="#ffffff">
                            <table border="0" cellpadding="0" cellspacing="0" style="width: {{ containerwidth }}; page-break-inside: avoid;">
                                <tr>
                                    <td bgcolor="#ffffff" width="48%" valign="top">
                                        <table style="text-align: left; padding: 6px; width: 100%;">
                                            <tr>
                                                <td width="100%" style="color: #505050; font-family: Helvetica; font-size: 14px; line-height: 150%; text-align: left; padding: 0 0 20px;">
                                                    <div style="font-size: 16px; font-style: normal; font-weight: 400; line-height: 100%; letter-spacing: normal; text-align: left; margin: 0 0 10px;">ATTENZIONE ! &nbsp;</div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td width="100%" style="color: #505050; font-family: Helvetica; font-size: 14px; line-height: 150%; text-align: left; padding: 0 0 20px;">
                                                    <div style="font-size: 16px; font-style: normal; font-weight: 400; line-height: 100%; letter-spacing: normal; text-align: left; margin: 0 0 10px;">
                                                        <span style="font-size: 16px; color: #FE1062; font-weight: 400;">EASY SUPPORT!</span>
                                                    </div>
                                                    <p><a href="https://viewer.c4rgo.com" target="_blank">Spett.le CLIENTE</a></p>
                                                    <p>al fine di velocizzare i controlli e permettere alle merci di riprendere velocemente l&rsquo;iter di spedizione sono qui sopra riportate fotografie e dettaglio della spedizione.<br>
                                                    Vi chiediamo un veloce controllo quantitativo e un primo riconoscimento / conferma visiva.<br>
                                                    La contatteremo a breve per definire eventuali nuove tempistiche che dipendono dalla conferma e ricevimento dei nuovi documento di trasporto.<br>
                                                    Qualora riscontri qualsiasi inesattezza non esiti a contattarci al n° XXX XXXXXXX o segnalare l&rsquo;errore inoltrando la presente con le note a <a href="mailto:customer@spedizioni.it">customer@spedizioni.it</a><br>
                                                    Sarà nostra premura normalizzare e velocizzare con cura e attenzione l&rsquo;espletamento delle pratiche.</p>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>

                    <tr>
                        <!-- FIX v1.1.0: &bnsp; → &nbsp; (entita HTML non valida)
                             FIX v1.1.0: &bnsp; → &nbsp; (invalid HTML entity) -->
                        <td bgcolor="#FFFFFF" style="width: {{ containerwidth }}; font-size: 0; line-height: 5; border-bottom: 1px solid #CCCCCC; border-top: 1px solid #FFFFFF; padding: 6px;" height="10">&nbsp;</td>
                    </tr>

                    <!-- BLOCCO LOGO + SALUTO / LOGO + GREETING BLOCK
                         FIX v1.1.0: larghezze 48%+4%+80%=132% corrette a 46%+4%+46%=96%
                         FIX v1.1.0: widths 48%+4%+80%=132% fixed to 46%+4%+46%=96% -->
                    <tr>
                        <td style="width: {{ containerwidth }};" bgcolor="#ffffff">
                            <table style="width: {{ containerwidth }};" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td bgcolor="#ffffff" width="46%" valign="top">
                                        <div style="text-align: center; width: 100%; padding: 6px;">
                                            <table style="text-align: center; width: 100%;">
                                                <tr>
                                                    <td style="line-height: 150%; text-align: center; padding: 0 0 20px;">
                                                        <a href="https://www.c4rgo.com">
                                                            <img alt="DS-C4RGO- Logistic Advanced Automation" border="0" height="50" src="{{ LogoCargo }}" width="auto">
                                                        </a>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </td>
                                    <td style="font-size: 0; line-height: 0;" width="4%">&nbsp;</td>
                                    <td bgcolor="#ffffff" width="46%" valign="top">
                                        <div style="text-align: right; width: 100%; padding: 6px;">
                                            <table style="text-align: center; width: 100%;">
                                                <tr>
                                                    <td style="line-height: 150%; text-align: center; padding: 0 0 20px;">
                                                        <p>Distinti saluti<br>Delivery STAFF</p>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>

                    <!-- FOOTER -->
                    <tr>
                        <td>
                            <table bgcolor="#f4f4f4" style="width: {{ containerwidth }}; text-align: left;" border="0" cellpadding="0" cellspacing="0" id="templateFooter">
                                <tr>
                                    <td valign="top" style="color: #606060; font-family: Helvetica; font-size: 10px; line-height: 150%; text-align: left; padding: 20px;">
                                        <!-- FIX v1.1.0: *|TWITTER:PROFILEURL|* Mailchimp-only → URL configurabile (aggiornare XXXXXXXXX)
                                             FIX v1.1.0: *|TWITTER:PROFILEURL|* Mailchimp-only → configurable URL (update XXXXXXXXX) -->
                                        <a href="https://twitter.com/XXXXXXXXX" target="_blank" style="color: #606060;">Follow on Twitter</a>&nbsp;&nbsp;&nbsp;
                                        <a href="https://www.linkedin.com/company/14779718/admin/" style="color: #606060;">Follow on Linkedin</a>&nbsp;&nbsp;&nbsp;
                                        <!-- FIX v1.1.0: *|FORWARD|* Mailchimp-only, link rotto fuori Mailchimp → mailto: fallback
                                             FIX v1.1.0: *|FORWARD|* Mailchimp-only, broken outside Mailchimp → mailto: fallback -->
                                        <a href="mailto:?subject=C4RGO%20-%20Congruity%20Alert%20AWB%20{{ awb }}&amp;body=Vi%20inoltro%20questa%20comunicazione%20C4RGO" style="color: #606060;">Forward to Friend</a>&nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="top" style="color: gray; font-family: Helvetica; font-size: 10px; line-height: 150%; text-align: left; padding: 20px; padding-top: 0;">
                                        <em>Copyright &copy; | 2020 - by CONSITE Italia Srl - All rights reserved. |</em>
                                        <br /> This mail is a Reserved Communication from C4RGO.CLOUD SERVICES Customer - No Reply
                                        <br />
                                        <br /> The present message and its attachments are addressed solely to the persons above and may contain confidential information.
                                        <br/>If you have received the message in error, please return it immediately to the sender and delete the message.
                                        <br/>You are informed that any use of the content hereof is prohibited. Any illegal use of this information will be prosecuted according to the law.
                                        <br/>
                                        Should you have any questions, please contact us: <a href="mailto:c4rgo@consite.it" style="color: gray;">c4rgo@consite.it</a>
                                        <br />
                                        <p>
                                            <a href="https://www.c4rgo.com" style="color: #606060; font-weight: 400; text-decoration: underline;" target="_blank">Web Site: WWW.C4RGO.COM</a>
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                            <a href="https://www.c4rgo.app" style="color: #606060; font-weight: 400; text-decoration: underline;" target="_blank">Mobile-Services: WWW.C4RGO.APP</a>
                                        </p>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>

                </table>
            </div>
        </div>
    </body>
</html>
