<?php /* @var \dokuwiki\plugin\bez\meta\Tpl $tpl */ ?>
<html>
<head>
    <title><?php echo $tpl->get('wiki_title') ?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="margin:0; padding:0; background-color:#f0eeea; font-family:Arial,sans-serif;">

<table width="100%" cellpadding="0" cellspacing="0" border="0" style="background:#f0eeea; padding:20px 0;">
<tr><td align="center">
<table width="600" cellpadding="0" cellspacing="0" border="0" style="max-width:600px; background:#ffffff;">

    <!-- Header -->
    <tr>
        <td style="height:4px; background:#e94560; font-size:0; line-height:0;">&nbsp;</td>
    </tr>
    <tr>
        <td style="background:#1a1a2e; padding:18px 30px;">
            <table width="100%" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td>
                        <table cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td style="width:36px; height:36px; background:#e94560; text-align:center; vertical-align:middle;">
                                    <span style="font-family:Georgia,serif; font-size:18px; font-weight:bold; color:#ffffff;">N</span>
                                </td>
                                <td style="padding-left:12px;">
                                    <span style="font-family:Georgia,serif; font-size:17px; font-weight:bold; color:#f8f7f4; letter-spacing:1px;">NICC</span><br>
                                    <span style="font-family:Arial,sans-serif; font-size:10px; color:#a0a0b8; letter-spacing:1px; text-transform:uppercase;"><?php echo $tpl->get('wiki_title') ?></span>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td align="right" valign="middle">
                        <span style="font-family:Arial,sans-serif; font-size:10px; font-weight:bold; color:#f59e0b; letter-spacing:1px; text-transform:uppercase; border:1px solid rgba(245,158,11,0.4); padding:4px 10px;">Notificacion</span>
                    </td>
                </tr>
            </table>
        </td>
    </tr>

    <!-- Sender info band -->
    <tr>
        <td style="background-color:<?php echo $tpl->get('priority_bg_color', '#e8f4fd') ?>; border-left:5px solid <?php echo $tpl->get('priority_border_color', '#e94560') ?>; padding:16px 30px;">
            <strong style="font-size:14px; color:#1a1a2e;"><?php echo $tpl->get('notify_sender', '') ?> le notifica sobre la siguiente tarea asignada.</strong>
            <br><span style="font-size:12px; color:#7a7a8e;"><?php echo $tpl->get('warning_message', '') ?></span>
        </td>
    </tr>

    <!-- Body -->
    <tr>
        <td style="background:#f8f7f4; padding:28px 30px;">

            <!-- Task info -->
            <table width="100%" cellpadding="0" cellspacing="0" border="0" style="background:#ffffff; border-left:3px solid #e94560;">
                <tr>
                    <td style="padding:10px 16px; border-bottom:1px solid #f0eeea; font-size:13px;">
                        <span style="color:#7a7a8e; font-size:10px; text-transform:uppercase; letter-spacing:1px;">Tarea</span><br>
                        <strong style="color:#1a1a2e;">No.<?php echo $tpl->get('task')->id ?></strong>
                    </td>
                </tr>
                <?php if ($tpl->get('task')->thread_id): ?>
                <tr>
                    <td style="padding:10px 16px; border-bottom:1px solid #f0eeea; font-size:13px;">
                        <span style="color:#7a7a8e; font-size:10px; text-transform:uppercase; letter-spacing:1px;">Proyecto</span><br>
                        <strong style="color:#1a1a2e;"><?php
                            $thread = $tpl->get('task')->thread;
                            $client_name = '';
                            try { $client_name = $thread->label_name; } catch (\Exception $e) {}
                            if ($client_name) echo htmlspecialchars($client_name) . ' - ';
                            echo '#' . $tpl->get('task')->thread_id;
                            try { echo ' - ' . htmlspecialchars($thread->title); } catch (\Exception $e) {}
                        ?></strong>
                    </td>
                </tr>
                <?php endif ?>
                <tr>
                    <td style="padding:10px 16px; border-bottom:1px solid #f0eeea; font-size:13px;">
                        <span style="color:#7a7a8e; font-size:10px; text-transform:uppercase; letter-spacing:1px;">Proceso</span><br>
                        <span style="color:#1a1a2e;"><?php echo $tpl->get('task')->task_program_name ?: '---' ?></span>
                    </td>
                </tr>
                <tr>
                    <td style="padding:10px 16px; border-bottom:1px solid #f0eeea; font-size:13px;">
                        <span style="color:#7a7a8e; font-size:10px; text-transform:uppercase; letter-spacing:1px;">Fecha limite</span><br>
                        <strong style="color:#1a1a2e;"><?php echo $tpl->get('task')->plan_date ?></strong>
                        <?php if ($tpl->get('task')->all_day_event == '0'): ?>
                            <span style="color:#7a7a8e;">(<?php echo $tpl->get('task')->start_time ?> - <?php echo $tpl->get('task')->finish_time ?>)</span>
                        <?php endif ?>
                    </td>
                </tr>
                <tr>
                    <td style="padding:10px 16px; border-bottom:1px solid #f0eeea; font-size:13px;">
                        <span style="color:#7a7a8e; font-size:10px; text-transform:uppercase; letter-spacing:1px;">Dias restantes</span><br>
                        <strong style="color:<?php echo $tpl->get('priority_border_color', '#e94560') ?>; font-size:15px;">
                            <?php
                            $dr = $tpl->get('days_remaining', 0);
                            if ($dr < 0) {
                                echo abs($dr) . ' dia(s) vencida';
                            } elseif ($dr == 0) {
                                echo 'Vence HOY';
                            } else {
                                echo $dr . ' dia(s)';
                            }
                            ?>
                        </strong>
                    </td>
                </tr>
                <tr>
                    <td style="padding:10px 16px; border-bottom:1px solid #f0eeea; font-size:13px;">
                        <span style="color:#7a7a8e; font-size:10px; text-transform:uppercase; letter-spacing:1px;">Responsable</span><br>
                        <span style="color:#1a1a2e;"><?php echo $tpl->user_name($tpl->get('task')->assignee) ?></span>
                    </td>
                </tr>
                <tr>
                    <td style="padding:10px 16px; <?php echo $tpl->get('task')->cost ? 'border-bottom:1px solid #f0eeea;' : '' ?> font-size:13px;">
                        <span style="color:#7a7a8e; font-size:10px; text-transform:uppercase; letter-spacing:1px;">Creador</span><br>
                        <span style="color:#1a1a2e;"><?php echo $tpl->user_name($tpl->get('task')->original_poster) ?></span>
                    </td>
                </tr>
                <?php if ($tpl->get('task')->cost): ?>
                <tr>
                    <td style="padding:10px 16px; font-size:13px;">
                        <span style="color:#7a7a8e; font-size:10px; text-transform:uppercase; letter-spacing:1px;">Item</span><br>
                        <span style="color:#1a1a2e;"><?php echo $tpl->get('task')->cost ?></span>
                    </td>
                </tr>
                <?php endif ?>
            </table>

            <!-- Description -->
            <div style="margin-top:20px;">
                <strong style="font-size:14px; color:#1a1a2e;">Descripcion:</strong>
                <div style="background:#ffffff; padding:16px; margin-top:8px; border-left:3px solid #e8e5e0; font-size:14px; color:#3a3a4e; line-height:1.6;">
                    <?php echo $tpl->get('task')->content_html ?>
                </div>
            </div>

            <!-- CTA Button -->
            <table width="100%" cellpadding="0" cellspacing="0" border="0" style="margin-top:24px;">
                <tr>
                    <td align="center">
                        <a href="<?php echo $tpl->url('task', 'tid', $tpl->get('task')->id) ?>" style="display:inline-block; background:#e94560; color:#ffffff; font-family:Arial,sans-serif; font-size:13px; font-weight:bold; letter-spacing:1px; text-transform:uppercase; text-decoration:none; padding:14px 32px;">
                            Ver / Editar Tarea
                        </a>
                    </td>
                </tr>
            </table>

            <!-- Footer info -->
            <p style="font-size:12px; color:#7a7a8e; margin-top:24px; line-height:1.6; text-align:center;">
                Este correo fue enviado manualmente por <?php echo $tpl->get('notify_sender', 'un usuario') ?>.<br>
                <a href="<?php echo $tpl->url('task', 'tid', $tpl->get('task')->id) ?>" style="color:#e94560;">Ver tarea</a> |
                <a href="<?php echo $tpl->url('task', 'tid', $tpl->get('task')->id, 'action', 'unsubscribe') ?>" style="color:#e94560;">Cancelar suscripcion</a>
            </p>
        </td>
    </tr>

</table>

<?php include "footer.php" ?>

</td></tr>
</table>

</body>
</html>
