<?php  

session_start();
if(!$_SESSION['id']){
    header('location:index.php');
}
  require_once '../system/conn.php';
$stmt = $conn->prepare("SELECT * FROM `emp_details` WHERE `sn` = ?");
$stmt->execute([$_POST['id']]);
$emp = $stmt->fetch(PDO::FETCH_ASSOC);

?>

<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">

<style>
.letter-container {
    width: 98%;
    /* Reduced width */
    margin: auto auto;
    padding: 15px;
    font-family: 'Times New Roman', sans-serif;
    font-size: 11px;
    /* Reduced font size */
}

.header img {
    width: 100px;
    /* Reduced logo size */
}

.details-table td {
    padding: 4px;
    /* Reduced padding */
    font-size: 10px;
}

.header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}


.header h1 {
    font-size: 22px;
    text-transform: uppercase;
    margin: 0;
    font-weight: bold;
}

.sub-header {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}



.details-table td:first-child {
    font-weight: bold;
    width: 30%;
}

.signature-section {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
}

.signature-block {
    text-align: center;
}
</style>
<style>
.application-form {
    width: 95%;
    margin: 20px auto;
    padding: 20px;
    border-radius: 10px;
    font-family: Arial, sans-serif;
    background: #fff;
}

.application-form h2 {
    text-align: center;
    margin-bottom: 20px;
}



.form-table {
    width: 100%;
    border-collapse: collapse;
}

.form-table td {
    padding: 10px;
}

.form-table td:first-child {
    font-weight: bold;
    width: 25%;
    background: #f1f1f1;
}

.photo-container {
    width: 30%;
    text-align: center;
}

.photo-container img {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    border: 2px solid #000;
}

.section-divider {
    margin-top: 20px;
    border-top: 2px solid black;
    padding-top: 20px;
}

.dual-row td {
    width: 50%;
    white-space: nowrap;
    /* Prevents text from breaking */
    text-align: left;
}

.tri-row td {
    width: 16.66% !important;
    /* Each column takes exactly 16.66% */
    white-space: nowrap;
    /* Prevents text from breaking */
    text-align: left;
    /* Ensures proper alignment */
}
</style>
<?php
$biodata = '<div class="letter-container">
    <div class="header">
        <img src="http://hr.utcpl.co.in/hrm/admin/assets/images/logo-utcpl.webp" alt="Company Logo">
        <div>
        <h1>UTKAL TEAM CARE PVT LTD</h1>
        <p>Reff. No - UTCPL/HR/TL/24/05/003</p>
        <p>Issue Date: '.date("F j, Y").'</p>
        </div>
        
    </div>
    <h4 style="text-align:center;margin-top:2rem;">TERMINATION LETTER</h4>
    <div class="application-form" style="margin-top:4.5rem">
        <div class="form-container">
        <p>Dear <strong>'.$emp['e_name'].',</strong></p>
        <p>This letter serves as formal notification that your employment with <strong>Utkal Team Care Pvt. Ltd.</strong> will conclude effective <strong>'.date("F j, Y").'</strong>. This decision has been made due to operational requirements and concerns regarding workplace conduct.
</p>
<p  style="text-indent: 3rem;">Your final dues, including any applicable salary for the notice period, will be processed and disbursed at the end of the month. Should you have any questions or require further clarification, please reach out to the HR Department.
</p>
<p  style="text-indent: 3rem;">We appreciate your time with the organization and wish you the best in your future endeavors.</p>
        </div>

    <div class="signature-section" style="margin-top:7rem">
        <div class="signature-block">
            <p>HR Department</p>
        </div>
    </div>
    <hr>
    <footer>
        <p style="text-align:center"><strong><big>UTKAL Team Care (P) Ltd.</big></strong></p>
    </footer>
</div>';

echo $biodata;
?>