<!-- page content -->
<div class="right_col" role="main" style="background-color: #f4f6f9; padding: 30px; min-height: 100vh;">
  <div class="">
    <div class="page-title" style="margin-bottom: 30px;">
      <div class="title_left">
        <h3 style="font-size: 26px; color: #222; font-weight: 600;">Hostel Management</h3>
      </div>
    </div>

    <div class="clearfix"></div>

    <div class="row">
      <div class="col-md-10 col-sm-12 col-xs-12" style="margin: auto;">
        <div class="x_panel" style="box-shadow: 0 8px 24px rgba(0,0,0,0.08); border-radius: 15px; background-color: #fff; padding: 35px;">
          <div class="x_title" style="border-bottom: 1px solid #e0e0e0; margin-bottom: 30px;">
            <h2 style="color: #00acac; font-weight: 600;">Edit Hostel Record</h2>
            <ul class="nav navbar-right panel_toolbox">
              <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
            </ul>
            <div class="clearfix"></div>
          </div>

          <div class="x_content">
            <form class="form-horizontal form-label-left" action="<?php echo base_url(); ?>hostel/update/<?php echo $hostel['id']; ?>" method="post">

              <!-- Hostel Name -->
              <div class="item form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12">Hostel Name <span style="color: red;">*</span></label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                  <input type="text" id="hostel_name" name="hostel_name" class="form-control" required style="border-radius: 10px; padding: 12px;" value="<?php echo $hostel['hostel_name']; ?>">
                </div>
              </div>

              <!-- Class -->
              <div class="item form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12">Class <span style="color: red;">*</span></label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                  <input type="text" id="class" name="class" class="form-control" required style="border-radius: 10px; padding: 12px;" value="<?php echo $hostel['class']; ?>">
                </div>
              </div>

              <!-- Section -->
              <div class="item form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12">Section <span style="color: red;">*</span></label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                  <input type="text" id="section" name="section" class="form-control" required style="border-radius: 10px; padding: 12px;" value="<?php echo $hostel['section']; ?>">
                </div>
              </div>

              <!-- Type -->
              <div class="item form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12">Type <span style="color: red;">*</span></label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                  <select name="type" id="type" class="form-control" required style="border-radius: 10px; padding: 12px;">
                    <option value="">Select Type</option>
                    <option value="Boys" <?php echo ($hostel['type'] == 'Boys') ? 'selected' : ''; ?>>Boys</option>
                    <option value="Girls" <?php echo ($hostel['type'] == 'Girls') ? 'selected' : ''; ?>>Girls</option>
                    <option value="Mixed" <?php echo ($hostel['type'] == 'Mixed') ? 'selected' : ''; ?>>Mixed</option>
                  </select>
                </div>
              </div>

              <!-- Room No -->
              <div class="item form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12">Room No <span style="color: red;">*</span></label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                  <input type="text" id="room" name="room" class="form-control" required style="border-radius: 10px; padding: 12px;" value="<?php echo $hostel['room']; ?>">
                </div>
              </div>

              <!-- Bed No -->
              <div class="item form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12">Bed No <span style="color: red;">*</span></label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                  <input type="text" id="bed" name="bed" class="form-control" required style="border-radius: 10px; padding: 12px;" value="<?php echo $hostel['bed']; ?>">
                </div>
              </div>

              <!-- Admission Date -->
              <div class="item form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12">Admission Date <span style="color: red;">*</span></label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                  <input type="date" id="date" name="date" class="form-control" required style="border-radius: 10px; padding: 12px;" value="<?php echo $hostel['date']; ?>">
                </div>
              </div>

              <!-- Update Button -->
              <div class="form-group">
                <div class="col-md-6 col-md-offset-3" style="text-align: center;">
                  <button type="submit" class="btn" style="
                      background-color: #00acac;
                      color: white;
                      padding: 12px 30px;
                      border: none;
                      border-radius: 10px;
                      font-size: 16px;
                      font-weight: bold;
                      box-shadow: 0 4px 8px rgba(0,0,0,0.1);
                      transition: background-color 0.3s ease;
                  " onmouseover="this.style.backgroundColor='#008f8f'" onmouseout="this.style.backgroundColor='#00acac'">
                    Update
                  </button>
                </div>
              </div>

            </form>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
